From 04999be9d70baf9e841e01ae8c91562605067e08 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 25 Mar 2026 21:23:20 +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: eyJwIjoiZ29vZ2xlLWlhbS12My8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWlhbS12M2JldGEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWlkZW50aXR5LWFjY2Vzc19jb250ZXh0X21hbmFnZXItdjEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLW1hcHMtZmxlZXRfZW5naW5lLWRlbGl2ZXJ5LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLW1hcHMtZmxlZXRfZW5naW5lLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLWNzcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWFjY291bnRzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWFjY291bnRzLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWNvbnZlcnNpb25zLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWNvbnZlcnNpb25zLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWRhdGFfc291cmNlcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWRhdGFfc291cmNlcy12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWludmVudG9yaWVzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWludmVudG9yaWVzLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWlzc3VlX3Jlc29sdXRpb24tdjEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWlzc3VlX3Jlc29sdXRpb24tdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWxmcC12MS8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWxmcC12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LW5vdGlmaWNhdGlvbnMtdjEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LW5vdGlmaWNhdGlvbnMtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= --- owl-bot-staging/google-iam-v3/.gitignore | 22 + .../google-iam-v3/.repo-metadata.json | 17 + owl-bot-staging/google-iam-v3/.rubocop.yml | 33 + owl-bot-staging/google-iam-v3/.toys.rb | 28 + owl-bot-staging/google-iam-v3/.yardopts | 12 + .../google-iam-v3/AUTHENTICATION.md | 122 + owl-bot-staging/google-iam-v3/CHANGELOG.md | 2 + owl-bot-staging/google-iam-v3/Gemfile | 14 + owl-bot-staging/google-iam-v3/LICENSE.md | 201 + owl-bot-staging/google-iam-v3/README.md | 154 + owl-bot-staging/google-iam-v3/Rakefile | 169 + .../google-iam-v3/gapic_metadata.json | 87 + .../google-iam-v3/google-iam-v3.gemspec | 29 + .../google-iam-v3/lib/google-iam-v3.rb | 21 + .../google-iam-v3/lib/google/iam/v3.rb | 44 + .../google/iam/v3/operation_metadata_pb.rb | 22 + .../iam/v3/policy_binding_resources_pb.rb | 27 + .../lib/google/iam/v3/policy_bindings.rb | 55 + .../google/iam/v3/policy_bindings/client.rb | 1147 ++++++ .../iam/v3/policy_bindings/credentials.rb | 45 + .../iam/v3/policy_bindings/operations.rb | 839 +++++ .../google/iam/v3/policy_bindings/paths.rb | 140 + .../lib/google/iam/v3/policy_bindings/rest.rb | 52 + .../iam/v3/policy_bindings/rest/client.rb | 1062 ++++++ .../iam/v3/policy_bindings/rest/operations.rb | 937 +++++ .../v3/policy_bindings/rest/service_stub.rb | 535 +++ .../iam/v3/policy_bindings_service_pb.rb | 36 + .../v3/policy_bindings_service_services_pb.rb | 63 + .../v3/principal_access_boundary_policies.rb | 55 + .../client.rb | 1100 ++++++ .../credentials.rb | 45 + .../operations.rb | 839 +++++ .../paths.rb | 67 + .../rest.rb | 52 + .../rest/client.rb | 1015 +++++ .../rest/operations.rb | 937 +++++ .../rest/service_stub.rb | 447 +++ ...pal_access_boundary_policies_service_pb.rb | 37 + ...s_boundary_policies_service_services_pb.rb | 56 + ...pal_access_boundary_policy_resources_pb.rb | 27 + .../google-iam-v3/lib/google/iam/v3/rest.rb | 36 + .../lib/google/iam/v3/version.rb | 26 + .../google-iam-v3/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 ++ .../google/iam/v3/operation_metadata.rb | 55 + .../google/iam/v3/policy_binding_resources.rb | 171 + .../google/iam/v3/policy_bindings_service.rb | 232 ++ ...ncipal_access_boundary_policies_service.rb | 191 + ...ncipal_access_boundary_policy_resources.rb | 127 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../google-iam-v3/snippets/Gemfile | 32 + .../policy_bindings/create_policy_binding.rb | 54 + .../policy_bindings/delete_policy_binding.rb | 54 + .../policy_bindings/get_policy_binding.rb | 47 + .../policy_bindings/list_policy_bindings.rb | 51 + .../search_target_policy_bindings.rb | 51 + .../policy_bindings/update_policy_binding.rb | 54 + ...create_principal_access_boundary_policy.rb | 54 + ...delete_principal_access_boundary_policy.rb | 54 + .../get_principal_access_boundary_policy.rb | 47 + ...list_principal_access_boundary_policies.rb | 51 + ...incipal_access_boundary_policy_bindings.rb | 51 + ...update_principal_access_boundary_policy.rb | 54 + .../snippet_metadata_google.iam.v3.json | 495 +++ .../iam/v3/policy_bindings_operations_test.rb | 400 ++ .../iam/v3/policy_bindings_paths_test.rb | 97 + .../iam/v3/policy_bindings_rest_test.rb | 436 +++ .../google/iam/v3/policy_bindings_test.rb | 517 +++ ...ccess_boundary_policies_operations_test.rb | 400 ++ ...pal_access_boundary_policies_paths_test.rb | 67 + ...ipal_access_boundary_policies_rest_test.rb | 435 +++ ...principal_access_boundary_policies_test.rb | 515 +++ owl-bot-staging/google-iam-v3/test/helper.rb | 26 + owl-bot-staging/google-iam-v3beta/.gitignore | 22 + .../google-iam-v3beta/.repo-metadata.json | 17 + .../google-iam-v3beta/.rubocop.yml | 33 + owl-bot-staging/google-iam-v3beta/.toys.rb | 28 + owl-bot-staging/google-iam-v3beta/.yardopts | 12 + .../google-iam-v3beta/AUTHENTICATION.md | 122 + .../google-iam-v3beta/CHANGELOG.md | 2 + owl-bot-staging/google-iam-v3beta/Gemfile | 14 + owl-bot-staging/google-iam-v3beta/LICENSE.md | 201 + owl-bot-staging/google-iam-v3beta/README.md | 154 + owl-bot-staging/google-iam-v3beta/Rakefile | 169 + .../google-iam-v3beta/gapic_metadata.json | 87 + .../google-iam-v3beta.gemspec | 29 + .../lib/google-iam-v3beta.rb | 21 + .../lib/google/iam/v3beta.rb | 44 + .../iam/v3beta/operation_metadata_pb.rb | 22 + .../iam/v3beta/policy_binding_resources_pb.rb | 27 + .../lib/google/iam/v3beta/policy_bindings.rb | 55 + .../iam/v3beta/policy_bindings/client.rb | 1147 ++++++ .../iam/v3beta/policy_bindings/credentials.rb | 45 + .../iam/v3beta/policy_bindings/operations.rb | 839 +++++ .../iam/v3beta/policy_bindings/paths.rb | 140 + .../google/iam/v3beta/policy_bindings/rest.rb | 52 + .../iam/v3beta/policy_bindings/rest/client.rb | 1062 ++++++ .../v3beta/policy_bindings/rest/operations.rb | 937 +++++ .../policy_bindings/rest/service_stub.rb | 535 +++ .../iam/v3beta/policy_bindings_service_pb.rb | 36 + .../policy_bindings_service_services_pb.rb | 63 + .../principal_access_boundary_policies.rb | 55 + .../client.rb | 1100 ++++++ .../credentials.rb | 45 + .../operations.rb | 839 +++++ .../paths.rb | 67 + .../rest.rb | 52 + .../rest/client.rb | 1015 +++++ .../rest/operations.rb | 937 +++++ .../rest/service_stub.rb | 447 +++ ...pal_access_boundary_policies_service_pb.rb | 37 + ...s_boundary_policies_service_services_pb.rb | 56 + ...pal_access_boundary_policy_resources_pb.rb | 27 + .../lib/google/iam/v3beta/rest.rb | 36 + .../lib/google/iam/v3beta/version.rb | 26 + .../google-iam-v3beta/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 ++ .../google/iam/v3beta/operation_metadata.rb | 55 + .../iam/v3beta/policy_binding_resources.rb | 171 + .../iam/v3beta/policy_bindings_service.rb | 232 ++ ...ncipal_access_boundary_policies_service.rb | 191 + ...ncipal_access_boundary_policy_resources.rb | 127 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../google-iam-v3beta/snippets/Gemfile | 32 + .../policy_bindings/create_policy_binding.rb | 54 + .../policy_bindings/delete_policy_binding.rb | 54 + .../policy_bindings/get_policy_binding.rb | 47 + .../policy_bindings/list_policy_bindings.rb | 51 + .../search_target_policy_bindings.rb | 51 + .../policy_bindings/update_policy_binding.rb | 54 + ...create_principal_access_boundary_policy.rb | 54 + ...delete_principal_access_boundary_policy.rb | 54 + .../get_principal_access_boundary_policy.rb | 47 + ...list_principal_access_boundary_policies.rb | 51 + ...incipal_access_boundary_policy_bindings.rb | 51 + ...update_principal_access_boundary_policy.rb | 54 + .../snippet_metadata_google.iam.v3beta.json | 495 +++ .../v3beta/policy_bindings_operations_test.rb | 400 ++ .../iam/v3beta/policy_bindings_paths_test.rb | 97 + .../iam/v3beta/policy_bindings_rest_test.rb | 436 +++ .../google/iam/v3beta/policy_bindings_test.rb | 517 +++ ...ccess_boundary_policies_operations_test.rb | 400 ++ ...pal_access_boundary_policies_paths_test.rb | 67 + ...ipal_access_boundary_policies_rest_test.rb | 435 +++ ...principal_access_boundary_policies_test.rb | 515 +++ .../google-iam-v3beta/test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.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 | 148 + ...identity-access_context_manager-v1.gemspec | 29 + ...ogle-identity-access_context_manager-v1.rb | 21 + .../identity/access_context_manager/v1.rb | 45 + .../v1/access_context_manager.rb | 66 + .../v1/access_context_manager/client.rb | 3297 +++++++++++++++++ .../v1/access_context_manager/credentials.rb | 47 + .../v1/access_context_manager/operations.rb | 841 +++++ .../v1/access_context_manager/paths.rb | 112 + .../v1/access_context_manager/rest.rb | 63 + .../v1/access_context_manager/rest/client.rb | 3088 +++++++++++++++ .../access_context_manager/rest/operations.rb | 925 +++++ .../rest/service_stub.rb | 1693 +++++++++ .../access_context_manager/v1/rest.rb | 37 + .../access_context_manager/v1/version.rb | 28 + .../type/device_resources_pb.rb | 23 + .../v1/access_context_manager_pb.rb | 65 + .../v1/access_context_manager_services_pb.rb | 240 ++ .../v1/access_level_pb.rb | 32 + .../v1/access_policy_pb.rb | 24 + .../v1/gcp_user_access_binding_pb.rb | 24 + .../v1/service_perimeter_pb.rb | 37 + .../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 ++ .../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 +++ .../type/device_resources.rb | 84 + .../v1/access_context_manager.rb | 539 +++ .../accesscontextmanager/v1/access_level.rb | 201 + .../accesscontextmanager/v1/access_policy.rb | 76 + .../v1/gcp_user_access_binding.rb | 55 + .../v1/service_perimeter.rb | 500 +++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../commit_service_perimeters.rb | 54 + .../create_access_level.rb | 54 + .../create_access_policy.rb | 54 + .../create_gcp_user_access_binding.rb | 54 + .../create_service_perimeter.rb | 54 + .../delete_access_level.rb | 54 + .../delete_access_policy.rb | 54 + .../delete_gcp_user_access_binding.rb | 54 + .../delete_service_perimeter.rb | 54 + .../get_access_level.rb | 47 + .../get_access_policy.rb | 47 + .../get_gcp_user_access_binding.rb | 47 + .../access_context_manager/get_iam_policy.rb | 47 + .../get_service_perimeter.rb | 47 + .../list_access_levels.rb | 51 + .../list_access_policies.rb | 51 + .../list_gcp_user_access_bindings.rb | 51 + .../list_service_perimeters.rb | 51 + .../replace_access_levels.rb | 54 + .../replace_service_perimeters.rb | 54 + .../access_context_manager/set_iam_policy.rb | 47 + .../test_iam_permissions.rb | 47 + .../update_access_level.rb | 54 + .../update_access_policy.rb | 54 + .../update_gcp_user_access_binding.rb | 54 + .../update_service_perimeter.rb | 54 + ...ogle.identity.accesscontextmanager.v1.json | 1055 ++++++ .../access_context_manager_operations_test.rb | 400 ++ .../v1/access_context_manager_paths_test.rb | 103 + .../v1/access_context_manager_rest_test.rb | 1535 ++++++++ .../v1/access_context_manager_test.rb | 1785 +++++++++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.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 | 78 + ...ogle-maps-fleet_engine-delivery-v1.gemspec | 29 + .../google-maps-fleet_engine-delivery-v1.rb | 21 + .../google/maps/fleet_engine/delivery/v1.rb | 47 + .../delivery/v1/delivery_service.rb | 57 + .../delivery/v1/delivery_service/client.rb | 1755 +++++++++ .../v1/delivery_service/credentials.rb | 49 + .../delivery/v1/delivery_service/paths.rb | 100 + .../delivery/v1/delivery_service/rest.rb | 54 + .../v1/delivery_service/rest/client.rb | 1616 ++++++++ .../v1/delivery_service/rest/service_stub.rb | 820 ++++ .../maps/fleet_engine/delivery/v1/rest.rb | 39 + .../maps/fleet_engine/delivery/v1/version.rb | 30 + .../maps/fleetengine/delivery/v1/common_pb.rb | 33 + .../delivery/v1/delivery_api_pb.rb | 50 + .../delivery/v1/delivery_api_services_pb.rb | 81 + .../delivery/v1/delivery_vehicles_pb.rb | 36 + .../maps/fleetengine/delivery/v1/header_pb.rb | 27 + .../delivery/v1/task_tracking_info_pb.rb | 32 + .../maps/fleetengine/delivery/v1/tasks_pb.rb | 37 + .../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 ++ .../proto_docs/google/api/routing.rb | 463 +++ .../proto_docs/google/geo/type/viewport.rb | 70 + .../maps/fleetengine/delivery/v1/common.rb | 276 ++ .../fleetengine/delivery/v1/delivery_api.rb | 395 ++ .../delivery/v1/delivery_vehicles.rb | 276 ++ .../maps/fleetengine/delivery/v1/header.rb | 113 + .../delivery/v1/task_tracking_info.rb | 91 + .../maps/fleetengine/delivery/v1/tasks.rb | 291 ++ .../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/type/latlng.rb | 38 + .../snippets/Gemfile | 32 + .../delivery_service/batch_create_tasks.rb | 47 + .../create_delivery_vehicle.rb | 47 + .../snippets/delivery_service/create_task.rb | 47 + .../delete_delivery_vehicle.rb | 47 + .../snippets/delivery_service/delete_task.rb | 47 + .../delivery_service/get_delivery_vehicle.rb | 47 + .../snippets/delivery_service/get_task.rb | 47 + .../get_task_tracking_info.rb | 47 + .../list_delivery_vehicles.rb | 51 + .../snippets/delivery_service/list_tasks.rb | 51 + .../update_delivery_vehicle.rb | 47 + .../snippets/delivery_service/update_task.rb | 47 + ...metadata_maps.fleetengine.delivery.v1.json | 495 +++ .../v1/delivery_service_paths_test.rb | 91 + .../delivery/v1/delivery_service_rest_test.rb | 773 ++++ .../delivery/v1/delivery_service_test.rb | 862 +++++ .../test/helper.rb | 26 + .../google-maps-fleet_engine-v1/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-maps-fleet_engine-v1/.rubocop.yml | 33 + .../google-maps-fleet_engine-v1/.toys.rb | 28 + .../google-maps-fleet_engine-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-maps-fleet_engine-v1/CHANGELOG.md | 2 + .../google-maps-fleet_engine-v1/Gemfile | 14 + .../google-maps-fleet_engine-v1/LICENSE.md | 201 + .../google-maps-fleet_engine-v1/README.md | 154 + .../google-maps-fleet_engine-v1/Rakefile | 169 + .../gapic_metadata.json | 92 + .../google-maps-fleet_engine-v1.gemspec | 29 + .../lib/google-maps-fleet_engine-v1.rb | 21 + .../lib/google/maps/fleet_engine/v1.rb | 46 + .../lib/google/maps/fleet_engine/v1/rest.rb | 38 + .../maps/fleet_engine/v1/trip_service.rb | 55 + .../fleet_engine/v1/trip_service/client.rb | 1151 ++++++ .../v1/trip_service/credentials.rb | 47 + .../fleet_engine/v1/trip_service/paths.rb | 50 + .../maps/fleet_engine/v1/trip_service/rest.rb | 52 + .../v1/trip_service/rest/client.rb | 1060 ++++++ .../v1/trip_service/rest/service_stub.rb | 451 +++ .../maps/fleet_engine/v1/vehicle_service.rb | 55 + .../fleet_engine/v1/vehicle_service/client.rb | 1461 ++++++++ .../v1/vehicle_service/credentials.rb | 47 + .../fleet_engine/v1/vehicle_service/paths.rb | 50 + .../fleet_engine/v1/vehicle_service/rest.rb | 52 + .../v1/vehicle_service/rest/client.rb | 1362 +++++++ .../v1/vehicle_service/rest/service_stub.rb | 512 +++ .../google/maps/fleet_engine/v1/version.rb | 28 + .../maps/fleetengine/v1/fleetengine_pb.rb | 39 + .../google/maps/fleetengine/v1/header_pb.rb | 25 + .../google/maps/fleetengine/v1/traffic_pb.rb | 23 + .../google/maps/fleetengine/v1/trip_api_pb.rb | 41 + .../fleetengine/v1/trip_api_services_pb.rb | 58 + .../google/maps/fleetengine/v1/trips_pb.rb | 34 + .../maps/fleetengine/v1/vehicle_api_pb.rb | 52 + .../fleetengine/v1/vehicle_api_services_pb.rb | 108 + .../google/maps/fleetengine/v1/vehicles_pb.rb | 40 + .../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 ++ .../proto_docs/google/api/routing.rb | 463 +++ .../proto_docs/google/geo/type/viewport.rb | 70 + .../google/maps/fleetengine/v1/fleetengine.rb | 394 ++ .../google/maps/fleetengine/v1/header.rb | 111 + .../google/maps/fleetengine/v1/traffic.rb | 76 + .../google/maps/fleetengine/v1/trip_api.rb | 312 ++ .../google/maps/fleetengine/v1/trips.rb | 289 ++ .../google/maps/fleetengine/v1/vehicle_api.rb | 674 ++++ .../google/maps/fleetengine/v1/vehicles.rb | 365 ++ .../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/type/latlng.rb | 38 + .../snippets/Gemfile | 32 + .../snippet_metadata_maps.fleetengine.v1.json | 535 +++ .../snippets/trip_service/create_trip.rb | 47 + .../snippets/trip_service/delete_trip.rb | 47 + .../snippets/trip_service/get_trip.rb | 47 + .../trip_service/report_billable_trip.rb | 47 + .../snippets/trip_service/search_trips.rb | 51 + .../snippets/trip_service/update_trip.rb | 47 + .../vehicle_service/create_vehicle.rb | 47 + .../vehicle_service/delete_vehicle.rb | 47 + .../snippets/vehicle_service/get_vehicle.rb | 47 + .../snippets/vehicle_service/list_vehicles.rb | 51 + .../vehicle_service/search_vehicles.rb | 47 + .../vehicle_service/update_vehicle.rb | 47 + .../update_vehicle_attributes.rb | 47 + .../v1/trip_service_paths_test.rb | 55 + .../fleet_engine/v1/trip_service_rest_test.rb | 447 +++ .../maps/fleet_engine/v1/trip_service_test.rb | 505 +++ .../v1/vehicle_service_paths_test.rb | 55 + .../v1/vehicle_service_rest_test.rb | 520 +++ .../fleet_engine/v1/vehicle_service_test.rb | 601 +++ .../test/helper.rb | 26 + .../google-shopping-css-v1/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-shopping-css-v1/.rubocop.yml | 33 + .../google-shopping-css-v1/.toys.rb | 28 + .../google-shopping-css-v1/.yardopts | 12 + .../google-shopping-css-v1/AUTHENTICATION.md | 122 + .../google-shopping-css-v1/CHANGELOG.md | 2 + .../google-shopping-css-v1/Gemfile | 14 + .../google-shopping-css-v1/LICENSE.md | 201 + .../google-shopping-css-v1/README.md | 154 + .../google-shopping-css-v1/Rakefile | 169 + .../gapic_metadata.json | 119 + .../google-shopping-css-v1.gemspec | 29 + .../lib/google-shopping-css-v1.rb | 21 + .../lib/google/shopping/css/v1.rb | 49 + .../shopping/css/v1/account_labels_service.rb | 55 + .../css/v1/account_labels_service/client.rb | 783 ++++ .../v1/account_labels_service/credentials.rb | 47 + .../css/v1/account_labels_service/paths.rb | 64 + .../css/v1/account_labels_service/rest.rb | 52 + .../v1/account_labels_service/rest/client.rb | 712 ++++ .../rest/service_stub.rb | 327 ++ .../shopping/css/v1/accounts_labels_pb.rb | 33 + .../css/v1/accounts_labels_services_pb.rb | 51 + .../lib/google/shopping/css/v1/accounts_pb.rb | 31 + .../shopping/css/v1/accounts_service.rb | 55 + .../css/v1/accounts_service/client.rb | 707 ++++ .../css/v1/accounts_service/credentials.rb | 47 + .../shopping/css/v1/accounts_service/paths.rb | 47 + .../shopping/css/v1/accounts_service/rest.rb | 52 + .../css/v1/accounts_service/rest/client.rb | 643 ++++ .../v1/accounts_service/rest/service_stub.rb | 265 ++ .../shopping/css/v1/accounts_services_pb.rb | 50 + .../shopping/css/v1/css_product_common_pb.rb | 35 + .../shopping/css/v1/css_product_inputs_pb.rb | 34 + .../css/v1/css_product_inputs_service.rb | 56 + .../v1/css_product_inputs_service/client.rb | 714 ++++ .../css_product_inputs_service/credentials.rb | 47 + .../v1/css_product_inputs_service/paths.rb | 64 + .../css/v1/css_product_inputs_service/rest.rb | 53 + .../css_product_inputs_service/rest/client.rb | 650 ++++ .../rest/service_stub.rb | 266 ++ .../css/v1/css_product_inputs_services_pb.rb | 61 + .../google/shopping/css/v1/css_products_pb.rb | 31 + .../shopping/css/v1/css_products_service.rb | 56 + .../css/v1/css_products_service/client.rb | 604 +++ .../v1/css_products_service/credentials.rb | 47 + .../css/v1/css_products_service/paths.rb | 64 + .../css/v1/css_products_service/rest.rb | 53 + .../v1/css_products_service/rest/client.rb | 547 +++ .../css_products_service/rest/service_stub.rb | 203 + .../css/v1/css_products_services_pb.rb | 56 + .../lib/google/shopping/css/v1/quota_pb.rb | 29 + .../google/shopping/css/v1/quota_service.rb | 55 + .../shopping/css/v1/quota_service/client.rb | 493 +++ .../css/v1/quota_service/credentials.rb | 47 + .../shopping/css/v1/quota_service/paths.rb | 47 + .../shopping/css/v1/quota_service/rest.rb | 52 + .../css/v1/quota_service/rest/client.rb | 443 +++ .../css/v1/quota_service/rest/service_stub.rb | 142 + .../shopping/css/v1/quota_services_pb.rb | 45 + .../lib/google/shopping/css/v1/rest.rb | 41 + .../lib/google/shopping/css/v1/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 ++ .../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 + .../google/shopping/css/v1/accounts.rb | 171 + .../google/shopping/css/v1/accounts_labels.rb | 131 + .../shopping/css/v1/css_product_common.rb | 436 +++ .../shopping/css/v1/css_product_inputs.rb | 169 + .../google/shopping/css/v1/css_products.rb | 110 + .../google/shopping/css/v1/quota.rb | 110 + .../proto_docs/google/shopping/type/types.rb | 248 ++ .../google-shopping-css-v1/snippets/Gemfile | 32 + .../create_account_label.rb | 47 + .../delete_account_label.rb | 47 + .../list_account_labels.rb | 51 + .../update_account_label.rb | 47 + .../snippets/accounts_service/get_account.rb | 47 + .../accounts_service/list_child_accounts.rb | 51 + .../accounts_service/update_labels.rb | 47 + .../delete_css_product_input.rb | 47 + .../insert_css_product_input.rb | 47 + .../update_css_product_input.rb | 47 + .../css_products_service/get_css_product.rb | 47 + .../css_products_service/list_css_products.rb | 51 + .../quota_service/list_quota_groups.rb | 51 + ...ippet_metadata_google.shopping.css.v1.json | 535 +++ .../v1/account_labels_service_paths_test.rb | 67 + .../v1/account_labels_service_rest_test.rb | 318 ++ .../css/v1/account_labels_service_test.rb | 347 ++ .../css/v1/accounts_service_paths_test.rb | 55 + .../css/v1/accounts_service_rest_test.rb | 268 ++ .../shopping/css/v1/accounts_service_test.rb | 301 ++ .../css_product_inputs_service_paths_test.rb | 67 + .../css_product_inputs_service_rest_test.rb | 265 ++ .../css/v1/css_product_inputs_service_test.rb | 287 ++ .../css/v1/css_products_service_paths_test.rb | 67 + .../css/v1/css_products_service_rest_test.rb | 209 ++ .../css/v1/css_products_service_test.rb | 229 ++ .../css/v1/quota_service_paths_test.rb | 55 + .../css/v1/quota_service_rest_test.rb | 155 + .../shopping/css/v1/quota_service_test.rb | 171 + .../google-shopping-css-v1/test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.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 | 587 +++ ...ogle-shopping-merchant-accounts-v1.gemspec | 29 + .../google-shopping-merchant-accounts-v1.rb | 21 + .../google/shopping/merchant/accounts/v1.rb | 68 + .../merchant/accounts/v1/accessright_pb.rb | 23 + .../accounts/v1/account_issue_service.rb | 57 + .../v1/account_issue_service/client.rb | 514 +++ .../v1/account_issue_service/credentials.rb | 49 + .../v1/account_issue_service/paths.rb | 49 + .../accounts/v1/account_issue_service/rest.rb | 54 + .../v1/account_issue_service/rest/client.rb | 464 +++ .../rest/service_stub.rb | 144 + .../v1/account_relationships_service.rb | 57 + .../account_relationships_service/client.rb | 688 ++++ .../credentials.rb | 49 + .../v1/account_relationships_service/paths.rb | 66 + .../v1/account_relationships_service/rest.rb | 54 + .../rest/client.rb | 624 ++++ .../rest/service_stub.rb | 267 ++ .../accounts/v1/account_services_service.rb | 57 + .../v1/account_services_service/client.rb | 873 +++++ .../account_services_service/credentials.rb | 49 + .../v1/account_services_service/paths.rb | 66 + .../v1/account_services_service/rest.rb | 54 + .../account_services_service/rest/client.rb | 795 ++++ .../rest/service_stub.rb | 391 ++ .../merchant/accounts/v1/accountissue_pb.rb | 34 + .../accounts/v1/accountissue_services_pb.rb | 54 + .../accounts/v1/accountrelationships_pb.rb | 33 + .../v1/accountrelationships_services_pb.rb | 52 + .../merchant/accounts/v1/accounts_pb.rb | 46 + .../merchant/accounts/v1/accounts_service.rb | 57 + .../accounts/v1/accounts_service/client.rb | 1119 ++++++ .../v1/accounts_service/credentials.rb | 49 + .../accounts/v1/accounts_service/paths.rb | 66 + .../accounts/v1/accounts_service/rest.rb | 54 + .../v1/accounts_service/rest/client.rb | 1043 ++++++ .../v1/accounts_service/rest/service_stub.rb | 509 +++ .../accounts/v1/accounts_services_pb.rb | 92 + .../accounts/v1/accountservices_pb.rb | 45 + .../v1/accountservices_services_pb.rb | 56 + .../accounts/v1/autofeed_settings_service.rb | 58 + .../v1/autofeed_settings_service/client.rb | 577 +++ .../autofeed_settings_service/credentials.rb | 49 + .../v1/autofeed_settings_service/paths.rb | 49 + .../v1/autofeed_settings_service/rest.rb | 55 + .../autofeed_settings_service/rest/client.rb | 520 +++ .../rest/service_stub.rb | 206 + .../accounts/v1/autofeedsettings_pb.rb | 31 + .../v1/autofeedsettings_services_pb.rb | 50 + .../v1/automatic_improvements_service.rb | 59 + .../automatic_improvements_service/client.rb | 587 +++ .../credentials.rb | 49 + .../automatic_improvements_service/paths.rb | 49 + .../v1/automatic_improvements_service/rest.rb | 56 + .../rest/client.rb | 530 +++ .../rest/service_stub.rb | 206 + .../accounts/v1/automaticimprovements_pb.rb | 36 + .../v1/automaticimprovements_services_pb.rb | 51 + .../accounts/v1/business_identity_service.rb | 58 + .../v1/business_identity_service/client.rb | 589 +++ .../business_identity_service/credentials.rb | 49 + .../v1/business_identity_service/paths.rb | 49 + .../v1/business_identity_service/rest.rb | 55 + .../business_identity_service/rest/client.rb | 532 +++ .../rest/service_stub.rb | 206 + .../accounts/v1/business_info_service.rb | 57 + .../v1/business_info_service/client.rb | 585 +++ .../v1/business_info_service/credentials.rb | 49 + .../v1/business_info_service/paths.rb | 49 + .../accounts/v1/business_info_service/rest.rb | 54 + .../v1/business_info_service/rest/client.rb | 528 +++ .../rest/service_stub.rb | 206 + .../accounts/v1/businessidentity_pb.rb | 34 + .../v1/businessidentity_services_pb.rb | 51 + .../merchant/accounts/v1/businessinfo_pb.rb | 35 + .../accounts/v1/businessinfo_services_pb.rb | 50 + .../accounts/v1/checkout_settings_service.rb | 58 + .../v1/checkout_settings_service/client.rb | 774 ++++ .../checkout_settings_service/credentials.rb | 49 + .../v1/checkout_settings_service/paths.rb | 69 + .../v1/checkout_settings_service/rest.rb | 55 + .../checkout_settings_service/rest/client.rb | 703 ++++ .../rest/service_stub.rb | 329 ++ .../accounts/v1/checkoutsettings_pb.rb | 38 + .../v1/checkoutsettings_services_pb.rb | 56 + .../accounts/v1/customerservice_pb.rb | 26 + .../v1/developer_registration_service.rb | 57 + .../developer_registration_service/client.rb | 761 ++++ .../credentials.rb | 49 + .../developer_registration_service/paths.rb | 49 + .../v1/developer_registration_service/rest.rb | 54 + .../rest/client.rb | 698 ++++ .../rest/service_stub.rb | 327 ++ .../accounts/v1/developerregistration_pb.rb | 33 + .../v1/developerregistration_services_pb.rb | 58 + .../accounts/v1/email_preferences_service.rb | 57 + .../v1/email_preferences_service/client.rb | 596 +++ .../email_preferences_service/credentials.rb | 49 + .../v1/email_preferences_service/paths.rb | 52 + .../v1/email_preferences_service/rest.rb | 54 + .../email_preferences_service/rest/client.rb | 539 +++ .../rest/service_stub.rb | 206 + .../accounts/v1/emailpreferences_pb.rb | 32 + .../v1/emailpreferences_services_pb.rb | 64 + .../accounts/v1/gbp_accounts_service.rb | 60 + .../v1/gbp_accounts_service/client.rb | 602 +++ .../v1/gbp_accounts_service/credentials.rb | 49 + .../accounts/v1/gbp_accounts_service/paths.rb | 49 + .../accounts/v1/gbp_accounts_service/rest.rb | 57 + .../v1/gbp_accounts_service/rest/client.rb | 545 +++ .../gbp_accounts_service/rest/service_stub.rb | 206 + .../merchant/accounts/v1/gbpaccounts_pb.rb | 34 + .../accounts/v1/gbpaccounts_services_pb.rb | 56 + .../merchant/accounts/v1/homepage_pb.rb | 33 + .../merchant/accounts/v1/homepage_service.rb | 57 + .../accounts/v1/homepage_service/client.rb | 791 ++++ .../v1/homepage_service/credentials.rb | 49 + .../accounts/v1/homepage_service/paths.rb | 49 + .../accounts/v1/homepage_service/rest.rb | 54 + .../v1/homepage_service/rest/client.rb | 720 ++++ .../v1/homepage_service/rest/service_stub.rb | 330 ++ .../accounts/v1/homepage_services_pb.rb | 73 + .../accounts/v1/lfp_providers_service.rb | 59 + .../v1/lfp_providers_service/client.rb | 601 +++ .../v1/lfp_providers_service/credentials.rb | 49 + .../v1/lfp_providers_service/paths.rb | 71 + .../accounts/v1/lfp_providers_service/rest.rb | 56 + .../v1/lfp_providers_service/rest/client.rb | 544 +++ .../rest/service_stub.rb | 206 + .../merchant/accounts/v1/lfpproviders_pb.rb | 33 + .../accounts/v1/lfpproviders_services_pb.rb | 51 + .../v1/omnichannel_settings_service.rb | 60 + .../v1/omnichannel_settings_service/client.rb | 892 +++++ .../credentials.rb | 49 + .../v1/omnichannel_settings_service/paths.rb | 66 + .../v1/omnichannel_settings_service/rest.rb | 57 + .../rest/client.rb | 814 ++++ .../rest/service_stub.rb | 391 ++ .../accounts/v1/omnichannelsettings_pb.rb | 46 + .../v1/omnichannelsettings_services_pb.rb | 58 + .../accounts/v1/online_return_policy_pb.rb | 45 + .../v1/online_return_policy_service.rb | 61 + .../v1/online_return_policy_service/client.rb | 788 ++++ .../credentials.rb | 49 + .../v1/online_return_policy_service/paths.rb | 66 + .../v1/online_return_policy_service/rest.rb | 58 + .../rest/client.rb | 717 ++++ .../rest/service_stub.rb | 328 ++ .../v1/online_return_policy_services_pb.rb | 57 + .../accounts/v1/phoneverificationstate_pb.rb | 23 + .../merchant/accounts/v1/programs_pb.rb | 35 + .../merchant/accounts/v1/programs_service.rb | 67 + .../accounts/v1/programs_service/client.rb | 787 ++++ .../v1/programs_service/credentials.rb | 49 + .../accounts/v1/programs_service/paths.rb | 66 + .../accounts/v1/programs_service/rest.rb | 64 + .../v1/programs_service/rest/client.rb | 716 ++++ .../v1/programs_service/rest/service_stub.rb | 329 ++ .../accounts/v1/programs_services_pb.rb | 63 + .../merchant/accounts/v1/regions_pb.rb | 48 + .../merchant/accounts/v1/regions_service.rb | 61 + .../accounts/v1/regions_service/client.rb | 1177 ++++++ .../v1/regions_service/credentials.rb | 49 + .../accounts/v1/regions_service/paths.rb | 66 + .../accounts/v1/regions_service/rest.rb | 58 + .../v1/regions_service/rest/client.rb | 1078 ++++++ .../v1/regions_service/rest/service_stub.rb | 576 +++ .../accounts/v1/regions_services_pb.rb | 71 + .../shopping/merchant/accounts/v1/rest.rb | 60 + .../accounts/v1/shipping_settings_service.rb | 58 + .../v1/shipping_settings_service/client.rb | 581 +++ .../shipping_settings_service/credentials.rb | 49 + .../v1/shipping_settings_service/paths.rb | 63 + .../v1/shipping_settings_service/rest.rb | 55 + .../shipping_settings_service/rest/client.rb | 524 +++ .../rest/service_stub.rb | 206 + .../accounts/v1/shippingsettings_pb.rb | 61 + .../v1/shippingsettings_services_pb.rb | 51 + ...erms_of_service_agreement_state_service.rb | 57 + .../client.rb | 580 +++ .../credentials.rb | 49 + .../paths.rb | 66 + .../rest.rb | 54 + .../rest/client.rb | 523 +++ .../rest/service_stub.rb | 205 + .../accounts/v1/terms_of_service_service.rb | 57 + .../v1/terms_of_service_service/client.rb | 671 ++++ .../terms_of_service_service/credentials.rb | 49 + .../v1/terms_of_service_service/paths.rb | 63 + .../v1/terms_of_service_service/rest.rb | 54 + .../terms_of_service_service/rest/client.rb | 615 +++ .../rest/service_stub.rb | 264 ++ .../merchant/accounts/v1/termsofservice_pb.rb | 34 + .../accounts/v1/termsofservice_services_pb.rb | 52 + .../v1/termsofserviceagreementstate_pb.rb | 34 + ...ermsofserviceagreementstate_services_pb.rb | 53 + .../accounts/v1/termsofservicekind_pb.rb | 23 + .../shopping/merchant/accounts/v1/user_pb.rb | 39 + .../merchant/accounts/v1/user_service.rb | 57 + .../accounts/v1/user_service/client.rb | 989 +++++ .../accounts/v1/user_service/credentials.rb | 49 + .../accounts/v1/user_service/paths.rb | 66 + .../merchant/accounts/v1/user_service/rest.rb | 54 + .../accounts/v1/user_service/rest/client.rb | 904 +++++ .../v1/user_service/rest/service_stub.rb | 452 +++ .../merchant/accounts/v1/user_services_pb.rb | 62 + .../v1/verificationmailsettings_pb.rb | 26 + .../shopping/merchant/accounts/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 ++ .../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/wrappers.rb | 148 + .../merchant/accounts/v1/accessright.rb | 53 + .../merchant/accounts/v1/accountissue.rb | 144 + .../accounts/v1/accountrelationships.rb | 124 + .../shopping/merchant/accounts/v1/accounts.rb | 337 ++ .../merchant/accounts/v1/accountservices.rb | 301 ++ .../merchant/accounts/v1/autofeedsettings.rb | 75 + .../accounts/v1/automaticimprovements.rb | 235 ++ .../merchant/accounts/v1/businessidentity.rb | 140 + .../merchant/accounts/v1/businessinfo.rb | 91 + .../merchant/accounts/v1/checkoutsettings.rb | 188 + .../merchant/accounts/v1/customerservice.rb | 43 + .../accounts/v1/developerregistration.rb | 94 + .../merchant/accounts/v1/emailpreferences.rb | 87 + .../merchant/accounts/v1/gbpaccounts.rb | 123 + .../shopping/merchant/accounts/v1/homepage.rb | 106 + .../merchant/accounts/v1/lfpproviders.rb | 108 + .../accounts/v1/omnichannelsettings.rb | 336 ++ .../accounts/v1/online_return_policy.rb | 317 ++ .../accounts/v1/phoneverificationstate.rb | 40 + .../shopping/merchant/accounts/v1/programs.rb | 172 + .../shopping/merchant/accounts/v1/regions.rb | 296 ++ .../merchant/accounts/v1/shippingsettings.rb | 757 ++++ .../merchant/accounts/v1/termsofservice.rb | 118 + .../v1/termsofserviceagreementstate.rb | 136 + .../accounts/v1/termsofservicekind.rb | 37 + .../shopping/merchant/accounts/v1/user.rb | 176 + .../accounts/v1/verificationmailsettings.rb | 53 + .../proto_docs/google/shopping/type/types.rb | 248 ++ .../proto_docs/google/type/date.rb | 53 + .../proto_docs/google/type/datetime.rb | 103 + .../proto_docs/google/type/latlng.rb | 38 + .../proto_docs/google/type/phone_number.rb | 116 + .../proto_docs/google/type/postal_address.rb | 135 + .../snippets/Gemfile | 32 + .../list_account_issues.rb | 51 + .../get_account_relationship.rb | 47 + .../list_account_relationships.rb | 51 + .../update_account_relationship.rb | 47 + .../approve_account_service.rb | 47 + .../get_account_service.rb | 47 + .../list_account_services.rb | 51 + .../propose_account_service.rb | 47 + .../reject_account_service.rb | 47 + .../create_and_configure_account.rb | 47 + .../accounts_service/create_test_account.rb | 47 + .../accounts_service/delete_account.rb | 47 + .../snippets/accounts_service/get_account.rb | 47 + .../accounts_service/list_accounts.rb | 51 + .../accounts_service/list_sub_accounts.rb | 51 + .../accounts_service/update_account.rb | 47 + .../get_autofeed_settings.rb | 47 + .../update_autofeed_settings.rb | 47 + .../get_automatic_improvements.rb | 47 + .../update_automatic_improvements.rb | 47 + .../get_business_identity.rb | 47 + .../update_business_identity.rb | 47 + .../get_business_info.rb | 47 + .../update_business_info.rb | 47 + .../create_checkout_settings.rb | 47 + .../delete_checkout_settings.rb | 47 + .../get_checkout_settings.rb | 47 + .../update_checkout_settings.rb | 47 + .../get_account_for_gcp_registration.rb | 47 + .../get_developer_registration.rb | 47 + .../register_gcp.rb | 47 + .../unregister_gcp.rb | 47 + .../get_email_preferences.rb | 47 + .../update_email_preferences.rb | 47 + .../gbp_accounts_service/link_gbp_account.rb | 47 + .../gbp_accounts_service/list_gbp_accounts.rb | 51 + .../homepage_service/claim_homepage.rb | 47 + .../snippets/homepage_service/get_homepage.rb | 47 + .../homepage_service/unclaim_homepage.rb | 47 + .../homepage_service/update_homepage.rb | 47 + .../find_lfp_providers.rb | 51 + .../link_lfp_provider.rb | 47 + .../create_omnichannel_setting.rb | 47 + .../get_omnichannel_setting.rb | 47 + .../list_omnichannel_settings.rb | 51 + .../request_inventory_verification.rb | 47 + .../update_omnichannel_setting.rb | 47 + .../create_online_return_policy.rb | 47 + .../delete_online_return_policy.rb | 47 + .../get_online_return_policy.rb | 47 + .../list_online_return_policies.rb | 51 + .../programs_service/disable_program.rb | 47 + .../programs_service/enable_program.rb | 47 + .../snippets/programs_service/get_program.rb | 47 + .../programs_service/list_programs.rb | 51 + .../regions_service/batch_create_regions.rb | 47 + .../regions_service/batch_delete_regions.rb | 47 + .../regions_service/batch_update_regions.rb | 47 + .../snippets/regions_service/create_region.rb | 47 + .../snippets/regions_service/delete_region.rb | 47 + .../snippets/regions_service/get_region.rb | 47 + .../snippets/regions_service/list_regions.rb | 51 + .../snippets/regions_service/update_region.rb | 47 + .../get_shipping_settings.rb | 47 + .../insert_shipping_settings.rb | 47 + ..._google.shopping.merchant.accounts.v1.json | 3055 +++++++++++++++ .../get_terms_of_service_agreement_state.rb | 47 + ...cation_terms_of_service_agreement_state.rb | 47 + .../accept_terms_of_service.rb | 47 + .../get_terms_of_service.rb | 47 + .../retrieve_latest_terms_of_service.rb | 47 + .../snippets/user_service/create_user.rb | 47 + .../snippets/user_service/delete_user.rb | 47 + .../snippets/user_service/get_user.rb | 47 + .../snippets/user_service/list_users.rb | 51 + .../snippets/user_service/update_user.rb | 47 + .../snippets/user_service/verify_self.rb | 47 + .../v1/account_issue_service_paths_test.rb | 55 + .../v1/account_issue_service_rest_test.rb | 157 + .../accounts/v1/account_issue_service_test.rb | 175 + ...ccount_relationships_service_paths_test.rb | 67 + ...account_relationships_service_rest_test.rb | 264 ++ .../v1/account_relationships_service_test.rb | 289 ++ .../v1/account_services_service_paths_test.rb | 67 + .../v1/account_services_service_rest_test.rb | 373 ++ .../v1/account_services_service_test.rb | 407 ++ .../v1/accounts_service_paths_test.rb | 67 + .../accounts/v1/accounts_service_rest_test.rb | 487 +++ .../accounts/v1/accounts_service_test.rb | 540 +++ .../autofeed_settings_service_paths_test.rb | 55 + .../v1/autofeed_settings_service_rest_test.rb | 208 ++ .../v1/autofeed_settings_service_test.rb | 222 ++ ...tomatic_improvements_service_paths_test.rb | 55 + ...utomatic_improvements_service_rest_test.rb | 208 ++ .../v1/automatic_improvements_service_test.rb | 222 ++ .../business_identity_service_paths_test.rb | 55 + .../v1/business_identity_service_rest_test.rb | 208 ++ .../v1/business_identity_service_test.rb | 222 ++ .../v1/business_info_service_paths_test.rb | 55 + .../v1/business_info_service_rest_test.rb | 208 ++ .../accounts/v1/business_info_service_test.rb | 222 ++ .../checkout_settings_service_paths_test.rb | 67 + .../v1/checkout_settings_service_rest_test.rb | 317 ++ .../v1/checkout_settings_service_test.rb | 340 ++ ...veloper_registration_service_paths_test.rb | 55 + ...eveloper_registration_service_rest_test.rb | 310 ++ .../v1/developer_registration_service_test.rb | 330 ++ .../email_preferences_service_paths_test.rb | 55 + .../v1/email_preferences_service_rest_test.rb | 208 ++ .../v1/email_preferences_service_test.rb | 222 ++ .../v1/gbp_accounts_service_paths_test.rb | 55 + .../v1/gbp_accounts_service_rest_test.rb | 210 ++ .../accounts/v1/gbp_accounts_service_test.rb | 231 ++ .../v1/homepage_service_paths_test.rb | 55 + .../accounts/v1/homepage_service_rest_test.rb | 317 ++ .../accounts/v1/homepage_service_test.rb | 340 ++ .../v1/lfp_providers_service_paths_test.rb | 67 + .../v1/lfp_providers_service_rest_test.rb | 210 ++ .../accounts/v1/lfp_providers_service_test.rb | 231 ++ ...omnichannel_settings_service_paths_test.rb | 67 + .../omnichannel_settings_service_rest_test.rb | 373 ++ .../v1/omnichannel_settings_service_test.rb | 407 ++ ...online_return_policy_service_paths_test.rb | 67 + .../online_return_policy_service_rest_test.rb | 318 ++ .../v1/online_return_policy_service_test.rb | 347 ++ .../v1/programs_service_paths_test.rb | 67 + .../accounts/v1/programs_service_rest_test.rb | 317 ++ .../accounts/v1/programs_service_test.rb | 345 ++ .../accounts/v1/regions_service_paths_test.rb | 67 + .../accounts/v1/regions_service_rest_test.rb | 539 +++ .../accounts/v1/regions_service_test.rb | 589 +++ .../shipping_settings_service_paths_test.rb | 67 + .../v1/shipping_settings_service_rest_test.rb | 208 ++ .../v1/shipping_settings_service_test.rb | 222 ++ ...vice_agreement_state_service_paths_test.rb | 67 + ...rvice_agreement_state_service_rest_test.rb | 207 ++ ...of_service_agreement_state_service_test.rb | 220 ++ .../v1/terms_of_service_service_paths_test.rb | 67 + .../v1/terms_of_service_service_rest_test.rb | 264 ++ .../v1/terms_of_service_service_test.rb | 284 ++ .../accounts/v1/user_service_paths_test.rb | 67 + .../accounts/v1/user_service_rest_test.rb | 428 +++ .../merchant/accounts/v1/user_service_test.rb | 467 +++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.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 | 504 +++ ...-shopping-merchant-accounts-v1beta.gemspec | 29 + ...oogle-shopping-merchant-accounts-v1beta.rb | 21 + .../shopping/merchant/accounts/v1beta.rb | 66 + .../accounts/v1beta/accessright_pb.rb | 23 + .../accounts/v1beta/account_issue_service.rb | 57 + .../v1beta/account_issue_service/client.rb | 507 +++ .../account_issue_service/credentials.rb | 49 + .../v1beta/account_issue_service/paths.rb | 49 + .../v1beta/account_issue_service/rest.rb | 54 + .../account_issue_service/rest/client.rb | 457 +++ .../rest/service_stub.rb | 144 + .../accounts/v1beta/account_tax_pb.rb | 34 + .../accounts/v1beta/account_tax_service.rb | 61 + .../v1beta/account_tax_service/client.rb | 686 ++++ .../v1beta/account_tax_service/credentials.rb | 49 + .../v1beta/account_tax_service/paths.rb | 66 + .../v1beta/account_tax_service/rest.rb | 58 + .../v1beta/account_tax_service/rest/client.rb | 622 ++++ .../account_tax_service/rest/service_stub.rb | 267 ++ .../v1beta/account_tax_services_pb.rb | 58 + .../accounts/v1beta/accountissue_pb.rb | 34 + .../v1beta/accountissue_services_pb.rb | 47 + .../merchant/accounts/v1beta/accounts_pb.rb | 43 + .../accounts/v1beta/accounts_service.rb | 57 + .../v1beta/accounts_service/client.rb | 998 +++++ .../v1beta/accounts_service/credentials.rb | 49 + .../accounts/v1beta/accounts_service/paths.rb | 80 + .../accounts/v1beta/accounts_service/rest.rb | 54 + .../v1beta/accounts_service/rest/client.rb | 929 +++++ .../accounts_service/rest/service_stub.rb | 447 +++ .../accounts/v1beta/accounts_services_pb.rb | 75 + .../accounts/v1beta/accountservices_pb.rb | 28 + .../v1beta/autofeed_settings_service.rb | 58 + .../autofeed_settings_service/client.rb | 577 +++ .../autofeed_settings_service/credentials.rb | 49 + .../v1beta/autofeed_settings_service/paths.rb | 49 + .../v1beta/autofeed_settings_service/rest.rb | 55 + .../autofeed_settings_service/rest/client.rb | 520 +++ .../rest/service_stub.rb | 206 + .../accounts/v1beta/autofeedsettings_pb.rb | 31 + .../v1beta/autofeedsettings_services_pb.rb | 50 + .../v1beta/automatic_improvements_service.rb | 59 + .../automatic_improvements_service/client.rb | 587 +++ .../credentials.rb | 49 + .../automatic_improvements_service/paths.rb | 49 + .../automatic_improvements_service/rest.rb | 56 + .../rest/client.rb | 530 +++ .../rest/service_stub.rb | 206 + .../v1beta/automaticimprovements_pb.rb | 36 + .../automaticimprovements_services_pb.rb | 51 + .../v1beta/business_identity_service.rb | 58 + .../business_identity_service/client.rb | 578 +++ .../business_identity_service/credentials.rb | 49 + .../v1beta/business_identity_service/paths.rb | 49 + .../v1beta/business_identity_service/rest.rb | 55 + .../business_identity_service/rest/client.rb | 521 +++ .../rest/service_stub.rb | 206 + .../accounts/v1beta/business_info_service.rb | 57 + .../v1beta/business_info_service/client.rb | 577 +++ .../business_info_service/credentials.rb | 49 + .../v1beta/business_info_service/paths.rb | 49 + .../v1beta/business_info_service/rest.rb | 54 + .../business_info_service/rest/client.rb | 520 +++ .../rest/service_stub.rb | 206 + .../accounts/v1beta/businessidentity_pb.rb | 34 + .../v1beta/businessidentity_services_pb.rb | 51 + .../accounts/v1beta/businessinfo_pb.rb | 35 + .../v1beta/businessinfo_services_pb.rb | 50 + .../v1beta/checkout_settings_service.rb | 58 + .../checkout_settings_service/client.rb | 774 ++++ .../checkout_settings_service/credentials.rb | 49 + .../v1beta/checkout_settings_service/paths.rb | 69 + .../v1beta/checkout_settings_service/rest.rb | 55 + .../checkout_settings_service/rest/client.rb | 703 ++++ .../rest/service_stub.rb | 329 ++ .../accounts/v1beta/checkoutsettings_pb.rb | 38 + .../v1beta/checkoutsettings_services_pb.rb | 56 + .../accounts/v1beta/customerservice_pb.rb | 26 + .../v1beta/email_preferences_service.rb | 60 + .../email_preferences_service/client.rb | 592 +++ .../email_preferences_service/credentials.rb | 49 + .../v1beta/email_preferences_service/paths.rb | 52 + .../v1beta/email_preferences_service/rest.rb | 57 + .../email_preferences_service/rest/client.rb | 535 +++ .../rest/service_stub.rb | 206 + .../accounts/v1beta/emailpreferences_pb.rb | 32 + .../v1beta/emailpreferences_services_pb.rb | 65 + .../accounts/v1beta/gbp_accounts_service.rb | 60 + .../v1beta/gbp_accounts_service/client.rb | 598 +++ .../gbp_accounts_service/credentials.rb | 49 + .../v1beta/gbp_accounts_service/paths.rb | 49 + .../v1beta/gbp_accounts_service/rest.rb | 57 + .../gbp_accounts_service/rest/client.rb | 541 +++ .../gbp_accounts_service/rest/service_stub.rb | 206 + .../accounts/v1beta/gbpaccounts_pb.rb | 34 + .../v1beta/gbpaccounts_services_pb.rb | 52 + .../merchant/accounts/v1beta/homepage_pb.rb | 33 + .../accounts/v1beta/homepage_service.rb | 57 + .../v1beta/homepage_service/client.rb | 775 ++++ .../v1beta/homepage_service/credentials.rb | 49 + .../accounts/v1beta/homepage_service/paths.rb | 49 + .../accounts/v1beta/homepage_service/rest.rb | 54 + .../v1beta/homepage_service/rest/client.rb | 704 ++++ .../homepage_service/rest/service_stub.rb | 330 ++ .../accounts/v1beta/homepage_services_pb.rb | 66 + .../accounts/v1beta/lfp_providers_service.rb | 59 + .../v1beta/lfp_providers_service/client.rb | 601 +++ .../lfp_providers_service/credentials.rb | 49 + .../v1beta/lfp_providers_service/paths.rb | 71 + .../v1beta/lfp_providers_service/rest.rb | 56 + .../lfp_providers_service/rest/client.rb | 544 +++ .../rest/service_stub.rb | 206 + .../accounts/v1beta/lfpproviders_pb.rb | 33 + .../v1beta/lfpproviders_services_pb.rb | 51 + .../v1beta/omnichannel_settings_service.rb | 60 + .../omnichannel_settings_service/client.rb | 892 +++++ .../credentials.rb | 49 + .../omnichannel_settings_service/paths.rb | 66 + .../omnichannel_settings_service/rest.rb | 57 + .../rest/client.rb | 814 ++++ .../rest/service_stub.rb | 391 ++ .../accounts/v1beta/omnichannelsettings_pb.rb | 46 + .../v1beta/omnichannelsettings_services_pb.rb | 58 + .../v1beta/online_return_policy_pb.rb | 47 + .../v1beta/online_return_policy_service.rb | 61 + .../online_return_policy_service/client.rb | 897 +++++ .../credentials.rb | 49 + .../online_return_policy_service/paths.rb | 66 + .../online_return_policy_service/rest.rb | 58 + .../rest/client.rb | 819 ++++ .../rest/service_stub.rb | 390 ++ .../online_return_policy_services_pb.rb | 59 + .../v1beta/phoneverificationstate_pb.rb | 23 + .../merchant/accounts/v1beta/programs_pb.rb | 35 + .../accounts/v1beta/programs_service.rb | 67 + .../v1beta/programs_service/client.rb | 786 ++++ .../v1beta/programs_service/credentials.rb | 49 + .../accounts/v1beta/programs_service/paths.rb | 66 + .../accounts/v1beta/programs_service/rest.rb | 64 + .../v1beta/programs_service/rest/client.rb | 715 ++++ .../programs_service/rest/service_stub.rb | 329 ++ .../accounts/v1beta/programs_services_pb.rb | 65 + .../merchant/accounts/v1beta/regions_pb.rb | 40 + .../accounts/v1beta/regions_service.rb | 61 + .../accounts/v1beta/regions_service/client.rb | 886 +++++ .../v1beta/regions_service/credentials.rb | 49 + .../accounts/v1beta/regions_service/paths.rb | 66 + .../accounts/v1beta/regions_service/rest.rb | 58 + .../v1beta/regions_service/rest/client.rb | 808 ++++ .../regions_service/rest/service_stub.rb | 390 ++ .../accounts/v1beta/regions_services_pb.rb | 62 + .../shopping/merchant/accounts/v1beta/rest.rb | 58 + .../v1beta/shipping_settings_service.rb | 58 + .../shipping_settings_service/client.rb | 574 +++ .../shipping_settings_service/credentials.rb | 49 + .../v1beta/shipping_settings_service/paths.rb | 49 + .../v1beta/shipping_settings_service/rest.rb | 55 + .../shipping_settings_service/rest/client.rb | 517 +++ .../rest/service_stub.rb | 206 + .../accounts/v1beta/shippingsettings_pb.rb | 61 + .../v1beta/shippingsettings_services_pb.rb | 51 + .../merchant/accounts/v1beta/tax_rule_pb.rb | 27 + ...erms_of_service_agreement_state_service.rb | 57 + .../client.rb | 576 +++ .../credentials.rb | 49 + .../paths.rb | 66 + .../rest.rb | 54 + .../rest/client.rb | 519 +++ .../rest/service_stub.rb | 205 + .../v1beta/terms_of_service_service.rb | 57 + .../v1beta/terms_of_service_service/client.rb | 670 ++++ .../terms_of_service_service/credentials.rb | 49 + .../v1beta/terms_of_service_service/paths.rb | 63 + .../v1beta/terms_of_service_service/rest.rb | 54 + .../terms_of_service_service/rest/client.rb | 614 +++ .../rest/service_stub.rb | 264 ++ .../accounts/v1beta/termsofservice_pb.rb | 33 + .../v1beta/termsofservice_services_pb.rb | 52 + .../v1beta/termsofserviceagreementstate_pb.rb | 34 + ...ermsofserviceagreementstate_services_pb.rb | 49 + .../accounts/v1beta/termsofservicekind_pb.rb | 23 + .../merchant/accounts/v1beta/user_pb.rb | 38 + .../merchant/accounts/v1beta/user_service.rb | 57 + .../accounts/v1beta/user_service/client.rb | 889 +++++ .../v1beta/user_service/credentials.rb | 49 + .../accounts/v1beta/user_service/paths.rb | 66 + .../accounts/v1beta/user_service/rest.rb | 54 + .../v1beta/user_service/rest/client.rb | 811 ++++ .../v1beta/user_service/rest/service_stub.rb | 390 ++ .../accounts/v1beta/user_services_pb.rb | 58 + .../v1beta/verificationmailsettings_pb.rb | 26 + .../merchant/accounts/v1beta/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 ++ .../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 + .../merchant/accounts/v1beta/accessright.rb | 43 + .../merchant/accounts/v1beta/account_tax.rb | 101 + .../merchant/accounts/v1beta/accountissue.rb | 142 + .../merchant/accounts/v1beta/accounts.rb | 231 ++ .../accounts/v1beta/accountservices.rb | 34 + .../accounts/v1beta/autofeedsettings.rb | 75 + .../accounts/v1beta/automaticimprovements.rb | 235 ++ .../accounts/v1beta/businessidentity.rb | 129 + .../merchant/accounts/v1beta/businessinfo.rb | 77 + .../accounts/v1beta/checkoutsettings.rb | 185 + .../accounts/v1beta/customerservice.rb | 43 + .../accounts/v1beta/emailpreferences.rb | 82 + .../merchant/accounts/v1beta/gbpaccounts.rb | 123 + .../merchant/accounts/v1beta/homepage.rb | 87 + .../merchant/accounts/v1beta/lfpproviders.rb | 108 + .../accounts/v1beta/omnichannelsettings.rb | 336 ++ .../accounts/v1beta/online_return_policy.rb | 345 ++ .../accounts/v1beta/phoneverificationstate.rb | 40 + .../merchant/accounts/v1beta/programs.rb | 160 + .../merchant/accounts/v1beta/regions.rb | 195 + .../accounts/v1beta/shippingsettings.rb | 747 ++++ .../merchant/accounts/v1beta/tax_rule.rb | 96 + .../accounts/v1beta/termsofservice.rb | 99 + .../v1beta/termsofserviceagreementstate.rb | 135 + .../accounts/v1beta/termsofservicekind.rb | 37 + .../shopping/merchant/accounts/v1beta/user.rb | 156 + .../v1beta/verificationmailsettings.rb | 53 + .../proto_docs/google/shopping/type/types.rb | 248 ++ .../proto_docs/google/type/date.rb | 53 + .../proto_docs/google/type/datetime.rb | 103 + .../proto_docs/google/type/interval.rb | 45 + .../proto_docs/google/type/phone_number.rb | 116 + .../proto_docs/google/type/postal_address.rb | 135 + .../snippets/Gemfile | 32 + .../list_account_issues.rb | 51 + .../account_tax_service/get_account_tax.rb | 47 + .../account_tax_service/list_account_tax.rb | 51 + .../account_tax_service/update_account_tax.rb | 47 + .../create_and_configure_account.rb | 47 + .../accounts_service/delete_account.rb | 47 + .../snippets/accounts_service/get_account.rb | 47 + .../accounts_service/list_accounts.rb | 51 + .../accounts_service/list_sub_accounts.rb | 51 + .../accounts_service/update_account.rb | 47 + .../get_autofeed_settings.rb | 47 + .../update_autofeed_settings.rb | 47 + .../get_automatic_improvements.rb | 47 + .../update_automatic_improvements.rb | 47 + .../get_business_identity.rb | 47 + .../update_business_identity.rb | 47 + .../get_business_info.rb | 47 + .../update_business_info.rb | 47 + .../create_checkout_settings.rb | 47 + .../delete_checkout_settings.rb | 47 + .../get_checkout_settings.rb | 47 + .../update_checkout_settings.rb | 47 + .../get_email_preferences.rb | 47 + .../update_email_preferences.rb | 47 + .../gbp_accounts_service/link_gbp_account.rb | 47 + .../gbp_accounts_service/list_gbp_accounts.rb | 51 + .../homepage_service/claim_homepage.rb | 47 + .../snippets/homepage_service/get_homepage.rb | 47 + .../homepage_service/unclaim_homepage.rb | 47 + .../homepage_service/update_homepage.rb | 47 + .../find_lfp_providers.rb | 51 + .../link_lfp_provider.rb | 47 + .../create_omnichannel_setting.rb | 47 + .../get_omnichannel_setting.rb | 47 + .../list_omnichannel_settings.rb | 51 + .../request_inventory_verification.rb | 47 + .../update_omnichannel_setting.rb | 47 + .../create_online_return_policy.rb | 47 + .../delete_online_return_policy.rb | 47 + .../get_online_return_policy.rb | 47 + .../list_online_return_policies.rb | 51 + .../update_online_return_policy.rb | 47 + .../programs_service/disable_program.rb | 47 + .../programs_service/enable_program.rb | 47 + .../snippets/programs_service/get_program.rb | 47 + .../programs_service/list_programs.rb | 51 + .../snippets/regions_service/create_region.rb | 47 + .../snippets/regions_service/delete_region.rb | 47 + .../snippets/regions_service/get_region.rb | 47 + .../snippets/regions_service/list_regions.rb | 51 + .../snippets/regions_service/update_region.rb | 47 + .../get_shipping_settings.rb | 47 + .../insert_shipping_settings.rb | 47 + ...gle.shopping.merchant.accounts.v1beta.json | 2535 +++++++++++++ .../get_terms_of_service_agreement_state.rb | 47 + ...cation_terms_of_service_agreement_state.rb | 47 + .../accept_terms_of_service.rb | 47 + .../get_terms_of_service.rb | 47 + .../retrieve_latest_terms_of_service.rb | 47 + .../snippets/user_service/create_user.rb | 47 + .../snippets/user_service/delete_user.rb | 47 + .../snippets/user_service/get_user.rb | 47 + .../snippets/user_service/list_users.rb | 51 + .../snippets/user_service/update_user.rb | 47 + .../account_issue_service_paths_test.rb | 55 + .../v1beta/account_issue_service_rest_test.rb | 157 + .../v1beta/account_issue_service_test.rb | 175 + .../v1beta/account_tax_service_paths_test.rb | 67 + .../v1beta/account_tax_service_rest_test.rb | 264 ++ .../v1beta/account_tax_service_test.rb | 289 ++ .../v1beta/accounts_service_paths_test.rb | 79 + .../v1beta/accounts_service_rest_test.rb | 432 +++ .../accounts/v1beta/accounts_service_test.rb | 481 +++ .../autofeed_settings_service_paths_test.rb | 55 + .../autofeed_settings_service_rest_test.rb | 208 ++ .../v1beta/autofeed_settings_service_test.rb | 222 ++ ...tomatic_improvements_service_paths_test.rb | 55 + ...utomatic_improvements_service_rest_test.rb | 208 ++ .../automatic_improvements_service_test.rb | 222 ++ .../business_identity_service_paths_test.rb | 55 + .../business_identity_service_rest_test.rb | 208 ++ .../v1beta/business_identity_service_test.rb | 222 ++ .../business_info_service_paths_test.rb | 55 + .../v1beta/business_info_service_rest_test.rb | 208 ++ .../v1beta/business_info_service_test.rb | 222 ++ .../checkout_settings_service_paths_test.rb | 67 + .../checkout_settings_service_rest_test.rb | 317 ++ .../v1beta/checkout_settings_service_test.rb | 340 ++ .../email_preferences_service_paths_test.rb | 55 + .../email_preferences_service_rest_test.rb | 208 ++ .../v1beta/email_preferences_service_test.rb | 222 ++ .../v1beta/gbp_accounts_service_paths_test.rb | 55 + .../v1beta/gbp_accounts_service_rest_test.rb | 210 ++ .../v1beta/gbp_accounts_service_test.rb | 231 ++ .../v1beta/homepage_service_paths_test.rb | 55 + .../v1beta/homepage_service_rest_test.rb | 316 ++ .../accounts/v1beta/homepage_service_test.rb | 338 ++ .../lfp_providers_service_paths_test.rb | 67 + .../v1beta/lfp_providers_service_rest_test.rb | 210 ++ .../v1beta/lfp_providers_service_test.rb | 231 ++ ...omnichannel_settings_service_paths_test.rb | 67 + .../omnichannel_settings_service_rest_test.rb | 373 ++ .../omnichannel_settings_service_test.rb | 407 ++ ...online_return_policy_service_paths_test.rb | 67 + .../online_return_policy_service_rest_test.rb | 373 ++ .../online_return_policy_service_test.rb | 407 ++ .../v1beta/programs_service_paths_test.rb | 67 + .../v1beta/programs_service_rest_test.rb | 317 ++ .../accounts/v1beta/programs_service_test.rb | 345 ++ .../v1beta/regions_service_paths_test.rb | 67 + .../v1beta/regions_service_rest_test.rb | 374 ++ .../accounts/v1beta/regions_service_test.rb | 409 ++ .../shipping_settings_service_paths_test.rb | 55 + .../shipping_settings_service_rest_test.rb | 208 ++ .../v1beta/shipping_settings_service_test.rb | 222 ++ ...vice_agreement_state_service_paths_test.rb | 67 + ...rvice_agreement_state_service_rest_test.rb | 207 ++ ...of_service_agreement_state_service_test.rb | 220 ++ .../terms_of_service_service_paths_test.rb | 67 + .../terms_of_service_service_rest_test.rb | 264 ++ .../v1beta/terms_of_service_service_test.rb | 284 ++ .../v1beta/user_service_paths_test.rb | 67 + .../accounts/v1beta/user_service_rest_test.rb | 374 ++ .../accounts/v1beta/user_service_test.rb | 409 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.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 | 48 + ...e-shopping-merchant-conversions-v1.gemspec | 28 + ...google-shopping-merchant-conversions-v1.rb | 21 + .../shopping/merchant/conversions/v1.rb | 47 + .../v1/conversion_sources_service.rb | 57 + .../v1/conversion_sources_service/client.rb | 973 +++++ .../conversion_sources_service/credentials.rb | 49 + .../v1/conversion_sources_service/paths.rb | 66 + .../v1/conversion_sources_service/rest.rb | 54 + .../conversion_sources_service/rest/client.rb | 888 +++++ .../rest/service_stub.rb | 452 +++ .../conversions/v1/conversionsources_pb.rb | 45 + .../v1/conversionsources_services_pb.rb | 62 + .../shopping/merchant/conversions/v1/rest.rb | 39 + .../merchant/conversions/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 ++ .../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 + .../conversions/v1/conversionsources.rb | 289 ++ .../snippets/Gemfile | 32 + .../create_conversion_source.rb | 47 + .../delete_conversion_source.rb | 47 + .../get_conversion_source.rb | 47 + .../list_conversion_sources.rb | 51 + .../undelete_conversion_source.rb | 47 + .../update_conversion_source.rb | 47 + ...ogle.shopping.merchant.conversions.v1.json | 255 ++ .../conversion_sources_service_paths_test.rb | 67 + .../conversion_sources_service_rest_test.rb | 428 +++ .../v1/conversion_sources_service_test.rb | 467 +++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.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 | 48 + ...opping-merchant-conversions-v1beta.gemspec | 28 + ...le-shopping-merchant-conversions-v1beta.rb | 21 + .../shopping/merchant/conversions/v1beta.rb | 47 + .../v1beta/conversion_sources_service.rb | 57 + .../conversion_sources_service/client.rb | 973 +++++ .../conversion_sources_service/credentials.rb | 49 + .../conversion_sources_service/paths.rb | 66 + .../v1beta/conversion_sources_service/rest.rb | 54 + .../conversion_sources_service/rest/client.rb | 888 +++++ .../rest/service_stub.rb | 452 +++ .../v1beta/conversionsources_pb.rb | 45 + .../v1beta/conversionsources_services_pb.rb | 62 + .../merchant/conversions/v1beta/rest.rb | 39 + .../merchant/conversions/v1beta/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 ++ .../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 + .../conversions/v1beta/conversionsources.rb | 290 ++ .../snippets/Gemfile | 32 + .../create_conversion_source.rb | 47 + .../delete_conversion_source.rb | 47 + .../get_conversion_source.rb | 47 + .../list_conversion_sources.rb | 51 + .../undelete_conversion_source.rb | 47 + .../update_conversion_source.rb | 47 + ....shopping.merchant.conversions.v1beta.json | 255 ++ .../conversion_sources_service_paths_test.rb | 67 + .../conversion_sources_service_rest_test.rb | 428 +++ .../v1beta/conversion_sources_service_test.rb | 467 +++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.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 | 62 + ...-shopping-merchant-data_sources-v1.gemspec | 29 + ...oogle-shopping-merchant-data_sources-v1.rb | 21 + .../shopping/merchant/data_sources/v1.rb | 48 + .../data_sources/v1/data_sources_service.rb | 59 + .../v1/data_sources_service/client.rb | 984 +++++ .../v1/data_sources_service/credentials.rb | 49 + .../v1/data_sources_service/paths.rb | 66 + .../v1/data_sources_service/rest.rb | 56 + .../v1/data_sources_service/rest/client.rb | 899 +++++ .../data_sources_service/rest/service_stub.rb | 452 +++ .../data_sources/v1/file_uploads_service.rb | 57 + .../v1/file_uploads_service/client.rb | 484 +++ .../v1/file_uploads_service/credentials.rb | 49 + .../v1/file_uploads_service/paths.rb | 54 + .../v1/file_uploads_service/rest.rb | 54 + .../v1/file_uploads_service/rest/client.rb | 434 +++ .../file_uploads_service/rest/service_stub.rb | 144 + .../shopping/merchant/data_sources/v1/rest.rb | 40 + .../merchant/data_sources/v1/version.rb | 30 + .../merchant/datasources/v1/datasources_pb.rb | 40 + .../datasources/v1/datasources_services_pb.rb | 65 + .../datasources/v1/datasourcetypes_pb.rb | 36 + .../merchant/datasources/v1/fileinputs_pb.rb | 30 + .../merchant/datasources/v1/fileuploads_pb.rb | 33 + .../datasources/v1/fileuploads_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 ++ .../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 + .../merchant/datasources/v1/datasources.rb | 231 ++ .../datasources/v1/datasourcetypes.rb | 293 ++ .../merchant/datasources/v1/fileinputs.rb | 135 + .../merchant/datasources/v1/fileuploads.rb | 131 + .../proto_docs/google/shopping/type/types.rb | 248 ++ .../proto_docs/google/type/dayofweek.rb | 49 + .../proto_docs/google/type/timeofday.rb | 45 + .../snippets/Gemfile | 32 + .../create_data_source.rb | 47 + .../delete_data_source.rb | 47 + .../data_sources_service/fetch_data_source.rb | 47 + .../data_sources_service/get_data_source.rb | 47 + .../data_sources_service/list_data_sources.rb | 51 + .../update_data_source.rb | 47 + .../file_uploads_service/get_file_upload.rb | 47 + ...ogle.shopping.merchant.datasources.v1.json | 295 ++ .../v1/data_sources_service_paths_test.rb | 67 + .../v1/data_sources_service_rest_test.rb | 427 +++ .../v1/data_sources_service_test.rb | 465 +++ .../v1/file_uploads_service_paths_test.rb | 55 + .../v1/file_uploads_service_rest_test.rb | 153 + .../v1/file_uploads_service_test.rb | 162 + .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.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 | 62 + ...pping-merchant-data_sources-v1beta.gemspec | 29 + ...e-shopping-merchant-data_sources-v1beta.rb | 21 + .../shopping/merchant/data_sources/v1beta.rb | 48 + .../v1beta/data_sources_service.rb | 59 + .../v1beta/data_sources_service/client.rb | 980 +++++ .../data_sources_service/credentials.rb | 49 + .../v1beta/data_sources_service/paths.rb | 66 + .../v1beta/data_sources_service/rest.rb | 56 + .../data_sources_service/rest/client.rb | 895 +++++ .../data_sources_service/rest/service_stub.rb | 452 +++ .../v1beta/file_uploads_service.rb | 57 + .../v1beta/file_uploads_service/client.rb | 484 +++ .../file_uploads_service/credentials.rb | 49 + .../v1beta/file_uploads_service/paths.rb | 54 + .../v1beta/file_uploads_service/rest.rb | 54 + .../file_uploads_service/rest/client.rb | 434 +++ .../file_uploads_service/rest/service_stub.rb | 144 + .../merchant/data_sources/v1beta/rest.rb | 40 + .../merchant/data_sources/v1beta/version.rb | 30 + .../datasources/v1beta/datasources_pb.rb | 40 + .../v1beta/datasources_services_pb.rb | 64 + .../datasources/v1beta/datasourcetypes_pb.rb | 37 + .../datasources/v1beta/fileinputs_pb.rb | 30 + .../datasources/v1beta/fileuploads_pb.rb | 33 + .../v1beta/fileuploads_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 ++ .../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 + .../datasources/v1beta/datasources.rb | 228 ++ .../datasources/v1beta/datasourcetypes.rb | 310 ++ .../merchant/datasources/v1beta/fileinputs.rb | 141 + .../datasources/v1beta/fileuploads.rb | 131 + .../proto_docs/google/shopping/type/types.rb | 248 ++ .../proto_docs/google/type/dayofweek.rb | 49 + .../proto_docs/google/type/timeofday.rb | 45 + .../snippets/Gemfile | 32 + .../create_data_source.rb | 47 + .../delete_data_source.rb | 47 + .../data_sources_service/fetch_data_source.rb | 47 + .../data_sources_service/get_data_source.rb | 47 + .../data_sources_service/list_data_sources.rb | 51 + .../update_data_source.rb | 47 + .../file_uploads_service/get_file_upload.rb | 47 + ....shopping.merchant.datasources.v1beta.json | 295 ++ .../v1beta/data_sources_service_paths_test.rb | 67 + .../v1beta/data_sources_service_rest_test.rb | 427 +++ .../v1beta/data_sources_service_test.rb | 465 +++ .../v1beta/file_uploads_service_paths_test.rb | 55 + .../v1beta/file_uploads_service_rest_test.rb | 153 + .../v1beta/file_uploads_service_test.rb | 162 + .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.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 | 57 + ...e-shopping-merchant-inventories-v1.gemspec | 29 + ...google-shopping-merchant-inventories-v1.rb | 21 + .../shopping/merchant/inventories/v1.rb | 48 + .../inventories/v1/inventories_common_pb.rb | 32 + .../inventories/v1/local_inventory_service.rb | 57 + .../v1/local_inventory_service/client.rb | 711 ++++ .../v1/local_inventory_service/credentials.rb | 49 + .../v1/local_inventory_service/paths.rb | 71 + .../v1/local_inventory_service/rest.rb | 54 + .../v1/local_inventory_service/rest/client.rb | 647 ++++ .../rest/service_stub.rb | 267 ++ .../inventories/v1/localinventory_pb.rb | 34 + .../v1/localinventory_services_pb.rb | 68 + .../v1/regional_inventory_service.rb | 58 + .../v1/regional_inventory_service/client.rb | 711 ++++ .../regional_inventory_service/credentials.rb | 49 + .../v1/regional_inventory_service/paths.rb | 71 + .../v1/regional_inventory_service/rest.rb | 55 + .../regional_inventory_service/rest/client.rb | 647 ++++ .../rest/service_stub.rb | 267 ++ .../inventories/v1/regionalinventory_pb.rb | 34 + .../v1/regionalinventory_services_pb.rb | 69 + .../shopping/merchant/inventories/v1/rest.rb | 40 + .../merchant/inventories/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 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../inventories/v1/inventories_common.rb | 182 + .../merchant/inventories/v1/localinventory.rb | 124 + .../inventories/v1/regionalinventory.rb | 123 + .../proto_docs/google/shopping/type/types.rb | 248 ++ .../proto_docs/google/type/interval.rb | 45 + .../snippets/Gemfile | 32 + .../delete_local_inventory.rb | 47 + .../insert_local_inventory.rb | 47 + .../list_local_inventories.rb | 51 + .../delete_regional_inventory.rb | 47 + .../insert_regional_inventory.rb | 47 + .../list_regional_inventories.rb | 51 + ...ogle.shopping.merchant.inventories.v1.json | 255 ++ .../v1/local_inventory_service_paths_test.rb | 67 + .../v1/local_inventory_service_rest_test.rb | 264 ++ .../v1/local_inventory_service_test.rb | 289 ++ .../regional_inventory_service_paths_test.rb | 67 + .../regional_inventory_service_rest_test.rb | 264 ++ .../v1/regional_inventory_service_test.rb | 289 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.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 | 57 + ...opping-merchant-inventories-v1beta.gemspec | 29 + ...le-shopping-merchant-inventories-v1beta.rb | 21 + .../shopping/merchant/inventories/v1beta.rb | 48 + .../v1beta/local_inventory_service.rb | 57 + .../v1beta/local_inventory_service/client.rb | 711 ++++ .../local_inventory_service/credentials.rb | 49 + .../v1beta/local_inventory_service/paths.rb | 71 + .../v1beta/local_inventory_service/rest.rb | 54 + .../local_inventory_service/rest/client.rb | 647 ++++ .../rest/service_stub.rb | 267 ++ .../inventories/v1beta/localinventory_pb.rb | 35 + .../v1beta/localinventory_services_pb.rb | 68 + .../v1beta/regional_inventory_service.rb | 58 + .../regional_inventory_service/client.rb | 711 ++++ .../regional_inventory_service/credentials.rb | 49 + .../regional_inventory_service/paths.rb | 71 + .../v1beta/regional_inventory_service/rest.rb | 55 + .../regional_inventory_service/rest/client.rb | 647 ++++ .../rest/service_stub.rb | 267 ++ .../v1beta/regionalinventory_pb.rb | 35 + .../v1beta/regionalinventory_services_pb.rb | 69 + .../merchant/inventories/v1beta/rest.rb | 40 + .../merchant/inventories/v1beta/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 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../inventories/v1beta/localinventory.rb | 164 + .../inventories/v1beta/regionalinventory.rb | 142 + .../proto_docs/google/shopping/type/types.rb | 248 ++ .../proto_docs/google/type/interval.rb | 45 + .../snippets/Gemfile | 32 + .../delete_local_inventory.rb | 47 + .../insert_local_inventory.rb | 47 + .../list_local_inventories.rb | 51 + .../delete_regional_inventory.rb | 47 + .../insert_regional_inventory.rb | 47 + .../list_regional_inventories.rb | 51 + ....shopping.merchant.inventories.v1beta.json | 255 ++ .../local_inventory_service_paths_test.rb | 67 + .../local_inventory_service_rest_test.rb | 264 ++ .../v1beta/local_inventory_service_test.rb | 289 ++ .../regional_inventory_service_paths_test.rb | 67 + .../regional_inventory_service_rest_test.rb | 264 ++ .../v1beta/regional_inventory_service_test.rb | 289 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.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 + ...pping-merchant-issue_resolution-v1.gemspec | 29 + ...e-shopping-merchant-issue_resolution-v1.rb | 21 + .../shopping/merchant/issue_resolution/v1.rb | 48 + .../v1/aggregate_product_statuses_service.rb | 57 + .../client.rb | 508 +++ .../credentials.rb | 49 + .../paths.rb | 49 + .../rest.rb | 54 + .../rest/client.rb | 458 +++ .../rest/service_stub.rb | 144 + .../v1/issue_resolution_service.rb | 58 + .../v1/issue_resolution_service/client.rb | 709 ++++ .../issue_resolution_service/credentials.rb | 49 + .../v1/issue_resolution_service/paths.rb | 66 + .../v1/issue_resolution_service/rest.rb | 55 + .../issue_resolution_service/rest/client.rb | 645 ++++ .../rest/service_stub.rb | 269 ++ .../merchant/issue_resolution/v1/rest.rb | 40 + .../merchant/issue_resolution/v1/version.rb | 30 + .../v1/aggregateproductstatuses_pb.rb | 35 + .../aggregateproductstatuses_services_pb.rb | 50 + .../issueresolution/v1/issueresolution_pb.rb | 66 + .../v1/issueresolution_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 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../v1/aggregateproductstatuses.rb | 173 + .../issueresolution/v1/issueresolution.rb | 952 +++++ .../proto_docs/google/shopping/type/types.rb | 248 ++ .../snippets/Gemfile | 32 + .../list_aggregate_product_statuses.rb | 51 + .../render_account_issues.rb | 47 + .../render_product_issues.rb | 47 + .../trigger_action.rb | 47 + ....shopping.merchant.issueresolution.v1.json | 175 + ...ate_product_statuses_service_paths_test.rb | 55 + ...gate_product_statuses_service_rest_test.rb | 156 + ...aggregate_product_statuses_service_test.rb | 173 + .../v1/issue_resolution_service_paths_test.rb | 67 + .../v1/issue_resolution_service_rest_test.rb | 269 ++ .../v1/issue_resolution_service_test.rb | 294 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.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 + ...g-merchant-issue_resolution-v1beta.gemspec | 29 + ...opping-merchant-issue_resolution-v1beta.rb | 21 + .../merchant/issue_resolution/v1beta.rb | 48 + .../aggregate_product_statuses_service.rb | 57 + .../client.rb | 508 +++ .../credentials.rb | 49 + .../paths.rb | 49 + .../rest.rb | 54 + .../rest/client.rb | 458 +++ .../rest/service_stub.rb | 144 + .../v1beta/issue_resolution_service.rb | 58 + .../v1beta/issue_resolution_service/client.rb | 709 ++++ .../issue_resolution_service/credentials.rb | 49 + .../v1beta/issue_resolution_service/paths.rb | 66 + .../v1beta/issue_resolution_service/rest.rb | 55 + .../issue_resolution_service/rest/client.rb | 645 ++++ .../rest/service_stub.rb | 269 ++ .../merchant/issue_resolution/v1beta/rest.rb | 40 + .../issue_resolution/v1beta/version.rb | 30 + .../v1beta/aggregateproductstatuses_pb.rb | 35 + .../aggregateproductstatuses_services_pb.rb | 50 + .../v1beta/issueresolution_pb.rb | 66 + .../v1beta/issueresolution_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 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../v1beta/aggregateproductstatuses.rb | 173 + .../issueresolution/v1beta/issueresolution.rb | 954 +++++ .../proto_docs/google/shopping/type/types.rb | 248 ++ .../snippets/Gemfile | 32 + .../list_aggregate_product_statuses.rb | 51 + .../render_account_issues.rb | 47 + .../render_product_issues.rb | 47 + .../trigger_action.rb | 47 + ...pping.merchant.issueresolution.v1beta.json | 175 + ...ate_product_statuses_service_paths_test.rb | 55 + ...gate_product_statuses_service_rest_test.rb | 156 + ...aggregate_product_statuses_service_test.rb | 173 + .../issue_resolution_service_paths_test.rb | 67 + .../issue_resolution_service_rest_test.rb | 269 ++ .../v1beta/issue_resolution_service_test.rb | 294 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../google-shopping-merchant-lfp-v1/.toys.rb | 28 + .../google-shopping-merchant-lfp-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-shopping-merchant-lfp-v1/Gemfile | 14 + .../LICENSE.md | 201 + .../google-shopping-merchant-lfp-v1/README.md | 154 + .../google-shopping-merchant-lfp-v1/Rakefile | 169 + .../gapic_metadata.json | 80 + .../google-shopping-merchant-lfp-v1.gemspec | 29 + .../lib/google-shopping-merchant-lfp-v1.rb | 21 + .../lib/google/shopping/merchant/lfp/v1.rb | 50 + .../merchant/lfp/v1/lfp_inventory_service.rb | 59 + .../lfp/v1/lfp_inventory_service/client.rb | 488 +++ .../v1/lfp_inventory_service/credentials.rb | 49 + .../lfp/v1/lfp_inventory_service/paths.rb | 70 + .../lfp/v1/lfp_inventory_service/rest.rb | 56 + .../v1/lfp_inventory_service/rest/client.rb | 438 +++ .../rest/service_stub.rb | 145 + .../lfp/v1/lfp_merchant_state_service.rb | 62 + .../v1/lfp_merchant_state_service/client.rb | 488 +++ .../lfp_merchant_state_service/credentials.rb | 49 + .../v1/lfp_merchant_state_service/paths.rb | 52 + .../lfp/v1/lfp_merchant_state_service/rest.rb | 59 + .../lfp_merchant_state_service/rest/client.rb | 438 +++ .../rest/service_stub.rb | 144 + .../merchant/lfp/v1/lfp_sale_service.rb | 59 + .../lfp/v1/lfp_sale_service/client.rb | 486 +++ .../lfp/v1/lfp_sale_service/credentials.rb | 49 + .../merchant/lfp/v1/lfp_sale_service/paths.rb | 52 + .../merchant/lfp/v1/lfp_sale_service/rest.rb | 56 + .../lfp/v1/lfp_sale_service/rest/client.rb | 436 +++ .../v1/lfp_sale_service/rest/service_stub.rb | 145 + .../merchant/lfp/v1/lfp_store_service.rb | 59 + .../lfp/v1/lfp_store_service/client.rb | 788 ++++ .../lfp/v1/lfp_store_service/credentials.rb | 49 + .../lfp/v1/lfp_store_service/paths.rb | 68 + .../merchant/lfp/v1/lfp_store_service/rest.rb | 56 + .../lfp/v1/lfp_store_service/rest/client.rb | 717 ++++ .../v1/lfp_store_service/rest/service_stub.rb | 328 ++ .../merchant/lfp/v1/lfpinventory_pb.rb | 31 + .../lfp/v1/lfpinventory_services_pb.rb | 51 + .../merchant/lfp/v1/lfpmerchantstate_pb.rb | 35 + .../lfp/v1/lfpmerchantstate_services_pb.rb | 52 + .../shopping/merchant/lfp/v1/lfpsale_pb.rb | 32 + .../merchant/lfp/v1/lfpsale_services_pb.rb | 49 + .../shopping/merchant/lfp/v1/lfpstore_pb.rb | 35 + .../merchant/lfp/v1/lfpstore_services_pb.rb | 57 + .../google/shopping/merchant/lfp/v1/rest.rb | 42 + .../shopping/merchant/lfp/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/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../shopping/merchant/lfp/v1/lfpinventory.rb | 113 + .../merchant/lfp/v1/lfpmerchantstate.rb | 181 + .../shopping/merchant/lfp/v1/lfpsale.rb | 96 + .../shopping/merchant/lfp/v1/lfpstore.rb | 185 + .../proto_docs/google/shopping/type/types.rb | 248 ++ .../snippets/Gemfile | 32 + .../insert_lfp_inventory.rb | 47 + .../get_lfp_merchant_state.rb | 47 + .../lfp_sale_service/insert_lfp_sale.rb | 47 + .../lfp_store_service/delete_lfp_store.rb | 47 + .../lfp_store_service/get_lfp_store.rb | 47 + .../lfp_store_service/insert_lfp_store.rb | 47 + .../lfp_store_service/list_lfp_stores.rb | 51 + ...adata_google.shopping.merchant.lfp.v1.json | 295 ++ .../v1/lfp_inventory_service_paths_test.rb | 67 + .../lfp/v1/lfp_inventory_service_rest_test.rb | 154 + .../lfp/v1/lfp_inventory_service_test.rb | 164 + .../lfp_merchant_state_service_paths_test.rb | 55 + .../lfp_merchant_state_service_rest_test.rb | 153 + .../lfp/v1/lfp_merchant_state_service_test.rb | 162 + .../lfp/v1/lfp_sale_service_paths_test.rb | 55 + .../lfp/v1/lfp_sale_service_rest_test.rb | 154 + .../merchant/lfp/v1/lfp_sale_service_test.rb | 164 + .../lfp/v1/lfp_store_service_paths_test.rb | 67 + .../lfp/v1/lfp_store_service_rest_test.rb | 319 ++ .../merchant/lfp/v1/lfp_store_service_test.rb | 349 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.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 | 80 + ...oogle-shopping-merchant-lfp-v1beta.gemspec | 29 + .../google-shopping-merchant-lfp-v1beta.rb | 21 + .../google/shopping/merchant/lfp/v1beta.rb | 50 + .../lfp/v1beta/lfp_inventory_service.rb | 59 + .../v1beta/lfp_inventory_service/client.rb | 488 +++ .../lfp_inventory_service/credentials.rb | 49 + .../lfp/v1beta/lfp_inventory_service/paths.rb | 70 + .../lfp/v1beta/lfp_inventory_service/rest.rb | 56 + .../lfp_inventory_service/rest/client.rb | 438 +++ .../rest/service_stub.rb | 145 + .../lfp/v1beta/lfp_merchant_state_service.rb | 59 + .../lfp_merchant_state_service/client.rb | 484 +++ .../lfp_merchant_state_service/credentials.rb | 49 + .../lfp_merchant_state_service/paths.rb | 52 + .../v1beta/lfp_merchant_state_service/rest.rb | 56 + .../lfp_merchant_state_service/rest/client.rb | 434 +++ .../rest/service_stub.rb | 144 + .../merchant/lfp/v1beta/lfp_sale_service.rb | 59 + .../lfp/v1beta/lfp_sale_service/client.rb | 486 +++ .../v1beta/lfp_sale_service/credentials.rb | 49 + .../lfp/v1beta/lfp_sale_service/paths.rb | 52 + .../lfp/v1beta/lfp_sale_service/rest.rb | 56 + .../v1beta/lfp_sale_service/rest/client.rb | 436 +++ .../lfp_sale_service/rest/service_stub.rb | 145 + .../merchant/lfp/v1beta/lfp_store_service.rb | 59 + .../lfp/v1beta/lfp_store_service/client.rb | 788 ++++ .../v1beta/lfp_store_service/credentials.rb | 49 + .../lfp/v1beta/lfp_store_service/paths.rb | 68 + .../lfp/v1beta/lfp_store_service/rest.rb | 56 + .../v1beta/lfp_store_service/rest/client.rb | 717 ++++ .../lfp_store_service/rest/service_stub.rb | 328 ++ .../merchant/lfp/v1beta/lfpinventory_pb.rb | 31 + .../lfp/v1beta/lfpinventory_services_pb.rb | 51 + .../lfp/v1beta/lfpmerchantstate_pb.rb | 35 + .../v1beta/lfpmerchantstate_services_pb.rb | 49 + .../merchant/lfp/v1beta/lfpsale_pb.rb | 32 + .../lfp/v1beta/lfpsale_services_pb.rb | 49 + .../merchant/lfp/v1beta/lfpstore_pb.rb | 35 + .../lfp/v1beta/lfpstore_services_pb.rb | 57 + .../shopping/merchant/lfp/v1beta/rest.rb | 42 + .../shopping/merchant/lfp/v1beta/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/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../merchant/lfp/v1beta/lfpinventory.rb | 113 + .../merchant/lfp/v1beta/lfpmerchantstate.rb | 179 + .../shopping/merchant/lfp/v1beta/lfpsale.rb | 96 + .../shopping/merchant/lfp/v1beta/lfpstore.rb | 185 + .../proto_docs/google/shopping/type/types.rb | 248 ++ .../snippets/Gemfile | 32 + .../insert_lfp_inventory.rb | 47 + .../get_lfp_merchant_state.rb | 47 + .../lfp_sale_service/insert_lfp_sale.rb | 47 + .../lfp_store_service/delete_lfp_store.rb | 47 + .../lfp_store_service/get_lfp_store.rb | 47 + .../lfp_store_service/insert_lfp_store.rb | 47 + .../lfp_store_service/list_lfp_stores.rb | 51 + ...a_google.shopping.merchant.lfp.v1beta.json | 295 ++ .../lfp_inventory_service_paths_test.rb | 67 + .../v1beta/lfp_inventory_service_rest_test.rb | 154 + .../lfp/v1beta/lfp_inventory_service_test.rb | 164 + .../lfp_merchant_state_service_paths_test.rb | 55 + .../lfp_merchant_state_service_rest_test.rb | 153 + .../v1beta/lfp_merchant_state_service_test.rb | 162 + .../lfp/v1beta/lfp_sale_service_paths_test.rb | 55 + .../lfp/v1beta/lfp_sale_service_rest_test.rb | 154 + .../lfp/v1beta/lfp_sale_service_test.rb | 164 + .../v1beta/lfp_store_service_paths_test.rb | 67 + .../lfp/v1beta/lfp_store_service_rest_test.rb | 319 ++ .../lfp/v1beta/lfp_store_service_test.rb | 349 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.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 | 48 + ...shopping-merchant-notifications-v1.gemspec | 28 + ...ogle-shopping-merchant-notifications-v1.rb | 21 + .../shopping/merchant/notifications/v1.rb | 47 + .../v1/notifications_api_service.rb | 57 + .../v1/notifications_api_service/client.rb | 988 +++++ .../notifications_api_service/credentials.rb | 49 + .../v1/notifications_api_service/paths.rb | 83 + .../v1/notifications_api_service/rest.rb | 54 + .../notifications_api_service/rest/client.rb | 903 +++++ .../rest/service_stub.rb | 451 +++ .../notifications/v1/notificationsapi_pb.rb | 39 + .../v1/notificationsapi_services_pb.rb | 81 + .../merchant/notifications/v1/rest.rb | 39 + .../merchant/notifications/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 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../notifications/v1/notificationsapi.rb | 184 + .../snippets/Gemfile | 32 + .../create_notification_subscription.rb | 47 + .../delete_notification_subscription.rb | 47 + .../get_notification_subscription.rb | 47 + ...otification_subscription_health_metrics.rb | 47 + .../list_notification_subscriptions.rb | 51 + .../update_notification_subscription.rb | 47 + ...le.shopping.merchant.notifications.v1.json | 255 ++ .../notifications_api_service_paths_test.rb | 79 + .../v1/notifications_api_service_rest_test.rb | 427 +++ .../v1/notifications_api_service_test.rb | 465 +++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.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 | 43 + ...ping-merchant-notifications-v1beta.gemspec | 29 + ...-shopping-merchant-notifications-v1beta.rb | 21 + .../shopping/merchant/notifications/v1beta.rb | 47 + .../v1beta/notifications_api_service.rb | 57 + .../notifications_api_service/client.rb | 880 +++++ .../notifications_api_service/credentials.rb | 49 + .../v1beta/notifications_api_service/paths.rb | 66 + .../v1beta/notifications_api_service/rest.rb | 54 + .../notifications_api_service/rest/client.rb | 802 ++++ .../rest/service_stub.rb | 390 ++ .../v1beta/notificationsapi_pb.rb | 42 + .../v1beta/notificationsapi_services_pb.rb | 66 + .../merchant/notifications/v1beta/rest.rb | 39 + .../merchant/notifications/v1beta/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 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../notifications/v1beta/notificationsapi.rb | 219 ++ .../proto_docs/google/shopping/type/types.rb | 248 ++ .../snippets/Gemfile | 32 + .../create_notification_subscription.rb | 47 + .../delete_notification_subscription.rb | 47 + .../get_notification_subscription.rb | 47 + .../list_notification_subscriptions.rb | 51 + .../update_notification_subscription.rb | 47 + ...hopping.merchant.notifications.v1beta.json | 215 ++ .../notifications_api_service_paths_test.rb | 67 + .../notifications_api_service_rest_test.rb | 373 ++ .../v1beta/notifications_api_service_test.rb | 407 ++ .../test/helper.rb | 26 + 2042 files changed, 345293 insertions(+) create mode 100644 owl-bot-staging/google-iam-v3/.gitignore create mode 100644 owl-bot-staging/google-iam-v3/.repo-metadata.json create mode 100644 owl-bot-staging/google-iam-v3/.rubocop.yml create mode 100644 owl-bot-staging/google-iam-v3/.toys.rb create mode 100644 owl-bot-staging/google-iam-v3/.yardopts create mode 100644 owl-bot-staging/google-iam-v3/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-iam-v3/CHANGELOG.md create mode 100644 owl-bot-staging/google-iam-v3/Gemfile create mode 100644 owl-bot-staging/google-iam-v3/LICENSE.md create mode 100644 owl-bot-staging/google-iam-v3/README.md create mode 100644 owl-bot-staging/google-iam-v3/Rakefile create mode 100644 owl-bot-staging/google-iam-v3/gapic_metadata.json create mode 100644 owl-bot-staging/google-iam-v3/google-iam-v3.gemspec create mode 100644 owl-bot-staging/google-iam-v3/lib/google-iam-v3.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/README.md create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/Gemfile create mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/helper.rb create mode 100644 owl-bot-staging/google-iam-v3beta/.gitignore create mode 100644 owl-bot-staging/google-iam-v3beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-iam-v3beta/.rubocop.yml create mode 100644 owl-bot-staging/google-iam-v3beta/.toys.rb create mode 100644 owl-bot-staging/google-iam-v3beta/.yardopts create mode 100644 owl-bot-staging/google-iam-v3beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-iam-v3beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-iam-v3beta/Gemfile create mode 100644 owl-bot-staging/google-iam-v3beta/LICENSE.md create mode 100644 owl-bot-staging/google-iam-v3beta/README.md create mode 100644 owl-bot-staging/google-iam-v3beta/Rakefile create mode 100644 owl-bot-staging/google-iam-v3beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/helper.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.gitignore create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.yardopts create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/Gemfile create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/LICENSE.md create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/README.md create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/Rakefile create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.gitignore create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.toys.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.yardopts create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/LICENSE.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/README.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/Rakefile create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_services_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_vehicles_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/tasks_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.gitignore create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.toys.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.yardopts create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/Gemfile create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/LICENSE.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/README.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/Rakefile create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/.gitignore create mode 100644 owl-bot-staging/google-shopping-css-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-css-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-css-v1/.toys.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/.yardopts create mode 100644 owl-bot-staging/google-shopping-css-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-css-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-css-v1/Gemfile create mode 100644 owl-bot-staging/google-shopping-css-v1/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-css-v1/README.md create mode 100644 owl-bot-staging/google-shopping-css-v1/Rakefile create mode 100644 owl-bot-staging/google-shopping-css-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-v1.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/version.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/google-shopping-merchant-accounts-v1.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google-shopping-merchant-accounts-v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accessright_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkoutsettings_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkoutsettings_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/customerservice_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/phoneverificationstate_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservicekind_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/verificationmailsettings_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accessright.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountissue.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountrelationships.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountservices.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/autofeedsettings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/automaticimprovements.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessidentity.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessinfo.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/checkoutsettings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/customerservice.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/developerregistration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/emailpreferences.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/gbpaccounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/homepage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/lfpproviders.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/omnichannelsettings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/online_return_policy.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/phoneverificationstate.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/programs.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/regions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/shippingsettings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservice.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofserviceagreementstate.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservicekind.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/user.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/verificationmailsettings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/datetime.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/latlng.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/phone_number.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/postal_address.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_issue_service/list_account_issues.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/get_account_relationship.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/list_account_relationships.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/update_account_relationship.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/approve_account_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/get_account_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/list_account_services.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/propose_account_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/reject_account_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_and_configure_account.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_test_account.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/delete_account.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/get_account.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_accounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_sub_accounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/update_account.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/get_autofeed_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/update_autofeed_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/get_automatic_improvements.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/update_automatic_improvements.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_identity_service/get_business_identity.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_identity_service/update_business_identity.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_info_service/get_business_info.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_info_service/update_business_info.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/create_checkout_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/delete_checkout_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/get_checkout_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/update_checkout_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_account_for_gcp_registration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_developer_registration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/register_gcp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/unregister_gcp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/get_email_preferences.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/update_email_preferences.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/link_gbp_account.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/list_gbp_accounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/claim_homepage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/get_homepage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/unclaim_homepage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/update_homepage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/find_lfp_providers.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/link_lfp_provider.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/create_omnichannel_setting.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/get_omnichannel_setting.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/list_omnichannel_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/request_inventory_verification.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/update_omnichannel_setting.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/create_online_return_policy.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/delete_online_return_policy.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/get_online_return_policy.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/list_online_return_policies.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/disable_program.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/enable_program.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/get_program.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/list_programs.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_create_regions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_delete_regions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_update_regions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/create_region.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/delete_region.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/get_region.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/list_regions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/update_region.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/get_shipping_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/insert_shipping_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/accept_terms_of_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/get_terms_of_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/create_user.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/delete_user.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/get_user.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/list_users.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/update_user.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/verify_self.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/tax_rule_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/google-shopping-merchant-data_sources-v1.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google-shopping-merchant-data_sources-v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasourcetypes_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileinputs_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/dayofweek.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/create_data_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/delete_data_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/fetch_data_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/get_data_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/list_data_sources.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/update_data_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/file_uploads_service/get_file_upload.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/google-shopping-merchant-data_sources-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google-shopping-merchant-data_sources-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasourcetypes_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/fileinputs_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/fileuploads_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/fileuploads_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasources.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasourcetypes.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileinputs.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileuploads.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/dayofweek.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/timeofday.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/create_data_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/delete_data_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/fetch_data_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/get_data_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/list_data_sources.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/update_data_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/file_uploads_service/get_file_upload.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/snippet_metadata_google.shopping.merchant.datasources.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/google-shopping-merchant-inventories-v1.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google-shopping-merchant-inventories-v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/inventories_common_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/type/interval.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/delete_local_inventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/insert_local_inventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/list_local_inventories.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/delete_regional_inventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/insert_regional_inventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/list_regional_inventories.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/snippet_metadata_google.shopping.merchant.inventories.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/google-shopping-merchant-issue_resolution-v1.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google-shopping-merchant-issue_resolution-v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_account_issues.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_product_issues.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/trigger_action.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google-shopping-merchant-issue_resolution-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_account_issues.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_product_issues.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/trigger_action.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/google-shopping-merchant-lfp-v1.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google-shopping-merchant-lfp-v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_inventory_service/insert_lfp_inventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_sale_service/insert_lfp_sale.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/delete_lfp_store.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/get_lfp_store.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/insert_lfp_store.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/list_lfp_stores.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpmerchantstate.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/snippet_metadata_google.shopping.merchant.lfp.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/google-shopping-merchant-notifications-v1.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google-shopping-merchant-notifications-v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/shopping/merchant/notifications/v1/notificationsapi.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/create_notification_subscription.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/delete_notification_subscription.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription_health_metrics.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/list_notification_subscriptions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/update_notification_subscription.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google-shopping-merchant-notifications-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/create_notification_subscription.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/delete_notification_subscription.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/get_notification_subscription.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/list_notification_subscriptions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/update_notification_subscription.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/snippet_metadata_google.shopping.merchant.notifications.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/helper.rb diff --git a/owl-bot-staging/google-iam-v3/.gitignore b/owl-bot-staging/google-iam-v3/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3/.repo-metadata.json b/owl-bot-staging/google-iam-v3/.repo-metadata.json new file mode 100644 index 000000000000..99b5e3acd3ae --- /dev/null +++ b/owl-bot-staging/google-iam-v3/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "iam.googleapis.com", + "api_shortname": "iam", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-iam-v3/latest", + "distribution_name": "google-iam-v3", + "is_cloud": true, + "language": "ruby", + "name": "iam", + "name_pretty": "Identity and Access Management (IAM) V3 API", + "product_documentation": "https://cloud.google.com/iam/docs/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3 is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/iam/docs/overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-iam-v3/.rubocop.yml b/owl-bot-staging/google-iam-v3/.rubocop.yml new file mode 100644 index 000000000000..a513a8400ebb --- /dev/null +++ b/owl-bot-staging/google-iam-v3/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-iam-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-iam-v3.rb" diff --git a/owl-bot-staging/google-iam-v3/.toys.rb b/owl-bot-staging/google-iam-v3/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3/.yardopts b/owl-bot-staging/google-iam-v3/.yardopts new file mode 100644 index 000000000000..b0b7998f4801 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Identity and Access Management (IAM) 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-iam-v3/AUTHENTICATION.md b/owl-bot-staging/google-iam-v3/AUTHENTICATION.md new file mode 100644 index 000000000000..6530963bb8fa --- /dev/null +++ b/owl-bot-staging/google-iam-v3/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-iam-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-iam-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/iam/v3" + +client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/iam/v3" + +::Google::Iam::V3::PolicyBindings::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Iam::V3::PolicyBindings::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-iam-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/iam/v3" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Iam::V3::PolicyBindings::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-iam-v3/CHANGELOG.md b/owl-bot-staging/google-iam-v3/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-iam-v3/Gemfile b/owl-bot-staging/google-iam-v3/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3/LICENSE.md b/owl-bot-staging/google-iam-v3/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3/README.md b/owl-bot-staging/google-iam-v3/README.md new file mode 100644 index 000000000000..4d8c6b082b47 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Identity and Access Management (IAM) V3 API + +Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. + +Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials 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 Identity and Access Management (IAM) V3 API. Most users should consider using +the main client gem, +[google-iam](https://rubygems.org/gems/google-iam). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-iam-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/iam.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/iam/v3" + +client = ::Google::Iam::V3::PolicyBindings::Client.new +request = ::Google::Iam::V3::CreatePolicyBindingRequest.new # (request fields as keyword arguments...) +response = client.create_policy_binding request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-iam-v3/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/iam/docs/overview) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/iam/v3" +require "logger" + +client = ::Google::Iam::V3::PolicyBindings::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-iam`, +and lower-level _versioned_ client libraries with names such as +`google-iam-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-iam`. +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-iam-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-iam-v3/Rakefile b/owl-bot-staging/google-iam-v3/Rakefile new file mode 100644 index 000000000000..2c984d93b8d7 --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3 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/iam/v3/policy_bindings/credentials" + ::Google::Iam::V3::PolicyBindings::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-iam-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-iam-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-iam-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-iam-v3 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-iam-v3" + header "google-iam-v3 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-iam-v3 yard", "*" + Rake::Task[:yard].invoke + header "google-iam-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-iam-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-iam-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-iam-v3/gapic_metadata.json b/owl-bot-staging/google-iam-v3/gapic_metadata.json new file mode 100644 index 000000000000..76d45f6a44df --- /dev/null +++ b/owl-bot-staging/google-iam-v3/gapic_metadata.json @@ -0,0 +1,87 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.iam.v3", + "libraryPackage": "::Google::Iam::V3", + "services": { + "PolicyBindings": { + "clients": { + "grpc": { + "libraryClient": "::Google::Iam::V3::PolicyBindings::Client", + "rpcs": { + "CreatePolicyBinding": { + "methods": [ + "create_policy_binding" + ] + }, + "GetPolicyBinding": { + "methods": [ + "get_policy_binding" + ] + }, + "UpdatePolicyBinding": { + "methods": [ + "update_policy_binding" + ] + }, + "DeletePolicyBinding": { + "methods": [ + "delete_policy_binding" + ] + }, + "ListPolicyBindings": { + "methods": [ + "list_policy_bindings" + ] + }, + "SearchTargetPolicyBindings": { + "methods": [ + "search_target_policy_bindings" + ] + } + } + } + } + }, + "PrincipalAccessBoundaryPolicies": { + "clients": { + "grpc": { + "libraryClient": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client", + "rpcs": { + "CreatePrincipalAccessBoundaryPolicy": { + "methods": [ + "create_principal_access_boundary_policy" + ] + }, + "GetPrincipalAccessBoundaryPolicy": { + "methods": [ + "get_principal_access_boundary_policy" + ] + }, + "UpdatePrincipalAccessBoundaryPolicy": { + "methods": [ + "update_principal_access_boundary_policy" + ] + }, + "DeletePrincipalAccessBoundaryPolicy": { + "methods": [ + "delete_principal_access_boundary_policy" + ] + }, + "ListPrincipalAccessBoundaryPolicies": { + "methods": [ + "list_principal_access_boundary_policies" + ] + }, + "SearchPrincipalAccessBoundaryPolicyBindings": { + "methods": [ + "search_principal_access_boundary_policy_bindings" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-iam-v3/google-iam-v3.gemspec b/owl-bot-staging/google-iam-v3/google-iam-v3.gemspec new file mode 100644 index 000000000000..a485d001dc45 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/google-iam-v3.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/iam/v3/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-iam-v3" + gem.version = Google::Iam::V3::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3 is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details." + gem.summary = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials 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-iam-v3/lib/google-iam-v3.rb b/owl-bot-staging/google-iam-v3/lib/google-iam-v3.rb new file mode 100644 index 000000000000..567b503c671b --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google-iam-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/iam/v3" diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb new file mode 100644 index 000000000000..93137c725614 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/v3/policy_bindings" +require "google/iam/v3/principal_access_boundary_policies" +require "google/iam/v3/version" + +module Google + module Iam + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/iam/v3" + # client = ::Google::Iam::V3::PolicyBindings::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/iam/v3" + # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new + # + module V3 + end + end +end + +helper_path = ::File.join __dir__, "v3", "_helpers.rb" +require "google/iam/v3/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb new file mode 100644 index 000000000000..d0c9141ce226 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3/operation_metadata.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/iam/v3/operation_metadata.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x42\x84\x01\n\x11\x63om.google.iam.v3B\x16OperationMetadataProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.OperationMetadata").msgclass + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb new file mode 100644 index 000000000000..d9f06b7d7158 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3/policy_binding_resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/expr_pb' + + +descriptor_data = "\n,google/iam/v3/policy_binding_resources.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xd6\x07\n\rPolicyBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32-.google.iam.v3.PolicyBinding.AnnotationsEntryB\x03\xe0\x41\x01\x12;\n\x06target\x18\x06 \x01(\x0b\x32#.google.iam.v3.PolicyBinding.TargetB\x06\xe0\x41\x05\xe0\x41\x02\x12\x41\n\x0bpolicy_kind\x18\x0b \x01(\x0e\x32\'.google.iam.v3.PolicyBinding.PolicyKindB\x03\xe0\x41\x05\x12\x16\n\x06policy\x18\x07 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x17\n\npolicy_uid\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12)\n\tcondition\x18\x08 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\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\x1a\x30\n\x06Target\x12\x1c\n\rprincipal_set\x18\x01 \x01(\tB\x03\xe0\x41\x05H\x00\x42\x08\n\x06target\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"H\n\nPolicyKind\x12\x1b\n\x17POLICY_KIND_UNSPECIFIED\x10\x00\x12\x1d\n\x19PRINCIPAL_ACCESS_BOUNDARY\x10\x01:\xa8\x02\xea\x41\xa4\x02\n iam.googleapis.com/PolicyBinding\x12Qorganizations/{organization}/locations/{location}/policyBindings/{policy_binding}\x12\x45\x66olders/{folder}/locations/{location}/policyBindings/{policy_binding}\x12Gprojects/{project}/locations/{location}/policyBindings/{policy_binding}*\x0epolicyBindings2\rpolicyBindingB\x89\x01\n\x11\x63om.google.iam.v3B\x1bPolicyBindingResourcesProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3 + PolicyBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PolicyBinding").msgclass + PolicyBinding::Target = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PolicyBinding.Target").msgclass + PolicyBinding::PolicyKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PolicyBinding.PolicyKind").enummodule + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.rb new file mode 100644 index 000000000000..89b89d81de14 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.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/iam/v3/version" + +require "google/iam/v3/policy_bindings/credentials" +require "google/iam/v3/policy_bindings/paths" +require "google/iam/v3/policy_bindings/operations" +require "google/iam/v3/policy_bindings/client" +require "google/iam/v3/policy_bindings/rest" + +module Google + module Iam + module V3 + ## + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/iam/v3/policy_bindings" + # client = ::Google::Iam::V3::PolicyBindings::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/iam/v3/policy_bindings/rest" + # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new + # + module PolicyBindings + end + end + end +end + +helper_path = ::File.join __dir__, "policy_bindings", "helpers.rb" +require "google/iam/v3/policy_bindings/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb new file mode 100644 index 000000000000..f857a396e033 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb @@ -0,0 +1,1147 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/iam/v3/policy_bindings_service_pb" +require "google/cloud/location" + +module Google + module Iam + module V3 + module PolicyBindings + ## + # Client for the PolicyBindings service. + # + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :policy_bindings_stub + + ## + # Configure the PolicyBindings Client class. + # + # See {::Google::Iam::V3::PolicyBindings::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PolicyBindings clients + # ::Google::Iam::V3::PolicyBindings::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", "Iam", "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.create_policy_binding.timeout = 30.0 + + default_config.rpcs.get_policy_binding.timeout = 60.0 + default_config.rpcs.get_policy_binding.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_policy_binding.timeout = 30.0 + + default_config.rpcs.delete_policy_binding.timeout = 30.0 + + default_config.rpcs.list_policy_bindings.timeout = 60.0 + default_config.rpcs.list_policy_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_target_policy_bindings.timeout = 60.0 + default_config.rpcs.search_target_policy_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PolicyBindings 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::Iam::V3::PolicyBindings::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 + @policy_bindings_stub.universe_domain + end + + ## + # Create a new PolicyBindings client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3::PolicyBindings::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PolicyBindings 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/iam/v3/policy_bindings_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 + + @policy_bindings_stub = ::Gapic::ServiceStub.new( + ::Google::Iam::V3::PolicyBindings::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 + ) + + @policy_bindings_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 = @policy_bindings_stub.endpoint + config.universe_domain = @policy_bindings_stub.universe_domain + config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3::PolicyBindings::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 + @policy_bindings_stub.logger + end + + # Service calls + + ## + # Creates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # Once the binding is created, the policy is applied to the target. + # + # @overload create_policy_binding(request, options = nil) + # Pass arguments to `create_policy_binding` via a request object, either of type + # {::Google::Iam::V3::CreatePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::CreatePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) + # Pass arguments to `create_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this policy binding will be created. + # The binding parent is the closest Resource Manager resource (project, + # folder or organization) to the binding target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param policy_binding_id [::String] + # Required. The ID to use for the policy binding, which will become the final + # component of the policy binding's resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] + # Required. The policy binding to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::CreatePolicyBindingRequest.new + # + # # Call the create_policy_binding method. + # result = client.create_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePolicyBindingRequest + + # Converts hash and nil to 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_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::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_policy_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :create_policy_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a policy binding. + # + # @overload get_policy_binding(request, options = nil) + # Pass arguments to `get_policy_binding` via a request object, either of type + # {::Google::Iam::V3::GetPolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::GetPolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_policy_binding(name: nil) + # Pass arguments to `get_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the policy binding to retrieve. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V3::PolicyBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V3::PolicyBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::GetPolicyBindingRequest.new + # + # # Call the get_policy_binding method. + # result = client.get_policy_binding request + # + # # The returned object is of type Google::Iam::V3::PolicyBinding. + # p result + # + def get_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::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_policy_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :get_policy_binding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on the policy and target in the + # binding to update, and the IAM permission to remove the existing policy + # from the binding. Target is immutable and cannot be updated. Once the + # binding is updated, the new policy is applied to the target. + # + # @overload update_policy_binding(request, options = nil) + # Pass arguments to `update_policy_binding` via a request object, either of type + # {::Google::Iam::V3::UpdatePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::UpdatePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] + # Required. The policy binding to update. + # + # The policy binding's `name` field is used to identify the policy binding to + # update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::UpdatePolicyBindingRequest.new + # + # # Call the update_policy_binding method. + # result = client.update_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePolicyBindingRequest + + # Converts hash and nil to 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_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::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.policy_binding&.name + header_params["policy_binding.name"] = request.policy_binding.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :update_policy_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # Once the binding is deleted, the policy no longer applies to the target. + # + # @overload delete_policy_binding(request, options = nil) + # Pass arguments to `delete_policy_binding` via a request object, either of type + # {::Google::Iam::V3::DeletePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::DeletePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) + # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the policy binding to delete. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @param etag [::String] + # Optional. The etag of the policy binding. + # If this is provided, it must match the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::DeletePolicyBindingRequest.new + # + # # Call the delete_policy_binding method. + # result = client.delete_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::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_policy_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :delete_policy_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists policy bindings. + # + # @overload list_policy_bindings(request, options = nil) + # Pass arguments to `list_policy_bindings` via a request object, either of type + # {::Google::Iam::V3::ListPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::ListPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource, which owns the collection of policy + # bindings. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListPolicyBindings` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPolicyBindings` must + # match the call that provided the page token. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. Some eligible fields for filtering are: + # + # + `target` + # + `policy` + # + # Some examples of filter queries: + # + # * `target:ex*`: The binding target's name starts with "ex". + # * `target:example`: The binding target's name is `example`. + # * `policy:example`: The binding policy's name is `example`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::ListPolicyBindingsRequest.new + # + # # Call the list_policy_bindings method. + # result = client.list_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PolicyBinding. + # p item + # end + # + def list_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPolicyBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::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_policy_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :list_policy_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Search policy bindings by target. Returns all policy binding objects bound + # directly to target. + # + # @overload search_target_policy_bindings(request, options = nil) + # Pass arguments to `search_target_policy_bindings` via a request object, either of type + # {::Google::Iam::V3::SearchTargetPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::SearchTargetPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil) + # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param target [::String] + # Required. The target resource, which is bound to the policy in the binding. + # + # Format: + # + # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` + # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `SearchTargetPolicyBindingsRequest` must match the call that provided the + # page token. + # @param parent [::String] + # Required. The parent resource where this search will be performed. This + # should be the nearest Resource Manager resource (project, folder, or + # organization) to the target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::SearchTargetPolicyBindingsRequest.new + # + # # Call the search_target_policy_bindings method. + # result = client.search_target_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PolicyBinding. + # p item + # end + # + def search_target_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchTargetPolicyBindingsRequest + + # Converts hash and nil to 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_target_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::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.search_target_policy_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :search_target_policy_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the PolicyBindings API. + # + # This class represents the configuration for PolicyBindings, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Iam::V3::PolicyBindings::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_policy_binding to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3::PolicyBindings::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_policy_binding.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_policy_binding.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Iam::V3::PolicyBindings::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 = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 PolicyBindings API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_policy_binding + ## + # RPC-specific configuration for `get_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy_binding + ## + # RPC-specific configuration for `update_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy_binding + ## + # RPC-specific configuration for `delete_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_policy_binding + ## + # RPC-specific configuration for `list_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_policy_bindings + ## + # RPC-specific configuration for `search_target_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_target_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding + @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config + get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding + @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config + update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding + @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config + delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding + @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config + list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings + @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config + search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings + @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb new file mode 100644 index 000000000000..a3f91a0fb8fe --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.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 "googleauth" + +module Google + module Iam + module V3 + module PolicyBindings + # Credentials for the PolicyBindings 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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb new file mode 100644 index 000000000000..b297fe6c84e2 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb @@ -0,0 +1,839 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 Iam + module V3 + module PolicyBindings + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::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::Iam::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::Iam::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::Iam::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::Iam::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 + + 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 = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb new file mode 100644 index 000000000000..cc9e0c46ea72 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb @@ -0,0 +1,140 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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 V3 + module PolicyBindings + # Path helper methods for the PolicyBindings API. + module Paths + ## + # Create a fully-qualified FolderLocation resource string. + # + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}` + # + # @param folder [String] + # @param location [String] + # + # @return [::String] + def folder_location_path folder:, location: + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/locations/#{location}" + 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 OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified PolicyBinding resource string. + # + # @overload policy_binding_path(organization:, location:, policy_binding:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/policyBindings/{policy_binding}` + # + # @param organization [String] + # @param location [String] + # @param policy_binding [String] + # + # @overload policy_binding_path(folder:, location:, policy_binding:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/policyBindings/{policy_binding}` + # + # @param folder [String] + # @param location [String] + # @param policy_binding [String] + # + # @overload policy_binding_path(project:, location:, policy_binding:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/policyBindings/{policy_binding}` + # + # @param project [String] + # @param location [String] + # @param policy_binding [String] + # + # @return [::String] + def policy_binding_path **args + resources = { + "location:organization:policy_binding" => (proc do |organization:, location:, policy_binding:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/policyBindings/#{policy_binding}" + end), + "folder:location:policy_binding" => (proc do |folder:, location:, policy_binding:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/policyBindings/#{policy_binding}" + end), + "location:policy_binding:project" => (proc do |project:, location:, policy_binding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/policyBindings/#{policy_binding}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb new file mode 100644 index 000000000000..102093998bd5 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/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/iam/v3/version" + +require "google/iam/v3/policy_bindings/credentials" +require "google/iam/v3/policy_bindings/paths" +require "google/iam/v3/policy_bindings/rest/operations" +require "google/iam/v3/policy_bindings/rest/client" + +module Google + module Iam + module V3 + ## + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + # + # To load this service and instantiate a REST client: + # + # require "google/iam/v3/policy_bindings/rest" + # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new + # + module PolicyBindings + # Client for the REST transport + module Rest + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/iam/v3/policy_bindings/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb new file mode 100644 index 000000000000..1e2093cd2c95 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb @@ -0,0 +1,1062 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/iam/v3/policy_bindings_service_pb" +require "google/iam/v3/policy_bindings/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Iam + module V3 + module PolicyBindings + module Rest + ## + # REST client for the PolicyBindings service. + # + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :policy_bindings_stub + + ## + # Configure the PolicyBindings Client class. + # + # See {::Google::Iam::V3::PolicyBindings::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PolicyBindings clients + # ::Google::Iam::V3::PolicyBindings::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", "Iam", "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.create_policy_binding.timeout = 30.0 + + default_config.rpcs.get_policy_binding.timeout = 60.0 + default_config.rpcs.get_policy_binding.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_policy_binding.timeout = 30.0 + + default_config.rpcs.delete_policy_binding.timeout = 30.0 + + default_config.rpcs.list_policy_bindings.timeout = 60.0 + default_config.rpcs.list_policy_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_target_policy_bindings.timeout = 60.0 + default_config.rpcs.search_target_policy_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PolicyBindings 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::Iam::V3::PolicyBindings::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 + @policy_bindings_stub.universe_domain + end + + ## + # Create a new PolicyBindings REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PolicyBindings 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::Iam::V3::PolicyBindings::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 + + @policy_bindings_stub = ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @policy_bindings_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 = @policy_bindings_stub.endpoint + config.universe_domain = @policy_bindings_stub.universe_domain + config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3::PolicyBindings::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 + @policy_bindings_stub.logger + end + + # Service calls + + ## + # Creates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # Once the binding is created, the policy is applied to the target. + # + # @overload create_policy_binding(request, options = nil) + # Pass arguments to `create_policy_binding` via a request object, either of type + # {::Google::Iam::V3::CreatePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::CreatePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) + # Pass arguments to `create_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this policy binding will be created. + # The binding parent is the closest Resource Manager resource (project, + # folder or organization) to the binding target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param policy_binding_id [::String] + # Required. The ID to use for the policy binding, which will become the final + # component of the policy binding's resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] + # Required. The policy binding to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::CreatePolicyBindingRequest.new + # + # # Call the create_policy_binding method. + # result = client.create_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePolicyBindingRequest + + # Converts hash and nil to an 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_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::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_policy_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.create_policy_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a policy binding. + # + # @overload get_policy_binding(request, options = nil) + # Pass arguments to `get_policy_binding` via a request object, either of type + # {::Google::Iam::V3::GetPolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::GetPolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_policy_binding(name: nil) + # Pass arguments to `get_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the policy binding to retrieve. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V3::PolicyBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::PolicyBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::GetPolicyBindingRequest.new + # + # # Call the get_policy_binding method. + # result = client.get_policy_binding request + # + # # The returned object is of type Google::Iam::V3::PolicyBinding. + # p result + # + def get_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::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_policy_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.get_policy_binding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on the policy and target in the + # binding to update, and the IAM permission to remove the existing policy + # from the binding. Target is immutable and cannot be updated. Once the + # binding is updated, the new policy is applied to the target. + # + # @overload update_policy_binding(request, options = nil) + # Pass arguments to `update_policy_binding` via a request object, either of type + # {::Google::Iam::V3::UpdatePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::UpdatePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] + # Required. The policy binding to update. + # + # The policy binding's `name` field is used to identify the policy binding to + # update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::UpdatePolicyBindingRequest.new + # + # # Call the update_policy_binding method. + # result = client.update_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePolicyBindingRequest + + # Converts hash and nil to an 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_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::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_policy_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.update_policy_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # Once the binding is deleted, the policy no longer applies to the target. + # + # @overload delete_policy_binding(request, options = nil) + # Pass arguments to `delete_policy_binding` via a request object, either of type + # {::Google::Iam::V3::DeletePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::DeletePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) + # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the policy binding to delete. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @param etag [::String] + # Optional. The etag of the policy binding. + # If this is provided, it must match the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::DeletePolicyBindingRequest.new + # + # # Call the delete_policy_binding method. + # result = client.delete_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::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_policy_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.delete_policy_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists policy bindings. + # + # @overload list_policy_bindings(request, options = nil) + # Pass arguments to `list_policy_bindings` via a request object, either of type + # {::Google::Iam::V3::ListPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::ListPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource, which owns the collection of policy + # bindings. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListPolicyBindings` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPolicyBindings` must + # match the call that provided the page token. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. Some eligible fields for filtering are: + # + # + `target` + # + `policy` + # + # Some examples of filter queries: + # + # * `target:ex*`: The binding target's name starts with "ex". + # * `target:example`: The binding target's name is `example`. + # * `policy:example`: The binding policy's name is `example`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::ListPolicyBindingsRequest.new + # + # # Call the list_policy_bindings method. + # result = client.list_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PolicyBinding. + # p item + # end + # + def list_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPolicyBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::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_policy_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.list_policy_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, "policy_bindings", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Search policy bindings by target. Returns all policy binding objects bound + # directly to target. + # + # @overload search_target_policy_bindings(request, options = nil) + # Pass arguments to `search_target_policy_bindings` via a request object, either of type + # {::Google::Iam::V3::SearchTargetPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::SearchTargetPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil) + # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param target [::String] + # Required. The target resource, which is bound to the policy in the binding. + # + # Format: + # + # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` + # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `SearchTargetPolicyBindingsRequest` must match the call that provided the + # page token. + # @param parent [::String] + # Required. The parent resource where this search will be performed. This + # should be the nearest Resource Manager resource (project, folder, or + # organization) to the target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::SearchTargetPolicyBindingsRequest.new + # + # # Call the search_target_policy_bindings method. + # result = client.search_target_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PolicyBinding. + # p item + # end + # + def search_target_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchTargetPolicyBindingsRequest + + # Converts hash and nil to an 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_target_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::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.search_target_policy_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.search_target_policy_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, "policy_bindings", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the PolicyBindings REST API. + # + # This class represents the configuration for PolicyBindings 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::Iam::V3::PolicyBindings::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_policy_binding to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3::PolicyBindings::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_policy_binding.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_policy_binding.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 PolicyBindings API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_policy_binding + ## + # RPC-specific configuration for `get_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy_binding + ## + # RPC-specific configuration for `update_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy_binding + ## + # RPC-specific configuration for `delete_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_policy_binding + ## + # RPC-specific configuration for `list_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_policy_bindings + ## + # RPC-specific configuration for `search_target_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_target_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding + @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config + get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding + @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config + update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding + @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config + delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding + @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config + list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings + @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config + search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings + @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb new file mode 100644 index 000000000000..e7daad469288 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb @@ -0,0 +1,937 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 Iam + module V3 + module PolicyBindings + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::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::Iam::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::Iam::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::Iam::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 + + ## + # 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 = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb new file mode 100644 index 000000000000..ba0446cdb560 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb @@ -0,0 +1,535 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/v3/policy_bindings_service_pb" + +module Google + module Iam + module V3 + module PolicyBindings + module Rest + ## + # REST service stub for the PolicyBindings 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_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3::CreatePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_policy_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_policy_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_policy_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3::GetPolicyBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3::PolicyBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::PolicyBinding] + # A result object deserialized from the server's reply + def get_policy_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_policy_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3::PolicyBinding.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_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3::UpdatePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_policy_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_policy_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3::DeletePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_policy_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_policy_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_policy_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3::ListPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3::ListPolicyBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::ListPolicyBindingsResponse] + # A result object deserialized from the server's reply + def list_policy_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_policy_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_policy_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3::ListPolicyBindingsResponse.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_target_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3::SearchTargetPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3::SearchTargetPolicyBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::SearchTargetPolicyBindingsResponse] + # A result object deserialized from the server's reply + def search_target_policy_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_target_policy_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "search_target_policy_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3::SearchTargetPolicyBindingsResponse.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_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3::CreatePolicyBindingRequest] + # 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_policy_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}/policyBindings", + body: "policy_binding", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}/policyBindings", + body: "policy_binding", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}/policyBindings", + body: "policy_binding", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3::GetPolicyBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_policy_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3::UpdatePolicyBindingRequest] + # 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_policy_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v3/{policy_binding.name}", + body: "policy_binding", + matches: [ + ["policy_binding.name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v3/{policy_binding.name}", + body: "policy_binding", + matches: [ + ["policy_binding.name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v3/{policy_binding.name}", + body: "policy_binding", + matches: [ + ["policy_binding.name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3::DeletePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_policy_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3::ListPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_policy_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/policyBindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/policyBindings", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/policyBindings", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_target_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3::SearchTargetPolicyBindingsRequest] + # 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_target_policy_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/policyBindings:searchTargetPolicyBindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/policyBindings:searchTargetPolicyBindings", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/policyBindings:searchTargetPolicyBindings", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb new file mode 100644 index 000000000000..0909b40a7929 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3/policy_bindings_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/iam/v3/operation_metadata_pb' +require 'google/iam/v3/policy_binding_resources_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n+google/iam/v3/policy_bindings_service.proto\x12\rgoogle.iam.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/iam/v3/operation_metadata.proto\x1a,google/iam/v3/policy_binding_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xcd\x01\n\x1a\x43reatePolicyBindingRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x1e\n\x11policy_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x0epolicy_binding\x18\x03 \x01(\x0b\x32\x1c.google.iam.v3.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"Q\n\x17GetPolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\"\xa9\x01\n\x1aUpdatePolicyBindingRequest\x12\x39\n\x0epolicy_binding\x18\x01 \x01(\x0b\x32\x1c.google.iam.v3.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x83\x01\n\x1a\x44\x65letePolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x9b\x01\n\x19ListPolicyBindingsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x16\n\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\"q\n\x1aListPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n!SearchTargetPolicyBindingsRequest\x12\x13\n\x06target\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\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\x38\n\x06parent\x18\x05 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\"y\n\"SearchTargetPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xa0\x11\n\x0ePolicyBindings\x12\x8c\x03\n\x13\x43reatePolicyBinding\x12).google.iam.v3.CreatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\'parent,policy_binding,policy_binding_id\x82\xd3\xe4\x93\x02\xd4\x01\"2/v3/{parent=projects/*/locations/*}/policyBindings:\x0epolicy_bindingZC\"1/v3/{parent=folders/*/locations/*}/policyBindings:\x0epolicy_bindingZI\"7/v3/{parent=organizations/*/locations/*}/policyBindings:\x0epolicy_binding\x12\x8d\x02\n\x10GetPolicyBinding\x12&.google.iam.v3.GetPolicyBindingRequest\x1a\x1c.google.iam.v3.PolicyBinding\"\xb2\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa4\x01\x12\x32/v3/{name=projects/*/locations/*/policyBindings/*}Z3\x12\x31/v3/{name=folders/*/locations/*/policyBindings/*}Z9\x12\x37/v3/{name=organizations/*/locations/*/policyBindings/*}\x12\xac\x03\n\x13UpdatePolicyBinding\x12).google.iam.v3.UpdatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xca\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\x1apolicy_binding,update_mask\x82\xd3\xe4\x93\x02\x81\x02\x32\x41/v3/{policy_binding.name=projects/*/locations/*/policyBindings/*}:\x0epolicy_bindingZR2@/v3/{policy_binding.name=folders/*/locations/*/policyBindings/*}:\x0epolicy_bindingZX2F/v3/{policy_binding.name=organizations/*/locations/*/policyBindings/*}:\x0epolicy_binding\x12\xc1\x02\n\x13\x44\x65letePolicyBinding\x12).google.iam.v3.DeletePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xdf\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa4\x01*2/v3/{name=projects/*/locations/*/policyBindings/*}Z3*1/v3/{name=folders/*/locations/*/policyBindings/*}Z9*7/v3/{name=organizations/*/locations/*/policyBindings/*}\x12\xa0\x02\n\x12ListPolicyBindings\x12(.google.iam.v3.ListPolicyBindingsRequest\x1a).google.iam.v3.ListPolicyBindingsResponse\"\xb4\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xa4\x01\x12\x32/v3/{parent=projects/*/locations/*}/policyBindingsZ3\x12\x31/v3/{parent=folders/*/locations/*}/policyBindingsZ9\x12\x37/v3/{parent=organizations/*/locations/*}/policyBindings\x12\x90\x03\n\x1aSearchTargetPolicyBindings\x12\x30.google.iam.v3.SearchTargetPolicyBindingsRequest\x1a\x31.google.iam.v3.SearchTargetPolicyBindingsResponse\"\x8c\x02\xda\x41\rparent,target\x82\xd3\xe4\x93\x02\xf5\x01\x12M/v3/{parent=projects/*/locations/*}/policyBindings:searchTargetPolicyBindingsZN\x12L/v3/{parent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindingsZT\x12R/v3/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb4\x02\n\x11\x63om.google.iam.v3B\x1aPolicyBindingsServiceProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3\xea\x41\\\n\'iam.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41J\n!iam.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3 + CreatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.CreatePolicyBindingRequest").msgclass + GetPolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.GetPolicyBindingRequest").msgclass + UpdatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.UpdatePolicyBindingRequest").msgclass + DeletePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.DeletePolicyBindingRequest").msgclass + ListPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPolicyBindingsRequest").msgclass + ListPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPolicyBindingsResponse").msgclass + SearchTargetPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchTargetPolicyBindingsRequest").msgclass + SearchTargetPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchTargetPolicyBindingsResponse").msgclass + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb new file mode 100644 index 000000000000..6883173088e3 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb @@ -0,0 +1,63 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/iam/v3/policy_bindings_service.proto for package 'google.iam.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/iam/v3/policy_bindings_service_pb' + +module Google + module Iam + module V3 + module PolicyBindings + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.iam.v3.PolicyBindings' + + # Creates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # Once the binding is created, the policy is applied to the target. + rpc :CreatePolicyBinding, ::Google::Iam::V3::CreatePolicyBindingRequest, ::Google::Longrunning::Operation + # Gets a policy binding. + rpc :GetPolicyBinding, ::Google::Iam::V3::GetPolicyBindingRequest, ::Google::Iam::V3::PolicyBinding + # Updates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on the policy and target in the + # binding to update, and the IAM permission to remove the existing policy + # from the binding. Target is immutable and cannot be updated. Once the + # binding is updated, the new policy is applied to the target. + rpc :UpdatePolicyBinding, ::Google::Iam::V3::UpdatePolicyBindingRequest, ::Google::Longrunning::Operation + # Deletes a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # Once the binding is deleted, the policy no longer applies to the target. + rpc :DeletePolicyBinding, ::Google::Iam::V3::DeletePolicyBindingRequest, ::Google::Longrunning::Operation + # Lists policy bindings. + rpc :ListPolicyBindings, ::Google::Iam::V3::ListPolicyBindingsRequest, ::Google::Iam::V3::ListPolicyBindingsResponse + # Search policy bindings by target. Returns all policy binding objects bound + # directly to target. + rpc :SearchTargetPolicyBindings, ::Google::Iam::V3::SearchTargetPolicyBindingsRequest, ::Google::Iam::V3::SearchTargetPolicyBindingsResponse + end + + Stub = Service.rpc_stub_class + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb new file mode 100644 index 000000000000..74a5371b0372 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.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/iam/v3/version" + +require "google/iam/v3/principal_access_boundary_policies/credentials" +require "google/iam/v3/principal_access_boundary_policies/paths" +require "google/iam/v3/principal_access_boundary_policies/operations" +require "google/iam/v3/principal_access_boundary_policies/client" +require "google/iam/v3/principal_access_boundary_policies/rest" + +module Google + module Iam + module V3 + ## + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/iam/v3/principal_access_boundary_policies" + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/iam/v3/principal_access_boundary_policies/rest" + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + module PrincipalAccessBoundaryPolicies + end + end + end +end + +helper_path = ::File.join __dir__, "principal_access_boundary_policies", "helpers.rb" +require "google/iam/v3/principal_access_boundary_policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb new file mode 100644 index 000000000000..39ae3de250d6 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb @@ -0,0 +1,1100 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/iam/v3/principal_access_boundary_policies_service_pb" +require "google/cloud/location" + +module Google + module Iam + module V3 + module PrincipalAccessBoundaryPolicies + ## + # Client for the PrincipalAccessBoundaryPolicies service. + # + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :principal_access_boundary_policies_stub + + ## + # Configure the PrincipalAccessBoundaryPolicies Client class. + # + # See {::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients + # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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", "Iam", "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.create_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 + default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 + default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 + default_config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3::PrincipalAccessBoundaryPolicies::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 + @principal_access_boundary_policies_stub.universe_domain + end + + ## + # Create a new PrincipalAccessBoundaryPolicies client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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/iam/v3/principal_access_boundary_policies_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 + + @principal_access_boundary_policies_stub = ::Gapic::ServiceStub.new( + ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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 + ) + + @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint + config.universe_domain = @principal_access_boundary_policies_stub.universe_domain + config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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 + @principal_access_boundary_policies_stub.logger + end + + # Service calls + + ## + # Creates a principal access boundary policy, and returns a long running + # operation. + # + # @overload create_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) + # Pass arguments to `create_principal_access_boundary_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 parent [::String] + # Required. The parent resource where this principal access boundary policy + # will be created. Only organizations are supported. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @param principal_access_boundary_policy_id [::String] + # Required. The ID to use for the principal access boundary policy, which + # will become the final component of the principal access boundary policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @param principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] + # Required. The principal access boundary policy to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the create_principal_access_boundary_policy method. + # result = client.create_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to 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_principal_access_boundary_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::Iam::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_principal_access_boundary_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :create_principal_access_boundary_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. + # + # @overload get_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_principal_access_boundary_policy(name: nil) + # Pass arguments to `get_principal_access_boundary_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 name [::String] + # Required. The name of the principal access boundary policy to retrieve. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new + # + # # Call the get_principal_access_boundary_policy method. + # result = client.get_principal_access_boundary_policy request + # + # # The returned object is of type Google::Iam::V3::PrincipalAccessBoundaryPolicy. + # p result + # + def get_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_principal_access_boundary_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::Iam::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_principal_access_boundary_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :get_principal_access_boundary_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 + + ## + # Updates a principal access boundary policy. + # + # @overload update_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_principal_access_boundary_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 principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] + # Required. The principal access boundary policy to update. + # + # The principal access boundary policy's `name` field is used to identify the + # policy to update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the update_principal_access_boundary_policy method. + # result = client.update_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to 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_principal_access_boundary_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::Iam::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.principal_access_boundary_policy&.name + header_params["principal_access_boundary_policy.name"] = request.principal_access_boundary_policy.name + end + + request_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_principal_access_boundary_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :update_principal_access_boundary_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. + # + # @overload delete_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) + # Pass arguments to `delete_principal_access_boundary_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 name [::String] + # Required. The name of the principal access boundary policy to delete. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @param etag [::String] + # Optional. The etag of the principal access boundary policy. + # If this is provided, it must match the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @param force [::Boolean] + # Optional. If set to true, the request will force the deletion of the policy + # even if the policy is referenced in policy bindings. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the delete_principal_access_boundary_policy method. + # result = client.delete_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_principal_access_boundary_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::Iam::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_principal_access_boundary_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :delete_principal_access_boundary_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policies. + # + # @overload list_principal_access_boundary_policies(request, options = nil) + # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type + # {::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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, which owns the collection of principal + # access boundary policies. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of principal access boundary policies to + # return. The service may return fewer than this value. + # + # If unspecified, at most 50 principal access boundary policies will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the + # page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new + # + # # Call the list_principal_access_boundary_policies method. + # result = client.list_principal_access_boundary_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PrincipalAccessBoundaryPolicy. + # p item + # end + # + def list_principal_access_boundary_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::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_principal_access_boundary_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :list_principal_access_boundary_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, 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 all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + # + # @overload search_principal_access_boundary_policy_bindings(request, options = nil) + # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type + # {::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the principal access boundary policy. + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call + # that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new + # + # # Call the search_principal_access_boundary_policy_bindings method. + # result = client.search_principal_access_boundary_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PolicyBinding. + # p item + # end + # + def search_principal_access_boundary_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest + + # Converts hash and nil to 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_principal_access_boundary_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::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.search_principal_access_boundary_policy_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :search_principal_access_boundary_policy_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the PrincipalAccessBoundaryPolicies API. + # + # This class represents the configuration for PrincipalAccessBoundaryPolicies, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_principal_access_boundary_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Iam::V3::PrincipalAccessBoundaryPolicies::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 = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 PrincipalAccessBoundaryPolicies API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_principal_access_boundary_policy + ## + # RPC-specific configuration for `get_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_principal_access_boundary_policy + ## + # RPC-specific configuration for `update_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_principal_access_boundary_policy + ## + # RPC-specific configuration for `delete_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_principal_access_boundary_policy + ## + # RPC-specific configuration for `list_principal_access_boundary_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_principal_access_boundary_policies + ## + # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_principal_access_boundary_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy + @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config + get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy + @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config + update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy + @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config + delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy + @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config + list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies + @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config + search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings + @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb new file mode 100644 index 000000000000..84103a366146 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.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 "googleauth" + +module Google + module Iam + module V3 + module PrincipalAccessBoundaryPolicies + # Credentials for the PrincipalAccessBoundaryPolicies 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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb new file mode 100644 index 000000000000..21ecdebb9d34 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb @@ -0,0 +1,839 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 Iam + module V3 + module PrincipalAccessBoundaryPolicies + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::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::Iam::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::Iam::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::Iam::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::Iam::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 + + 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 = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb new file mode 100644 index 000000000000..d7fbd72948b5 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.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! + + +module Google + module Iam + module V3 + module PrincipalAccessBoundaryPolicies + # Path helper methods for the PrincipalAccessBoundaryPolicies API. + module Paths + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified PrincipalAccessBoundaryPolicy resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}` + # + # @param organization [String] + # @param location [String] + # @param principal_access_boundary_policy [String] + # + # @return [::String] + def principal_access_boundary_policy_path organization:, location:, principal_access_boundary_policy: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/principalAccessBoundaryPolicies/#{principal_access_boundary_policy}" + end + + extend self + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb new file mode 100644 index 000000000000..8e3308deab2f --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/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/iam/v3/version" + +require "google/iam/v3/principal_access_boundary_policies/credentials" +require "google/iam/v3/principal_access_boundary_policies/paths" +require "google/iam/v3/principal_access_boundary_policies/rest/operations" +require "google/iam/v3/principal_access_boundary_policies/rest/client" + +module Google + module Iam + module V3 + ## + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + # + # To load this service and instantiate a REST client: + # + # require "google/iam/v3/principal_access_boundary_policies/rest" + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + module PrincipalAccessBoundaryPolicies + # Client for the REST transport + module Rest + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/iam/v3/principal_access_boundary_policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb new file mode 100644 index 000000000000..c74d51bcbd1a --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb @@ -0,0 +1,1015 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/iam/v3/principal_access_boundary_policies_service_pb" +require "google/iam/v3/principal_access_boundary_policies/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Iam + module V3 + module PrincipalAccessBoundaryPolicies + module Rest + ## + # REST client for the PrincipalAccessBoundaryPolicies service. + # + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :principal_access_boundary_policies_stub + + ## + # Configure the PrincipalAccessBoundaryPolicies Client class. + # + # See {::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients + # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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", "Iam", "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.create_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 + default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 + default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 + default_config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3::PrincipalAccessBoundaryPolicies::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 + @principal_access_boundary_policies_stub.universe_domain + end + + ## + # Create a new PrincipalAccessBoundaryPolicies REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3::PrincipalAccessBoundaryPolicies::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 + + @principal_access_boundary_policies_stub = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint + config.universe_domain = @principal_access_boundary_policies_stub.universe_domain + config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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 + @principal_access_boundary_policies_stub.logger + end + + # Service calls + + ## + # Creates a principal access boundary policy, and returns a long running + # operation. + # + # @overload create_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) + # Pass arguments to `create_principal_access_boundary_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 parent [::String] + # Required. The parent resource where this principal access boundary policy + # will be created. Only organizations are supported. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @param principal_access_boundary_policy_id [::String] + # Required. The ID to use for the principal access boundary policy, which + # will become the final component of the principal access boundary policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @param principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] + # Required. The principal access boundary policy to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the create_principal_access_boundary_policy method. + # result = client.create_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an 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_principal_access_boundary_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::Iam::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_principal_access_boundary_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.create_principal_access_boundary_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. + # + # @overload get_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_principal_access_boundary_policy(name: nil) + # Pass arguments to `get_principal_access_boundary_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 name [::String] + # Required. The name of the principal access boundary policy to retrieve. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new + # + # # Call the get_principal_access_boundary_policy method. + # result = client.get_principal_access_boundary_policy request + # + # # The returned object is of type Google::Iam::V3::PrincipalAccessBoundaryPolicy. + # p result + # + def get_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_principal_access_boundary_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::Iam::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_principal_access_boundary_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.get_principal_access_boundary_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 + + ## + # Updates a principal access boundary policy. + # + # @overload update_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_principal_access_boundary_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 principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] + # Required. The principal access boundary policy to update. + # + # The principal access boundary policy's `name` field is used to identify the + # policy to update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the update_principal_access_boundary_policy method. + # result = client.update_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an 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_principal_access_boundary_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::Iam::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_principal_access_boundary_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.update_principal_access_boundary_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. + # + # @overload delete_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) + # Pass arguments to `delete_principal_access_boundary_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 name [::String] + # Required. The name of the principal access boundary policy to delete. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @param etag [::String] + # Optional. The etag of the principal access boundary policy. + # If this is provided, it must match the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @param force [::Boolean] + # Optional. If set to true, the request will force the deletion of the policy + # even if the policy is referenced in policy bindings. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the delete_principal_access_boundary_policy method. + # result = client.delete_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_principal_access_boundary_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::Iam::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_principal_access_boundary_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.delete_principal_access_boundary_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policies. + # + # @overload list_principal_access_boundary_policies(request, options = nil) + # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type + # {::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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, which owns the collection of principal + # access boundary policies. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of principal access boundary policies to + # return. The service may return fewer than this value. + # + # If unspecified, at most 50 principal access boundary policies will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the + # page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new + # + # # Call the list_principal_access_boundary_policies method. + # result = client.list_principal_access_boundary_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PrincipalAccessBoundaryPolicy. + # p item + # end + # + def list_principal_access_boundary_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::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_principal_access_boundary_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.list_principal_access_boundary_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, "principal_access_boundary_policies", request, result, 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 all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + # + # @overload search_principal_access_boundary_policy_bindings(request, options = nil) + # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type + # {::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the principal access boundary policy. + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call + # that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new + # + # # Call the search_principal_access_boundary_policy_bindings method. + # result = client.search_principal_access_boundary_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PolicyBinding. + # p item + # end + # + def search_principal_access_boundary_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest + + # Converts hash and nil to an 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_principal_access_boundary_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::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.search_principal_access_boundary_policy_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.search_principal_access_boundary_policy_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, "policy_bindings", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the PrincipalAccessBoundaryPolicies REST API. + # + # This class represents the configuration for PrincipalAccessBoundaryPolicies 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::Iam::V3::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 PrincipalAccessBoundaryPolicies API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_principal_access_boundary_policy + ## + # RPC-specific configuration for `get_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_principal_access_boundary_policy + ## + # RPC-specific configuration for `update_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_principal_access_boundary_policy + ## + # RPC-specific configuration for `delete_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_principal_access_boundary_policy + ## + # RPC-specific configuration for `list_principal_access_boundary_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_principal_access_boundary_policies + ## + # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_principal_access_boundary_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy + @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config + get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy + @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config + update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy + @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config + delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy + @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config + list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies + @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config + search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings + @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb new file mode 100644 index 000000000000..88a187e21a3a --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb @@ -0,0 +1,937 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 Iam + module V3 + module PrincipalAccessBoundaryPolicies + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::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::Iam::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::Iam::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::Iam::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 + + ## + # 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 = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb new file mode 100644 index 000000000000..f1c525adbc3a --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb @@ -0,0 +1,447 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/v3/principal_access_boundary_policies_service_pb" + +module Google + module Iam + module V3 + module PrincipalAccessBoundaryPolicies + module Rest + ## + # REST service stub for the PrincipalAccessBoundaryPolicies 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_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_principal_access_boundary_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_principal_access_boundary_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: "create_principal_access_boundary_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3::PrincipalAccessBoundaryPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] + # A result object deserialized from the server's reply + def get_principal_access_boundary_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_principal_access_boundary_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_principal_access_boundary_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3::PrincipalAccessBoundaryPolicy.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_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_principal_access_boundary_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_principal_access_boundary_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: "update_principal_access_boundary_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_principal_access_boundary_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_principal_access_boundary_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: "delete_principal_access_boundary_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_principal_access_boundary_policies REST call + # + # @param request_pb [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3::ListPrincipalAccessBoundaryPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse] + # A result object deserialized from the server's reply + def list_principal_access_boundary_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_principal_access_boundary_policies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_principal_access_boundary_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse.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_principal_access_boundary_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse] + # A result object deserialized from the server's reply + def search_principal_access_boundary_policy_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_principal_access_boundary_policy_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "search_principal_access_boundary_policy_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest] + # 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_principal_access_boundary_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}/principalAccessBoundaryPolicies", + body: "principal_access_boundary_policy", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_principal_access_boundary_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest] + # 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_principal_access_boundary_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v3/{principal_access_boundary_policy.name}", + body: "principal_access_boundary_policy", + matches: [ + ["principal_access_boundary_policy.name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_principal_access_boundary_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_principal_access_boundary_policies REST call + # + # @param request_pb [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_principal_access_boundary_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/principalAccessBoundaryPolicies", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_principal_access_boundary_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest] + # 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_principal_access_boundary_policy_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}:searchPolicyBindings", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb new file mode 100644 index 000000000000..56f9951c56c1 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3/principal_access_boundary_policies_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/iam/v3/operation_metadata_pb' +require 'google/iam/v3/policy_binding_resources_pb' +require 'google/iam/v3/principal_access_boundary_policy_resources_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n>google/iam/v3/principal_access_boundary_policies_service.proto\x12\rgoogle.iam.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/iam/v3/operation_metadata.proto\x1a,google/iam/v3/policy_binding_resources.proto\x1a>google/iam/v3/principal_access_boundary_policy_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa1\x02\n*CreatePrincipalAccessBoundaryPolicyRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x30\n#principal_access_boundary_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12[\n principal_access_boundary_policy\x18\x03 \x01(\x0b\x32,.google.iam.v3.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"q\n\'GetPrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\"\xdb\x01\n*UpdatePrincipalAccessBoundaryPolicyRequest\x12[\n principal_access_boundary_policy\x18\x01 \x01(\x0b\x32,.google.iam.v3.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb7\x01\n*DeletePrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa7\x01\n*ListPrincipalAccessBoundaryPoliciesRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa5\x01\n+ListPrincipalAccessBoundaryPoliciesResponse\x12X\n\"principal_access_boundary_policies\x18\x01 \x03(\x0b\x32,.google.iam.v3.PrincipalAccessBoundaryPolicy\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n2SearchPrincipalAccessBoundaryPolicyBindingsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\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\"\x8a\x01\n3SearchPrincipalAccessBoundaryPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xec\x0e\n\x1fPrincipalAccessBoundaryPolicies\x12\xf7\x02\n#CreatePrincipalAccessBoundaryPolicy\x12\x39.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xf5\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41Kparent,principal_access_boundary_policy,principal_access_boundary_policy_id\x82\xd3\xe4\x93\x02l\"H/v3/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies: principal_access_boundary_policy\x12\xe1\x01\n GetPrincipalAccessBoundaryPolicy\x12\x36.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest\x1a,.google.iam.v3.PrincipalAccessBoundaryPolicy\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\xfa\x02\n#UpdatePrincipalAccessBoundaryPolicy\x12\x39.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xf8\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41,principal_access_boundary_policy,update_mask\x82\xd3\xe4\x93\x02\x8d\x01\x32i/v3/{principal_access_boundary_policy.name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}: principal_access_boundary_policy\x12\x86\x02\n#DeletePrincipalAccessBoundaryPolicy\x12\x39.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\xf7\x01\n#ListPrincipalAccessBoundaryPolicies\x12\x39.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest\x1a:.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v3/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies\x12\xa2\x02\n+SearchPrincipalAccessBoundaryPolicyBindings\x12\x41.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest\x1a\x42.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse\"l\xda\x41\x04name\x82\xd3\xe4\x93\x02_\x12]/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}:searchPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x99\x01\n\x11\x63om.google.iam.v3B+PrincipalAccessBoundaryPoliciesServiceProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3 + CreatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest").msgclass + GetPrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest").msgclass + UpdatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest").msgclass + DeletePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest").msgclass + ListPrincipalAccessBoundaryPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest").msgclass + ListPrincipalAccessBoundaryPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse").msgclass + SearchPrincipalAccessBoundaryPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest").msgclass + SearchPrincipalAccessBoundaryPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse").msgclass + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb new file mode 100644 index 000000000000..afa8d5bef116 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/iam/v3/principal_access_boundary_policies_service.proto for package 'google.iam.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/iam/v3/principal_access_boundary_policies_service_pb' + +module Google + module Iam + module V3 + module PrincipalAccessBoundaryPolicies + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.iam.v3.PrincipalAccessBoundaryPolicies' + + # Creates a principal access boundary policy, and returns a long running + # operation. + rpc :CreatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation + # Gets a principal access boundary policy. + rpc :GetPrincipalAccessBoundaryPolicy, ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, ::Google::Iam::V3::PrincipalAccessBoundaryPolicy + # Updates a principal access boundary policy. + rpc :UpdatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation + # Deletes a principal access boundary policy. + rpc :DeletePrincipalAccessBoundaryPolicy, ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation + # Lists principal access boundary policies. + rpc :ListPrincipalAccessBoundaryPolicies, ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse + # Returns all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + rpc :SearchPrincipalAccessBoundaryPolicyBindings, ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse + end + + Stub = Service.rpc_stub_class + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb new file mode 100644 index 000000000000..2a5009d8b3b2 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3/principal_access_boundary_policy_resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n>google/iam/v3/principal_access_boundary_policy_resources.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xad\x05\n\x1dPrincipalAccessBoundaryPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12W\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32=.google.iam.v3.PrincipalAccessBoundaryPolicy.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x07\x64\x65tails\x18\x08 \x01(\x0b\x32\x33.google.iam.v3.PrincipalAccessBoundaryPolicyDetailsB\x03\xe0\x41\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xec\x01\xea\x41\xe8\x01\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12torganizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}*\x1fprincipalAccessBoundaryPolicies2\x1dprincipalAccessBoundaryPolicy\"\x8e\x01\n$PrincipalAccessBoundaryPolicyDetails\x12\x44\n\x05rules\x18\x01 \x03(\x0b\x32\x30.google.iam.v3.PrincipalAccessBoundaryPolicyRuleB\x03\xe0\x41\x02\x12 \n\x13\x65nforcement_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xd0\x01\n!PrincipalAccessBoundaryPolicyRule\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tresources\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12L\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32\x37.google.iam.v3.PrincipalAccessBoundaryPolicyRule.EffectB\x03\xe0\x41\x02\"+\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x42\x99\x01\n\x11\x63om.google.iam.v3B+PrincipalAccessBoundaryPolicyResourcesProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3 + PrincipalAccessBoundaryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicy").msgclass + PrincipalAccessBoundaryPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicyDetails").msgclass + PrincipalAccessBoundaryPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicyRule").msgclass + PrincipalAccessBoundaryPolicyRule::Effect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect").enummodule + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb new file mode 100644 index 000000000000..98fc2a1c0a35 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/v3/policy_bindings/rest" +require "google/iam/v3/principal_access_boundary_policies/rest" +require "google/iam/v3/version" + +module Google + module Iam + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/iam/v3/rest" + # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new + # + module V3 + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb new file mode 100644 index 000000000000..9892bb2c28a6 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V3 + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/README.md b/owl-bot-staging/google-iam-v3/proto_docs/README.md new file mode 100644 index 000000000000..02d67f814ded --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/README.md @@ -0,0 +1,4 @@ +# Identity and Access Management (IAM) 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-iam-v3/proto_docs/google/api/client.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/api/resource.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb new file mode 100644 index 000000000000..42ec222a1f98 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.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! + + +module Google + module Iam + module V3 + # 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 + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have [Operation.error][] value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb new file mode 100644 index 000000000000..9a7a7477a7eb --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb @@ -0,0 +1,171 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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 V3 + # IAM policy binding resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the policy binding, in the format + # `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`. + # The binding parent is the closest Resource Manager resource (project, + # folder, or organization) to the binding target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @!attribute [r] uid + # @return [::String] + # Output only. The globally unique ID of the policy binding. Assigned when + # the policy binding is created. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for the policy binding. + # If this is provided on update, it must match the server's etag. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The description of the policy binding. Must be less than or equal + # to 63 characters. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined annotations. See + # https://google.aip.dev/148#annotations for more details such as format and + # size limitations + # @!attribute [rw] target + # @return [::Google::Iam::V3::PolicyBinding::Target] + # Required. Immutable. Target is the full resource name of the resource to + # which the policy will be bound. Immutable once set. + # @!attribute [rw] policy_kind + # @return [::Google::Iam::V3::PolicyBinding::PolicyKind] + # Immutable. The kind of the policy to attach in this binding. This field + # must be one of the following: + # + # - Left empty (will be automatically set to the policy kind) + # - The input policy kind + # @!attribute [rw] policy + # @return [::String] + # Required. Immutable. The resource name of the policy to be bound. The + # binding parent and policy must belong to the same organization. + # @!attribute [r] policy_uid + # @return [::String] + # Output only. The globally unique ID of the policy to be bound. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # Optional. The condition to apply to the policy binding. When set, the + # `expression` field in the `Expr` must include from 1 to 10 subexpressions, + # joined by the + # "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and + # cannot contain more than 250 characters. + # + # The condition is currently only supported when bound to policies of kind + # principal access boundary. + # + # When the bound policy is a principal access boundary policy, the only + # supported attributes in any subexpression are `principal.type` and + # `principal.subject`. An example expression is: "principal.type == + # 'iam.googleapis.com/ServiceAccount'" or "principal.subject == + # 'bob@example.com'". + # + # Allowed operations for `principal.subject`: + # + # - `principal.subject == ` + # - `principal.subject != ` + # - `principal.subject in []` + # - `principal.subject.startsWith()` + # - `principal.subject.endsWith()` + # + # Allowed operations for `principal.type`: + # + # - `principal.type == ` + # - `principal.type != ` + # - `principal.type in []` + # + # Supported principal types are Workspace, Workforce Pool, Workload Pool and + # Service Account. Allowed string must be one of: + # + # - iam.googleapis.com/WorkspaceIdentity + # - iam.googleapis.com/WorkforcePoolIdentity + # - iam.googleapis.com/WorkloadPoolIdentity + # - iam.googleapis.com/ServiceAccount + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the policy binding was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the policy binding was most recently updated. + class PolicyBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Target is the full resource name of the resource to which the policy will + # be bound. Immutable once set. + # @!attribute [rw] principal_set + # @return [::String] + # Immutable. Full Resource Name used for principal access boundary policy + # bindings. The principal set must be directly parented by the policy + # binding's parent or same as the parent if the target is a + # project/folder/organization. + # + # Examples: + # * For binding's parented by an organization: + # * Organization: + # `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` + # * Workforce Identity: + # `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID` + # * Workspace Identity: + # `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + # * For binding's parented by a folder: + # * Folder: + # `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` + # * For binding's parented by a project: + # * Project: + # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` + # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` + # * Workload Identity Pool: + # `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID` + class Target + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Different policy kinds supported in this binding. + module PolicyKind + # Unspecified policy kind; Not a valid state + POLICY_KIND_UNSPECIFIED = 0 + + # Principal access boundary policy kind + PRINCIPAL_ACCESS_BOUNDARY = 1 + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb new file mode 100644 index 000000000000..9651e5fa26b5 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb @@ -0,0 +1,232 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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 V3 + # Request message for CreatePolicyBinding method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this policy binding will be created. + # The binding parent is the closest Resource Manager resource (project, + # folder or organization) to the binding target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] policy_binding_id + # @return [::String] + # Required. The ID to use for the policy binding, which will become the final + # component of the policy binding's resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @!attribute [rw] policy_binding + # @return [::Google::Iam::V3::PolicyBinding] + # Required. The policy binding to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + class CreatePolicyBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetPolicyBinding method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the policy binding to retrieve. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + class GetPolicyBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdatePolicyBinding method. + # @!attribute [rw] policy_binding + # @return [::Google::Iam::V3::PolicyBinding] + # Required. The policy binding to update. + # + # The policy binding's `name` field is used to identify the policy binding to + # update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update + class UpdatePolicyBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeletePolicyBinding method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the policy binding to delete. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the policy binding. + # If this is provided, it must match the server's etag. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + class DeletePolicyBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListPolicyBindings method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource, which owns the collection of policy + # bindings. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListPolicyBindings` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPolicyBindings` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. Some eligible fields for filtering are: + # + # + `target` + # + `policy` + # + # Some examples of filter queries: + # + # * `target:ex*`: The binding target's name starts with "ex". + # * `target:example`: The binding target's name is `example`. + # * `policy:example`: The binding policy's name is `example`. + class ListPolicyBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListPolicyBindings method. + # @!attribute [rw] policy_bindings + # @return [::Array<::Google::Iam::V3::PolicyBinding>] + # The policy bindings from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class ListPolicyBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for SearchTargetPolicyBindings method. + # @!attribute [rw] target + # @return [::String] + # Required. The target resource, which is bound to the policy in the binding. + # + # Format: + # + # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` + # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `SearchTargetPolicyBindingsRequest` must match the call that provided the + # page token. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this search will be performed. This + # should be the nearest Resource Manager resource (project, folder, or + # organization) to the target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + class SearchTargetPolicyBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for SearchTargetPolicyBindings method. + # @!attribute [rw] policy_bindings + # @return [::Array<::Google::Iam::V3::PolicyBinding>] + # The policy bindings bound to the specified target. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class SearchTargetPolicyBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb new file mode 100644 index 000000000000..bd02495524b4 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.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 Iam + module V3 + # Request message for CreatePrincipalAccessBoundaryPolicyRequest method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this principal access boundary policy + # will be created. Only organizations are supported. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] principal_access_boundary_policy_id + # @return [::String] + # Required. The ID to use for the principal access boundary policy, which + # will become the final component of the principal access boundary policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @!attribute [rw] principal_access_boundary_policy + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] + # Required. The principal access boundary policy to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + class CreatePrincipalAccessBoundaryPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetPrincipalAccessBoundaryPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the principal access boundary policy to retrieve. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + class GetPrincipalAccessBoundaryPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdatePrincipalAccessBoundaryPolicy method. + # @!attribute [rw] principal_access_boundary_policy + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] + # Required. The principal access boundary policy to update. + # + # The principal access boundary policy's `name` field is used to identify the + # policy to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update + class UpdatePrincipalAccessBoundaryPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeletePrincipalAccessBoundaryPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the principal access boundary policy to delete. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the principal access boundary policy. + # If this is provided, it must match the server's etag. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, the request will force the deletion of the policy + # even if the policy is referenced in policy bindings. + class DeletePrincipalAccessBoundaryPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListPrincipalAccessBoundaryPolicies method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource, which owns the collection of principal + # access boundary policies. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of principal access boundary policies to + # return. The service may return fewer than this value. + # + # If unspecified, at most 50 principal access boundary policies will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the + # page token. + class ListPrincipalAccessBoundaryPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListPrincipalAccessBoundaryPolicies method. + # @!attribute [rw] principal_access_boundary_policies + # @return [::Array<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] + # The principal access boundary policies from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class ListPrincipalAccessBoundaryPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the principal access boundary policy. + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call + # that provided the page token. + class SearchPrincipalAccessBoundaryPolicyBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc. + # @!attribute [rw] policy_bindings + # @return [::Array<::Google::Iam::V3::PolicyBinding>] + # The policy bindings that reference the specified policy. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class SearchPrincipalAccessBoundaryPolicyBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb new file mode 100644 index 000000000000..40b6170b1a17 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.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 Iam + module V3 + # An IAM principal access boundary policy resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the principal access boundary policy. + # + # The following format is supported: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}` + # @!attribute [r] uid + # @return [::String] + # Output only. The globally unique ID of the principal access boundary + # policy. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for the principal access boundary. + # If this is provided on update, it must match the server's etag. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The description of the principal access boundary policy. Must be + # less than or equal to 63 characters. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined annotations. See + # https://google.aip.dev/148#annotations for more details such as format and + # size limitations + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the principal access boundary policy was + # created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the principal access boundary policy was most + # recently updated. + # @!attribute [rw] details + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicyDetails] + # Optional. The details for the principal access boundary policy. + class PrincipalAccessBoundaryPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Principal access boundary policy details + # @!attribute [rw] rules + # @return [::Array<::Google::Iam::V3::PrincipalAccessBoundaryPolicyRule>] + # Required. A list of principal access boundary policy rules. The number of + # rules in a policy is limited to 500. + # @!attribute [rw] enforcement_version + # @return [::String] + # Optional. + # The version number (for example, `1` or `latest`) that indicates which + # permissions are able to be blocked by the policy. If empty, the PAB policy + # version will be set to the most recent version number at the time of the + # policy's creation. + class PrincipalAccessBoundaryPolicyDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Principal access boundary policy rule that defines the resource boundary. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the principal access boundary policy rule. + # Must be less than or equal to 256 characters. + # @!attribute [rw] resources + # @return [::Array<::String>] + # Required. A list of Resource Manager resources. If a resource is listed in + # the rule, then the rule applies for that resource and its descendants. The + # number of resources in a policy is limited to 500 across all rules in the + # policy. + # + # The following resource types are supported: + # + # * Organizations, such as + # `//cloudresourcemanager.googleapis.com/organizations/123`. + # * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`. + # * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123` + # or `//cloudresourcemanager.googleapis.com/projects/my-project-id`. + # @!attribute [rw] effect + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicyRule::Effect] + # Required. The access relationship of principals to the resources in this + # rule. + class PrincipalAccessBoundaryPolicyRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An effect to describe the access relationship. + module Effect + # Effect unspecified. + EFFECT_UNSPECIFIED = 0 + + # Allows access to the resources in this rule. + ALLOW = 1 + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/type/expr.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/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-iam-v3/snippets/Gemfile b/owl-bot-staging/google-iam-v3/snippets/Gemfile new file mode 100644 index 000000000000..1ae54b711716 --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3", path: "../" +else + gem "google-iam-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-iam-v3/snippets/policy_bindings/create_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb new file mode 100644 index 000000000000..df4ee7219d1d --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync] +require "google/iam/v3" + +## +# Snippet for the create_policy_binding call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3::PolicyBindings::Client#create_policy_binding. +# +def create_policy_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::CreatePolicyBindingRequest.new + + # Call the create_policy_binding method. + result = client.create_policy_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb new file mode 100644 index 000000000000..55f3efffd3e3 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync] +require "google/iam/v3" + +## +# Snippet for the delete_policy_binding call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3::PolicyBindings::Client#delete_policy_binding. +# +def delete_policy_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::DeletePolicyBindingRequest.new + + # Call the delete_policy_binding method. + result = client.delete_policy_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb new file mode 100644 index 000000000000..94c0c21f6316 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PolicyBindings_GetPolicyBinding_sync] +require "google/iam/v3" + +## +# Snippet for the get_policy_binding call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3::PolicyBindings::Client#get_policy_binding. +# +def get_policy_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::GetPolicyBindingRequest.new + + # Call the get_policy_binding method. + result = client.get_policy_binding request + + # The returned object is of type Google::Iam::V3::PolicyBinding. + p result +end +# [END iam_v3_generated_PolicyBindings_GetPolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb new file mode 100644 index 000000000000..2dbb442b3771 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PolicyBindings_ListPolicyBindings_sync] +require "google/iam/v3" + +## +# Snippet for the list_policy_bindings call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3::PolicyBindings::Client#list_policy_bindings. +# +def list_policy_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::ListPolicyBindingsRequest.new + + # Call the list_policy_bindings method. + result = client.list_policy_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3::PolicyBinding. + p item + end +end +# [END iam_v3_generated_PolicyBindings_ListPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb new file mode 100644 index 000000000000..46f121f588f0 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync] +require "google/iam/v3" + +## +# Snippet for the search_target_policy_bindings call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3::PolicyBindings::Client#search_target_policy_bindings. +# +def search_target_policy_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::SearchTargetPolicyBindingsRequest.new + + # Call the search_target_policy_bindings method. + result = client.search_target_policy_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3::PolicyBinding. + p item + end +end +# [END iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb new file mode 100644 index 000000000000..10cbd400a9ef --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync] +require "google/iam/v3" + +## +# Snippet for the update_policy_binding call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3::PolicyBindings::Client#update_policy_binding. +# +def update_policy_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::UpdatePolicyBindingRequest.new + + # Call the update_policy_binding method. + result = client.update_policy_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb new file mode 100644 index 000000000000..b4700ad72f99 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.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 iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] +require "google/iam/v3" + +## +# Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy. +# +def create_principal_access_boundary_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new + + # Call the create_principal_access_boundary_policy method. + result = client.create_principal_access_boundary_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb new file mode 100644 index 000000000000..85f48ef8c04a --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.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 iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] +require "google/iam/v3" + +## +# Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy. +# +def delete_principal_access_boundary_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new + + # Call the delete_principal_access_boundary_policy method. + result = client.delete_principal_access_boundary_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb new file mode 100644 index 000000000000..ac50d60e307f --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_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 iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] +require "google/iam/v3" + +## +# Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy. +# +def get_principal_access_boundary_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new + + # Call the get_principal_access_boundary_policy method. + result = client.get_principal_access_boundary_policy request + + # The returned object is of type Google::Iam::V3::PrincipalAccessBoundaryPolicy. + p result +end +# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb new file mode 100644 index 000000000000..b3c624c9b24f --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.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 iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] +require "google/iam/v3" + +## +# Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies. +# +def list_principal_access_boundary_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new + + # Call the list_principal_access_boundary_policies method. + result = client.list_principal_access_boundary_policies request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3::PrincipalAccessBoundaryPolicy. + p item + end +end +# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb new file mode 100644 index 000000000000..7a39b0874454 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] +require "google/iam/v3" + +## +# Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings. +# +def search_principal_access_boundary_policy_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new + + # Call the search_principal_access_boundary_policy_bindings method. + result = client.search_principal_access_boundary_policy_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3::PolicyBinding. + p item + end +end +# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb new file mode 100644 index 000000000000..0b6bc521c7f0 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.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 iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] +require "google/iam/v3" + +## +# Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy. +# +def update_principal_access_boundary_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new + + # Call the update_principal_access_boundary_policy method. + result = client.update_principal_access_boundary_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json b/owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json new file mode 100644 index 000000000000..21ca8a28e3ff --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json @@ -0,0 +1,495 @@ +{ + "client_library": { + "name": "google-iam-v3", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.iam.v3", + "version": "v3" + } + ] + }, + "snippets": [ + { + "region_tag": "iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync", + "title": "Snippet for the create_policy_binding call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#create_policy_binding.", + "file": "policy_bindings/create_policy_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_policy_binding", + "full_name": "::Google::Iam::V3::PolicyBindings::Client#create_policy_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::CreatePolicyBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3::PolicyBindings::Client" + }, + "method": { + "short_name": "CreatePolicyBinding", + "full_name": "google.iam.v3.PolicyBindings.CreatePolicyBinding", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PolicyBindings_GetPolicyBinding_sync", + "title": "Snippet for the get_policy_binding call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#get_policy_binding.", + "file": "policy_bindings/get_policy_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_policy_binding", + "full_name": "::Google::Iam::V3::PolicyBindings::Client#get_policy_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::GetPolicyBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3::PolicyBinding", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3::PolicyBindings::Client" + }, + "method": { + "short_name": "GetPolicyBinding", + "full_name": "google.iam.v3.PolicyBindings.GetPolicyBinding", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync", + "title": "Snippet for the update_policy_binding call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#update_policy_binding.", + "file": "policy_bindings/update_policy_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_policy_binding", + "full_name": "::Google::Iam::V3::PolicyBindings::Client#update_policy_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::UpdatePolicyBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3::PolicyBindings::Client" + }, + "method": { + "short_name": "UpdatePolicyBinding", + "full_name": "google.iam.v3.PolicyBindings.UpdatePolicyBinding", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync", + "title": "Snippet for the delete_policy_binding call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#delete_policy_binding.", + "file": "policy_bindings/delete_policy_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_policy_binding", + "full_name": "::Google::Iam::V3::PolicyBindings::Client#delete_policy_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::DeletePolicyBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3::PolicyBindings::Client" + }, + "method": { + "short_name": "DeletePolicyBinding", + "full_name": "google.iam.v3.PolicyBindings.DeletePolicyBinding", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PolicyBindings_ListPolicyBindings_sync", + "title": "Snippet for the list_policy_bindings call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#list_policy_bindings.", + "file": "policy_bindings/list_policy_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_policy_bindings", + "full_name": "::Google::Iam::V3::PolicyBindings::Client#list_policy_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::ListPolicyBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3::ListPolicyBindingsResponse", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3::PolicyBindings::Client" + }, + "method": { + "short_name": "ListPolicyBindings", + "full_name": "google.iam.v3.PolicyBindings.ListPolicyBindings", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync", + "title": "Snippet for the search_target_policy_bindings call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#search_target_policy_bindings.", + "file": "policy_bindings/search_target_policy_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_target_policy_bindings", + "full_name": "::Google::Iam::V3::PolicyBindings::Client#search_target_policy_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::SearchTargetPolicyBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3::SearchTargetPolicyBindingsResponse", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3::PolicyBindings::Client" + }, + "method": { + "short_name": "SearchTargetPolicyBindings", + "full_name": "google.iam.v3.PolicyBindings.SearchTargetPolicyBindings", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync", + "title": "Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy.", + "file": "principal_access_boundary_policies/create_principal_access_boundary_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_principal_access_boundary_policy", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "CreatePrincipalAccessBoundaryPolicy", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.CreatePrincipalAccessBoundaryPolicy", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync", + "title": "Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy.", + "file": "principal_access_boundary_policies/get_principal_access_boundary_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_principal_access_boundary_policy", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3::PrincipalAccessBoundaryPolicy", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "GetPrincipalAccessBoundaryPolicy", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.GetPrincipalAccessBoundaryPolicy", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync", + "title": "Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy.", + "file": "principal_access_boundary_policies/update_principal_access_boundary_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_principal_access_boundary_policy", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "UpdatePrincipalAccessBoundaryPolicy", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.UpdatePrincipalAccessBoundaryPolicy", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync", + "title": "Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy.", + "file": "principal_access_boundary_policies/delete_principal_access_boundary_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_principal_access_boundary_policy", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "DeletePrincipalAccessBoundaryPolicy", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.DeletePrincipalAccessBoundaryPolicy", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync", + "title": "Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies.", + "file": "principal_access_boundary_policies/list_principal_access_boundary_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_principal_access_boundary_policies", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "ListPrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.ListPrincipalAccessBoundaryPolicies", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync", + "title": "Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings.", + "file": "principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_principal_access_boundary_policy_bindings", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "SearchPrincipalAccessBoundaryPolicyBindings", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.SearchPrincipalAccessBoundaryPolicyBindings", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" + } + } + }, + "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-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb new file mode 100644 index 000000000000..903cbd3c384b --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_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/iam/v3/policy_bindings_service_pb" +require "google/iam/v3/policy_bindings_service_services_pb" +require "google/iam/v3/policy_bindings" + +class ::Google::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb new file mode 100644 index 000000000000..e21017f180db --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_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/iam/v3/policy_bindings" + +class ::Google::Iam::V3::PolicyBindings::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_folder_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_location_path folder: "value0", location: "value1" + assert_equal "folders/value0/locations/value1", 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::Iam::V3::PolicyBindings::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_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_policy_binding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_binding_path organization: "value0", location: "value1", policy_binding: "value2" + assert_equal "organizations/value0/locations/value1/policyBindings/value2", path + + path = client.policy_binding_path folder: "value0", location: "value1", policy_binding: "value2" + assert_equal "folders/value0/locations/value1/policyBindings/value2", path + + path = client.policy_binding_path project: "value0", location: "value1", policy_binding: "value2" + assert_equal "projects/value0/locations/value1/policyBindings/value2", path + end + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb new file mode 100644 index 000000000000..3d4566853daf --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb @@ -0,0 +1,436 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/iam/v3/policy_bindings_service_pb" +require "google/iam/v3/policy_bindings/rest" + + +class ::Google::Iam::V3::PolicyBindings::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_policy_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + policy_binding_id = "hello world" + policy_binding = {} + validate_only = true + + create_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_create_policy_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_policy_binding_client_stub do + # Create client + client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_policy_binding ::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_policy_binding(::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_policy_binding_client_stub.call_count + end + end + end + + def test_get_policy_binding + # Create test objects. + client_result = ::Google::Iam::V3::PolicyBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_get_policy_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_policy_binding_client_stub do + # Create client + client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_policy_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_policy_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_policy_binding ::Google::Iam::V3::GetPolicyBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_policy_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_policy_binding(::Google::Iam::V3::GetPolicyBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_policy_binding_client_stub.call_count + end + end + end + + def test_update_policy_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + policy_binding = {} + validate_only = true + update_mask = {} + + update_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_update_policy_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_policy_binding_client_stub do + # Create client + client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_policy_binding policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_policy_binding ::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_policy_binding(::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_policy_binding_client_stub.call_count + end + end + end + + def test_delete_policy_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + + delete_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_delete_policy_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_policy_binding_client_stub do + # Create client + client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_policy_binding ::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_policy_binding(::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_policy_binding_client_stub.call_count + end + end + end + + def test_list_policy_bindings + # Create test objects. + client_result = ::Google::Iam::V3::ListPolicyBindingsResponse.new + http_response = OpenStruct.new 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_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_list_policy_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_policy_bindings_client_stub do + # Create client + client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_policy_bindings({ 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_policy_bindings 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_policy_bindings ::Google::Iam::V3::ListPolicyBindingsRequest.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_policy_bindings({ 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_policy_bindings(::Google::Iam::V3::ListPolicyBindingsRequest.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_policy_bindings_client_stub.call_count + end + end + end + + def test_search_target_policy_bindings + # Create test objects. + client_result = ::Google::Iam::V3::SearchTargetPolicyBindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + target = "hello world" + page_size = 42 + page_token = "hello world" + parent = "hello world" + + search_target_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_search_target_policy_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_target_policy_bindings_client_stub do + # Create client + client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_target_policy_bindings ::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_target_policy_bindings(::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_target_policy_bindings_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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb new file mode 100644 index 000000000000..de01adf69e95 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb @@ -0,0 +1,517 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/iam/v3/policy_bindings_service_pb" +require "google/iam/v3/policy_bindings" + +class ::Google::Iam::V3::PolicyBindings::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_policy_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + policy_binding_id = "hello world" + policy_binding = {} + validate_only = true + + create_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_policy_binding, name + assert_kind_of ::Google::Iam::V3::CreatePolicyBindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["policy_binding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PolicyBinding), request["policy_binding"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_policy_binding_client_stub do + # Create client + client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_policy_binding ::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_policy_binding(::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_policy_binding_client_stub.call_rpc_count + end + end + + def test_get_policy_binding + # Create GRPC objects. + grpc_response = ::Google::Iam::V3::PolicyBinding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_policy_binding, name + assert_kind_of ::Google::Iam::V3::GetPolicyBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_policy_binding_client_stub do + # Create client + client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_policy_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_policy_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_policy_binding ::Google::Iam::V3::GetPolicyBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_policy_binding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_policy_binding(::Google::Iam::V3::GetPolicyBindingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_policy_binding_client_stub.call_rpc_count + end + end + + def test_update_policy_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + policy_binding = {} + validate_only = true + update_mask = {} + + update_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_policy_binding, name + assert_kind_of ::Google::Iam::V3::UpdatePolicyBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PolicyBinding), request["policy_binding"] + assert_equal true, request["validate_only"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_policy_binding_client_stub do + # Create client + client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding ::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding(::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding_client_stub.call_rpc_count + end + end + + def test_delete_policy_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + + delete_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_policy_binding, name + assert_kind_of ::Google::Iam::V3::DeletePolicyBindingRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_policy_binding_client_stub do + # Create client + client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_policy_binding ::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_policy_binding(::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_policy_binding_client_stub.call_rpc_count + end + end + + def test_list_policy_bindings + # Create GRPC objects. + grpc_response = ::Google::Iam::V3::ListPolicyBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_policy_bindings, name + assert_kind_of ::Google::Iam::V3::ListPolicyBindingsRequest, 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_policy_bindings_client_stub do + # Create client + client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_policy_bindings({ 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_policy_bindings 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_policy_bindings ::Google::Iam::V3::ListPolicyBindingsRequest.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_policy_bindings({ 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_policy_bindings(::Google::Iam::V3::ListPolicyBindingsRequest.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_policy_bindings_client_stub.call_rpc_count + end + end + + def test_search_target_policy_bindings + # Create GRPC objects. + grpc_response = ::Google::Iam::V3::SearchTargetPolicyBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + target = "hello world" + page_size = 42 + page_token = "hello world" + parent = "hello world" + + search_target_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_target_policy_bindings, name + assert_kind_of ::Google::Iam::V3::SearchTargetPolicyBindingsRequest, request + assert_equal "hello world", request["target"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_target_policy_bindings_client_stub do + # Create client + client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent }) do |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_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent do |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_target_policy_bindings ::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent) do |response, operation| + 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_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent }, grpc_options) do |response, operation| + 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_target_policy_bindings(::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent), grpc_options) do |response, operation| + 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_target_policy_bindings_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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Iam::V3::PolicyBindings::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb new file mode 100644 index 000000000000..f1ffe40b1968 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_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/iam/v3/principal_access_boundary_policies_service_pb" +require "google/iam/v3/principal_access_boundary_policies_service_services_pb" +require "google/iam/v3/principal_access_boundary_policies" + +class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb new file mode 100644 index 000000000000..28fb979db795 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_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/iam/v3/principal_access_boundary_policies" + +class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_principal_access_boundary_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.principal_access_boundary_policy_path organization: "value0", location: "value1", principal_access_boundary_policy: "value2" + assert_equal "organizations/value0/locations/value1/principalAccessBoundaryPolicies/value2", path + end + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb new file mode 100644 index 000000000000..d414e3e4561c --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb @@ -0,0 +1,435 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/iam/v3/principal_access_boundary_policies_service_pb" +require "google/iam/v3/principal_access_boundary_policies/rest" + + +class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy + # Create test objects. + 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" + principal_access_boundary_policy_id = "hello world" + principal_access_boundary_policy = {} + validate_only = true + + create_principal_access_boundary_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::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_create_principal_access_boundary_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_principal_access_boundary_policy_client_stub do + # Create client + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_principal_access_boundary_policy ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_principal_access_boundary_policy(::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_principal_access_boundary_policy_client_stub.call_count + end + end + end + + def test_get_principal_access_boundary_policy + # Create test objects. + client_result = ::Google::Iam::V3::PrincipalAccessBoundaryPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_principal_access_boundary_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::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_get_principal_access_boundary_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_principal_access_boundary_policy_client_stub do + # Create client + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_principal_access_boundary_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_principal_access_boundary_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_principal_access_boundary_policy ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_principal_access_boundary_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_principal_access_boundary_policy(::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_principal_access_boundary_policy_client_stub.call_count + end + end + end + + def test_update_principal_access_boundary_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + principal_access_boundary_policy = {} + validate_only = true + update_mask = {} + + update_principal_access_boundary_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::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_update_principal_access_boundary_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_principal_access_boundary_policy_client_stub do + # Create client + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_principal_access_boundary_policy ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_principal_access_boundary_policy(::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_principal_access_boundary_policy_client_stub.call_count + end + end + end + + def test_delete_principal_access_boundary_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + force = true + + delete_principal_access_boundary_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::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_delete_principal_access_boundary_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_principal_access_boundary_policy_client_stub do + # Create client + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_principal_access_boundary_policy ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_principal_access_boundary_policy(::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_principal_access_boundary_policy_client_stub.call_count + end + end + end + + def test_list_principal_access_boundary_policies + # Create test objects. + client_result = ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse.new + http_response = OpenStruct.new 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_principal_access_boundary_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_list_principal_access_boundary_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_principal_access_boundary_policies_client_stub do + # Create client + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_principal_access_boundary_policies({ 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_principal_access_boundary_policies 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_principal_access_boundary_policies ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies({ 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_principal_access_boundary_policies(::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_count + end + end + end + + def test_search_principal_access_boundary_policy_bindings + # Create test objects. + client_result = ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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" + + search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_search_principal_access_boundary_policy_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_principal_access_boundary_policy_bindings_client_stub do + # Create client + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_principal_access_boundary_policy_bindings({ 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.search_principal_access_boundary_policy_bindings 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.search_principal_access_boundary_policy_bindings ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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.search_principal_access_boundary_policy_bindings({ 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.search_principal_access_boundary_policy_bindings(::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb new file mode 100644 index 000000000000..383ccdb82c26 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb @@ -0,0 +1,515 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/iam/v3/principal_access_boundary_policies_service_pb" +require "google/iam/v3/principal_access_boundary_policies" + +class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + principal_access_boundary_policy_id = "hello world" + principal_access_boundary_policy = {} + validate_only = true + + create_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_principal_access_boundary_policy, name + assert_kind_of ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["principal_access_boundary_policy_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_principal_access_boundary_policy_client_stub do + # Create client + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_principal_access_boundary_policy ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, grpc_options) do |response, operation| + assert_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_principal_access_boundary_policy(::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only), grpc_options) do |response, operation| + assert_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_principal_access_boundary_policy_client_stub.call_rpc_count + end + end + + def test_get_principal_access_boundary_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V3::PrincipalAccessBoundaryPolicy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_principal_access_boundary_policy, name + assert_kind_of ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_principal_access_boundary_policy_client_stub do + # Create client + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_principal_access_boundary_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_principal_access_boundary_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_principal_access_boundary_policy ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_principal_access_boundary_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_principal_access_boundary_policy(::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_principal_access_boundary_policy_client_stub.call_rpc_count + end + end + + def test_update_principal_access_boundary_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + principal_access_boundary_policy = {} + validate_only = true + update_mask = {} + + update_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_principal_access_boundary_policy, name + assert_kind_of ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] + assert_equal true, request["validate_only"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_principal_access_boundary_policy_client_stub do + # Create client + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy(::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy_client_stub.call_rpc_count + end + end + + def test_delete_principal_access_boundary_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + force = true + + delete_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_principal_access_boundary_policy, name + assert_kind_of ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_principal_access_boundary_policy_client_stub do + # Create client + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy(::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy_client_stub.call_rpc_count + end + end + + def test_list_principal_access_boundary_policies + # Create GRPC objects. + grpc_response = ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_principal_access_boundary_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_principal_access_boundary_policies, name + assert_kind_of ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, 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_principal_access_boundary_policies_client_stub do + # Create client + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_principal_access_boundary_policies({ 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_principal_access_boundary_policies 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_principal_access_boundary_policies ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies({ 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_principal_access_boundary_policies(::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_rpc_count + end + end + + def test_search_principal_access_boundary_policy_bindings + # Create GRPC objects. + grpc_response = ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + + search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_principal_access_boundary_policy_bindings, name + assert_kind_of ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, 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, search_principal_access_boundary_policy_bindings_client_stub do + # Create client + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_principal_access_boundary_policy_bindings({ 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.search_principal_access_boundary_policy_bindings 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.search_principal_access_boundary_policy_bindings ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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.search_principal_access_boundary_policy_bindings({ 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.search_principal_access_boundary_policy_bindings(::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-iam-v3/test/helper.rb b/owl-bot-staging/google-iam-v3/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-iam-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-iam-v3beta/.gitignore b/owl-bot-staging/google-iam-v3beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/.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-iam-v3beta/.repo-metadata.json b/owl-bot-staging/google-iam-v3beta/.repo-metadata.json new file mode 100644 index 000000000000..ef94dec23f48 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "iam.googleapis.com", + "api_shortname": "iam", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-iam-v3beta/latest", + "distribution_name": "google-iam-v3beta", + "is_cloud": true, + "language": "ruby", + "name": "iam", + "name_pretty": "Identity and Access Management (IAM) V3BETA API", + "product_documentation": "https://cloud.google.com/iam/docs/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3beta is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/iam/docs/overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-iam-v3beta/.rubocop.yml b/owl-bot-staging/google-iam-v3beta/.rubocop.yml new file mode 100644 index 000000000000..b142b763dfa7 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-iam-v3beta.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-iam-v3beta.rb" diff --git a/owl-bot-staging/google-iam-v3beta/.toys.rb b/owl-bot-staging/google-iam-v3beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/.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-iam-v3beta/.yardopts b/owl-bot-staging/google-iam-v3beta/.yardopts new file mode 100644 index 000000000000..10df2b7003ed --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Identity and Access Management (IAM) V3BETA 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-iam-v3beta/AUTHENTICATION.md b/owl-bot-staging/google-iam-v3beta/AUTHENTICATION.md new file mode 100644 index 000000000000..27d31ca1f47f --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-iam-v3beta 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-iam-v3beta 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/iam/v3beta" + +client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/iam/v3beta" + +::Google::Iam::V3beta::PolicyBindings::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Iam::V3beta::PolicyBindings::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-iam-v3beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/iam/v3beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Iam::V3beta::PolicyBindings::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-iam-v3beta/CHANGELOG.md b/owl-bot-staging/google-iam-v3beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-iam-v3beta/Gemfile b/owl-bot-staging/google-iam-v3beta/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/LICENSE.md b/owl-bot-staging/google-iam-v3beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/README.md b/owl-bot-staging/google-iam-v3beta/README.md new file mode 100644 index 000000000000..cba8c6d0bb77 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Identity and Access Management (IAM) V3BETA API + +Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. + +Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials 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 Identity and Access Management (IAM) V3BETA API. Most users should consider using +the main client gem, +[google-iam](https://rubygems.org/gems/google-iam). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-iam-v3beta +``` + +## 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/iam.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/iam/v3beta" + +client = ::Google::Iam::V3beta::PolicyBindings::Client.new +request = ::Google::Iam::V3beta::CreatePolicyBindingRequest.new # (request fields as keyword arguments...) +response = client.create_policy_binding request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-iam-v3beta/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/iam/docs/overview) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/iam/v3beta" +require "logger" + +client = ::Google::Iam::V3beta::PolicyBindings::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-iam`, +and lower-level _versioned_ client libraries with names such as +`google-iam-v3beta`. +_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-iam`. +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-iam-v3beta`. + +### 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-iam-v3beta/Rakefile b/owl-bot-staging/google-iam-v3beta/Rakefile new file mode 100644 index 000000000000..911338f6029f --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta 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/iam/v3beta/policy_bindings/credentials" + ::Google::Iam::V3beta::PolicyBindings::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-iam-v3beta 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-iam-v3beta 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-iam-v3beta 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-iam-v3beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-iam-v3beta" + header "google-iam-v3beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-iam-v3beta yard", "*" + Rake::Task[:yard].invoke + header "google-iam-v3beta 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-iam-v3beta 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-iam-v3beta 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-iam-v3beta/gapic_metadata.json b/owl-bot-staging/google-iam-v3beta/gapic_metadata.json new file mode 100644 index 000000000000..5aec57c62173 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/gapic_metadata.json @@ -0,0 +1,87 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.iam.v3beta", + "libraryPackage": "::Google::Iam::V3beta", + "services": { + "PolicyBindings": { + "clients": { + "grpc": { + "libraryClient": "::Google::Iam::V3beta::PolicyBindings::Client", + "rpcs": { + "CreatePolicyBinding": { + "methods": [ + "create_policy_binding" + ] + }, + "GetPolicyBinding": { + "methods": [ + "get_policy_binding" + ] + }, + "UpdatePolicyBinding": { + "methods": [ + "update_policy_binding" + ] + }, + "DeletePolicyBinding": { + "methods": [ + "delete_policy_binding" + ] + }, + "ListPolicyBindings": { + "methods": [ + "list_policy_bindings" + ] + }, + "SearchTargetPolicyBindings": { + "methods": [ + "search_target_policy_bindings" + ] + } + } + } + } + }, + "PrincipalAccessBoundaryPolicies": { + "clients": { + "grpc": { + "libraryClient": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client", + "rpcs": { + "CreatePrincipalAccessBoundaryPolicy": { + "methods": [ + "create_principal_access_boundary_policy" + ] + }, + "GetPrincipalAccessBoundaryPolicy": { + "methods": [ + "get_principal_access_boundary_policy" + ] + }, + "UpdatePrincipalAccessBoundaryPolicy": { + "methods": [ + "update_principal_access_boundary_policy" + ] + }, + "DeletePrincipalAccessBoundaryPolicy": { + "methods": [ + "delete_principal_access_boundary_policy" + ] + }, + "ListPrincipalAccessBoundaryPolicies": { + "methods": [ + "list_principal_access_boundary_policies" + ] + }, + "SearchPrincipalAccessBoundaryPolicyBindings": { + "methods": [ + "search_principal_access_boundary_policy_bindings" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec b/owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec new file mode 100644 index 000000000000..17bc1cf0bcb8 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/iam/v3beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-iam-v3beta" + gem.version = Google::Iam::V3beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3beta is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details." + gem.summary = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials 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-iam-v3beta/lib/google-iam-v3beta.rb b/owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.rb new file mode 100644 index 000000000000..462c76ed1789 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.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/iam/v3beta" diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb new file mode 100644 index 000000000000..4b1633c7c84e --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/v3beta/policy_bindings" +require "google/iam/v3beta/principal_access_boundary_policies" +require "google/iam/v3beta/version" + +module Google + module Iam + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/iam/v3beta" + # client = ::Google::Iam::V3beta::PolicyBindings::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/iam/v3beta" + # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + module V3beta + end + end +end + +helper_path = ::File.join __dir__, "v3beta", "_helpers.rb" +require "google/iam/v3beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb new file mode 100644 index 000000000000..84f3e0210548 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3beta/operation_metadata.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n*google/iam/v3beta/operation_metadata.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x42\x94\x01\n\x15\x63om.google.iam.v3betaB\x16OperationMetadataProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3beta + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.OperationMetadata").msgclass + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb new file mode 100644 index 000000000000..8062797ff505 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3beta/policy_binding_resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/expr_pb' + + +descriptor_data = "\n0google/iam/v3beta/policy_binding_resources.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xe2\x07\n\rPolicyBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12K\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x31.google.iam.v3beta.PolicyBinding.AnnotationsEntryB\x03\xe0\x41\x01\x12?\n\x06target\x18\x06 \x01(\x0b\x32\'.google.iam.v3beta.PolicyBinding.TargetB\x06\xe0\x41\x05\xe0\x41\x02\x12\x45\n\x0bpolicy_kind\x18\x0b \x01(\x0e\x32+.google.iam.v3beta.PolicyBinding.PolicyKindB\x03\xe0\x41\x05\x12\x16\n\x06policy\x18\x07 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x17\n\npolicy_uid\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12)\n\tcondition\x18\x08 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\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\x1a\x30\n\x06Target\x12\x1c\n\rprincipal_set\x18\x01 \x01(\tB\x03\xe0\x41\x05H\x00\x42\x08\n\x06target\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"H\n\nPolicyKind\x12\x1b\n\x17POLICY_KIND_UNSPECIFIED\x10\x00\x12\x1d\n\x19PRINCIPAL_ACCESS_BOUNDARY\x10\x01:\xa8\x02\xea\x41\xa4\x02\n iam.googleapis.com/PolicyBinding\x12Qorganizations/{organization}/locations/{location}/policyBindings/{policy_binding}\x12\x45\x66olders/{folder}/locations/{location}/policyBindings/{policy_binding}\x12Gprojects/{project}/locations/{location}/policyBindings/{policy_binding}*\x0epolicyBindings2\rpolicyBindingB\x99\x01\n\x15\x63om.google.iam.v3betaB\x1bPolicyBindingResourcesProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3beta + PolicyBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PolicyBinding").msgclass + PolicyBinding::Target = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PolicyBinding.Target").msgclass + PolicyBinding::PolicyKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PolicyBinding.PolicyKind").enummodule + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb new file mode 100644 index 000000000000..8c10eab801a6 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.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/iam/v3beta/version" + +require "google/iam/v3beta/policy_bindings/credentials" +require "google/iam/v3beta/policy_bindings/paths" +require "google/iam/v3beta/policy_bindings/operations" +require "google/iam/v3beta/policy_bindings/client" +require "google/iam/v3beta/policy_bindings/rest" + +module Google + module Iam + module V3beta + ## + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/iam/v3beta/policy_bindings" + # client = ::Google::Iam::V3beta::PolicyBindings::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/iam/v3beta/policy_bindings/rest" + # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + module PolicyBindings + end + end + end +end + +helper_path = ::File.join __dir__, "policy_bindings", "helpers.rb" +require "google/iam/v3beta/policy_bindings/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb new file mode 100644 index 000000000000..cbaf01af44f2 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb @@ -0,0 +1,1147 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/iam/v3beta/policy_bindings_service_pb" +require "google/cloud/location" + +module Google + module Iam + module V3beta + module PolicyBindings + ## + # Client for the PolicyBindings service. + # + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :policy_bindings_stub + + ## + # Configure the PolicyBindings Client class. + # + # See {::Google::Iam::V3beta::PolicyBindings::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PolicyBindings clients + # ::Google::Iam::V3beta::PolicyBindings::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", "Iam", "V3beta"] + 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_policy_binding.timeout = 30.0 + + default_config.rpcs.get_policy_binding.timeout = 60.0 + default_config.rpcs.get_policy_binding.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_policy_binding.timeout = 30.0 + + default_config.rpcs.delete_policy_binding.timeout = 30.0 + + default_config.rpcs.list_policy_bindings.timeout = 60.0 + default_config.rpcs.list_policy_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_target_policy_bindings.timeout = 60.0 + default_config.rpcs.search_target_policy_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PolicyBindings 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::Iam::V3beta::PolicyBindings::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 + @policy_bindings_stub.universe_domain + end + + ## + # Create a new PolicyBindings client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3beta::PolicyBindings::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PolicyBindings 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/iam/v3beta/policy_bindings_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 + + @policy_bindings_stub = ::Gapic::ServiceStub.new( + ::Google::Iam::V3beta::PolicyBindings::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 + ) + + @policy_bindings_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 = @policy_bindings_stub.endpoint + config.universe_domain = @policy_bindings_stub.universe_domain + config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3beta::PolicyBindings::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 + @policy_bindings_stub.logger + end + + # Service calls + + ## + # Creates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # Once the binding is created, the policy is applied to the target. + # + # @overload create_policy_binding(request, options = nil) + # Pass arguments to `create_policy_binding` via a request object, either of type + # {::Google::Iam::V3beta::CreatePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::CreatePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) + # Pass arguments to `create_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this policy binding will be created. + # The binding parent is the closest Resource Manager resource (project, + # folder or organization) to the binding target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param policy_binding_id [::String] + # Required. The ID to use for the policy binding, which will become the final + # component of the policy binding's resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] + # Required. The policy binding to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::CreatePolicyBindingRequest.new + # + # # Call the create_policy_binding method. + # result = client.create_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePolicyBindingRequest + + # Converts hash and nil to 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_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_policy_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :create_policy_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a policy binding. + # + # @overload get_policy_binding(request, options = nil) + # Pass arguments to `get_policy_binding` via a request object, either of type + # {::Google::Iam::V3beta::GetPolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::GetPolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_policy_binding(name: nil) + # Pass arguments to `get_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the policy binding to retrieve. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V3beta::PolicyBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V3beta::PolicyBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::GetPolicyBindingRequest.new + # + # # Call the get_policy_binding method. + # result = client.get_policy_binding request + # + # # The returned object is of type Google::Iam::V3beta::PolicyBinding. + # p result + # + def get_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :get_policy_binding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on the policy and target in the + # binding to update, and the IAM permission to remove the existing policy + # from the binding. Target is immutable and cannot be updated. Once the + # binding is updated, the new policy is applied to the target. + # + # @overload update_policy_binding(request, options = nil) + # Pass arguments to `update_policy_binding` via a request object, either of type + # {::Google::Iam::V3beta::UpdatePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::UpdatePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] + # Required. The policy binding to update. + # + # The policy binding's `name` field is used to identify the policy binding to + # update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::UpdatePolicyBindingRequest.new + # + # # Call the update_policy_binding method. + # result = client.update_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePolicyBindingRequest + + # Converts hash and nil to 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_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.policy_binding&.name + header_params["policy_binding.name"] = request.policy_binding.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :update_policy_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # Once the binding is deleted, the policy no longer applies to the target. + # + # @overload delete_policy_binding(request, options = nil) + # Pass arguments to `delete_policy_binding` via a request object, either of type + # {::Google::Iam::V3beta::DeletePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::DeletePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) + # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the policy binding to delete. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @param etag [::String] + # Optional. The etag of the policy binding. + # If this is provided, it must match the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::DeletePolicyBindingRequest.new + # + # # Call the delete_policy_binding method. + # result = client.delete_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_policy_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :delete_policy_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists policy bindings. + # + # @overload list_policy_bindings(request, options = nil) + # Pass arguments to `list_policy_bindings` via a request object, either of type + # {::Google::Iam::V3beta::ListPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::ListPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource, which owns the collection of policy + # bindings. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListPolicyBindings` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPolicyBindings` must + # match the call that provided the page token. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. Some eligible fields for filtering are: + # + # + `target` + # + `policy` + # + # Some examples of filter queries: + # + # * `target:ex*`: The binding target's name starts with "ex". + # * `target:example`: The binding target's name is `example`. + # * `policy:example`: The binding policy's name is `example`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::ListPolicyBindingsRequest.new + # + # # Call the list_policy_bindings method. + # result = client.list_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + # p item + # end + # + def list_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPolicyBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :list_policy_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Search policy bindings by target. Returns all policy binding objects bound + # directly to target. + # + # @overload search_target_policy_bindings(request, options = nil) + # Pass arguments to `search_target_policy_bindings` via a request object, either of type + # {::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil) + # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param target [::String] + # Required. The target resource, which is bound to the policy in the binding. + # + # Format: + # + # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` + # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `SearchTargetPolicyBindingsRequest` must match the call that provided the + # page token. + # @param parent [::String] + # Required. The parent resource where this search will be performed. This + # should be the nearest Resource Manager resource (project, folder, or + # organization) to the target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new + # + # # Call the search_target_policy_bindings method. + # result = client.search_target_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + # p item + # end + # + def search_target_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest + + # Converts hash and nil to 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_target_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_target_policy_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :search_target_policy_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the PolicyBindings API. + # + # This class represents the configuration for PolicyBindings, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Iam::V3beta::PolicyBindings::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_policy_binding to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3beta::PolicyBindings::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_policy_binding.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_policy_binding.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Iam::V3beta::PolicyBindings::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 = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 PolicyBindings API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_policy_binding + ## + # RPC-specific configuration for `get_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy_binding + ## + # RPC-specific configuration for `update_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy_binding + ## + # RPC-specific configuration for `delete_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_policy_binding + ## + # RPC-specific configuration for `list_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_policy_bindings + ## + # RPC-specific configuration for `search_target_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_target_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding + @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config + get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding + @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config + update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding + @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config + delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding + @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config + list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings + @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config + search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings + @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb new file mode 100644 index 000000000000..8544d9e0da3c --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.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 "googleauth" + +module Google + module Iam + module V3beta + module PolicyBindings + # Credentials for the PolicyBindings 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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb new file mode 100644 index 000000000000..48cd91a86578 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb @@ -0,0 +1,839 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 Iam + module V3beta + module PolicyBindings + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Iam::V3beta::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 = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb new file mode 100644 index 000000000000..b4c61be97d31 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb @@ -0,0 +1,140 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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 V3beta + module PolicyBindings + # Path helper methods for the PolicyBindings API. + module Paths + ## + # Create a fully-qualified FolderLocation resource string. + # + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}` + # + # @param folder [String] + # @param location [String] + # + # @return [::String] + def folder_location_path folder:, location: + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/locations/#{location}" + 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 OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified PolicyBinding resource string. + # + # @overload policy_binding_path(organization:, location:, policy_binding:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/policyBindings/{policy_binding}` + # + # @param organization [String] + # @param location [String] + # @param policy_binding [String] + # + # @overload policy_binding_path(folder:, location:, policy_binding:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/policyBindings/{policy_binding}` + # + # @param folder [String] + # @param location [String] + # @param policy_binding [String] + # + # @overload policy_binding_path(project:, location:, policy_binding:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/policyBindings/{policy_binding}` + # + # @param project [String] + # @param location [String] + # @param policy_binding [String] + # + # @return [::String] + def policy_binding_path **args + resources = { + "location:organization:policy_binding" => (proc do |organization:, location:, policy_binding:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/policyBindings/#{policy_binding}" + end), + "folder:location:policy_binding" => (proc do |folder:, location:, policy_binding:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/policyBindings/#{policy_binding}" + end), + "location:policy_binding:project" => (proc do |project:, location:, policy_binding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/policyBindings/#{policy_binding}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb new file mode 100644 index 000000000000..8d9da90d458b --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/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/iam/v3beta/version" + +require "google/iam/v3beta/policy_bindings/credentials" +require "google/iam/v3beta/policy_bindings/paths" +require "google/iam/v3beta/policy_bindings/rest/operations" +require "google/iam/v3beta/policy_bindings/rest/client" + +module Google + module Iam + module V3beta + ## + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + # + # To load this service and instantiate a REST client: + # + # require "google/iam/v3beta/policy_bindings/rest" + # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + module PolicyBindings + # Client for the REST transport + module Rest + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/iam/v3beta/policy_bindings/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb new file mode 100644 index 000000000000..25f5f29c0fe8 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb @@ -0,0 +1,1062 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/iam/v3beta/policy_bindings_service_pb" +require "google/iam/v3beta/policy_bindings/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Iam + module V3beta + module PolicyBindings + module Rest + ## + # REST client for the PolicyBindings service. + # + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :policy_bindings_stub + + ## + # Configure the PolicyBindings Client class. + # + # See {::Google::Iam::V3beta::PolicyBindings::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PolicyBindings clients + # ::Google::Iam::V3beta::PolicyBindings::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", "Iam", "V3beta"] + 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_policy_binding.timeout = 30.0 + + default_config.rpcs.get_policy_binding.timeout = 60.0 + default_config.rpcs.get_policy_binding.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_policy_binding.timeout = 30.0 + + default_config.rpcs.delete_policy_binding.timeout = 30.0 + + default_config.rpcs.list_policy_bindings.timeout = 60.0 + default_config.rpcs.list_policy_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_target_policy_bindings.timeout = 60.0 + default_config.rpcs.search_target_policy_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PolicyBindings 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::Iam::V3beta::PolicyBindings::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 + @policy_bindings_stub.universe_domain + end + + ## + # Create a new PolicyBindings REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PolicyBindings 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::Iam::V3beta::PolicyBindings::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 + + @policy_bindings_stub = ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @policy_bindings_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 = @policy_bindings_stub.endpoint + config.universe_domain = @policy_bindings_stub.universe_domain + config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3beta::PolicyBindings::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 + @policy_bindings_stub.logger + end + + # Service calls + + ## + # Creates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # Once the binding is created, the policy is applied to the target. + # + # @overload create_policy_binding(request, options = nil) + # Pass arguments to `create_policy_binding` via a request object, either of type + # {::Google::Iam::V3beta::CreatePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::CreatePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) + # Pass arguments to `create_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this policy binding will be created. + # The binding parent is the closest Resource Manager resource (project, + # folder or organization) to the binding target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param policy_binding_id [::String] + # Required. The ID to use for the policy binding, which will become the final + # component of the policy binding's resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] + # Required. The policy binding to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::CreatePolicyBindingRequest.new + # + # # Call the create_policy_binding method. + # result = client.create_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePolicyBindingRequest + + # Converts hash and nil to an 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_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_policy_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.create_policy_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a policy binding. + # + # @overload get_policy_binding(request, options = nil) + # Pass arguments to `get_policy_binding` via a request object, either of type + # {::Google::Iam::V3beta::GetPolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::GetPolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_policy_binding(name: nil) + # Pass arguments to `get_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the policy binding to retrieve. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V3beta::PolicyBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::PolicyBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::GetPolicyBindingRequest.new + # + # # Call the get_policy_binding method. + # result = client.get_policy_binding request + # + # # The returned object is of type Google::Iam::V3beta::PolicyBinding. + # p result + # + def get_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.get_policy_binding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on the policy and target in the + # binding to update, and the IAM permission to remove the existing policy + # from the binding. Target is immutable and cannot be updated. Once the + # binding is updated, the new policy is applied to the target. + # + # @overload update_policy_binding(request, options = nil) + # Pass arguments to `update_policy_binding` via a request object, either of type + # {::Google::Iam::V3beta::UpdatePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::UpdatePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] + # Required. The policy binding to update. + # + # The policy binding's `name` field is used to identify the policy binding to + # update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::UpdatePolicyBindingRequest.new + # + # # Call the update_policy_binding method. + # result = client.update_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePolicyBindingRequest + + # Converts hash and nil to an 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_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_policy_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.update_policy_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # Once the binding is deleted, the policy no longer applies to the target. + # + # @overload delete_policy_binding(request, options = nil) + # Pass arguments to `delete_policy_binding` via a request object, either of type + # {::Google::Iam::V3beta::DeletePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::DeletePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) + # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the policy binding to delete. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @param etag [::String] + # Optional. The etag of the policy binding. + # If this is provided, it must match the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::DeletePolicyBindingRequest.new + # + # # Call the delete_policy_binding method. + # result = client.delete_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_policy_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.delete_policy_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists policy bindings. + # + # @overload list_policy_bindings(request, options = nil) + # Pass arguments to `list_policy_bindings` via a request object, either of type + # {::Google::Iam::V3beta::ListPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::ListPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource, which owns the collection of policy + # bindings. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListPolicyBindings` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPolicyBindings` must + # match the call that provided the page token. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. Some eligible fields for filtering are: + # + # + `target` + # + `policy` + # + # Some examples of filter queries: + # + # * `target:ex*`: The binding target's name starts with "ex". + # * `target:example`: The binding target's name is `example`. + # * `policy:example`: The binding policy's name is `example`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::ListPolicyBindingsRequest.new + # + # # Call the list_policy_bindings method. + # result = client.list_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + # p item + # end + # + def list_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPolicyBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.list_policy_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, "policy_bindings", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Search policy bindings by target. Returns all policy binding objects bound + # directly to target. + # + # @overload search_target_policy_bindings(request, options = nil) + # Pass arguments to `search_target_policy_bindings` via a request object, either of type + # {::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil) + # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param target [::String] + # Required. The target resource, which is bound to the policy in the binding. + # + # Format: + # + # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` + # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `SearchTargetPolicyBindingsRequest` must match the call that provided the + # page token. + # @param parent [::String] + # Required. The parent resource where this search will be performed. This + # should be the nearest Resource Manager resource (project, folder, or + # organization) to the target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new + # + # # Call the search_target_policy_bindings method. + # result = client.search_target_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + # p item + # end + # + def search_target_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest + + # Converts hash and nil to an 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_target_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_target_policy_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.search_target_policy_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, "policy_bindings", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the PolicyBindings REST API. + # + # This class represents the configuration for PolicyBindings 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::Iam::V3beta::PolicyBindings::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_policy_binding to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3beta::PolicyBindings::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_policy_binding.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_policy_binding.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 PolicyBindings API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_policy_binding + ## + # RPC-specific configuration for `get_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy_binding + ## + # RPC-specific configuration for `update_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy_binding + ## + # RPC-specific configuration for `delete_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_policy_binding + ## + # RPC-specific configuration for `list_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_policy_bindings + ## + # RPC-specific configuration for `search_target_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_target_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding + @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config + get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding + @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config + update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding + @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config + delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding + @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config + list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings + @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config + search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings + @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb new file mode 100644 index 000000000000..a659cab4d859 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb @@ -0,0 +1,937 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 Iam + module V3beta + module PolicyBindings + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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: "/v3beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb new file mode 100644 index 000000000000..ce126e354617 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb @@ -0,0 +1,535 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/v3beta/policy_bindings_service_pb" + +module Google + module Iam + module V3beta + module PolicyBindings + module Rest + ## + # REST service stub for the PolicyBindings 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_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3beta::CreatePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_policy_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_policy_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_policy_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3beta::GetPolicyBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3beta::PolicyBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::PolicyBinding] + # A result object deserialized from the server's reply + def get_policy_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_policy_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3beta::PolicyBinding.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_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3beta::UpdatePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_policy_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_policy_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3beta::DeletePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_policy_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_policy_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_policy_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3beta::ListPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3beta::ListPolicyBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::ListPolicyBindingsResponse] + # A result object deserialized from the server's reply + def list_policy_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_policy_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_policy_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3beta::ListPolicyBindingsResponse.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_target_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3beta::SearchTargetPolicyBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse] + # A result object deserialized from the server's reply + def search_target_policy_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_target_policy_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "search_target_policy_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse.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_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3beta::CreatePolicyBindingRequest] + # 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_policy_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3beta/{parent}/policyBindings", + body: "policy_binding", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v3beta/{parent}/policyBindings", + body: "policy_binding", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v3beta/{parent}/policyBindings", + body: "policy_binding", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3beta::GetPolicyBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_policy_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3beta::UpdatePolicyBindingRequest] + # 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_policy_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v3beta/{policy_binding.name}", + body: "policy_binding", + matches: [ + ["policy_binding.name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v3beta/{policy_binding.name}", + body: "policy_binding", + matches: [ + ["policy_binding.name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v3beta/{policy_binding.name}", + body: "policy_binding", + matches: [ + ["policy_binding.name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3beta::DeletePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_policy_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3beta::ListPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_policy_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/policyBindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/policyBindings", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/policyBindings", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_target_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest] + # 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_target_policy_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/policyBindings:searchTargetPolicyBindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/policyBindings:searchTargetPolicyBindings", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/policyBindings:searchTargetPolicyBindings", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb new file mode 100644 index 000000000000..0398541a7af3 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3beta/policy_bindings_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/iam/v3beta/operation_metadata_pb' +require 'google/iam/v3beta/policy_binding_resources_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n/google/iam/v3beta/policy_bindings_service.proto\x12\x11google.iam.v3beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/iam/v3beta/operation_metadata.proto\x1a\x30google/iam/v3beta/policy_binding_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xd1\x01\n\x1a\x43reatePolicyBindingRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x1e\n\x11policy_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x0epolicy_binding\x18\x03 \x01(\x0b\x32 .google.iam.v3beta.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"Q\n\x17GetPolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\"\xad\x01\n\x1aUpdatePolicyBindingRequest\x12=\n\x0epolicy_binding\x18\x01 \x01(\x0b\x32 .google.iam.v3beta.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x83\x01\n\x1a\x44\x65letePolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x9b\x01\n\x19ListPolicyBindingsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x16\n\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\"u\n\x1aListPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n!SearchTargetPolicyBindingsRequest\x12\x13\n\x06target\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\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\x38\n\x06parent\x18\x05 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\"}\n\"SearchTargetPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\x8c\x12\n\x0ePolicyBindings\x12\x9c\x03\n\x13\x43reatePolicyBinding\x12-.google.iam.v3beta.CreatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\'parent,policy_binding,policy_binding_id\x82\xd3\xe4\x93\x02\xe0\x01\"6/v3beta/{parent=projects/*/locations/*}/policyBindings:\x0epolicy_bindingZG\"5/v3beta/{parent=folders/*/locations/*}/policyBindings:\x0epolicy_bindingZM\";/v3beta/{parent=organizations/*/locations/*}/policyBindings:\x0epolicy_binding\x12\xa1\x02\n\x10GetPolicyBinding\x12*.google.iam.v3beta.GetPolicyBindingRequest\x1a .google.iam.v3beta.PolicyBinding\"\xbe\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb0\x01\x12\x36/v3beta/{name=projects/*/locations/*/policyBindings/*}Z7\x12\x35/v3beta/{name=folders/*/locations/*/policyBindings/*}Z=\x12;/v3beta/{name=organizations/*/locations/*/policyBindings/*}\x12\xbc\x03\n\x13UpdatePolicyBinding\x12-.google.iam.v3beta.UpdatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xd6\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\x1apolicy_binding,update_mask\x82\xd3\xe4\x93\x02\x8d\x02\x32\x45/v3beta/{policy_binding.name=projects/*/locations/*/policyBindings/*}:\x0epolicy_bindingZV2D/v3beta/{policy_binding.name=folders/*/locations/*/policyBindings/*}:\x0epolicy_bindingZ\\2J/v3beta/{policy_binding.name=organizations/*/locations/*/policyBindings/*}:\x0epolicy_binding\x12\xd1\x02\n\x13\x44\x65letePolicyBinding\x12-.google.iam.v3beta.DeletePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xeb\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb0\x01*6/v3beta/{name=projects/*/locations/*/policyBindings/*}Z7*5/v3beta/{name=folders/*/locations/*/policyBindings/*}Z=*;/v3beta/{name=organizations/*/locations/*/policyBindings/*}\x12\xb4\x02\n\x12ListPolicyBindings\x12,.google.iam.v3beta.ListPolicyBindingsRequest\x1a-.google.iam.v3beta.ListPolicyBindingsResponse\"\xc0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb0\x01\x12\x36/v3beta/{parent=projects/*/locations/*}/policyBindingsZ7\x12\x35/v3beta/{parent=folders/*/locations/*}/policyBindingsZ=\x12;/v3beta/{parent=organizations/*/locations/*}/policyBindings\x12\xa4\x03\n\x1aSearchTargetPolicyBindings\x12\x34.google.iam.v3beta.SearchTargetPolicyBindingsRequest\x1a\x35.google.iam.v3beta.SearchTargetPolicyBindingsResponse\"\x98\x02\xda\x41\rparent,target\x82\xd3\xe4\x93\x02\x81\x02\x12Q/v3beta/{parent=projects/*/locations/*}/policyBindings:searchTargetPolicyBindingsZR\x12P/v3beta/{parent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindingsZX\x12V/v3beta/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc4\x02\n\x15\x63om.google.iam.v3betaB\x1aPolicyBindingsServiceProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3beta\xea\x41\\\n\'iam.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41J\n!iam.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3beta + CreatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.CreatePolicyBindingRequest").msgclass + GetPolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.GetPolicyBindingRequest").msgclass + UpdatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.UpdatePolicyBindingRequest").msgclass + DeletePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.DeletePolicyBindingRequest").msgclass + ListPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPolicyBindingsRequest").msgclass + ListPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPolicyBindingsResponse").msgclass + SearchTargetPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchTargetPolicyBindingsRequest").msgclass + SearchTargetPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchTargetPolicyBindingsResponse").msgclass + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb new file mode 100644 index 000000000000..4529103991f0 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb @@ -0,0 +1,63 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/iam/v3beta/policy_bindings_service.proto for package 'google.iam.v3beta' +# 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/iam/v3beta/policy_bindings_service_pb' + +module Google + module Iam + module V3beta + module PolicyBindings + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.iam.v3beta.PolicyBindings' + + # Creates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # Once the binding is created, the policy is applied to the target. + rpc :CreatePolicyBinding, ::Google::Iam::V3beta::CreatePolicyBindingRequest, ::Google::Longrunning::Operation + # Gets a policy binding. + rpc :GetPolicyBinding, ::Google::Iam::V3beta::GetPolicyBindingRequest, ::Google::Iam::V3beta::PolicyBinding + # Updates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on the policy and target in the + # binding to update, and the IAM permission to remove the existing policy + # from the binding. Target is immutable and cannot be updated. Once the + # binding is updated, the new policy is applied to the target. + rpc :UpdatePolicyBinding, ::Google::Iam::V3beta::UpdatePolicyBindingRequest, ::Google::Longrunning::Operation + # Deletes a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # Once the binding is deleted, the policy no longer applies to the target. + rpc :DeletePolicyBinding, ::Google::Iam::V3beta::DeletePolicyBindingRequest, ::Google::Longrunning::Operation + # Lists policy bindings. + rpc :ListPolicyBindings, ::Google::Iam::V3beta::ListPolicyBindingsRequest, ::Google::Iam::V3beta::ListPolicyBindingsResponse + # Search policy bindings by target. Returns all policy binding objects bound + # directly to target. + rpc :SearchTargetPolicyBindings, ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse + end + + Stub = Service.rpc_stub_class + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb new file mode 100644 index 000000000000..131df2f35581 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.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/iam/v3beta/version" + +require "google/iam/v3beta/principal_access_boundary_policies/credentials" +require "google/iam/v3beta/principal_access_boundary_policies/paths" +require "google/iam/v3beta/principal_access_boundary_policies/operations" +require "google/iam/v3beta/principal_access_boundary_policies/client" +require "google/iam/v3beta/principal_access_boundary_policies/rest" + +module Google + module Iam + module V3beta + ## + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/iam/v3beta/principal_access_boundary_policies" + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/iam/v3beta/principal_access_boundary_policies/rest" + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + module PrincipalAccessBoundaryPolicies + end + end + end +end + +helper_path = ::File.join __dir__, "principal_access_boundary_policies", "helpers.rb" +require "google/iam/v3beta/principal_access_boundary_policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb new file mode 100644 index 000000000000..57d78114a8d3 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb @@ -0,0 +1,1100 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/iam/v3beta/principal_access_boundary_policies_service_pb" +require "google/cloud/location" + +module Google + module Iam + module V3beta + module PrincipalAccessBoundaryPolicies + ## + # Client for the PrincipalAccessBoundaryPolicies service. + # + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :principal_access_boundary_policies_stub + + ## + # Configure the PrincipalAccessBoundaryPolicies Client class. + # + # See {::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients + # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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", "Iam", "V3beta"] + 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_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 + default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 + default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 + default_config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 + @principal_access_boundary_policies_stub.universe_domain + end + + ## + # Create a new PrincipalAccessBoundaryPolicies client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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/iam/v3beta/principal_access_boundary_policies_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 + + @principal_access_boundary_policies_stub = ::Gapic::ServiceStub.new( + ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 + ) + + @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint + config.universe_domain = @principal_access_boundary_policies_stub.universe_domain + config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 + @principal_access_boundary_policies_stub.logger + end + + # Service calls + + ## + # Creates a principal access boundary policy, and returns a long running + # operation. + # + # @overload create_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) + # Pass arguments to `create_principal_access_boundary_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 parent [::String] + # Required. The parent resource where this principal access boundary policy + # will be created. Only organizations are supported. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @param principal_access_boundary_policy_id [::String] + # Required. The ID to use for the principal access boundary policy, which + # will become the final component of the principal access boundary policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] + # Required. The principal access boundary policy to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the create_principal_access_boundary_policy method. + # result = client.create_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to 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_principal_access_boundary_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_principal_access_boundary_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :create_principal_access_boundary_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. + # + # @overload get_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_principal_access_boundary_policy(name: nil) + # Pass arguments to `get_principal_access_boundary_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 name [::String] + # Required. The name of the principal access boundary policy to retrieve. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new + # + # # Call the get_principal_access_boundary_policy method. + # result = client.get_principal_access_boundary_policy request + # + # # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. + # p result + # + def get_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_principal_access_boundary_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :get_principal_access_boundary_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 + + ## + # Updates a principal access boundary policy. + # + # @overload update_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_principal_access_boundary_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 principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] + # Required. The principal access boundary policy to update. + # + # The principal access boundary policy's `name` field is used to identify the + # policy to update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the update_principal_access_boundary_policy method. + # result = client.update_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to 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_principal_access_boundary_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.principal_access_boundary_policy&.name + header_params["principal_access_boundary_policy.name"] = request.principal_access_boundary_policy.name + end + + request_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_principal_access_boundary_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :update_principal_access_boundary_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. + # + # @overload delete_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) + # Pass arguments to `delete_principal_access_boundary_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 name [::String] + # Required. The name of the principal access boundary policy to delete. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @param etag [::String] + # Optional. The etag of the principal access boundary policy. + # If this is provided, it must match the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @param force [::Boolean] + # Optional. If set to true, the request will force the deletion of the policy + # even if the policy is referenced in policy bindings. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the delete_principal_access_boundary_policy method. + # result = client.delete_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_principal_access_boundary_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_principal_access_boundary_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :delete_principal_access_boundary_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policies. + # + # @overload list_principal_access_boundary_policies(request, options = nil) + # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type + # {::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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, which owns the collection of principal + # access boundary policies. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of principal access boundary policies to + # return. The service may return fewer than this value. + # + # If unspecified, at most 50 principal access boundary policies will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the + # page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new + # + # # Call the list_principal_access_boundary_policies method. + # result = client.list_principal_access_boundary_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. + # p item + # end + # + def list_principal_access_boundary_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :list_principal_access_boundary_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, 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 all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + # + # @overload search_principal_access_boundary_policy_bindings(request, options = nil) + # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type + # {::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the principal access boundary policy. + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call + # that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new + # + # # Call the search_principal_access_boundary_policy_bindings method. + # result = client.search_principal_access_boundary_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + # p item + # end + # + def search_principal_access_boundary_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest + + # Converts hash and nil to 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_principal_access_boundary_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_principal_access_boundary_policy_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :search_principal_access_boundary_policy_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the PrincipalAccessBoundaryPolicies API. + # + # This class represents the configuration for PrincipalAccessBoundaryPolicies, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_principal_access_boundary_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 PrincipalAccessBoundaryPolicies API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_principal_access_boundary_policy + ## + # RPC-specific configuration for `get_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_principal_access_boundary_policy + ## + # RPC-specific configuration for `update_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_principal_access_boundary_policy + ## + # RPC-specific configuration for `delete_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_principal_access_boundary_policy + ## + # RPC-specific configuration for `list_principal_access_boundary_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_principal_access_boundary_policies + ## + # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_principal_access_boundary_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy + @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config + get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy + @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config + update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy + @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config + delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy + @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config + list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies + @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config + search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings + @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb new file mode 100644 index 000000000000..faa2a134d021 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.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 "googleauth" + +module Google + module Iam + module V3beta + module PrincipalAccessBoundaryPolicies + # Credentials for the PrincipalAccessBoundaryPolicies 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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb new file mode 100644 index 000000000000..85069923da0c --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb @@ -0,0 +1,839 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 Iam + module V3beta + module PrincipalAccessBoundaryPolicies + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Iam::V3beta::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 = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb new file mode 100644 index 000000000000..5c221ecd1178 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.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! + + +module Google + module Iam + module V3beta + module PrincipalAccessBoundaryPolicies + # Path helper methods for the PrincipalAccessBoundaryPolicies API. + module Paths + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified PrincipalAccessBoundaryPolicy resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}` + # + # @param organization [String] + # @param location [String] + # @param principal_access_boundary_policy [String] + # + # @return [::String] + def principal_access_boundary_policy_path organization:, location:, principal_access_boundary_policy: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/principalAccessBoundaryPolicies/#{principal_access_boundary_policy}" + end + + extend self + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb new file mode 100644 index 000000000000..a46c2f64c9d5 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/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/iam/v3beta/version" + +require "google/iam/v3beta/principal_access_boundary_policies/credentials" +require "google/iam/v3beta/principal_access_boundary_policies/paths" +require "google/iam/v3beta/principal_access_boundary_policies/rest/operations" +require "google/iam/v3beta/principal_access_boundary_policies/rest/client" + +module Google + module Iam + module V3beta + ## + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + # + # To load this service and instantiate a REST client: + # + # require "google/iam/v3beta/principal_access_boundary_policies/rest" + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + module PrincipalAccessBoundaryPolicies + # Client for the REST transport + module Rest + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/iam/v3beta/principal_access_boundary_policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb new file mode 100644 index 000000000000..91e0a67c013b --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb @@ -0,0 +1,1015 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/iam/v3beta/principal_access_boundary_policies_service_pb" +require "google/iam/v3beta/principal_access_boundary_policies/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Iam + module V3beta + module PrincipalAccessBoundaryPolicies + module Rest + ## + # REST client for the PrincipalAccessBoundaryPolicies service. + # + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :principal_access_boundary_policies_stub + + ## + # Configure the PrincipalAccessBoundaryPolicies Client class. + # + # See {::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients + # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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", "Iam", "V3beta"] + 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_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 + default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 + default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 + default_config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 + @principal_access_boundary_policies_stub.universe_domain + end + + ## + # Create a new PrincipalAccessBoundaryPolicies REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 + + @principal_access_boundary_policies_stub = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint + config.universe_domain = @principal_access_boundary_policies_stub.universe_domain + config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 + @principal_access_boundary_policies_stub.logger + end + + # Service calls + + ## + # Creates a principal access boundary policy, and returns a long running + # operation. + # + # @overload create_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) + # Pass arguments to `create_principal_access_boundary_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 parent [::String] + # Required. The parent resource where this principal access boundary policy + # will be created. Only organizations are supported. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @param principal_access_boundary_policy_id [::String] + # Required. The ID to use for the principal access boundary policy, which + # will become the final component of the principal access boundary policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] + # Required. The principal access boundary policy to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the create_principal_access_boundary_policy method. + # result = client.create_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an 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_principal_access_boundary_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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.create_principal_access_boundary_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. + # + # @overload get_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_principal_access_boundary_policy(name: nil) + # Pass arguments to `get_principal_access_boundary_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 name [::String] + # Required. The name of the principal access boundary policy to retrieve. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new + # + # # Call the get_principal_access_boundary_policy method. + # result = client.get_principal_access_boundary_policy request + # + # # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. + # p result + # + def get_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_principal_access_boundary_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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.get_principal_access_boundary_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 + + ## + # Updates a principal access boundary policy. + # + # @overload update_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_principal_access_boundary_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 principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] + # Required. The principal access boundary policy to update. + # + # The principal access boundary policy's `name` field is used to identify the + # policy to update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the update_principal_access_boundary_policy method. + # result = client.update_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an 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_principal_access_boundary_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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.update_principal_access_boundary_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. + # + # @overload delete_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) + # Pass arguments to `delete_principal_access_boundary_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 name [::String] + # Required. The name of the principal access boundary policy to delete. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @param etag [::String] + # Optional. The etag of the principal access boundary policy. + # If this is provided, it must match the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @param force [::Boolean] + # Optional. If set to true, the request will force the deletion of the policy + # even if the policy is referenced in policy bindings. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the delete_principal_access_boundary_policy method. + # result = client.delete_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_principal_access_boundary_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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.delete_principal_access_boundary_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policies. + # + # @overload list_principal_access_boundary_policies(request, options = nil) + # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type + # {::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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, which owns the collection of principal + # access boundary policies. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of principal access boundary policies to + # return. The service may return fewer than this value. + # + # If unspecified, at most 50 principal access boundary policies will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the + # page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new + # + # # Call the list_principal_access_boundary_policies method. + # result = client.list_principal_access_boundary_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. + # p item + # end + # + def list_principal_access_boundary_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.list_principal_access_boundary_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, "principal_access_boundary_policies", request, result, 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 all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + # + # @overload search_principal_access_boundary_policy_bindings(request, options = nil) + # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type + # {::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the principal access boundary policy. + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call + # that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new + # + # # Call the search_principal_access_boundary_policy_bindings method. + # result = client.search_principal_access_boundary_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + # p item + # end + # + def search_principal_access_boundary_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest + + # Converts hash and nil to an 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_principal_access_boundary_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.search_principal_access_boundary_policy_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, "policy_bindings", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the PrincipalAccessBoundaryPolicies REST API. + # + # This class represents the configuration for PrincipalAccessBoundaryPolicies 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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 PrincipalAccessBoundaryPolicies API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_principal_access_boundary_policy + ## + # RPC-specific configuration for `get_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_principal_access_boundary_policy + ## + # RPC-specific configuration for `update_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_principal_access_boundary_policy + ## + # RPC-specific configuration for `delete_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_principal_access_boundary_policy + ## + # RPC-specific configuration for `list_principal_access_boundary_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_principal_access_boundary_policies + ## + # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_principal_access_boundary_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy + @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config + get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy + @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config + update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy + @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config + delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy + @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config + list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies + @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config + search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings + @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb new file mode 100644 index 000000000000..70eff442deb0 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb @@ -0,0 +1,937 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 Iam + module V3beta + module PrincipalAccessBoundaryPolicies + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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: "/v3beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb new file mode 100644 index 000000000000..e36e1d4e8f56 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb @@ -0,0 +1,447 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/v3beta/principal_access_boundary_policies_service_pb" + +module Google + module Iam + module V3beta + module PrincipalAccessBoundaryPolicies + module Rest + ## + # REST service stub for the PrincipalAccessBoundaryPolicies 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_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_principal_access_boundary_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_principal_access_boundary_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: "create_principal_access_boundary_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3beta::PrincipalAccessBoundaryPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] + # A result object deserialized from the server's reply + def get_principal_access_boundary_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_principal_access_boundary_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_principal_access_boundary_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.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_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_principal_access_boundary_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_principal_access_boundary_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: "update_principal_access_boundary_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_principal_access_boundary_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_principal_access_boundary_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: "delete_principal_access_boundary_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_principal_access_boundary_policies REST call + # + # @param request_pb [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3beta::ListPrincipalAccessBoundaryPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse] + # A result object deserialized from the server's reply + def list_principal_access_boundary_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_principal_access_boundary_policies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_principal_access_boundary_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse.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_principal_access_boundary_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse] + # A result object deserialized from the server's reply + def search_principal_access_boundary_policy_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_principal_access_boundary_policy_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "search_principal_access_boundary_policy_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest] + # 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_principal_access_boundary_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3beta/{parent}/principalAccessBoundaryPolicies", + body: "principal_access_boundary_policy", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_principal_access_boundary_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest] + # 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_principal_access_boundary_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v3beta/{principal_access_boundary_policy.name}", + body: "principal_access_boundary_policy", + matches: [ + ["principal_access_boundary_policy.name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_principal_access_boundary_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_principal_access_boundary_policies REST call + # + # @param request_pb [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_principal_access_boundary_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/principalAccessBoundaryPolicies", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_principal_access_boundary_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest] + # 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_principal_access_boundary_policy_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}:searchPolicyBindings", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb new file mode 100644 index 000000000000..ee829930af81 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3beta/principal_access_boundary_policies_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/iam/v3beta/operation_metadata_pb' +require 'google/iam/v3beta/policy_binding_resources_pb' +require 'google/iam/v3beta/principal_access_boundary_policy_resources_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nBgoogle/iam/v3beta/principal_access_boundary_policies_service.proto\x12\x11google.iam.v3beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/iam/v3beta/operation_metadata.proto\x1a\x30google/iam/v3beta/policy_binding_resources.proto\x1a\x42google/iam/v3beta/principal_access_boundary_policy_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa5\x02\n*CreatePrincipalAccessBoundaryPolicyRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x30\n#principal_access_boundary_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12_\n principal_access_boundary_policy\x18\x03 \x01(\x0b\x32\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"q\n\'GetPrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\"\xdf\x01\n*UpdatePrincipalAccessBoundaryPolicyRequest\x12_\n principal_access_boundary_policy\x18\x01 \x01(\x0b\x32\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb7\x01\n*DeletePrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa7\x01\n*ListPrincipalAccessBoundaryPoliciesRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa9\x01\n+ListPrincipalAccessBoundaryPoliciesResponse\x12\\\n\"principal_access_boundary_policies\x18\x01 \x03(\x0b\x32\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicy\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n2SearchPrincipalAccessBoundaryPolicyBindingsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\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\"\x8e\x01\n3SearchPrincipalAccessBoundaryPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xa8\x0f\n\x1fPrincipalAccessBoundaryPolicies\x12\xff\x02\n#CreatePrincipalAccessBoundaryPolicy\x12=.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xf9\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41Kparent,principal_access_boundary_policy,principal_access_boundary_policy_id\x82\xd3\xe4\x93\x02p\"L/v3beta/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies: principal_access_boundary_policy\x12\xed\x01\n GetPrincipalAccessBoundaryPolicy\x12:.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest\x1a\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicy\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\x12L/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\x82\x03\n#UpdatePrincipalAccessBoundaryPolicy\x12=.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xfc\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41,principal_access_boundary_policy,update_mask\x82\xd3\xe4\x93\x02\x91\x01\x32m/v3beta/{principal_access_boundary_policy.name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}: principal_access_boundary_policy\x12\x8e\x02\n#DeletePrincipalAccessBoundaryPolicy\x12=.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02N*L/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\x83\x02\n#ListPrincipalAccessBoundaryPolicies\x12=.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest\x1a>.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/v3beta/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies\x12\xae\x02\n+SearchPrincipalAccessBoundaryPolicyBindings\x12\x45.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest\x1a\x46.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse\"p\xda\x41\x04name\x82\xd3\xe4\x93\x02\x63\x12\x61/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}:searchPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa9\x01\n\x15\x63om.google.iam.v3betaB+PrincipalAccessBoundaryPoliciesServiceProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3beta + CreatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest").msgclass + GetPrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest").msgclass + UpdatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest").msgclass + DeletePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest").msgclass + ListPrincipalAccessBoundaryPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest").msgclass + ListPrincipalAccessBoundaryPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse").msgclass + SearchPrincipalAccessBoundaryPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest").msgclass + SearchPrincipalAccessBoundaryPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse").msgclass + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb new file mode 100644 index 000000000000..0ee7d8797ccf --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/iam/v3beta/principal_access_boundary_policies_service.proto for package 'google.iam.v3beta' +# 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/iam/v3beta/principal_access_boundary_policies_service_pb' + +module Google + module Iam + module V3beta + module PrincipalAccessBoundaryPolicies + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.iam.v3beta.PrincipalAccessBoundaryPolicies' + + # Creates a principal access boundary policy, and returns a long running + # operation. + rpc :CreatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation + # Gets a principal access boundary policy. + rpc :GetPrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy + # Updates a principal access boundary policy. + rpc :UpdatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation + # Deletes a principal access boundary policy. + rpc :DeletePrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation + # Lists principal access boundary policies. + rpc :ListPrincipalAccessBoundaryPolicies, ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse + # Returns all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + rpc :SearchPrincipalAccessBoundaryPolicyBindings, ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse + end + + Stub = Service.rpc_stub_class + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb new file mode 100644 index 000000000000..aeddd8701494 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3beta/principal_access_boundary_policy_resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nBgoogle/iam/v3beta/principal_access_boundary_policy_resources.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb5\x05\n\x1dPrincipalAccessBoundaryPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12[\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x41.google.iam.v3beta.PrincipalAccessBoundaryPolicy.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x07\x64\x65tails\x18\x08 \x01(\x0b\x32\x37.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsB\x03\xe0\x41\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xec\x01\xea\x41\xe8\x01\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12torganizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}*\x1fprincipalAccessBoundaryPolicies2\x1dprincipalAccessBoundaryPolicy\"\x92\x01\n$PrincipalAccessBoundaryPolicyDetails\x12H\n\x05rules\x18\x01 \x03(\x0b\x32\x34.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleB\x03\xe0\x41\x02\x12 \n\x13\x65nforcement_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xd4\x01\n!PrincipalAccessBoundaryPolicyRule\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tresources\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12P\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32;.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.EffectB\x03\xe0\x41\x02\"+\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x42\xa9\x01\n\x15\x63om.google.iam.v3betaB+PrincipalAccessBoundaryPolicyResourcesProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3beta + PrincipalAccessBoundaryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicy").msgclass + PrincipalAccessBoundaryPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails").msgclass + PrincipalAccessBoundaryPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicyRule").msgclass + PrincipalAccessBoundaryPolicyRule::Effect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect").enummodule + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb new file mode 100644 index 000000000000..7dd507355dde --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/v3beta/policy_bindings/rest" +require "google/iam/v3beta/principal_access_boundary_policies/rest" +require "google/iam/v3beta/version" + +module Google + module Iam + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/iam/v3beta/rest" + # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + module V3beta + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb new file mode 100644 index 000000000000..738981bb3f21 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V3beta + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/README.md b/owl-bot-staging/google-iam-v3beta/proto_docs/README.md new file mode 100644 index 000000000000..536b687b8e98 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Identity and Access Management (IAM) V3BETA 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-iam-v3beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb new file mode 100644 index 000000000000..4e4463d9171f --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.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! + + +module Google + module Iam + module V3beta + # 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 + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have [Operation.error][] value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb new file mode 100644 index 000000000000..8cf546427830 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb @@ -0,0 +1,171 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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 V3beta + # IAM policy binding resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the policy binding, in the format + # `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`. + # The binding parent is the closest Resource Manager resource (project, + # folder, or organization) to the binding target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @!attribute [r] uid + # @return [::String] + # Output only. The globally unique ID of the policy binding. Assigned when + # the policy binding is created. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for the policy binding. + # If this is provided on update, it must match the server's etag. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The description of the policy binding. Must be less than or equal + # to 63 characters. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined annotations. See + # https://google.aip.dev/148#annotations for more details such as format and + # size limitations + # @!attribute [rw] target + # @return [::Google::Iam::V3beta::PolicyBinding::Target] + # Required. Immutable. Target is the full resource name of the resource to + # which the policy will be bound. Immutable once set. + # @!attribute [rw] policy_kind + # @return [::Google::Iam::V3beta::PolicyBinding::PolicyKind] + # Immutable. The kind of the policy to attach in this binding. This field + # must be one of the following: + # + # - Left empty (will be automatically set to the policy kind) + # - The input policy kind + # @!attribute [rw] policy + # @return [::String] + # Required. Immutable. The resource name of the policy to be bound. The + # binding parent and policy must belong to the same organization. + # @!attribute [r] policy_uid + # @return [::String] + # Output only. The globally unique ID of the policy to be bound. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # Optional. The condition to apply to the policy binding. When set, the + # `expression` field in the `Expr` must include from 1 to 10 subexpressions, + # joined by the + # "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and + # cannot contain more than 250 characters. + # + # The condition is currently only supported when bound to policies of kind + # principal access boundary. + # + # When the bound policy is a principal access boundary policy, the only + # supported attributes in any subexpression are `principal.type` and + # `principal.subject`. An example expression is: "principal.type == + # 'iam.googleapis.com/ServiceAccount'" or "principal.subject == + # 'bob@example.com'". + # + # Allowed operations for `principal.subject`: + # + # - `principal.subject == ` + # - `principal.subject != ` + # - `principal.subject in []` + # - `principal.subject.startsWith()` + # - `principal.subject.endsWith()` + # + # Allowed operations for `principal.type`: + # + # - `principal.type == ` + # - `principal.type != ` + # - `principal.type in []` + # + # Supported principal types are Workspace, Workforce Pool, Workload Pool and + # Service Account. Allowed string must be one of: + # + # - iam.googleapis.com/WorkspaceIdentity + # - iam.googleapis.com/WorkforcePoolIdentity + # - iam.googleapis.com/WorkloadPoolIdentity + # - iam.googleapis.com/ServiceAccount + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the policy binding was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the policy binding was most recently updated. + class PolicyBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Target is the full resource name of the resource to which the policy will + # be bound. Immutable once set. + # @!attribute [rw] principal_set + # @return [::String] + # Immutable. Full Resource Name used for principal access boundary policy + # bindings. The principal set must be directly parented by the policy + # binding's parent or same as the parent if the target is a + # project/folder/organization. + # + # Examples: + # * For binding's parented by an organization: + # * Organization: + # `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` + # * Workforce Identity: + # `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID` + # * Workspace Identity: + # `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + # * For binding's parented by a folder: + # * Folder: + # `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` + # * For binding's parented by a project: + # * Project: + # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` + # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` + # * Workload Identity Pool: + # `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID` + class Target + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Different policy kinds supported in this binding. + module PolicyKind + # Unspecified policy kind; Not a valid state + POLICY_KIND_UNSPECIFIED = 0 + + # Principal access boundary policy kind + PRINCIPAL_ACCESS_BOUNDARY = 1 + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb new file mode 100644 index 000000000000..cb39df203048 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb @@ -0,0 +1,232 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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 V3beta + # Request message for CreatePolicyBinding method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this policy binding will be created. + # The binding parent is the closest Resource Manager resource (project, + # folder or organization) to the binding target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] policy_binding_id + # @return [::String] + # Required. The ID to use for the policy binding, which will become the final + # component of the policy binding's resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @!attribute [rw] policy_binding + # @return [::Google::Iam::V3beta::PolicyBinding] + # Required. The policy binding to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + class CreatePolicyBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetPolicyBinding method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the policy binding to retrieve. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + class GetPolicyBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdatePolicyBinding method. + # @!attribute [rw] policy_binding + # @return [::Google::Iam::V3beta::PolicyBinding] + # Required. The policy binding to update. + # + # The policy binding's `name` field is used to identify the policy binding to + # update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update + class UpdatePolicyBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeletePolicyBinding method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the policy binding to delete. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the policy binding. + # If this is provided, it must match the server's etag. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + class DeletePolicyBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListPolicyBindings method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource, which owns the collection of policy + # bindings. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListPolicyBindings` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPolicyBindings` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. Some eligible fields for filtering are: + # + # + `target` + # + `policy` + # + # Some examples of filter queries: + # + # * `target:ex*`: The binding target's name starts with "ex". + # * `target:example`: The binding target's name is `example`. + # * `policy:example`: The binding policy's name is `example`. + class ListPolicyBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListPolicyBindings method. + # @!attribute [rw] policy_bindings + # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] + # The policy bindings from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class ListPolicyBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for SearchTargetPolicyBindings method. + # @!attribute [rw] target + # @return [::String] + # Required. The target resource, which is bound to the policy in the binding. + # + # Format: + # + # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` + # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `SearchTargetPolicyBindingsRequest` must match the call that provided the + # page token. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this search will be performed. This + # should be the nearest Resource Manager resource (project, folder, or + # organization) to the target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + class SearchTargetPolicyBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for SearchTargetPolicyBindings method. + # @!attribute [rw] policy_bindings + # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] + # The policy bindings bound to the specified target. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class SearchTargetPolicyBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb new file mode 100644 index 000000000000..565de307d98b --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.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 Iam + module V3beta + # Request message for CreatePrincipalAccessBoundaryPolicyRequest method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this principal access boundary policy + # will be created. Only organizations are supported. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] principal_access_boundary_policy_id + # @return [::String] + # Required. The ID to use for the principal access boundary policy, which + # will become the final component of the principal access boundary policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @!attribute [rw] principal_access_boundary_policy + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] + # Required. The principal access boundary policy to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + class CreatePrincipalAccessBoundaryPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetPrincipalAccessBoundaryPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the principal access boundary policy to retrieve. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + class GetPrincipalAccessBoundaryPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdatePrincipalAccessBoundaryPolicy method. + # @!attribute [rw] principal_access_boundary_policy + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] + # Required. The principal access boundary policy to update. + # + # The principal access boundary policy's `name` field is used to identify the + # policy to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update + class UpdatePrincipalAccessBoundaryPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeletePrincipalAccessBoundaryPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the principal access boundary policy to delete. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the principal access boundary policy. + # If this is provided, it must match the server's etag. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, the request will force the deletion of the policy + # even if the policy is referenced in policy bindings. + class DeletePrincipalAccessBoundaryPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListPrincipalAccessBoundaryPolicies method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource, which owns the collection of principal + # access boundary policies. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of principal access boundary policies to + # return. The service may return fewer than this value. + # + # If unspecified, at most 50 principal access boundary policies will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the + # page token. + class ListPrincipalAccessBoundaryPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListPrincipalAccessBoundaryPolicies method. + # @!attribute [rw] principal_access_boundary_policies + # @return [::Array<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] + # The principal access boundary policies from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class ListPrincipalAccessBoundaryPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the principal access boundary policy. + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call + # that provided the page token. + class SearchPrincipalAccessBoundaryPolicyBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc. + # @!attribute [rw] policy_bindings + # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] + # The policy bindings that reference the specified policy. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class SearchPrincipalAccessBoundaryPolicyBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb new file mode 100644 index 000000000000..a01db22285ba --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.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 Iam + module V3beta + # An IAM principal access boundary policy resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the principal access boundary policy. + # + # The following format is supported: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}` + # @!attribute [r] uid + # @return [::String] + # Output only. The globally unique ID of the principal access boundary + # policy. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for the principal access boundary. + # If this is provided on update, it must match the server's etag. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The description of the principal access boundary policy. Must be + # less than or equal to 63 characters. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined annotations. See + # https://google.aip.dev/148#annotations for more details such as format and + # size limitations + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the principal access boundary policy was + # created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the principal access boundary policy was most + # recently updated. + # @!attribute [rw] details + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicyDetails] + # Optional. The details for the principal access boundary policy. + class PrincipalAccessBoundaryPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Principal access boundary policy details + # @!attribute [rw] rules + # @return [::Array<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicyRule>] + # Required. A list of principal access boundary policy rules. The number of + # rules in a policy is limited to 500. + # @!attribute [rw] enforcement_version + # @return [::String] + # Optional. + # The version number (for example, `1` or `latest`) that indicates which + # permissions are able to be blocked by the policy. If empty, the PAB policy + # version will be set to the most recent version number at the time of the + # policy's creation. + class PrincipalAccessBoundaryPolicyDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Principal access boundary policy rule that defines the resource boundary. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the principal access boundary policy rule. + # Must be less than or equal to 256 characters. + # @!attribute [rw] resources + # @return [::Array<::String>] + # Required. A list of Resource Manager resources. If a resource is listed in + # the rule, then the rule applies for that resource and its descendants. The + # number of resources in a policy is limited to 500 across all rules in the + # policy. + # + # The following resource types are supported: + # + # * Organizations, such as + # `//cloudresourcemanager.googleapis.com/organizations/123`. + # * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`. + # * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123` + # or `//cloudresourcemanager.googleapis.com/projects/my-project-id`. + # @!attribute [rw] effect + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicyRule::Effect] + # Required. The access relationship of principals to the resources in this + # rule. + class PrincipalAccessBoundaryPolicyRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An effect to describe the access relationship. + module Effect + # Effect unspecified. + EFFECT_UNSPECIFIED = 0 + + # Allows access to the resources in this rule. + ALLOW = 1 + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/type/expr.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/snippets/Gemfile b/owl-bot-staging/google-iam-v3beta/snippets/Gemfile new file mode 100644 index 000000000000..c2385cbb7f70 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta", path: "../" +else + gem "google-iam-v3beta" +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-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb new file mode 100644 index 000000000000..71d915589110 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync] +require "google/iam/v3beta" + +## +# Snippet for the create_policy_binding call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3beta::PolicyBindings::Client#create_policy_binding. +# +def create_policy_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::CreatePolicyBindingRequest.new + + # Call the create_policy_binding method. + result = client.create_policy_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb new file mode 100644 index 000000000000..71f4b669183c --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync] +require "google/iam/v3beta" + +## +# Snippet for the delete_policy_binding call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3beta::PolicyBindings::Client#delete_policy_binding. +# +def delete_policy_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::DeletePolicyBindingRequest.new + + # Call the delete_policy_binding method. + result = client.delete_policy_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb new file mode 100644 index 000000000000..95a37b3bd52d --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync] +require "google/iam/v3beta" + +## +# Snippet for the get_policy_binding call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3beta::PolicyBindings::Client#get_policy_binding. +# +def get_policy_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::GetPolicyBindingRequest.new + + # Call the get_policy_binding method. + result = client.get_policy_binding request + + # The returned object is of type Google::Iam::V3beta::PolicyBinding. + p result +end +# [END iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb new file mode 100644 index 000000000000..0f7e29a87412 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync] +require "google/iam/v3beta" + +## +# Snippet for the list_policy_bindings call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3beta::PolicyBindings::Client#list_policy_bindings. +# +def list_policy_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::ListPolicyBindingsRequest.new + + # Call the list_policy_bindings method. + result = client.list_policy_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + p item + end +end +# [END iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb new file mode 100644 index 000000000000..f27b0677d25b --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync] +require "google/iam/v3beta" + +## +# Snippet for the search_target_policy_bindings call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3beta::PolicyBindings::Client#search_target_policy_bindings. +# +def search_target_policy_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new + + # Call the search_target_policy_bindings method. + result = client.search_target_policy_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + p item + end +end +# [END iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb new file mode 100644 index 000000000000..135862214560 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync] +require "google/iam/v3beta" + +## +# Snippet for the update_policy_binding call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3beta::PolicyBindings::Client#update_policy_binding. +# +def update_policy_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::UpdatePolicyBindingRequest.new + + # Call the update_policy_binding method. + result = client.update_policy_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb new file mode 100644 index 000000000000..5adbcf4dcc27 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.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 iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] +require "google/iam/v3beta" + +## +# Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy. +# +def create_principal_access_boundary_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new + + # Call the create_principal_access_boundary_policy method. + result = client.create_principal_access_boundary_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb new file mode 100644 index 000000000000..80a3f6830daa --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.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 iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] +require "google/iam/v3beta" + +## +# Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy. +# +def delete_principal_access_boundary_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new + + # Call the delete_principal_access_boundary_policy method. + result = client.delete_principal_access_boundary_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb new file mode 100644 index 000000000000..a6c6b2d32724 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_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 iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] +require "google/iam/v3beta" + +## +# Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy. +# +def get_principal_access_boundary_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new + + # Call the get_principal_access_boundary_policy method. + result = client.get_principal_access_boundary_policy request + + # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. + p result +end +# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb new file mode 100644 index 000000000000..6d15a7805873 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.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 iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] +require "google/iam/v3beta" + +## +# Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies. +# +def list_principal_access_boundary_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new + + # Call the list_principal_access_boundary_policies method. + result = client.list_principal_access_boundary_policies request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. + p item + end +end +# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb new file mode 100644 index 000000000000..f55151327579 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] +require "google/iam/v3beta" + +## +# Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings. +# +def search_principal_access_boundary_policy_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new + + # Call the search_principal_access_boundary_policy_bindings method. + result = client.search_principal_access_boundary_policy_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + p item + end +end +# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb new file mode 100644 index 000000000000..821e090ddea2 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.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 iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] +require "google/iam/v3beta" + +## +# Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy. +# +def update_principal_access_boundary_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new + + # Call the update_principal_access_boundary_policy method. + result = client.update_principal_access_boundary_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json b/owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json new file mode 100644 index 000000000000..5a961802393a --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json @@ -0,0 +1,495 @@ +{ + "client_library": { + "name": "google-iam-v3beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.iam.v3beta", + "version": "v3beta" + } + ] + }, + "snippets": [ + { + "region_tag": "iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync", + "title": "Snippet for the create_policy_binding call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#create_policy_binding.", + "file": "policy_bindings/create_policy_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_policy_binding", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#create_policy_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::CreatePolicyBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" + }, + "method": { + "short_name": "CreatePolicyBinding", + "full_name": "google.iam.v3beta.PolicyBindings.CreatePolicyBinding", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3beta.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync", + "title": "Snippet for the get_policy_binding call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#get_policy_binding.", + "file": "policy_bindings/get_policy_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_policy_binding", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#get_policy_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::GetPolicyBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3beta::PolicyBinding", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" + }, + "method": { + "short_name": "GetPolicyBinding", + "full_name": "google.iam.v3beta.PolicyBindings.GetPolicyBinding", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3beta.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync", + "title": "Snippet for the update_policy_binding call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#update_policy_binding.", + "file": "policy_bindings/update_policy_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_policy_binding", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#update_policy_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::UpdatePolicyBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" + }, + "method": { + "short_name": "UpdatePolicyBinding", + "full_name": "google.iam.v3beta.PolicyBindings.UpdatePolicyBinding", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3beta.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync", + "title": "Snippet for the delete_policy_binding call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#delete_policy_binding.", + "file": "policy_bindings/delete_policy_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_policy_binding", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#delete_policy_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::DeletePolicyBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" + }, + "method": { + "short_name": "DeletePolicyBinding", + "full_name": "google.iam.v3beta.PolicyBindings.DeletePolicyBinding", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3beta.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync", + "title": "Snippet for the list_policy_bindings call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#list_policy_bindings.", + "file": "policy_bindings/list_policy_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_policy_bindings", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#list_policy_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::ListPolicyBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3beta::ListPolicyBindingsResponse", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" + }, + "method": { + "short_name": "ListPolicyBindings", + "full_name": "google.iam.v3beta.PolicyBindings.ListPolicyBindings", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3beta.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync", + "title": "Snippet for the search_target_policy_bindings call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#search_target_policy_bindings.", + "file": "policy_bindings/search_target_policy_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_target_policy_bindings", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#search_target_policy_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" + }, + "method": { + "short_name": "SearchTargetPolicyBindings", + "full_name": "google.iam.v3beta.PolicyBindings.SearchTargetPolicyBindings", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3beta.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync", + "title": "Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy.", + "file": "principal_access_boundary_policies/create_principal_access_boundary_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_principal_access_boundary_policy", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "CreatePrincipalAccessBoundaryPolicy", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.CreatePrincipalAccessBoundaryPolicy", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync", + "title": "Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy.", + "file": "principal_access_boundary_policies/get_principal_access_boundary_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_principal_access_boundary_policy", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "GetPrincipalAccessBoundaryPolicy", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.GetPrincipalAccessBoundaryPolicy", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync", + "title": "Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy.", + "file": "principal_access_boundary_policies/update_principal_access_boundary_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_principal_access_boundary_policy", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "UpdatePrincipalAccessBoundaryPolicy", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.UpdatePrincipalAccessBoundaryPolicy", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync", + "title": "Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy.", + "file": "principal_access_boundary_policies/delete_principal_access_boundary_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_principal_access_boundary_policy", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "DeletePrincipalAccessBoundaryPolicy", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.DeletePrincipalAccessBoundaryPolicy", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync", + "title": "Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies.", + "file": "principal_access_boundary_policies/list_principal_access_boundary_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_principal_access_boundary_policies", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "ListPrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.ListPrincipalAccessBoundaryPolicies", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync", + "title": "Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings.", + "file": "principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_principal_access_boundary_policy_bindings", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "SearchPrincipalAccessBoundaryPolicyBindings", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.SearchPrincipalAccessBoundaryPolicyBindings", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" + } + } + }, + "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-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb new file mode 100644 index 000000000000..511734647747 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_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/iam/v3beta/policy_bindings_service_pb" +require "google/iam/v3beta/policy_bindings_service_services_pb" +require "google/iam/v3beta/policy_bindings" + +class ::Google::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb new file mode 100644 index 000000000000..25795739b50c --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_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/iam/v3beta/policy_bindings" + +class ::Google::Iam::V3beta::PolicyBindings::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_folder_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_location_path folder: "value0", location: "value1" + assert_equal "folders/value0/locations/value1", 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::Iam::V3beta::PolicyBindings::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_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_policy_binding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_binding_path organization: "value0", location: "value1", policy_binding: "value2" + assert_equal "organizations/value0/locations/value1/policyBindings/value2", path + + path = client.policy_binding_path folder: "value0", location: "value1", policy_binding: "value2" + assert_equal "folders/value0/locations/value1/policyBindings/value2", path + + path = client.policy_binding_path project: "value0", location: "value1", policy_binding: "value2" + assert_equal "projects/value0/locations/value1/policyBindings/value2", path + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb new file mode 100644 index 000000000000..0caba8b8c86e --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb @@ -0,0 +1,436 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/iam/v3beta/policy_bindings_service_pb" +require "google/iam/v3beta/policy_bindings/rest" + + +class ::Google::Iam::V3beta::PolicyBindings::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_policy_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + policy_binding_id = "hello world" + policy_binding = {} + validate_only = true + + create_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_create_policy_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_policy_binding_client_stub do + # Create client + client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_policy_binding ::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_policy_binding(::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_policy_binding_client_stub.call_count + end + end + end + + def test_get_policy_binding + # Create test objects. + client_result = ::Google::Iam::V3beta::PolicyBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_get_policy_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_policy_binding_client_stub do + # Create client + client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_policy_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_policy_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_policy_binding ::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_policy_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_policy_binding(::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_policy_binding_client_stub.call_count + end + end + end + + def test_update_policy_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + policy_binding = {} + validate_only = true + update_mask = {} + + update_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_update_policy_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_policy_binding_client_stub do + # Create client + client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_policy_binding policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_policy_binding ::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_policy_binding(::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_policy_binding_client_stub.call_count + end + end + end + + def test_delete_policy_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + + delete_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_delete_policy_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_policy_binding_client_stub do + # Create client + client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_policy_binding ::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_policy_binding(::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_policy_binding_client_stub.call_count + end + end + end + + def test_list_policy_bindings + # Create test objects. + client_result = ::Google::Iam::V3beta::ListPolicyBindingsResponse.new + http_response = OpenStruct.new 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_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_list_policy_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_policy_bindings_client_stub do + # Create client + client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_policy_bindings({ 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_policy_bindings 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_policy_bindings ::Google::Iam::V3beta::ListPolicyBindingsRequest.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_policy_bindings({ 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_policy_bindings(::Google::Iam::V3beta::ListPolicyBindingsRequest.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_policy_bindings_client_stub.call_count + end + end + end + + def test_search_target_policy_bindings + # Create test objects. + client_result = ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + target = "hello world" + page_size = 42 + page_token = "hello world" + parent = "hello world" + + search_target_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_search_target_policy_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_target_policy_bindings_client_stub do + # Create client + client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_target_policy_bindings ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_target_policy_bindings(::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_target_policy_bindings_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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb new file mode 100644 index 000000000000..29374042c006 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb @@ -0,0 +1,517 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/iam/v3beta/policy_bindings_service_pb" +require "google/iam/v3beta/policy_bindings" + +class ::Google::Iam::V3beta::PolicyBindings::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_policy_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + policy_binding_id = "hello world" + policy_binding = {} + validate_only = true + + create_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_policy_binding, name + assert_kind_of ::Google::Iam::V3beta::CreatePolicyBindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["policy_binding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PolicyBinding), request["policy_binding"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_policy_binding_client_stub do + # Create client + client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_policy_binding ::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_policy_binding(::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_policy_binding_client_stub.call_rpc_count + end + end + + def test_get_policy_binding + # Create GRPC objects. + grpc_response = ::Google::Iam::V3beta::PolicyBinding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_policy_binding, name + assert_kind_of ::Google::Iam::V3beta::GetPolicyBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_policy_binding_client_stub do + # Create client + client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_policy_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_policy_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_policy_binding ::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_policy_binding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_policy_binding(::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_policy_binding_client_stub.call_rpc_count + end + end + + def test_update_policy_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + policy_binding = {} + validate_only = true + update_mask = {} + + update_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_policy_binding, name + assert_kind_of ::Google::Iam::V3beta::UpdatePolicyBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PolicyBinding), request["policy_binding"] + assert_equal true, request["validate_only"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_policy_binding_client_stub do + # Create client + client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding ::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding(::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding_client_stub.call_rpc_count + end + end + + def test_delete_policy_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + + delete_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_policy_binding, name + assert_kind_of ::Google::Iam::V3beta::DeletePolicyBindingRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_policy_binding_client_stub do + # Create client + client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_policy_binding ::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_policy_binding(::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_policy_binding_client_stub.call_rpc_count + end + end + + def test_list_policy_bindings + # Create GRPC objects. + grpc_response = ::Google::Iam::V3beta::ListPolicyBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_policy_bindings, name + assert_kind_of ::Google::Iam::V3beta::ListPolicyBindingsRequest, 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_policy_bindings_client_stub do + # Create client + client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_policy_bindings({ 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_policy_bindings 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_policy_bindings ::Google::Iam::V3beta::ListPolicyBindingsRequest.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_policy_bindings({ 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_policy_bindings(::Google::Iam::V3beta::ListPolicyBindingsRequest.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_policy_bindings_client_stub.call_rpc_count + end + end + + def test_search_target_policy_bindings + # Create GRPC objects. + grpc_response = ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + target = "hello world" + page_size = 42 + page_token = "hello world" + parent = "hello world" + + search_target_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_target_policy_bindings, name + assert_kind_of ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, request + assert_equal "hello world", request["target"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_target_policy_bindings_client_stub do + # Create client + client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent }) do |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_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent do |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_target_policy_bindings ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent) do |response, operation| + 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_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent }, grpc_options) do |response, operation| + 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_target_policy_bindings(::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent), grpc_options) do |response, operation| + 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_target_policy_bindings_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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Iam::V3beta::PolicyBindings::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb new file mode 100644 index 000000000000..ed86bcce8c03 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_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/iam/v3beta/principal_access_boundary_policies_service_pb" +require "google/iam/v3beta/principal_access_boundary_policies_service_services_pb" +require "google/iam/v3beta/principal_access_boundary_policies" + +class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb new file mode 100644 index 000000000000..e7a89396ed57 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_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/iam/v3beta/principal_access_boundary_policies" + +class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_principal_access_boundary_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.principal_access_boundary_policy_path organization: "value0", location: "value1", principal_access_boundary_policy: "value2" + assert_equal "organizations/value0/locations/value1/principalAccessBoundaryPolicies/value2", path + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb new file mode 100644 index 000000000000..c05429d23690 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb @@ -0,0 +1,435 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/iam/v3beta/principal_access_boundary_policies_service_pb" +require "google/iam/v3beta/principal_access_boundary_policies/rest" + + +class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy + # Create test objects. + 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" + principal_access_boundary_policy_id = "hello world" + principal_access_boundary_policy = {} + validate_only = true + + create_principal_access_boundary_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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_create_principal_access_boundary_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_principal_access_boundary_policy_client_stub do + # Create client + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_principal_access_boundary_policy ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_principal_access_boundary_policy(::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_principal_access_boundary_policy_client_stub.call_count + end + end + end + + def test_get_principal_access_boundary_policy + # Create test objects. + client_result = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_principal_access_boundary_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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_get_principal_access_boundary_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_principal_access_boundary_policy_client_stub do + # Create client + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_principal_access_boundary_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_principal_access_boundary_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_principal_access_boundary_policy ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_principal_access_boundary_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_principal_access_boundary_policy(::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_principal_access_boundary_policy_client_stub.call_count + end + end + end + + def test_update_principal_access_boundary_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + principal_access_boundary_policy = {} + validate_only = true + update_mask = {} + + update_principal_access_boundary_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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_update_principal_access_boundary_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_principal_access_boundary_policy_client_stub do + # Create client + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_principal_access_boundary_policy ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_principal_access_boundary_policy(::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_principal_access_boundary_policy_client_stub.call_count + end + end + end + + def test_delete_principal_access_boundary_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + force = true + + delete_principal_access_boundary_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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_delete_principal_access_boundary_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_principal_access_boundary_policy_client_stub do + # Create client + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_principal_access_boundary_policy ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_principal_access_boundary_policy(::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_principal_access_boundary_policy_client_stub.call_count + end + end + end + + def test_list_principal_access_boundary_policies + # Create test objects. + client_result = ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse.new + http_response = OpenStruct.new 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_principal_access_boundary_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_list_principal_access_boundary_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_principal_access_boundary_policies_client_stub do + # Create client + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_principal_access_boundary_policies({ 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_principal_access_boundary_policies 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_principal_access_boundary_policies ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies({ 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_principal_access_boundary_policies(::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_count + end + end + end + + def test_search_principal_access_boundary_policy_bindings + # Create test objects. + client_result = ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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" + + search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_search_principal_access_boundary_policy_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_principal_access_boundary_policy_bindings_client_stub do + # Create client + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_principal_access_boundary_policy_bindings({ 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.search_principal_access_boundary_policy_bindings 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.search_principal_access_boundary_policy_bindings ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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.search_principal_access_boundary_policy_bindings({ 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.search_principal_access_boundary_policy_bindings(::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb new file mode 100644 index 000000000000..276b103f56aa --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb @@ -0,0 +1,515 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/iam/v3beta/principal_access_boundary_policies_service_pb" +require "google/iam/v3beta/principal_access_boundary_policies" + +class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + principal_access_boundary_policy_id = "hello world" + principal_access_boundary_policy = {} + validate_only = true + + create_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_principal_access_boundary_policy, name + assert_kind_of ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["principal_access_boundary_policy_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_principal_access_boundary_policy_client_stub do + # Create client + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_principal_access_boundary_policy ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, grpc_options) do |response, operation| + assert_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_principal_access_boundary_policy(::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only), grpc_options) do |response, operation| + assert_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_principal_access_boundary_policy_client_stub.call_rpc_count + end + end + + def test_get_principal_access_boundary_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_principal_access_boundary_policy, name + assert_kind_of ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_principal_access_boundary_policy_client_stub do + # Create client + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_principal_access_boundary_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_principal_access_boundary_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_principal_access_boundary_policy ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_principal_access_boundary_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_principal_access_boundary_policy(::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_principal_access_boundary_policy_client_stub.call_rpc_count + end + end + + def test_update_principal_access_boundary_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + principal_access_boundary_policy = {} + validate_only = true + update_mask = {} + + update_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_principal_access_boundary_policy, name + assert_kind_of ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] + assert_equal true, request["validate_only"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_principal_access_boundary_policy_client_stub do + # Create client + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy(::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy_client_stub.call_rpc_count + end + end + + def test_delete_principal_access_boundary_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + force = true + + delete_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_principal_access_boundary_policy, name + assert_kind_of ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_principal_access_boundary_policy_client_stub do + # Create client + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy(::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy_client_stub.call_rpc_count + end + end + + def test_list_principal_access_boundary_policies + # Create GRPC objects. + grpc_response = ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_principal_access_boundary_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_principal_access_boundary_policies, name + assert_kind_of ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, 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_principal_access_boundary_policies_client_stub do + # Create client + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_principal_access_boundary_policies({ 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_principal_access_boundary_policies 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_principal_access_boundary_policies ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies({ 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_principal_access_boundary_policies(::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_rpc_count + end + end + + def test_search_principal_access_boundary_policy_bindings + # Create GRPC objects. + grpc_response = ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + + search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_principal_access_boundary_policy_bindings, name + assert_kind_of ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, 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, search_principal_access_boundary_policy_bindings_client_stub do + # Create client + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_principal_access_boundary_policy_bindings({ 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.search_principal_access_boundary_policy_bindings 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.search_principal_access_boundary_policy_bindings ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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.search_principal_access_boundary_policy_bindings({ 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.search_principal_access_boundary_policy_bindings(::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/helper.rb b/owl-bot-staging/google-iam-v3beta/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-identity-access_context_manager-v1/.gitignore b/owl-bot-staging/google-identity-access_context_manager-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/.repo-metadata.json b/owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json new file mode 100644 index 000000000000..b5b3f48e3f37 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "accesscontextmanager.googleapis.com", + "api_shortname": "accesscontextmanager", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest", + "distribution_name": "google-identity-access_context_manager-v1", + "is_cloud": true, + "language": "ruby", + "name": "accesscontextmanager", + "name_pretty": "Access Context Manager V1 API", + "product_documentation": "https://cloud.google.com/access-context-manager/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Access Context Manager allows enterprises to configure access levels which map to a policy defined on request attributes. Note that google-identity-access_context_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-identity-access_context_manager instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/access-context-manager/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml b/owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml new file mode 100644 index 000000000000..15b11069b7b8 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-identity-access_context_manager-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-identity-access_context_manager-v1.rb" diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb b/owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/.yardopts b/owl-bot-staging/google-identity-access_context_manager-v1/.yardopts new file mode 100644 index 000000000000..bba046b41e67 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Access Context Manager 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-identity-access_context_manager-v1/AUTHENTICATION.md b/owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..3537ff875c7f --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-identity-access_context_manager-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-identity-access_context_manager-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/identity/access_context_manager/v1" + +client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/identity/access_context_manager/v1" + +::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager-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/identity/access_context_manager/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager-v1/CHANGELOG.md b/owl-bot-staging/google-identity-access_context_manager-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/Gemfile b/owl-bot-staging/google-identity-access_context_manager-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/LICENSE.md b/owl-bot-staging/google-identity-access_context_manager-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/README.md b/owl-bot-staging/google-identity-access_context_manager-v1/README.md new file mode 100644 index 000000000000..fa1eb979073e --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Access Context Manager V1 API + +An API for setting attribute based access control to requests to GCP services. + +Access Context Manager allows enterprises to configure access levels which map to a policy defined on request attributes. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Access Context Manager V1 API. Most users should consider using +the main client gem, +[google-identity-access_context_manager](https://rubygems.org/gems/google-identity-access_context_manager). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-identity-access_context_manager-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/accesscontextmanager.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/identity/access_context_manager/v1" + +client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new +request = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new # (request fields as keyword arguments...) +response = client.list_access_policies request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/access-context-manager/) +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/identity/access_context_manager/v1" +require "logger" + +client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager`, +and lower-level _versioned_ client libraries with names such as +`google-identity-access_context_manager-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-identity-access_context_manager`. +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-identity-access_context_manager-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-identity-access_context_manager-v1/Rakefile b/owl-bot-staging/google-identity-access_context_manager-v1/Rakefile new file mode 100644 index 000000000000..4d845f513939 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-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/identity/access_context_manager/v1/access_context_manager/credentials" + ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager-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-identity-access_context_manager-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-identity-access_context_manager-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-identity-access_context_manager-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-identity-access_context_manager-v1" + header "google-identity-access_context_manager-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-identity-access_context_manager-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-identity-access_context_manager-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-identity-access_context_manager-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-identity-access_context_manager-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-identity-access_context_manager-v1/gapic_metadata.json b/owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json new file mode 100644 index 000000000000..a47b974d0dbf --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json @@ -0,0 +1,148 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.identity.accesscontextmanager.v1", + "libraryPackage": "::Google::Identity::AccessContextManager::V1", + "services": { + "AccessContextManager": { + "clients": { + "grpc": { + "libraryClient": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client", + "rpcs": { + "ListAccessPolicies": { + "methods": [ + "list_access_policies" + ] + }, + "GetAccessPolicy": { + "methods": [ + "get_access_policy" + ] + }, + "CreateAccessPolicy": { + "methods": [ + "create_access_policy" + ] + }, + "UpdateAccessPolicy": { + "methods": [ + "update_access_policy" + ] + }, + "DeleteAccessPolicy": { + "methods": [ + "delete_access_policy" + ] + }, + "ListAccessLevels": { + "methods": [ + "list_access_levels" + ] + }, + "GetAccessLevel": { + "methods": [ + "get_access_level" + ] + }, + "CreateAccessLevel": { + "methods": [ + "create_access_level" + ] + }, + "UpdateAccessLevel": { + "methods": [ + "update_access_level" + ] + }, + "DeleteAccessLevel": { + "methods": [ + "delete_access_level" + ] + }, + "ReplaceAccessLevels": { + "methods": [ + "replace_access_levels" + ] + }, + "ListServicePerimeters": { + "methods": [ + "list_service_perimeters" + ] + }, + "GetServicePerimeter": { + "methods": [ + "get_service_perimeter" + ] + }, + "CreateServicePerimeter": { + "methods": [ + "create_service_perimeter" + ] + }, + "UpdateServicePerimeter": { + "methods": [ + "update_service_perimeter" + ] + }, + "DeleteServicePerimeter": { + "methods": [ + "delete_service_perimeter" + ] + }, + "ReplaceServicePerimeters": { + "methods": [ + "replace_service_perimeters" + ] + }, + "CommitServicePerimeters": { + "methods": [ + "commit_service_perimeters" + ] + }, + "ListGcpUserAccessBindings": { + "methods": [ + "list_gcp_user_access_bindings" + ] + }, + "GetGcpUserAccessBinding": { + "methods": [ + "get_gcp_user_access_binding" + ] + }, + "CreateGcpUserAccessBinding": { + "methods": [ + "create_gcp_user_access_binding" + ] + }, + "UpdateGcpUserAccessBinding": { + "methods": [ + "update_gcp_user_access_binding" + ] + }, + "DeleteGcpUserAccessBinding": { + "methods": [ + "delete_gcp_user_access_binding" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec b/owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec new file mode 100644 index 000000000000..c1efbea93872 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/identity/access_context_manager/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-identity-access_context_manager-v1" + gem.version = Google::Identity::AccessContextManager::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Access Context Manager allows enterprises to configure access levels which map to a policy defined on request attributes. Note that google-identity-access_context_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-identity-access_context_manager instead. See the readme for more details." + gem.summary = "An API for setting attribute based access control to requests to GCP services." + 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 "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb new file mode 100644 index 000000000000..5d4eaa9b5df6 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-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/identity/access_context_manager/v1" diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb new file mode 100644 index 000000000000..c51f7bf61440 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/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/identity/access_context_manager/v1/access_context_manager" +require "google/identity/access_context_manager/v1/version" + +module Google + module Identity + module AccessContextManager + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/identity/access_context_manager/v1" + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/identity/access_context_manager/v1" + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/identity/access_context_manager/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb new file mode 100644 index 000000000000..557344644e3e --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.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! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/identity/access_context_manager/v1/version" + +require "google/identity/access_context_manager/v1/access_context_manager/credentials" +require "google/identity/access_context_manager/v1/access_context_manager/paths" +require "google/identity/access_context_manager/v1/access_context_manager/operations" +require "google/identity/access_context_manager/v1/access_context_manager/client" +require "google/identity/access_context_manager/v1/access_context_manager/rest" + +module Google + module Identity + module AccessContextManager + module V1 + ## + # API for setting [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] and [service + # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] + # for Google Cloud projects. Each organization has one [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the + # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] + # and [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This + # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is + # applicable to all resources in the organization. + # AccessPolicies + # + # @example Load this service and instantiate a gRPC client + # + # require "google/identity/access_context_manager/v1/access_context_manager" + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/identity/access_context_manager/v1/access_context_manager/rest" + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + module AccessContextManager + end + end + end + end +end + +helper_path = ::File.join __dir__, "access_context_manager", "helpers.rb" +require "google/identity/access_context_manager/v1/access_context_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb new file mode 100644 index 000000000000..f6edfe855d26 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb @@ -0,0 +1,3297 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/identity/accesscontextmanager/v1/access_context_manager_pb" + +module Google + module Identity + module AccessContextManager + module V1 + module AccessContextManager + ## + # Client for the AccessContextManager service. + # + # API for setting [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] and [service + # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] + # for Google Cloud projects. Each organization has one [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the + # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] + # and [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This + # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is + # applicable to all resources in the organization. + # AccessPolicies + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :access_context_manager_stub + + ## + # Configure the AccessContextManager Client class. + # + # See {::Google::Identity::AccessContextManager::V1::AccessContextManager::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccessContextManager clients + # ::Google::Identity::AccessContextManager::V1::AccessContextManager::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", "Identity", "AccessContextManager", "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 AccessContextManager 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::Identity::AccessContextManager::V1::AccessContextManager::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 + @access_context_manager_stub.universe_domain + end + + ## + # Create a new AccessContextManager client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccessContextManager 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/identity/accesscontextmanager/v1/access_context_manager_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 + + @access_context_manager_stub = ::Gapic::ServiceStub.new( + ::Google::Identity::AccessContextManager::V1::AccessContextManager::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 + ) + + @access_context_manager_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @access_context_manager_stub.logger + end + + # Service calls + + ## + # Lists all [access policies] + # [google.identity.accesscontextmanager.v1.AccessPolicy] in an + # organization. + # + # @overload list_access_policies(request, options = nil) + # Pass arguments to `list_access_policies` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_access_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the container to list AccessPolicy instances + # from. + # + # Format: + # `organizations/{org_id}` + # @param page_size [::Integer] + # Number of AccessPolicy instances to include in the list. Default 100. + # @param page_token [::String] + # Next page token for the next batch of AccessPolicy instances. Defaults to + # the first page of results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new + # + # # Call the list_access_policies method. + # result = client.list_access_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy. + # p item + # end + # + def list_access_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_access_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::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_access_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_access_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :list_access_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_access_policies, 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 an [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name. + # + # @overload get_access_policy(request, options = nil) + # Pass arguments to `get_access_policy` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_access_policy(name: nil) + # Pass arguments to `get_access_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 name [::String] + # Required. Resource name for the access policy to get. + # + # Format `accessPolicies/{policy_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new + # + # # Call the get_access_policy method. + # result = client.get_access_policy request + # + # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy. + # p result + # + def get_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_access_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::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :get_access_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 + + ## + # Creates an access policy. This method fails if the organization already has + # an access policy. The long-running operation has a successful status + # after the access policy propagates to long-lasting storage. + # Syntactic and basic semantic errors are returned in `metadata` as a + # BadRequest proto. + # + # @overload create_access_policy(request, options = nil) + # Pass arguments to `create_access_policy` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::AccessPolicy} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_access_policy(name: nil, parent: nil, title: nil, scopes: nil, create_time: nil, update_time: nil, etag: nil) + # Pass arguments to `create_access_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 name [::String] + # Output only. Resource name of the `AccessPolicy`. Format: + # `accessPolicies/{access_policy}` + # @param parent [::String] + # Required. The parent of this `AccessPolicy` in the Cloud Resource + # Hierarchy. Currently immutable once created. Format: + # `organizations/{organization_id}` + # @param title [::String] + # Required. Human readable title. Does not affect behavior. + # @param scopes [::Array<::String>] + # The scopes of a policy define which resources an ACM policy can restrict, + # and where ACM resources can be referenced. + # For example, a policy with scopes=["folders/123"] has the following + # behavior: + # - vpcsc perimeters can only restrict projects within folders/123 + # - access levels can only be referenced by resources within folders/123. + # If empty, there are no limitations on which resources can be restricted by + # an ACM policy, and there are no limitations on where ACM resources can be + # referenced. + # Only one policy can include a given scope (attempting to create a second + # policy which includes "folders/123" will result in an error). + # Currently, scopes cannot be modified after a policy is created. + # Currently, policies can only have a single scope. + # Format: list of `folders/{folder_number}` or `projects/{project_number}` + # @param create_time [::Google::Protobuf::Timestamp, ::Hash] + # Output only. Time the `AccessPolicy` was created in UTC. + # @param update_time [::Google::Protobuf::Timestamp, ::Hash] + # Output only. Time the `AccessPolicy` was updated in UTC. + # @param etag [::String] + # Output only. An opaque identifier for the current version of the + # `AccessPolicy`. This will always be a strongly validated etag, meaning that + # two Access Polices will be identical if and only if their etags are + # identical. Clients should not expect this to be in any specific format. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::AccessPolicy.new + # + # # Call the create_access_policy method. + # result = client.create_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::AccessPolicy + + # Converts hash and nil to 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_access_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::Identity::AccessContextManager::V1::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.create_access_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :create_access_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. The + # long-running operation from this RPC has a successful status after the + # changes to the [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] propagate + # to long-lasting storage. + # + # @overload update_access_policy(request, options = nil) + # Pass arguments to `update_access_policy` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_access_policy(policy: nil, update_mask: nil) + # Pass arguments to `update_access_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 policy [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] + # Required. The updated AccessPolicy. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask to control which fields get updated. Must be non-empty. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new + # + # # Call the update_access_policy method. + # result = client.update_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest + + # Converts hash and nil to 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_access_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::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.policy&.name + header_params["policy.name"] = request.policy.name + end + + request_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_access_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :update_access_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the + # resource name. The long-running operation has a successful status after the + # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] + # is removed from long-lasting storage. + # + # @overload delete_access_policy(request, options = nil) + # Pass arguments to `delete_access_policy` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_access_policy(name: nil) + # Pass arguments to `delete_access_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 name [::String] + # Required. Resource name for the access policy to delete. + # + # Format `accessPolicies/{policy_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/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new + # + # # Call the delete_access_policy method. + # result = client.delete_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_access_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::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :delete_access_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] for an access + # policy. + # + # @overload list_access_levels(request, options = nil) + # Pass arguments to `list_access_levels` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_access_levels(parent: nil, page_size: nil, page_token: nil, access_level_format: nil) + # Pass arguments to `list_access_levels` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the access policy to list [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] from. + # + # Format: + # `accessPolicies/{policy_id}` + # @param page_size [::Integer] + # Number of [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] to include in + # the list. Default 100. + # @param page_token [::String] + # Next page token for the next batch of [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] instances. + # Defaults to the first page of results. + # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] + # Whether to return `BasicLevels` in the Cloud Common Expression language, as + # `CustomLevels`, rather than as `BasicLevels`. Defaults to returning + # `AccessLevels` in the format they were defined. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new + # + # # Call the list_access_levels method. + # result = client.list_access_levels request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel. + # p item + # end + # + def list_access_levels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_access_levels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_access_levels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_access_levels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :list_access_levels, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_access_levels, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource + # name. + # + # @overload get_access_level(request, options = nil) + # Pass arguments to `get_access_level` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_access_level(name: nil, access_level_format: nil) + # Pass arguments to `get_access_level` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: + # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] + # Whether to return `BasicLevels` in the Cloud Common Expression + # Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where + # [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] + # are returned as `BasicLevels` or `CustomLevels` based on how they were + # created. If set to CEL, all [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] are returned as + # `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent + # `CustomLevels`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Identity::AccessContextManager::V1::AccessLevel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new + # + # # Call the get_access_level method. + # result = client.get_access_level request + # + # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel. + # p result + # + def get_access_level request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_access_level.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_access_level.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_access_level.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :get_access_level, request, 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 [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running + # operation from this RPC has a successful status after the [access + # level] [google.identity.accesscontextmanager.v1.AccessLevel] + # propagates to long-lasting storage. If [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contain + # errors, an error response is returned for the first error encountered. + # + # @overload create_access_level(request, options = nil) + # Pass arguments to `create_access_level` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_access_level(parent: nil, access_level: nil) + # Pass arguments to `create_access_level` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the access policy which owns this [Access + # Level] [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: `accessPolicies/{policy_id}` + # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] + # Required. The [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] to create. + # Syntactic correctness of the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] is a + # precondition for creation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new + # + # # Call the create_access_level method. + # result = client.create_access_level request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_access_level request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest + + # Converts hash and nil to 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_access_level.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_access_level.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_access_level.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :create_access_level, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running + # operation from this RPC has a successful status after the changes to + # the [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] propagate + # to long-lasting storage. If [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contain + # errors, an error response is returned for the first error encountered. + # + # @overload update_access_level(request, options = nil) + # Pass arguments to `update_access_level` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_access_level(access_level: nil, update_mask: nil) + # Pass arguments to `update_access_level` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] + # Required. The updated [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic + # correctness of the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] is a + # precondition for creation. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask to control which fields get updated. Must be non-empty. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new + # + # # Call the update_access_level method. + # result = client.update_access_level request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_access_level request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest + + # Converts hash and nil to 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_access_level.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.access_level&.name + header_params["access_level.name"] = request.access_level.name + end + + request_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_access_level.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_access_level.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :update_access_level, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource + # name. The long-running operation from this RPC has a successful status + # after the [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] has been removed + # from long-lasting storage. + # + # @overload delete_access_level(request, options = nil) + # Pass arguments to `delete_access_level` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_access_level(name: nil) + # Pass arguments to `delete_access_level` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: + # `accessPolicies/{policy_id}/accessLevels/{access_level_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/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new + # + # # Call the delete_access_level method. + # result = client.delete_access_level request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_access_level request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_access_level.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_access_level.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_access_level.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :delete_access_level, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Replaces all existing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] in an [access + # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with + # the [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] provided. This + # is done atomically. The long-running operation from this RPC has a + # successful status after all replacements propagate to long-lasting + # storage. If the replacement contains errors, an error response is returned + # for the first error encountered. Upon error, the replacement is cancelled, + # and existing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] are not + # affected. The Operation.response field contains + # ReplaceAccessLevelsResponse. Removing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an + # error. + # + # @overload replace_access_levels(request, options = nil) + # Pass arguments to `replace_access_levels` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload replace_access_levels(parent: nil, access_levels: nil, etag: nil) + # Pass arguments to `replace_access_levels` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the access policy which owns these + # [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: `accessPolicies/{policy_id}` + # @param access_levels [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash>] + # Required. The desired [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] that should + # replace all existing [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] in the + # [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. + # @param etag [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # replace operation is to be performed on. If, at the time of replace, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the replace operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new + # + # # Call the replace_access_levels method. + # result = client.replace_access_levels request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def replace_access_levels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.replace_access_levels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.replace_access_levels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.replace_access_levels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :replace_access_levels, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] for an + # access policy. + # + # @overload list_service_perimeters(request, options = nil) + # Pass arguments to `list_service_perimeters` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_service_perimeters(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_service_perimeters` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the access policy to list [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] from. + # + # Format: + # `accessPolicies/{policy_id}` + # @param page_size [::Integer] + # Number of [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] to include + # in the list. Default 100. + # @param page_token [::String] + # Next page token for the next batch of [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. + # Defaults to the first page of results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new + # + # # Call the list_service_perimeters method. + # result = client.list_service_perimeters request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter. + # p item + # end + # + def list_service_perimeters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_service_perimeters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_service_perimeters.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_service_perimeters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :list_service_perimeters, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_service_perimeters, 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 [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the + # resource name. + # + # @overload get_service_perimeter(request, options = nil) + # Pass arguments to `get_service_perimeter` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_service_perimeter(name: nil) + # Pass arguments to `get_service_perimeter` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: + # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new + # + # # Call the get_service_perimeter method. + # result = client.get_service_perimeter request + # + # # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter. + # p result + # + def get_service_perimeter request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_service_perimeter.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_service_perimeter.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_service_perimeter.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :get_service_perimeter, request, 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 [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The + # long-running operation from this RPC has a successful status after the + # [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] + # propagates to long-lasting storage. If a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains + # errors, an error response is returned for the first error encountered. + # + # @overload create_service_perimeter(request, options = nil) + # Pass arguments to `create_service_perimeter` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_service_perimeter(parent: nil, service_perimeter: nil) + # Pass arguments to `create_service_perimeter` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the access policy which owns this [Service + # Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: `accessPolicies/{policy_id}` + # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] + # Required. The [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] to create. + # Syntactic correctness of the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] is a + # precondition for creation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new + # + # # Call the create_service_perimeter method. + # result = client.create_service_perimeter request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_service_perimeter request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest + + # Converts hash and nil to 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_service_perimeter.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_service_perimeter.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_service_perimeter.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :create_service_perimeter, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The + # long-running operation from this RPC has a successful status after the + # [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] + # propagates to long-lasting storage. If a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains + # errors, an error response is returned for the first error encountered. + # + # @overload update_service_perimeter(request, options = nil) + # Pass arguments to `update_service_perimeter` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_service_perimeter(service_perimeter: nil, update_mask: nil) + # Pass arguments to `update_service_perimeter` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] + # Required. The updated `ServicePerimeter`. Syntactic correctness of the + # `ServicePerimeter` is a precondition for creation. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask to control which fields get updated. Must be non-empty. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new + # + # # Call the update_service_perimeter method. + # result = client.update_service_perimeter request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_service_perimeter request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest + + # Converts hash and nil to 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_service_perimeter.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_perimeter&.name + header_params["service_perimeter.name"] = request.service_perimeter.name + end + + request_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_service_perimeter.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_service_perimeter.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :update_service_perimeter, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the + # resource name. The long-running operation from this RPC has a successful + # status after the [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from + # long-lasting storage. + # + # @overload delete_service_perimeter(request, options = nil) + # Pass arguments to `delete_service_perimeter` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_service_perimeter(name: nil) + # Pass arguments to `delete_service_perimeter` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: + # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_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/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new + # + # # Call the delete_service_perimeter method. + # result = client.delete_service_perimeter request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_service_perimeter request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_service_perimeter.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_service_perimeter.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_service_perimeter.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :delete_service_perimeter, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Replace all existing [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access + # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This + # is done atomically. The long-running operation from this RPC has a + # successful status after all replacements propagate to long-lasting storage. + # Replacements containing errors result in an error response for the first + # error encountered. Upon an error, replacement are cancelled and existing + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] are not + # affected. The Operation.response field contains + # ReplaceServicePerimetersResponse. + # + # @overload replace_service_perimeters(request, options = nil) + # Pass arguments to `replace_service_perimeters` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload replace_service_perimeters(parent: nil, service_perimeters: nil, etag: nil) + # Pass arguments to `replace_service_perimeters` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the access policy which owns these + # [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: `accessPolicies/{policy_id}` + # @param service_perimeters [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash>] + # Required. The desired [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] that should + # replace all existing [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in the + # [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. + # @param etag [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # replace operation is to be performed on. If, at the time of replace, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the replace operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new + # + # # Call the replace_service_perimeters method. + # result = client.replace_service_perimeters request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def replace_service_perimeters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.replace_service_perimeters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.replace_service_perimeters.timeout, + metadata: metadata, + retry_policy: @config.rpcs.replace_service_perimeters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :replace_service_perimeters, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Commits the dry-run specification for all the [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an + # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. + # A commit operation on a service perimeter involves copying its `spec` field + # to the `status` field of the service perimeter. Only [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] with + # `use_explicit_dry_run_spec` field set to true are affected by a commit + # operation. The long-running operation from this RPC has a successful + # status after the dry-run specifications for all the [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] have been + # committed. If a commit fails, it causes the long-running operation to + # return an error response and the entire commit operation is cancelled. + # When successful, the Operation.response field contains + # CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are + # cleared after a successful commit operation. + # + # @overload commit_service_perimeters(request, options = nil) + # Pass arguments to `commit_service_perimeters` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload commit_service_perimeters(parent: nil, etag: nil) + # Pass arguments to `commit_service_perimeters` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the parent [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all + # [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for + # the commit operation. + # + # Format: `accessPolicies/{policy_id}` + # @param etag [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # commit operation is to be performed on. If, at the time of commit, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the commit operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new + # + # # Call the commit_service_perimeters method. + # result = client.commit_service_perimeters request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def commit_service_perimeters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.commit_service_perimeters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.commit_service_perimeters.timeout, + metadata: metadata, + retry_policy: @config.rpcs.commit_service_perimeters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :commit_service_perimeters, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 [GcpUserAccessBindings] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a + # Google Cloud organization. + # + # @overload list_gcp_user_access_bindings(request, options = nil) + # Pass arguments to `list_gcp_user_access_bindings` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_gcp_user_access_bindings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gcp_user_access_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Example: "organizations/256" + # @param page_size [::Integer] + # Optional. Maximum number of items to return. The server may return fewer items. + # If left blank, the server may return any number of items. + # @param page_token [::String] + # Optional. If left blank, returns the first page. To enumerate all items, use the + # [next_page_token] + # [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token] + # from your previous list operation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new + # + # # Call the list_gcp_user_access_bindings method. + # result = client.list_gcp_user_access_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. + # p item + # end + # + def list_gcp_user_access_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_gcp_user_access_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_gcp_user_access_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_gcp_user_access_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :list_gcp_user_access_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_gcp_user_access_bindings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with + # the given name. + # + # @overload get_gcp_user_access_binding(request, options = nil) + # Pass arguments to `get_gcp_user_access_binding` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_gcp_user_access_binding(name: nil) + # Pass arguments to `get_gcp_user_access_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new + # + # # Call the get_gcp_user_access_binding method. + # result = client.get_gcp_user_access_binding request + # + # # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. + # p result + # + def get_gcp_user_access_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_gcp_user_access_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_gcp_user_access_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_gcp_user_access_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :get_gcp_user_access_binding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the + # client specifies a [name] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], + # the server ignores it. Fails if a resource already exists with the same + # [group_key] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. + # Completion of this long-running operation does not necessarily signify that + # the new binding is deployed onto all affected users, which may take more + # time. + # + # @overload create_gcp_user_access_binding(request, options = nil) + # Pass arguments to `create_gcp_user_access_binding` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_gcp_user_access_binding(parent: nil, gcp_user_access_binding: nil) + # Pass arguments to `create_gcp_user_access_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Example: "organizations/256" + # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] + # Required. [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new + # + # # Call the create_gcp_user_access_binding method. + # result = client.create_gcp_user_access_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_gcp_user_access_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest + + # Converts hash and nil to 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_gcp_user_access_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_gcp_user_access_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_gcp_user_access_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :create_gcp_user_access_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. + # Completion of this long-running operation does not necessarily signify that + # the changed binding is deployed onto all affected users, which may take + # more time. + # + # @overload update_gcp_user_access_binding(request, options = nil) + # Pass arguments to `update_gcp_user_access_binding` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_gcp_user_access_binding(gcp_user_access_binding: nil, update_mask: nil) + # Pass arguments to `update_gcp_user_access_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] + # Required. [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Only the fields specified in this mask are updated. Because name and + # group_key cannot be changed, update_mask is required and must always be: + # + # update_mask { + # paths: "access_levels" + # } + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new + # + # # Call the update_gcp_user_access_binding method. + # result = client.update_gcp_user_access_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_gcp_user_access_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest + + # Converts hash and nil to 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_gcp_user_access_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.gcp_user_access_binding&.name + header_params["gcp_user_access_binding.name"] = request.gcp_user_access_binding.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_gcp_user_access_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_gcp_user_access_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :update_gcp_user_access_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. + # Completion of this long-running operation does not necessarily signify that + # the binding deletion is deployed onto all affected users, which may take + # more time. + # + # @overload delete_gcp_user_access_binding(request, options = nil) + # Pass arguments to `delete_gcp_user_access_binding` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_gcp_user_access_binding(name: nil) + # Pass arguments to `delete_gcp_user_access_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new + # + # # Call the delete_gcp_user_access_binding method. + # result = client.delete_gcp_user_access_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_gcp_user_access_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_gcp_user_access_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_gcp_user_access_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_gcp_user_access_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :delete_gcp_user_access_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the IAM policy for the specified Access Context Manager + # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. + # This method replaces the existing IAM policy on the access policy. The IAM + # policy controls the set of users who can perform specific operations on the + # Access Context Manager [access + # policy][google.identity.accesscontextmanager.v1.AccessPolicy]. + # + # @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/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-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 + + @access_context_manager_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM policy for the specified Access Context Manager + # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. + # + # @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/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-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 + + @access_context_manager_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 + + ## + # Returns the IAM permissions that the caller has on the specified Access + # Context Manager resource. The resource can be an + # {::Google::Identity::AccessContextManager::V1::AccessPolicy AccessPolicy}, + # {::Google::Identity::AccessContextManager::V1::AccessLevel AccessLevel}, or + # [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter + # ]. This method does not support other resources. + # + # @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/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-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 + + @access_context_manager_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AccessContextManager API. + # + # This class represents the configuration for AccessContextManager, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Identity::AccessContextManager::V1::AccessContextManager::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_access_policies to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_access_policies.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_access_policies.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Identity::AccessContextManager::V1::AccessContextManager::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 = "accesscontextmanager.googleapis.com" + + config_attr :endpoint, nil, ::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 AccessContextManager API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_access_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_access_policies + ## + # RPC-specific configuration for `get_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_access_policy + ## + # RPC-specific configuration for `create_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_access_policy + ## + # RPC-specific configuration for `update_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_access_policy + ## + # RPC-specific configuration for `delete_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_access_policy + ## + # RPC-specific configuration for `list_access_levels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_access_levels + ## + # RPC-specific configuration for `get_access_level` + # @return [::Gapic::Config::Method] + # + attr_reader :get_access_level + ## + # RPC-specific configuration for `create_access_level` + # @return [::Gapic::Config::Method] + # + attr_reader :create_access_level + ## + # RPC-specific configuration for `update_access_level` + # @return [::Gapic::Config::Method] + # + attr_reader :update_access_level + ## + # RPC-specific configuration for `delete_access_level` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_access_level + ## + # RPC-specific configuration for `replace_access_levels` + # @return [::Gapic::Config::Method] + # + attr_reader :replace_access_levels + ## + # RPC-specific configuration for `list_service_perimeters` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_perimeters + ## + # RPC-specific configuration for `get_service_perimeter` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_perimeter + ## + # RPC-specific configuration for `create_service_perimeter` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_perimeter + ## + # RPC-specific configuration for `update_service_perimeter` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service_perimeter + ## + # RPC-specific configuration for `delete_service_perimeter` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service_perimeter + ## + # RPC-specific configuration for `replace_service_perimeters` + # @return [::Gapic::Config::Method] + # + attr_reader :replace_service_perimeters + ## + # RPC-specific configuration for `commit_service_perimeters` + # @return [::Gapic::Config::Method] + # + attr_reader :commit_service_perimeters + ## + # RPC-specific configuration for `list_gcp_user_access_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gcp_user_access_bindings + ## + # RPC-specific configuration for `get_gcp_user_access_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_gcp_user_access_binding + ## + # RPC-specific configuration for `create_gcp_user_access_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_gcp_user_access_binding + ## + # RPC-specific configuration for `update_gcp_user_access_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_gcp_user_access_binding + ## + # RPC-specific configuration for `delete_gcp_user_access_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_gcp_user_access_binding + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies + @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config + get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy + @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config + create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy + @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config + update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy + @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config + delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy + @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config + list_access_levels_config = parent_rpcs.list_access_levels if parent_rpcs.respond_to? :list_access_levels + @list_access_levels = ::Gapic::Config::Method.new list_access_levels_config + get_access_level_config = parent_rpcs.get_access_level if parent_rpcs.respond_to? :get_access_level + @get_access_level = ::Gapic::Config::Method.new get_access_level_config + create_access_level_config = parent_rpcs.create_access_level if parent_rpcs.respond_to? :create_access_level + @create_access_level = ::Gapic::Config::Method.new create_access_level_config + update_access_level_config = parent_rpcs.update_access_level if parent_rpcs.respond_to? :update_access_level + @update_access_level = ::Gapic::Config::Method.new update_access_level_config + delete_access_level_config = parent_rpcs.delete_access_level if parent_rpcs.respond_to? :delete_access_level + @delete_access_level = ::Gapic::Config::Method.new delete_access_level_config + replace_access_levels_config = parent_rpcs.replace_access_levels if parent_rpcs.respond_to? :replace_access_levels + @replace_access_levels = ::Gapic::Config::Method.new replace_access_levels_config + list_service_perimeters_config = parent_rpcs.list_service_perimeters if parent_rpcs.respond_to? :list_service_perimeters + @list_service_perimeters = ::Gapic::Config::Method.new list_service_perimeters_config + get_service_perimeter_config = parent_rpcs.get_service_perimeter if parent_rpcs.respond_to? :get_service_perimeter + @get_service_perimeter = ::Gapic::Config::Method.new get_service_perimeter_config + create_service_perimeter_config = parent_rpcs.create_service_perimeter if parent_rpcs.respond_to? :create_service_perimeter + @create_service_perimeter = ::Gapic::Config::Method.new create_service_perimeter_config + update_service_perimeter_config = parent_rpcs.update_service_perimeter if parent_rpcs.respond_to? :update_service_perimeter + @update_service_perimeter = ::Gapic::Config::Method.new update_service_perimeter_config + delete_service_perimeter_config = parent_rpcs.delete_service_perimeter if parent_rpcs.respond_to? :delete_service_perimeter + @delete_service_perimeter = ::Gapic::Config::Method.new delete_service_perimeter_config + replace_service_perimeters_config = parent_rpcs.replace_service_perimeters if parent_rpcs.respond_to? :replace_service_perimeters + @replace_service_perimeters = ::Gapic::Config::Method.new replace_service_perimeters_config + commit_service_perimeters_config = parent_rpcs.commit_service_perimeters if parent_rpcs.respond_to? :commit_service_perimeters + @commit_service_perimeters = ::Gapic::Config::Method.new commit_service_perimeters_config + list_gcp_user_access_bindings_config = parent_rpcs.list_gcp_user_access_bindings if parent_rpcs.respond_to? :list_gcp_user_access_bindings + @list_gcp_user_access_bindings = ::Gapic::Config::Method.new list_gcp_user_access_bindings_config + get_gcp_user_access_binding_config = parent_rpcs.get_gcp_user_access_binding if parent_rpcs.respond_to? :get_gcp_user_access_binding + @get_gcp_user_access_binding = ::Gapic::Config::Method.new get_gcp_user_access_binding_config + create_gcp_user_access_binding_config = parent_rpcs.create_gcp_user_access_binding if parent_rpcs.respond_to? :create_gcp_user_access_binding + @create_gcp_user_access_binding = ::Gapic::Config::Method.new create_gcp_user_access_binding_config + update_gcp_user_access_binding_config = parent_rpcs.update_gcp_user_access_binding if parent_rpcs.respond_to? :update_gcp_user_access_binding + @update_gcp_user_access_binding = ::Gapic::Config::Method.new update_gcp_user_access_binding_config + delete_gcp_user_access_binding_config = parent_rpcs.delete_gcp_user_access_binding if parent_rpcs.respond_to? :delete_gcp_user_access_binding + @delete_gcp_user_access_binding = ::Gapic::Config::Method.new delete_gcp_user_access_binding_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb new file mode 100644 index 000000000000..776e70b9d2b2 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Identity + module AccessContextManager + module V1 + module AccessContextManager + # Credentials for the AccessContextManager 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-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb new file mode 100644 index 000000000000..77e76d9d22b6 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Identity + module AccessContextManager + module V1 + module AccessContextManager + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AccessContextManager 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 AccessContextManager 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::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Identity::AccessContextManager::V1::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 = "accesscontextmanager.googleapis.com" + + config_attr :endpoint, nil, ::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-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb new file mode 100644 index 000000000000..11645e15c66f --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.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 Identity + module AccessContextManager + module V1 + module AccessContextManager + # Path helper methods for the AccessContextManager API. + module Paths + ## + # Create a fully-qualified AccessLevel resource string. + # + # The resource will be in the following format: + # + # `accessPolicies/{access_policy}/accessLevels/{access_level}` + # + # @param access_policy [String] + # @param access_level [String] + # + # @return [::String] + def access_level_path access_policy:, access_level: + raise ::ArgumentError, "access_policy cannot contain /" if access_policy.to_s.include? "/" + + "accessPolicies/#{access_policy}/accessLevels/#{access_level}" + end + + ## + # Create a fully-qualified AccessPolicy resource string. + # + # The resource will be in the following format: + # + # `accessPolicies/{access_policy}` + # + # @param access_policy [String] + # + # @return [::String] + def access_policy_path access_policy: + "accessPolicies/#{access_policy}" + end + + ## + # Create a fully-qualified GcpUserAccessBinding resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/gcpUserAccessBindings/{gcp_user_access_binding}` + # + # @param organization [String] + # @param gcp_user_access_binding [String] + # + # @return [::String] + def gcp_user_access_binding_path organization:, gcp_user_access_binding: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/gcpUserAccessBindings/#{gcp_user_access_binding}" + end + + ## + # Create a fully-qualified Organization resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}` + # + # @param organization [String] + # + # @return [::String] + def organization_path organization: + "organizations/#{organization}" + end + + ## + # Create a fully-qualified ServicePerimeter resource string. + # + # The resource will be in the following format: + # + # `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}` + # + # @param access_policy [String] + # @param service_perimeter [String] + # + # @return [::String] + def service_perimeter_path access_policy:, service_perimeter: + raise ::ArgumentError, "access_policy cannot contain /" if access_policy.to_s.include? "/" + + "accessPolicies/#{access_policy}/servicePerimeters/#{service_perimeter}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb new file mode 100644 index 000000000000..db852d4c1c3e --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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/identity/access_context_manager/v1/version" + +require "google/identity/access_context_manager/v1/access_context_manager/credentials" +require "google/identity/access_context_manager/v1/access_context_manager/paths" +require "google/identity/access_context_manager/v1/access_context_manager/rest/operations" +require "google/identity/access_context_manager/v1/access_context_manager/rest/client" + +module Google + module Identity + module AccessContextManager + module V1 + ## + # API for setting [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] and [service + # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] + # for Google Cloud projects. Each organization has one [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the + # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] + # and [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This + # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is + # applicable to all resources in the organization. + # AccessPolicies + # + # To load this service and instantiate a REST client: + # + # require "google/identity/access_context_manager/v1/access_context_manager/rest" + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + module AccessContextManager + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/identity/access_context_manager/v1/access_context_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb new file mode 100644 index 000000000000..b939c885a3ac --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb @@ -0,0 +1,3088 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/identity/accesscontextmanager/v1/access_context_manager_pb" +require "google/identity/access_context_manager/v1/access_context_manager/rest/service_stub" + +module Google + module Identity + module AccessContextManager + module V1 + module AccessContextManager + module Rest + ## + # REST client for the AccessContextManager service. + # + # API for setting [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] and [service + # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] + # for Google Cloud projects. Each organization has one [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the + # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] + # and [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This + # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is + # applicable to all resources in the organization. + # AccessPolicies + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :access_context_manager_stub + + ## + # Configure the AccessContextManager Client class. + # + # See {::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccessContextManager clients + # ::Google::Identity::AccessContextManager::V1::AccessContextManager::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", "Identity", "AccessContextManager", "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 AccessContextManager 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::Identity::AccessContextManager::V1::AccessContextManager::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 + @access_context_manager_stub.universe_domain + end + + ## + # Create a new AccessContextManager REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccessContextManager 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::Identity::AccessContextManager::V1::AccessContextManager::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 + + @access_context_manager_stub = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @access_context_manager_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @access_context_manager_stub.logger + end + + # Service calls + + ## + # Lists all [access policies] + # [google.identity.accesscontextmanager.v1.AccessPolicy] in an + # organization. + # + # @overload list_access_policies(request, options = nil) + # Pass arguments to `list_access_policies` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_access_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the container to list AccessPolicy instances + # from. + # + # Format: + # `organizations/{org_id}` + # @param page_size [::Integer] + # Number of AccessPolicy instances to include in the list. Default 100. + # @param page_token [::String] + # Next page token for the next batch of AccessPolicy instances. Defaults to + # the first page of results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new + # + # # Call the list_access_policies method. + # result = client.list_access_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy. + # p item + # end + # + def list_access_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_access_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_access_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.list_access_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_access_policies, "access_policies", request, result, 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 an [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name. + # + # @overload get_access_policy(request, options = nil) + # Pass arguments to `get_access_policy` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_access_policy(name: nil) + # Pass arguments to `get_access_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 name [::String] + # Required. Resource name for the access policy to get. + # + # Format `accessPolicies/{policy_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new + # + # # Call the get_access_policy method. + # result = client.get_access_policy request + # + # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy. + # p result + # + def get_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_access_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::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.get_access_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 + + ## + # Creates an access policy. This method fails if the organization already has + # an access policy. The long-running operation has a successful status + # after the access policy propagates to long-lasting storage. + # Syntactic and basic semantic errors are returned in `metadata` as a + # BadRequest proto. + # + # @overload create_access_policy(request, options = nil) + # Pass arguments to `create_access_policy` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::AccessPolicy} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_access_policy(name: nil, parent: nil, title: nil, scopes: nil, create_time: nil, update_time: nil, etag: nil) + # Pass arguments to `create_access_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 name [::String] + # Output only. Resource name of the `AccessPolicy`. Format: + # `accessPolicies/{access_policy}` + # @param parent [::String] + # Required. The parent of this `AccessPolicy` in the Cloud Resource + # Hierarchy. Currently immutable once created. Format: + # `organizations/{organization_id}` + # @param title [::String] + # Required. Human readable title. Does not affect behavior. + # @param scopes [::Array<::String>] + # The scopes of a policy define which resources an ACM policy can restrict, + # and where ACM resources can be referenced. + # For example, a policy with scopes=["folders/123"] has the following + # behavior: + # - vpcsc perimeters can only restrict projects within folders/123 + # - access levels can only be referenced by resources within folders/123. + # If empty, there are no limitations on which resources can be restricted by + # an ACM policy, and there are no limitations on where ACM resources can be + # referenced. + # Only one policy can include a given scope (attempting to create a second + # policy which includes "folders/123" will result in an error). + # Currently, scopes cannot be modified after a policy is created. + # Currently, policies can only have a single scope. + # Format: list of `folders/{folder_number}` or `projects/{project_number}` + # @param create_time [::Google::Protobuf::Timestamp, ::Hash] + # Output only. Time the `AccessPolicy` was created in UTC. + # @param update_time [::Google::Protobuf::Timestamp, ::Hash] + # Output only. Time the `AccessPolicy` was updated in UTC. + # @param etag [::String] + # Output only. An opaque identifier for the current version of the + # `AccessPolicy`. This will always be a strongly validated etag, meaning that + # two Access Polices will be identical if and only if their etags are + # identical. Clients should not expect this to be in any specific format. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::AccessPolicy.new + # + # # Call the create_access_policy method. + # result = client.create_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::AccessPolicy + + # Converts hash and nil to an 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_access_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::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_access_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.create_access_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. The + # long-running operation from this RPC has a successful status after the + # changes to the [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] propagate + # to long-lasting storage. + # + # @overload update_access_policy(request, options = nil) + # Pass arguments to `update_access_policy` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_access_policy(policy: nil, update_mask: nil) + # Pass arguments to `update_access_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 policy [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] + # Required. The updated AccessPolicy. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask to control which fields get updated. Must be non-empty. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new + # + # # Call the update_access_policy method. + # result = client.update_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest + + # Converts hash and nil to an 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_access_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::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_access_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.update_access_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the + # resource name. The long-running operation has a successful status after the + # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] + # is removed from long-lasting storage. + # + # @overload delete_access_policy(request, options = nil) + # Pass arguments to `delete_access_policy` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_access_policy(name: nil) + # Pass arguments to `delete_access_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 name [::String] + # Required. Resource name for the access policy to delete. + # + # Format `accessPolicies/{policy_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new + # + # # Call the delete_access_policy method. + # result = client.delete_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_access_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::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_access_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.delete_access_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] for an access + # policy. + # + # @overload list_access_levels(request, options = nil) + # Pass arguments to `list_access_levels` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_access_levels(parent: nil, page_size: nil, page_token: nil, access_level_format: nil) + # Pass arguments to `list_access_levels` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the access policy to list [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] from. + # + # Format: + # `accessPolicies/{policy_id}` + # @param page_size [::Integer] + # Number of [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] to include in + # the list. Default 100. + # @param page_token [::String] + # Next page token for the next batch of [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] instances. + # Defaults to the first page of results. + # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] + # Whether to return `BasicLevels` in the Cloud Common Expression language, as + # `CustomLevels`, rather than as `BasicLevels`. Defaults to returning + # `AccessLevels` in the format they were defined. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new + # + # # Call the list_access_levels method. + # result = client.list_access_levels request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel. + # p item + # end + # + def list_access_levels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_access_levels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_access_levels.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_access_levels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.list_access_levels request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_access_levels, "access_levels", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource + # name. + # + # @overload get_access_level(request, options = nil) + # Pass arguments to `get_access_level` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_access_level(name: nil, access_level_format: nil) + # Pass arguments to `get_access_level` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: + # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] + # Whether to return `BasicLevels` in the Cloud Common Expression + # Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where + # [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] + # are returned as `BasicLevels` or `CustomLevels` based on how they were + # created. If set to CEL, all [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] are returned as + # `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent + # `CustomLevels`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessLevel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new + # + # # Call the get_access_level method. + # result = client.get_access_level request + # + # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel. + # p result + # + def get_access_level request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_access_level.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_access_level.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_access_level.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.get_access_level request, 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 [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running + # operation from this RPC has a successful status after the [access + # level] [google.identity.accesscontextmanager.v1.AccessLevel] + # propagates to long-lasting storage. If [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contain + # errors, an error response is returned for the first error encountered. + # + # @overload create_access_level(request, options = nil) + # Pass arguments to `create_access_level` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_access_level(parent: nil, access_level: nil) + # Pass arguments to `create_access_level` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the access policy which owns this [Access + # Level] [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: `accessPolicies/{policy_id}` + # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] + # Required. The [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] to create. + # Syntactic correctness of the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] is a + # precondition for creation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new + # + # # Call the create_access_level method. + # result = client.create_access_level request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_access_level request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest + + # Converts hash and nil to an 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_access_level.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_access_level.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_access_level.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.create_access_level request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running + # operation from this RPC has a successful status after the changes to + # the [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] propagate + # to long-lasting storage. If [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contain + # errors, an error response is returned for the first error encountered. + # + # @overload update_access_level(request, options = nil) + # Pass arguments to `update_access_level` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_access_level(access_level: nil, update_mask: nil) + # Pass arguments to `update_access_level` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] + # Required. The updated [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic + # correctness of the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] is a + # precondition for creation. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask to control which fields get updated. Must be non-empty. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new + # + # # Call the update_access_level method. + # result = client.update_access_level request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_access_level request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest + + # Converts hash and nil to an 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_access_level.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_access_level.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_access_level.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.update_access_level request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource + # name. The long-running operation from this RPC has a successful status + # after the [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] has been removed + # from long-lasting storage. + # + # @overload delete_access_level(request, options = nil) + # Pass arguments to `delete_access_level` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_access_level(name: nil) + # Pass arguments to `delete_access_level` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: + # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new + # + # # Call the delete_access_level method. + # result = client.delete_access_level request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_access_level request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_access_level.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_access_level.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_access_level.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.delete_access_level request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Replaces all existing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] in an [access + # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with + # the [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] provided. This + # is done atomically. The long-running operation from this RPC has a + # successful status after all replacements propagate to long-lasting + # storage. If the replacement contains errors, an error response is returned + # for the first error encountered. Upon error, the replacement is cancelled, + # and existing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] are not + # affected. The Operation.response field contains + # ReplaceAccessLevelsResponse. Removing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an + # error. + # + # @overload replace_access_levels(request, options = nil) + # Pass arguments to `replace_access_levels` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload replace_access_levels(parent: nil, access_levels: nil, etag: nil) + # Pass arguments to `replace_access_levels` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the access policy which owns these + # [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: `accessPolicies/{policy_id}` + # @param access_levels [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash>] + # Required. The desired [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] that should + # replace all existing [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] in the + # [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. + # @param etag [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # replace operation is to be performed on. If, at the time of replace, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the replace operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new + # + # # Call the replace_access_levels method. + # result = client.replace_access_levels request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def replace_access_levels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.replace_access_levels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.replace_access_levels.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.replace_access_levels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.replace_access_levels request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] for an + # access policy. + # + # @overload list_service_perimeters(request, options = nil) + # Pass arguments to `list_service_perimeters` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_service_perimeters(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_service_perimeters` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the access policy to list [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] from. + # + # Format: + # `accessPolicies/{policy_id}` + # @param page_size [::Integer] + # Number of [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] to include + # in the list. Default 100. + # @param page_token [::String] + # Next page token for the next batch of [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. + # Defaults to the first page of results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new + # + # # Call the list_service_perimeters method. + # result = client.list_service_perimeters request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter. + # p item + # end + # + def list_service_perimeters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_service_perimeters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_service_perimeters.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_service_perimeters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.list_service_perimeters request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_service_perimeters, "service_perimeters", request, result, 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 [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the + # resource name. + # + # @overload get_service_perimeter(request, options = nil) + # Pass arguments to `get_service_perimeter` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_service_perimeter(name: nil) + # Pass arguments to `get_service_perimeter` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: + # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new + # + # # Call the get_service_perimeter method. + # result = client.get_service_perimeter request + # + # # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter. + # p result + # + def get_service_perimeter request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_service_perimeter.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_service_perimeter.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_service_perimeter.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.get_service_perimeter request, 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 [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The + # long-running operation from this RPC has a successful status after the + # [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] + # propagates to long-lasting storage. If a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains + # errors, an error response is returned for the first error encountered. + # + # @overload create_service_perimeter(request, options = nil) + # Pass arguments to `create_service_perimeter` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_service_perimeter(parent: nil, service_perimeter: nil) + # Pass arguments to `create_service_perimeter` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the access policy which owns this [Service + # Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: `accessPolicies/{policy_id}` + # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] + # Required. The [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] to create. + # Syntactic correctness of the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] is a + # precondition for creation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new + # + # # Call the create_service_perimeter method. + # result = client.create_service_perimeter request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_service_perimeter request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest + + # Converts hash and nil to an 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_service_perimeter.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_service_perimeter.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_service_perimeter.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.create_service_perimeter request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The + # long-running operation from this RPC has a successful status after the + # [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] + # propagates to long-lasting storage. If a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains + # errors, an error response is returned for the first error encountered. + # + # @overload update_service_perimeter(request, options = nil) + # Pass arguments to `update_service_perimeter` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_service_perimeter(service_perimeter: nil, update_mask: nil) + # Pass arguments to `update_service_perimeter` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] + # Required. The updated `ServicePerimeter`. Syntactic correctness of the + # `ServicePerimeter` is a precondition for creation. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask to control which fields get updated. Must be non-empty. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new + # + # # Call the update_service_perimeter method. + # result = client.update_service_perimeter request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_service_perimeter request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest + + # Converts hash and nil to an 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_service_perimeter.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_service_perimeter.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_service_perimeter.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.update_service_perimeter request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the + # resource name. The long-running operation from this RPC has a successful + # status after the [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from + # long-lasting storage. + # + # @overload delete_service_perimeter(request, options = nil) + # Pass arguments to `delete_service_perimeter` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_service_perimeter(name: nil) + # Pass arguments to `delete_service_perimeter` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: + # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new + # + # # Call the delete_service_perimeter method. + # result = client.delete_service_perimeter request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_service_perimeter request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_service_perimeter.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_service_perimeter.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_service_perimeter.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.delete_service_perimeter request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Replace all existing [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access + # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This + # is done atomically. The long-running operation from this RPC has a + # successful status after all replacements propagate to long-lasting storage. + # Replacements containing errors result in an error response for the first + # error encountered. Upon an error, replacement are cancelled and existing + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] are not + # affected. The Operation.response field contains + # ReplaceServicePerimetersResponse. + # + # @overload replace_service_perimeters(request, options = nil) + # Pass arguments to `replace_service_perimeters` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload replace_service_perimeters(parent: nil, service_perimeters: nil, etag: nil) + # Pass arguments to `replace_service_perimeters` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the access policy which owns these + # [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: `accessPolicies/{policy_id}` + # @param service_perimeters [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash>] + # Required. The desired [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] that should + # replace all existing [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in the + # [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. + # @param etag [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # replace operation is to be performed on. If, at the time of replace, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the replace operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new + # + # # Call the replace_service_perimeters method. + # result = client.replace_service_perimeters request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def replace_service_perimeters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.replace_service_perimeters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.replace_service_perimeters.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.replace_service_perimeters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.replace_service_perimeters request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Commits the dry-run specification for all the [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an + # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. + # A commit operation on a service perimeter involves copying its `spec` field + # to the `status` field of the service perimeter. Only [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] with + # `use_explicit_dry_run_spec` field set to true are affected by a commit + # operation. The long-running operation from this RPC has a successful + # status after the dry-run specifications for all the [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] have been + # committed. If a commit fails, it causes the long-running operation to + # return an error response and the entire commit operation is cancelled. + # When successful, the Operation.response field contains + # CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are + # cleared after a successful commit operation. + # + # @overload commit_service_perimeters(request, options = nil) + # Pass arguments to `commit_service_perimeters` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload commit_service_perimeters(parent: nil, etag: nil) + # Pass arguments to `commit_service_perimeters` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 for the parent [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all + # [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for + # the commit operation. + # + # Format: `accessPolicies/{policy_id}` + # @param etag [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # commit operation is to be performed on. If, at the time of commit, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the commit operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new + # + # # Call the commit_service_perimeters method. + # result = client.commit_service_perimeters request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def commit_service_perimeters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.commit_service_perimeters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.commit_service_perimeters.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.commit_service_perimeters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.commit_service_perimeters request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 [GcpUserAccessBindings] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a + # Google Cloud organization. + # + # @overload list_gcp_user_access_bindings(request, options = nil) + # Pass arguments to `list_gcp_user_access_bindings` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_gcp_user_access_bindings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gcp_user_access_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Example: "organizations/256" + # @param page_size [::Integer] + # Optional. Maximum number of items to return. The server may return fewer items. + # If left blank, the server may return any number of items. + # @param page_token [::String] + # Optional. If left blank, returns the first page. To enumerate all items, use the + # [next_page_token] + # [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token] + # from your previous list operation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new + # + # # Call the list_gcp_user_access_bindings method. + # result = client.list_gcp_user_access_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. + # p item + # end + # + def list_gcp_user_access_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_gcp_user_access_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_gcp_user_access_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_gcp_user_access_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.list_gcp_user_access_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_gcp_user_access_bindings, "gcp_user_access_bindings", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with + # the given name. + # + # @overload get_gcp_user_access_binding(request, options = nil) + # Pass arguments to `get_gcp_user_access_binding` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_gcp_user_access_binding(name: nil) + # Pass arguments to `get_gcp_user_access_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new + # + # # Call the get_gcp_user_access_binding method. + # result = client.get_gcp_user_access_binding request + # + # # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. + # p result + # + def get_gcp_user_access_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_gcp_user_access_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_gcp_user_access_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_gcp_user_access_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.get_gcp_user_access_binding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the + # client specifies a [name] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], + # the server ignores it. Fails if a resource already exists with the same + # [group_key] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. + # Completion of this long-running operation does not necessarily signify that + # the new binding is deployed onto all affected users, which may take more + # time. + # + # @overload create_gcp_user_access_binding(request, options = nil) + # Pass arguments to `create_gcp_user_access_binding` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_gcp_user_access_binding(parent: nil, gcp_user_access_binding: nil) + # Pass arguments to `create_gcp_user_access_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Example: "organizations/256" + # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] + # Required. [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new + # + # # Call the create_gcp_user_access_binding method. + # result = client.create_gcp_user_access_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_gcp_user_access_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest + + # Converts hash and nil to an 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_gcp_user_access_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_gcp_user_access_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_gcp_user_access_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.create_gcp_user_access_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. + # Completion of this long-running operation does not necessarily signify that + # the changed binding is deployed onto all affected users, which may take + # more time. + # + # @overload update_gcp_user_access_binding(request, options = nil) + # Pass arguments to `update_gcp_user_access_binding` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_gcp_user_access_binding(gcp_user_access_binding: nil, update_mask: nil) + # Pass arguments to `update_gcp_user_access_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] + # Required. [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Only the fields specified in this mask are updated. Because name and + # group_key cannot be changed, update_mask is required and must always be: + # + # update_mask { + # paths: "access_levels" + # } + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new + # + # # Call the update_gcp_user_access_binding method. + # result = client.update_gcp_user_access_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_gcp_user_access_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest + + # Converts hash and nil to an 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_gcp_user_access_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_gcp_user_access_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_gcp_user_access_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.update_gcp_user_access_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. + # Completion of this long-running operation does not necessarily signify that + # the binding deletion is deployed onto all affected users, which may take + # more time. + # + # @overload delete_gcp_user_access_binding(request, options = nil) + # Pass arguments to `delete_gcp_user_access_binding` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_gcp_user_access_binding(name: nil) + # Pass arguments to `delete_gcp_user_access_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new + # + # # Call the delete_gcp_user_access_binding method. + # result = client.delete_gcp_user_access_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_gcp_user_access_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_gcp_user_access_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_gcp_user_access_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_gcp_user_access_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.delete_gcp_user_access_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the IAM policy for the specified Access Context Manager + # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. + # This method replaces the existing IAM policy on the access policy. The IAM + # policy controls the set of users who can perform specific operations on the + # Access Context Manager [access + # policy][google.identity.accesscontextmanager.v1.AccessPolicy]. + # + # @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/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @access_context_manager_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM policy for the specified Access Context Manager + # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. + # + # @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/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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 + + @access_context_manager_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 + + ## + # Returns the IAM permissions that the caller has on the specified Access + # Context Manager resource. The resource can be an + # {::Google::Identity::AccessContextManager::V1::AccessPolicy AccessPolicy}, + # {::Google::Identity::AccessContextManager::V1::AccessLevel AccessLevel}, or + # [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter + # ]. This method does not support other resources. + # + # @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/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @access_context_manager_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AccessContextManager REST API. + # + # This class represents the configuration for AccessContextManager 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::Identity::AccessContextManager::V1::AccessContextManager::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_access_policies to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_access_policies.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_access_policies.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "accesscontextmanager.googleapis.com" + + config_attr :endpoint, nil, ::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 AccessContextManager API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_access_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_access_policies + ## + # RPC-specific configuration for `get_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_access_policy + ## + # RPC-specific configuration for `create_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_access_policy + ## + # RPC-specific configuration for `update_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_access_policy + ## + # RPC-specific configuration for `delete_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_access_policy + ## + # RPC-specific configuration for `list_access_levels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_access_levels + ## + # RPC-specific configuration for `get_access_level` + # @return [::Gapic::Config::Method] + # + attr_reader :get_access_level + ## + # RPC-specific configuration for `create_access_level` + # @return [::Gapic::Config::Method] + # + attr_reader :create_access_level + ## + # RPC-specific configuration for `update_access_level` + # @return [::Gapic::Config::Method] + # + attr_reader :update_access_level + ## + # RPC-specific configuration for `delete_access_level` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_access_level + ## + # RPC-specific configuration for `replace_access_levels` + # @return [::Gapic::Config::Method] + # + attr_reader :replace_access_levels + ## + # RPC-specific configuration for `list_service_perimeters` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_perimeters + ## + # RPC-specific configuration for `get_service_perimeter` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_perimeter + ## + # RPC-specific configuration for `create_service_perimeter` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_perimeter + ## + # RPC-specific configuration for `update_service_perimeter` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service_perimeter + ## + # RPC-specific configuration for `delete_service_perimeter` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service_perimeter + ## + # RPC-specific configuration for `replace_service_perimeters` + # @return [::Gapic::Config::Method] + # + attr_reader :replace_service_perimeters + ## + # RPC-specific configuration for `commit_service_perimeters` + # @return [::Gapic::Config::Method] + # + attr_reader :commit_service_perimeters + ## + # RPC-specific configuration for `list_gcp_user_access_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gcp_user_access_bindings + ## + # RPC-specific configuration for `get_gcp_user_access_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_gcp_user_access_binding + ## + # RPC-specific configuration for `create_gcp_user_access_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_gcp_user_access_binding + ## + # RPC-specific configuration for `update_gcp_user_access_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_gcp_user_access_binding + ## + # RPC-specific configuration for `delete_gcp_user_access_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_gcp_user_access_binding + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies + @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config + get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy + @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config + create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy + @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config + update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy + @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config + delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy + @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config + list_access_levels_config = parent_rpcs.list_access_levels if parent_rpcs.respond_to? :list_access_levels + @list_access_levels = ::Gapic::Config::Method.new list_access_levels_config + get_access_level_config = parent_rpcs.get_access_level if parent_rpcs.respond_to? :get_access_level + @get_access_level = ::Gapic::Config::Method.new get_access_level_config + create_access_level_config = parent_rpcs.create_access_level if parent_rpcs.respond_to? :create_access_level + @create_access_level = ::Gapic::Config::Method.new create_access_level_config + update_access_level_config = parent_rpcs.update_access_level if parent_rpcs.respond_to? :update_access_level + @update_access_level = ::Gapic::Config::Method.new update_access_level_config + delete_access_level_config = parent_rpcs.delete_access_level if parent_rpcs.respond_to? :delete_access_level + @delete_access_level = ::Gapic::Config::Method.new delete_access_level_config + replace_access_levels_config = parent_rpcs.replace_access_levels if parent_rpcs.respond_to? :replace_access_levels + @replace_access_levels = ::Gapic::Config::Method.new replace_access_levels_config + list_service_perimeters_config = parent_rpcs.list_service_perimeters if parent_rpcs.respond_to? :list_service_perimeters + @list_service_perimeters = ::Gapic::Config::Method.new list_service_perimeters_config + get_service_perimeter_config = parent_rpcs.get_service_perimeter if parent_rpcs.respond_to? :get_service_perimeter + @get_service_perimeter = ::Gapic::Config::Method.new get_service_perimeter_config + create_service_perimeter_config = parent_rpcs.create_service_perimeter if parent_rpcs.respond_to? :create_service_perimeter + @create_service_perimeter = ::Gapic::Config::Method.new create_service_perimeter_config + update_service_perimeter_config = parent_rpcs.update_service_perimeter if parent_rpcs.respond_to? :update_service_perimeter + @update_service_perimeter = ::Gapic::Config::Method.new update_service_perimeter_config + delete_service_perimeter_config = parent_rpcs.delete_service_perimeter if parent_rpcs.respond_to? :delete_service_perimeter + @delete_service_perimeter = ::Gapic::Config::Method.new delete_service_perimeter_config + replace_service_perimeters_config = parent_rpcs.replace_service_perimeters if parent_rpcs.respond_to? :replace_service_perimeters + @replace_service_perimeters = ::Gapic::Config::Method.new replace_service_perimeters_config + commit_service_perimeters_config = parent_rpcs.commit_service_perimeters if parent_rpcs.respond_to? :commit_service_perimeters + @commit_service_perimeters = ::Gapic::Config::Method.new commit_service_perimeters_config + list_gcp_user_access_bindings_config = parent_rpcs.list_gcp_user_access_bindings if parent_rpcs.respond_to? :list_gcp_user_access_bindings + @list_gcp_user_access_bindings = ::Gapic::Config::Method.new list_gcp_user_access_bindings_config + get_gcp_user_access_binding_config = parent_rpcs.get_gcp_user_access_binding if parent_rpcs.respond_to? :get_gcp_user_access_binding + @get_gcp_user_access_binding = ::Gapic::Config::Method.new get_gcp_user_access_binding_config + create_gcp_user_access_binding_config = parent_rpcs.create_gcp_user_access_binding if parent_rpcs.respond_to? :create_gcp_user_access_binding + @create_gcp_user_access_binding = ::Gapic::Config::Method.new create_gcp_user_access_binding_config + update_gcp_user_access_binding_config = parent_rpcs.update_gcp_user_access_binding if parent_rpcs.respond_to? :update_gcp_user_access_binding + @update_gcp_user_access_binding = ::Gapic::Config::Method.new update_gcp_user_access_binding_config + delete_gcp_user_access_binding_config = parent_rpcs.delete_gcp_user_access_binding if parent_rpcs.respond_to? :delete_gcp_user_access_binding + @delete_gcp_user_access_binding = ::Gapic::Config::Method.new delete_gcp_user_access_binding_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb new file mode 100644 index 000000000000..7be075887045 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Identity + module AccessContextManager + module V1 + module AccessContextManager + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AccessContextManager 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 AccessContextManager 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::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "accesscontextmanager.googleapis.com" + + config_attr :endpoint, nil, ::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-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb new file mode 100644 index 000000000000..2eba8ab83681 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb @@ -0,0 +1,1693 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/identity/accesscontextmanager/v1/access_context_manager_pb" + +module Google + module Identity + module AccessContextManager + module V1 + module AccessContextManager + module Rest + ## + # REST service stub for the AccessContextManager 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_access_policies REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse] + # A result object deserialized from the server's reply + def list_access_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_access_policies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_access_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_access_policy REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # A result object deserialized from the server's reply + def get_access_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_access_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_access_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Identity::AccessContextManager::V1::AccessPolicy.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_access_policy REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_access_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: "create_access_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_access_policy REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_access_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: "update_access_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_access_policy REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_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: "delete_access_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_access_levels REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse] + # A result object deserialized from the server's reply + def list_access_levels request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_access_levels_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_access_levels", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_access_level REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessLevel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] + # A result object deserialized from the server's reply + def get_access_level request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_access_level_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_access_level", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Identity::AccessContextManager::V1::AccessLevel.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_access_level REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_level request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_access_level_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_access_level", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_access_level REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_level request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_access_level_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_access_level", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_access_level REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_level request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_level_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_access_level", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the replace_access_levels REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def replace_access_levels request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_replace_access_levels_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "replace_access_levels", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_service_perimeters REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse] + # A result object deserialized from the server's reply + def list_service_perimeters request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_service_perimeters_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_service_perimeters", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_service_perimeter REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # A result object deserialized from the server's reply + def get_service_perimeter request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_service_perimeter_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_service_perimeter", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Identity::AccessContextManager::V1::ServicePerimeter.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_service_perimeter REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_service_perimeter request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_service_perimeter_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_service_perimeter", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_service_perimeter REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_service_perimeter request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_service_perimeter_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_service_perimeter", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_service_perimeter REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_service_perimeter request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_perimeter_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_service_perimeter", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the replace_service_perimeters REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def replace_service_perimeters request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_replace_service_perimeters_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "replace_service_perimeters", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the commit_service_perimeters REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def commit_service_perimeters request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_commit_service_perimeters_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "commit_service_perimeters", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_gcp_user_access_bindings REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse] + # A result object deserialized from the server's reply + def list_gcp_user_access_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_gcp_user_access_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_gcp_user_access_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_gcp_user_access_binding REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] + # A result object deserialized from the server's reply + def get_gcp_user_access_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_gcp_user_access_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_gcp_user_access_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.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_gcp_user_access_binding REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_gcp_user_access_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_gcp_user_access_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_gcp_user_access_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_gcp_user_access_binding REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_gcp_user_access_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_gcp_user_access_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_gcp_user_access_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_gcp_user_access_binding REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_gcp_user_access_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_gcp_user_access_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_gcp_user_access_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_access_policies REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_access_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/accessPolicies", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_access_policy REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_access_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_access_policy REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # 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_access_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/accessPolicies", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_access_policy REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest] + # 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_access_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{policy.name}", + body: "policy", + matches: [ + ["policy.name", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_access_policy REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_access_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_access_levels REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_access_levels_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/accessLevels", + matches: [ + ["parent", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_access_level REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_access_level_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_access_level REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest] + # 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_access_level_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/accessLevels", + body: "access_level", + matches: [ + ["parent", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_access_level REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest] + # 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_access_level_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{access_level.name}", + body: "access_level", + matches: [ + ["access_level.name", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_access_level REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_access_level_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the replace_access_levels REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_replace_access_levels_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/accessLevels:replaceAll", + body: "*", + matches: [ + ["parent", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_service_perimeters REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_service_perimeters_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/servicePerimeters", + matches: [ + ["parent", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_service_perimeter REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_service_perimeter_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_service_perimeter REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest] + # 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_service_perimeter_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/servicePerimeters", + body: "service_perimeter", + matches: [ + ["parent", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_service_perimeter REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest] + # 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_service_perimeter_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{service_perimeter.name}", + body: "service_perimeter", + matches: [ + ["service_perimeter.name", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_service_perimeter REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_service_perimeter_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the replace_service_perimeters REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_replace_service_perimeters_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/servicePerimeters:replaceAll", + body: "*", + matches: [ + ["parent", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the commit_service_perimeters REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_commit_service_perimeters_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/servicePerimeters:commit", + body: "*", + matches: [ + ["parent", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_gcp_user_access_bindings REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_gcp_user_access_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/gcpUserAccessBindings", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_gcp_user_access_binding REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_gcp_user_access_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/gcpUserAccessBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_gcp_user_access_binding REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest] + # 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_gcp_user_access_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/gcpUserAccessBindings", + body: "gcp_user_access_binding", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_gcp_user_access_binding REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest] + # 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_gcp_user_access_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{gcp_user_access_binding.name}", + body: "gcp_user_access_binding", + matches: [ + ["gcp_user_access_binding.name", %r{^organizations/[^/]+/gcpUserAccessBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_gcp_user_access_binding REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_gcp_user_access_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/gcpUserAccessBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^accessPolicies/[^/]+/?$}, 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: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb new file mode 100644 index 000000000000..b85e8d3b9a1c --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/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/identity/access_context_manager/v1/access_context_manager/rest" +require "google/identity/access_context_manager/v1/version" + +module Google + module Identity + module AccessContextManager + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/identity/access_context_manager/v1/rest" + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb new file mode 100644 index 000000000000..d2c2604fbcd6 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/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 Identity + module AccessContextManager + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb new file mode 100644 index 000000000000..5b241ff87987 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/identity/accesscontextmanager/type/device_resources.proto + +require 'google/protobuf' + + +descriptor_data = "\n@google/identity/accesscontextmanager/type/device_resources.proto\x12)google.identity.accesscontextmanager.type*p\n\x16\x44\x65viceEncryptionStatus\x12\x1a\n\x16\x45NCRYPTION_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x45NCRYPTION_UNSUPPORTED\x10\x01\x12\x0f\n\x0bUNENCRYPTED\x10\x02\x12\r\n\tENCRYPTED\x10\x03*\x82\x01\n\x06OsType\x12\x12\n\x0eOS_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x44\x45SKTOP_MAC\x10\x01\x12\x13\n\x0f\x44\x45SKTOP_WINDOWS\x10\x02\x12\x11\n\rDESKTOP_LINUX\x10\x03\x12\x15\n\x11\x44\x45SKTOP_CHROME_OS\x10\x06\x12\x0b\n\x07\x41NDROID\x10\x04\x12\x07\n\x03IOS\x10\x05*V\n\x15\x44\x65viceManagementLevel\x12\x1a\n\x16MANAGEMENT_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x12\x0c\n\x08\x43OMPLETE\x10\x03\x42\x8d\x02\n-com.google.identity.accesscontextmanager.typeB\tTypeProtoP\x01ZHgoogle.golang.org/genproto/googleapis/identity/accesscontextmanager/type\xaa\x02)Google.Identity.AccessContextManager.Type\xca\x02)Google\\Identity\\AccessContextManager\\Type\xea\x02,Google::Identity::AccessContextManager::Typeb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Identity + module AccessContextManager + module Type + DeviceEncryptionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.type.DeviceEncryptionStatus").enummodule + OsType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.type.OsType").enummodule + DeviceManagementLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.type.DeviceManagementLevel").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb new file mode 100644 index 000000000000..73ed14280699 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/identity/accesscontextmanager/v1/access_context_manager.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/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/identity/accesscontextmanager/v1/access_level_pb' +require 'google/identity/accesscontextmanager/v1/access_policy_pb' +require 'google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb' +require 'google/identity/accesscontextmanager/v1/service_perimeter_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nDgoogle/identity/accesscontextmanager/v1/access_context_manager.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a:google/identity/accesscontextmanager/v1/access_level.proto\x1a;google/identity/accesscontextmanager/v1/access_policy.proto\x1a\x45google/identity/accesscontextmanager/v1/gcp_user_access_binding.proto\x1a?google/identity/accesscontextmanager/v1/service_perimeter.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\"\x8c\x01\n\x19ListAccessPoliciesRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x85\x01\n\x1aListAccessPoliciesResponse\x12N\n\x0f\x61\x63\x63\x65ss_policies\x18\x01 \x03(\x0b\x32\x35.google.identity.accesscontextmanager.v1.AccessPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"`\n\x16GetAccessPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0accesscontextmanager.googleapis.com/AccessPolicy\"\x9d\x01\n\x19UpdateAccessPolicyRequest\x12J\n\x06policy\x18\x01 \x01(\x0b\x32\x35.google.identity.accesscontextmanager.v1.AccessPolicyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"c\n\x19\x44\x65leteAccessPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0accesscontextmanager.googleapis.com/AccessPolicy\"\xdc\x01\n\x17ListAccessLevelsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/accesscontextmanager.googleapis.com/AccessLevel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12Q\n\x13\x61\x63\x63\x65ss_level_format\x18\x04 \x01(\x0e\x32\x34.google.identity.accesscontextmanager.v1.LevelFormat\"\x80\x01\n\x18ListAccessLevelsResponse\x12K\n\raccess_levels\x18\x01 \x03(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb1\x01\n\x15GetAccessLevelRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/accesscontextmanager.googleapis.com/AccessLevel\x12Q\n\x13\x61\x63\x63\x65ss_level_format\x18\x02 \x01(\x0e\x32\x34.google.identity.accesscontextmanager.v1.LevelFormat\"\xb4\x01\n\x18\x43reateAccessLevelRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/accesscontextmanager.googleapis.com/AccessLevel\x12O\n\x0c\x61\x63\x63\x65ss_level\x18\x02 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelB\x03\xe0\x41\x02\"\xa1\x01\n\x18UpdateAccessLevelRequest\x12O\n\x0c\x61\x63\x63\x65ss_level\x18\x01 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"a\n\x18\x44\x65leteAccessLevelRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/accesscontextmanager.googleapis.com/AccessLevel\"\xc5\x01\n\x1aReplaceAccessLevelsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/accesscontextmanager.googleapis.com/AccessLevel\x12P\n\raccess_levels\x18\x02 \x03(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelB\x03\xe0\x41\x02\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\"j\n\x1bReplaceAccessLevelsResponse\x12K\n\raccess_levels\x18\x01 \x03(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevel\"\x93\x01\n\x1cListServicePerimetersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8f\x01\n\x1dListServicePerimetersResponse\x12U\n\x12service_perimeters\x18\x01 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"h\n\x1aGetServicePerimeterRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4accesscontextmanager.googleapis.com/ServicePerimeter\"\xc8\x01\n\x1d\x43reateServicePerimeterRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12Y\n\x11service_perimeter\x18\x02 \x01(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterB\x03\xe0\x41\x02\"\xb0\x01\n\x1dUpdateServicePerimeterRequest\x12Y\n\x11service_perimeter\x18\x01 \x01(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"k\n\x1d\x44\x65leteServicePerimeterRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4accesscontextmanager.googleapis.com/ServicePerimeter\"\xd9\x01\n\x1fReplaceServicePerimetersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12Z\n\x12service_perimeters\x18\x02 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterB\x03\xe0\x41\x02\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"y\n ReplaceServicePerimetersResponse\x12U\n\x12service_perimeters\x18\x01 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\"|\n\x1e\x43ommitServicePerimetersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\"x\n\x1f\x43ommitServicePerimetersResponse\x12U\n\x12service_perimeters\x18\x01 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\"\x9d\x01\n ListGcpUserAccessBindingsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n!ListGcpUserAccessBindingsResponse\x12_\n\x18gcp_user_access_bindings\x18\x01 \x03(\x0b\x32=.google.identity.accesscontextmanager.v1.GcpUserAccessBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"p\n\x1eGetGcpUserAccessBindingRequest\x12N\n\x04name\x18\x01 \x01(\tB@\xe0\x41\x02\xfa\x41:\n8accesscontextmanager.googleapis.com/GcpUserAccessBinding\"\xd2\x01\n!CreateGcpUserAccessBindingRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x63\n\x17gcp_user_access_binding\x18\x02 \x01(\x0b\x32=.google.identity.accesscontextmanager.v1.GcpUserAccessBindingB\x03\xe0\x41\x02\"\xbe\x01\n!UpdateGcpUserAccessBindingRequest\x12\x63\n\x17gcp_user_access_binding\x18\x01 \x01(\x0b\x32=.google.identity.accesscontextmanager.v1.GcpUserAccessBindingB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"s\n!DeleteGcpUserAccessBindingRequest\x12N\n\x04name\x18\x01 \x01(\tB@\xe0\x41\x02\xfa\x41:\n8accesscontextmanager.googleapis.com/GcpUserAccessBinding\"\'\n%GcpUserAccessBindingOperationMetadata\"\'\n%AccessContextManagerOperationMetadata*D\n\x0bLevelFormat\x12\x1c\n\x18LEVEL_FORMAT_UNSPECIFIED\x10\x00\x12\x0e\n\nAS_DEFINED\x10\x01\x12\x07\n\x03\x43\x45L\x10\x02\x32\xf1\x32\n\x14\x41\x63\x63\x65ssContextManager\x12\xb9\x01\n\x12ListAccessPolicies\x12\x42.google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest\x1a\x43.google.identity.accesscontextmanager.v1.ListAccessPoliciesResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/v1/accessPolicies\x12\xb5\x01\n\x0fGetAccessPolicy\x12?.google.identity.accesscontextmanager.v1.GetAccessPolicyRequest\x1a\x35.google.identity.accesscontextmanager.v1.AccessPolicy\"*\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1d\x12\x1b/v1/{name=accessPolicies/*}\x12\xc1\x01\n\x12\x43reateAccessPolicy\x12\x35.google.identity.accesscontextmanager.v1.AccessPolicy\x1a\x1d.google.longrunning.Operation\"U\xca\x41\x35\n\x0c\x41\x63\x63\x65ssPolicy\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02\x17\"\x12/v1/accessPolicies:\x01*\x12\xf8\x01\n\x12UpdateAccessPolicy\x12\x42.google.identity.accesscontextmanager.v1.UpdateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x35\n\x0c\x41\x63\x63\x65ssPolicy\x12%AccessContextManagerOperationMetadata\xda\x41\x12policy,update_mask\x82\xd3\xe4\x93\x02,2\"/v1/{policy.name=accessPolicies/*}:\x06policy\x12\xe4\x01\n\x12\x44\x65leteAccessPolicy\x12\x42.google.identity.accesscontextmanager.v1.DeleteAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41>\n\x15google.protobuf.Empty\x12%AccessContextManagerOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1d*\x1b/v1/{name=accessPolicies/*}\x12\xd4\x01\n\x10ListAccessLevels\x12@.google.identity.accesscontextmanager.v1.ListAccessLevelsRequest\x1a\x41.google.identity.accesscontextmanager.v1.ListAccessLevelsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=accessPolicies/*}/accessLevels\x12\xc1\x01\n\x0eGetAccessLevel\x12>.google.identity.accesscontextmanager.v1.GetAccessLevelRequest\x1a\x34.google.identity.accesscontextmanager.v1.AccessLevel\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=accessPolicies/*/accessLevels/*}\x12\x85\x02\n\x11\x43reateAccessLevel\x12\x41.google.identity.accesscontextmanager.v1.CreateAccessLevelRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41\x34\n\x0b\x41\x63\x63\x65ssLevel\x12%AccessContextManagerOperationMetadata\xda\x41\x13parent,access_level\x82\xd3\xe4\x93\x02:\"*/v1/{parent=accessPolicies/*}/accessLevels:\x0c\x61\x63\x63\x65ss_level\x12\x97\x02\n\x11UpdateAccessLevel\x12\x41.google.identity.accesscontextmanager.v1.UpdateAccessLevelRequest\x1a\x1d.google.longrunning.Operation\"\x9f\x01\xca\x41\x34\n\x0b\x41\x63\x63\x65ssLevel\x12%AccessContextManagerOperationMetadata\xda\x41\x18\x61\x63\x63\x65ss_level,update_mask\x82\xd3\xe4\x93\x02G27/v1/{access_level.name=accessPolicies/*/accessLevels/*}:\x0c\x61\x63\x63\x65ss_level\x12\xf1\x01\n\x11\x44\x65leteAccessLevel\x12\x41.google.identity.accesscontextmanager.v1.DeleteAccessLevelRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41>\n\x15google.protobuf.Empty\x12%AccessContextManagerOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=accessPolicies/*/accessLevels/*}\x12\x83\x02\n\x13ReplaceAccessLevels\x12\x43.google.identity.accesscontextmanager.v1.ReplaceAccessLevelsRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x44\n\x1bReplaceAccessLevelsResponse\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02:\"5/v1/{parent=accessPolicies/*}/accessLevels:replaceAll:\x01*\x12\xe8\x01\n\x15ListServicePerimeters\x12\x45.google.identity.accesscontextmanager.v1.ListServicePerimetersRequest\x1a\x46.google.identity.accesscontextmanager.v1.ListServicePerimetersResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=accessPolicies/*}/servicePerimeters\x12\xd5\x01\n\x13GetServicePerimeter\x12\x43.google.identity.accesscontextmanager.v1.GetServicePerimeterRequest\x1a\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=accessPolicies/*/servicePerimeters/*}\x12\xa3\x02\n\x16\x43reateServicePerimeter\x12\x46.google.identity.accesscontextmanager.v1.CreateServicePerimeterRequest\x1a\x1d.google.longrunning.Operation\"\xa1\x01\xca\x41\x39\n\x10ServicePerimeter\x12%AccessContextManagerOperationMetadata\xda\x41\x18parent,service_perimeter\x82\xd3\xe4\x93\x02\x44\"//v1/{parent=accessPolicies/*}/servicePerimeters:\x11service_perimeter\x12\xba\x02\n\x16UpdateServicePerimeter\x12\x46.google.identity.accesscontextmanager.v1.UpdateServicePerimeterRequest\x1a\x1d.google.longrunning.Operation\"\xb8\x01\xca\x41\x39\n\x10ServicePerimeter\x12%AccessContextManagerOperationMetadata\xda\x41\x1dservice_perimeter,update_mask\x82\xd3\xe4\x93\x02V2A/v1/{service_perimeter.name=accessPolicies/*/servicePerimeters/*}:\x11service_perimeter\x12\x80\x02\n\x16\x44\x65leteServicePerimeter\x12\x46.google.identity.accesscontextmanager.v1.DeleteServicePerimeterRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41>\n\x15google.protobuf.Empty\x12%AccessContextManagerOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=accessPolicies/*/servicePerimeters/*}\x12\x97\x02\n\x18ReplaceServicePerimeters\x12H.google.identity.accesscontextmanager.v1.ReplaceServicePerimetersRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41I\n ReplaceServicePerimetersResponse\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02?\":/v1/{parent=accessPolicies/*}/servicePerimeters:replaceAll:\x01*\x12\x90\x02\n\x17\x43ommitServicePerimeters\x12G.google.identity.accesscontextmanager.v1.CommitServicePerimetersRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41H\n\x1f\x43ommitServicePerimetersResponse\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02;\"6/v1/{parent=accessPolicies/*}/servicePerimeters:commit:\x01*\x12\xf7\x01\n\x19ListGcpUserAccessBindings\x12I.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest\x1aJ.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=organizations/*}/gcpUserAccessBindings\x12\xe4\x01\n\x17GetGcpUserAccessBinding\x12G.google.identity.accesscontextmanager.v1.GetGcpUserAccessBindingRequest\x1a=.google.identity.accesscontextmanager.v1.GcpUserAccessBinding\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=organizations/*/gcpUserAccessBindings/*}\x12\xbe\x02\n\x1a\x43reateGcpUserAccessBinding\x12J.google.identity.accesscontextmanager.v1.CreateGcpUserAccessBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41=\n\x14GcpUserAccessBinding\x12%GcpUserAccessBindingOperationMetadata\xda\x41\x1eparent,gcp_user_access_binding\x82\xd3\xe4\x93\x02M\"2/v1/{parent=organizations/*}/gcpUserAccessBindings:\x17gcp_user_access_binding\x12\xdb\x02\n\x1aUpdateGcpUserAccessBinding\x12J.google.identity.accesscontextmanager.v1.UpdateGcpUserAccessBindingRequest\x1a\x1d.google.longrunning.Operation\"\xd1\x01\xca\x41=\n\x14GcpUserAccessBinding\x12%GcpUserAccessBindingOperationMetadata\xda\x41#gcp_user_access_binding,update_mask\x82\xd3\xe4\x93\x02\x65\x32J/v1/{gcp_user_access_binding.name=organizations/*/gcpUserAccessBindings/*}:\x17gcp_user_access_binding\x12\x8c\x02\n\x1a\x44\x65leteGcpUserAccessBinding\x12J.google.identity.accesscontextmanager.v1.DeleteGcpUserAccessBindingRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41>\n\x15google.protobuf.Empty\x12%GcpUserAccessBindingOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=organizations/*/gcpUserAccessBindings/*}\x12\x82\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"7\x82\xd3\xe4\x93\x02\x31\",/v1/{resource=accessPolicies/*}:setIamPolicy:\x01*\x12\x82\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"7\x82\xd3\xe4\x93\x02\x31\",/v1/{resource=accessPolicies/*}:getIamPolicy:\x01*\x12\xbf\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xd3\x01\x82\xd3\xe4\x93\x02\xcc\x01\"2/v1/{resource=accessPolicies/*}:testIamPermissions:\x01*ZF\"A/v1/{resource=accessPolicies/*/accessLevels/*}:testIamPermissions:\x01*ZK\"F/v1/{resource=accessPolicies/*/servicePerimeters/*}:testIamPermissions:\x01*\x1aW\xca\x41#accesscontextmanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb0\x02\n+com.google.identity.accesscontextmanager.v1B\x19\x41\x63\x63\x65ssContextManagerProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Identity + module AccessContextManager + module V1 + ListAccessPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest").msgclass + ListAccessPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessPoliciesResponse").msgclass + GetAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetAccessPolicyRequest").msgclass + UpdateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateAccessPolicyRequest").msgclass + DeleteAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteAccessPolicyRequest").msgclass + ListAccessLevelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessLevelsRequest").msgclass + ListAccessLevelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessLevelsResponse").msgclass + GetAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetAccessLevelRequest").msgclass + CreateAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CreateAccessLevelRequest").msgclass + UpdateAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateAccessLevelRequest").msgclass + DeleteAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteAccessLevelRequest").msgclass + ReplaceAccessLevelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceAccessLevelsRequest").msgclass + ReplaceAccessLevelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceAccessLevelsResponse").msgclass + ListServicePerimetersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListServicePerimetersRequest").msgclass + ListServicePerimetersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListServicePerimetersResponse").msgclass + GetServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetServicePerimeterRequest").msgclass + CreateServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CreateServicePerimeterRequest").msgclass + UpdateServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateServicePerimeterRequest").msgclass + DeleteServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteServicePerimeterRequest").msgclass + ReplaceServicePerimetersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceServicePerimetersRequest").msgclass + ReplaceServicePerimetersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceServicePerimetersResponse").msgclass + CommitServicePerimetersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CommitServicePerimetersRequest").msgclass + CommitServicePerimetersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CommitServicePerimetersResponse").msgclass + ListGcpUserAccessBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest").msgclass + ListGcpUserAccessBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse").msgclass + GetGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetGcpUserAccessBindingRequest").msgclass + CreateGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CreateGcpUserAccessBindingRequest").msgclass + UpdateGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateGcpUserAccessBindingRequest").msgclass + DeleteGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteGcpUserAccessBindingRequest").msgclass + GcpUserAccessBindingOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GcpUserAccessBindingOperationMetadata").msgclass + AccessContextManagerOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata").msgclass + LevelFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.LevelFormat").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb new file mode 100644 index 000000000000..5d40fe4c565a --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb @@ -0,0 +1,240 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/identity/accesscontextmanager/v1/access_context_manager.proto for package 'Google.Identity.AccessContextManager.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/identity/accesscontextmanager/v1/access_context_manager_pb' + +module Google + module Identity + module AccessContextManager + module V1 + module AccessContextManager + # API for setting [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] and [service + # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] + # for Google Cloud projects. Each organization has one [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the + # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] + # and [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This + # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is + # applicable to all resources in the organization. + # AccessPolicies + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.identity.accesscontextmanager.v1.AccessContextManager' + + # Lists all [access policies] + # [google.identity.accesscontextmanager.v1.AccessPolicy] in an + # organization. + rpc :ListAccessPolicies, ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse + # Returns an [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name. + rpc :GetAccessPolicy, ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, ::Google::Identity::AccessContextManager::V1::AccessPolicy + # Creates an access policy. This method fails if the organization already has + # an access policy. The long-running operation has a successful status + # after the access policy propagates to long-lasting storage. + # Syntactic and basic semantic errors are returned in `metadata` as a + # BadRequest proto. + rpc :CreateAccessPolicy, ::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Google::Longrunning::Operation + # Updates an [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. The + # long-running operation from this RPC has a successful status after the + # changes to the [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] propagate + # to long-lasting storage. + rpc :UpdateAccessPolicy, ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, ::Google::Longrunning::Operation + # Deletes an [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the + # resource name. The long-running operation has a successful status after the + # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] + # is removed from long-lasting storage. + rpc :DeleteAccessPolicy, ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, ::Google::Longrunning::Operation + # Lists all [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] for an access + # policy. + rpc :ListAccessLevels, ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse + # Gets an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource + # name. + rpc :GetAccessLevel, ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, ::Google::Identity::AccessContextManager::V1::AccessLevel + # Creates an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running + # operation from this RPC has a successful status after the [access + # level] [google.identity.accesscontextmanager.v1.AccessLevel] + # propagates to long-lasting storage. If [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contain + # errors, an error response is returned for the first error encountered. + rpc :CreateAccessLevel, ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, ::Google::Longrunning::Operation + # Updates an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running + # operation from this RPC has a successful status after the changes to + # the [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] propagate + # to long-lasting storage. If [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contain + # errors, an error response is returned for the first error encountered. + rpc :UpdateAccessLevel, ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, ::Google::Longrunning::Operation + # Deletes an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource + # name. The long-running operation from this RPC has a successful status + # after the [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] has been removed + # from long-lasting storage. + rpc :DeleteAccessLevel, ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, ::Google::Longrunning::Operation + # Replaces all existing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] in an [access + # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with + # the [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] provided. This + # is done atomically. The long-running operation from this RPC has a + # successful status after all replacements propagate to long-lasting + # storage. If the replacement contains errors, an error response is returned + # for the first error encountered. Upon error, the replacement is cancelled, + # and existing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] are not + # affected. The Operation.response field contains + # ReplaceAccessLevelsResponse. Removing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an + # error. + rpc :ReplaceAccessLevels, ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, ::Google::Longrunning::Operation + # Lists all [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] for an + # access policy. + rpc :ListServicePerimeters, ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse + # Gets a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the + # resource name. + rpc :GetServicePerimeter, ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, ::Google::Identity::AccessContextManager::V1::ServicePerimeter + # Creates a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The + # long-running operation from this RPC has a successful status after the + # [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] + # propagates to long-lasting storage. If a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains + # errors, an error response is returned for the first error encountered. + rpc :CreateServicePerimeter, ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, ::Google::Longrunning::Operation + # Updates a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The + # long-running operation from this RPC has a successful status after the + # [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] + # propagates to long-lasting storage. If a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains + # errors, an error response is returned for the first error encountered. + rpc :UpdateServicePerimeter, ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, ::Google::Longrunning::Operation + # Deletes a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the + # resource name. The long-running operation from this RPC has a successful + # status after the [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from + # long-lasting storage. + rpc :DeleteServicePerimeter, ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, ::Google::Longrunning::Operation + # Replace all existing [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access + # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This + # is done atomically. The long-running operation from this RPC has a + # successful status after all replacements propagate to long-lasting storage. + # Replacements containing errors result in an error response for the first + # error encountered. Upon an error, replacement are cancelled and existing + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] are not + # affected. The Operation.response field contains + # ReplaceServicePerimetersResponse. + rpc :ReplaceServicePerimeters, ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, ::Google::Longrunning::Operation + # Commits the dry-run specification for all the [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an + # [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. + # A commit operation on a service perimeter involves copying its `spec` field + # to the `status` field of the service perimeter. Only [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] with + # `use_explicit_dry_run_spec` field set to true are affected by a commit + # operation. The long-running operation from this RPC has a successful + # status after the dry-run specifications for all the [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] have been + # committed. If a commit fails, it causes the long-running operation to + # return an error response and the entire commit operation is cancelled. + # When successful, the Operation.response field contains + # CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are + # cleared after a successful commit operation. + rpc :CommitServicePerimeters, ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, ::Google::Longrunning::Operation + # Lists all [GcpUserAccessBindings] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a + # Google Cloud organization. + rpc :ListGcpUserAccessBindings, ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse + # Gets the [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with + # the given name. + rpc :GetGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding + # Creates a [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the + # client specifies a [name] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], + # the server ignores it. Fails if a resource already exists with the same + # [group_key] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. + # Completion of this long-running operation does not necessarily signify that + # the new binding is deployed onto all affected users, which may take more + # time. + rpc :CreateGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, ::Google::Longrunning::Operation + # Updates a [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. + # Completion of this long-running operation does not necessarily signify that + # the changed binding is deployed onto all affected users, which may take + # more time. + rpc :UpdateGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, ::Google::Longrunning::Operation + # Deletes a [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. + # Completion of this long-running operation does not necessarily signify that + # the binding deletion is deployed onto all affected users, which may take + # more time. + rpc :DeleteGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, ::Google::Longrunning::Operation + # Sets the IAM policy for the specified Access Context Manager + # [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. + # This method replaces the existing IAM policy on the access policy. The IAM + # policy controls the set of users who can perform specific operations on the + # Access Context Manager [access + # policy][google.identity.accesscontextmanager.v1.AccessPolicy]. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets the IAM policy for the specified Access Context Manager + # [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns the IAM permissions that the caller has on the specified Access + # Context Manager resource. The resource can be an + # [AccessPolicy][google.identity.accesscontextmanager.v1.AccessPolicy], + # [AccessLevel][google.identity.accesscontextmanager.v1.AccessLevel], or + # [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter + # ]. This method does not support other resources. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb new file mode 100644 index 000000000000..ead78b22f47d --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/identity/accesscontextmanager/v1/access_level.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/identity/accesscontextmanager/type/device_resources_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/expr_pb' + + +descriptor_data = "\n:google/identity/accesscontextmanager/v1/access_level.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x19google/api/resource.proto\x1a@google/identity/accesscontextmanager/type/device_resources.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xaa\x03\n\x0b\x41\x63\x63\x65ssLevel\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x44\n\x05\x62\x61sic\x18\x04 \x01(\x0b\x32\x33.google.identity.accesscontextmanager.v1.BasicLevelH\x00\x12\x46\n\x06\x63ustom\x18\x05 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.CustomLevelH\x00\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:p\xea\x41m\n/accesscontextmanager.googleapis.com/AccessLevel\x12:accessPolicies/{access_policy}/accessLevels/{access_level}B\x07\n\x05level\"\xef\x01\n\nBasicLevel\x12\x46\n\nconditions\x18\x01 \x03(\x0b\x32\x32.google.identity.accesscontextmanager.v1.Condition\x12j\n\x12\x63ombining_function\x18\x02 \x01(\x0e\x32N.google.identity.accesscontextmanager.v1.BasicLevel.ConditionCombiningFunction\"-\n\x1a\x43onditionCombiningFunction\x12\x07\n\x03\x41ND\x10\x00\x12\x06\n\x02OR\x10\x01\"\xc3\x01\n\tCondition\x12\x16\n\x0eip_subnetworks\x18\x01 \x03(\t\x12L\n\rdevice_policy\x18\x02 \x01(\x0b\x32\x35.google.identity.accesscontextmanager.v1.DevicePolicy\x12\x1e\n\x16required_access_levels\x18\x03 \x03(\t\x12\x0e\n\x06negate\x18\x05 \x01(\x08\x12\x0f\n\x07members\x18\x06 \x03(\t\x12\x0f\n\x07regions\x18\x07 \x03(\t\".\n\x0b\x43ustomLevel\x12\x1f\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x11.google.type.Expr\"\x89\x03\n\x0c\x44\x65vicePolicy\x12\x1a\n\x12require_screenlock\x18\x01 \x01(\x08\x12\x66\n\x1b\x61llowed_encryption_statuses\x18\x02 \x03(\x0e\x32\x41.google.identity.accesscontextmanager.type.DeviceEncryptionStatus\x12M\n\x0eos_constraints\x18\x03 \x03(\x0b\x32\x35.google.identity.accesscontextmanager.v1.OsConstraint\x12j\n allowed_device_management_levels\x18\x06 \x03(\x0e\x32@.google.identity.accesscontextmanager.type.DeviceManagementLevel\x12\x1e\n\x16require_admin_approval\x18\x07 \x01(\x08\x12\x1a\n\x12require_corp_owned\x18\x08 \x01(\x08\"\x8f\x01\n\x0cOsConstraint\x12\x42\n\x07os_type\x18\x01 \x01(\x0e\x32\x31.google.identity.accesscontextmanager.type.OsType\x12\x17\n\x0fminimum_version\x18\x02 \x01(\t\x12\"\n\x1arequire_verified_chrome_os\x18\x03 \x01(\x08\x42\xa7\x02\n+com.google.identity.accesscontextmanager.v1B\x10\x41\x63\x63\x65ssLevelProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Identity + module AccessContextManager + module V1 + AccessLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.AccessLevel").msgclass + BasicLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.BasicLevel").msgclass + BasicLevel::ConditionCombiningFunction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.BasicLevel.ConditionCombiningFunction").enummodule + Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.Condition").msgclass + CustomLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CustomLevel").msgclass + DevicePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DevicePolicy").msgclass + OsConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.OsConstraint").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb new file mode 100644 index 000000000000..3a8fc38766be --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/identity/accesscontextmanager/v1/access_policy.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n;google/identity/accesscontextmanager/v1/access_policy.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x92\x02\n\x0c\x41\x63\x63\x65ssPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\x0e\n\x06scopes\x18\x07 \x03(\t\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t:U\xea\x41R\n0accesscontextmanager.googleapis.com/AccessPolicy\x12\x1e\x61\x63\x63\x65ssPolicies/{access_policy}B\xa2\x02\n+com.google.identity.accesscontextmanager.v1B\x0bPolicyProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Identity + module AccessContextManager + module V1 + AccessPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.AccessPolicy").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb new file mode 100644 index 000000000000..ea5da3c0c0e1 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/identity/accesscontextmanager/v1/gcp_user_access_binding.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nEgoogle/identity/accesscontextmanager/v1/gcp_user_access_binding.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa3\x02\n\x14GcpUserAccessBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\tgroup_key\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12N\n\raccess_levels\x18\x03 \x03(\tB7\xe0\x41\x02\xfa\x41\x31\n/accesscontextmanager.googleapis.com/AccessLevel:\x8c\x01\xea\x41\x88\x01\n8accesscontextmanager.googleapis.com/GcpUserAccessBinding\x12Lorganizations/{organization}/gcpUserAccessBindings/{gcp_user_access_binding}B\xb0\x02\n+com.google.identity.accesscontextmanager.v1B\x19GcpUserAccessBindingProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Identity + module AccessContextManager + module V1 + GcpUserAccessBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GcpUserAccessBinding").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb new file mode 100644 index 000000000000..e57cf251b2a2 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/identity/accesscontextmanager/v1/service_perimeter.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n?google/identity/accesscontextmanager/v1/service_perimeter.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x93\x05\n\x10ServicePerimeter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12_\n\x0eperimeter_type\x18\x06 \x01(\x0e\x32G.google.identity.accesscontextmanager.v1.ServicePerimeter.PerimeterType\x12O\n\x06status\x18\x07 \x01(\x0b\x32?.google.identity.accesscontextmanager.v1.ServicePerimeterConfig\x12M\n\x04spec\x18\x08 \x01(\x0b\x32?.google.identity.accesscontextmanager.v1.ServicePerimeterConfig\x12!\n\x19use_explicit_dry_run_spec\x18\t \x01(\x08\"F\n\rPerimeterType\x12\x1a\n\x16PERIMETER_TYPE_REGULAR\x10\x00\x12\x19\n\x15PERIMETER_TYPE_BRIDGE\x10\x01:\x7f\xea\x41|\n4accesscontextmanager.googleapis.com/ServicePerimeter\x12\x44\x61\x63\x63\x65ssPolicies/{access_policy}/servicePerimeters/{service_perimeter}\"\xb5\x0f\n\x16ServicePerimeterConfig\x12\x11\n\tresources\x18\x01 \x03(\t\x12\x15\n\raccess_levels\x18\x02 \x03(\t\x12\x1b\n\x13restricted_services\x18\x04 \x03(\t\x12v\n\x17vpc_accessible_services\x18\n \x01(\x0b\x32U.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.VpcAccessibleServices\x12g\n\x10ingress_policies\x18\x08 \x03(\x0b\x32M.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy\x12\x65\n\x0f\x65gress_policies\x18\t \x03(\x0b\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy\x1aM\n\x15VpcAccessibleServices\x12\x1a\n\x12\x65nable_restriction\x18\x01 \x01(\x08\x12\x18\n\x10\x61llowed_services\x18\x02 \x03(\t\x1a@\n\x0eMethodSelector\x12\x10\n\x06method\x18\x01 \x01(\tH\x00\x12\x14\n\npermission\x18\x02 \x01(\tH\x00\x42\x06\n\x04kind\x1a\x8e\x01\n\x0c\x41piOperation\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12h\n\x10method_selectors\x18\x02 \x03(\x0b\x32N.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.MethodSelector\x1a\x45\n\rIngressSource\x12\x16\n\x0c\x61\x63\x63\x65ss_level\x18\x01 \x01(\tH\x00\x12\x12\n\x08resource\x18\x02 \x01(\tH\x00\x42\x08\n\x06source\x1a\xe6\x01\n\x0bIngressFrom\x12^\n\x07sources\x18\x01 \x03(\x0b\x32M.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressSource\x12\x12\n\nidentities\x18\x02 \x03(\t\x12\x63\n\ridentity_type\x18\x03 \x01(\x0e\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IdentityType\x1a\x80\x01\n\tIngressTo\x12`\n\noperations\x18\x01 \x03(\x0b\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation\x12\x11\n\tresources\x18\x02 \x03(\t\x1a\xd1\x01\n\rIngressPolicy\x12\x61\n\x0cingress_from\x18\x01 \x01(\x0b\x32K.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom\x12]\n\ningress_to\x18\x02 \x01(\x0b\x32I.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressTo\x1a\x85\x01\n\nEgressFrom\x12\x12\n\nidentities\x18\x01 \x03(\t\x12\x63\n\ridentity_type\x18\x02 \x01(\x0e\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IdentityType\x1a\x9b\x01\n\x08\x45gressTo\x12\x11\n\tresources\x18\x01 \x03(\t\x12`\n\noperations\x18\x02 \x03(\x0b\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation\x12\x1a\n\x12\x65xternal_resources\x18\x03 \x03(\t\x1a\xcc\x01\n\x0c\x45gressPolicy\x12_\n\x0b\x65gress_from\x18\x01 \x01(\x0b\x32J.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom\x12[\n\tegress_to\x18\x02 \x01(\x0b\x32H.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo\"n\n\x0cIdentityType\x12\x1d\n\x19IDENTITY_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41NY_IDENTITY\x10\x01\x12\x14\n\x10\x41NY_USER_ACCOUNT\x10\x02\x12\x17\n\x13\x41NY_SERVICE_ACCOUNT\x10\x03\x42\xac\x02\n+com.google.identity.accesscontextmanager.v1B\x15ServicePerimeterProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Identity + module AccessContextManager + module V1 + ServicePerimeter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeter").msgclass + ServicePerimeter::PerimeterType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeter.PerimeterType").enummodule + ServicePerimeterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig").msgclass + ServicePerimeterConfig::VpcAccessibleServices = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.VpcAccessibleServices").msgclass + ServicePerimeterConfig::MethodSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.MethodSelector").msgclass + ServicePerimeterConfig::ApiOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation").msgclass + ServicePerimeterConfig::IngressSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressSource").msgclass + ServicePerimeterConfig::IngressFrom = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom").msgclass + ServicePerimeterConfig::IngressTo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressTo").msgclass + ServicePerimeterConfig::IngressPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy").msgclass + ServicePerimeterConfig::EgressFrom = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom").msgclass + ServicePerimeterConfig::EgressTo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo").msgclass + ServicePerimeterConfig::EgressPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy").msgclass + ServicePerimeterConfig::IdentityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IdentityType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md new file mode 100644 index 000000000000..6f796a729053 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Access Context Manager 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-identity-access_context_manager-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/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-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/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-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/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-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb new file mode 100644 index 000000000000..98103f9a8eb2 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Identity + module AccessContextManager + module Type + # The encryption state of the device. + module DeviceEncryptionStatus + # The encryption status of the device is not specified or not known. + ENCRYPTION_UNSPECIFIED = 0 + + # The device does not support encryption. + ENCRYPTION_UNSUPPORTED = 1 + + # The device supports encryption, but is currently unencrypted. + UNENCRYPTED = 2 + + # The device is encrypted. + ENCRYPTED = 3 + end + + # The operating system type of the device. + # Next id: 7 + module OsType + # The operating system of the device is not specified or not known. + OS_UNSPECIFIED = 0 + + # A desktop Mac operating system. + DESKTOP_MAC = 1 + + # A desktop Windows operating system. + DESKTOP_WINDOWS = 2 + + # A desktop Linux operating system. + DESKTOP_LINUX = 3 + + # A desktop ChromeOS operating system. + DESKTOP_CHROME_OS = 6 + + # An Android operating system. + ANDROID = 4 + + # An iOS operating system. + IOS = 5 + end + + # The degree to which the device is managed by the Cloud organization. + module DeviceManagementLevel + # The device's management level is not specified or not known. + MANAGEMENT_UNSPECIFIED = 0 + + # The device is not managed. + NONE = 1 + + # Basic management is enabled, which is generally limited to monitoring and + # wiping the corporate account. + BASIC = 2 + + # Complete device management. This includes more thorough monitoring and the + # ability to directly manage the device (such as remote wiping). This can be + # enabled through the Android Enterprise Platform. + COMPLETE = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb new file mode 100644 index 000000000000..0a4ef8552281 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb @@ -0,0 +1,539 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Identity + module AccessContextManager + module V1 + # A request to list all `AccessPolicies` for a container. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name for the container to list AccessPolicy instances + # from. + # + # Format: + # `organizations/{org_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Number of AccessPolicy instances to include in the list. Default 100. + # @!attribute [rw] page_token + # @return [::String] + # Next page token for the next batch of AccessPolicy instances. Defaults to + # the first page of results. + class ListAccessPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to `ListAccessPoliciesRequest`. + # @!attribute [rw] access_policies + # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessPolicy>] + # List of the AccessPolicy instances. + # @!attribute [rw] next_page_token + # @return [::String] + # The pagination token to retrieve the next page of results. If the value is + # empty, no further results remain. + class ListAccessPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a particular `AccessPolicy`. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the access policy to get. + # + # Format `accessPolicies/{policy_id}` + class GetAccessPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update an `AccessPolicy`. + # @!attribute [rw] policy + # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # Required. The updated AccessPolicy. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask to control which fields get updated. Must be non-empty. + class UpdateAccessPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete an `AccessPolicy`. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the access policy to delete. + # + # Format `accessPolicies/{policy_id}` + class DeleteAccessPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list all `AccessLevels` in an `AccessPolicy`. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name for the access policy to list [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] from. + # + # Format: + # `accessPolicies/{policy_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Number of [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] to include in + # the list. Default 100. + # @!attribute [rw] page_token + # @return [::String] + # Next page token for the next batch of [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] instances. + # Defaults to the first page of results. + # @!attribute [rw] access_level_format + # @return [::Google::Identity::AccessContextManager::V1::LevelFormat] + # Whether to return `BasicLevels` in the Cloud Common Expression language, as + # `CustomLevels`, rather than as `BasicLevels`. Defaults to returning + # `AccessLevels` in the format they were defined. + class ListAccessLevelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to `ListAccessLevelsRequest`. + # @!attribute [rw] access_levels + # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel>] + # List of the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] instances. + # @!attribute [rw] next_page_token + # @return [::String] + # The pagination token to retrieve the next page of results. If the value is + # empty, no further results remain. + class ListAccessLevelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a particular `AccessLevel`. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: + # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + # @!attribute [rw] access_level_format + # @return [::Google::Identity::AccessContextManager::V1::LevelFormat] + # Whether to return `BasicLevels` in the Cloud Common Expression + # Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where + # [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] + # are returned as `BasicLevels` or `CustomLevels` based on how they were + # created. If set to CEL, all [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] are returned as + # `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent + # `CustomLevels`. + class GetAccessLevelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to create an `AccessLevel`. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name for the access policy which owns this [Access + # Level] [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: `accessPolicies/{policy_id}` + # @!attribute [rw] access_level + # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] + # Required. The [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] to create. + # Syntactic correctness of the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] is a + # precondition for creation. + class CreateAccessLevelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update an `AccessLevel`. + # @!attribute [rw] access_level + # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] + # Required. The updated [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic + # correctness of the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] is a + # precondition for creation. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask to control which fields get updated. Must be non-empty. + class UpdateAccessLevelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete an `AccessLevel`. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: + # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + class DeleteAccessLevelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to replace all existing Access Levels in an Access Policy with + # the Access Levels provided. This is done atomically. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name for the access policy which owns these + # [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: `accessPolicies/{policy_id}` + # @!attribute [rw] access_levels + # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel>] + # Required. The desired [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] that should + # replace all existing [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] in the + # [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # replace operation is to be performed on. If, at the time of replace, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the replace operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + class ReplaceAccessLevelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to ReplaceAccessLevelsRequest. This will be put inside of + # Operation.response field. + # @!attribute [rw] access_levels + # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel>] + # List of the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] instances. + class ReplaceAccessLevelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list all `ServicePerimeters` in an `AccessPolicy`. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name for the access policy to list [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] from. + # + # Format: + # `accessPolicies/{policy_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Number of [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] to include + # in the list. Default 100. + # @!attribute [rw] page_token + # @return [::String] + # Next page token for the next batch of [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. + # Defaults to the first page of results. + class ListServicePerimetersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to `ListServicePerimetersRequest`. + # @!attribute [rw] service_perimeters + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] + # List of the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. + # @!attribute [rw] next_page_token + # @return [::String] + # The pagination token to retrieve the next page of results. If the value is + # empty, no further results remain. + class ListServicePerimetersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a particular `ServicePerimeter`. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: + # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` + class GetServicePerimeterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to create a `ServicePerimeter`. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name for the access policy which owns this [Service + # Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: `accessPolicies/{policy_id}` + # @!attribute [rw] service_perimeter + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # Required. The [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] to create. + # Syntactic correctness of the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] is a + # precondition for creation. + class CreateServicePerimeterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update a `ServicePerimeter`. + # @!attribute [rw] service_perimeter + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # Required. The updated `ServicePerimeter`. Syntactic correctness of the + # `ServicePerimeter` is a precondition for creation. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask to control which fields get updated. Must be non-empty. + class UpdateServicePerimeterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete a `ServicePerimeter`. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: + # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}` + class DeleteServicePerimeterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to replace all existing Service Perimeters in an Access Policy + # with the Service Perimeters provided. This is done atomically. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name for the access policy which owns these + # [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: `accessPolicies/{policy_id}` + # @!attribute [rw] service_perimeters + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] + # Required. The desired [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] that should + # replace all existing [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in the + # [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # replace operation is to be performed on. If, at the time of replace, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the replace operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + class ReplaceServicePerimetersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to ReplaceServicePerimetersRequest. This will be put inside of + # Operation.response field. + # @!attribute [rw] service_perimeters + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] + # List of the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. + class ReplaceServicePerimetersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to commit dry-run specs in all [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] belonging to + # an {::Google::Identity::AccessContextManager::V1::AccessPolicy Access Policy}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name for the parent [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all + # [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for + # the commit operation. + # + # Format: `accessPolicies/{policy_id}` + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # commit operation is to be performed on. If, at the time of commit, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the commit operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + class CommitServicePerimetersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to CommitServicePerimetersRequest. This will be put inside of + # Operation.response field. + # @!attribute [rw] service_perimeters + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] + # List of all the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances in + # the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. + class CommitServicePerimetersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request of [ListGcpUserAccessBindings] + # [google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings]. + # @!attribute [rw] parent + # @return [::String] + # Required. Example: "organizations/256" + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of items to return. The server may return fewer items. + # If left blank, the server may return any number of items. + # @!attribute [rw] page_token + # @return [::String] + # Optional. If left blank, returns the first page. To enumerate all items, use the + # [next_page_token] + # [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token] + # from your previous list operation. + class ListGcpUserAccessBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response of [ListGcpUserAccessBindings] + # [google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings]. + # @!attribute [rw] gcp_user_access_bindings + # @return [::Array<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] + # [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] + # @!attribute [rw] next_page_token + # @return [::String] + # Token to get the next page of items. If blank, there are no more items. + class ListGcpUserAccessBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request of [GetGcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.AccessContextManager.GetGcpUserAccessBinding]. + # @!attribute [rw] name + # @return [::String] + # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" + class GetGcpUserAccessBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request of [CreateGcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.AccessContextManager.CreateGcpUserAccessBinding]. + # @!attribute [rw] parent + # @return [::String] + # Required. Example: "organizations/256" + # @!attribute [rw] gcp_user_access_binding + # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] + # Required. [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] + class CreateGcpUserAccessBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request of [UpdateGcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.AccessContextManager.UpdateGcpUserAccessBinding]. + # @!attribute [rw] gcp_user_access_binding + # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] + # Required. [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Only the fields specified in this mask are updated. Because name and + # group_key cannot be changed, update_mask is required and must always be: + # + # update_mask { + # paths: "access_levels" + # } + class UpdateGcpUserAccessBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request of [DeleteGcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.AccessContextManager.DeleteGcpUserAccessBinding]. + # @!attribute [rw] name + # @return [::String] + # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" + class DeleteGcpUserAccessBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Currently, a completed operation means nothing. In the future, this metadata + # and a completed operation may indicate that the binding has taken effect and + # is affecting access decisions for all users. + class GcpUserAccessBindingOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata of Access Context Manager's Long Running Operations. + class AccessContextManagerOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The format used in an `AccessLevel`. + module LevelFormat + # The format was not specified. + LEVEL_FORMAT_UNSPECIFIED = 0 + + # Uses the format the resource was defined in. BasicLevels are returned as + # BasicLevels, CustomLevels are returned as CustomLevels. + AS_DEFINED = 1 + + # Use Cloud Common Expression Language when returning the resource. Both + # BasicLevels and CustomLevels are returned as CustomLevels. + CEL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb new file mode 100644 index 000000000000..263cc28aa3d0 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb @@ -0,0 +1,201 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Identity + module AccessContextManager + module V1 + # An `AccessLevel` is a label that can be applied to requests to Google Cloud + # services, along with a list of requirements necessary for the label to be + # applied. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the Access Level. The `short_name` component + # must begin with a letter and only include alphanumeric and '_'. Format: + # `accessPolicies/{access_policy}/accessLevels/{access_level}`. The maximum + # length of the `access_level` component is 50 characters. + # @!attribute [rw] title + # @return [::String] + # Human readable title. Must be unique within the Policy. + # @!attribute [rw] description + # @return [::String] + # Description of the `AccessLevel` and its use. Does not affect behavior. + # @!attribute [rw] basic + # @return [::Google::Identity::AccessContextManager::V1::BasicLevel] + # A `BasicLevel` composed of `Conditions`. + # + # Note: The following fields are mutually exclusive: `basic`, `custom`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom + # @return [::Google::Identity::AccessContextManager::V1::CustomLevel] + # A `CustomLevel` written in the Common Expression Language. + # + # Note: The following fields are mutually exclusive: `custom`, `basic`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the `AccessLevel` was created in UTC. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the `AccessLevel` was updated in UTC. + class AccessLevel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BasicLevel` is an `AccessLevel` using a set of recommended features. + # @!attribute [rw] conditions + # @return [::Array<::Google::Identity::AccessContextManager::V1::Condition>] + # Required. A list of requirements for the `AccessLevel` to be granted. + # @!attribute [rw] combining_function + # @return [::Google::Identity::AccessContextManager::V1::BasicLevel::ConditionCombiningFunction] + # How the `conditions` list should be combined to determine if a request is + # granted this `AccessLevel`. If AND is used, each `Condition` in + # `conditions` must be satisfied for the `AccessLevel` to be applied. If OR + # is used, at least one `Condition` in `conditions` must be satisfied for the + # `AccessLevel` to be applied. Default behavior is AND. + class BasicLevel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Options for how the `conditions` list should be combined to determine if + # this `AccessLevel` is applied. Default is AND. + module ConditionCombiningFunction + # All `Conditions` must be true for the `BasicLevel` to be true. + AND = 0 + + # If at least one `Condition` is true, then the `BasicLevel` is true. + OR = 1 + end + end + + # A condition necessary for an `AccessLevel` to be granted. The Condition is an + # AND over its fields. So a Condition is true if: 1) the request IP is from one + # of the listed subnetworks AND 2) the originating device complies with the + # listed device policy AND 3) all listed access levels are granted AND 4) the + # request was sent at a time allowed by the DateTimeRestriction. + # @!attribute [rw] ip_subnetworks + # @return [::Array<::String>] + # CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for + # a CIDR IP address block, the specified IP address portion must be properly + # truncated (i.e. all the host bits must be zero) or the input is considered + # malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is + # not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas + # "2001:db8::1/32" is not. The originating IP of a request must be in one of + # the listed subnets in order for this Condition to be true. If empty, all IP + # addresses are allowed. + # @!attribute [rw] device_policy + # @return [::Google::Identity::AccessContextManager::V1::DevicePolicy] + # Device specific restrictions, all restrictions must hold for the + # Condition to be true. If not specified, all devices are allowed. + # @!attribute [rw] required_access_levels + # @return [::Array<::String>] + # A list of other access levels defined in the same `Policy`, referenced by + # resource name. Referencing an `AccessLevel` which does not exist is an + # error. All access levels listed must be granted for the Condition + # to be true. Example: + # "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"` + # @!attribute [rw] negate + # @return [::Boolean] + # Whether to negate the Condition. If true, the Condition becomes a NAND over + # its non-empty fields, each field must be false for the Condition overall to + # be satisfied. Defaults to false. + # @!attribute [rw] members + # @return [::Array<::String>] + # The request must be made by one of the provided user or service + # accounts. Groups are not supported. + # Syntax: + # `user:{emailid}` + # `serviceAccount:{emailid}` + # If not specified, a request may come from any user. + # @!attribute [rw] regions + # @return [::Array<::String>] + # The request must originate from one of the provided countries/regions. + # Must be valid ISO 3166-1 alpha-2 codes. + class Condition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language + # to represent the necessary conditions for the level to apply to a request. + # See CEL spec at: https://github.com/google/cel-spec + # @!attribute [rw] expr + # @return [::Google::Type::Expr] + # Required. A Cloud CEL expression evaluating to a boolean. + class CustomLevel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `DevicePolicy` specifies device specific restrictions necessary to acquire a + # given access level. A `DevicePolicy` specifies requirements for requests from + # devices to be granted access levels, it does not do any enforcement on the + # device. `DevicePolicy` acts as an AND over all specified fields, and each + # repeated field is an OR over its elements. Any unset fields are ignored. For + # example, if the proto is { os_type : DESKTOP_WINDOWS, os_type : + # DESKTOP_LINUX, encryption_status: ENCRYPTED}, then the DevicePolicy will be + # true for requests originating from encrypted Linux desktops and encrypted + # Windows desktops. + # @!attribute [rw] require_screenlock + # @return [::Boolean] + # Whether or not screenlock is required for the DevicePolicy to be true. + # Defaults to `false`. + # @!attribute [rw] allowed_encryption_statuses + # @return [::Array<::Google::Identity::AccessContextManager::Type::DeviceEncryptionStatus>] + # Allowed encryptions statuses, an empty list allows all statuses. + # @!attribute [rw] os_constraints + # @return [::Array<::Google::Identity::AccessContextManager::V1::OsConstraint>] + # Allowed OS versions, an empty list allows all types and all versions. + # @!attribute [rw] allowed_device_management_levels + # @return [::Array<::Google::Identity::AccessContextManager::Type::DeviceManagementLevel>] + # Allowed device management levels, an empty list allows all management + # levels. + # @!attribute [rw] require_admin_approval + # @return [::Boolean] + # Whether the device needs to be approved by the customer admin. + # @!attribute [rw] require_corp_owned + # @return [::Boolean] + # Whether the device needs to be corp owned. + class DevicePolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A restriction on the OS type and version of devices making requests. + # @!attribute [rw] os_type + # @return [::Google::Identity::AccessContextManager::Type::OsType] + # Required. The allowed OS type. + # @!attribute [rw] minimum_version + # @return [::String] + # The minimum allowed OS version. If not set, any version of this OS + # satisfies the constraint. Format: `"major.minor.patch"`. + # Examples: `"10.5.301"`, `"9.2.1"`. + # @!attribute [rw] require_verified_chrome_os + # @return [::Boolean] + # Only allows requests from devices with a verified Chrome OS. + # Verifications includes requirements that the device is enterprise-managed, + # conformant to domain policies, and the caller has permission to call + # the API targeted by the request. + class OsConstraint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb new file mode 100644 index 000000000000..b034d49fe22d --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Identity + module AccessContextManager + module V1 + # `AccessPolicy` is a container for `AccessLevels` (which define the necessary + # attributes to use Google Cloud services) and `ServicePerimeters` (which + # define regions of services able to freely pass data within a perimeter). An + # access policy is globally visible within an organization, and the + # restrictions it specifies apply to all projects within an organization. + # @!attribute [rw] name + # @return [::String] + # Output only. Resource name of the `AccessPolicy`. Format: + # `accessPolicies/{access_policy}` + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of this `AccessPolicy` in the Cloud Resource + # Hierarchy. Currently immutable once created. Format: + # `organizations/{organization_id}` + # @!attribute [rw] title + # @return [::String] + # Required. Human readable title. Does not affect behavior. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # The scopes of a policy define which resources an ACM policy can restrict, + # and where ACM resources can be referenced. + # For example, a policy with scopes=["folders/123"] has the following + # behavior: + # - vpcsc perimeters can only restrict projects within folders/123 + # - access levels can only be referenced by resources within folders/123. + # If empty, there are no limitations on which resources can be restricted by + # an ACM policy, and there are no limitations on where ACM resources can be + # referenced. + # Only one policy can include a given scope (attempting to create a second + # policy which includes "folders/123" will result in an error). + # Currently, scopes cannot be modified after a policy is created. + # Currently, policies can only have a single scope. + # Format: list of `folders/{folder_number}` or `projects/{project_number}` + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the `AccessPolicy` was created in UTC. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the `AccessPolicy` was updated in UTC. + # @!attribute [rw] etag + # @return [::String] + # Output only. An opaque identifier for the current version of the + # `AccessPolicy`. This will always be a strongly validated etag, meaning that + # two Access Polices will be identical if and only if their etags are + # identical. Clients should not expect this to be in any specific format. + class AccessPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb new file mode 100644 index 000000000000..bbd9b110d43b --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.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! + + +module Google + module Identity + module AccessContextManager + module V1 + # Restricts access to Cloud Console and Google Cloud APIs for a set of users + # using Context-Aware Access. + # @!attribute [rw] name + # @return [::String] + # Immutable. Assigned by the server during creation. The last segment has an arbitrary + # length and has only URI unreserved characters (as defined by + # [RFC 3986 Section 2.3](https://tools.ietf.org/html/rfc3986#section-2.3)). + # Should not be specified by the client during creation. + # Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" + # @!attribute [rw] group_key + # @return [::String] + # Required. Immutable. Google Group id whose members are subject to this binding's restrictions. + # See "id" in the [G Suite Directory API's Groups resource] + # (https://developers.google.com/admin-sdk/directory/v1/reference/groups#resource). + # If a group's email address/alias is changed, this resource will continue + # to point at the changed group. This field does not accept group email + # addresses or aliases. + # Example: "01d520gv4vjcrht" + # @!attribute [rw] access_levels + # @return [::Array<::String>] + # Required. Access level that a user must have to be granted access. Only one access + # level is supported, not multiple. This repeated field must have exactly + # one element. + # Example: "accessPolicies/9522/accessLevels/device_trusted" + class GcpUserAccessBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb new file mode 100644 index 000000000000..be4e39e46ef2 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb @@ -0,0 +1,500 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Identity + module AccessContextManager + module V1 + # `ServicePerimeter` describes a set of Google Cloud resources which can freely + # import and export data amongst themselves, but not export outside of the + # `ServicePerimeter`. If a request with a source within this `ServicePerimeter` + # has a target outside of the `ServicePerimeter`, the request will be blocked. + # Otherwise the request is allowed. There are two types of Service Perimeter - + # Regular and Bridge. Regular Service Perimeters cannot overlap, a single + # Google Cloud project can only belong to a single regular Service Perimeter. + # Service Perimeter Bridges can contain only Google Cloud projects as members, + # a single Google Cloud project may belong to multiple Service Perimeter + # Bridges. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the ServicePerimeter. The `short_name` + # component must begin with a letter and only include alphanumeric and '_'. + # Format: + # `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}` + # @!attribute [rw] title + # @return [::String] + # Human readable title. Must be unique within the Policy. + # @!attribute [rw] description + # @return [::String] + # Description of the `ServicePerimeter` and its use. Does not affect + # behavior. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the `ServicePerimeter` was created in UTC. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the `ServicePerimeter` was updated in UTC. + # @!attribute [rw] perimeter_type + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter::PerimeterType] + # Perimeter type indicator. A single project is + # allowed to be a member of single regular perimeter, but multiple service + # perimeter bridges. A project cannot be a included in a perimeter bridge + # without being included in regular perimeter. For perimeter bridges, + # the restricted service list as well as access level lists must be + # empty. + # @!attribute [rw] status + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig] + # Current ServicePerimeter configuration. Specifies sets of resources, + # restricted services and access levels that determine perimeter + # content and boundaries. + # @!attribute [rw] spec + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig] + # Proposed (or dry run) ServicePerimeter configuration. This configuration + # allows to specify and test ServicePerimeter configuration without enforcing + # actual access restrictions. Only allowed to be set when the + # "use_explicit_dry_run_spec" flag is set. + # @!attribute [rw] use_explicit_dry_run_spec + # @return [::Boolean] + # Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly + # exists for all Service Perimeters, and that spec is identical to the + # status for those Service Perimeters. When this flag is set, it inhibits the + # generation of the implicit spec, thereby allowing the user to explicitly + # provide a configuration ("spec") to use in a dry-run version of the Service + # Perimeter. This allows the user to test changes to the enforced config + # ("status") without actually enforcing them. This testing is done through + # analyzing the differences between currently enforced and suggested + # restrictions. use_explicit_dry_run_spec must bet set to True if any of the + # fields in the spec are set to non-default values. + class ServicePerimeter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies the type of the Perimeter. There are two types: regular and + # bridge. Regular Service Perimeter contains resources, access levels, and + # restricted services. Every resource can be in at most ONE + # regular Service Perimeter. + # + # In addition to being in a regular service perimeter, a resource can also + # be in zero or more perimeter bridges. A perimeter bridge only contains + # resources. Cross project operations are permitted if all effected + # resources share some perimeter (whether bridge or regular). Perimeter + # Bridge does not contain access levels or services: those are governed + # entirely by the regular perimeter that resource is in. + # + # Perimeter Bridges are typically useful when building more complex toplogies + # with many independent perimeters that need to share some data with a common + # perimeter, but should not be able to share data among themselves. + module PerimeterType + # Regular Perimeter. + PERIMETER_TYPE_REGULAR = 0 + + # Perimeter Bridge. + PERIMETER_TYPE_BRIDGE = 1 + end + end + + # `ServicePerimeterConfig` specifies a set of Google Cloud resources that + # describe specific Service Perimeter configuration. + # @!attribute [rw] resources + # @return [::Array<::String>] + # A list of Google Cloud resources that are inside of the service perimeter. + # Currently only projects are allowed. Format: `projects/{project_number}` + # @!attribute [rw] access_levels + # @return [::Array<::String>] + # A list of `AccessLevel` resource names that allow resources within the + # `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed + # must be in the same policy as this `ServicePerimeter`. Referencing a + # nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are + # listed, resources within the perimeter can only be accessed via Google + # Cloud calls with request origins within the perimeter. Example: + # `"accessPolicies/MY_POLICY/accessLevels/MY_LEVEL"`. + # For Service Perimeter Bridge, must be empty. + # @!attribute [rw] restricted_services + # @return [::Array<::String>] + # Google Cloud services that are subject to the Service Perimeter + # restrictions. For example, if `storage.googleapis.com` is specified, access + # to the storage buckets inside the perimeter must meet the perimeter's + # access restrictions. + # @!attribute [rw] vpc_accessible_services + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::VpcAccessibleServices] + # Configuration for APIs allowed within Perimeter. + # @!attribute [rw] ingress_policies + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressPolicy>] + # List of [IngressPolicies] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # to apply to the perimeter. A perimeter may have multiple [IngressPolicies] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy], + # each of which is evaluated separately. Access is granted if any [Ingress + # Policy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # grants it. Must be empty for a perimeter bridge. + # @!attribute [rw] egress_policies + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::EgressPolicy>] + # List of [EgressPolicies] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # to apply to the perimeter. A perimeter may have multiple [EgressPolicies] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy], + # each of which is evaluated separately. Access is granted if any + # [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # grants it. Must be empty for a perimeter bridge. + class ServicePerimeterConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies how APIs are allowed to communicate within the Service + # Perimeter. + # @!attribute [rw] enable_restriction + # @return [::Boolean] + # Whether to restrict API calls within the Service Perimeter to the list of + # APIs specified in 'allowed_services'. + # @!attribute [rw] allowed_services + # @return [::Array<::String>] + # The list of APIs usable within the Service Perimeter. Must be empty + # unless 'enable_restriction' is True. You can specify a list of individual + # services, as well as include the 'RESTRICTED-SERVICES' value, which + # automatically includes all of the services protected by the perimeter. + class VpcAccessibleServices + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An allowed method or permission of a service specified in [ApiOperation] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]. + # @!attribute [rw] method + # @return [::String] + # Value for `method` should be a valid method name for the corresponding + # `service_name` in [ApiOperation] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]. + # If `*` used as value for `method`, then ALL methods and permissions are + # allowed. + # + # Note: The following fields are mutually exclusive: `method`, `permission`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] permission + # @return [::String] + # Value for `permission` should be a valid Cloud IAM permission for the + # corresponding `service_name` in [ApiOperation] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]. + # + # Note: The following fields are mutually exclusive: `permission`, `method`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class MethodSelector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Identification for an API Operation. + # @!attribute [rw] service_name + # @return [::String] + # The name of the API whose methods or permissions the [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # or [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # want to allow. A single [ApiOperation] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] + # with `service_name` field set to `*` will allow all methods AND + # permissions for all services. + # @!attribute [rw] method_selectors + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::MethodSelector>] + # API methods or permissions to allow. Method or permission must belong to + # the service specified by `service_name` field. A single [MethodSelector] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.MethodSelector] + # entry with `*` specified for the `method` field will allow all methods + # AND permissions for the service specified in `service_name`. + class ApiOperation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The source that [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # authorizes access from. + # @!attribute [rw] access_level + # @return [::String] + # An [AccessLevel] + # [google.identity.accesscontextmanager.v1.AccessLevel] resource + # name that allow resources within the [ServicePerimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] to be + # accessed from the internet. [AccessLevels] + # [google.identity.accesscontextmanager.v1.AccessLevel] listed must + # be in the same policy as this [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # Referencing a nonexistent [AccessLevel] + # [google.identity.accesscontextmanager.v1.AccessLevel] will cause + # an error. If no [AccessLevel] + # [google.identity.accesscontextmanager.v1.AccessLevel] names are + # listed, resources within the perimeter can only be accessed via Google + # Cloud calls with request origins within the perimeter. Example: + # `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is + # specified for `access_level`, then all [IngressSources] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressSource] + # will be allowed. + # + # Note: The following fields are mutually exclusive: `access_level`, `resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] resource + # @return [::String] + # A Google Cloud resource that is allowed to ingress the perimeter. + # Requests from these resources will be allowed to access perimeter data. + # Currently only projects are allowed. + # Format: `projects/{project_number}` + # The project may be in any Google Cloud organization, not just the + # organization that the perimeter is defined in. `*` is not allowed, the + # case of allowing all Google Cloud resources only is not supported. + # + # Note: The following fields are mutually exclusive: `resource`, `access_level`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class IngressSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the conditions under which an [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # matches a request. Conditions are based on information about the source of + # the request. The request must satisfy what is defined in `sources` AND + # identity related fields in order to match. + # @!attribute [rw] sources + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressSource>] + # Sources that this [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # authorizes access from. + # @!attribute [rw] identities + # @return [::Array<::String>] + # A list of identities that are allowed access through this ingress + # policy. Should be in the format of email address. The email address + # should represent individual user or service account only. + # @!attribute [rw] identity_type + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IdentityType] + # Specifies the type of identities that are allowed access from outside the + # perimeter. If left unspecified, then members of `identities` field will + # be allowed access. + class IngressFrom + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the conditions under which an [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # matches a request. Conditions are based on information about the + # [ApiOperation] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] + # intended to be performed on the target resource of the request. The request + # must satisfy what is defined in `operations` AND `resources` in order to + # match. + # @!attribute [rw] operations + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::ApiOperation>] + # A list of [ApiOperations] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] + # allowed to be performed by the sources specified in corresponding + # [IngressFrom] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom] + # in this [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # @!attribute [rw] resources + # @return [::Array<::String>] + # A list of resources, currently only projects in the form + # `projects/`, protected by this [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] that are + # allowed to be accessed by sources defined in the corresponding + # [IngressFrom] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom]. + # If a single `*` is specified, then access to all resources inside the + # perimeter are allowed. + class IngressTo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Policy for ingress into [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # [IngressPolicies] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # match requests based on `ingress_from` and `ingress_to` stanzas. For an + # ingress policy to match, both the `ingress_from` and `ingress_to` stanzas + # must be matched. If an [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # matches a request, the request is allowed through the perimeter boundary + # from outside the perimeter. + # + # For example, access from the internet can be allowed either + # based on an [AccessLevel] + # [google.identity.accesscontextmanager.v1.AccessLevel] or, for traffic + # hosted on Google Cloud, the project of the source network. For access from + # private networks, using the project of the hosting network is required. + # + # Individual ingress policies can be limited by restricting which + # services and/or actions they match using the `ingress_to` field. + # @!attribute [rw] ingress_from + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressFrom] + # Defines the conditions on the source of a request causing this + # [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # to apply. + # @!attribute [rw] ingress_to + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressTo] + # Defines the conditions on the [ApiOperation] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] + # and request destination that cause this [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # to apply. + class IngressPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the conditions under which an [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # matches a request. Conditions based on information about the source of the + # request. Note that if the destination of the request is also protected by a + # [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter], then that + # [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] must have + # an [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # which allows access in order for this request to succeed. + # @!attribute [rw] identities + # @return [::Array<::String>] + # A list of identities that are allowed access through this [EgressPolicy]. + # Should be in the format of email address. The email address should + # represent individual user or service account only. + # @!attribute [rw] identity_type + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IdentityType] + # Specifies the type of identities that are allowed access to outside the + # perimeter. If left unspecified, then members of `identities` field will + # be allowed access. + class EgressFrom + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the conditions under which an [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # matches a request. Conditions are based on information about the + # [ApiOperation] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] + # intended to be performed on the `resources` specified. Note that if the + # destination of the request is also protected by a [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter], then that + # [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] must have + # an [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # which allows access in order for this request to succeed. The request must + # match `operations` AND `resources` fields in order to be allowed egress out + # of the perimeter. + # @!attribute [rw] resources + # @return [::Array<::String>] + # A list of resources, currently only projects in the form + # `projects/`, that are allowed to be accessed by sources + # defined in the corresponding [EgressFrom] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom]. + # A request matches if it contains a resource in this list. If `*` is + # specified for `resources`, then this [EgressTo] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo] + # rule will authorize access to all resources outside the perimeter. + # @!attribute [rw] operations + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::ApiOperation>] + # A list of [ApiOperations] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] + # allowed to be performed by the sources specified in the corresponding + # [EgressFrom] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom]. + # A request matches if it uses an operation/service in this list. + # @!attribute [rw] external_resources + # @return [::Array<::String>] + # A list of external resources that are allowed to be accessed. Only AWS + # and Azure resources are supported. For Amazon S3, the supported format is + # s3://BUCKET_NAME. For Azure Storage, the supported format is + # azure://myaccount.blob.core.windows.net/CONTAINER_NAME. A request matches + # if it contains an external resource in this list (Example: + # s3://bucket/path). Currently '*' is not allowed. + class EgressTo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Policy for egress from perimeter. + # + # [EgressPolicies] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # match requests based on `egress_from` and `egress_to` stanzas. For an + # [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # to match, both `egress_from` and `egress_to` stanzas must be matched. If an + # [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # matches a request, the request is allowed to span the [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] boundary. + # For example, an [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # can be used to allow VMs on networks within the [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] to access a + # defined set of projects outside the perimeter in certain contexts (e.g. to + # read data from a Cloud Storage bucket or query against a BigQuery dataset). + # + # [EgressPolicies] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # are concerned with the *resources* that a request relates as well as the + # API services and API actions being used. They do not related to the + # direction of data movement. More detailed documentation for this concept + # can be found in the descriptions of [EgressFrom] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom] + # and [EgressTo] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo]. + # @!attribute [rw] egress_from + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::EgressFrom] + # Defines conditions on the source of a request causing this [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # to apply. + # @!attribute [rw] egress_to + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::EgressTo] + # Defines the conditions on the [ApiOperation] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] + # and destination resources that cause this [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # to apply. + class EgressPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the types of identities that are allowed access in either + # [IngressFrom] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom] + # or [EgressFrom] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom] + # rules. + module IdentityType + # No blanket identity group specified. + IDENTITY_TYPE_UNSPECIFIED = 0 + + # Authorize access from all identities outside the perimeter. + ANY_IDENTITY = 1 + + # Authorize access from all human users outside the perimeter. + ANY_USER_ACCOUNT = 2 + + # Authorize access from all service accounts outside the perimeter. + ANY_SERVICE_ACCOUNT = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile new file mode 100644 index 000000000000..7c4756c28a3a --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1", path: "../" +else + gem "google-identity-access_context_manager-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-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb new file mode 100644 index 000000000000..8df7e306a7f2 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.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 accesscontextmanager_v1_generated_AccessContextManager_CommitServicePerimeters_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the commit_service_perimeters call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#commit_service_perimeters. +# +def commit_service_perimeters + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new + + # Call the commit_service_perimeters method. + result = client.commit_service_perimeters request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_CommitServicePerimeters_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb new file mode 100644 index 000000000000..7ad25cd17d4d --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.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 accesscontextmanager_v1_generated_AccessContextManager_CreateAccessLevel_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the create_access_level call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_level. +# +def create_access_level + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new + + # Call the create_access_level method. + result = client.create_access_level request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_CreateAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb new file mode 100644 index 000000000000..a9f9d7289673 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.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 accesscontextmanager_v1_generated_AccessContextManager_CreateAccessPolicy_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the create_access_policy call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_policy. +# +def create_access_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::AccessPolicy.new + + # Call the create_access_policy method. + result = client.create_access_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_CreateAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb new file mode 100644 index 000000000000..f1020626f742 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_CreateGcpUserAccessBinding_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the create_gcp_user_access_binding call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_gcp_user_access_binding. +# +def create_gcp_user_access_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new + + # Call the create_gcp_user_access_binding method. + result = client.create_gcp_user_access_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_CreateGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb new file mode 100644 index 000000000000..412e217d7849 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.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 accesscontextmanager_v1_generated_AccessContextManager_CreateServicePerimeter_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the create_service_perimeter call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_service_perimeter. +# +def create_service_perimeter + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new + + # Call the create_service_perimeter method. + result = client.create_service_perimeter request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_CreateServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb new file mode 100644 index 000000000000..00c5232fc6d1 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.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 accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessLevel_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the delete_access_level call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_level. +# +def delete_access_level + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new + + # Call the delete_access_level method. + result = client.delete_access_level request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb new file mode 100644 index 000000000000..eee4a031ae6e --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.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 accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessPolicy_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the delete_access_policy call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_policy. +# +def delete_access_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new + + # Call the delete_access_policy method. + result = client.delete_access_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb new file mode 100644 index 000000000000..dd965cf499c5 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_DeleteGcpUserAccessBinding_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the delete_gcp_user_access_binding call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_gcp_user_access_binding. +# +def delete_gcp_user_access_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new + + # Call the delete_gcp_user_access_binding method. + result = client.delete_gcp_user_access_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb new file mode 100644 index 000000000000..983eda52bacc --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.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 accesscontextmanager_v1_generated_AccessContextManager_DeleteServicePerimeter_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the delete_service_perimeter call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_service_perimeter. +# +def delete_service_perimeter + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new + + # Call the delete_service_perimeter method. + result = client.delete_service_perimeter request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb new file mode 100644 index 000000000000..0597699fa439 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_GetAccessLevel_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the get_access_level call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_level. +# +def get_access_level + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new + + # Call the get_access_level method. + result = client.get_access_level request + + # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel. + p result +end +# [END accesscontextmanager_v1_generated_AccessContextManager_GetAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb new file mode 100644 index 000000000000..0531cf3580ad --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_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 accesscontextmanager_v1_generated_AccessContextManager_GetAccessPolicy_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the get_access_policy call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_policy. +# +def get_access_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new + + # Call the get_access_policy method. + result = client.get_access_policy request + + # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy. + p result +end +# [END accesscontextmanager_v1_generated_AccessContextManager_GetAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb new file mode 100644 index 000000000000..d732c416d5c8 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_GetGcpUserAccessBinding_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the get_gcp_user_access_binding call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_gcp_user_access_binding. +# +def get_gcp_user_access_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new + + # Call the get_gcp_user_access_binding method. + result = client.get_gcp_user_access_binding request + + # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. + p result +end +# [END accesscontextmanager_v1_generated_AccessContextManager_GetGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb new file mode 100644 index 000000000000..b134f682cf0c --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/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 accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the get_iam_policy call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::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 accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb new file mode 100644 index 000000000000..fd5e1db7b14d --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_GetServicePerimeter_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the get_service_perimeter call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_service_perimeter. +# +def get_service_perimeter + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new + + # Call the get_service_perimeter method. + result = client.get_service_perimeter request + + # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter. + p result +end +# [END accesscontextmanager_v1_generated_AccessContextManager_GetServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb new file mode 100644 index 000000000000..a5bf8a3cae59 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.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 accesscontextmanager_v1_generated_AccessContextManager_ListAccessLevels_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the list_access_levels call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_levels. +# +def list_access_levels + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new + + # Call the list_access_levels method. + result = client.list_access_levels request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel. + p item + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_ListAccessLevels_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb new file mode 100644 index 000000000000..8244d0f6948b --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.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 accesscontextmanager_v1_generated_AccessContextManager_ListAccessPolicies_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the list_access_policies call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_policies. +# +def list_access_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new + + # Call the list_access_policies method. + result = client.list_access_policies request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy. + p item + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_ListAccessPolicies_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb new file mode 100644 index 000000000000..933198ef288d --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_ListGcpUserAccessBindings_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the list_gcp_user_access_bindings call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_gcp_user_access_bindings. +# +def list_gcp_user_access_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new + + # Call the list_gcp_user_access_bindings method. + result = client.list_gcp_user_access_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. + p item + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_ListGcpUserAccessBindings_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb new file mode 100644 index 000000000000..7e6aab1e29ef --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.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 accesscontextmanager_v1_generated_AccessContextManager_ListServicePerimeters_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the list_service_perimeters call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_service_perimeters. +# +def list_service_perimeters + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new + + # Call the list_service_perimeters method. + result = client.list_service_perimeters request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter. + p item + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_ListServicePerimeters_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb new file mode 100644 index 000000000000..8c5a3d228fae --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.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 accesscontextmanager_v1_generated_AccessContextManager_ReplaceAccessLevels_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the replace_access_levels call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_access_levels. +# +def replace_access_levels + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new + + # Call the replace_access_levels method. + result = client.replace_access_levels request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_ReplaceAccessLevels_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb new file mode 100644 index 000000000000..0bb1d425f50d --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.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 accesscontextmanager_v1_generated_AccessContextManager_ReplaceServicePerimeters_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the replace_service_perimeters call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_service_perimeters. +# +def replace_service_perimeters + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new + + # Call the replace_service_perimeters method. + result = client.replace_service_perimeters request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_ReplaceServicePerimeters_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb new file mode 100644 index 000000000000..47743b7f9b84 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/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 accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the set_iam_policy call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::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 accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb new file mode 100644 index 000000000000..780f1b93ba1a --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/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 accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the test_iam_permissions call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::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 accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb new file mode 100644 index 000000000000..0c0f947da7b7 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.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 accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessLevel_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the update_access_level call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_level. +# +def update_access_level + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new + + # Call the update_access_level method. + result = client.update_access_level request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb new file mode 100644 index 000000000000..a29a2622b29f --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.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 accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessPolicy_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the update_access_policy call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_policy. +# +def update_access_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new + + # Call the update_access_policy method. + result = client.update_access_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb new file mode 100644 index 000000000000..48d03cc216bc --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_UpdateGcpUserAccessBinding_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the update_gcp_user_access_binding call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_gcp_user_access_binding. +# +def update_gcp_user_access_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new + + # Call the update_gcp_user_access_binding method. + result = client.update_gcp_user_access_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb new file mode 100644 index 000000000000..a751242211b5 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.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 accesscontextmanager_v1_generated_AccessContextManager_UpdateServicePerimeter_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the update_service_perimeter call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_service_perimeter. +# +def update_service_perimeter + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new + + # Call the update_service_perimeter method. + result = client.update_service_perimeter request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json new file mode 100644 index 000000000000..f5838dcb8ff7 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json @@ -0,0 +1,1055 @@ +{ + "client_library": { + "name": "google-identity-access_context_manager-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.identity.accesscontextmanager.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListAccessPolicies_sync", + "title": "Snippet for the list_access_policies call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_policies.", + "file": "access_context_manager/list_access_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_access_policies", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "ListAccessPolicies", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListAccessPolicies", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetAccessPolicy_sync", + "title": "Snippet for the get_access_policy call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_policy.", + "file": "access_context_manager/get_access_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_access_policy", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Identity::AccessContextManager::V1::AccessPolicy", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "GetAccessPolicy", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetAccessPolicy", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateAccessPolicy_sync", + "title": "Snippet for the create_access_policy call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_policy.", + "file": "access_context_manager/create_access_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_access_policy", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::AccessPolicy", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "CreateAccessPolicy", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateAccessPolicy", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessPolicy_sync", + "title": "Snippet for the update_access_policy call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_policy.", + "file": "access_context_manager/update_access_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_access_policy", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "UpdateAccessPolicy", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateAccessPolicy", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessPolicy_sync", + "title": "Snippet for the delete_access_policy call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_policy.", + "file": "access_context_manager/delete_access_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_access_policy", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "DeleteAccessPolicy", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteAccessPolicy", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListAccessLevels_sync", + "title": "Snippet for the list_access_levels call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_levels.", + "file": "access_context_manager/list_access_levels.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_access_levels", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_levels", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "ListAccessLevels", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListAccessLevels", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetAccessLevel_sync", + "title": "Snippet for the get_access_level call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_level.", + "file": "access_context_manager/get_access_level.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_access_level", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_level", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest", + "name": "request" + } + ], + "result_type": "::Google::Identity::AccessContextManager::V1::AccessLevel", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "GetAccessLevel", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetAccessLevel", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateAccessLevel_sync", + "title": "Snippet for the create_access_level call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_level.", + "file": "access_context_manager/create_access_level.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_access_level", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_level", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "CreateAccessLevel", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateAccessLevel", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessLevel_sync", + "title": "Snippet for the update_access_level call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_level.", + "file": "access_context_manager/update_access_level.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_access_level", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_level", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "UpdateAccessLevel", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateAccessLevel", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessLevel_sync", + "title": "Snippet for the delete_access_level call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_level.", + "file": "access_context_manager/delete_access_level.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_access_level", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_level", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "DeleteAccessLevel", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteAccessLevel", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ReplaceAccessLevels_sync", + "title": "Snippet for the replace_access_levels call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_access_levels.", + "file": "access_context_manager/replace_access_levels.rb", + "language": "RUBY", + "client_method": { + "short_name": "replace_access_levels", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_access_levels", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "ReplaceAccessLevels", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ReplaceAccessLevels", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListServicePerimeters_sync", + "title": "Snippet for the list_service_perimeters call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_service_perimeters.", + "file": "access_context_manager/list_service_perimeters.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_service_perimeters", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_service_perimeters", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest", + "name": "request" + } + ], + "result_type": "::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "ListServicePerimeters", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListServicePerimeters", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetServicePerimeter_sync", + "title": "Snippet for the get_service_perimeter call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_service_perimeter.", + "file": "access_context_manager/get_service_perimeter.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_service_perimeter", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_service_perimeter", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest", + "name": "request" + } + ], + "result_type": "::Google::Identity::AccessContextManager::V1::ServicePerimeter", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "GetServicePerimeter", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetServicePerimeter", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateServicePerimeter_sync", + "title": "Snippet for the create_service_perimeter call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_service_perimeter.", + "file": "access_context_manager/create_service_perimeter.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_service_perimeter", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_service_perimeter", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "CreateServicePerimeter", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateServicePerimeter", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateServicePerimeter_sync", + "title": "Snippet for the update_service_perimeter call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_service_perimeter.", + "file": "access_context_manager/update_service_perimeter.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_service_perimeter", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_service_perimeter", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "UpdateServicePerimeter", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateServicePerimeter", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteServicePerimeter_sync", + "title": "Snippet for the delete_service_perimeter call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_service_perimeter.", + "file": "access_context_manager/delete_service_perimeter.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_service_perimeter", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_service_perimeter", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "DeleteServicePerimeter", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteServicePerimeter", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ReplaceServicePerimeters_sync", + "title": "Snippet for the replace_service_perimeters call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_service_perimeters.", + "file": "access_context_manager/replace_service_perimeters.rb", + "language": "RUBY", + "client_method": { + "short_name": "replace_service_perimeters", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_service_perimeters", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "ReplaceServicePerimeters", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ReplaceServicePerimeters", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CommitServicePerimeters_sync", + "title": "Snippet for the commit_service_perimeters call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#commit_service_perimeters.", + "file": "access_context_manager/commit_service_perimeters.rb", + "language": "RUBY", + "client_method": { + "short_name": "commit_service_perimeters", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#commit_service_perimeters", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "CommitServicePerimeters", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CommitServicePerimeters", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListGcpUserAccessBindings_sync", + "title": "Snippet for the list_gcp_user_access_bindings call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_gcp_user_access_bindings.", + "file": "access_context_manager/list_gcp_user_access_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_gcp_user_access_bindings", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_gcp_user_access_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "ListGcpUserAccessBindings", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetGcpUserAccessBinding_sync", + "title": "Snippet for the get_gcp_user_access_binding call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_gcp_user_access_binding.", + "file": "access_context_manager/get_gcp_user_access_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_gcp_user_access_binding", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_gcp_user_access_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "GetGcpUserAccessBinding", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetGcpUserAccessBinding", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateGcpUserAccessBinding_sync", + "title": "Snippet for the create_gcp_user_access_binding call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_gcp_user_access_binding.", + "file": "access_context_manager/create_gcp_user_access_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_gcp_user_access_binding", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_gcp_user_access_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "CreateGcpUserAccessBinding", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateGcpUserAccessBinding", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateGcpUserAccessBinding_sync", + "title": "Snippet for the update_gcp_user_access_binding call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_gcp_user_access_binding.", + "file": "access_context_manager/update_gcp_user_access_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_gcp_user_access_binding", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_gcp_user_access_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "UpdateGcpUserAccessBinding", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateGcpUserAccessBinding", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteGcpUserAccessBinding_sync", + "title": "Snippet for the delete_gcp_user_access_binding call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_gcp_user_access_binding.", + "file": "access_context_manager/delete_gcp_user_access_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_gcp_user_access_binding", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_gcp_user_access_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "DeleteGcpUserAccessBinding", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteGcpUserAccessBinding", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#set_iam_policy.", + "file": "access_context_manager/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.SetIamPolicy", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_iam_policy.", + "file": "access_context_manager/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetIamPolicy", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#test_iam_permissions.", + "file": "access_context_manager/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.TestIamPermissions", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "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-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb new file mode 100644 index 000000000000..1ea8e7851b02 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/identity/accesscontextmanager/v1/access_context_manager_pb" +require "google/identity/accesscontextmanager/v1/access_context_manager_services_pb" +require "google/identity/access_context_manager/v1/access_context_manager" + +class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb new file mode 100644 index 000000000000..d60902c54e76 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/identity/access_context_manager/v1/access_context_manager" + +class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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_access_level_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.access_level_path access_policy: "value0", access_level: "value1" + assert_equal "accessPolicies/value0/accessLevels/value1", path + end + end + + def test_access_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.access_policy_path access_policy: "value0" + assert_equal "accessPolicies/value0", path + end + end + + def test_gcp_user_access_binding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.gcp_user_access_binding_path organization: "value0", gcp_user_access_binding: "value1" + assert_equal "organizations/value0/gcpUserAccessBindings/value1", path + end + end + + def test_organization_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_path organization: "value0" + assert_equal "organizations/value0", path + end + end + + def test_service_perimeter_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_perimeter_path access_policy: "value0", service_perimeter: "value1" + assert_equal "accessPolicies/value0/servicePerimeters/value1", path + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb new file mode 100644 index 000000000000..ca3e1e9d95ca --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb @@ -0,0 +1,1535 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/identity/accesscontextmanager/v1/access_context_manager_pb" +require "google/identity/access_context_manager/v1/access_context_manager/rest" + + +class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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_access_policies + # Create test objects. + client_result = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse.new + http_response = OpenStruct.new 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_access_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_access_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_access_policies_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_access_policies({ 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_access_policies 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_access_policies ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.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_access_policies({ 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_access_policies(::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.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_access_policies_client_stub.call_count + end + end + end + + def test_get_access_policy + # Create test objects. + client_result = ::Google::Identity::AccessContextManager::V1::AccessPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_access_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::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_access_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_access_policy_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_access_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_access_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_access_policy ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_access_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_access_policy(::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_access_policy_client_stub.call_count + end + end + end + + def test_create_access_policy + # Create test objects. + 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" + parent = "hello world" + title = "hello world" + scopes = ["hello world"] + create_time = {} + update_time = {} + etag = "hello world" + + create_access_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::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_access_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_access_policy_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_access_policy name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_access_policy ::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_access_policy(::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_access_policy_client_stub.call_count + end + end + end + + def test_update_access_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + policy = {} + update_mask = {} + + update_access_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::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_access_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_access_policy_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_access_policy({ policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_access_policy policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_access_policy ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_access_policy({ 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.update_access_policy(::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(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, update_access_policy_client_stub.call_count + end + end + end + + def test_delete_access_policy + # Create test objects. + 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_access_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::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_access_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_access_policy_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_access_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_access_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_access_policy ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_access_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_access_policy(::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_access_policy_client_stub.call_count + end + end + end + + def test_list_access_levels + # Create test objects. + client_result = ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + access_level_format = :LEVEL_FORMAT_UNSPECIFIED + + list_access_levels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_access_levels_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_access_levels_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_access_levels parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_access_levels ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_access_levels(::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_access_levels_client_stub.call_count + end + end + end + + def test_get_access_level + # Create test objects. + client_result = ::Google::Identity::AccessContextManager::V1::AccessLevel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + access_level_format = :LEVEL_FORMAT_UNSPECIFIED + + get_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_access_level_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_access_level_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_access_level({ name: name, access_level_format: access_level_format }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_access_level name: name, access_level_format: access_level_format do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_access_level ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_access_level({ name: name, access_level_format: access_level_format }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_access_level(::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_access_level_client_stub.call_count + end + end + end + + def test_create_access_level + # Create test objects. + 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" + access_level = {} + + create_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_access_level_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_access_level_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_access_level({ parent: parent, access_level: access_level }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_access_level parent: parent, access_level: access_level do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_access_level ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_access_level({ parent: parent, access_level: access_level }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_access_level(::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_access_level_client_stub.call_count + end + end + end + + def test_update_access_level + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + access_level = {} + update_mask = {} + + update_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_access_level_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_access_level_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_access_level({ access_level: access_level, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_access_level access_level: access_level, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_access_level ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_access_level({ access_level: access_level, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_access_level(::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_access_level_client_stub.call_count + end + end + end + + def test_delete_access_level + # Create test objects. + 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_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_access_level_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_access_level_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_access_level({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_access_level name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_access_level ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_access_level({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_access_level(::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_access_level_client_stub.call_count + end + end + end + + def test_replace_access_levels + # Create test objects. + 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" + access_levels = [{}] + etag = "hello world" + + replace_access_levels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_replace_access_levels_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, replace_access_levels_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.replace_access_levels parent: parent, access_levels: access_levels, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.replace_access_levels ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.replace_access_levels(::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, replace_access_levels_client_stub.call_count + end + end + end + + def test_list_service_perimeters + # Create test objects. + client_result = ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse.new + http_response = OpenStruct.new 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_service_perimeters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_service_perimeters_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_service_perimeters_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_service_perimeters({ 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_service_perimeters 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_service_perimeters ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.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_service_perimeters({ 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_service_perimeters(::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.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_service_perimeters_client_stub.call_count + end + end + end + + def test_get_service_perimeter + # Create test objects. + client_result = ::Google::Identity::AccessContextManager::V1::ServicePerimeter.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_service_perimeter_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_service_perimeter_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_service_perimeter({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_service_perimeter name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_service_perimeter ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_service_perimeter({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_service_perimeter(::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_service_perimeter_client_stub.call_count + end + end + end + + def test_create_service_perimeter + # Create test objects. + 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" + service_perimeter = {} + + create_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_service_perimeter_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_service_perimeter_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_service_perimeter parent: parent, service_perimeter: service_perimeter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_service_perimeter ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_service_perimeter(::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_service_perimeter_client_stub.call_count + end + end + end + + def test_update_service_perimeter + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service_perimeter = {} + update_mask = {} + + update_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_service_perimeter_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_service_perimeter_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_service_perimeter({ service_perimeter: service_perimeter, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_service_perimeter service_perimeter: service_perimeter, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_service_perimeter ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_service_perimeter({ service_perimeter: service_perimeter, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_service_perimeter(::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_service_perimeter_client_stub.call_count + end + end + end + + def test_delete_service_perimeter + # Create test objects. + 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_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_service_perimeter_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_service_perimeter_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_service_perimeter({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_service_perimeter name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_service_perimeter ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_service_perimeter({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_service_perimeter(::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_service_perimeter_client_stub.call_count + end + end + end + + def test_replace_service_perimeters + # Create test objects. + 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" + service_perimeters = [{}] + etag = "hello world" + + replace_service_perimeters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_replace_service_perimeters_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, replace_service_perimeters_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.replace_service_perimeters parent: parent, service_perimeters: service_perimeters, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.replace_service_perimeters ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.replace_service_perimeters(::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, replace_service_perimeters_client_stub.call_count + end + end + end + + def test_commit_service_perimeters + # Create test objects. + 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" + etag = "hello world" + + commit_service_perimeters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_commit_service_perimeters_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, commit_service_perimeters_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.commit_service_perimeters({ parent: parent, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.commit_service_perimeters parent: parent, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.commit_service_perimeters ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.commit_service_perimeters({ parent: parent, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.commit_service_perimeters(::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, commit_service_perimeters_client_stub.call_count + end + end + end + + def test_list_gcp_user_access_bindings + # Create test objects. + client_result = ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse.new + http_response = OpenStruct.new 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_gcp_user_access_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_gcp_user_access_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_gcp_user_access_bindings_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_gcp_user_access_bindings({ 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_gcp_user_access_bindings 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_gcp_user_access_bindings ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.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_gcp_user_access_bindings({ 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_gcp_user_access_bindings(::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.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_gcp_user_access_bindings_client_stub.call_count + end + end + end + + def test_get_gcp_user_access_binding + # Create test objects. + client_result = ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_gcp_user_access_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_gcp_user_access_binding_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_gcp_user_access_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_gcp_user_access_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_gcp_user_access_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_gcp_user_access_binding_client_stub.call_count + end + end + end + + def test_create_gcp_user_access_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + gcp_user_access_binding = {} + + create_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_gcp_user_access_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_gcp_user_access_binding_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_gcp_user_access_binding parent: parent, gcp_user_access_binding: gcp_user_access_binding do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_gcp_user_access_binding_client_stub.call_count + end + end + end + + def test_update_gcp_user_access_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + gcp_user_access_binding = {} + update_mask = {} + + update_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_gcp_user_access_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_gcp_user_access_binding_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_gcp_user_access_binding gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_gcp_user_access_binding_client_stub.call_count + end + end + end + + def test_delete_gcp_user_access_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_gcp_user_access_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_gcp_user_access_binding_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_gcp_user_access_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_gcp_user_access_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_gcp_user_access_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_gcp_user_access_binding_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::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb new file mode 100644 index 000000000000..d3b3b3c58ac8 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb @@ -0,0 +1,1785 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/identity/accesscontextmanager/v1/access_context_manager_pb" +require "google/identity/access_context_manager/v1/access_context_manager" + +class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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_access_policies + # Create GRPC objects. + grpc_response = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_access_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_access_policies, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, 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_access_policies_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_access_policies({ 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_access_policies 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_access_policies ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.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_access_policies({ 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_access_policies(::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.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_access_policies_client_stub.call_rpc_count + end + end + + def test_get_access_policy + # Create GRPC objects. + grpc_response = ::Google::Identity::AccessContextManager::V1::AccessPolicy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_access_policy, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_access_policy_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_access_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_access_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_access_policy ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_access_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_access_policy(::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_access_policy_client_stub.call_rpc_count + end + end + + def test_create_access_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + parent = "hello world" + title = "hello world" + scopes = ["hello world"] + create_time = {} + update_time = {} + etag = "hello world" + + create_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_access_policy, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessPolicy, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["title"] + assert_equal ["hello world"], request["scopes"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["create_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["update_time"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_access_policy_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_access_policy name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_access_policy ::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_access_policy(::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_access_policy_client_stub.call_rpc_count + end + end + + def test_update_access_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + policy = {} + update_mask = {} + + update_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_access_policy, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::AccessPolicy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_access_policy_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_access_policy({ policy: policy, 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_access_policy policy: policy, 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_access_policy ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, 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_access_policy({ policy: policy, 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_access_policy(::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, 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_access_policy_client_stub.call_rpc_count + end + end + + def test_delete_access_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_access_policy, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_access_policy_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_access_policy({ name: 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_access_policy name: 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_access_policy ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.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_access_policy({ name: name }, grpc_options) do |response, operation| + assert_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_access_policy(::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.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_access_policy_client_stub.call_rpc_count + end + end + + def test_list_access_levels + # Create GRPC objects. + grpc_response = ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + access_level_format = :LEVEL_FORMAT_UNSPECIFIED + + list_access_levels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_access_levels, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :LEVEL_FORMAT_UNSPECIFIED, request["access_level_format"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_access_levels_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_access_levels parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_access_levels ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_access_levels(::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_access_levels_client_stub.call_rpc_count + end + end + + def test_get_access_level + # Create GRPC objects. + grpc_response = ::Google::Identity::AccessContextManager::V1::AccessLevel.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + access_level_format = :LEVEL_FORMAT_UNSPECIFIED + + get_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_access_level, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, request + assert_equal "hello world", request["name"] + assert_equal :LEVEL_FORMAT_UNSPECIFIED, request["access_level_format"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_access_level_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_access_level({ name: name, access_level_format: access_level_format }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_access_level name: name, access_level_format: access_level_format do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_access_level ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_access_level({ name: name, access_level_format: access_level_format }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_access_level(::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_access_level_client_stub.call_rpc_count + end + end + + def test_create_access_level + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + access_level = {} + + create_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_access_level, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::AccessLevel), request["access_level"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_access_level_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_access_level({ parent: parent, access_level: access_level }) do |response, 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_access_level parent: parent, access_level: access_level do |response, 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_access_level ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level) do |response, operation| + assert_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_access_level({ parent: parent, access_level: access_level }, grpc_options) do |response, operation| + assert_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_access_level(::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level), grpc_options) do |response, operation| + assert_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_access_level_client_stub.call_rpc_count + end + end + + def test_update_access_level + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + access_level = {} + update_mask = {} + + update_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_access_level, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::AccessLevel), request["access_level"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_access_level_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_access_level({ access_level: access_level, 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_access_level access_level: access_level, 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_access_level ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, 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_access_level({ access_level: access_level, 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_access_level(::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, 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_access_level_client_stub.call_rpc_count + end + end + + def test_delete_access_level + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_access_level, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_access_level_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_access_level({ name: 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_access_level name: 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_access_level ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.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_access_level({ name: name }, grpc_options) do |response, operation| + assert_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_access_level(::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.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_access_level_client_stub.call_rpc_count + end + end + + def test_replace_access_levels + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + access_levels = [{}] + etag = "hello world" + + replace_access_levels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :replace_access_levels, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessLevel, request["access_levels"].first + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, replace_access_levels_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.replace_access_levels parent: parent, access_levels: access_levels, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.replace_access_levels ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.replace_access_levels(::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, replace_access_levels_client_stub.call_rpc_count + end + end + + def test_list_service_perimeters + # Create GRPC objects. + grpc_response = ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_service_perimeters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_service_perimeters, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, 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_service_perimeters_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_service_perimeters({ 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_service_perimeters 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_service_perimeters ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.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_service_perimeters({ 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_service_perimeters(::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.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_service_perimeters_client_stub.call_rpc_count + end + end + + def test_get_service_perimeter + # Create GRPC objects. + grpc_response = ::Google::Identity::AccessContextManager::V1::ServicePerimeter.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_service_perimeter, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_service_perimeter_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_service_perimeter({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_service_perimeter name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_service_perimeter ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_service_perimeter({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_service_perimeter(::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_service_perimeter_client_stub.call_rpc_count + end + end + + def test_create_service_perimeter + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + service_perimeter = {} + + create_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_service_perimeter, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::ServicePerimeter), request["service_perimeter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_service_perimeter_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }) do |response, 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_service_perimeter parent: parent, service_perimeter: service_perimeter do |response, 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_service_perimeter ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter) do |response, operation| + assert_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_service_perimeter({ parent: parent, service_perimeter: service_perimeter }, grpc_options) do |response, operation| + assert_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_service_perimeter(::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter), grpc_options) do |response, operation| + assert_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_service_perimeter_client_stub.call_rpc_count + end + end + + def test_update_service_perimeter + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service_perimeter = {} + update_mask = {} + + update_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_service_perimeter, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::ServicePerimeter), request["service_perimeter"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_service_perimeter_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_service_perimeter({ service_perimeter: service_perimeter, 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_service_perimeter service_perimeter: service_perimeter, 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_service_perimeter ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, 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_service_perimeter({ service_perimeter: service_perimeter, 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_service_perimeter(::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, 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_service_perimeter_client_stub.call_rpc_count + end + end + + def test_delete_service_perimeter + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_service_perimeter, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_service_perimeter_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_service_perimeter({ name: 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_service_perimeter name: 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_service_perimeter ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.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_service_perimeter({ name: name }, grpc_options) do |response, operation| + assert_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_service_perimeter(::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.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_service_perimeter_client_stub.call_rpc_count + end + end + + def test_replace_service_perimeters + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + service_perimeters = [{}] + etag = "hello world" + + replace_service_perimeters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :replace_service_perimeters, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Identity::AccessContextManager::V1::ServicePerimeter, request["service_perimeters"].first + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, replace_service_perimeters_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.replace_service_perimeters parent: parent, service_perimeters: service_perimeters, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.replace_service_perimeters ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.replace_service_perimeters(::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, replace_service_perimeters_client_stub.call_rpc_count + end + end + + def test_commit_service_perimeters + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + etag = "hello world" + + commit_service_perimeters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :commit_service_perimeters, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, commit_service_perimeters_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.commit_service_perimeters({ parent: parent, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.commit_service_perimeters parent: parent, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.commit_service_perimeters ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.commit_service_perimeters({ parent: parent, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.commit_service_perimeters(::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, commit_service_perimeters_client_stub.call_rpc_count + end + end + + def test_list_gcp_user_access_bindings + # Create GRPC objects. + grpc_response = ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_gcp_user_access_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_gcp_user_access_bindings, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, 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_gcp_user_access_bindings_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_gcp_user_access_bindings({ 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_gcp_user_access_bindings 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_gcp_user_access_bindings ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.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_gcp_user_access_bindings({ 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_gcp_user_access_bindings(::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.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_gcp_user_access_bindings_client_stub.call_rpc_count + end + end + + def test_get_gcp_user_access_binding + # Create GRPC objects. + grpc_response = ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_gcp_user_access_binding, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_gcp_user_access_binding_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_gcp_user_access_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_gcp_user_access_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_gcp_user_access_binding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_gcp_user_access_binding_client_stub.call_rpc_count + end + end + + def test_create_gcp_user_access_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + gcp_user_access_binding = {} + + create_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_gcp_user_access_binding, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding), request["gcp_user_access_binding"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_gcp_user_access_binding_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }) do |response, 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_gcp_user_access_binding parent: parent, gcp_user_access_binding: gcp_user_access_binding do |response, 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_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding) do |response, operation| + assert_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_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }, grpc_options) do |response, operation| + assert_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_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding), grpc_options) do |response, operation| + assert_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_gcp_user_access_binding_client_stub.call_rpc_count + end + end + + def test_update_gcp_user_access_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + gcp_user_access_binding = {} + update_mask = {} + + update_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_gcp_user_access_binding, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding), request["gcp_user_access_binding"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_gcp_user_access_binding_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, 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_gcp_user_access_binding gcp_user_access_binding: gcp_user_access_binding, 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_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, 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_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, 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_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, 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_gcp_user_access_binding_client_stub.call_rpc_count + end + end + + def test_delete_gcp_user_access_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_gcp_user_access_binding, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_gcp_user_access_binding_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_gcp_user_access_binding({ name: 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_gcp_user_access_binding name: 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_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.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_gcp_user_access_binding({ name: name }, grpc_options) do |response, operation| + assert_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_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.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_gcp_user_access_binding_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::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-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-maps-fleet_engine-delivery-v1/.gitignore b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/.repo-metadata.json b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json new file mode 100644 index 000000000000..9720ed4289b0 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "fleetengine.googleapis.com", + "api_shortname": "fleetengine-delivery", + "client_documentation": "https://rubydoc.info/gems/google-maps-fleet_engine-delivery-v1", + "distribution_name": "google-maps-fleet_engine-delivery-v1", + "is_cloud": false, + "language": "ruby", + "name": "fleetengine-delivery", + "name_pretty": "Last Mile Fleet Solution Delivery V1 API", + "product_documentation": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-delivery-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine-delivery instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml new file mode 100644 index 000000000000..5134ed6467fb --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1.rb" diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.toys.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/.yardopts b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.yardopts new file mode 100644 index 000000000000..443d62823a66 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Last Mile Fleet Solution Delivery 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-maps-fleet_engine-delivery-v1/AUTHENTICATION.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..5667ca97e0e4 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1" + +client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/maps/fleet_engine/delivery/v1" + +::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery-v1/CHANGELOG.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/LICENSE.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/README.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/README.md new file mode 100644 index 000000000000..82a47c4e3770 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Last Mile Fleet Solution Delivery V1 API + +Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. + +Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Last Mile Fleet Solution Delivery V1 API. Most users should consider using +the main client gem, +[google-maps-fleet_engine-delivery](https://rubygems.org/gems/google-maps-fleet_engine-delivery). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-maps-fleet_engine-delivery-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/fleetengine.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/maps/fleet_engine/delivery/v1" + +client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new +request = ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new # (request fields as keyword arguments...) +response = client.create_delivery_vehicle request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-maps-fleet_engine-delivery-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/maps/documentation/transportation-logistics/mobility) +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/maps/fleet_engine/delivery/v1" +require "logger" + +client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery`, +and lower-level _versioned_ client libraries with names such as +`google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery`. +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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/Rakefile b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Rakefile new file mode 100644 index 000000000000..cd9e87b75d54 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1/delivery_service/credentials" + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-maps-fleet_engine-delivery-v1" + header "google-maps-fleet_engine-delivery-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-maps-fleet_engine-delivery-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/gapic_metadata.json b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/gapic_metadata.json new file mode 100644 index 000000000000..4c69a9a6c497 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/gapic_metadata.json @@ -0,0 +1,78 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "maps.fleetengine.delivery.v1", + "libraryPackage": "::Google::Maps::FleetEngine::Delivery::V1", + "services": { + "DeliveryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client", + "rpcs": { + "CreateDeliveryVehicle": { + "methods": [ + "create_delivery_vehicle" + ] + }, + "GetDeliveryVehicle": { + "methods": [ + "get_delivery_vehicle" + ] + }, + "DeleteDeliveryVehicle": { + "methods": [ + "delete_delivery_vehicle" + ] + }, + "UpdateDeliveryVehicle": { + "methods": [ + "update_delivery_vehicle" + ] + }, + "BatchCreateTasks": { + "methods": [ + "batch_create_tasks" + ] + }, + "CreateTask": { + "methods": [ + "create_task" + ] + }, + "GetTask": { + "methods": [ + "get_task" + ] + }, + "DeleteTask": { + "methods": [ + "delete_task" + ] + }, + "UpdateTask": { + "methods": [ + "update_task" + ] + }, + "ListTasks": { + "methods": [ + "list_tasks" + ] + }, + "GetTaskTrackingInfo": { + "methods": [ + "get_task_tracking_info" + ] + }, + "ListDeliveryVehicles": { + "methods": [ + "list_delivery_vehicles" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec new file mode 100644 index 000000000000..14a432b6a9ba --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/maps/fleet_engine/delivery/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-maps-fleet_engine-delivery-v1" + gem.version = Google::Maps::FleetEngine::Delivery::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-delivery-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine-delivery instead. See the readme for more details." + gem.summary = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms." + 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-geo-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb new file mode 100644 index 000000000000..cd1ad7559d55 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1" diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb new file mode 100644 index 000000000000..bf548f559e81 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/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/maps/fleet_engine/delivery/v1/delivery_service" +require "google/maps/fleet_engine/delivery/v1/version" + +module Google + module Maps + module FleetEngine + module Delivery + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/maps/fleet_engine/delivery/v1" + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/maps/fleet_engine/delivery/v1" + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/maps/fleet_engine/delivery/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb new file mode 100644 index 000000000000..3f52ddd3345e --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/maps/fleet_engine/delivery/v1/version" + +require "google/maps/fleet_engine/delivery/v1/delivery_service/credentials" +require "google/maps/fleet_engine/delivery/v1/delivery_service/paths" +require "google/maps/fleet_engine/delivery/v1/delivery_service/client" +require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + ## + # The Last Mile Delivery service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/maps/fleet_engine/delivery/v1/delivery_service" + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + module DeliveryService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "delivery_service", "helpers.rb" +require "google/maps/fleet_engine/delivery/v1/delivery_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb new file mode 100644 index 000000000000..bacd2d0c6b05 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb @@ -0,0 +1,1755 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/maps/fleetengine/delivery/v1/delivery_api_pb" + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + module DeliveryService + ## + # Client for the DeliveryService service. + # + # The Last Mile Delivery service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :delivery_service_stub + + ## + # Configure the DeliveryService Client class. + # + # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DeliveryService clients + # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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", "Maps", "FleetEngine", "Delivery", "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_delivery_vehicle.timeout = 60.0 + default_config.rpcs.create_delivery_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_delivery_vehicle.timeout = 60.0 + default_config.rpcs.get_delivery_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_delivery_vehicle.timeout = 60.0 + default_config.rpcs.update_delivery_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.batch_create_tasks.timeout = 60.0 + default_config.rpcs.batch_create_tasks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_task.timeout = 60.0 + default_config.rpcs.create_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task.timeout = 60.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_task.timeout = 60.0 + default_config.rpcs.update_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_tasks.timeout = 60.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task_tracking_info.timeout = 60.0 + default_config.rpcs.get_task_tracking_info.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_delivery_vehicles.timeout = 60.0 + default_config.rpcs.list_delivery_vehicles.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DeliveryService 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::Maps::FleetEngine::Delivery::V1::DeliveryService::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 + @delivery_service_stub.universe_domain + end + + ## + # Create a new DeliveryService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DeliveryService 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/maps/fleetengine/delivery/v1/delivery_api_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 + + @delivery_service_stub = ::Gapic::ServiceStub.new( + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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 + ) + + @delivery_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 + @delivery_service_stub.logger + end + + # Service calls + + ## + # Creates and returns a new `DeliveryVehicle`. + # + # @overload create_delivery_vehicle(request, options = nil) + # Pass arguments to `create_delivery_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_delivery_vehicle(header: nil, parent: nil, delivery_vehicle_id: nil, delivery_vehicle: nil) + # Pass arguments to `create_delivery_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. The provider must + # be the Google Cloud Project ID. For example, `sample-cloud-project`. + # @param delivery_vehicle_id [::String] + # Required. The Delivery Vehicle ID must be unique and subject to the + # following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] + # Required. The `DeliveryVehicle` entity to create. When creating a new + # delivery vehicle, you may set the following optional fields: + # + # * type + # * last_location + # * attributes + # + # Note: The DeliveryVehicle's `name` field is ignored. All other + # DeliveryVehicle fields must not be set; otherwise, an error is returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new + # + # # Call the create_delivery_vehicle method. + # result = client.create_delivery_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + # p result + # + def create_delivery_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest + + # Converts hash and nil to 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_delivery_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_delivery_vehicle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_delivery_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :create_delivery_vehicle, request, 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 specified `DeliveryVehicle` instance. + # + # @overload get_delivery_vehicle(request, options = nil) + # Pass arguments to `get_delivery_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_delivery_vehicle(header: nil, name: nil) + # Pass arguments to `get_delivery_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new + # + # # Call the get_delivery_vehicle method. + # result = client.get_delivery_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + # p result + # + def get_delivery_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_delivery_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_delivery_vehicle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_delivery_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :get_delivery_vehicle, request, 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 DeliveryVehicle from the Fleet Engine. + # + # Returns FAILED_PRECONDITION if the DeliveryVehicle has OPEN Tasks + # assigned to it. + # + # @overload delete_delivery_vehicle(request, options = nil) + # Pass arguments to `delete_delivery_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_delivery_vehicle(header: nil, name: nil) + # Pass arguments to `delete_delivery_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # + # @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/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new + # + # # Call the delete_delivery_vehicle method. + # result = client.delete_delivery_vehicle request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_delivery_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_delivery_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_delivery_vehicle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_delivery_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :delete_delivery_vehicle, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns + # `Tasks` to the `DeliveryVehicle`. You cannot update the name of the + # `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`, + # but it must contain all of the `VehicleJourneySegment`s to be persisted on + # the `DeliveryVehicle`. The `task_id`s are retrieved from + # `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are + # assigned to the `DeliveryVehicle` if they have not yet been assigned. + # + # @overload update_delivery_vehicle(request, options = nil) + # Pass arguments to `update_delivery_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_delivery_vehicle(header: nil, delivery_vehicle: nil, update_mask: nil) + # Pass arguments to `update_delivery_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] + # Required. The `DeliveryVehicle` entity update to apply. + # Note: You cannot update the name of the `DeliveryVehicle`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A field mask that indicates which `DeliveryVehicle` fields to + # update. Note that the update_mask must contain at least one field. + # + # This is a comma-separated list of fully qualified names of fields. Example: + # `"remaining_vehicle_journey_segments"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new + # + # # Call the update_delivery_vehicle method. + # result = client.update_delivery_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + # p result + # + def update_delivery_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest + + # Converts hash and nil to 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_delivery_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.delivery_vehicle&.name && + %r{^providers/[^/]+/?$}.match?(request.delivery_vehicle.name) + header_params["provider_id"] = request.delivery_vehicle.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_delivery_vehicle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_delivery_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :update_delivery_vehicle, request, 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 batch of new `Task` objects. + # + # @overload batch_create_tasks(request, options = nil) + # Pass arguments to `batch_create_tasks` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tasks(header: nil, parent: nil, requests: nil) + # Pass arguments to `batch_create_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 header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # Note: If you set this field, then the header field in the + # `CreateTaskRequest` messages must either be empty, or it must match this + # field. + # @param parent [::String] + # Required. The parent resource shared by all tasks. This value must be in + # the format `providers/{provider}`. The `provider` must be the Google Cloud + # Project ID. For example, `sample-cloud-project`. The parent field in the + # `CreateTaskRequest` messages must either be empty, or it must match this + # field. + # @param requests [::Array<::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash>] + # Required. The request message that specifies the resources to create. + # Note: You can create a maximum of 500 tasks in a batch. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new + # + # # Call the batch_create_tasks method. + # result = client.batch_create_tasks request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse. + # p result + # + def batch_create_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest + + # Converts hash and nil to 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_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::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_create_tasks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_create_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :batch_create_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 + + ## + # Creates and returns a new `Task` object. + # + # @overload create_task(request, options = nil) + # Pass arguments to `create_task` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_task(header: nil, parent: nil, task_id: nil, task: 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 header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. The `provider` must + # be the Google Cloud Project ID. For example, `sample-cloud-project`. + # @param task_id [::String] + # Required. The Task ID must be unique, but it should be not a shipment + # tracking ID. To store a shipment tracking ID, use the `tracking_id` field. + # Note that multiple tasks can have the same `tracking_id`. Task IDs are + # subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] + # Required. The Task entity to create. + # When creating a Task, the following fields are required: + # + # * `type` + # * `state` (must be set to `OPEN`) + # * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` + # tasks, but required for all other task types) + # * `planned_location` (optional for `UNAVAILABLE` tasks) + # * `task_duration` + # + # The following fields can be optionally set: + # + # * `target_time_window` + # * `task_tracking_view_config` + # * `attributes` + # + # Note: The Task's `name` field is ignored. All other Task fields must not be + # set; otherwise, an error is returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new + # + # # Call the create_task method. + # result = client.create_task request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::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::Maps::FleetEngine::Delivery::V1::CreateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + 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 + + @delivery_service_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 + + ## + # Gets information about a `Task`. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_task(header: nil, name: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/tasks/{task}`. The + # `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + 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 + + @delivery_service_stub.call_rpc :get_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Task. + # + # Returns FAILED_PRECONDITION if the Task is OPEN and assigned to a + # DeliveryVehicle. + # + # @overload delete_task(request, options = nil) + # Pass arguments to `delete_task` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_task(header: nil, 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 header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/tasks/{task}`. The + # `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # + # @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/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::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::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + 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 + + @delivery_service_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 + + ## + # Updates `Task` data. + # + # @overload update_task(request, options = nil) + # Pass arguments to `update_task` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_task(header: nil, task: nil, update_mask: nil) + # Pass arguments to `update_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] + # Required. The Task associated with the update. + # The following fields are maintained by Fleet Engine. Do not update + # them using `Task.update`. + # + # * `last_location`. + # * `last_location_snappable`. + # * `name`. + # * `remaining_vehicle_journey_segments`. + # * `task_outcome_location_source`. + # + # Note: You cannot change the value of `task_outcome` once you set it. + # + # If the Task has been assigned to a delivery vehicle, then don't set the + # Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` + # that contains the Task from the delivery vehicle, which automatically sets + # the Task state to CLOSED. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The field mask that indicates which Task fields to update. + # Note: The `update_mask` must contain at least one field. + # + # This is a comma-separated list of fully qualified names of fields. Example: + # `"task_outcome,task_outcome_time,task_outcome_location"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new + # + # # Call the update_task method. + # result = client.update_task request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. + # p result + # + def update_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.task&.name && + %r{^providers/[^/]+/?$}.match?(request.task.name) + header_params["provider_id"] = request.task.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :update_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 + + ## + # Gets all `Task`s that meet the specified filtering criteria. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_tasks(header: nil, parent: nil, page_size: nil, page_token: nil, filter: 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 header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # @param page_size [::Integer] + # Optional. The maximum number of Tasks to return. The service may return + # fewer than this value. If you don't specify this value, then the server + # determines the number of results to return. + # @param page_token [::String] + # Optional. A page token received from a previous `ListTasks` call. + # You can provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListTasks` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter query to apply when listing Tasks. See + # http://aip.dev/160 for examples of filter syntax. If you don't specify a + # value, or if you filter on an empty string, then all Tasks are returned. + # For information about the Task properties that you can filter on, see [List + # tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + 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 + + @delivery_service_stub.call_rpc :list_tasks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @delivery_service_stub, :list_tasks, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the specified `TaskTrackingInfo` instance. + # + # @overload get_task_tracking_info(request, options = nil) + # Pass arguments to `get_task_tracking_info` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_tracking_info(header: nil, name: nil) + # Pass arguments to `get_task_tracking_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` + # must be the Google Cloud Project ID, and the `tracking_id` must be the + # tracking ID associated with the task. An example name can be + # `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new + # + # # Call the get_task_tracking_info method. + # result = client.get_task_tracking_info request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo. + # p result + # + def get_task_tracking_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest + + # Converts hash and nil to an 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_tracking_info.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_task_tracking_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_task_tracking_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :get_task_tracking_info, request, 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 all `DeliveryVehicle`s that meet the specified filtering criteria. + # + # @overload list_delivery_vehicles(request, options = nil) + # Pass arguments to `list_delivery_vehicles` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_delivery_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil, viewport: nil) + # Pass arguments to `list_delivery_vehicles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The `provider` must be the Google Cloud Project ID. + # For example, `sample-cloud-project`. + # @param page_size [::Integer] + # Optional. The maximum number of vehicles to return. The service may return + # fewer than this number. If you don't specify this number, then the server + # determines the number of results to return. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDeliveryVehicles` + # call. You must provide this in order to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeliveryVehicles` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. A filter query to apply when listing delivery vehicles. See + # http://aip.dev/160 for examples of the filter syntax. If you don't specify + # a value, or if you specify an empty string for the filter, then all + # delivery vehicles are returned. + # + # Note that the only queries supported for `ListDeliveryVehicles` are + # on vehicle attributes (for example, `attributes. = ` or + # `attributes. = AND attributes. = `). Also, all + # attributes are stored as strings, so the only supported comparisons against + # attributes are string comparisons. In order to compare against number or + # boolean values, the values must be explicitly quoted to be treated as + # strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + # + # The maximum number of restrictions allowed in a filter query is 50. A + # restriction is a part of the query of the form + # `attribute. `, for example `attributes.foo = bar` + # is 1 restriction. + # @param viewport [::Google::Geo::Type::Viewport, ::Hash] + # Optional. A filter that limits the vehicles returned to those whose last + # known location was in the rectangular area defined by the viewport. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new + # + # # Call the list_delivery_vehicles method. + # result = client.list_delivery_vehicles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + # p item + # end + # + def list_delivery_vehicles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_delivery_vehicles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_delivery_vehicles.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_delivery_vehicles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :list_delivery_vehicles, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @delivery_service_stub, :list_delivery_vehicles, 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 DeliveryService API. + # + # This class represents the configuration for DeliveryService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_delivery_vehicle to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_delivery_vehicle.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_delivery_vehicle.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Maps::FleetEngine::Delivery::V1::DeliveryService::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 = "fleetengine.googleapis.com" + + config_attr :endpoint, nil, ::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 DeliveryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_delivery_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :create_delivery_vehicle + ## + # RPC-specific configuration for `get_delivery_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :get_delivery_vehicle + ## + # RPC-specific configuration for `delete_delivery_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_delivery_vehicle + ## + # RPC-specific configuration for `update_delivery_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :update_delivery_vehicle + ## + # RPC-specific configuration for `batch_create_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_tasks + ## + # RPC-specific configuration for `create_task` + # @return [::Gapic::Config::Method] + # + attr_reader :create_task + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `delete_task` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_task + ## + # RPC-specific configuration for `update_task` + # @return [::Gapic::Config::Method] + # + attr_reader :update_task + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + ## + # RPC-specific configuration for `get_task_tracking_info` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task_tracking_info + ## + # RPC-specific configuration for `list_delivery_vehicles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_delivery_vehicles + + # @private + def initialize parent_rpcs = nil + create_delivery_vehicle_config = parent_rpcs.create_delivery_vehicle if parent_rpcs.respond_to? :create_delivery_vehicle + @create_delivery_vehicle = ::Gapic::Config::Method.new create_delivery_vehicle_config + get_delivery_vehicle_config = parent_rpcs.get_delivery_vehicle if parent_rpcs.respond_to? :get_delivery_vehicle + @get_delivery_vehicle = ::Gapic::Config::Method.new get_delivery_vehicle_config + delete_delivery_vehicle_config = parent_rpcs.delete_delivery_vehicle if parent_rpcs.respond_to? :delete_delivery_vehicle + @delete_delivery_vehicle = ::Gapic::Config::Method.new delete_delivery_vehicle_config + update_delivery_vehicle_config = parent_rpcs.update_delivery_vehicle if parent_rpcs.respond_to? :update_delivery_vehicle + @update_delivery_vehicle = ::Gapic::Config::Method.new update_delivery_vehicle_config + batch_create_tasks_config = parent_rpcs.batch_create_tasks if parent_rpcs.respond_to? :batch_create_tasks + @batch_create_tasks = ::Gapic::Config::Method.new batch_create_tasks_config + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task + @create_task = ::Gapic::Config::Method.new create_task_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_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 + update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task + @update_task = ::Gapic::Config::Method.new update_task_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + get_task_tracking_info_config = parent_rpcs.get_task_tracking_info if parent_rpcs.respond_to? :get_task_tracking_info + @get_task_tracking_info = ::Gapic::Config::Method.new get_task_tracking_info_config + list_delivery_vehicles_config = parent_rpcs.list_delivery_vehicles if parent_rpcs.respond_to? :list_delivery_vehicles + @list_delivery_vehicles = ::Gapic::Config::Method.new list_delivery_vehicles_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb new file mode 100644 index 000000000000..8665c263a506 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_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 Maps + module FleetEngine + module Delivery + module V1 + module DeliveryService + # Credentials for the DeliveryService 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-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb new file mode 100644 index 000000000000..dddaace08010 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb @@ -0,0 +1,100 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + module DeliveryService + # Path helper methods for the DeliveryService API. + module Paths + ## + # Create a fully-qualified DeliveryVehicle resource string. + # + # The resource will be in the following format: + # + # `providers/{provider}/deliveryVehicles/{vehicle}` + # + # @param provider [String] + # @param vehicle [String] + # + # @return [::String] + def delivery_vehicle_path provider:, vehicle: + raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" + + "providers/#{provider}/deliveryVehicles/#{vehicle}" + end + + ## + # Create a fully-qualified Provider resource string. + # + # The resource will be in the following format: + # + # `providers/{provider}` + # + # @param provider [String] + # + # @return [::String] + def provider_path provider: + "providers/#{provider}" + end + + ## + # Create a fully-qualified Task resource string. + # + # The resource will be in the following format: + # + # `providers/{provider}/tasks/{task}` + # + # @param provider [String] + # @param task [String] + # + # @return [::String] + def task_path provider:, task: + raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" + + "providers/#{provider}/tasks/#{task}" + end + + ## + # Create a fully-qualified TaskTrackingInfo resource string. + # + # The resource will be in the following format: + # + # `providers/{provider}/taskTrackingInfo/{tracking}` + # + # @param provider [String] + # @param tracking [String] + # + # @return [::String] + def task_tracking_info_path provider:, tracking: + raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" + + "providers/#{provider}/taskTrackingInfo/#{tracking}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb new file mode 100644 index 000000000000..c3e0d58b6ef6 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_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/maps/fleet_engine/delivery/v1/version" + +require "google/maps/fleet_engine/delivery/v1/delivery_service/credentials" +require "google/maps/fleet_engine/delivery/v1/delivery_service/paths" +require "google/maps/fleet_engine/delivery/v1/delivery_service/rest/client" + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + ## + # The Last Mile Delivery service. + # + # To load this service and instantiate a REST client: + # + # require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + module DeliveryService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/maps/fleet_engine/delivery/v1/delivery_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb new file mode 100644 index 000000000000..97556e6a0c7a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb @@ -0,0 +1,1616 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/maps/fleetengine/delivery/v1/delivery_api_pb" +require "google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub" + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + module DeliveryService + module Rest + ## + # REST client for the DeliveryService service. + # + # The Last Mile Delivery service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :delivery_service_stub + + ## + # Configure the DeliveryService Client class. + # + # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DeliveryService clients + # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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", "Maps", "FleetEngine", "Delivery", "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_delivery_vehicle.timeout = 60.0 + default_config.rpcs.create_delivery_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_delivery_vehicle.timeout = 60.0 + default_config.rpcs.get_delivery_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_delivery_vehicle.timeout = 60.0 + default_config.rpcs.update_delivery_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.batch_create_tasks.timeout = 60.0 + default_config.rpcs.batch_create_tasks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_task.timeout = 60.0 + default_config.rpcs.create_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task.timeout = 60.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_task.timeout = 60.0 + default_config.rpcs.update_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_tasks.timeout = 60.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task_tracking_info.timeout = 60.0 + default_config.rpcs.get_task_tracking_info.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_delivery_vehicles.timeout = 60.0 + default_config.rpcs.list_delivery_vehicles.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DeliveryService 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::Maps::FleetEngine::Delivery::V1::DeliveryService::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 + @delivery_service_stub.universe_domain + end + + ## + # Create a new DeliveryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DeliveryService 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 + + @delivery_service_stub = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @delivery_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 + @delivery_service_stub.logger + end + + # Service calls + + ## + # Creates and returns a new `DeliveryVehicle`. + # + # @overload create_delivery_vehicle(request, options = nil) + # Pass arguments to `create_delivery_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_delivery_vehicle(header: nil, parent: nil, delivery_vehicle_id: nil, delivery_vehicle: nil) + # Pass arguments to `create_delivery_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. The provider must + # be the Google Cloud Project ID. For example, `sample-cloud-project`. + # @param delivery_vehicle_id [::String] + # Required. The Delivery Vehicle ID must be unique and subject to the + # following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] + # Required. The `DeliveryVehicle` entity to create. When creating a new + # delivery vehicle, you may set the following optional fields: + # + # * type + # * last_location + # * attributes + # + # Note: The DeliveryVehicle's `name` field is ignored. All other + # DeliveryVehicle fields must not be set; otherwise, an error is returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new + # + # # Call the create_delivery_vehicle method. + # result = client.create_delivery_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + # p result + # + def create_delivery_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest + + # Converts hash and nil to an 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_delivery_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_delivery_vehicle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_delivery_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.create_delivery_vehicle request, 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 specified `DeliveryVehicle` instance. + # + # @overload get_delivery_vehicle(request, options = nil) + # Pass arguments to `get_delivery_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_delivery_vehicle(header: nil, name: nil) + # Pass arguments to `get_delivery_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new + # + # # Call the get_delivery_vehicle method. + # result = client.get_delivery_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + # p result + # + def get_delivery_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_delivery_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_delivery_vehicle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_delivery_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.get_delivery_vehicle request, 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 DeliveryVehicle from the Fleet Engine. + # + # Returns FAILED_PRECONDITION if the DeliveryVehicle has OPEN Tasks + # assigned to it. + # + # @overload delete_delivery_vehicle(request, options = nil) + # Pass arguments to `delete_delivery_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_delivery_vehicle(header: nil, name: nil) + # Pass arguments to `delete_delivery_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # @yield [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/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new + # + # # Call the delete_delivery_vehicle method. + # result = client.delete_delivery_vehicle request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_delivery_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_delivery_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_delivery_vehicle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_delivery_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.delete_delivery_vehicle request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns + # `Tasks` to the `DeliveryVehicle`. You cannot update the name of the + # `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`, + # but it must contain all of the `VehicleJourneySegment`s to be persisted on + # the `DeliveryVehicle`. The `task_id`s are retrieved from + # `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are + # assigned to the `DeliveryVehicle` if they have not yet been assigned. + # + # @overload update_delivery_vehicle(request, options = nil) + # Pass arguments to `update_delivery_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_delivery_vehicle(header: nil, delivery_vehicle: nil, update_mask: nil) + # Pass arguments to `update_delivery_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] + # Required. The `DeliveryVehicle` entity update to apply. + # Note: You cannot update the name of the `DeliveryVehicle`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A field mask that indicates which `DeliveryVehicle` fields to + # update. Note that the update_mask must contain at least one field. + # + # This is a comma-separated list of fully qualified names of fields. Example: + # `"remaining_vehicle_journey_segments"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new + # + # # Call the update_delivery_vehicle method. + # result = client.update_delivery_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + # p result + # + def update_delivery_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest + + # Converts hash and nil to an 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_delivery_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_delivery_vehicle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_delivery_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.update_delivery_vehicle request, 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 batch of new `Task` objects. + # + # @overload batch_create_tasks(request, options = nil) + # Pass arguments to `batch_create_tasks` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tasks(header: nil, parent: nil, requests: nil) + # Pass arguments to `batch_create_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 header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # Note: If you set this field, then the header field in the + # `CreateTaskRequest` messages must either be empty, or it must match this + # field. + # @param parent [::String] + # Required. The parent resource shared by all tasks. This value must be in + # the format `providers/{provider}`. The `provider` must be the Google Cloud + # Project ID. For example, `sample-cloud-project`. The parent field in the + # `CreateTaskRequest` messages must either be empty, or it must match this + # field. + # @param requests [::Array<::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash>] + # Required. The request message that specifies the resources to create. + # Note: You can create a maximum of 500 tasks in a batch. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new + # + # # Call the batch_create_tasks method. + # result = client.batch_create_tasks request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse. + # p result + # + def batch_create_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest + + # Converts hash and nil to an 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_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::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_tasks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_create_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.batch_create_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 + + ## + # Creates and returns a new `Task` object. + # + # @overload create_task(request, options = nil) + # Pass arguments to `create_task` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_task(header: nil, parent: nil, task_id: nil, task: 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 header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. The `provider` must + # be the Google Cloud Project ID. For example, `sample-cloud-project`. + # @param task_id [::String] + # Required. The Task ID must be unique, but it should be not a shipment + # tracking ID. To store a shipment tracking ID, use the `tracking_id` field. + # Note that multiple tasks can have the same `tracking_id`. Task IDs are + # subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] + # Required. The Task entity to create. + # When creating a Task, the following fields are required: + # + # * `type` + # * `state` (must be set to `OPEN`) + # * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` + # tasks, but required for all other task types) + # * `planned_location` (optional for `UNAVAILABLE` tasks) + # * `task_duration` + # + # The following fields can be optionally set: + # + # * `target_time_window` + # * `task_tracking_view_config` + # * `attributes` + # + # Note: The Task's `name` field is ignored. All other Task fields must not be + # set; otherwise, an error is returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new + # + # # Call the create_task method. + # result = client.create_task request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::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::Maps::FleetEngine::Delivery::V1::CreateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @delivery_service_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 + + ## + # Gets information about a `Task`. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_task(header: nil, name: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/tasks/{task}`. The + # `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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 + + @delivery_service_stub.get_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Task. + # + # Returns FAILED_PRECONDITION if the Task is OPEN and assigned to a + # DeliveryVehicle. + # + # @overload delete_task(request, options = nil) + # Pass arguments to `delete_task` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_task(header: nil, 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 header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/tasks/{task}`. The + # `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # @yield [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/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::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::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @delivery_service_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 + + ## + # Updates `Task` data. + # + # @overload update_task(request, options = nil) + # Pass arguments to `update_task` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_task(header: nil, task: nil, update_mask: nil) + # Pass arguments to `update_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] + # Required. The Task associated with the update. + # The following fields are maintained by Fleet Engine. Do not update + # them using `Task.update`. + # + # * `last_location`. + # * `last_location_snappable`. + # * `name`. + # * `remaining_vehicle_journey_segments`. + # * `task_outcome_location_source`. + # + # Note: You cannot change the value of `task_outcome` once you set it. + # + # If the Task has been assigned to a delivery vehicle, then don't set the + # Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` + # that contains the Task from the delivery vehicle, which automatically sets + # the Task state to CLOSED. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The field mask that indicates which Task fields to update. + # Note: The `update_mask` must contain at least one field. + # + # This is a comma-separated list of fully qualified names of fields. Example: + # `"task_outcome,task_outcome_time,task_outcome_location"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new + # + # # Call the update_task method. + # result = client.update_task request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. + # p result + # + def update_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.update_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 + + ## + # Gets all `Task`s that meet the specified filtering criteria. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_tasks(header: nil, parent: nil, page_size: nil, page_token: nil, filter: 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 header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # @param page_size [::Integer] + # Optional. The maximum number of Tasks to return. The service may return + # fewer than this value. If you don't specify this value, then the server + # determines the number of results to return. + # @param page_token [::String] + # Optional. A page token received from a previous `ListTasks` call. + # You can provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListTasks` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter query to apply when listing Tasks. See + # http://aip.dev/160 for examples of filter syntax. If you don't specify a + # value, or if you filter on an empty string, then all Tasks are returned. + # For information about the Task properties that you can filter on, see [List + # tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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 + + @delivery_service_stub.list_tasks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @delivery_service_stub, :list_tasks, "tasks", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the specified `TaskTrackingInfo` instance. + # + # @overload get_task_tracking_info(request, options = nil) + # Pass arguments to `get_task_tracking_info` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_tracking_info(header: nil, name: nil) + # Pass arguments to `get_task_tracking_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` + # must be the Google Cloud Project ID, and the `tracking_id` must be the + # tracking ID associated with the task. An example name can be + # `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new + # + # # Call the get_task_tracking_info method. + # result = client.get_task_tracking_info request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo. + # p result + # + def get_task_tracking_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest + + # Converts hash and nil to an options 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_tracking_info.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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_tracking_info.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_task_tracking_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.get_task_tracking_info request, 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 all `DeliveryVehicle`s that meet the specified filtering criteria. + # + # @overload list_delivery_vehicles(request, options = nil) + # Pass arguments to `list_delivery_vehicles` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_delivery_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil, viewport: nil) + # Pass arguments to `list_delivery_vehicles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The `provider` must be the Google Cloud Project ID. + # For example, `sample-cloud-project`. + # @param page_size [::Integer] + # Optional. The maximum number of vehicles to return. The service may return + # fewer than this number. If you don't specify this number, then the server + # determines the number of results to return. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDeliveryVehicles` + # call. You must provide this in order to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeliveryVehicles` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. A filter query to apply when listing delivery vehicles. See + # http://aip.dev/160 for examples of the filter syntax. If you don't specify + # a value, or if you specify an empty string for the filter, then all + # delivery vehicles are returned. + # + # Note that the only queries supported for `ListDeliveryVehicles` are + # on vehicle attributes (for example, `attributes. = ` or + # `attributes. = AND attributes. = `). Also, all + # attributes are stored as strings, so the only supported comparisons against + # attributes are string comparisons. In order to compare against number or + # boolean values, the values must be explicitly quoted to be treated as + # strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + # + # The maximum number of restrictions allowed in a filter query is 50. A + # restriction is a part of the query of the form + # `attribute. `, for example `attributes.foo = bar` + # is 1 restriction. + # @param viewport [::Google::Geo::Type::Viewport, ::Hash] + # Optional. A filter that limits the vehicles returned to those whose last + # known location was in the rectangular area defined by the viewport. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new + # + # # Call the list_delivery_vehicles method. + # result = client.list_delivery_vehicles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + # p item + # end + # + def list_delivery_vehicles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_delivery_vehicles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_delivery_vehicles.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_delivery_vehicles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.list_delivery_vehicles request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @delivery_service_stub, :list_delivery_vehicles, "delivery_vehicles", request, result, 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 DeliveryService REST API. + # + # This class represents the configuration for DeliveryService 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::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_delivery_vehicle.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_delivery_vehicle.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "fleetengine.googleapis.com" + + config_attr :endpoint, nil, ::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 DeliveryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_delivery_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :create_delivery_vehicle + ## + # RPC-specific configuration for `get_delivery_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :get_delivery_vehicle + ## + # RPC-specific configuration for `delete_delivery_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_delivery_vehicle + ## + # RPC-specific configuration for `update_delivery_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :update_delivery_vehicle + ## + # RPC-specific configuration for `batch_create_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_tasks + ## + # RPC-specific configuration for `create_task` + # @return [::Gapic::Config::Method] + # + attr_reader :create_task + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `delete_task` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_task + ## + # RPC-specific configuration for `update_task` + # @return [::Gapic::Config::Method] + # + attr_reader :update_task + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + ## + # RPC-specific configuration for `get_task_tracking_info` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task_tracking_info + ## + # RPC-specific configuration for `list_delivery_vehicles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_delivery_vehicles + + # @private + def initialize parent_rpcs = nil + create_delivery_vehicle_config = parent_rpcs.create_delivery_vehicle if parent_rpcs.respond_to? :create_delivery_vehicle + @create_delivery_vehicle = ::Gapic::Config::Method.new create_delivery_vehicle_config + get_delivery_vehicle_config = parent_rpcs.get_delivery_vehicle if parent_rpcs.respond_to? :get_delivery_vehicle + @get_delivery_vehicle = ::Gapic::Config::Method.new get_delivery_vehicle_config + delete_delivery_vehicle_config = parent_rpcs.delete_delivery_vehicle if parent_rpcs.respond_to? :delete_delivery_vehicle + @delete_delivery_vehicle = ::Gapic::Config::Method.new delete_delivery_vehicle_config + update_delivery_vehicle_config = parent_rpcs.update_delivery_vehicle if parent_rpcs.respond_to? :update_delivery_vehicle + @update_delivery_vehicle = ::Gapic::Config::Method.new update_delivery_vehicle_config + batch_create_tasks_config = parent_rpcs.batch_create_tasks if parent_rpcs.respond_to? :batch_create_tasks + @batch_create_tasks = ::Gapic::Config::Method.new batch_create_tasks_config + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task + @create_task = ::Gapic::Config::Method.new create_task_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_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 + update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task + @update_task = ::Gapic::Config::Method.new update_task_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + get_task_tracking_info_config = parent_rpcs.get_task_tracking_info if parent_rpcs.respond_to? :get_task_tracking_info + @get_task_tracking_info = ::Gapic::Config::Method.new get_task_tracking_info_config + list_delivery_vehicles_config = parent_rpcs.list_delivery_vehicles if parent_rpcs.respond_to? :list_delivery_vehicles + @list_delivery_vehicles = ::Gapic::Config::Method.new list_delivery_vehicles_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb new file mode 100644 index 000000000000..b1a86959625c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb @@ -0,0 +1,820 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/maps/fleetengine/delivery/v1/delivery_api_pb" + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + module DeliveryService + module Rest + ## + # REST service stub for the DeliveryService 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_delivery_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # A result object deserialized from the server's reply + def create_delivery_vehicle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_delivery_vehicle_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_delivery_vehicle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_delivery_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # A result object deserialized from the server's reply + def get_delivery_vehicle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_delivery_vehicle_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_delivery_vehicle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.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_delivery_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_delivery_vehicle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_delivery_vehicle_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_delivery_vehicle", + 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 update_delivery_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # A result object deserialized from the server's reply + def update_delivery_vehicle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_delivery_vehicle_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_delivery_vehicle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.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_tasks REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] + # A result object deserialized from the server's reply + def batch_create_tasks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_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: "batch_create_tasks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.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::Maps::FleetEngine::Delivery::V1::CreateTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::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::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_task REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # A result object deserialized from the server's reply + def get_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_task REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::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 update_task REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # A result object deserialized from the server's reply + def update_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_tasks REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse] + # A result object deserialized from the server's reply + def list_tasks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_tasks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_task_tracking_info REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] + # A result object deserialized from the server's reply + def get_task_tracking_info request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_task_tracking_info_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |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_tracking_info", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.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_delivery_vehicles REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse] + # A result object deserialized from the server's reply + def list_delivery_vehicles request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_delivery_vehicles_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_delivery_vehicles", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.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_delivery_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest] + # 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_delivery_vehicle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/deliveryVehicles", + body: "delivery_vehicle", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_delivery_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_delivery_vehicle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_delivery_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_delivery_vehicle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_delivery_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest] + # 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_delivery_vehicle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{delivery_vehicle.name}", + body: "delivery_vehicle", + matches: [ + ["delivery_vehicle.name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_create_tasks REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest] + # 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_tasks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/tasks:batchCreate", + body: "*", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_task REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/tasks", + body: "task", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_task REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_task REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_task REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{task.name}", + body: "task", + matches: [ + ["task.name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tasks REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_tasks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/tasks", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_task_tracking_info REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest] + # A 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_tracking_info_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/taskTrackingInfo/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_delivery_vehicles REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_delivery_vehicles_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/deliveryVehicles", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb new file mode 100644 index 000000000000..8bc23bd54948 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/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/maps/fleet_engine/delivery/v1/delivery_service/rest" +require "google/maps/fleet_engine/delivery/v1/version" + +module Google + module Maps + module FleetEngine + module Delivery + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/maps/fleet_engine/delivery/v1/rest" + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb new file mode 100644 index 000000000000..5376e1dc941f --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/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 Maps + module FleetEngine + module Delivery + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb new file mode 100644 index 000000000000..192798ce9466 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/delivery/v1/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' + + +descriptor_data = "\n0google/maps/fleetengine/delivery/v1/common.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xa0\x01\n\x18\x44\x65liveryVehicleAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x05 \x01(\x01H\x00\x42\"\n delivery_vehicle_attribute_value\"\xd0\x0e\n\x17\x44\x65liveryVehicleLocation\x12%\n\x08location\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12=\n\x13horizontal_accuracy\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x35\n\x0flatlng_accuracy\x18\x16 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12,\n\x07heading\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12:\n\x10\x62\x65\x61ring_accuracy\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x36\n\x10heading_accuracy\x18\x17 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12.\n\x08\x61ltitude\x18\x05 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12;\n\x11vertical_accuracy\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x37\n\x11\x61ltitude_accuracy\x18\x18 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x33\n\nspeed_kmph\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x02\x18\x01\x12+\n\x05speed\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x34\n\x0espeed_accuracy\x18\x07 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bserver_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x0flocation_sensor\x18\x0b \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12\x33\n\x0fis_road_snapped\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12>\n\x15is_gps_sensor_enabled\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x04\x12;\n\x11time_since_update\x18\x0e \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12=\n\x11num_stale_updates\x18\x0f \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x05\x18\x01\xe0\x41\x04\x12)\n\x0craw_location\x18\x10 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x11raw_location_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x13raw_location_sensor\x18\x1c \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12;\n\x15raw_location_accuracy\x18\x19 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12)\n\x0c\x66lp_location\x18\x1d \x01(\x0b\x32\x13.google.type.LatLng\x12\x33\n\x0f\x66lp_update_time\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x1a\x66lp_latlng_accuracy_meters\x18\x1f \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x38\n\x13\x66lp_heading_degrees\x18 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x32\n\x15supplemental_location\x18\x12 \x01(\x0b\x32\x13.google.type.LatLng\x12>\n\x1asupplemental_location_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x61\n\x1csupplemental_location_sensor\x18\x14 \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12\x44\n\x1esupplemental_location_accuracy\x18\x15 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x18\n\x0croad_snapped\x18\x1a \x01(\x08\x42\x02\x18\x01\"t\n\nTimeWindow\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"z\n\rTaskAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x04 \x01(\x01H\x00\x42\x16\n\x14task_attribute_value*\xe6\x01\n\x1d\x44\x65liveryVehicleLocationSensor\x12\x12\n\x0eUNKNOWN_SENSOR\x10\x00\x12\x07\n\x03GPS\x10\x01\x12\x0b\n\x07NETWORK\x10\x02\x12\x0b\n\x07PASSIVE\x10\x03\x12\"\n\x1eROAD_SNAPPED_LOCATION_PROVIDER\x10\x04\x12\x1e\n\x1a\x43USTOMER_SUPPLIED_LOCATION\x10\x05\x12\x19\n\x15\x46LEET_ENGINE_LOCATION\x10\x06\x12\x1b\n\x17\x46USED_LOCATION_PROVIDER\x10\x64\x12\x12\n\rCORE_LOCATION\x10\xc8\x01*\x98\x01\n\x1f\x44\x65liveryVehicleNavigationStatus\x12\x1d\n\x19UNKNOWN_NAVIGATION_STATUS\x10\x00\x12\x0f\n\x0bNO_GUIDANCE\x10\x01\x12\x1a\n\x16\x45NROUTE_TO_DESTINATION\x10\x02\x12\r\n\tOFF_ROUTE\x10\x03\x12\x1a\n\x16\x41RRIVED_AT_DESTINATION\x10\x04\x42\xfb\x01\n\'com.google.maps.fleetengine.delivery.v1B\x06\x43ommonP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + DeliveryVehicleAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleAttribute").msgclass + DeliveryVehicleLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleLocation").msgclass + TimeWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.TimeWindow").msgclass + TaskAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.TaskAttribute").msgclass + DeliveryVehicleLocationSensor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor").enummodule + DeliveryVehicleNavigationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb new file mode 100644 index 000000000000..1d269d5162eb --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/delivery/v1/delivery_api.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/api/routing_pb' +require 'google/geo/type/viewport_pb' +require 'google/maps/fleetengine/delivery/v1/delivery_vehicles_pb' +require 'google/maps/fleetengine/delivery/v1/header_pb' +require 'google/maps/fleetengine/delivery/v1/task_tracking_info_pb' +require 'google/maps/fleetengine/delivery/v1/tasks_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n6google/maps/fleetengine/delivery/v1/delivery_api.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1egoogle/geo/type/viewport.proto\x1a;google/maps/fleetengine/delivery/v1/delivery_vehicles.proto\x1a\x30google/maps/fleetengine/delivery/v1/header.proto\x1a\n\x19remaining_distance_meters\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x35\n\x12remaining_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12_\n\"remaining_vehicle_journey_segments\x18\x08 \x03(\x0b\x32\x33.maps.fleetengine.delivery.v1.VehicleJourneySegment\x12J\n\nattributes\x18\t \x03(\x0b\x32\x36.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute\x12O\n\x04type\x18\n \x01(\x0e\x32\x41.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType\"t\n\x13\x44\x65liveryVehicleType\x12%\n!DELIVERY_VEHICLE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x0f\n\x0bTWO_WHEELER\x10\x02\x12\x0b\n\x07\x42ICYCLE\x10\x03\x12\x0e\n\nPEDESTRIAN\x10\x04:`\xea\x41]\n*fleetengine.googleapis.com/DeliveryVehicle\x12/providers/{provider}/deliveryVehicles/{vehicle}\"2\n\x0cLocationInfo\x12\"\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\"\xf5\x01\n\x15VehicleJourneySegment\x12\x37\n\x04stop\x18\x01 \x01(\x0b\x32).maps.fleetengine.delivery.v1.VehicleStop\x12\x41\n\x17\x64riving_distance_meters\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x03\x12\x38\n\x10\x64riving_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12&\n\x04path\x18\x05 \x03(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x03\"\xbe\x03\n\x0bVehicleStop\x12I\n\x10planned_location\x18\x01 \x01(\x0b\x32*.maps.fleetengine.delivery.v1.LocationInfoB\x03\xe0\x41\x02\x12\x41\n\x05tasks\x18\x02 \x03(\x0b\x32\x32.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo\x12>\n\x05state\x18\x03 \x01(\x0e\x32/.maps.fleetengine.delivery.v1.VehicleStop.State\x1a\x9d\x01\n\x08TaskInfo\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x35\n\rtask_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12I\n\x12target_time_window\x18\x03 \x01(\x0b\x32(.maps.fleetengine.delivery.v1.TimeWindowB\x03\xe0\x41\x03\"A\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x0b\n\x07\x45NROUTE\x10\x02\x12\x0b\n\x07\x41RRIVED\x10\x03\x42\x85\x02\n\'com.google.maps.fleetengine.delivery.v1B\x10\x44\x65liveryVehiclesP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + DeliveryVehicle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicle").msgclass + DeliveryVehicle::DeliveryVehicleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType").enummodule + LocationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.LocationInfo").msgclass + VehicleJourneySegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleJourneySegment").msgclass + VehicleStop = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleStop").msgclass + VehicleStop::TaskInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleStop.TaskInfo").msgclass + VehicleStop::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleStop.State").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb new file mode 100644 index 000000000000..1e64318e1070 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/delivery/v1/header.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n0google/maps/fleetengine/delivery/v1/header.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1fgoogle/api/field_behavior.proto\"\xb0\x04\n\x15\x44\x65liveryRequestHeader\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0bsdk_version\x18\x03 \x01(\t\x12\x12\n\nos_version\x18\x04 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x05 \x01(\t\x12M\n\x08sdk_type\x18\x06 \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType\x12\x18\n\x10maps_sdk_version\x18\x07 \x01(\t\x12\x17\n\x0fnav_sdk_version\x18\x08 \x01(\t\x12N\n\x08platform\x18\t \x01(\x0e\x32<.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform\x12\x14\n\x0cmanufacturer\x18\n \x01(\t\x12\x19\n\x11\x61ndroid_api_level\x18\x0b \x01(\x05\x12\x10\n\x08trace_id\x18\x0c \x01(\t\"M\n\x07SdkType\x12\x18\n\x14SDK_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43ONSUMER\x10\x01\x12\n\n\x06\x44RIVER\x10\x02\x12\x0e\n\nJAVASCRIPT\x10\x03\"C\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41NDROID\x10\x01\x12\x07\n\x03IOS\x10\x02\x12\x07\n\x03WEB\x10\x03\x42\xfc\x01\n\'com.google.maps.fleetengine.delivery.v1B\x07HeadersP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + DeliveryRequestHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryRequestHeader").msgclass + DeliveryRequestHeader::SdkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType").enummodule + DeliveryRequestHeader::Platform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb new file mode 100644 index 000000000000..b483e697d6e9 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/delivery/v1/task_tracking_info.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/maps/fleetengine/delivery/v1/common_pb' +require 'google/maps/fleetengine/delivery/v1/delivery_vehicles_pb' +require 'google/maps/fleetengine/delivery/v1/tasks_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/type/latlng_pb' + + +descriptor_data = "\n] + # 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-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb new file mode 100644 index 000000000000..6d71a9430253 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb @@ -0,0 +1,463 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Specifies the routing information that should be sent along with the request + # in the form of routing header. + # **NOTE:** All service configuration rules follow the "last one wins" order. + # + # The examples below will apply to an RPC which has the following request type: + # + # Message Definition: + # + # message Request { + # // The name of the Table + # // Values can be of the following formats: + # // - `projects//tables/` + # // - `projects//instances//tables/
` + # // - `region//zones//tables/
` + # string table_name = 1; + # + # // This value specifies routing for replication. + # // It can be in the following formats: + # // - `profiles/` + # // - a legacy `profile_id` that can be any string + # string app_profile_id = 2; + # } + # + # Example message: + # + # { + # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, + # app_profile_id: profiles/prof_qux + # } + # + # The routing header consists of one or multiple key-value pairs. The order of + # the key-value pairs is undefined, the order of the `routing_parameters` in + # the `RoutingRule` only matters for the evaluation order of the path + # templates when `field` is the same. See the examples below for more details. + # + # Every key and value in the routing header must be percent-encoded, + # and joined together in the following format: `key1=value1&key2=value2`. + # The examples below skip the percent-encoding for readability. + # + # Example 1 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key equal to the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`. + # routing_parameters { + # field: "app_profile_id" + # } + # }; + # + # result: + # + # x-goog-request-params: app_profile_id=profiles/prof_qux + # + # Example 2 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key different from the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`, but name it `routing_id` in the header. + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 3 + # + # Extracting a field from the request to put into the routing + # header, while matching a path template syntax on the field's value. + # + # NB: it is more useful to send nothing than to send garbage for the purpose + # of dynamic routing, since garbage pollutes cache. Thus the matching. + # + # Sub-example 3a + # + # The field matches the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with project-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Sub-example 3b + # + # The field does not match the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with region-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # }; + # + # result: + # + # + # + # Sub-example 3c + # + # Multiple alternative conflictingly named path templates are + # specified. The one that matches is used to construct the header. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed, whether + # // using the region- or projects-based syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Example 4 + # + # Extracting a single routing header key-value pair by matching a + # template syntax on (a part of) a single request field. + # + # annotation: + # + # option (google.api.routing) = { + # // Take just the project id from the `table_name` field. + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=projects/proj_foo + # + # Example 5 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on (parts of) a single request + # field. The last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // If the `table_name` does not have instances information, + # // take just the project id for routing. + # // Otherwise take project + instance. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*/instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # routing_id=projects/proj_foo/instances/instance_bar + # + # Example 6 + # + # Extracting multiple routing header key-value pairs by matching + # several non-conflicting path templates on (parts of) a single request field. + # + # Sub-example 6a + # + # Make the templates strict, so that if the `table_name` does not + # have an instance information, nothing is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code needs two keys instead of one composite + # // but works only for the tables with the "project-instance" name + # // syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/instances/*/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Sub-example 6b + # + # Make the templates loose, so that if the `table_name` does not + # have an instance information, just the project id part is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code wants two keys instead of one composite + # // but will work with just the `project_id` for tables without + # // an instance in the `table_name`. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result (is the same as 6a for our example message because it has the instance + # information): + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Example 7 + # + # Extracting multiple routing header key-value pairs by matching + # several path templates on multiple request fields. + # + # NB: note that here there is no way to specify sending nothing if one of the + # fields does not match its template. E.g. if the `table_name` is in the wrong + # format, the `project_id` will not be sent, but the `routing_id` will be. + # The backend routing code has to be aware of that and be prepared to not + # receive a full complement of keys if it expects multiple. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing needs both `project_id` and `routing_id` + # // (from the `app_profile_id` field) for routing. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&routing_id=profiles/prof_qux + # + # Example 8 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on several request fields. The + # last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // The `routing_id` can be a project id or a region id depending on + # // the table name format, but only if the `app_profile_id` is not set. + # // If `app_profile_id` is set it should be used instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=regions/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 9 + # + # Bringing it all together. + # + # annotation: + # + # option (google.api.routing) = { + # // For routing both `table_location` and a `routing_id` are needed. + # // + # // table_location can be either an instance id or a region+zone id. + # // + # // For `routing_id`, take the value of `app_profile_id` + # // - If it's in the format `profiles/`, send + # // just the `` part. + # // - If it's any other literal, send it as is. + # // If the `app_profile_id` is empty, and the `table_name` starts with + # // the project_id, send that instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_location=regions/*/zones/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "profiles/{routing_id=*}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_location=instances/instance_bar&routing_id=prof_qux + # @!attribute [rw] routing_parameters + # @return [::Array<::Google::Api::RoutingParameter>] + # A collection of Routing Parameter specifications. + # **NOTE:** If multiple Routing Parameters describe the same key + # (via the `path_template` field or via the `field` field when + # `path_template` is not provided), "last one wins" rule + # determines which Parameter gets used. + # See the examples for more details. + class RoutingRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A projection from an input message to the GRPC or REST header. + # @!attribute [rw] field + # @return [::String] + # A request field to extract the header key-value pair from. + # @!attribute [rw] path_template + # @return [::String] + # A pattern matching the key-value field. Optional. + # If not specified, the whole field specified in the `field` field will be + # taken as value, and its name used as key. If specified, it MUST contain + # exactly one named segment (along with any number of unnamed segments) The + # pattern will be matched over the field specified in the `field` field, then + # if the match is successful: + # - the name of the single named segment will be used as a header name, + # - the match value of the segment will be used as a header value; + # if the match is NOT successful, nothing will be sent. + # + # Example: + # + # -- This is a field in the request message + # | that the header value will be extracted from. + # | + # | -- This is the key name in the + # | | routing header. + # V | + # field: "table_name" v + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # ^ ^ + # | | + # In the {} brackets is the pattern that -- | + # specifies what to extract from the | + # field as a value to be sent. | + # | + # The string in the field must match the whole pattern -- + # before brackets, inside brackets, after brackets. + # + # When looking at this specific example, we can see that: + # - A key-value pair with the key `table_location` + # and the value matching `instances/*` should be added + # to the x-goog-request-params routing header. + # - The value is extracted from the request message's `table_name` field + # if it matches the full pattern specified: + # `projects/*/instances/*/tables/*`. + # + # **NB:** If the `path_template` field is not provided, the key name is + # equal to the field name, and the whole field should be sent as a value. + # This makes the pattern for the field and the value functionally equivalent + # to `**`, and the configuration + # + # { + # field: "table_name" + # } + # + # is a functionally equivalent shorthand to: + # + # { + # field: "table_name" + # path_template: "{table_name=**}" + # } + # + # See Example 1 for more details. + class RoutingParameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb new file mode 100644 index 000000000000..f387552a7073 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Geo + module Type + # A latitude-longitude viewport, represented as two diagonally opposite `low` + # and `high` points. A viewport is considered a closed region, i.e. it includes + # its boundary. The latitude bounds must range between -90 to 90 degrees + # inclusive, and the longitude bounds must range between -180 to 180 degrees + # inclusive. Various cases include: + # + # - If `low` = `high`, the viewport consists of that single point. + # + # - If `low.longitude` > `high.longitude`, the longitude range is inverted + # (the viewport crosses the 180 degree longitude line). + # + # - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, + # the viewport includes all longitudes. + # + # - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, + # the longitude range is empty. + # + # - If `low.latitude` > `high.latitude`, the latitude range is empty. + # + # Both `low` and `high` must be populated, and the represented box cannot be + # empty (as specified by the definitions above). An empty viewport will result + # in an error. + # + # For example, this viewport fully encloses New York City: + # + # { + # "low": { + # "latitude": 40.477398, + # "longitude": -74.259087 + # }, + # "high": { + # "latitude": 40.91618, + # "longitude": -73.70018 + # } + # } + # @!attribute [rw] low + # @return [::Google::Type::LatLng] + # Required. The low point of the viewport. + # @!attribute [rw] high + # @return [::Google::Type::LatLng] + # Required. The high point of the viewport. + class Viewport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb new file mode 100644 index 000000000000..1feab364a2dd --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb @@ -0,0 +1,276 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + # Describes a vehicle attribute as a key-value pair. The "key:value" string + # length cannot exceed 256 characters. + # @!attribute [rw] key + # @return [::String] + # The attribute's key. + # @!attribute [rw] value + # @return [::String] + # The attribute's value. + # @!attribute [rw] string_value + # @return [::String] + # String typed attribute value. + # + # Note: This is identical to the `value` field which will eventually be + # deprecated. For create or update methods, either field can be used, but + # it's strongly recommended to use `string_value`. If both `string_value` + # and `value` are set, they must be identical or an error will be thrown. + # Both fields are populated in responses. + # + # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_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] + # Boolean typed attribute value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_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] + # Double typed attribute value. + # + # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DeliveryVehicleAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The location, speed, and heading of a vehicle at a point in time. + # @!attribute [rw] location + # @return [::Google::Type::LatLng] + # The location of the vehicle. + # When it is sent to Fleet Engine, the vehicle's location is a GPS location. + # When you receive it in a response, the vehicle's location can be either a + # GPS location, a supplemental location, or some other estimated location. + # The source is specified in `location_sensor`. + # @!attribute [rw] horizontal_accuracy + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::DoubleValue] + # Deprecated: Use `latlng_accuracy` instead. + # @!attribute [rw] latlng_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `location` in meters as a radius. + # @!attribute [rw] heading + # @return [::Google::Protobuf::Int32Value] + # Direction the vehicle is moving in degrees. 0 represents North. + # The valid range is [0,360). + # @!attribute [rw] bearing_accuracy + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::DoubleValue] + # Deprecated: Use `heading_accuracy` instead. + # @!attribute [rw] heading_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `heading` in degrees. + # @!attribute [rw] altitude + # @return [::Google::Protobuf::DoubleValue] + # Altitude in meters above WGS84. + # @!attribute [rw] vertical_accuracy + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::DoubleValue] + # Deprecated: Use `altitude_accuracy` instead. + # @!attribute [rw] altitude_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `altitude` in meters. + # @!attribute [rw] speed_kmph + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Int32Value] + # Speed of the vehicle in kilometers per hour. + # Deprecated: Use `speed` instead. + # @!attribute [rw] speed + # @return [::Google::Protobuf::DoubleValue] + # Speed of the vehicle in meters/second + # @!attribute [rw] speed_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `speed` in meters/second. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when `location` was reported by the sensor according to the + # sensor's clock. + # @!attribute [r] server_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the server received the location information. + # @!attribute [rw] location_sensor + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocationSensor] + # Provider of location data (for example, `GPS`). + # @!attribute [rw] is_road_snapped + # @return [::Google::Protobuf::BoolValue] + # Whether `location` is snapped to a road. + # @!attribute [rw] is_gps_sensor_enabled + # @return [::Google::Protobuf::BoolValue] + # Input only. Indicates whether the GPS sensor is enabled on the mobile + # device. + # @!attribute [rw] time_since_update + # @return [::Google::Protobuf::Int32Value] + # Input only. Time (in seconds) since this location was first sent to the + # server. This will be zero for the first update. If the time is unknown (for + # example, when the app restarts), this value resets to zero. + # @!attribute [rw] num_stale_updates + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Int32Value] + # Input only. Deprecated: Other signals are now used to determine if a + # location is stale. + # @!attribute [rw] raw_location + # @return [::Google::Type::LatLng] + # Raw vehicle location (unprocessed by road-snapper). + # @!attribute [rw] raw_location_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp associated with the raw location. + # @!attribute [rw] raw_location_sensor + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocationSensor] + # Source of the raw location. Defaults to `GPS`. + # @!attribute [rw] raw_location_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `raw_location` as a radius, in meters. + # @!attribute [rw] flp_location + # @return [::Google::Type::LatLng] + # The location from Android's Fused Location Provider. + # @!attribute [rw] flp_update_time + # @return [::Google::Protobuf::Timestamp] + # Update timestamp of the `flp_location` + # @!attribute [rw] flp_latlng_accuracy_meters + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `flp_location` in meters as a radius. + # @!attribute [rw] flp_heading_degrees + # @return [::Google::Protobuf::Int32Value] + # Direction the vehicle is moving in degrees, as determined by the Fused + # Location Provider. 0 represents North. The valid range is [0,360). + # @!attribute [rw] supplemental_location + # @return [::Google::Type::LatLng] + # Supplemental location provided by the integrating app. + # @!attribute [rw] supplemental_location_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp associated with the supplemental location. + # @!attribute [rw] supplemental_location_sensor + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocationSensor] + # Source of the supplemental location. Defaults to + # `CUSTOMER_SUPPLIED_LOCATION`. + # @!attribute [rw] supplemental_location_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `supplemental_location` as a radius, in meters. + # @!attribute [rw] road_snapped + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Deprecated: Use `is_road_snapped` instead. + class DeliveryVehicleLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A time range. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Required. The start time of the time window (inclusive). + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Required. The end time of the time window (inclusive). + class TimeWindow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes a task attribute as a key-value pair. The "key:value" string length + # cannot exceed 256 characters. + # @!attribute [rw] key + # @return [::String] + # The attribute's key. Keys may not contain the colon character (:). + # @!attribute [rw] string_value + # @return [::String] + # String typed attribute value. + # + # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_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] + # Boolean typed attribute value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_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] + # Double typed attribute value. + # + # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TaskAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The sensor or methodology used to determine the location. + module DeliveryVehicleLocationSensor + # The sensor is unspecified or unknown. + UNKNOWN_SENSOR = 0 + + # GPS or Assisted GPS. + GPS = 1 + + # Assisted GPS, cell tower ID, or WiFi access point. + NETWORK = 2 + + # Cell tower ID or WiFi access point. + PASSIVE = 3 + + # A location determined by the mobile device to be the most likely + # road position. + ROAD_SNAPPED_LOCATION_PROVIDER = 4 + + # A customer-supplied location from an independent source. Typically, this + # value is used for a location provided from sources other than the mobile + # device running Driver SDK. If the original source is described by one of + # the other enum values, use that value. Locations marked + # CUSTOMER_SUPPLIED_LOCATION are typically provided via a DeliveryVehicle's + # `last_location.supplemental_location_sensor`. + CUSTOMER_SUPPLIED_LOCATION = 5 + + # A location calculated by Fleet Engine based on the signals available to it. + # Output only. This value will be rejected if it is received in a request. + FLEET_ENGINE_LOCATION = 6 + + # Android's Fused Location Provider. + FUSED_LOCATION_PROVIDER = 100 + + # The location provider on Apple operating systems. + CORE_LOCATION = 200 + end + + # The vehicle's navigation status. + module DeliveryVehicleNavigationStatus + # Unspecified navigation status. + UNKNOWN_NAVIGATION_STATUS = 0 + + # The Driver app's navigation is in `FREE_NAV` mode. + NO_GUIDANCE = 1 + + # Turn-by-turn navigation is available and the Driver app navigation has + # entered `GUIDED_NAV` mode. + ENROUTE_TO_DESTINATION = 2 + + # The vehicle has gone off the suggested route. + OFF_ROUTE = 3 + + # The vehicle is within approximately 50m of the destination. + ARRIVED_AT_DESTINATION = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb new file mode 100644 index 000000000000..8c9bb733f9ef --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb @@ -0,0 +1,395 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + # The `CreateDeliveryVehicle` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. The provider must + # be the Google Cloud Project ID. For example, `sample-cloud-project`. + # @!attribute [rw] delivery_vehicle_id + # @return [::String] + # Required. The Delivery Vehicle ID must be unique and subject to the + # following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @!attribute [rw] delivery_vehicle + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # Required. The `DeliveryVehicle` entity to create. When creating a new + # delivery vehicle, you may set the following optional fields: + # + # * type + # * last_location + # * attributes + # + # Note: The DeliveryVehicle's `name` field is ignored. All other + # DeliveryVehicle fields must not be set; otherwise, an error is returned. + class CreateDeliveryVehicleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `GetDeliveryVehicle` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format + # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + class GetDeliveryVehicleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteDeliveryVehicle request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format + # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + class DeleteDeliveryVehicleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `ListDeliveryVehicles` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. + # The `provider` must be the Google Cloud Project ID. + # For example, `sample-cloud-project`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of vehicles to return. The service may return + # fewer than this number. If you don't specify this number, then the server + # determines the number of results to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDeliveryVehicles` + # call. You must provide this in order to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeliveryVehicles` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter query to apply when listing delivery vehicles. See + # http://aip.dev/160 for examples of the filter syntax. If you don't specify + # a value, or if you specify an empty string for the filter, then all + # delivery vehicles are returned. + # + # Note that the only queries supported for `ListDeliveryVehicles` are + # on vehicle attributes (for example, `attributes. = ` or + # `attributes. = AND attributes. = `). Also, all + # attributes are stored as strings, so the only supported comparisons against + # attributes are string comparisons. In order to compare against number or + # boolean values, the values must be explicitly quoted to be treated as + # strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + # + # The maximum number of restrictions allowed in a filter query is 50. A + # restriction is a part of the query of the form + # `attribute. `, for example `attributes.foo = bar` + # is 1 restriction. + # @!attribute [rw] viewport + # @return [::Google::Geo::Type::Viewport] + # Optional. A filter that limits the vehicles returned to those whose last + # known location was in the rectangular area defined by the viewport. + class ListDeliveryVehiclesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `ListDeliveryVehicles` response message. + # @!attribute [rw] delivery_vehicles + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] + # The set of delivery vehicles that meet the requested filtering criteria. + # When no filter is specified, the request returns all delivery vehicles. A + # successful response can also be empty. An empty response indicates that no + # delivery vehicles were found meeting the requested filter criteria. + # @!attribute [rw] next_page_token + # @return [::String] + # You can pass this token in the `ListDeliveryVehiclesRequest` to continue to + # list results. When all of the results are returned, this field won't be in + # the response, or it will be an empty string. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of delivery vehicles that match the request criteria, + # across all pages. + class ListDeliveryVehiclesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `UpdateDeliveryVehicle` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] delivery_vehicle + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # Required. The `DeliveryVehicle` entity update to apply. + # Note: You cannot update the name of the `DeliveryVehicle`. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A field mask that indicates which `DeliveryVehicle` fields to + # update. Note that the update_mask must contain at least one field. + # + # This is a comma-separated list of fully qualified names of fields. Example: + # `"remaining_vehicle_journey_segments"`. + class UpdateDeliveryVehicleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `BatchCreateTask` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # Note: If you set this field, then the header field in the + # `CreateTaskRequest` messages must either be empty, or it must match this + # field. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource shared by all tasks. This value must be in + # the format `providers/{provider}`. The `provider` must be the Google Cloud + # Project ID. For example, `sample-cloud-project`. The parent field in the + # `CreateTaskRequest` messages must either be empty, or it must match this + # field. + # @!attribute [rw] requests + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest>] + # Required. The request message that specifies the resources to create. + # Note: You can create a maximum of 500 tasks in a batch. + class BatchCreateTasksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `BatchCreateTask` response message. + # @!attribute [rw] tasks + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::Task>] + # The created Tasks. + class BatchCreateTasksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `CreateTask` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. The `provider` must + # be the Google Cloud Project ID. For example, `sample-cloud-project`. + # @!attribute [rw] task_id + # @return [::String] + # Required. The Task ID must be unique, but it should be not a shipment + # tracking ID. To store a shipment tracking ID, use the `tracking_id` field. + # Note that multiple tasks can have the same `tracking_id`. Task IDs are + # subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @!attribute [rw] task + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # Required. The Task entity to create. + # When creating a Task, the following fields are required: + # + # * `type` + # * `state` (must be set to `OPEN`) + # * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` + # tasks, but required for all other task types) + # * `planned_location` (optional for `UNAVAILABLE` tasks) + # * `task_duration` + # + # The following fields can be optionally set: + # + # * `target_time_window` + # * `task_tracking_view_config` + # * `attributes` + # + # Note: The Task's `name` field is ignored. All other Task fields must not be + # set; otherwise, an error is returned. + class CreateTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `GetTask` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format `providers/{provider}/tasks/{task}`. The + # `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + class GetTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteTask request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format `providers/{provider}/tasks/{task}`. The + # `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + class DeleteTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `UpdateTask` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] task + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # Required. The Task associated with the update. + # The following fields are maintained by Fleet Engine. Do not update + # them using `Task.update`. + # + # * `last_location`. + # * `last_location_snappable`. + # * `name`. + # * `remaining_vehicle_journey_segments`. + # * `task_outcome_location_source`. + # + # Note: You cannot change the value of `task_outcome` once you set it. + # + # If the Task has been assigned to a delivery vehicle, then don't set the + # Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` + # that contains the Task from the delivery vehicle, which automatically sets + # the Task state to CLOSED. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The field mask that indicates which Task fields to update. + # Note: The `update_mask` must contain at least one field. + # + # This is a comma-separated list of fully qualified names of fields. Example: + # `"task_outcome,task_outcome_time,task_outcome_location"`. + class UpdateTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `ListTasks` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of Tasks to return. The service may return + # fewer than this value. If you don't specify this value, then the server + # determines the number of results to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token received from a previous `ListTasks` call. + # You can provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListTasks` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter query to apply when listing Tasks. See + # http://aip.dev/160 for examples of filter syntax. If you don't specify a + # value, or if you filter on an empty string, then all Tasks are returned. + # For information about the Task properties that you can filter on, see [List + # tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). + class ListTasksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `ListTasks` response that contains the set of Tasks that meet the filter + # criteria in the `ListTasksRequest`. + # @!attribute [rw] tasks + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::Task>] + # The set of Tasks that meet the requested filtering criteria. When no filter + # is specified, the request returns all tasks. A successful response can also + # be empty. An empty response indicates that no Tasks were found meeting the + # requested filter criteria. + # @!attribute [rw] next_page_token + # @return [::String] + # Pass this token in the `ListTasksRequest` to continue to list results. + # If all results have been returned, then this field is either an empty + # string, or it doesn't appear in the response. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of Tasks that match the request criteria, across all + # pages. + class ListTasksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `GetTaskTrackingInfoRequest` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format + # `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` + # must be the Google Cloud Project ID, and the `tracking_id` must be the + # tracking ID associated with the task. An example name can be + # `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. + class GetTaskTrackingInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb new file mode 100644 index 000000000000..815ff7ffd128 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb @@ -0,0 +1,276 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + # The `DeliveryVehicle` message. A delivery vehicle transports shipments from a + # depot to a delivery location, and from a pickup location to the depot. In + # some cases, delivery vehicles also transport shipments directly from the + # pickup location to the delivery location. + # + # Note: gRPC and REST APIs use different field naming conventions. For example, + # the `DeliveryVehicle.current_route_segment` field in the gRPC API and the + # `DeliveryVehicle.currentRouteSegment` field in the REST API refer to the same + # field. + # @!attribute [rw] name + # @return [::String] + # The unique name of this Delivery Vehicle. + # The format is `providers/{provider}/deliveryVehicles/{vehicle}`. + # @!attribute [rw] last_location + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation] + # The last reported location of the Delivery Vehicle. + # @!attribute [rw] past_locations + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation>] + # Input only. Locations where this Delivery Vehicle has been in the past that + # haven't yet been reported to Fleet Engine. This is used in + # `UpdateDeliveryVehicleRequest` to record locations which were previously + # unable to be sent to the server. Typically this happens when the Delivery + # Vehicle does not have internet connectivity. + # @!attribute [rw] navigation_status + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleNavigationStatus] + # The Delivery Vehicle's navigation status. + # @!attribute [rw] current_route_segment + # @return [::String] + # The encoded polyline specifying the route that the navigation recommends + # taking to the next waypoint. Your driver app updates this when a + # stop is reached or passed, and when the navigation reroutes. These + # `LatLng`s are returned in + # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + # (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + # (REST) for all active Tasks assigned to the Vehicle. + # + # There are a few cases where this field might not be used to populate + # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + # (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + # (REST): + # + # * The endpoint of the `current_route_segment` does not match + # `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or + # `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST). + # + # * The driver app has not updated its location recently, so the last + # updated value for this field might be stale. + # + # * The driver app has recently updated its location, but the + # `current_route_segment` is stale, and points to a previous vehicle stop. + # + # In these cases, Fleet Engine populates this field with a route from the + # most recently passed VehicleStop to the upcoming VehicleStop to ensure that + # the consumer of this field has the best available information on the + # current path of the Delivery Vehicle. + # @!attribute [rw] current_route_segment_end_point + # @return [::Google::Type::LatLng] + # The location where the `current_route_segment` ends. This is not currently + # populated by the driver app, but you can supply it on + # `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming + # vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet + # Engine will then do its best to interpolate to an actual `VehicleStop`. + # + # This field is ignored in `UpdateDeliveryVehicle` calls if the + # `current_route_segment` field is empty. + # @!attribute [rw] remaining_distance_meters + # @return [::Google::Protobuf::Int32Value] + # The remaining driving distance for the `current_route_segment`. + # The Driver app typically provides this field, but there are some + # circumstances in which Fleet Engine will override the value sent by the + # app. For more information, see + # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}. + # This field is returned in + # `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) + # or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) + # for all active `Task`s assigned to the Delivery Vehicle. + # + # Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the + # `current_route_segment` field is empty. + # @!attribute [rw] remaining_duration + # @return [::Google::Protobuf::Duration] + # The remaining driving time for the `current_route_segment`. + # The Driver app typically provides this field, but there are some + # circumstances in which Fleet Engine will override the value sent by the + # app. For more information, see + # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}. + # This field is returned in + # `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or + # `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all + # active tasks assigned to the Delivery Vehicle. + # + # Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the + # `current_route_segment` field is empty. + # @!attribute [rw] remaining_vehicle_journey_segments + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>] + # The journey segments assigned to this Delivery Vehicle, starting from the + # Vehicle's most recently reported location. This field won't be populated + # in the response of `ListDeliveryVehicles`. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleAttribute>] + # A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have + # at most 100 attributes, and each attribute must have a unique key. + # @!attribute [rw] type + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle::DeliveryVehicleType] + # The type of this delivery vehicle. If unset, this will default to `AUTO`. + class DeliveryVehicle + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of delivery vehicle. + module DeliveryVehicleType + # The value is unused. + DELIVERY_VEHICLE_TYPE_UNSPECIFIED = 0 + + # An automobile. + AUTO = 1 + + # A motorcycle, moped, or other two-wheeled vehicle + TWO_WHEELER = 2 + + # Human-powered transport. + BICYCLE = 3 + + # A human transporter, typically walking or running, traveling along + # pedestrian pathways. + PEDESTRIAN = 4 + end + end + + # A location with any additional identifiers. + # @!attribute [rw] point + # @return [::Google::Type::LatLng] + # The location's coordinates. + class LocationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a Vehicle’s travel segment - from its previous stop to the + # current stop. If it is the first active stop, then it is from the + # Vehicle’s current location to this stop. + # @!attribute [rw] stop + # @return [::Google::Maps::FleetEngine::Delivery::V1::VehicleStop] + # Specifies the stop location, along with the `Task`s associated with + # the stop. Some fields of the VehicleStop might not be present if this + # journey segment is part of `JourneySharingInfo`. + # @!attribute [r] driving_distance_meters + # @return [::Google::Protobuf::Int32Value] + # Output only. The travel distance from the previous stop to this stop. + # If the current stop is the first stop in the list of journey + # segments, then the starting point is the vehicle's location recorded + # at the time that this stop was added to the list. This field might not be + # present if this journey segment is part of `JourneySharingInfo`. + # @!attribute [r] driving_duration + # @return [::Google::Protobuf::Duration] + # Output only. The travel time from the previous stop to this stop. + # If the current stop is the first stop in the list of journey + # segments, then the starting point is the Vehicle's location recorded + # at the time that this stop was added to the list. + # + # If this field is defined in the path + # `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or + # `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST), + # then it may be populated with the value from + # `DeliveryVehicle.remaining_duration` (gRPC) or + # `DeliveryVehicle.remainingDuration` (REST). + # This provides the remaining driving duration from the driver app's latest + # known location rather than the driving time from the previous stop. + # @!attribute [r] path + # @return [::Array<::Google::Type::LatLng>] + # Output only. The path from the previous stop to this stop. If the current + # stop is the first stop in the list of journey segments, then this is the + # path from the vehicle's current location to this stop at the time that the + # stop was added to the list. This field might not be present if this journey + # segment is part of `JourneySharingInfo`. + # + # If this field is defined in the path + # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + # (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + # (REST), then it may be populated with the `LatLng`s decoded from + # `DeliveryVehicle.current_route_segment` (gRPC) or + # `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving + # path from the driver app's latest known location rather than the path from + # the previous stop. + class VehicleJourneySegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes a point where a Vehicle stops to perform one or more `Task`s. + # @!attribute [rw] planned_location + # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] + # Required. The location of the stop. Note that the locations in the `Task`s + # might not exactly match this location, but will be within a short distance + # of it. This field won't be populated in the response of a `GetTask` call. + # @!attribute [rw] tasks + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleStop::TaskInfo>] + # The list of `Task`s to be performed at this stop. This field won't be + # populated in the response of a `GetTask` call. + # @!attribute [rw] state + # @return [::Google::Maps::FleetEngine::Delivery::V1::VehicleStop::State] + # The state of the `VehicleStop`. This field won't be populated in the + # response of a `GetTask` call. + class VehicleStop + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Additional information about the Task performed at this stop. + # @!attribute [rw] task_id + # @return [::String] + # The Task ID. This field won't be populated in the response of a `GetTask` + # call. Task IDs are subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @!attribute [r] task_duration + # @return [::Google::Protobuf::Duration] + # Output only. The time required to perform the Task. + # @!attribute [r] target_time_window + # @return [::Google::Maps::FleetEngine::Delivery::V1::TimeWindow] + # Output only. The time window during which the task should be completed. + # This is only set in the response to `GetDeliveryVehicle`. + class TaskInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The current state of a `VehicleStop`. + module State + # Unknown. + STATE_UNSPECIFIED = 0 + + # Created, but not actively routing. + NEW = 1 + + # Assigned and actively routing. + ENROUTE = 2 + + # Arrived at stop. Assumes that when the Vehicle is routing to the next + # stop, that all previous stops have been completed. + ARRIVED = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb new file mode 100644 index 000000000000..8475ff84935a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb @@ -0,0 +1,113 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + # A RequestHeader contains fields common to all Delivery RPC requests. + # @!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. If none + # is specified, the response may be in any language, with a preference for + # English if such a name exists. Field value example: `en-US`. + # @!attribute [rw] region_code + # @return [::String] + # Required. CLDR region code of the region where the request originates. + # Field value example: `US`. + # @!attribute [rw] sdk_version + # @return [::String] + # Version of the calling SDK, if applicable. + # The version format is "major.minor.patch", example: `1.1.2`. + # @!attribute [rw] os_version + # @return [::String] + # Version of the operating system on which the calling SDK is running. + # Field value examples: `4.4.1`, `12.1`. + # @!attribute [rw] device_model + # @return [::String] + # Model of the device on which the calling SDK is running. + # Field value examples: `iPhone12,1`, `SM-G920F`. + # @!attribute [rw] sdk_type + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader::SdkType] + # The type of SDK sending the request. + # @!attribute [rw] maps_sdk_version + # @return [::String] + # Version of the MapSDK which the calling SDK depends on, if applicable. + # The version format is "major.minor.patch", example: `5.2.1`. + # @!attribute [rw] nav_sdk_version + # @return [::String] + # Version of the NavSDK which the calling SDK depends on, if applicable. + # The version format is "major.minor.patch", example: `2.1.0`. + # @!attribute [rw] platform + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader::Platform] + # Platform of the calling SDK. + # @!attribute [rw] manufacturer + # @return [::String] + # Manufacturer of the Android device from the calling SDK, only applicable + # for the Android SDKs. + # Field value example: `Samsung`. + # @!attribute [rw] android_api_level + # @return [::Integer] + # Android API level of the calling SDK, only applicable for the Android SDKs. + # Field value example: `23`. + # @!attribute [rw] trace_id + # @return [::String] + # Optional ID that can be provided for logging purposes in order to identify + # the request. + class DeliveryRequestHeader + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible types of SDK. + module SdkType + # The default value. This value is used if the `sdk_type` is omitted. + SDK_TYPE_UNSPECIFIED = 0 + + # The calling SDK is Consumer. + CONSUMER = 1 + + # The calling SDK is Driver. + DRIVER = 2 + + # The calling SDK is JavaScript. + JAVASCRIPT = 3 + end + + # The platform of the calling SDK. + module Platform + # The default value. This value is used if the platform is omitted. + PLATFORM_UNSPECIFIED = 0 + + # The request is coming from Android. + ANDROID = 1 + + # The request is coming from iOS. + IOS = 2 + + # The request is coming from the web. + WEB = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb new file mode 100644 index 000000000000..3a110fdb32d7 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.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! + + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + # The `TaskTrackingInfo` message. The message contains task tracking + # information which will be used for display. If a tracking ID is associated + # with multiple Tasks, Fleet Engine uses a heuristic to decide which Task's + # TaskTrackingInfo to select. + # @!attribute [rw] name + # @return [::String] + # Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`, + # where `tracking` represents the tracking ID. + # @!attribute [rw] tracking_id + # @return [::String] + # Immutable. The tracking ID of a Task. + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @!attribute [rw] vehicle_location + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation] + # The vehicle's last location. + # @!attribute [rw] route_polyline_points + # @return [::Array<::Google::Type::LatLng>] + # A list of points which when connected forms a polyline of the vehicle's + # expected route to the location of this task. + # @!attribute [rw] remaining_stop_count + # @return [::Google::Protobuf::Int32Value] + # Indicates the number of stops the vehicle remaining until the task stop is + # reached, including the task stop. For example, if the vehicle's next stop + # is the task stop, the value will be 1. + # @!attribute [rw] remaining_driving_distance_meters + # @return [::Google::Protobuf::Int32Value] + # The total remaining distance in meters to the `VehicleStop` of interest. + # @!attribute [rw] estimated_arrival_time + # @return [::Google::Protobuf::Timestamp] + # The timestamp that indicates the estimated arrival time to the stop + # location. + # @!attribute [rw] estimated_task_completion_time + # @return [::Google::Protobuf::Timestamp] + # The timestamp that indicates the estimated completion time of a Task. + # @!attribute [rw] state + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::State] + # The current execution state of the Task. + # @!attribute [rw] task_outcome + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcome] + # The outcome of attempting to execute a Task. + # @!attribute [rw] task_outcome_time + # @return [::Google::Protobuf::Timestamp] + # The timestamp that indicates when the Task's outcome was set by the + # provider. + # @!attribute [rw] planned_location + # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] + # Immutable. The location where the Task will be completed. + # @!attribute [rw] target_time_window + # @return [::Google::Maps::FleetEngine::Delivery::V1::TimeWindow] + # The time window during which the task should be completed. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::TaskAttribute>] + # The custom attributes set on the task. + class TaskTrackingInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb new file mode 100644 index 000000000000..0bb1c3f6a05b --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb @@ -0,0 +1,291 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + # A Task in the Delivery API represents a single action to track. In general, + # there is a distinction between shipment-related Tasks and break Tasks. A + # shipment can have multiple Tasks associated with it. For example, there could + # be one Task for the pickup, and one for the drop-off or transfer. Also, + # different Tasks for a given shipment can be handled by different vehicles. + # For example, one vehicle could handle the pickup, driving the shipment to the + # hub, while another vehicle drives the same shipment from the hub to the + # drop-off location. + # + # Note: gRPC and REST APIs use different field naming conventions. For example, + # the `Task.journey_sharing_info` field in the gRPC API and the + # `Task.journeySharingInfo` field in the REST API refer to the same + # field. + # @!attribute [rw] name + # @return [::String] + # Must be in the format `providers/{provider}/tasks/{task}`. + # @!attribute [rw] type + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::Type] + # Required. Immutable. Defines the type of the Task. For example, a break or + # shipment. + # @!attribute [rw] state + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::State] + # Required. The current execution state of the Task. + # @!attribute [rw] task_outcome + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcome] + # The outcome of the Task. + # @!attribute [rw] task_outcome_time + # @return [::Google::Protobuf::Timestamp] + # The timestamp that indicates when the `Task`'s outcome was set by the + # provider. + # @!attribute [rw] task_outcome_location + # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] + # The location where the `Task`'s outcome was set. This value is updated as + # part of `UpdateTask`. If this value isn't explicitly updated by the + # provider, then Fleet Engine populates it by default with the last known + # vehicle location (the *raw* location). + # @!attribute [rw] task_outcome_location_source + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcomeLocationSource] + # Indicates where the value of the `task_outcome_location` came from. + # @!attribute [rw] tracking_id + # @return [::String] + # Immutable. This field facilitates the storing of an ID so you can avoid + # using a complicated mapping. You cannot set `tracking_id` for Tasks of type + # `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are subject to the + # following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @!attribute [r] delivery_vehicle_id + # @return [::String] + # Output only. The ID of the vehicle that is executing this Task. Delivery + # Vehicle IDs are subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @!attribute [rw] planned_location + # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] + # Immutable. The location where the Task will be completed. + # Optional for `UNAVAILABLE` Tasks, but required for all other Tasks. + # @!attribute [rw] task_duration + # @return [::Google::Protobuf::Duration] + # Required. Immutable. The time needed to execute a Task at this location. + # @!attribute [rw] target_time_window + # @return [::Google::Maps::FleetEngine::Delivery::V1::TimeWindow] + # The time window during which the task should be completed. + # @!attribute [r] journey_sharing_info + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::JourneySharingInfo] + # Output only. Journey sharing-specific fields. Not populated when state is + # `CLOSED`. + # @!attribute [rw] task_tracking_view_config + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig] + # The configuration for task tracking that specifies which data elements are + # visible to the end users under what circumstances. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::TaskAttribute>] + # A list of custom Task attributes. Each attribute must have a unique key. + class Task + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Journey sharing specific fields. + # @!attribute [rw] remaining_vehicle_journey_segments + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>] + # Tracking information for the stops that the assigned vehicle will make + # before it completes this Task. Note that this list can contain stops + # from other tasks. + # + # The first segment, + # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC) + # or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST), + # contains route information from the driver's last known location to the + # upcoming `VehicleStop`. Current route information usually comes from the + # driver app, except for some cases noted in the documentation for + # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}. + # The other segments in + # `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or + # `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are + # populated by Fleet Engine. They provide route information between the + # remaining `VehicleStops`. + # @!attribute [rw] last_location + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation] + # Indicates the vehicle's last reported location of the assigned vehicle. + # @!attribute [rw] last_location_snappable + # @return [::Boolean] + # Indicates whether the vehicle's lastLocation can be snapped to + # the `current_route_segment`. This value is False if either + # `last_location` or `current_route_segment` don't exist. This value is + # computed by Fleet Engine. Updates from clients are ignored. + class JourneySharingInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of Task. + module Type + # Default, the Task type is unknown. + TYPE_UNSPECIFIED = 0 + + # A pickup Task is the action taken for picking up a shipment from a + # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP` + # type. + PICKUP = 1 + + # A delivery Task is the action taken for delivering a shipment to an end + # customer. Depot or feeder vehicle dropoffs should use the + # `SCHEDULED_STOP` type. + DELIVERY = 2 + + # A scheduled stop Task is used for planning purposes. For example, it + # could represent picking up or dropping off shipments from feeder vehicles + # or depots. It shouldn't be used for any shipments that are picked up or + # dropped off from an end customer. + SCHEDULED_STOP = 3 + + # A Task that means the Vehicle is not available for service. For example, + # this can happen when the driver takes a break, or when the vehicle + # is being refueled. + UNAVAILABLE = 4 + end + + # The state of a Task. This indicates the Tasks's progress. + module State + # Default. Used for an unspecified or unrecognized Task state. + STATE_UNSPECIFIED = 0 + + # Either the Task has not yet been assigned to a delivery vehicle, or the + # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop. + OPEN = 1 + + # When the vehicle passes the vehicle stop for this Task. + CLOSED = 2 + end + + # The outcome of attempting to execute a Task. When `TaskState` is closed, + # `TaskOutcome` indicates whether it was completed successfully. + module TaskOutcome + # The Task outcome before its value is set. + TASK_OUTCOME_UNSPECIFIED = 0 + + # The Task completed successfully. + SUCCEEDED = 1 + + # Either the Task couldn't be completed, or it was cancelled. + FAILED = 2 + end + + # The identity of the source that populated the `task_outcome_location`. + module TaskOutcomeLocationSource + # The task outcome before it is set. + TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0 + + # The provider-specified the `task_outcome_location`. + PROVIDER = 2 + + # The provider didn't specify the `task_outcome_location`, so Fleet Engine + # used the last known vehicle location. + LAST_VEHICLE_LOCATION = 3 + end + end + + # The configuration message that defines when a data element of a Task should + # be visible to the end users. + # @!attribute [rw] route_polyline_points_visibility + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] + # The field that specifies when route polyline points can be visible. If this + # field is not specified, the project level default visibility configuration + # for this data will be used. + # @!attribute [rw] estimated_arrival_time_visibility + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] + # The field that specifies when estimated arrival time can be visible. If + # this field is not specified, the project level default visibility + # configuration for this data will be used. + # @!attribute [rw] estimated_task_completion_time_visibility + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] + # The field that specifies when estimated task completion time can be + # visible. If this field is not specified, the project level default + # visibility configuration for this data will be used. + # @!attribute [rw] remaining_driving_distance_visibility + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] + # The field that specifies when remaining driving distance can be visible. If + # this field is not specified, the project level default visibility + # configuration for this data will be used. + # @!attribute [rw] remaining_stop_count_visibility + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] + # The field that specifies when remaining stop count can be visible. If this + # field is not specified, the project level default visibility configuration + # for this data will be used. + # @!attribute [rw] vehicle_location_visibility + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] + # The field that specifies when vehicle location can be visible. If this + # field is not specified, the project level default visibility configuration + # for this data will be used. + class TaskTrackingViewConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The option message that defines when a data element should be visible to + # the end users. + # @!attribute [rw] remaining_stop_count_threshold + # @return [::Integer] + # This data element is visible to the end users if the remaining stop + # count <= remaining_stop_count_threshold. + # + # Note: The following fields are mutually exclusive: `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `remaining_driving_distance_meters_threshold`, `always`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] duration_until_estimated_arrival_time_threshold + # @return [::Google::Protobuf::Duration] + # This data element is visible to the end users if the ETA to the stop + # <= duration_until_estimated_arrival_time_threshold. + # + # Note: The following fields are mutually exclusive: `duration_until_estimated_arrival_time_threshold`, `remaining_stop_count_threshold`, `remaining_driving_distance_meters_threshold`, `always`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] remaining_driving_distance_meters_threshold + # @return [::Integer] + # This data element is visible to the end users if the remaining + # driving distance in meters <= + # remaining_driving_distance_meters_threshold. + # + # Note: The following fields are mutually exclusive: `remaining_driving_distance_meters_threshold`, `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `always`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] always + # @return [::Boolean] + # If set to true, this data element is always visible to the end users + # with no thresholds. This field cannot be set to false. + # + # Note: The following fields are mutually exclusive: `always`, `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `remaining_driving_distance_meters_threshold`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] never + # @return [::Boolean] + # If set to true, this data element is always hidden from the end users + # with no thresholds. This field cannot be set to false. + # + # Note: The following fields are mutually exclusive: `never`, `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `remaining_driving_distance_meters_threshold`, `always`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class VisibilityOption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb new file mode 100644 index 000000000000..c15e78a39a56 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/snippets/Gemfile b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/Gemfile new file mode 100644 index 000000000000..30533202706d --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1", path: "../" +else + gem "google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb new file mode 100644 index 000000000000..14782a4848c5 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_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 fleetenginedelivery_v1_generated_DeliveryService_BatchCreateTasks_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the batch_create_tasks call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#batch_create_tasks. +# +def batch_create_tasks + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new + + # Call the batch_create_tasks method. + result = client.batch_create_tasks request + + # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_BatchCreateTasks_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb new file mode 100644 index 000000000000..4e414ecb6e94 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_CreateDeliveryVehicle_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the create_delivery_vehicle call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_delivery_vehicle. +# +def create_delivery_vehicle + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new + + # Call the create_delivery_vehicle method. + result = client.create_delivery_vehicle request + + # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_CreateDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb new file mode 100644 index 000000000000..786f6ae89625 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/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 fleetenginedelivery_v1_generated_DeliveryService_CreateTask_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the create_task call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_task. +# +def create_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new + + # Call the create_task method. + result = client.create_task request + + # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_CreateTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb new file mode 100644 index 000000000000..0a42a3ea4d16 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the delete_delivery_vehicle call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_delivery_vehicle. +# +def delete_delivery_vehicle + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new + + # Call the delete_delivery_vehicle method. + result = client.delete_delivery_vehicle request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb new file mode 100644 index 000000000000..7839b4fc3aa0 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/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 fleetenginedelivery_v1_generated_DeliveryService_DeleteTask_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the delete_task call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_task. +# +def delete_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::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 fleetenginedelivery_v1_generated_DeliveryService_DeleteTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb new file mode 100644 index 000000000000..ac4be0811ccf --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_GetDeliveryVehicle_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the get_delivery_vehicle call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_delivery_vehicle. +# +def get_delivery_vehicle + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new + + # Call the get_delivery_vehicle method. + result = client.get_delivery_vehicle request + + # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_GetDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb new file mode 100644 index 000000000000..51530e7ea2a7 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_GetTask_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the get_task call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task. +# +def get_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new + + # Call the get_task method. + result = client.get_task request + + # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_GetTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb new file mode 100644 index 000000000000..50c6fcfcbe4c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_GetTaskTrackingInfo_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the get_task_tracking_info call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task_tracking_info. +# +def get_task_tracking_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new + + # Call the get_task_tracking_info method. + result = client.get_task_tracking_info request + + # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_GetTaskTrackingInfo_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb new file mode 100644 index 000000000000..06025d2f85f2 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.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 fleetenginedelivery_v1_generated_DeliveryService_ListDeliveryVehicles_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the list_delivery_vehicles call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_delivery_vehicles. +# +def list_delivery_vehicles + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new + + # Call the list_delivery_vehicles method. + result = client.list_delivery_vehicles request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + p item + end +end +# [END fleetenginedelivery_v1_generated_DeliveryService_ListDeliveryVehicles_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb new file mode 100644 index 000000000000..f5751c045373 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_ListTasks_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the list_tasks call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_tasks. +# +def list_tasks + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new + + # Call the list_tasks method. + result = client.list_tasks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::Task. + p item + end +end +# [END fleetenginedelivery_v1_generated_DeliveryService_ListTasks_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb new file mode 100644 index 000000000000..54d6bfef390a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the update_delivery_vehicle call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_delivery_vehicle. +# +def update_delivery_vehicle + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new + + # Call the update_delivery_vehicle method. + result = client.update_delivery_vehicle request + + # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb new file mode 100644 index 000000000000..6413dfeaa315 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_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 fleetenginedelivery_v1_generated_DeliveryService_UpdateTask_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the update_task call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_task. +# +def update_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new + + # Call the update_task method. + result = client.update_task request + + # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_UpdateTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json new file mode 100644 index 000000000000..7abad3f98118 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json @@ -0,0 +1,495 @@ +{ + "client_library": { + "name": "google-maps-fleet_engine-delivery-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "maps.fleetengine.delivery.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_CreateDeliveryVehicle_sync", + "title": "Snippet for the create_delivery_vehicle call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_delivery_vehicle.", + "file": "delivery_service/create_delivery_vehicle.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_delivery_vehicle", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_delivery_vehicle", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "CreateDeliveryVehicle", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.CreateDeliveryVehicle", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_GetDeliveryVehicle_sync", + "title": "Snippet for the get_delivery_vehicle call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_delivery_vehicle.", + "file": "delivery_service/get_delivery_vehicle.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_delivery_vehicle", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_delivery_vehicle", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "GetDeliveryVehicle", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.GetDeliveryVehicle", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync", + "title": "Snippet for the delete_delivery_vehicle call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_delivery_vehicle.", + "file": "delivery_service/delete_delivery_vehicle.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_delivery_vehicle", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_delivery_vehicle", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "DeleteDeliveryVehicle", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.DeleteDeliveryVehicle", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync", + "title": "Snippet for the update_delivery_vehicle call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_delivery_vehicle.", + "file": "delivery_service/update_delivery_vehicle.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_delivery_vehicle", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_delivery_vehicle", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "UpdateDeliveryVehicle", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.UpdateDeliveryVehicle", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_BatchCreateTasks_sync", + "title": "Snippet for the batch_create_tasks call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#batch_create_tasks.", + "file": "delivery_service/batch_create_tasks.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_create_tasks", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#batch_create_tasks", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "BatchCreateTasks", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.BatchCreateTasks", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_CreateTask_sync", + "title": "Snippet for the create_task call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_task.", + "file": "delivery_service/create_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_task", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_task", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::Task", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "CreateTask", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.CreateTask", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_GetTask_sync", + "title": "Snippet for the get_task call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task.", + "file": "delivery_service/get_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_task", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::Task", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "GetTask", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.GetTask", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_DeleteTask_sync", + "title": "Snippet for the delete_task call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_task.", + "file": "delivery_service/delete_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_task", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_task", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "DeleteTask", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.DeleteTask", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_UpdateTask_sync", + "title": "Snippet for the update_task call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_task.", + "file": "delivery_service/update_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_task", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_task", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::Task", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "UpdateTask", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.UpdateTask", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_ListTasks_sync", + "title": "Snippet for the list_tasks call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_tasks.", + "file": "delivery_service/list_tasks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tasks", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_tasks", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "ListTasks", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.ListTasks", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_GetTaskTrackingInfo_sync", + "title": "Snippet for the get_task_tracking_info call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task_tracking_info.", + "file": "delivery_service/get_task_tracking_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_task_tracking_info", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task_tracking_info", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "GetTaskTrackingInfo", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.GetTaskTrackingInfo", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_ListDeliveryVehicles_sync", + "title": "Snippet for the list_delivery_vehicles call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_delivery_vehicles.", + "file": "delivery_service/list_delivery_vehicles.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_delivery_vehicles", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_delivery_vehicles", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "ListDeliveryVehicles", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.ListDeliveryVehicles", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "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-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb new file mode 100644 index 000000000000..8d3d04d6c721 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/maps/fleet_engine/delivery/v1/delivery_service" + +class ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.delivery_vehicle_path provider: "value0", vehicle: "value1" + assert_equal "providers/value0/deliveryVehicles/value1", path + end + end + + def test_provider_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.provider_path provider: "value0" + assert_equal "providers/value0", 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::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.task_path provider: "value0", task: "value1" + assert_equal "providers/value0/tasks/value1", path + end + end + + def test_task_tracking_info_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.task_tracking_info_path provider: "value0", tracking: "value1" + assert_equal "providers/value0/taskTrackingInfo/value1", path + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb new file mode 100644 index 000000000000..25979e7477bb --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb @@ -0,0 +1,773 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/maps/fleetengine/delivery/v1/delivery_api_pb" +require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" + + +class ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + delivery_vehicle_id = "hello world" + delivery_vehicle = {} + + create_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_create_delivery_vehicle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_delivery_vehicle_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_delivery_vehicle header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_delivery_vehicle_client_stub.call_count + end + end + end + + def test_get_delivery_vehicle + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + + get_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_get_delivery_vehicle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_delivery_vehicle_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_delivery_vehicle({ header: header, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_delivery_vehicle header: header, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_delivery_vehicle({ header: header, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_delivery_vehicle_client_stub.call_count + end + end + end + + def test_delete_delivery_vehicle + # 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. + header = {} + name = "hello world" + + delete_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_delete_delivery_vehicle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_delivery_vehicle_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_delivery_vehicle({ header: header, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_delivery_vehicle header: header, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_delivery_vehicle({ header: header, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_delivery_vehicle_client_stub.call_count + end + end + end + + def test_update_delivery_vehicle + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + delivery_vehicle = {} + update_mask = {} + + update_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_update_delivery_vehicle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_delivery_vehicle_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_delivery_vehicle header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_delivery_vehicle_client_stub.call_count + end + end + end + + def test_batch_create_tasks + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + requests = [{}] + + batch_create_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::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_batch_create_tasks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_create_tasks_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_create_tasks({ header: header, parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_create_tasks header: header, parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_create_tasks ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_create_tasks({ header: header, parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_create_tasks(::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_create_tasks_client_stub.call_count + end + end + end + + def test_create_task + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + task_id = "hello world" + task = {} + + 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::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_create_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_task_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_task({ header: header, parent: parent, task_id: task_id, task: task }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_task header: header, parent: parent, task_id: task_id, task: task do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_task ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_task({ header: header, parent: parent, task_id: task_id, task: task }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_task(::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task), 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_get_task + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + + get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_task_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_task({ header: header, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_task header: header, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_task ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_task({ header: header, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_task(::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_count + end + end + end + + def test_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. + header = {} + 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::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_delete_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_task({ header: header, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_task header: header, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_task ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_task({ header: header, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_task(::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, 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_update_task + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + task = {} + update_mask = {} + + update_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_update_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_task_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_task({ header: header, task: task, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_task header: header, task: task, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_task ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_task({ header: header, task: task, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_task(::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_task_client_stub.call_count + end + end + end + + def test_list_tasks + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "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::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_tasks({ header: header, 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_tasks header: header, 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_tasks ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, 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_tasks({ header: header, 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_tasks(::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, 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_tasks_client_stub.call_count + end + end + end + + def test_get_task_tracking_info + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + + get_task_tracking_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_get_task_tracking_info_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_task_tracking_info_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_task_tracking_info({ header: header, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_task_tracking_info header: header, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_task_tracking_info ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_task_tracking_info({ header: header, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_task_tracking_info(::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_task_tracking_info_client_stub.call_count + end + end + end + + def test_list_delivery_vehicles + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + viewport = {} + + list_delivery_vehicles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_list_delivery_vehicles_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_delivery_vehicles_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_delivery_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_delivery_vehicles ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_delivery_vehicles(::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_delivery_vehicles_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::Maps::FleetEngine::Delivery::V1::DeliveryService::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::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb new file mode 100644 index 000000000000..6002c5acf6f7 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb @@ -0,0 +1,862 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/maps/fleetengine/delivery/v1/delivery_api_pb" +require "google/maps/fleet_engine/delivery/v1/delivery_service" + +class ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + delivery_vehicle_id = "hello world" + delivery_vehicle = {} + + create_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_delivery_vehicle, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["delivery_vehicle_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle), request["delivery_vehicle"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_delivery_vehicle_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_delivery_vehicle header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_delivery_vehicle_client_stub.call_rpc_count + end + end + + def test_get_delivery_vehicle + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + + get_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_delivery_vehicle, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_delivery_vehicle_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_delivery_vehicle({ header: header, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_delivery_vehicle header: header, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_delivery_vehicle({ header: header, name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_delivery_vehicle_client_stub.call_rpc_count + end + end + + def test_delete_delivery_vehicle + # 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. + header = {} + name = "hello world" + + delete_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_delivery_vehicle, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_delivery_vehicle_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_delivery_vehicle({ header: header, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_delivery_vehicle header: header, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_delivery_vehicle({ header: header, 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_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, 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_delivery_vehicle_client_stub.call_rpc_count + end + end + + def test_update_delivery_vehicle + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + delivery_vehicle = {} + update_mask = {} + + update_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_delivery_vehicle, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle), request["delivery_vehicle"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_delivery_vehicle_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_delivery_vehicle header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, 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_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, 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_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, 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_delivery_vehicle_client_stub.call_rpc_count + end + end + + def test_batch_create_tasks + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + requests = [{}] + + batch_create_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_create_tasks, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_create_tasks_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_create_tasks({ header: header, parent: parent, requests: requests }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_create_tasks header: header, parent: parent, requests: requests do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_create_tasks ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_create_tasks({ header: header, parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_create_tasks(::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_create_tasks_client_stub.call_rpc_count + end + end + + def test_create_task + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + task_id = "hello world" + task = {} + + create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_task, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["task_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::Task), request["task"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_task_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_task({ header: header, parent: parent, task_id: task_id, task: task }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_task header: header, parent: parent, task_id: task_id, task: task do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_task ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_task({ header: header, parent: parent, task_id: task_id, task: task }, 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::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task), 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_get_task + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + + get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_task, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_task_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_task({ header: header, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_task header: header, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_task ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_task({ header: header, name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_task(::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_rpc_count + end + end + + def test_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. + header = {} + 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::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_task_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_task({ header: header, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_task header: header, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_task ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_task({ header: header, 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::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, 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_update_task + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + task = {} + update_mask = {} + + update_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_task, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::Task), request["task"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_task_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_task({ header: header, task: task, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_task header: header, task: task, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_task ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, 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_task({ header: header, task: task, 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_task(::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, 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_task_client_stub.call_rpc_count + end + end + + def test_list_tasks + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "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::Maps::FleetEngine::Delivery::V1::ListTasksRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + 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_tasks_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_tasks({ header: header, 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_tasks header: header, 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_tasks ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, 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_tasks({ header: header, 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_tasks(::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, 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_tasks_client_stub.call_rpc_count + end + end + + def test_get_task_tracking_info + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + + get_task_tracking_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_task_tracking_info, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_task_tracking_info_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_task_tracking_info({ header: header, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_task_tracking_info header: header, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_task_tracking_info ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_task_tracking_info({ header: header, name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_task_tracking_info(::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_task_tracking_info_client_stub.call_rpc_count + end + end + + def test_list_delivery_vehicles + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + viewport = {} + + list_delivery_vehicles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_delivery_vehicles, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + 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 Gapic::Protobuf.coerce({}, to: ::Google::Geo::Type::Viewport), request["viewport"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_delivery_vehicles_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_delivery_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_delivery_vehicles ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_delivery_vehicles(::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_delivery_vehicles_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::Maps::FleetEngine::Delivery::V1::DeliveryService::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::Maps::FleetEngine::Delivery::V1::DeliveryService::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::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-v1/.gitignore b/owl-bot-staging/google-maps-fleet_engine-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/.repo-metadata.json b/owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json new file mode 100644 index 000000000000..4592d201ad59 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "fleetengine.googleapis.com", + "api_shortname": "fleetengine", + "client_documentation": "https://rubydoc.info/gems/google-maps-fleet_engine-v1", + "distribution_name": "google-maps-fleet_engine-v1", + "is_cloud": false, + "language": "ruby", + "name": "fleetengine", + "name_pretty": "Local Rides and Deliveries V1 API", + "product_documentation": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml b/owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml new file mode 100644 index 000000000000..50b9b02eb455 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-maps-fleet_engine-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-maps-fleet_engine-v1.rb" diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/.toys.rb b/owl-bot-staging/google-maps-fleet_engine-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/.yardopts b/owl-bot-staging/google-maps-fleet_engine-v1/.yardopts new file mode 100644 index 000000000000..53681741a35c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Local Rides and Deliveries 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-maps-fleet_engine-v1/AUTHENTICATION.md b/owl-bot-staging/google-maps-fleet_engine-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..934462c35216 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-maps-fleet_engine-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-maps-fleet_engine-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/maps/fleet_engine/v1" + +client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/maps/fleet_engine/v1" + +::Google::Maps::FleetEngine::V1::TripService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine-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/maps/fleet_engine/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine-v1/CHANGELOG.md b/owl-bot-staging/google-maps-fleet_engine-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/Gemfile b/owl-bot-staging/google-maps-fleet_engine-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/LICENSE.md b/owl-bot-staging/google-maps-fleet_engine-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/README.md b/owl-bot-staging/google-maps-fleet_engine-v1/README.md new file mode 100644 index 000000000000..d5cb1b51c0ec --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Local Rides and Deliveries V1 API + +Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. + +Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Local Rides and Deliveries V1 API. Most users should consider using +the main client gem, +[google-maps-fleet_engine](https://rubygems.org/gems/google-maps-fleet_engine). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-maps-fleet_engine-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/fleetengine.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/maps/fleet_engine/v1" + +client = ::Google::Maps::FleetEngine::V1::TripService::Client.new +request = ::Google::Maps::FleetEngine::V1::CreateTripRequest.new # (request fields as keyword arguments...) +response = client.create_trip request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-maps-fleet_engine-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/maps/documentation/transportation-logistics/mobility) +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/maps/fleet_engine/v1" +require "logger" + +client = ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine`, +and lower-level _versioned_ client libraries with names such as +`google-maps-fleet_engine-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-maps-fleet_engine`. +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-maps-fleet_engine-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-maps-fleet_engine-v1/Rakefile b/owl-bot-staging/google-maps-fleet_engine-v1/Rakefile new file mode 100644 index 000000000000..3919676d82cf --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-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/maps/fleet_engine/v1/trip_service/credentials" + ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-maps-fleet_engine-v1" + header "google-maps-fleet_engine-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-maps-fleet_engine-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-v1/gapic_metadata.json b/owl-bot-staging/google-maps-fleet_engine-v1/gapic_metadata.json new file mode 100644 index 000000000000..0bdd51b5c575 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/gapic_metadata.json @@ -0,0 +1,92 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "maps.fleetengine.v1", + "libraryPackage": "::Google::Maps::FleetEngine::V1", + "services": { + "TripService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Maps::FleetEngine::V1::TripService::Client", + "rpcs": { + "CreateTrip": { + "methods": [ + "create_trip" + ] + }, + "GetTrip": { + "methods": [ + "get_trip" + ] + }, + "DeleteTrip": { + "methods": [ + "delete_trip" + ] + }, + "ReportBillableTrip": { + "methods": [ + "report_billable_trip" + ] + }, + "SearchTrips": { + "methods": [ + "search_trips" + ] + }, + "UpdateTrip": { + "methods": [ + "update_trip" + ] + } + } + } + } + }, + "VehicleService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Maps::FleetEngine::V1::VehicleService::Client", + "rpcs": { + "CreateVehicle": { + "methods": [ + "create_vehicle" + ] + }, + "GetVehicle": { + "methods": [ + "get_vehicle" + ] + }, + "DeleteVehicle": { + "methods": [ + "delete_vehicle" + ] + }, + "UpdateVehicle": { + "methods": [ + "update_vehicle" + ] + }, + "UpdateVehicleAttributes": { + "methods": [ + "update_vehicle_attributes" + ] + }, + "ListVehicles": { + "methods": [ + "list_vehicles" + ] + }, + "SearchVehicles": { + "methods": [ + "search_vehicles" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec b/owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec new file mode 100644 index 000000000000..b3ca75b30403 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/maps/fleet_engine/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-maps-fleet_engine-v1" + gem.version = Google::Maps::FleetEngine::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine instead. See the readme for more details." + gem.summary = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms." + 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-geo-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb new file mode 100644 index 000000000000..d09ab3bdc03a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-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/maps/fleet_engine/v1" diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb new file mode 100644 index 000000000000..b9e04593edfe --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/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/maps/fleet_engine/v1/trip_service" +require "google/maps/fleet_engine/v1/vehicle_service" +require "google/maps/fleet_engine/v1/version" + +module Google + module Maps + module FleetEngine + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/maps/fleet_engine/v1" + # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/maps/fleet_engine/v1" + # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/maps/fleet_engine/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb new file mode 100644 index 000000000000..a0010e1c40d9 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/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/maps/fleet_engine/v1/trip_service/rest" +require "google/maps/fleet_engine/v1/vehicle_service/rest" +require "google/maps/fleet_engine/v1/version" + +module Google + module Maps + module FleetEngine + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/maps/fleet_engine/v1/rest" + # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb new file mode 100644 index 000000000000..cb3cd45ab109 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_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/maps/fleet_engine/v1/version" + +require "google/maps/fleet_engine/v1/trip_service/credentials" +require "google/maps/fleet_engine/v1/trip_service/paths" +require "google/maps/fleet_engine/v1/trip_service/client" +require "google/maps/fleet_engine/v1/trip_service/rest" + +module Google + module Maps + module FleetEngine + module V1 + ## + # Trip management service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/maps/fleet_engine/v1/trip_service" + # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/maps/fleet_engine/v1/trip_service/rest" + # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + module TripService + end + end + end + end +end + +helper_path = ::File.join __dir__, "trip_service", "helpers.rb" +require "google/maps/fleet_engine/v1/trip_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb new file mode 100644 index 000000000000..ab9e5be6d941 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb @@ -0,0 +1,1151 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/maps/fleetengine/v1/trip_api_pb" + +module Google + module Maps + module FleetEngine + module V1 + module TripService + ## + # Client for the TripService service. + # + # Trip management service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :trip_service_stub + + ## + # Configure the TripService Client class. + # + # See {::Google::Maps::FleetEngine::V1::TripService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TripService clients + # ::Google::Maps::FleetEngine::V1::TripService::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", "Maps", "FleetEngine", "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_trip.timeout = 15.0 + default_config.rpcs.create_trip.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_trip.timeout = 15.0 + default_config.rpcs.get_trip.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_trips.timeout = 15.0 + default_config.rpcs.search_trips.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_trip.timeout = 15.0 + default_config.rpcs.update_trip.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TripService 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::Maps::FleetEngine::V1::TripService::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 + @trip_service_stub.universe_domain + end + + ## + # Create a new TripService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TripService 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/maps/fleetengine/v1/trip_api_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 + + @trip_service_stub = ::Gapic::ServiceStub.new( + ::Google::Maps::FleetEngine::V1::TripService::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 + ) + + @trip_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 + @trip_service_stub.logger + end + + # Service calls + + ## + # Creates a trip in the Fleet Engine and returns the new trip. + # + # @overload create_trip(request, options = nil) + # Pass arguments to `create_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::CreateTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::CreateTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_trip(header: nil, parent: nil, trip_id: nil, trip: nil) + # Pass arguments to `create_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param trip_id [::String] + # Required. Unique Trip ID. + # Subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] + # Required. Trip entity to create. + # + # When creating a Trip, the following fields are required: + # + # * `trip_type` + # * `pickup_point` + # + # The following fields are used if you provide them: + # + # * `number_of_passengers` + # * `vehicle_id` + # * `dropoff_point` + # * `intermediate_destinations` + # * `vehicle_waypoints` + # + # All other Trip fields are ignored. For example, all trips start with a + # `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in + # the creation request. + # + # Only `EXCLUSIVE` trips support `intermediate_destinations`. + # + # When `vehicle_id` is set for a shared trip, you must supply + # the list of `Trip.vehicle_waypoints` to specify the order of the remaining + # waypoints for the vehicle, otherwise the waypoint order will be + # undetermined. + # + # When you specify `Trip.vehicle_waypoints`, the list must contain all + # the remaining waypoints of the vehicle's trips, with no extra waypoints. + # You must order these waypoints such that for a given trip, the pickup + # point is before intermediate destinations, and all intermediate + # destinations come before the drop-off point. An `EXCLUSIVE` trip's + # waypoints must not interleave with any other trips. + # + # The `trip_id`, `waypoint_type` and `location` fields are used, and all + # other TripWaypoint fields in `vehicle_waypoints` are ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::CreateTripRequest.new + # + # # Call the create_trip method. + # result = client.create_trip request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + # p result + # + def create_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateTripRequest + + # Converts hash and nil to 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_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_trip.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.call_rpc :create_trip, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get information about a single trip. + # + # @overload get_trip(request, options = nil) + # Pass arguments to `get_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::GetTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::GetTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_trip(header: nil, name: nil, view: nil, current_route_segment_version: nil, remaining_waypoints_version: nil, route_format_type: nil, current_route_segment_traffic_version: nil, remaining_waypoints_route_version: nil) + # Pass arguments to `get_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/trips/{trip}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param view [::Google::Maps::FleetEngine::V1::TripView] + # The subset of Trip fields that should be returned and their interpretation. + # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which `Trip.route` or + # `Trip.current_route_segment` data are retrieved. If route data are + # unchanged since this timestamp, the route field is not set in the response. + # If a minimum is unspecified, the route data are always retrieved. + # @param remaining_waypoints_version [::Google::Protobuf::Timestamp, ::Hash] + # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use + # `remaining_waypoints_route_version` to control when + # `Trip.remaining_waypoints.traffic_to_waypoint` and + # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. + # @param route_format_type [::Google::Maps::FleetEngine::V1::PolylineFormatType] + # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), + # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default + # is `LAT_LNG_LIST_TYPE`. + # @param current_route_segment_traffic_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which + # `Trip.current_route_segment_traffic` is retrieved. If traffic data are + # unchanged since this timestamp, the `current_route_segment_traffic` field + # is not set in the response. If a minimum is unspecified, the traffic data + # are always retrieved. Note that traffic is only available for On-Demand + # Rides and Deliveries Solution customers. + # @param remaining_waypoints_route_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which + # `Trip.remaining_waypoints.traffic_to_waypoint` and + # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are + # unchanged since this timestamp, the fields above are + # not set in the response. If `remaining_waypoints_route_version` is + # unspecified, traffic and path are always retrieved. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::GetTripRequest.new + # + # # Call the get_trip method. + # result = client.get_trip request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + # p result + # + def get_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetTripRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_trip.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.call_rpc :get_trip, request, 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 Trip. + # + # Returns FAILED_PRECONDITION if the Trip is active and assigned to a + # vehicle. + # + # @overload delete_trip(request, options = nil) + # Pass arguments to `delete_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::DeleteTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::DeleteTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_trip(header: nil, name: nil) + # Pass arguments to `delete_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # Optional. The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/trips/{trip}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # + # @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/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::DeleteTripRequest.new + # + # # Call the delete_trip method. + # result = client.delete_trip request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteTripRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_trip.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.call_rpc :delete_trip, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Report billable trip usage. + # + # @overload report_billable_trip(request, options = nil) + # Pass arguments to `report_billable_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::ReportBillableTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload report_billable_trip(name: nil, country_code: nil, platform: nil, related_ids: nil, solution_type: nil) + # Pass arguments to `report_billable_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/billableTrips/{billable_trip}`. The + # provider must be the Project ID (for example, `sample-cloud-project`) of + # the Google Cloud Project of which the service account making this call is a + # member. + # @param country_code [::String] + # Required. Two letter country code of the country where the trip takes + # place. Price is defined according to country code. + # @param platform [::Google::Maps::FleetEngine::V1::BillingPlatformIdentifier] + # The platform upon which the request was issued. + # @param related_ids [::Array<::String>] + # The identifiers that are directly related to the trip being reported. These + # are usually IDs (for example, session IDs) of pre-booking operations done + # before the trip ID is available. The number of `related_ids` is + # limited to 50. + # @param solution_type [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest::SolutionType] + # The type of GMP product solution (for example, + # `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip. + # + # @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/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new + # + # # Call the report_billable_trip method. + # result = client.report_billable_trip request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def report_billable_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.report_billable_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.report_billable_trip.timeout, + metadata: metadata, + retry_policy: @config.rpcs.report_billable_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.call_rpc :report_billable_trip, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get all the trips for a specific vehicle. + # + # @overload search_trips(request, options = nil) + # Pass arguments to `search_trips` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::SearchTripsRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::SearchTripsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trips(header: nil, parent: nil, vehicle_id: nil, active_trips_only: nil, page_size: nil, page_token: nil, minimum_staleness: nil) + # Pass arguments to `search_trips` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param vehicle_id [::String] + # The vehicle associated with the trips in the request. If unspecified, the + # returned trips do not contain: + # + # * `current_route_segment` + # * `remaining_waypoints` + # * `remaining_distance_meters` + # * `eta_to_first_waypoint` + # @param active_trips_only [::Boolean] + # If set to true, the response includes Trips that influence a driver's + # route. + # @param page_size [::Integer] + # If not set, the server decides the number of results to return. + # @param page_token [::String] + # Set this to a value previously returned in the `SearchTripsResponse` to + # continue from previous results. + # @param minimum_staleness [::Google::Protobuf::Duration, ::Hash] + # If specified, returns the trips that have not been updated after the time + # `(current - minimum_staleness)`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::SearchTripsRequest.new + # + # # Call the search_trips method. + # result = client.search_trips request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Maps::FleetEngine::V1::Trip. + # p item + # end + # + def search_trips request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchTripsRequest + + # Converts hash and nil to 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_trips.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_trips.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_trips.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.call_rpc :search_trips, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @trip_service_stub, :search_trips, 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 trip data. + # + # @overload update_trip(request, options = nil) + # Pass arguments to `update_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::UpdateTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::UpdateTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_trip(header: nil, name: nil, trip: nil, update_mask: nil) + # Pass arguments to `update_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/trips/{trip}`. The provider must + # be the Project ID (for example, `sample-consumer-project`) of the Google + # Cloud Project of which the service account making this call is a member. + # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] + # Required. The Trip associated with the update. + # + # The following fields are maintained by the Fleet Engine. Do not update + # them using Trip.update. + # + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_traffic` + # * `current_route_segment_traffic_version` + # * `current_route_segment_version` + # * `dropoff_time` + # * `eta_to_next_waypoint` + # * `intermediate_destinations_version` + # * `last_location` + # * `name` + # * `number_of_passengers` + # * `pickup_time` + # * `remaining_distance_meters` + # * `remaining_time_to_first_waypoint` + # * `remaining_waypoints` + # * `remaining_waypoints_version` + # * `route` + # + # When you update the `Trip.vehicle_id` for a shared trip, you must supply + # the list of `Trip.vehicle_waypoints` to specify the order of the remaining + # waypoints, otherwise the order will be undetermined. + # + # When you specify `Trip.vehicle_waypoints`, the list must contain all + # the remaining waypoints of the vehicle's trips, with no extra waypoints. + # You must order these waypoints such that for a given trip, the pickup + # point is before intermediate destinations, and all intermediate + # destinations come before the drop-off point. An `EXCLUSIVE` trip's + # waypoints must not interleave with any other trips. + # The `trip_id`, `waypoint_type` and `location` fields are used, and all + # other TripWaypoint fields in `vehicle_waypoints` are ignored. + # + # To avoid a race condition for trips with multiple destinations, you + # should provide `Trip.intermediate_destinations_version` when updating + # the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The + # `Trip.intermediate_destinations_version` passed must be consistent with + # Fleet Engine's version. If it isn't, the request fails. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The field mask indicating which fields in Trip to update. + # The `update_mask` must contain at least one field. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::UpdateTripRequest.new + # + # # Call the update_trip method. + # result = client.update_trip request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + # p result + # + def update_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateTripRequest + + # Converts hash and nil to 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_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_trip.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.call_rpc :update_trip, request, 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 TripService API. + # + # This class represents the configuration for TripService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Maps::FleetEngine::V1::TripService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_trip to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Maps::FleetEngine::V1::TripService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_trip.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_trip.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Maps::FleetEngine::V1::TripService::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 = "fleetengine.googleapis.com" + + config_attr :endpoint, nil, ::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 TripService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :create_trip + ## + # RPC-specific configuration for `get_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :get_trip + ## + # RPC-specific configuration for `delete_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_trip + ## + # RPC-specific configuration for `report_billable_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :report_billable_trip + ## + # RPC-specific configuration for `search_trips` + # @return [::Gapic::Config::Method] + # + attr_reader :search_trips + ## + # RPC-specific configuration for `update_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :update_trip + + # @private + def initialize parent_rpcs = nil + create_trip_config = parent_rpcs.create_trip if parent_rpcs.respond_to? :create_trip + @create_trip = ::Gapic::Config::Method.new create_trip_config + get_trip_config = parent_rpcs.get_trip if parent_rpcs.respond_to? :get_trip + @get_trip = ::Gapic::Config::Method.new get_trip_config + delete_trip_config = parent_rpcs.delete_trip if parent_rpcs.respond_to? :delete_trip + @delete_trip = ::Gapic::Config::Method.new delete_trip_config + report_billable_trip_config = parent_rpcs.report_billable_trip if parent_rpcs.respond_to? :report_billable_trip + @report_billable_trip = ::Gapic::Config::Method.new report_billable_trip_config + search_trips_config = parent_rpcs.search_trips if parent_rpcs.respond_to? :search_trips + @search_trips = ::Gapic::Config::Method.new search_trips_config + update_trip_config = parent_rpcs.update_trip if parent_rpcs.respond_to? :update_trip + @update_trip = ::Gapic::Config::Method.new update_trip_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb new file mode 100644 index 000000000000..4377df747ce3 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Maps + module FleetEngine + module V1 + module TripService + # Credentials for the TripService 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-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb new file mode 100644 index 000000000000..7de4a91f901d --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.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 Maps + module FleetEngine + module V1 + module TripService + # Path helper methods for the TripService API. + module Paths + ## + # Create a fully-qualified Trip resource string. + # + # The resource will be in the following format: + # + # `providers/{provider}/trips/{trip}` + # + # @param provider [String] + # @param trip [String] + # + # @return [::String] + def trip_path provider:, trip: + raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" + + "providers/#{provider}/trips/#{trip}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb new file mode 100644 index 000000000000..8f43dcd60e6b --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_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/maps/fleet_engine/v1/version" + +require "google/maps/fleet_engine/v1/trip_service/credentials" +require "google/maps/fleet_engine/v1/trip_service/paths" +require "google/maps/fleet_engine/v1/trip_service/rest/client" + +module Google + module Maps + module FleetEngine + module V1 + ## + # Trip management service. + # + # To load this service and instantiate a REST client: + # + # require "google/maps/fleet_engine/v1/trip_service/rest" + # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + module TripService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/maps/fleet_engine/v1/trip_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb new file mode 100644 index 000000000000..238a9023ce45 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb @@ -0,0 +1,1060 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/maps/fleetengine/v1/trip_api_pb" +require "google/maps/fleet_engine/v1/trip_service/rest/service_stub" + +module Google + module Maps + module FleetEngine + module V1 + module TripService + module Rest + ## + # REST client for the TripService service. + # + # Trip management service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :trip_service_stub + + ## + # Configure the TripService Client class. + # + # See {::Google::Maps::FleetEngine::V1::TripService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TripService clients + # ::Google::Maps::FleetEngine::V1::TripService::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", "Maps", "FleetEngine", "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_trip.timeout = 15.0 + default_config.rpcs.create_trip.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_trip.timeout = 15.0 + default_config.rpcs.get_trip.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_trips.timeout = 15.0 + default_config.rpcs.search_trips.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_trip.timeout = 15.0 + default_config.rpcs.update_trip.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TripService 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::Maps::FleetEngine::V1::TripService::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 + @trip_service_stub.universe_domain + end + + ## + # Create a new TripService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TripService 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 + + @trip_service_stub = ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @trip_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 + @trip_service_stub.logger + end + + # Service calls + + ## + # Creates a trip in the Fleet Engine and returns the new trip. + # + # @overload create_trip(request, options = nil) + # Pass arguments to `create_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::CreateTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::CreateTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_trip(header: nil, parent: nil, trip_id: nil, trip: nil) + # Pass arguments to `create_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param trip_id [::String] + # Required. Unique Trip ID. + # Subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] + # Required. Trip entity to create. + # + # When creating a Trip, the following fields are required: + # + # * `trip_type` + # * `pickup_point` + # + # The following fields are used if you provide them: + # + # * `number_of_passengers` + # * `vehicle_id` + # * `dropoff_point` + # * `intermediate_destinations` + # * `vehicle_waypoints` + # + # All other Trip fields are ignored. For example, all trips start with a + # `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in + # the creation request. + # + # Only `EXCLUSIVE` trips support `intermediate_destinations`. + # + # When `vehicle_id` is set for a shared trip, you must supply + # the list of `Trip.vehicle_waypoints` to specify the order of the remaining + # waypoints for the vehicle, otherwise the waypoint order will be + # undetermined. + # + # When you specify `Trip.vehicle_waypoints`, the list must contain all + # the remaining waypoints of the vehicle's trips, with no extra waypoints. + # You must order these waypoints such that for a given trip, the pickup + # point is before intermediate destinations, and all intermediate + # destinations come before the drop-off point. An `EXCLUSIVE` trip's + # waypoints must not interleave with any other trips. + # + # The `trip_id`, `waypoint_type` and `location` fields are used, and all + # other TripWaypoint fields in `vehicle_waypoints` are ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::CreateTripRequest.new + # + # # Call the create_trip method. + # result = client.create_trip request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + # p result + # + def create_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateTripRequest + + # Converts hash and nil to an 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_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_trip.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.create_trip request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get information about a single trip. + # + # @overload get_trip(request, options = nil) + # Pass arguments to `get_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::GetTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::GetTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_trip(header: nil, name: nil, view: nil, current_route_segment_version: nil, remaining_waypoints_version: nil, route_format_type: nil, current_route_segment_traffic_version: nil, remaining_waypoints_route_version: nil) + # Pass arguments to `get_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/trips/{trip}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param view [::Google::Maps::FleetEngine::V1::TripView] + # The subset of Trip fields that should be returned and their interpretation. + # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which `Trip.route` or + # `Trip.current_route_segment` data are retrieved. If route data are + # unchanged since this timestamp, the route field is not set in the response. + # If a minimum is unspecified, the route data are always retrieved. + # @param remaining_waypoints_version [::Google::Protobuf::Timestamp, ::Hash] + # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use + # `remaining_waypoints_route_version` to control when + # `Trip.remaining_waypoints.traffic_to_waypoint` and + # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. + # @param route_format_type [::Google::Maps::FleetEngine::V1::PolylineFormatType] + # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), + # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default + # is `LAT_LNG_LIST_TYPE`. + # @param current_route_segment_traffic_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which + # `Trip.current_route_segment_traffic` is retrieved. If traffic data are + # unchanged since this timestamp, the `current_route_segment_traffic` field + # is not set in the response. If a minimum is unspecified, the traffic data + # are always retrieved. Note that traffic is only available for On-Demand + # Rides and Deliveries Solution customers. + # @param remaining_waypoints_route_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which + # `Trip.remaining_waypoints.traffic_to_waypoint` and + # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are + # unchanged since this timestamp, the fields above are + # not set in the response. If `remaining_waypoints_route_version` is + # unspecified, traffic and path are always retrieved. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::GetTripRequest.new + # + # # Call the get_trip method. + # result = client.get_trip request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + # p result + # + def get_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetTripRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_trip.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.get_trip request, 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 Trip. + # + # Returns FAILED_PRECONDITION if the Trip is active and assigned to a + # vehicle. + # + # @overload delete_trip(request, options = nil) + # Pass arguments to `delete_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::DeleteTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::DeleteTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_trip(header: nil, name: nil) + # Pass arguments to `delete_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # Optional. The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/trips/{trip}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @yield [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/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::DeleteTripRequest.new + # + # # Call the delete_trip method. + # result = client.delete_trip request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteTripRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_trip.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.delete_trip request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Report billable trip usage. + # + # @overload report_billable_trip(request, options = nil) + # Pass arguments to `report_billable_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::ReportBillableTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload report_billable_trip(name: nil, country_code: nil, platform: nil, related_ids: nil, solution_type: nil) + # Pass arguments to `report_billable_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/billableTrips/{billable_trip}`. The + # provider must be the Project ID (for example, `sample-cloud-project`) of + # the Google Cloud Project of which the service account making this call is a + # member. + # @param country_code [::String] + # Required. Two letter country code of the country where the trip takes + # place. Price is defined according to country code. + # @param platform [::Google::Maps::FleetEngine::V1::BillingPlatformIdentifier] + # The platform upon which the request was issued. + # @param related_ids [::Array<::String>] + # The identifiers that are directly related to the trip being reported. These + # are usually IDs (for example, session IDs) of pre-booking operations done + # before the trip ID is available. The number of `related_ids` is + # limited to 50. + # @param solution_type [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest::SolutionType] + # The type of GMP product solution (for example, + # `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip. + # @yield [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/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new + # + # # Call the report_billable_trip method. + # result = client.report_billable_trip request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def report_billable_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.report_billable_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.report_billable_trip.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.report_billable_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.report_billable_trip request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get all the trips for a specific vehicle. + # + # @overload search_trips(request, options = nil) + # Pass arguments to `search_trips` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::SearchTripsRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::SearchTripsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trips(header: nil, parent: nil, vehicle_id: nil, active_trips_only: nil, page_size: nil, page_token: nil, minimum_staleness: nil) + # Pass arguments to `search_trips` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param vehicle_id [::String] + # The vehicle associated with the trips in the request. If unspecified, the + # returned trips do not contain: + # + # * `current_route_segment` + # * `remaining_waypoints` + # * `remaining_distance_meters` + # * `eta_to_first_waypoint` + # @param active_trips_only [::Boolean] + # If set to true, the response includes Trips that influence a driver's + # route. + # @param page_size [::Integer] + # If not set, the server decides the number of results to return. + # @param page_token [::String] + # Set this to a value previously returned in the `SearchTripsResponse` to + # continue from previous results. + # @param minimum_staleness [::Google::Protobuf::Duration, ::Hash] + # If specified, returns the trips that have not been updated after the time + # `(current - minimum_staleness)`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::SearchTripsRequest.new + # + # # Call the search_trips method. + # result = client.search_trips request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Maps::FleetEngine::V1::Trip. + # p item + # end + # + def search_trips request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchTripsRequest + + # Converts hash and nil to an 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_trips.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_trips.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_trips.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.search_trips request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @trip_service_stub, :search_trips, "trips", request, result, 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 trip data. + # + # @overload update_trip(request, options = nil) + # Pass arguments to `update_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::UpdateTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::UpdateTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_trip(header: nil, name: nil, trip: nil, update_mask: nil) + # Pass arguments to `update_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/trips/{trip}`. The provider must + # be the Project ID (for example, `sample-consumer-project`) of the Google + # Cloud Project of which the service account making this call is a member. + # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] + # Required. The Trip associated with the update. + # + # The following fields are maintained by the Fleet Engine. Do not update + # them using Trip.update. + # + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_traffic` + # * `current_route_segment_traffic_version` + # * `current_route_segment_version` + # * `dropoff_time` + # * `eta_to_next_waypoint` + # * `intermediate_destinations_version` + # * `last_location` + # * `name` + # * `number_of_passengers` + # * `pickup_time` + # * `remaining_distance_meters` + # * `remaining_time_to_first_waypoint` + # * `remaining_waypoints` + # * `remaining_waypoints_version` + # * `route` + # + # When you update the `Trip.vehicle_id` for a shared trip, you must supply + # the list of `Trip.vehicle_waypoints` to specify the order of the remaining + # waypoints, otherwise the order will be undetermined. + # + # When you specify `Trip.vehicle_waypoints`, the list must contain all + # the remaining waypoints of the vehicle's trips, with no extra waypoints. + # You must order these waypoints such that for a given trip, the pickup + # point is before intermediate destinations, and all intermediate + # destinations come before the drop-off point. An `EXCLUSIVE` trip's + # waypoints must not interleave with any other trips. + # The `trip_id`, `waypoint_type` and `location` fields are used, and all + # other TripWaypoint fields in `vehicle_waypoints` are ignored. + # + # To avoid a race condition for trips with multiple destinations, you + # should provide `Trip.intermediate_destinations_version` when updating + # the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The + # `Trip.intermediate_destinations_version` passed must be consistent with + # Fleet Engine's version. If it isn't, the request fails. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The field mask indicating which fields in Trip to update. + # The `update_mask` must contain at least one field. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::UpdateTripRequest.new + # + # # Call the update_trip method. + # result = client.update_trip request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + # p result + # + def update_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateTripRequest + + # Converts hash and nil to an 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_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_trip.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.update_trip request, 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 TripService REST API. + # + # This class represents the configuration for TripService 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::Maps::FleetEngine::V1::TripService::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_trip to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_trip.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_trip.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "fleetengine.googleapis.com" + + config_attr :endpoint, nil, ::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 TripService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :create_trip + ## + # RPC-specific configuration for `get_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :get_trip + ## + # RPC-specific configuration for `delete_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_trip + ## + # RPC-specific configuration for `report_billable_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :report_billable_trip + ## + # RPC-specific configuration for `search_trips` + # @return [::Gapic::Config::Method] + # + attr_reader :search_trips + ## + # RPC-specific configuration for `update_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :update_trip + + # @private + def initialize parent_rpcs = nil + create_trip_config = parent_rpcs.create_trip if parent_rpcs.respond_to? :create_trip + @create_trip = ::Gapic::Config::Method.new create_trip_config + get_trip_config = parent_rpcs.get_trip if parent_rpcs.respond_to? :get_trip + @get_trip = ::Gapic::Config::Method.new get_trip_config + delete_trip_config = parent_rpcs.delete_trip if parent_rpcs.respond_to? :delete_trip + @delete_trip = ::Gapic::Config::Method.new delete_trip_config + report_billable_trip_config = parent_rpcs.report_billable_trip if parent_rpcs.respond_to? :report_billable_trip + @report_billable_trip = ::Gapic::Config::Method.new report_billable_trip_config + search_trips_config = parent_rpcs.search_trips if parent_rpcs.respond_to? :search_trips + @search_trips = ::Gapic::Config::Method.new search_trips_config + update_trip_config = parent_rpcs.update_trip if parent_rpcs.respond_to? :update_trip + @update_trip = ::Gapic::Config::Method.new update_trip_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb new file mode 100644 index 000000000000..989dd713b15c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb @@ -0,0 +1,451 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/maps/fleetengine/v1/trip_api_pb" + +module Google + module Maps + module FleetEngine + module V1 + module TripService + module Rest + ## + # REST service stub for the TripService 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_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::CreateTripRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # A result object deserialized from the server's reply + def create_trip request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_trip_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_trip", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::Trip.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::GetTripRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # A result object deserialized from the server's reply + def get_trip request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_trip_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_trip", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::Trip.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_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteTripRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_trip request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_trip_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_trip", + 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 report_billable_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 report_billable_trip request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_report_billable_trip_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "report_billable_trip", + 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 search_trips REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::SearchTripsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::SearchTripsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::SearchTripsResponse] + # A result object deserialized from the server's reply + def search_trips request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_trips_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_trips", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::SearchTripsResponse.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_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateTripRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # A result object deserialized from the server's reply + def update_trip request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_trip_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_trip", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::Trip.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_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::CreateTripRequest] + # 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_trip_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/trips", + body: "trip", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::GetTripRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_trip_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/trips/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteTripRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_trip_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/trips/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the report_billable_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_report_billable_trip_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:report", + body: "*", + matches: [ + ["name", %r{^providers/[^/]+/billableTrips/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_trips REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::SearchTripsRequest] + # 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_trips_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/trips:search", + body: "*", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateTripRequest] + # 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_trip_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1/{name}", + body: "trip", + matches: [ + ["name", %r{^providers/[^/]+/trips/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb new file mode 100644 index 000000000000..8a9893ae0e60 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_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/maps/fleet_engine/v1/version" + +require "google/maps/fleet_engine/v1/vehicle_service/credentials" +require "google/maps/fleet_engine/v1/vehicle_service/paths" +require "google/maps/fleet_engine/v1/vehicle_service/client" +require "google/maps/fleet_engine/v1/vehicle_service/rest" + +module Google + module Maps + module FleetEngine + module V1 + ## + # Vehicle management service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/maps/fleet_engine/v1/vehicle_service" + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/maps/fleet_engine/v1/vehicle_service/rest" + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + module VehicleService + end + end + end + end +end + +helper_path = ::File.join __dir__, "vehicle_service", "helpers.rb" +require "google/maps/fleet_engine/v1/vehicle_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb new file mode 100644 index 000000000000..9f81723b1bcf --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb @@ -0,0 +1,1461 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/maps/fleetengine/v1/vehicle_api_pb" + +module Google + module Maps + module FleetEngine + module V1 + module VehicleService + ## + # Client for the VehicleService service. + # + # Vehicle management service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :vehicle_service_stub + + ## + # Configure the VehicleService Client class. + # + # See {::Google::Maps::FleetEngine::V1::VehicleService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VehicleService clients + # ::Google::Maps::FleetEngine::V1::VehicleService::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", "Maps", "FleetEngine", "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_vehicle.timeout = 15.0 + default_config.rpcs.create_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_vehicle.timeout = 15.0 + default_config.rpcs.get_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_vehicle.timeout = 15.0 + default_config.rpcs.update_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_vehicle_attributes.timeout = 15.0 + default_config.rpcs.update_vehicle_attributes.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_vehicles.timeout = 15.0 + default_config.rpcs.search_vehicles.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the VehicleService 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::Maps::FleetEngine::V1::VehicleService::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 + @vehicle_service_stub.universe_domain + end + + ## + # Create a new VehicleService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VehicleService 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/maps/fleetengine/v1/vehicle_api_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 + + @vehicle_service_stub = ::Gapic::ServiceStub.new( + ::Google::Maps::FleetEngine::V1::VehicleService::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 + ) + + @vehicle_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 + @vehicle_service_stub.logger + end + + # Service calls + + ## + # Instantiates a new vehicle associated with an on-demand rideshare or + # deliveries provider. Each `Vehicle` must have a unique vehicle ID. + # + # The following `Vehicle` fields are required when creating a `Vehicle`: + # + # * `vehicleState` + # * `supportedTripTypes` + # * `maximumCapacity` + # * `vehicleType` + # + # The following `Vehicle` fields are ignored when creating a `Vehicle`: + # + # * `name` + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_version` + # * `current_route_segment_traffic` + # * `route` + # * `waypoints` + # * `waypoints_version` + # * `remaining_distance_meters` + # * `remaining_time_seconds` + # * `eta_to_next_waypoint` + # * `navigation_status` + # + # All other fields are optional and used if provided. + # + # @overload create_vehicle(request, options = nil) + # Pass arguments to `create_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::CreateVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::CreateVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_vehicle(header: nil, parent: nil, vehicle_id: nil, vehicle: nil) + # Pass arguments to `create_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param vehicle_id [::String] + # Required. Unique Vehicle ID. + # Subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] + # Required. The Vehicle entity to create. When creating a Vehicle, the + # following fields are required: + # + # * `vehicleState` + # * `supportedTripTypes` + # * `maximumCapacity` + # * `vehicleType` + # + # When creating a Vehicle, the following fields are ignored: + # + # * `name` + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_version` + # * `current_route_segment_traffic` + # * `route` + # * `waypoints` + # * `waypoints_version` + # * `remaining_distance_meters` + # * `remaining_time_seconds` + # * `eta_to_next_waypoint` + # * `navigation_status` + # + # All other fields are optional and used if provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::CreateVehicleRequest.new + # + # # Call the create_vehicle method. + # result = client.create_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + # p result + # + def create_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateVehicleRequest + + # Converts hash and nil to 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_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_vehicle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.call_rpc :create_vehicle, request, 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 vehicle from the Fleet Engine. + # + # @overload get_vehicle(request, options = nil) + # Pass arguments to `get_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::GetVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::GetVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_vehicle(header: nil, name: nil, current_route_segment_version: nil, waypoints_version: nil) + # Pass arguments to `get_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which + # `Vehicle.current_route_segment` is retrieved. + # If the route is unchanged since this timestamp, the `current_route_segment` + # field is not set in the response. If a minimum is unspecified, the + # `current_route_segment` is always retrieved. + # @param waypoints_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints` + # data is retrieved. If the waypoints are unchanged since this timestamp, the + # `vehicle.waypoints` data is not set in the response. If this field is + # unspecified, `vehicle.waypoints` is always retrieved. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::GetVehicleRequest.new + # + # # Call the get_vehicle method. + # result = client.get_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + # p result + # + def get_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_vehicle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.call_rpc :get_vehicle, request, 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 Vehicle from the Fleet Engine. + # + # Returns FAILED_PRECONDITION if the Vehicle has active Trips. + # assigned to it. + # + # @overload delete_vehicle(request, options = nil) + # Pass arguments to `delete_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::DeleteVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_vehicle(header: nil, name: nil) + # Pass arguments to `delete_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # Optional. The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # + # @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/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new + # + # # Call the delete_vehicle method. + # result = client.delete_vehicle request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_vehicle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.call_rpc :delete_vehicle, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Writes updated vehicle data to the Fleet Engine. + # + # When updating a `Vehicle`, the following fields cannot be updated since + # they are managed by the server: + # + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment_version` + # * `waypoints_version` + # + # The vehicle `name` also cannot be updated. + # + # If the `attributes` field is updated, **all** the vehicle's attributes are + # replaced with the attributes provided in the request. If you want to update + # only some attributes, see the `UpdateVehicleAttributes` method. Likewise, + # the `waypoints` field can be updated, but must contain all the waypoints + # currently on the vehicle, and no other waypoints. + # + # @overload update_vehicle(request, options = nil) + # Pass arguments to `update_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::UpdateVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_vehicle(header: nil, name: nil, vehicle: nil, update_mask: nil) + # Pass arguments to `update_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] + # Required. The `Vehicle` entity values to apply. When updating a `Vehicle`, + # the following fields may not be updated as they are managed by the + # server. + # + # * `available_capacity` + # * `current_route_segment_version` + # * `current_trips` + # * `name` + # * `waypoints_version` + # + # If the `attributes` field is updated, **all** the vehicle's attributes are + # replaced with the attributes provided in the request. If you want to update + # only some attributes, see the `UpdateVehicleAttributes` method. + # + # Likewise, the `waypoints` field can be updated, but must contain all the + # waypoints currently on the vehicle, and no other waypoints. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A field mask indicating which fields of the `Vehicle` to update. + # At least one field name must be provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new + # + # # Call the update_vehicle method. + # result = client.update_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + # p result + # + def update_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest + + # Converts hash and nil to 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_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_vehicle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.call_rpc :update_vehicle, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Partially updates a vehicle's attributes. + # Only the attributes mentioned in the request will be updated, other + # attributes will NOT be altered. Note: this is different in `UpdateVehicle`, + # where the whole `attributes` field will be replaced by the one in + # `UpdateVehicleRequest`, attributes not in the request would be removed. + # + # @overload update_vehicle_attributes(request, options = nil) + # Pass arguments to `update_vehicle_attributes` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_vehicle_attributes(header: nil, name: nil, attributes: nil) + # Pass arguments to `update_vehicle_attributes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] + # Required. The vehicle attributes to update. Unmentioned attributes are not + # altered or removed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new + # + # # Call the update_vehicle_attributes method. + # result = client.update_vehicle_attributes request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse. + # p result + # + def update_vehicle_attributes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest + + # Converts hash and nil to 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_vehicle_attributes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_vehicle_attributes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_vehicle_attributes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.call_rpc :update_vehicle_attributes, request, 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 paginated list of vehicles associated with + # a provider that match the request options. + # + # @overload list_vehicles(request, options = nil) + # Pass arguments to `list_vehicles` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::ListVehiclesRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::ListVehiclesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_type_categories: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, vehicle_state: nil, on_trip_only: nil, filter: nil, viewport: nil) + # Pass arguments to `list_vehicles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param page_size [::Integer] + # The maximum number of vehicles to return. + # Default value: 100. + # @param page_token [::String] + # The value of the `next_page_token` provided by a previous call to + # `ListVehicles` so that you can paginate through groups of vehicles. The + # value is undefined if the filter criteria of the request is not the same as + # the filter criteria for the previous call to `ListVehicles`. + # @param minimum_capacity [::Google::Protobuf::Int32Value, ::Hash] + # Specifies the required minimum capacity of the vehicle. All vehicles + # returned will have a `maximum_capacity` greater than or equal to this + # value. If set, must be greater or equal to 0. + # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] + # Restricts the response to vehicles that support at least one of the + # specified trip types. + # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] + # Restricts the response to vehicles that have sent location updates to Fleet + # Engine within the specified duration. Stationary vehicles still + # transmitting their locations are not considered stale. If present, must be + # a valid positive duration. + # @param vehicle_type_categories [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category>] + # Required. Restricts the response to vehicles with one of the specified type + # categories. `UNKNOWN` is not allowed. + # @param required_attributes [::Array<::String>] + # Callers can form complex logical operations using any combination of the + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attribute_sets` fields. + # + # `required_attributes` is a list; `required_one_of_attributes` uses a + # message which allows a list of lists. In combination, the two fields allow + # the composition of this expression: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR + # ...) + # AND + # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR + # ...) + # ``` + # + # Restricts the response to vehicles with the specified attributes. This + # field is a conjunction/AND operation. A max of 50 required_attributes is + # allowed. This matches the maximum number of attributes allowed on a + # vehicle. Each repeated string should be of the format "key:value". + # @param required_one_of_attributes [::Array<::String>] + # Restricts the response to vehicles with at least one of the specified + # attributes in each `VehicleAttributeList`. Within each list, a vehicle must + # match at least one of the attributes. This field is an inclusive + # disjunction/OR operation in each `VehicleAttributeList` and a + # conjunction/AND operation across the collection of `VehicleAttributeList`. + # Each repeated string should be of the format + # "key1:value1|key2:value2|key3:value3". + # @param required_one_of_attribute_sets [::Array<::String>] + # `required_one_of_attribute_sets` provides additional functionality. + # + # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` + # uses a message which allows a list of lists, allowing expressions such as + # this one: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # ( + # (required_one_of_attribute_sets[0][0] AND + # required_one_of_attribute_sets[0][1] AND + # ...) + # OR + # (required_one_of_attribute_sets[1][0] AND + # required_one_of_attribute_sets[1][1] AND + # ...) + # ) + # ``` + # + # Restricts the response to vehicles that match all the attributes in a + # `VehicleAttributeList`. Within each list, a vehicle must match all of the + # attributes. This field is a conjunction/AND operation in each + # `VehicleAttributeList` and inclusive disjunction/OR operation across the + # collection of `VehicleAttributeList`. Each repeated string should be of the + # format "key1:value1|key2:value2|key3:value3". + # @param vehicle_state [::Google::Maps::FleetEngine::V1::VehicleState] + # Restricts the response to vehicles that have this vehicle state. + # @param on_trip_only [::Boolean] + # Only return the vehicles with current trip(s). + # @param filter [::String] + # Optional. A filter query to apply when listing vehicles. See + # http://aip.dev/160 for examples of the filter syntax. + # + # This field is designed to replace the `required_attributes`, + # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. + # If a non-empty value is specified here, the following fields must be empty: + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attributes_sets`. + # + # This filter functions as an AND clause with other constraints, + # such as `vehicle_state` or `on_trip_only`. + # + # Note that the only queries supported are on vehicle attributes (for + # example, `attributes. = ` or `attributes. = AND + # attributes. = `). The maximum number of restrictions allowed + # in a filter query is 50. + # + # Also, all attributes are stored as strings, so the only supported + # comparisons against attributes are string comparisons. In order to compare + # against number or boolean values, the values must be explicitly quoted to + # be treated as strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + # @param viewport [::Google::Geo::Type::Viewport, ::Hash] + # Optional. A filter that limits the vehicles returned to those whose last + # known location was in the rectangular area defined by the viewport. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::ListVehiclesRequest.new + # + # # Call the list_vehicles method. + # result = client.list_vehicles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Maps::FleetEngine::V1::Vehicle. + # p item + # end + # + def list_vehicles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ListVehiclesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_vehicles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_vehicles.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_vehicles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.call_rpc :list_vehicles, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @vehicle_service_stub, :list_vehicles, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of vehicles that match the request options. + # + # @overload search_vehicles(request, options = nil) + # Pass arguments to `search_vehicles` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::SearchVehiclesRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_vehicles(header: nil, parent: nil, pickup_point: nil, dropoff_point: nil, pickup_radius_meters: nil, count: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_types: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, order_by: nil, include_back_to_back: nil, trip_id: nil, current_trips_present: nil, filter: nil) + # Pass arguments to `search_vehicles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param pickup_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] + # Required. The pickup point to search near. + # @param dropoff_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] + # The customer's intended dropoff location. The field is required if + # `trip_types` contains `TripType.SHARED`. + # @param pickup_radius_meters [::Integer] + # Required. Defines the vehicle search radius around the pickup point. Only + # vehicles within the search radius will be returned. Value must be between + # 400 and 10000 meters (inclusive). + # @param count [::Integer] + # Required. Specifies the maximum number of vehicles to return. The value + # must be between 1 and 50 (inclusive). + # @param minimum_capacity [::Integer] + # Required. Specifies the number of passengers being considered for a trip. + # The value must be greater than or equal to one. The driver is not + # considered in the capacity value. + # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] + # Required. Represents the type of proposed trip. Must include exactly one + # type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only + # those vehicles that can support that trip type. + # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] + # Restricts the search to only those vehicles that have sent location updates + # to Fleet Engine within the specified duration. Stationary vehicles still + # transmitting their locations are not considered stale. If this field is not + # set, the server uses five minutes as the default value. + # @param vehicle_types [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType, ::Hash>] + # Required. Restricts the search to vehicles with one of the specified types. + # At least one vehicle type must be specified. VehicleTypes with a category + # of `UNKNOWN` are not allowed. + # @param required_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] + # Callers can form complex logical operations using any combination of the + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attribute_sets` fields. + # + # `required_attributes` is a list; `required_one_of_attributes` uses a + # message which allows a list of lists. In combination, the two fields allow + # the composition of this expression: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR + # ...) + # AND + # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR + # ...) + # ``` + # + # Restricts the search to only those vehicles with the specified attributes. + # This field is a conjunction/AND operation. A max of 50 required_attributes + # is allowed. This matches the maximum number of attributes allowed on a + # vehicle. + # @param required_one_of_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] + # Restricts the search to only those vehicles with at least one of + # the specified attributes in each `VehicleAttributeList`. Within each + # list, a vehicle must match at least one of the attributes. This field is an + # inclusive disjunction/OR operation in each `VehicleAttributeList` and a + # conjunction/AND operation across the collection of `VehicleAttributeList`. + # @param required_one_of_attribute_sets [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] + # `required_one_of_attribute_sets` provides additional functionality. + # + # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` + # uses a message which allows a list of lists, allowing expressions such as + # this one: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # ( + # (required_one_of_attribute_sets[0][0] AND + # required_one_of_attribute_sets[0][1] AND + # ...) + # OR + # (required_one_of_attribute_sets[1][0] AND + # required_one_of_attribute_sets[1][1] AND + # ...) + # ) + # ``` + # + # Restricts the search to only those vehicles with all the attributes in a + # `VehicleAttributeList`. Within each list, a + # vehicle must match all of the attributes. This field is a conjunction/AND + # operation in each `VehicleAttributeList` and inclusive disjunction/OR + # operation across the collection of `VehicleAttributeList`. + # @param order_by [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] + # Required. Specifies the desired ordering criterion for results. + # @param include_back_to_back [::Boolean] + # This indicates if vehicles with a single active trip are eligible for this + # search. This field is only used when `current_trips_present` is + # unspecified. When `current_trips_present` is unspecified and this field + # is `false`, vehicles with assigned trips are excluded from the search + # results. When `current_trips_present` is unspecified and this field is + # `true`, search results can include vehicles with one active trip that has a + # status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified, + # this field cannot be set to true. + # + # The default value is `false`. + # @param trip_id [::String] + # Indicates the trip associated with this `SearchVehicleRequest`. + # @param current_trips_present [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::CurrentTripsPresent] + # This indicates if vehicles with active trips are eligible for this search. + # This must be set to something other than + # `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`. + # @param filter [::String] + # Optional. A filter query to apply when searching vehicles. See + # http://aip.dev/160 for examples of the filter syntax. + # + # This field is designed to replace the `required_attributes`, + # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. + # If a non-empty value is specified here, the following fields must be empty: + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attributes_sets`. + # + # This filter functions as an AND clause with other constraints, + # such as `minimum_capacity` or `vehicle_types`. + # + # Note that the only queries supported are on vehicle attributes (for + # example, `attributes. = ` or `attributes. = AND + # attributes. = `). The maximum number of restrictions allowed + # in a filter query is 50. + # + # Also, all attributes are stored as strings, so the only supported + # comparisons against attributes are string comparisons. In order to compare + # against number or boolean values, the values must be explicitly quoted to + # be treated as strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new + # + # # Call the search_vehicles method. + # result = client.search_vehicles request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::SearchVehiclesResponse. + # p result + # + def search_vehicles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest + + # Converts hash and nil to 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_vehicles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_vehicles.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_vehicles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.call_rpc :search_vehicles, request, 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 VehicleService API. + # + # This class represents the configuration for VehicleService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Maps::FleetEngine::V1::VehicleService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_vehicle to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Maps::FleetEngine::V1::VehicleService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_vehicle.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_vehicle.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Maps::FleetEngine::V1::VehicleService::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 = "fleetengine.googleapis.com" + + config_attr :endpoint, nil, ::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 VehicleService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :create_vehicle + ## + # RPC-specific configuration for `get_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :get_vehicle + ## + # RPC-specific configuration for `delete_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_vehicle + ## + # RPC-specific configuration for `update_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vehicle + ## + # RPC-specific configuration for `update_vehicle_attributes` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vehicle_attributes + ## + # RPC-specific configuration for `list_vehicles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_vehicles + ## + # RPC-specific configuration for `search_vehicles` + # @return [::Gapic::Config::Method] + # + attr_reader :search_vehicles + + # @private + def initialize parent_rpcs = nil + create_vehicle_config = parent_rpcs.create_vehicle if parent_rpcs.respond_to? :create_vehicle + @create_vehicle = ::Gapic::Config::Method.new create_vehicle_config + get_vehicle_config = parent_rpcs.get_vehicle if parent_rpcs.respond_to? :get_vehicle + @get_vehicle = ::Gapic::Config::Method.new get_vehicle_config + delete_vehicle_config = parent_rpcs.delete_vehicle if parent_rpcs.respond_to? :delete_vehicle + @delete_vehicle = ::Gapic::Config::Method.new delete_vehicle_config + update_vehicle_config = parent_rpcs.update_vehicle if parent_rpcs.respond_to? :update_vehicle + @update_vehicle = ::Gapic::Config::Method.new update_vehicle_config + update_vehicle_attributes_config = parent_rpcs.update_vehicle_attributes if parent_rpcs.respond_to? :update_vehicle_attributes + @update_vehicle_attributes = ::Gapic::Config::Method.new update_vehicle_attributes_config + list_vehicles_config = parent_rpcs.list_vehicles if parent_rpcs.respond_to? :list_vehicles + @list_vehicles = ::Gapic::Config::Method.new list_vehicles_config + search_vehicles_config = parent_rpcs.search_vehicles if parent_rpcs.respond_to? :search_vehicles + @search_vehicles = ::Gapic::Config::Method.new search_vehicles_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb new file mode 100644 index 000000000000..fa225faa2e96 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Maps + module FleetEngine + module V1 + module VehicleService + # Credentials for the VehicleService 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-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb new file mode 100644 index 000000000000..55fd593ff4b1 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.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 Maps + module FleetEngine + module V1 + module VehicleService + # Path helper methods for the VehicleService API. + module Paths + ## + # Create a fully-qualified Vehicle resource string. + # + # The resource will be in the following format: + # + # `providers/{provider}/vehicles/{vehicle}` + # + # @param provider [String] + # @param vehicle [String] + # + # @return [::String] + def vehicle_path provider:, vehicle: + raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" + + "providers/#{provider}/vehicles/#{vehicle}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb new file mode 100644 index 000000000000..c638416560e4 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_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/maps/fleet_engine/v1/version" + +require "google/maps/fleet_engine/v1/vehicle_service/credentials" +require "google/maps/fleet_engine/v1/vehicle_service/paths" +require "google/maps/fleet_engine/v1/vehicle_service/rest/client" + +module Google + module Maps + module FleetEngine + module V1 + ## + # Vehicle management service. + # + # To load this service and instantiate a REST client: + # + # require "google/maps/fleet_engine/v1/vehicle_service/rest" + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + module VehicleService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/maps/fleet_engine/v1/vehicle_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb new file mode 100644 index 000000000000..a9298c4b983b --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb @@ -0,0 +1,1362 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/maps/fleetengine/v1/vehicle_api_pb" +require "google/maps/fleet_engine/v1/vehicle_service/rest/service_stub" + +module Google + module Maps + module FleetEngine + module V1 + module VehicleService + module Rest + ## + # REST client for the VehicleService service. + # + # Vehicle management service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :vehicle_service_stub + + ## + # Configure the VehicleService Client class. + # + # See {::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VehicleService clients + # ::Google::Maps::FleetEngine::V1::VehicleService::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", "Maps", "FleetEngine", "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_vehicle.timeout = 15.0 + default_config.rpcs.create_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_vehicle.timeout = 15.0 + default_config.rpcs.get_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_vehicle.timeout = 15.0 + default_config.rpcs.update_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_vehicle_attributes.timeout = 15.0 + default_config.rpcs.update_vehicle_attributes.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_vehicles.timeout = 15.0 + default_config.rpcs.search_vehicles.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the VehicleService 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::Maps::FleetEngine::V1::VehicleService::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 + @vehicle_service_stub.universe_domain + end + + ## + # Create a new VehicleService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VehicleService 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 + + @vehicle_service_stub = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @vehicle_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 + @vehicle_service_stub.logger + end + + # Service calls + + ## + # Instantiates a new vehicle associated with an on-demand rideshare or + # deliveries provider. Each `Vehicle` must have a unique vehicle ID. + # + # The following `Vehicle` fields are required when creating a `Vehicle`: + # + # * `vehicleState` + # * `supportedTripTypes` + # * `maximumCapacity` + # * `vehicleType` + # + # The following `Vehicle` fields are ignored when creating a `Vehicle`: + # + # * `name` + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_version` + # * `current_route_segment_traffic` + # * `route` + # * `waypoints` + # * `waypoints_version` + # * `remaining_distance_meters` + # * `remaining_time_seconds` + # * `eta_to_next_waypoint` + # * `navigation_status` + # + # All other fields are optional and used if provided. + # + # @overload create_vehicle(request, options = nil) + # Pass arguments to `create_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::CreateVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::CreateVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_vehicle(header: nil, parent: nil, vehicle_id: nil, vehicle: nil) + # Pass arguments to `create_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param vehicle_id [::String] + # Required. Unique Vehicle ID. + # Subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] + # Required. The Vehicle entity to create. When creating a Vehicle, the + # following fields are required: + # + # * `vehicleState` + # * `supportedTripTypes` + # * `maximumCapacity` + # * `vehicleType` + # + # When creating a Vehicle, the following fields are ignored: + # + # * `name` + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_version` + # * `current_route_segment_traffic` + # * `route` + # * `waypoints` + # * `waypoints_version` + # * `remaining_distance_meters` + # * `remaining_time_seconds` + # * `eta_to_next_waypoint` + # * `navigation_status` + # + # All other fields are optional and used if provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::CreateVehicleRequest.new + # + # # Call the create_vehicle method. + # result = client.create_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + # p result + # + def create_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateVehicleRequest + + # Converts hash and nil to an 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_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_vehicle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.create_vehicle request, 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 vehicle from the Fleet Engine. + # + # @overload get_vehicle(request, options = nil) + # Pass arguments to `get_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::GetVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::GetVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_vehicle(header: nil, name: nil, current_route_segment_version: nil, waypoints_version: nil) + # Pass arguments to `get_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which + # `Vehicle.current_route_segment` is retrieved. + # If the route is unchanged since this timestamp, the `current_route_segment` + # field is not set in the response. If a minimum is unspecified, the + # `current_route_segment` is always retrieved. + # @param waypoints_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints` + # data is retrieved. If the waypoints are unchanged since this timestamp, the + # `vehicle.waypoints` data is not set in the response. If this field is + # unspecified, `vehicle.waypoints` is always retrieved. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::GetVehicleRequest.new + # + # # Call the get_vehicle method. + # result = client.get_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + # p result + # + def get_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_vehicle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.get_vehicle request, 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 Vehicle from the Fleet Engine. + # + # Returns FAILED_PRECONDITION if the Vehicle has active Trips. + # assigned to it. + # + # @overload delete_vehicle(request, options = nil) + # Pass arguments to `delete_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::DeleteVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_vehicle(header: nil, name: nil) + # Pass arguments to `delete_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # Optional. The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @yield [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/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new + # + # # Call the delete_vehicle method. + # result = client.delete_vehicle request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_vehicle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.delete_vehicle request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Writes updated vehicle data to the Fleet Engine. + # + # When updating a `Vehicle`, the following fields cannot be updated since + # they are managed by the server: + # + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment_version` + # * `waypoints_version` + # + # The vehicle `name` also cannot be updated. + # + # If the `attributes` field is updated, **all** the vehicle's attributes are + # replaced with the attributes provided in the request. If you want to update + # only some attributes, see the `UpdateVehicleAttributes` method. Likewise, + # the `waypoints` field can be updated, but must contain all the waypoints + # currently on the vehicle, and no other waypoints. + # + # @overload update_vehicle(request, options = nil) + # Pass arguments to `update_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::UpdateVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_vehicle(header: nil, name: nil, vehicle: nil, update_mask: nil) + # Pass arguments to `update_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] + # Required. The `Vehicle` entity values to apply. When updating a `Vehicle`, + # the following fields may not be updated as they are managed by the + # server. + # + # * `available_capacity` + # * `current_route_segment_version` + # * `current_trips` + # * `name` + # * `waypoints_version` + # + # If the `attributes` field is updated, **all** the vehicle's attributes are + # replaced with the attributes provided in the request. If you want to update + # only some attributes, see the `UpdateVehicleAttributes` method. + # + # Likewise, the `waypoints` field can be updated, but must contain all the + # waypoints currently on the vehicle, and no other waypoints. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A field mask indicating which fields of the `Vehicle` to update. + # At least one field name must be provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new + # + # # Call the update_vehicle method. + # result = client.update_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + # p result + # + def update_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest + + # Converts hash and nil to an 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_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_vehicle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.update_vehicle request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Partially updates a vehicle's attributes. + # Only the attributes mentioned in the request will be updated, other + # attributes will NOT be altered. Note: this is different in `UpdateVehicle`, + # where the whole `attributes` field will be replaced by the one in + # `UpdateVehicleRequest`, attributes not in the request would be removed. + # + # @overload update_vehicle_attributes(request, options = nil) + # Pass arguments to `update_vehicle_attributes` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_vehicle_attributes(header: nil, name: nil, attributes: nil) + # Pass arguments to `update_vehicle_attributes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] + # Required. The vehicle attributes to update. Unmentioned attributes are not + # altered or removed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new + # + # # Call the update_vehicle_attributes method. + # result = client.update_vehicle_attributes request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse. + # p result + # + def update_vehicle_attributes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest + + # Converts hash and nil to an 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_vehicle_attributes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_vehicle_attributes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_vehicle_attributes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.update_vehicle_attributes request, 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 paginated list of vehicles associated with + # a provider that match the request options. + # + # @overload list_vehicles(request, options = nil) + # Pass arguments to `list_vehicles` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::ListVehiclesRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::ListVehiclesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_type_categories: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, vehicle_state: nil, on_trip_only: nil, filter: nil, viewport: nil) + # Pass arguments to `list_vehicles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param page_size [::Integer] + # The maximum number of vehicles to return. + # Default value: 100. + # @param page_token [::String] + # The value of the `next_page_token` provided by a previous call to + # `ListVehicles` so that you can paginate through groups of vehicles. The + # value is undefined if the filter criteria of the request is not the same as + # the filter criteria for the previous call to `ListVehicles`. + # @param minimum_capacity [::Google::Protobuf::Int32Value, ::Hash] + # Specifies the required minimum capacity of the vehicle. All vehicles + # returned will have a `maximum_capacity` greater than or equal to this + # value. If set, must be greater or equal to 0. + # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] + # Restricts the response to vehicles that support at least one of the + # specified trip types. + # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] + # Restricts the response to vehicles that have sent location updates to Fleet + # Engine within the specified duration. Stationary vehicles still + # transmitting their locations are not considered stale. If present, must be + # a valid positive duration. + # @param vehicle_type_categories [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category>] + # Required. Restricts the response to vehicles with one of the specified type + # categories. `UNKNOWN` is not allowed. + # @param required_attributes [::Array<::String>] + # Callers can form complex logical operations using any combination of the + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attribute_sets` fields. + # + # `required_attributes` is a list; `required_one_of_attributes` uses a + # message which allows a list of lists. In combination, the two fields allow + # the composition of this expression: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR + # ...) + # AND + # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR + # ...) + # ``` + # + # Restricts the response to vehicles with the specified attributes. This + # field is a conjunction/AND operation. A max of 50 required_attributes is + # allowed. This matches the maximum number of attributes allowed on a + # vehicle. Each repeated string should be of the format "key:value". + # @param required_one_of_attributes [::Array<::String>] + # Restricts the response to vehicles with at least one of the specified + # attributes in each `VehicleAttributeList`. Within each list, a vehicle must + # match at least one of the attributes. This field is an inclusive + # disjunction/OR operation in each `VehicleAttributeList` and a + # conjunction/AND operation across the collection of `VehicleAttributeList`. + # Each repeated string should be of the format + # "key1:value1|key2:value2|key3:value3". + # @param required_one_of_attribute_sets [::Array<::String>] + # `required_one_of_attribute_sets` provides additional functionality. + # + # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` + # uses a message which allows a list of lists, allowing expressions such as + # this one: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # ( + # (required_one_of_attribute_sets[0][0] AND + # required_one_of_attribute_sets[0][1] AND + # ...) + # OR + # (required_one_of_attribute_sets[1][0] AND + # required_one_of_attribute_sets[1][1] AND + # ...) + # ) + # ``` + # + # Restricts the response to vehicles that match all the attributes in a + # `VehicleAttributeList`. Within each list, a vehicle must match all of the + # attributes. This field is a conjunction/AND operation in each + # `VehicleAttributeList` and inclusive disjunction/OR operation across the + # collection of `VehicleAttributeList`. Each repeated string should be of the + # format "key1:value1|key2:value2|key3:value3". + # @param vehicle_state [::Google::Maps::FleetEngine::V1::VehicleState] + # Restricts the response to vehicles that have this vehicle state. + # @param on_trip_only [::Boolean] + # Only return the vehicles with current trip(s). + # @param filter [::String] + # Optional. A filter query to apply when listing vehicles. See + # http://aip.dev/160 for examples of the filter syntax. + # + # This field is designed to replace the `required_attributes`, + # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. + # If a non-empty value is specified here, the following fields must be empty: + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attributes_sets`. + # + # This filter functions as an AND clause with other constraints, + # such as `vehicle_state` or `on_trip_only`. + # + # Note that the only queries supported are on vehicle attributes (for + # example, `attributes. = ` or `attributes. = AND + # attributes. = `). The maximum number of restrictions allowed + # in a filter query is 50. + # + # Also, all attributes are stored as strings, so the only supported + # comparisons against attributes are string comparisons. In order to compare + # against number or boolean values, the values must be explicitly quoted to + # be treated as strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + # @param viewport [::Google::Geo::Type::Viewport, ::Hash] + # Optional. A filter that limits the vehicles returned to those whose last + # known location was in the rectangular area defined by the viewport. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::ListVehiclesRequest.new + # + # # Call the list_vehicles method. + # result = client.list_vehicles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Maps::FleetEngine::V1::Vehicle. + # p item + # end + # + def list_vehicles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ListVehiclesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_vehicles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_vehicles.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_vehicles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.list_vehicles request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @vehicle_service_stub, :list_vehicles, "vehicles", request, result, 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 vehicles that match the request options. + # + # @overload search_vehicles(request, options = nil) + # Pass arguments to `search_vehicles` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::SearchVehiclesRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_vehicles(header: nil, parent: nil, pickup_point: nil, dropoff_point: nil, pickup_radius_meters: nil, count: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_types: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, order_by: nil, include_back_to_back: nil, trip_id: nil, current_trips_present: nil, filter: nil) + # Pass arguments to `search_vehicles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param pickup_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] + # Required. The pickup point to search near. + # @param dropoff_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] + # The customer's intended dropoff location. The field is required if + # `trip_types` contains `TripType.SHARED`. + # @param pickup_radius_meters [::Integer] + # Required. Defines the vehicle search radius around the pickup point. Only + # vehicles within the search radius will be returned. Value must be between + # 400 and 10000 meters (inclusive). + # @param count [::Integer] + # Required. Specifies the maximum number of vehicles to return. The value + # must be between 1 and 50 (inclusive). + # @param minimum_capacity [::Integer] + # Required. Specifies the number of passengers being considered for a trip. + # The value must be greater than or equal to one. The driver is not + # considered in the capacity value. + # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] + # Required. Represents the type of proposed trip. Must include exactly one + # type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only + # those vehicles that can support that trip type. + # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] + # Restricts the search to only those vehicles that have sent location updates + # to Fleet Engine within the specified duration. Stationary vehicles still + # transmitting their locations are not considered stale. If this field is not + # set, the server uses five minutes as the default value. + # @param vehicle_types [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType, ::Hash>] + # Required. Restricts the search to vehicles with one of the specified types. + # At least one vehicle type must be specified. VehicleTypes with a category + # of `UNKNOWN` are not allowed. + # @param required_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] + # Callers can form complex logical operations using any combination of the + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attribute_sets` fields. + # + # `required_attributes` is a list; `required_one_of_attributes` uses a + # message which allows a list of lists. In combination, the two fields allow + # the composition of this expression: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR + # ...) + # AND + # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR + # ...) + # ``` + # + # Restricts the search to only those vehicles with the specified attributes. + # This field is a conjunction/AND operation. A max of 50 required_attributes + # is allowed. This matches the maximum number of attributes allowed on a + # vehicle. + # @param required_one_of_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] + # Restricts the search to only those vehicles with at least one of + # the specified attributes in each `VehicleAttributeList`. Within each + # list, a vehicle must match at least one of the attributes. This field is an + # inclusive disjunction/OR operation in each `VehicleAttributeList` and a + # conjunction/AND operation across the collection of `VehicleAttributeList`. + # @param required_one_of_attribute_sets [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] + # `required_one_of_attribute_sets` provides additional functionality. + # + # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` + # uses a message which allows a list of lists, allowing expressions such as + # this one: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # ( + # (required_one_of_attribute_sets[0][0] AND + # required_one_of_attribute_sets[0][1] AND + # ...) + # OR + # (required_one_of_attribute_sets[1][0] AND + # required_one_of_attribute_sets[1][1] AND + # ...) + # ) + # ``` + # + # Restricts the search to only those vehicles with all the attributes in a + # `VehicleAttributeList`. Within each list, a + # vehicle must match all of the attributes. This field is a conjunction/AND + # operation in each `VehicleAttributeList` and inclusive disjunction/OR + # operation across the collection of `VehicleAttributeList`. + # @param order_by [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] + # Required. Specifies the desired ordering criterion for results. + # @param include_back_to_back [::Boolean] + # This indicates if vehicles with a single active trip are eligible for this + # search. This field is only used when `current_trips_present` is + # unspecified. When `current_trips_present` is unspecified and this field + # is `false`, vehicles with assigned trips are excluded from the search + # results. When `current_trips_present` is unspecified and this field is + # `true`, search results can include vehicles with one active trip that has a + # status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified, + # this field cannot be set to true. + # + # The default value is `false`. + # @param trip_id [::String] + # Indicates the trip associated with this `SearchVehicleRequest`. + # @param current_trips_present [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::CurrentTripsPresent] + # This indicates if vehicles with active trips are eligible for this search. + # This must be set to something other than + # `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`. + # @param filter [::String] + # Optional. A filter query to apply when searching vehicles. See + # http://aip.dev/160 for examples of the filter syntax. + # + # This field is designed to replace the `required_attributes`, + # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. + # If a non-empty value is specified here, the following fields must be empty: + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attributes_sets`. + # + # This filter functions as an AND clause with other constraints, + # such as `minimum_capacity` or `vehicle_types`. + # + # Note that the only queries supported are on vehicle attributes (for + # example, `attributes. = ` or `attributes. = AND + # attributes. = `). The maximum number of restrictions allowed + # in a filter query is 50. + # + # Also, all attributes are stored as strings, so the only supported + # comparisons against attributes are string comparisons. In order to compare + # against number or boolean values, the values must be explicitly quoted to + # be treated as strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new + # + # # Call the search_vehicles method. + # result = client.search_vehicles request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::SearchVehiclesResponse. + # p result + # + def search_vehicles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest + + # Converts hash and nil to an 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_vehicles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_vehicles.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_vehicles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.search_vehicles request, 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 VehicleService REST API. + # + # This class represents the configuration for VehicleService 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::Maps::FleetEngine::V1::VehicleService::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_vehicle to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_vehicle.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_vehicle.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "fleetengine.googleapis.com" + + config_attr :endpoint, nil, ::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 VehicleService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :create_vehicle + ## + # RPC-specific configuration for `get_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :get_vehicle + ## + # RPC-specific configuration for `delete_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_vehicle + ## + # RPC-specific configuration for `update_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vehicle + ## + # RPC-specific configuration for `update_vehicle_attributes` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vehicle_attributes + ## + # RPC-specific configuration for `list_vehicles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_vehicles + ## + # RPC-specific configuration for `search_vehicles` + # @return [::Gapic::Config::Method] + # + attr_reader :search_vehicles + + # @private + def initialize parent_rpcs = nil + create_vehicle_config = parent_rpcs.create_vehicle if parent_rpcs.respond_to? :create_vehicle + @create_vehicle = ::Gapic::Config::Method.new create_vehicle_config + get_vehicle_config = parent_rpcs.get_vehicle if parent_rpcs.respond_to? :get_vehicle + @get_vehicle = ::Gapic::Config::Method.new get_vehicle_config + delete_vehicle_config = parent_rpcs.delete_vehicle if parent_rpcs.respond_to? :delete_vehicle + @delete_vehicle = ::Gapic::Config::Method.new delete_vehicle_config + update_vehicle_config = parent_rpcs.update_vehicle if parent_rpcs.respond_to? :update_vehicle + @update_vehicle = ::Gapic::Config::Method.new update_vehicle_config + update_vehicle_attributes_config = parent_rpcs.update_vehicle_attributes if parent_rpcs.respond_to? :update_vehicle_attributes + @update_vehicle_attributes = ::Gapic::Config::Method.new update_vehicle_attributes_config + list_vehicles_config = parent_rpcs.list_vehicles if parent_rpcs.respond_to? :list_vehicles + @list_vehicles = ::Gapic::Config::Method.new list_vehicles_config + search_vehicles_config = parent_rpcs.search_vehicles if parent_rpcs.respond_to? :search_vehicles + @search_vehicles = ::Gapic::Config::Method.new search_vehicles_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb new file mode 100644 index 000000000000..ab5b0c346f64 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb @@ -0,0 +1,512 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/maps/fleetengine/v1/vehicle_api_pb" + +module Google + module Maps + module FleetEngine + module V1 + module VehicleService + module Rest + ## + # REST service stub for the VehicleService 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_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::CreateVehicleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # A result object deserialized from the server's reply + def create_vehicle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_vehicle_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_vehicle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::Vehicle.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::GetVehicleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # A result object deserialized from the server's reply + def get_vehicle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_vehicle_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_vehicle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::Vehicle.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_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_vehicle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_vehicle_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_vehicle", + 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 update_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # A result object deserialized from the server's reply + def update_vehicle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_vehicle_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_vehicle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::Vehicle.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_vehicle_attributes REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] + # A result object deserialized from the server's reply + def update_vehicle_attributes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_vehicle_attributes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_vehicle_attributes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse.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_vehicles REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::ListVehiclesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::ListVehiclesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::ListVehiclesResponse] + # A result object deserialized from the server's reply + def list_vehicles request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_vehicles_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_vehicles", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::ListVehiclesResponse.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_vehicles REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] + # A result object deserialized from the server's reply + def search_vehicles request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_vehicles_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_vehicles", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse.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_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::CreateVehicleRequest] + # 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_vehicle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/vehicles", + body: "vehicle", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::GetVehicleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_vehicle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_vehicle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest] + # 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_vehicle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1/{name}", + body: "vehicle", + matches: [ + ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_vehicle_attributes REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest] + # 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_vehicle_attributes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:updateAttributes", + body: "*", + matches: [ + ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_vehicles REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::ListVehiclesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_vehicles_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/vehicles", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_vehicles REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest] + # 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_vehicles_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/vehicles:search", + body: "*", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb new file mode 100644 index 000000000000..5f98242dd062 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/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 Maps + module FleetEngine + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb new file mode 100644 index 000000000000..58e92abfb79e --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/v1/fleetengine.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/maps/fleetengine/v1/traffic_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/type/latlng_pb' + + +descriptor_data = "\n,google/maps/fleetengine/v1/fleetengine.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/maps/fleetengine/v1/traffic.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"b\n\x0fTerminalPointId\x12\x16\n\x08place_id\x18\x02 \x01(\tB\x02\x18\x01H\x00\x12\x1a\n\x0cgenerated_id\x18\x03 \x01(\tB\x02\x18\x01H\x00\x12\x11\n\x05value\x18\x04 \x01(\tB\x02\x18\x01:\x02\x18\x01\x42\x04\n\x02Id\"\xf9\x01\n\x10TerminalLocation\x12\'\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12\x43\n\x11terminal_point_id\x18\x02 \x01(\x0b\x32$.maps.fleetengine.v1.TerminalPointIdB\x02\x18\x01\x12\x1b\n\x0f\x61\x63\x63\x65ss_point_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x13\n\x07trip_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x45\n\x16terminal_location_type\x18\x05 \x01(\x0e\x32!.maps.fleetengine.v1.WaypointTypeB\x02\x18\x01\"\xbc\x03\n\x0cTripWaypoint\x12\x37\n\x08location\x18\x01 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x0f\n\x07trip_id\x18\x02 \x01(\t\x12\x38\n\rwaypoint_type\x18\x03 \x01(\x0e\x32!.maps.fleetengine.v1.WaypointType\x12-\n\x10path_to_waypoint\x18\x04 \x03(\x0b\x32\x13.google.type.LatLng\x12 \n\x18\x65ncoded_path_to_waypoint\x18\x05 \x01(\t\x12K\n\x13traffic_to_waypoint\x18\n \x01(\x0b\x32..maps.fleetengine.v1.ConsumableTrafficPolyline\x12\x34\n\x0f\x64istance_meters\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\'\n\x03\x65ta\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x08\x64uration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x8f\x01\n\x10VehicleAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x05 \x01(\x01H\x00\x42\x19\n\x17vehicle_attribute_value\"\x80\x0e\n\x0fVehicleLocation\x12%\n\x08location\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12=\n\x13horizontal_accuracy\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x35\n\x0flatlng_accuracy\x18\x16 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12,\n\x07heading\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12:\n\x10\x62\x65\x61ring_accuracy\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x36\n\x10heading_accuracy\x18\x17 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12.\n\x08\x61ltitude\x18\x05 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12;\n\x11vertical_accuracy\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x37\n\x11\x61ltitude_accuracy\x18\x18 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x33\n\nspeed_kmph\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x02\x18\x01\x12+\n\x05speed\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x34\n\x0espeed_accuracy\x18\x07 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bserver_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0flocation_sensor\x18\x0b \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12\x33\n\x0fis_road_snapped\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12>\n\x15is_gps_sensor_enabled\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x04\x12;\n\x11time_since_update\x18\x0e \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12=\n\x11num_stale_updates\x18\x0f \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x05\x18\x01\xe0\x41\x04\x12)\n\x0craw_location\x18\x10 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x11raw_location_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x13raw_location_sensor\x18\x1c \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12;\n\x15raw_location_accuracy\x18\x19 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12)\n\x0c\x66lp_location\x18\x1d \x01(\x0b\x32\x13.google.type.LatLng\x12\x33\n\x0f\x66lp_update_time\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x1a\x66lp_latlng_accuracy_meters\x18\x1f \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x38\n\x13\x66lp_heading_degrees\x18 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x32\n\x15supplemental_location\x18\x12 \x01(\x0b\x32\x13.google.type.LatLng\x12>\n\x1asupplemental_location_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x1csupplemental_location_sensor\x18\x14 \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12\x44\n\x1esupplemental_location_accuracy\x18\x15 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x18\n\x0croad_snapped\x18\x1a \x01(\x08\x42\x02\x18\x01\"z\n\rTripAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x04 \x01(\x01H\x00\x42\x16\n\x14trip_attribute_value*<\n\x08TripType\x12\x15\n\x11UNKNOWN_TRIP_TYPE\x10\x00\x12\n\n\x06SHARED\x10\x01\x12\r\n\tEXCLUSIVE\x10\x02*\x8b\x01\n\x0cWaypointType\x12\x19\n\x15UNKNOWN_WAYPOINT_TYPE\x10\x00\x12\x18\n\x14PICKUP_WAYPOINT_TYPE\x10\x01\x12\x1a\n\x16\x44ROP_OFF_WAYPOINT_TYPE\x10\x02\x12*\n&INTERMEDIATE_DESTINATION_WAYPOINT_TYPE\x10\x03*_\n\x12PolylineFormatType\x12\x17\n\x13UNKNOWN_FORMAT_TYPE\x10\x00\x12\x15\n\x11LAT_LNG_LIST_TYPE\x10\x01\x12\x19\n\x15\x45NCODED_POLYLINE_TYPE\x10\x02*\x89\x01\n\x10NavigationStatus\x12\x1d\n\x19UNKNOWN_NAVIGATION_STATUS\x10\x00\x12\x0f\n\x0bNO_GUIDANCE\x10\x01\x12\x1a\n\x16\x45NROUTE_TO_DESTINATION\x10\x02\x12\r\n\tOFF_ROUTE\x10\x03\x12\x1a\n\x16\x41RRIVED_AT_DESTINATION\x10\x04*\xd7\x01\n\x0eLocationSensor\x12\x12\n\x0eUNKNOWN_SENSOR\x10\x00\x12\x07\n\x03GPS\x10\x01\x12\x0b\n\x07NETWORK\x10\x02\x12\x0b\n\x07PASSIVE\x10\x03\x12\"\n\x1eROAD_SNAPPED_LOCATION_PROVIDER\x10\x04\x12\x1e\n\x1a\x43USTOMER_SUPPLIED_LOCATION\x10\x05\x12\x19\n\x15\x46LEET_ENGINE_LOCATION\x10\x06\x12\x1b\n\x17\x46USED_LOCATION_PROVIDER\x10\x64\x12\x12\n\rCORE_LOCATION\x10\xc8\x01\x42\xd7\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x0b\x46leetEngineP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module V1 + TerminalPointId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TerminalPointId").msgclass + TerminalLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TerminalLocation").msgclass + TripWaypoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripWaypoint").msgclass + VehicleAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleAttribute").msgclass + VehicleLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleLocation").msgclass + TripAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripAttribute").msgclass + TripType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripType").enummodule + WaypointType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.WaypointType").enummodule + PolylineFormatType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.PolylineFormatType").enummodule + NavigationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.NavigationStatus").enummodule + LocationSensor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.LocationSensor").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb new file mode 100644 index 000000000000..3f8cd27dcedb --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/v1/header.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n\'google/maps/fleetengine/v1/header.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\"\x86\x04\n\rRequestHeader\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0bsdk_version\x18\x03 \x01(\t\x12\x12\n\nos_version\x18\x04 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x05 \x01(\t\x12<\n\x08sdk_type\x18\x06 \x01(\x0e\x32*.maps.fleetengine.v1.RequestHeader.SdkType\x12\x18\n\x10maps_sdk_version\x18\x07 \x01(\t\x12\x17\n\x0fnav_sdk_version\x18\x08 \x01(\t\x12=\n\x08platform\x18\t \x01(\x0e\x32+.maps.fleetengine.v1.RequestHeader.Platform\x12\x14\n\x0cmanufacturer\x18\n \x01(\t\x12\x19\n\x11\x61ndroid_api_level\x18\x0b \x01(\x05\x12\x10\n\x08trace_id\x18\x0c \x01(\t\"M\n\x07SdkType\x12\x18\n\x14SDK_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43ONSUMER\x10\x01\x12\n\n\x06\x44RIVER\x10\x02\x12\x0e\n\nJAVASCRIPT\x10\x03\"C\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41NDROID\x10\x01\x12\x07\n\x03IOS\x10\x02\x12\x07\n\x03WEB\x10\x03\x42\xd3\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x07HeadersP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module V1 + RequestHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.RequestHeader").msgclass + RequestHeader::SdkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.RequestHeader.SdkType").enummodule + RequestHeader::Platform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.RequestHeader.Platform").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb new file mode 100644 index 000000000000..14bfe0f2b53b --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/v1/traffic.proto + +require 'google/protobuf' + + +descriptor_data = "\n(google/maps/fleetengine/v1/traffic.proto\x12\x13maps.fleetengine.v1\"\xe3\x01\n\x14SpeedReadingInterval\x12\"\n\x1astart_polyline_point_index\x18\x01 \x01(\x05\x12 \n\x18\x65nd_polyline_point_index\x18\x02 \x01(\x05\x12>\n\x05speed\x18\x03 \x01(\x0e\x32/.maps.fleetengine.v1.SpeedReadingInterval.Speed\"E\n\x05Speed\x12\x15\n\x11SPEED_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x08\n\x04SLOW\x10\x02\x12\x0f\n\x0bTRAFFIC_JAM\x10\x03\"\x88\x01\n\x19\x43onsumableTrafficPolyline\x12I\n\x16speed_reading_interval\x18\x01 \x03(\x0b\x32).maps.fleetengine.v1.SpeedReadingInterval\x12 \n\x18\x65ncoded_path_to_waypoint\x18\x02 \x01(\tB\xd8\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x0cTrafficProtoP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module V1 + SpeedReadingInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SpeedReadingInterval").msgclass + SpeedReadingInterval::Speed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SpeedReadingInterval.Speed").enummodule + ConsumableTrafficPolyline = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ConsumableTrafficPolyline").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb new file mode 100644 index 000000000000..eb001c21ef19 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/v1/trip_api.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/api/routing_pb' +require 'google/maps/fleetengine/v1/fleetengine_pb' +require 'google/maps/fleetengine/v1/header_pb' +require 'google/maps/fleetengine/v1/trips_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/maps/fleetengine/v1/trip_api.proto\x12\x13maps.fleetengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\'google/maps/fleetengine/v1/header.proto\x1a&google/maps/fleetengine/v1/trips.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\x01\n\x11\x43reateTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x37\n\x06parent\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\x12\x14\n\x07trip_id\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12,\n\x04trip\x18\x04 \x01(\x0b\x32\x19.maps.fleetengine.v1.TripB\x03\xe0\x41\x02\"\x86\x04\n\x0eGetTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x35\n\x04name\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\x12+\n\x04view\x18\x0b \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripView\x12\x41\n\x1d\x63urrent_route_segment_version\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x1bremaining_waypoints_version\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x42\n\x11route_format_type\x18\x08 \x01(\x0e\x32\'.maps.fleetengine.v1.PolylineFormatType\x12I\n%current_route_segment_traffic_version\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n!remaining_waypoints_route_version\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x83\x01\n\x11\x44\x65leteTripRequest\x12\x37\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeaderB\x03\xe0\x41\x01\x12\x35\n\x04name\x18\x02 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\"\xcd\x02\n\x19ReportBillableTripRequest\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63ountry_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12@\n\x08platform\x18\x05 \x01(\x0e\x32..maps.fleetengine.v1.BillingPlatformIdentifier\x12\x13\n\x0brelated_ids\x18\x06 \x03(\t\x12R\n\rsolution_type\x18\x07 \x01(\x0e\x32;.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType\"W\n\x0cSolutionType\x12\x1d\n\x19SOLUTION_TYPE_UNSPECIFIED\x10\x00\x12(\n$ON_DEMAND_RIDESHARING_AND_DELIVERIES\x10\x01\"\xbe\x01\n\x11UpdateTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12,\n\x04trip\x18\x04 \x01(\x0b\x32\x19.maps.fleetengine.v1.TripB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xe9\x01\n\x12SearchTripsRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nvehicle_id\x18\x04 \x01(\t\x12\x19\n\x11\x61\x63tive_trips_only\x18\x05 \x01(\x08\x12\x11\n\tpage_size\x18\x06 \x01(\x05\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x34\n\x11minimum_staleness\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\"X\n\x13SearchTripsResponse\x12(\n\x05trips\x18\x01 \x03(\x0b\x32\x19.maps.fleetengine.v1.Trip\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf7\x08\n\x0bTripService\x12\xa8\x01\n\nCreateTrip\x12&.maps.fleetengine.v1.CreateTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"W\x82\xd3\xe4\x93\x02&\"\x1e/v1/{parent=providers/*}/trips:\x04trip\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\x9a\x01\n\x07GetTrip\x12#.maps.fleetengine.v1.GetTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"O\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=providers/*/trips/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xa4\x01\n\nDeleteTrip\x12&.maps.fleetengine.v1.DeleteTripRequest\x1a\x16.google.protobuf.Empty\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=providers/*/trips/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xbf\x01\n\x12ReportBillableTrip\x12..maps.fleetengine.v1.ReportBillableTripRequest\x1a\x16.google.protobuf.Empty\"a\x82\xd3\xe4\x93\x02\x32\"-/v1/{name=providers/*/billableTrips/*}:report:\x01*\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xbd\x01\n\x0bSearchTrips\x12\'.maps.fleetengine.v1.SearchTripsRequest\x1a(.maps.fleetengine.v1.SearchTripsResponse\"[\x82\xd3\xe4\x93\x02*\"%/v1/{parent=providers/*}/trips:search:\x01*\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xa6\x01\n\nUpdateTrip\x12&.maps.fleetengine.v1.UpdateTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"U\x82\xd3\xe4\x93\x02&\x1a\x1e/v1/{name=providers/*/trips/*}:\x04trip\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x1aN\xca\x41\x1a\x66leetengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd3\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x07TripApiP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module V1 + CreateTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.CreateTripRequest").msgclass + GetTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.GetTripRequest").msgclass + DeleteTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.DeleteTripRequest").msgclass + ReportBillableTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ReportBillableTripRequest").msgclass + ReportBillableTripRequest::SolutionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ReportBillableTripRequest.SolutionType").enummodule + UpdateTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateTripRequest").msgclass + SearchTripsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchTripsRequest").msgclass + SearchTripsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchTripsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb new file mode 100644 index 000000000000..39026e91ba88 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/maps/fleetengine/v1/trip_api.proto for package 'Google.Maps.FleetEngine.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/maps/fleetengine/v1/trip_api_pb' + +module Google + module Maps + module FleetEngine + module V1 + module TripService + # Trip management service. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'maps.fleetengine.v1.TripService' + + # Creates a trip in the Fleet Engine and returns the new trip. + rpc :CreateTrip, ::Google::Maps::FleetEngine::V1::CreateTripRequest, ::Google::Maps::FleetEngine::V1::Trip + # Get information about a single trip. + rpc :GetTrip, ::Google::Maps::FleetEngine::V1::GetTripRequest, ::Google::Maps::FleetEngine::V1::Trip + # Deletes a single Trip. + # + # Returns FAILED_PRECONDITION if the Trip is active and assigned to a + # vehicle. + rpc :DeleteTrip, ::Google::Maps::FleetEngine::V1::DeleteTripRequest, ::Google::Protobuf::Empty + # Report billable trip usage. + rpc :ReportBillableTrip, ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, ::Google::Protobuf::Empty + # Get all the trips for a specific vehicle. + rpc :SearchTrips, ::Google::Maps::FleetEngine::V1::SearchTripsRequest, ::Google::Maps::FleetEngine::V1::SearchTripsResponse + # Updates trip data. + rpc :UpdateTrip, ::Google::Maps::FleetEngine::V1::UpdateTripRequest, ::Google::Maps::FleetEngine::V1::Trip + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb new file mode 100644 index 000000000000..2aea61330c0f --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/v1/trips.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/maps/fleetengine/v1/fleetengine_pb' +require 'google/maps/fleetengine/v1/traffic_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/type/latlng_pb' + + +descriptor_data = "\n&google/maps/fleetengine/v1/trips.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a(google/maps/fleetengine/v1/traffic.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xef\x10\n\x04Trip\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\nvehicle_id\x18\x02 \x01(\t\x12\x34\n\x0btrip_status\x18\x03 \x01(\x0e\x32\x1f.maps.fleetengine.v1.TripStatus\x12\x30\n\ttrip_type\x18\x04 \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12;\n\x0cpickup_point\x18\x05 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x43\n\x13\x61\x63tual_pickup_point\x18\x16 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12K\n\x1b\x61\x63tual_pickup_arrival_point\x18 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12\x34\n\x0bpickup_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x19intermediate_destinations\x18\x0e \x03(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x45\n!intermediate_destinations_version\x18\x19 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12&\n\x1eintermediate_destination_index\x18\x0f \x01(\x05\x12^\n.actual_intermediate_destination_arrival_points\x18! \x03(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12P\n actual_intermediate_destinations\x18\" \x03(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12<\n\rdropoff_point\x18\x07 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x44\n\x14\x61\x63tual_dropoff_point\x18\x17 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12\x35\n\x0c\x64ropoff_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x13remaining_waypoints\x18\x10 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypointB\x03\xe0\x41\x03\x12<\n\x11vehicle_waypoints\x18\x14 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12\'\n\x05route\x18\t \x03(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x03\x12\"\n\x15\x63urrent_route_segment\x18\x15 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x1d\x63urrent_route_segment_version\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Z\n\x1d\x63urrent_route_segment_traffic\x18\x1c \x01(\x0b\x32..maps.fleetengine.v1.ConsumableTrafficPolylineB\x03\xe0\x41\x03\x12N\n%current_route_segment_traffic_version\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x1f\x63urrent_route_segment_end_point\x18\x18 \x01(\x0b\x32!.maps.fleetengine.v1.TripWaypointB\x03\xe0\x41\x03\x12\x43\n\x19remaining_distance_meters\x18\x0c \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x03\x12>\n\x15\x65ta_to_first_waypoint\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n remaining_time_to_first_waypoint\x18\x1b \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x44\n\x1bremaining_waypoints_version\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n!remaining_waypoints_route_version\x18\x1d \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12!\n\x14number_of_passengers\x18\n \x01(\x05\x42\x03\xe0\x41\x05\x12@\n\rlast_location\x18\x0b \x01(\x0b\x32$.maps.fleetengine.v1.VehicleLocationB\x03\xe0\x41\x03\x12$\n\x17last_location_snappable\x18\x1a \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\x04view\x18\x1f \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripView\x12\x36\n\nattributes\x18# \x03(\x0b\x32\".maps.fleetengine.v1.TripAttribute:G\xea\x41\x44\n\x1f\x66leetengine.googleapis.com/Trip\x12!providers/{provider}/trips/{trip}\"\x9c\x01\n\x0cStopLocation\x12\'\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\tstop_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x04*\xe2\x01\n\nTripStatus\x12\x17\n\x13UNKNOWN_TRIP_STATUS\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x15\n\x11\x45NROUTE_TO_PICKUP\x10\x02\x12\x15\n\x11\x41RRIVED_AT_PICKUP\x10\x03\x12\'\n#ARRIVED_AT_INTERMEDIATE_DESTINATION\x10\x07\x12\'\n#ENROUTE_TO_INTERMEDIATE_DESTINATION\x10\x08\x12\x16\n\x12\x45NROUTE_TO_DROPOFF\x10\x04\x12\x0c\n\x08\x43OMPLETE\x10\x05\x12\x0c\n\x08\x43\x41NCELED\x10\x06*\x7f\n\x19\x42illingPlatformIdentifier\x12+\n\'BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED\x10\x00\x12\n\n\x06SERVER\x10\x01\x12\x07\n\x03WEB\x10\x02\x12\x0b\n\x07\x41NDROID\x10\x03\x12\x07\n\x03IOS\x10\x04\x12\n\n\x06OTHERS\x10\x05*G\n\x08TripView\x12\x19\n\x15TRIP_VIEW_UNSPECIFIED\x10\x00\x12\x07\n\x03SDK\x10\x01\x12\x17\n\x13JOURNEY_SHARING_V1S\x10\x02\x42\xd1\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x05TripsP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module V1 + Trip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Trip").msgclass + StopLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.StopLocation").msgclass + TripStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripStatus").enummodule + BillingPlatformIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.BillingPlatformIdentifier").enummodule + TripView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb new file mode 100644 index 000000000000..4a1949b764b4 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/v1/vehicle_api.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/api/routing_pb' +require 'google/geo/type/viewport_pb' +require 'google/maps/fleetengine/v1/fleetengine_pb' +require 'google/maps/fleetengine/v1/header_pb' +require 'google/maps/fleetengine/v1/vehicles_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/type/latlng_pb' + + +descriptor_data = "\n,google/maps/fleetengine/v1/vehicle_api.proto\x12\x13maps.fleetengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1egoogle/geo/type/viewport.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\'google/maps/fleetengine/v1/header.proto\x1a)google/maps/fleetengine/v1/vehicles.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xac\x01\n\x14\x43reateVehicleRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nvehicle_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x32\n\x07vehicle\x18\x05 \x01(\x0b\x32\x1c.maps.fleetengine.v1.VehicleB\x03\xe0\x41\x02\"\xfb\x01\n\x11GetVehicleRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x38\n\x04name\x18\x03 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"fleetengine.googleapis.com/Vehicle\x12\x41\n\x1d\x63urrent_route_segment_version\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11waypoints_version\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x89\x01\n\x14\x44\x65leteVehicleRequest\x12\x37\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeaderB\x03\xe0\x41\x01\x12\x38\n\x04name\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"fleetengine.googleapis.com/Vehicle\"\xc7\x01\n\x14UpdateVehicleRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x32\n\x07vehicle\x18\x04 \x01(\x0b\x32\x1c.maps.fleetengine.v1.VehicleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xa7\x01\n\x1eUpdateVehicleAttributesRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12>\n\nattributes\x18\x04 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttributeB\x03\xe0\x41\x02\"a\n\x1fUpdateVehicleAttributesResponse\x12>\n\nattributes\x18\x01 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttributeB\x03\xe0\x41\x02\"\xc6\t\n\x15SearchVehiclesRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0cpickup_point\x18\x04 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocationB\x03\xe0\x41\x02\x12<\n\rdropoff_point\x18\x05 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12!\n\x14pickup_radius_meters\x18\x06 \x01(\x05\x42\x03\xe0\x41\x02\x12\x12\n\x05\x63ount\x18\x07 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1d\n\x10minimum_capacity\x18\x08 \x01(\x05\x42\x03\xe0\x41\x02\x12\x36\n\ntrip_types\x18\t \x03(\x0e\x32\x1d.maps.fleetengine.v1.TripTypeB\x03\xe0\x41\x02\x12\x34\n\x11maximum_staleness\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x44\n\rvehicle_types\x18\x0e \x03(\x0b\x32(.maps.fleetengine.v1.Vehicle.VehicleTypeB\x03\xe0\x41\x02\x12\x42\n\x13required_attributes\x18\x0c \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttribute\x12M\n\x1arequired_one_of_attributes\x18\x0f \x03(\x0b\x32).maps.fleetengine.v1.VehicleAttributeList\x12Q\n\x1erequired_one_of_attribute_sets\x18\x14 \x03(\x0b\x32).maps.fleetengine.v1.VehicleAttributeList\x12S\n\x08order_by\x18\r \x01(\x0e\x32<.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrderB\x03\xe0\x41\x02\x12\x1c\n\x14include_back_to_back\x18\x12 \x01(\x08\x12\x0f\n\x07trip_id\x18\x13 \x01(\t\x12]\n\x15\x63urrent_trips_present\x18\x15 \x01(\x0e\x32>.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent\x12\x13\n\x06\x66ilter\x18\x16 \x01(\tB\x03\xe0\x41\x01\"\xaa\x01\n\x11VehicleMatchOrder\x12\x1f\n\x1bUNKNOWN_VEHICLE_MATCH_ORDER\x10\x00\x12\x14\n\x10PICKUP_POINT_ETA\x10\x01\x12\x19\n\x15PICKUP_POINT_DISTANCE\x10\x02\x12\x15\n\x11\x44ROPOFF_POINT_ETA\x10\x03\x12\"\n\x1ePICKUP_POINT_STRAIGHT_DISTANCE\x10\x04\x12\x08\n\x04\x43OST\x10\x05\"O\n\x13\x43urrentTripsPresent\x12%\n!CURRENT_TRIPS_PRESENT_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x07\n\x03\x41NY\x10\x02\"L\n\x16SearchVehiclesResponse\x12\x32\n\x07matches\x18\x01 \x03(\x0b\x32!.maps.fleetengine.v1.VehicleMatch\"\xfe\x04\n\x13ListVehiclesRequest\x12\x32\n\x06header\x18\x0c \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x35\n\x10minimum_capacity\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x31\n\ntrip_types\x18\x07 \x03(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12\x34\n\x11maximum_staleness\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12W\n\x17vehicle_type_categories\x18\t \x03(\x0e\x32\x31.maps.fleetengine.v1.Vehicle.VehicleType.CategoryB\x03\xe0\x41\x02\x12\x1b\n\x13required_attributes\x18\n \x03(\t\x12\"\n\x1arequired_one_of_attributes\x18\r \x03(\t\x12&\n\x1erequired_one_of_attribute_sets\x18\x0f \x03(\t\x12\x38\n\rvehicle_state\x18\x0b \x01(\x0e\x32!.maps.fleetengine.v1.VehicleState\x12\x14\n\x0con_trip_only\x18\x0e \x01(\x08\x12\x13\n\x06\x66ilter\x18\x10 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x08viewport\x18\x11 \x01(\x0b\x32\x19.google.geo.type.ViewportB\x03\xe0\x41\x01\"x\n\x14ListVehiclesResponse\x12.\n\x08vehicles\x18\x01 \x03(\x0b\x32\x1c.maps.fleetengine.v1.Vehicle\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x17\n\ntotal_size\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02\"Y\n\x08Waypoint\x12$\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12\'\n\x03\x65ta\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xfe\x06\n\x0cVehicleMatch\x12\x32\n\x07vehicle\x18\x01 \x01(\x0b\x32\x1c.maps.fleetengine.v1.VehicleB\x03\xe0\x41\x02\x12\x36\n\x12vehicle_pickup_eta\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x1evehicle_pickup_distance_meters\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12V\n,vehicle_pickup_straight_line_distance_meters\x18\x0b \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x02\x12\x37\n\x13vehicle_dropoff_eta\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n)vehicle_pickup_to_dropoff_distance_meters\x18\x05 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x35\n\ttrip_type\x18\x06 \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripTypeB\x03\xe0\x41\x02\x12>\n\x17vehicle_trips_waypoints\x18\x07 \x03(\x0b\x32\x1d.maps.fleetengine.v1.Waypoint\x12N\n\x12vehicle_match_type\x18\x08 \x01(\x0e\x32\x32.maps.fleetengine.v1.VehicleMatch.VehicleMatchType\x12Z\n\x14requested_ordered_by\x18\t \x01(\x0e\x32<.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder\x12P\n\nordered_by\x18\n \x01(\x0e\x32<.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder\"g\n\x10VehicleMatchType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tEXCLUSIVE\x10\x01\x12\x10\n\x0c\x42\x41\x43K_TO_BACK\x10\x02\x12\x0b\n\x07\x43\x41RPOOL\x10\x03\x12\x18\n\x14\x43\x41RPOOL_BACK_TO_BACK\x10\x04\"Q\n\x14VehicleAttributeList\x12\x39\n\nattributes\x18\x01 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttribute2\xa2\x0b\n\x0eVehicleService\x12\xb7\x01\n\rCreateVehicle\x12).maps.fleetengine.v1.CreateVehicleRequest\x1a\x1c.maps.fleetengine.v1.Vehicle\"]\x82\xd3\xe4\x93\x02,\"!/v1/{parent=providers/*}/vehicles:\x07vehicle\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xa6\x01\n\nGetVehicle\x12&.maps.fleetengine.v1.GetVehicleRequest\x1a\x1c.maps.fleetengine.v1.Vehicle\"R\x82\xd3\xe4\x93\x02#\x12!/v1/{name=providers/*/vehicles/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xad\x01\n\rDeleteVehicle\x12).maps.fleetengine.v1.DeleteVehicleRequest\x1a\x16.google.protobuf.Empty\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02#*!/v1/{name=providers/*/vehicles/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xb5\x01\n\rUpdateVehicle\x12).maps.fleetengine.v1.UpdateVehicleRequest\x1a\x1c.maps.fleetengine.v1.Vehicle\"[\x82\xd3\xe4\x93\x02,\x1a!/v1/{name=providers/*/vehicles/*}:\x07vehicle\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xec\x01\n\x17UpdateVehicleAttributes\x12\x33.maps.fleetengine.v1.UpdateVehicleAttributesRequest\x1a\x34.maps.fleetengine.v1.UpdateVehicleAttributesResponse\"f\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=providers/*/vehicles/*}:updateAttributes:\x01*\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xb9\x01\n\x0cListVehicles\x12(.maps.fleetengine.v1.ListVehiclesRequest\x1a).maps.fleetengine.v1.ListVehiclesResponse\"T\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=providers/*}/vehicles\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xc9\x01\n\x0eSearchVehicles\x12*.maps.fleetengine.v1.SearchVehiclesRequest\x1a+.maps.fleetengine.v1.SearchVehiclesResponse\"^\x82\xd3\xe4\x93\x02-\"(/v1/{parent=providers/*}/vehicles:search:\x01*\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x1aN\xca\x41\x1a\x66leetengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd6\x01\n\x1e\x63om.google.maps.fleetengine.v1B\nVehicleApiP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module V1 + CreateVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.CreateVehicleRequest").msgclass + GetVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.GetVehicleRequest").msgclass + DeleteVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.DeleteVehicleRequest").msgclass + UpdateVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateVehicleRequest").msgclass + UpdateVehicleAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateVehicleAttributesRequest").msgclass + UpdateVehicleAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateVehicleAttributesResponse").msgclass + SearchVehiclesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesRequest").msgclass + SearchVehiclesRequest::VehicleMatchOrder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder").enummodule + SearchVehiclesRequest::CurrentTripsPresent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent").enummodule + SearchVehiclesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesResponse").msgclass + ListVehiclesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ListVehiclesRequest").msgclass + ListVehiclesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ListVehiclesResponse").msgclass + Waypoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Waypoint").msgclass + VehicleMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleMatch").msgclass + VehicleMatch::VehicleMatchType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleMatch.VehicleMatchType").enummodule + VehicleAttributeList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleAttributeList").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb new file mode 100644 index 000000000000..31ee1908cafc --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb @@ -0,0 +1,108 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/maps/fleetengine/v1/vehicle_api.proto for package 'Google.Maps.FleetEngine.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/maps/fleetengine/v1/vehicle_api_pb' + +module Google + module Maps + module FleetEngine + module V1 + module VehicleService + # Vehicle management service. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'maps.fleetengine.v1.VehicleService' + + # Instantiates a new vehicle associated with an on-demand rideshare or + # deliveries provider. Each `Vehicle` must have a unique vehicle ID. + # + # The following `Vehicle` fields are required when creating a `Vehicle`: + # + # * `vehicleState` + # * `supportedTripTypes` + # * `maximumCapacity` + # * `vehicleType` + # + # The following `Vehicle` fields are ignored when creating a `Vehicle`: + # + # * `name` + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_version` + # * `current_route_segment_traffic` + # * `route` + # * `waypoints` + # * `waypoints_version` + # * `remaining_distance_meters` + # * `remaining_time_seconds` + # * `eta_to_next_waypoint` + # * `navigation_status` + # + # All other fields are optional and used if provided. + rpc :CreateVehicle, ::Google::Maps::FleetEngine::V1::CreateVehicleRequest, ::Google::Maps::FleetEngine::V1::Vehicle + # Returns a vehicle from the Fleet Engine. + rpc :GetVehicle, ::Google::Maps::FleetEngine::V1::GetVehicleRequest, ::Google::Maps::FleetEngine::V1::Vehicle + # Deletes a Vehicle from the Fleet Engine. + # + # Returns FAILED_PRECONDITION if the Vehicle has active Trips. + # assigned to it. + rpc :DeleteVehicle, ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, ::Google::Protobuf::Empty + # Writes updated vehicle data to the Fleet Engine. + # + # When updating a `Vehicle`, the following fields cannot be updated since + # they are managed by the server: + # + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment_version` + # * `waypoints_version` + # + # The vehicle `name` also cannot be updated. + # + # If the `attributes` field is updated, **all** the vehicle's attributes are + # replaced with the attributes provided in the request. If you want to update + # only some attributes, see the `UpdateVehicleAttributes` method. Likewise, + # the `waypoints` field can be updated, but must contain all the waypoints + # currently on the vehicle, and no other waypoints. + rpc :UpdateVehicle, ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, ::Google::Maps::FleetEngine::V1::Vehicle + # Partially updates a vehicle's attributes. + # Only the attributes mentioned in the request will be updated, other + # attributes will NOT be altered. Note: this is different in `UpdateVehicle`, + # where the whole `attributes` field will be replaced by the one in + # `UpdateVehicleRequest`, attributes not in the request would be removed. + rpc :UpdateVehicleAttributes, ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse + # Returns a paginated list of vehicles associated with + # a provider that match the request options. + rpc :ListVehicles, ::Google::Maps::FleetEngine::V1::ListVehiclesRequest, ::Google::Maps::FleetEngine::V1::ListVehiclesResponse + # Returns a list of vehicles that match the request options. + rpc :SearchVehicles, ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb new file mode 100644 index 000000000000..91a8f67ad59d --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/v1/vehicles.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/maps/fleetengine/v1/fleetengine_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n)google/maps/fleetengine/v1/vehicles.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xa5\x0c\n\x07Vehicle\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x38\n\rvehicle_state\x18\x02 \x01(\x0e\x32!.maps.fleetengine.v1.VehicleState\x12;\n\x14supported_trip_types\x18\x03 \x03(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12\x1a\n\rcurrent_trips\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12;\n\rlast_location\x18\x05 \x01(\x0b\x32$.maps.fleetengine.v1.VehicleLocation\x12\x41\n\x0epast_locations\x18\x1e \x03(\x0b\x32$.maps.fleetengine.v1.VehicleLocationB\x03\xe0\x41\x04\x12\x18\n\x10maximum_capacity\x18\x06 \x01(\x05\x12\x39\n\nattributes\x18\x08 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttribute\x12\x43\n\x0cvehicle_type\x18\t \x01(\x0b\x32(.maps.fleetengine.v1.Vehicle.VehicleTypeB\x03\xe0\x41\x02\x12\x38\n\rlicense_plate\x18\n \x01(\x0b\x32!.maps.fleetengine.v1.LicensePlate\x12\x38\n\x05route\x18\x0c \x03(\x0b\x32%.maps.fleetengine.v1.TerminalLocationB\x02\x18\x01\x12\x1d\n\x15\x63urrent_route_segment\x18\x14 \x01(\t\x12T\n\x1d\x63urrent_route_segment_traffic\x18\x1c \x01(\x0b\x32(.maps.fleetengine.v1.TrafficPolylineDataB\x03\xe0\x41\x04\x12\x46\n\x1d\x63urrent_route_segment_version\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x1f\x63urrent_route_segment_end_point\x18\x18 \x01(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12>\n\x19remaining_distance_meters\x18\x12 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x39\n\x15\x65ta_to_first_waypoint\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x16remaining_time_seconds\x18\x19 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12\x34\n\twaypoints\x18\x16 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12:\n\x11waypoints_version\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x14\x62\x61\x63k_to_back_enabled\x18\x17 \x01(\x08\x12@\n\x11navigation_status\x18\x1a \x01(\x0e\x32%.maps.fleetengine.v1.NavigationStatus\x12\x41\n\x0f\x64\x65vice_settings\x18\x1b \x01(\x0b\x32#.maps.fleetengine.v1.DeviceSettingsB\x03\xe0\x41\x04\x1a\xb8\x01\n\x0bVehicleType\x12\x43\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32\x31.maps.fleetengine.v1.Vehicle.VehicleType.Category\"d\n\x08\x43\x61tegory\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x08\n\x04TAXI\x10\x02\x12\t\n\x05TRUCK\x10\x03\x12\x0f\n\x0bTWO_WHEELER\x10\x04\x12\x0b\n\x07\x42ICYCLE\x10\x05\x12\x0e\n\nPEDESTRIAN\x10\x06:P\xea\x41M\n\"fleetengine.googleapis.com/Vehicle\x12\'providers/{provider}/vehicles/{vehicle}\"\x9d\x01\n\x0b\x42\x61tteryInfo\x12:\n\x0e\x62\x61ttery_status\x18\x01 \x01(\x0e\x32\".maps.fleetengine.v1.BatteryStatus\x12\x36\n\x0cpower_source\x18\x02 \x01(\x0e\x32 .maps.fleetengine.v1.PowerSource\x12\x1a\n\x12\x62\x61ttery_percentage\x18\x03 \x01(\x02\"\xca\x01\n\x0e\x44\x65viceSettings\x12L\n\x18location_power_save_mode\x18\x01 \x01(\x0e\x32*.maps.fleetengine.v1.LocationPowerSaveMode\x12\x1a\n\x12is_power_save_mode\x18\x02 \x01(\x08\x12\x16\n\x0eis_interactive\x18\x03 \x01(\x08\x12\x36\n\x0c\x62\x61ttery_info\x18\x04 \x01(\x0b\x32 .maps.fleetengine.v1.BatteryInfo\"A\n\x0cLicensePlate\x12\x19\n\x0c\x63ountry_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x0elast_character\x18\x02 \x01(\t\"\xf6\x02\n$VisualTrafficReportPolylineRendering\x12`\n\x0croad_stretch\x18\x01 \x03(\x0b\x32\x45.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretchB\x03\xe0\x41\x01\x1a\xeb\x01\n\x0bRoadStretch\x12_\n\x05style\x18\x01 \x01(\x0e\x32K.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch.StyleB\x03\xe0\x41\x02\x12\x1a\n\roffset_meters\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1a\n\rlength_meters\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"C\n\x05Style\x12\x15\n\x11STYLE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSLOWER_TRAFFIC\x10\x01\x12\x0f\n\x0bTRAFFIC_JAM\x10\x02\"k\n\x13TrafficPolylineData\x12T\n\x11traffic_rendering\x18\x01 \x01(\x0b\x32\x39.maps.fleetengine.v1.VisualTrafficReportPolylineRendering*B\n\x0cVehicleState\x12\x19\n\x15UNKNOWN_VEHICLE_STATE\x10\x00\x12\x0b\n\x07OFFLINE\x10\x01\x12\n\n\x06ONLINE\x10\x02*\x92\x02\n\x15LocationPowerSaveMode\x12$\n UNKNOWN_LOCATION_POWER_SAVE_MODE\x10\x00\x12\x1b\n\x17LOCATION_MODE_NO_CHANGE\x10\x01\x12.\n*LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF\x10\x02\x12.\n*LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF\x10\x03\x12!\n\x1dLOCATION_MODE_FOREGROUND_ONLY\x10\x04\x12\x33\n/LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF\x10\x05*\xc0\x01\n\rBatteryStatus\x12\x1a\n\x16UNKNOWN_BATTERY_STATUS\x10\x00\x12\x1b\n\x17\x42\x41TTERY_STATUS_CHARGING\x10\x01\x12\x1e\n\x1a\x42\x41TTERY_STATUS_DISCHARGING\x10\x02\x12\x17\n\x13\x42\x41TTERY_STATUS_FULL\x10\x03\x12\x1f\n\x1b\x42\x41TTERY_STATUS_NOT_CHARGING\x10\x04\x12\x1c\n\x18\x42\x41TTERY_STATUS_POWER_LOW\x10\x05*\x89\x01\n\x0bPowerSource\x12\x18\n\x14UNKNOWN_POWER_SOURCE\x10\x00\x12\x13\n\x0fPOWER_SOURCE_AC\x10\x01\x12\x14\n\x10POWER_SOURCE_USB\x10\x02\x12\x19\n\x15POWER_SOURCE_WIRELESS\x10\x03\x12\x1a\n\x16POWER_SOURCE_UNPLUGGED\x10\x04\x42\xd4\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x08VehiclesP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module V1 + Vehicle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Vehicle").msgclass + Vehicle::VehicleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Vehicle.VehicleType").msgclass + Vehicle::VehicleType::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Vehicle.VehicleType.Category").enummodule + BatteryInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.BatteryInfo").msgclass + DeviceSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.DeviceSettings").msgclass + LicensePlate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.LicensePlate").msgclass + VisualTrafficReportPolylineRendering = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VisualTrafficReportPolylineRendering").msgclass + VisualTrafficReportPolylineRendering::RoadStretch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch").msgclass + VisualTrafficReportPolylineRendering::RoadStretch::Style = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch.Style").enummodule + TrafficPolylineData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TrafficPolylineData").msgclass + VehicleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleState").enummodule + LocationPowerSaveMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.LocationPowerSaveMode").enummodule + BatteryStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.BatteryStatus").enummodule + PowerSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.PowerSource").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md new file mode 100644 index 000000000000..faf4842e7c03 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Local Rides and Deliveries 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-maps-fleet_engine-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/routing.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb new file mode 100644 index 000000000000..6d71a9430253 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb @@ -0,0 +1,463 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Specifies the routing information that should be sent along with the request + # in the form of routing header. + # **NOTE:** All service configuration rules follow the "last one wins" order. + # + # The examples below will apply to an RPC which has the following request type: + # + # Message Definition: + # + # message Request { + # // The name of the Table + # // Values can be of the following formats: + # // - `projects//tables/
` + # // - `projects//instances//tables/
` + # // - `region//zones//tables/
` + # string table_name = 1; + # + # // This value specifies routing for replication. + # // It can be in the following formats: + # // - `profiles/` + # // - a legacy `profile_id` that can be any string + # string app_profile_id = 2; + # } + # + # Example message: + # + # { + # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, + # app_profile_id: profiles/prof_qux + # } + # + # The routing header consists of one or multiple key-value pairs. The order of + # the key-value pairs is undefined, the order of the `routing_parameters` in + # the `RoutingRule` only matters for the evaluation order of the path + # templates when `field` is the same. See the examples below for more details. + # + # Every key and value in the routing header must be percent-encoded, + # and joined together in the following format: `key1=value1&key2=value2`. + # The examples below skip the percent-encoding for readability. + # + # Example 1 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key equal to the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`. + # routing_parameters { + # field: "app_profile_id" + # } + # }; + # + # result: + # + # x-goog-request-params: app_profile_id=profiles/prof_qux + # + # Example 2 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key different from the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`, but name it `routing_id` in the header. + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 3 + # + # Extracting a field from the request to put into the routing + # header, while matching a path template syntax on the field's value. + # + # NB: it is more useful to send nothing than to send garbage for the purpose + # of dynamic routing, since garbage pollutes cache. Thus the matching. + # + # Sub-example 3a + # + # The field matches the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with project-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Sub-example 3b + # + # The field does not match the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with region-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # }; + # + # result: + # + # + # + # Sub-example 3c + # + # Multiple alternative conflictingly named path templates are + # specified. The one that matches is used to construct the header. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed, whether + # // using the region- or projects-based syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Example 4 + # + # Extracting a single routing header key-value pair by matching a + # template syntax on (a part of) a single request field. + # + # annotation: + # + # option (google.api.routing) = { + # // Take just the project id from the `table_name` field. + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=projects/proj_foo + # + # Example 5 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on (parts of) a single request + # field. The last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // If the `table_name` does not have instances information, + # // take just the project id for routing. + # // Otherwise take project + instance. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*/instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # routing_id=projects/proj_foo/instances/instance_bar + # + # Example 6 + # + # Extracting multiple routing header key-value pairs by matching + # several non-conflicting path templates on (parts of) a single request field. + # + # Sub-example 6a + # + # Make the templates strict, so that if the `table_name` does not + # have an instance information, nothing is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code needs two keys instead of one composite + # // but works only for the tables with the "project-instance" name + # // syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/instances/*/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Sub-example 6b + # + # Make the templates loose, so that if the `table_name` does not + # have an instance information, just the project id part is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code wants two keys instead of one composite + # // but will work with just the `project_id` for tables without + # // an instance in the `table_name`. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result (is the same as 6a for our example message because it has the instance + # information): + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Example 7 + # + # Extracting multiple routing header key-value pairs by matching + # several path templates on multiple request fields. + # + # NB: note that here there is no way to specify sending nothing if one of the + # fields does not match its template. E.g. if the `table_name` is in the wrong + # format, the `project_id` will not be sent, but the `routing_id` will be. + # The backend routing code has to be aware of that and be prepared to not + # receive a full complement of keys if it expects multiple. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing needs both `project_id` and `routing_id` + # // (from the `app_profile_id` field) for routing. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&routing_id=profiles/prof_qux + # + # Example 8 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on several request fields. The + # last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // The `routing_id` can be a project id or a region id depending on + # // the table name format, but only if the `app_profile_id` is not set. + # // If `app_profile_id` is set it should be used instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=regions/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 9 + # + # Bringing it all together. + # + # annotation: + # + # option (google.api.routing) = { + # // For routing both `table_location` and a `routing_id` are needed. + # // + # // table_location can be either an instance id or a region+zone id. + # // + # // For `routing_id`, take the value of `app_profile_id` + # // - If it's in the format `profiles/`, send + # // just the `` part. + # // - If it's any other literal, send it as is. + # // If the `app_profile_id` is empty, and the `table_name` starts with + # // the project_id, send that instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_location=regions/*/zones/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "profiles/{routing_id=*}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_location=instances/instance_bar&routing_id=prof_qux + # @!attribute [rw] routing_parameters + # @return [::Array<::Google::Api::RoutingParameter>] + # A collection of Routing Parameter specifications. + # **NOTE:** If multiple Routing Parameters describe the same key + # (via the `path_template` field or via the `field` field when + # `path_template` is not provided), "last one wins" rule + # determines which Parameter gets used. + # See the examples for more details. + class RoutingRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A projection from an input message to the GRPC or REST header. + # @!attribute [rw] field + # @return [::String] + # A request field to extract the header key-value pair from. + # @!attribute [rw] path_template + # @return [::String] + # A pattern matching the key-value field. Optional. + # If not specified, the whole field specified in the `field` field will be + # taken as value, and its name used as key. If specified, it MUST contain + # exactly one named segment (along with any number of unnamed segments) The + # pattern will be matched over the field specified in the `field` field, then + # if the match is successful: + # - the name of the single named segment will be used as a header name, + # - the match value of the segment will be used as a header value; + # if the match is NOT successful, nothing will be sent. + # + # Example: + # + # -- This is a field in the request message + # | that the header value will be extracted from. + # | + # | -- This is the key name in the + # | | routing header. + # V | + # field: "table_name" v + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # ^ ^ + # | | + # In the {} brackets is the pattern that -- | + # specifies what to extract from the | + # field as a value to be sent. | + # | + # The string in the field must match the whole pattern -- + # before brackets, inside brackets, after brackets. + # + # When looking at this specific example, we can see that: + # - A key-value pair with the key `table_location` + # and the value matching `instances/*` should be added + # to the x-goog-request-params routing header. + # - The value is extracted from the request message's `table_name` field + # if it matches the full pattern specified: + # `projects/*/instances/*/tables/*`. + # + # **NB:** If the `path_template` field is not provided, the key name is + # equal to the field name, and the whole field should be sent as a value. + # This makes the pattern for the field and the value functionally equivalent + # to `**`, and the configuration + # + # { + # field: "table_name" + # } + # + # is a functionally equivalent shorthand to: + # + # { + # field: "table_name" + # path_template: "{table_name=**}" + # } + # + # See Example 1 for more details. + class RoutingParameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb new file mode 100644 index 000000000000..f387552a7073 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Geo + module Type + # A latitude-longitude viewport, represented as two diagonally opposite `low` + # and `high` points. A viewport is considered a closed region, i.e. it includes + # its boundary. The latitude bounds must range between -90 to 90 degrees + # inclusive, and the longitude bounds must range between -180 to 180 degrees + # inclusive. Various cases include: + # + # - If `low` = `high`, the viewport consists of that single point. + # + # - If `low.longitude` > `high.longitude`, the longitude range is inverted + # (the viewport crosses the 180 degree longitude line). + # + # - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, + # the viewport includes all longitudes. + # + # - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, + # the longitude range is empty. + # + # - If `low.latitude` > `high.latitude`, the latitude range is empty. + # + # Both `low` and `high` must be populated, and the represented box cannot be + # empty (as specified by the definitions above). An empty viewport will result + # in an error. + # + # For example, this viewport fully encloses New York City: + # + # { + # "low": { + # "latitude": 40.477398, + # "longitude": -74.259087 + # }, + # "high": { + # "latitude": 40.91618, + # "longitude": -73.70018 + # } + # } + # @!attribute [rw] low + # @return [::Google::Type::LatLng] + # Required. The low point of the viewport. + # @!attribute [rw] high + # @return [::Google::Type::LatLng] + # Required. The high point of the viewport. + class Viewport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb new file mode 100644 index 000000000000..9855fd75847c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb @@ -0,0 +1,394 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module V1 + # Deprecated: TerminalPoints are no longer supported in Fleet Engine. Use + # `TerminalLocation.point` instead. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] place_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated. + # + # Note: The following fields are mutually exclusive: `place_id`, `generated_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] generated_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated. + # + # Note: The following fields are mutually exclusive: `generated_id`, `place_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] value + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated. + class TerminalPointId + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the location of a waypoint. + # @!attribute [rw] point + # @return [::Google::Type::LatLng] + # Required. Denotes the location of a trip waypoint. + # @!attribute [rw] terminal_point_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Maps::FleetEngine::V1::TerminalPointId] + # Deprecated: Specify the `point` field instead. + # @!attribute [rw] access_point_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated: Specify the `point` field instead. + # @!attribute [rw] trip_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated. + # @!attribute [rw] terminal_location_type + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Maps::FleetEngine::V1::WaypointType] + # Deprecated: `Vehicle.waypoint` will have this data. + class TerminalLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes a stopping point on a vehicle's route or an ending point on a + # vehicle's trip. + # @!attribute [rw] location + # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] + # The location of this waypoint. + # @!attribute [rw] trip_id + # @return [::String] + # The trip associated with this waypoint. + # @!attribute [rw] waypoint_type + # @return [::Google::Maps::FleetEngine::V1::WaypointType] + # The role this waypoint plays in this trip, such as pickup or dropoff. + # @!attribute [rw] path_to_waypoint + # @return [::Array<::Google::Type::LatLng>] + # The path from the previous waypoint to the current waypoint. Undefined for + # the first waypoint in a list. This field is only populated when requested. + # @!attribute [rw] encoded_path_to_waypoint + # @return [::String] + # The encoded path from the previous waypoint to the current waypoint. + # + #

Note: This field is intended only for use by the Driver SDK and Consumer + # SDK. Decoding is not yet supported. + # @!attribute [rw] traffic_to_waypoint + # @return [::Google::Maps::FleetEngine::V1::ConsumableTrafficPolyline] + # The traffic conditions along the path to this waypoint. Note that traffic + # is only available for Google Map Platform Rides and Deliveries Solution + # customers. + # @!attribute [rw] distance_meters + # @return [::Google::Protobuf::Int32Value] + # The path distance from the previous waypoint to the current waypoint. + # Undefined for the first waypoint in a list. + # @!attribute [rw] eta + # @return [::Google::Protobuf::Timestamp] + # The estimated time of arrival at this waypoint. Undefined for the first + # waypoint in a list. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # The travel time from previous waypoint to this point. Undefined for the + # first waypoint in a list. + class TripWaypoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes a vehicle attribute as a key-value pair. The "key:value" string + # length cannot exceed 256 characters. + # @!attribute [rw] key + # @return [::String] + # The attribute's key. Keys may not contain the colon character (:). + # @!attribute [rw] value + # @return [::String] + # The attribute's value. + # @!attribute [rw] string_value + # @return [::String] + # String typed attribute value. + # + # Note: This is identical to the `value` field which will eventually be + # deprecated. For create or update methods, either field can be used, but + # it's strongly recommended to use `string_value`. If both `string_value` + # and `value` are set, they must be identical or an error will be thrown. + # Both fields are populated in responses. + # + # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_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] + # Boolean typed attribute value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_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] + # Double typed attribute value. + # + # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class VehicleAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The location, speed, and heading of a vehicle at a point in time. + # @!attribute [rw] location + # @return [::Google::Type::LatLng] + # The location of the vehicle. + # When it is sent to Fleet Engine, the vehicle's location is a GPS location. + # When you receive it in a response, the vehicle's location can be either a + # GPS location, a supplemental location, or some other estimated location. + # The source is specified in `location_sensor`. + # @!attribute [rw] horizontal_accuracy + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::DoubleValue] + # Deprecated: Use `latlng_accuracy` instead. + # @!attribute [rw] latlng_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `location` in meters as a radius. + # @!attribute [rw] heading + # @return [::Google::Protobuf::Int32Value] + # Direction the vehicle is moving in degrees. 0 represents North. + # The valid range is [0,360). + # @!attribute [rw] bearing_accuracy + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::DoubleValue] + # Deprecated: Use `heading_accuracy` instead. + # @!attribute [rw] heading_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `heading` in degrees. + # @!attribute [rw] altitude + # @return [::Google::Protobuf::DoubleValue] + # Altitude in meters above WGS84. + # @!attribute [rw] vertical_accuracy + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::DoubleValue] + # Deprecated: Use `altitude_accuracy` instead. + # @!attribute [rw] altitude_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `altitude` in meters. + # @!attribute [rw] speed_kmph + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Int32Value] + # Speed of the vehicle in kilometers per hour. + # Deprecated: Use `speed` instead. + # @!attribute [rw] speed + # @return [::Google::Protobuf::DoubleValue] + # Speed of the vehicle in meters/second + # @!attribute [rw] speed_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `speed` in meters/second. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when `location` was reported by the sensor according to the + # sensor's clock. + # @!attribute [r] server_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the server received the location information. + # @!attribute [rw] location_sensor + # @return [::Google::Maps::FleetEngine::V1::LocationSensor] + # Provider of location data (for example, `GPS`). + # @!attribute [rw] is_road_snapped + # @return [::Google::Protobuf::BoolValue] + # Whether `location` is snapped to a road. + # @!attribute [rw] is_gps_sensor_enabled + # @return [::Google::Protobuf::BoolValue] + # Input only. Indicates whether the GPS sensor is enabled on the mobile + # device. + # @!attribute [rw] time_since_update + # @return [::Google::Protobuf::Int32Value] + # Input only. Time (in seconds) since this location was first sent to the + # server. This will be zero for the first update. If the time is unknown (for + # example, when the app restarts), this value resets to zero. + # @!attribute [rw] num_stale_updates + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Int32Value] + # Input only. Deprecated: Other signals are now used to determine if a + # location is stale. + # @!attribute [rw] raw_location + # @return [::Google::Type::LatLng] + # Raw vehicle location (unprocessed by road-snapper). + # @!attribute [rw] raw_location_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp associated with the raw location. + # @!attribute [rw] raw_location_sensor + # @return [::Google::Maps::FleetEngine::V1::LocationSensor] + # Source of the raw location. Defaults to `GPS`. + # @!attribute [rw] raw_location_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `raw_location` as a radius, in meters. + # @!attribute [rw] flp_location + # @return [::Google::Type::LatLng] + # The location from Android's Fused Location Provider. + # @!attribute [rw] flp_update_time + # @return [::Google::Protobuf::Timestamp] + # Update timestamp of `flp_location`. + # @!attribute [rw] flp_latlng_accuracy_meters + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `flp_location` in meters as a radius. + # @!attribute [rw] flp_heading_degrees + # @return [::Google::Protobuf::Int32Value] + # Direction the vehicle is moving in degrees, as determined by the Fused + # Location Provider. 0 represents North. The valid range is [0,360). + # @!attribute [rw] supplemental_location + # @return [::Google::Type::LatLng] + # Supplemental location provided by the integrating app. + # @!attribute [rw] supplemental_location_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp associated with the supplemental location. + # @!attribute [rw] supplemental_location_sensor + # @return [::Google::Maps::FleetEngine::V1::LocationSensor] + # Source of the supplemental location. Defaults to + # `CUSTOMER_SUPPLIED_LOCATION`. + # @!attribute [rw] supplemental_location_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `supplemental_location` as a radius, in meters. + # @!attribute [rw] road_snapped + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Deprecated: Use `is_road_snapped` instead. + class VehicleLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes a trip attribute as a key-value pair. The "key:value" string length + # cannot exceed 256 characters. + # @!attribute [rw] key + # @return [::String] + # The attribute's key. Keys may not contain the colon character (:). + # @!attribute [rw] string_value + # @return [::String] + # String typed attribute value. + # + # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_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] + # Boolean typed attribute value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_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] + # Double typed attribute value. + # + # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TripAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of a trip. + module TripType + # Default, used for unspecified or unrecognized trip types. + UNKNOWN_TRIP_TYPE = 0 + + # The trip may share a vehicle with other trips. + SHARED = 1 + + # The trip is exclusive to a vehicle. + EXCLUSIVE = 2 + end + + # The type of waypoint. + module WaypointType + # Unknown or unspecified waypoint type. + UNKNOWN_WAYPOINT_TYPE = 0 + + # Waypoints for picking up riders or items. + PICKUP_WAYPOINT_TYPE = 1 + + # Waypoints for dropping off riders or items. + DROP_OFF_WAYPOINT_TYPE = 2 + + # Waypoints for intermediate destinations in a multi-destination trip. + INTERMEDIATE_DESTINATION_WAYPOINT_TYPE = 3 + end + + # The type of polyline format. + module PolylineFormatType + # The format is unspecified or unknown. + UNKNOWN_FORMAT_TYPE = 0 + + # A list of `google.type.LatLng`. + LAT_LNG_LIST_TYPE = 1 + + # A polyline encoded with a polyline compression algorithm. Decoding is not + # yet supported. + ENCODED_POLYLINE_TYPE = 2 + end + + # The vehicle's navigation status. + module NavigationStatus + # Unspecified navigation status. + UNKNOWN_NAVIGATION_STATUS = 0 + + # The Driver app's navigation is in `FREE_NAV` mode. + NO_GUIDANCE = 1 + + # Turn-by-turn navigation is available and the Driver app navigation has + # entered `GUIDED_NAV` mode. + ENROUTE_TO_DESTINATION = 2 + + # The vehicle has gone off the suggested route. + OFF_ROUTE = 3 + + # The vehicle is within approximately 50m of the destination. + ARRIVED_AT_DESTINATION = 4 + end + + # The sensor or methodology used to determine the location. + module LocationSensor + # The sensor is unspecified or unknown. + UNKNOWN_SENSOR = 0 + + # GPS or Assisted GPS. + GPS = 1 + + # Assisted GPS, cell tower ID, or WiFi access point. + NETWORK = 2 + + # Cell tower ID or WiFi access point. + PASSIVE = 3 + + # A location determined by the mobile device to be the most likely + # road position. + ROAD_SNAPPED_LOCATION_PROVIDER = 4 + + # A customer-supplied location from an independent source. Typically, this + # value is used for a location provided from sources other than the mobile + # device running Driver SDK. If the original source is described by one of + # the other enum values, use that value. Locations marked + # CUSTOMER_SUPPLIED_LOCATION are typically provided via a Vehicle's + # `last_location.supplemental_location_sensor`. + CUSTOMER_SUPPLIED_LOCATION = 5 + + # A location calculated by Fleet Engine based on the signals available to it. + # Output only. This value will be rejected if it is received in a request. + FLEET_ENGINE_LOCATION = 6 + + # Android's Fused Location Provider. + FUSED_LOCATION_PROVIDER = 100 + + # The location provider on Apple operating systems. + CORE_LOCATION = 200 + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb new file mode 100644 index 000000000000..dbc08c7760c6 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb @@ -0,0 +1,111 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module V1 + # A RequestHeader contains fields common to all Fleet Engine RPC requests. + # @!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. If none + # is specified, the response may be in any language, with a preference for + # English if such a name exists. Field value example: `en-US`. + # @!attribute [rw] region_code + # @return [::String] + # Required. CLDR region code of the region where the request originates. + # Field value example: `US`. + # @!attribute [rw] sdk_version + # @return [::String] + # Version of the calling SDK, if applicable. + # The version format is "major.minor.patch", example: `1.1.2`. + # @!attribute [rw] os_version + # @return [::String] + # Version of the operating system on which the calling SDK is running. + # Field value examples: `4.4.1`, `12.1`. + # @!attribute [rw] device_model + # @return [::String] + # Model of the device on which the calling SDK is running. + # Field value examples: `iPhone12,1`, `SM-G920F`. + # @!attribute [rw] sdk_type + # @return [::Google::Maps::FleetEngine::V1::RequestHeader::SdkType] + # The type of SDK sending the request. + # @!attribute [rw] maps_sdk_version + # @return [::String] + # Version of the MapSDK which the calling SDK depends on, if applicable. + # The version format is "major.minor.patch", example: `5.2.1`. + # @!attribute [rw] nav_sdk_version + # @return [::String] + # Version of the NavSDK which the calling SDK depends on, if applicable. + # The version format is "major.minor.patch", example: `2.1.0`. + # @!attribute [rw] platform + # @return [::Google::Maps::FleetEngine::V1::RequestHeader::Platform] + # Platform of the calling SDK. + # @!attribute [rw] manufacturer + # @return [::String] + # Manufacturer of the Android device from the calling SDK, only applicable + # for the Android SDKs. + # Field value example: `Samsung`. + # @!attribute [rw] android_api_level + # @return [::Integer] + # Android API level of the calling SDK, only applicable for the Android SDKs. + # Field value example: `23`. + # @!attribute [rw] trace_id + # @return [::String] + # Optional ID that can be provided for logging purposes in order to identify + # the request. + class RequestHeader + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible types of SDK. + module SdkType + # The default value. This value is used if the `sdk_type` is omitted. + SDK_TYPE_UNSPECIFIED = 0 + + # The calling SDK is Consumer. + CONSUMER = 1 + + # The calling SDK is Driver. + DRIVER = 2 + + # The calling SDK is JavaScript. + JAVASCRIPT = 3 + end + + # The platform of the calling SDK. + module Platform + # The default value. This value is used if the platform is omitted. + PLATFORM_UNSPECIFIED = 0 + + # The request is coming from Android. + ANDROID = 1 + + # The request is coming from iOS. + IOS = 2 + + # The request is coming from the web. + WEB = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb new file mode 100644 index 000000000000..024d9a7221d4 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module V1 + # Traffic density indicator on a contiguous segment of a path. Given a path + # with points P_0, P_1, ... , P_N (zero-based index), the SpeedReadingInterval + # defines an interval and describes its traffic using the following categories. + # @!attribute [rw] start_polyline_point_index + # @return [::Integer] + # The starting index of this interval in the path. + # In JSON, when the index is 0, the field will appear to be unpopulated. + # @!attribute [rw] end_polyline_point_index + # @return [::Integer] + # The ending index of this interval in the path. + # In JSON, when the index is 0, the field will appear to be unpopulated. + # @!attribute [rw] speed + # @return [::Google::Maps::FleetEngine::V1::SpeedReadingInterval::Speed] + # Traffic speed in this interval. + class SpeedReadingInterval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The classification of polyline speed based on traffic data. + module Speed + # Default value. This value is unused. + SPEED_UNSPECIFIED = 0 + + # Normal speed, no traffic delays. + NORMAL = 1 + + # Slowdown detected, medium amount of traffic. + SLOW = 2 + + # Traffic delays. + TRAFFIC_JAM = 3 + end + end + + # Traffic density along a Vehicle's path. + # @!attribute [rw] speed_reading_interval + # @return [::Array<::Google::Maps::FleetEngine::V1::SpeedReadingInterval>] + # Traffic speed along the path from the previous waypoint to the current + # waypoint. + # @!attribute [rw] encoded_path_to_waypoint + # @return [::String] + # The path the driver is taking from the previous waypoint to the current + # waypoint. This path has landmarks in it so clients can show traffic markers + # along the path (see `speed_reading_interval`). Decoding is not yet + # supported. + class ConsumableTrafficPolyline + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb new file mode 100644 index 000000000000..4bf45f469f13 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb @@ -0,0 +1,312 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module V1 + # CreateTrip request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] trip_id + # @return [::String] + # Required. Unique Trip ID. + # Subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @!attribute [rw] trip + # @return [::Google::Maps::FleetEngine::V1::Trip] + # Required. Trip entity to create. + # + # When creating a Trip, the following fields are required: + # + # * `trip_type` + # * `pickup_point` + # + # The following fields are used if you provide them: + # + # * `number_of_passengers` + # * `vehicle_id` + # * `dropoff_point` + # * `intermediate_destinations` + # * `vehicle_waypoints` + # + # All other Trip fields are ignored. For example, all trips start with a + # `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in + # the creation request. + # + # Only `EXCLUSIVE` trips support `intermediate_destinations`. + # + # When `vehicle_id` is set for a shared trip, you must supply + # the list of `Trip.vehicle_waypoints` to specify the order of the remaining + # waypoints for the vehicle, otherwise the waypoint order will be + # undetermined. + # + # When you specify `Trip.vehicle_waypoints`, the list must contain all + # the remaining waypoints of the vehicle's trips, with no extra waypoints. + # You must order these waypoints such that for a given trip, the pickup + # point is before intermediate destinations, and all intermediate + # destinations come before the drop-off point. An `EXCLUSIVE` trip's + # waypoints must not interleave with any other trips. + # + # The `trip_id`, `waypoint_type` and `location` fields are used, and all + # other TripWaypoint fields in `vehicle_waypoints` are ignored. + class CreateTripRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GetTrip request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format `providers/{provider}/trips/{trip}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] view + # @return [::Google::Maps::FleetEngine::V1::TripView] + # The subset of Trip fields that should be returned and their interpretation. + # @!attribute [rw] current_route_segment_version + # @return [::Google::Protobuf::Timestamp] + # Indicates the minimum timestamp (exclusive) for which `Trip.route` or + # `Trip.current_route_segment` data are retrieved. If route data are + # unchanged since this timestamp, the route field is not set in the response. + # If a minimum is unspecified, the route data are always retrieved. + # @!attribute [rw] remaining_waypoints_version + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Timestamp] + # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use + # `remaining_waypoints_route_version` to control when + # `Trip.remaining_waypoints.traffic_to_waypoint` and + # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. + # @!attribute [rw] route_format_type + # @return [::Google::Maps::FleetEngine::V1::PolylineFormatType] + # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), + # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default + # is `LAT_LNG_LIST_TYPE`. + # @!attribute [rw] current_route_segment_traffic_version + # @return [::Google::Protobuf::Timestamp] + # Indicates the minimum timestamp (exclusive) for which + # `Trip.current_route_segment_traffic` is retrieved. If traffic data are + # unchanged since this timestamp, the `current_route_segment_traffic` field + # is not set in the response. If a minimum is unspecified, the traffic data + # are always retrieved. Note that traffic is only available for On-Demand + # Rides and Deliveries Solution customers. + # @!attribute [rw] remaining_waypoints_route_version + # @return [::Google::Protobuf::Timestamp] + # Indicates the minimum timestamp (exclusive) for which + # `Trip.remaining_waypoints.traffic_to_waypoint` and + # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are + # unchanged since this timestamp, the fields above are + # not set in the response. If `remaining_waypoints_route_version` is + # unspecified, traffic and path are always retrieved. + class GetTripRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteTrip request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # Optional. The standard Fleet Engine request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format `providers/{provider}/trips/{trip}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + class DeleteTripRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ReportBillableTrip request message. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format + # `providers/{provider}/billableTrips/{billable_trip}`. The + # provider must be the Project ID (for example, `sample-cloud-project`) of + # the Google Cloud Project of which the service account making this call is a + # member. + # @!attribute [rw] country_code + # @return [::String] + # Required. Two letter country code of the country where the trip takes + # place. Price is defined according to country code. + # @!attribute [rw] platform + # @return [::Google::Maps::FleetEngine::V1::BillingPlatformIdentifier] + # The platform upon which the request was issued. + # @!attribute [rw] related_ids + # @return [::Array<::String>] + # The identifiers that are directly related to the trip being reported. These + # are usually IDs (for example, session IDs) of pre-booking operations done + # before the trip ID is available. The number of `related_ids` is + # limited to 50. + # @!attribute [rw] solution_type + # @return [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest::SolutionType] + # The type of GMP product solution (for example, + # `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip. + class ReportBillableTripRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Selector for different solution types of a reported trip. + module SolutionType + # The default value. For backwards-compatibility, the API will use + # `ON_DEMAND_RIDESHARING_AND_DELIVERIES` by default which is the first + # supported solution type. + SOLUTION_TYPE_UNSPECIFIED = 0 + + # The solution is an on-demand ridesharing and deliveries trip. + ON_DEMAND_RIDESHARING_AND_DELIVERIES = 1 + end + end + + # UpdateTrip request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format + # `providers/{provider}/trips/{trip}`. The provider must + # be the Project ID (for example, `sample-consumer-project`) of the Google + # Cloud Project of which the service account making this call is a member. + # @!attribute [rw] trip + # @return [::Google::Maps::FleetEngine::V1::Trip] + # Required. The Trip associated with the update. + # + # The following fields are maintained by the Fleet Engine. Do not update + # them using Trip.update. + # + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_traffic` + # * `current_route_segment_traffic_version` + # * `current_route_segment_version` + # * `dropoff_time` + # * `eta_to_next_waypoint` + # * `intermediate_destinations_version` + # * `last_location` + # * `name` + # * `number_of_passengers` + # * `pickup_time` + # * `remaining_distance_meters` + # * `remaining_time_to_first_waypoint` + # * `remaining_waypoints` + # * `remaining_waypoints_version` + # * `route` + # + # When you update the `Trip.vehicle_id` for a shared trip, you must supply + # the list of `Trip.vehicle_waypoints` to specify the order of the remaining + # waypoints, otherwise the order will be undetermined. + # + # When you specify `Trip.vehicle_waypoints`, the list must contain all + # the remaining waypoints of the vehicle's trips, with no extra waypoints. + # You must order these waypoints such that for a given trip, the pickup + # point is before intermediate destinations, and all intermediate + # destinations come before the drop-off point. An `EXCLUSIVE` trip's + # waypoints must not interleave with any other trips. + # The `trip_id`, `waypoint_type` and `location` fields are used, and all + # other TripWaypoint fields in `vehicle_waypoints` are ignored. + # + # To avoid a race condition for trips with multiple destinations, you + # should provide `Trip.intermediate_destinations_version` when updating + # the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The + # `Trip.intermediate_destinations_version` passed must be consistent with + # Fleet Engine's version. If it isn't, the request fails. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The field mask indicating which fields in Trip to update. + # The `update_mask` must contain at least one field. + class UpdateTripRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # SearchTrips request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] vehicle_id + # @return [::String] + # The vehicle associated with the trips in the request. If unspecified, the + # returned trips do not contain: + # + # * `current_route_segment` + # * `remaining_waypoints` + # * `remaining_distance_meters` + # * `eta_to_first_waypoint` + # @!attribute [rw] active_trips_only + # @return [::Boolean] + # If set to true, the response includes Trips that influence a driver's + # route. + # @!attribute [rw] page_size + # @return [::Integer] + # If not set, the server decides the number of results to return. + # @!attribute [rw] page_token + # @return [::String] + # Set this to a value previously returned in the `SearchTripsResponse` to + # continue from previous results. + # @!attribute [rw] minimum_staleness + # @return [::Google::Protobuf::Duration] + # If specified, returns the trips that have not been updated after the time + # `(current - minimum_staleness)`. + class SearchTripsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # SearchTrips response message. + # @!attribute [rw] trips + # @return [::Array<::Google::Maps::FleetEngine::V1::Trip>] + # The list of trips for the requested vehicle. + # @!attribute [rw] next_page_token + # @return [::String] + # Pass this token in the SearchTripsRequest to page through list results. The + # API returns a trip list on each call, and when no more results remain the + # trip list is empty. + class SearchTripsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb new file mode 100644 index 000000000000..e5dd08d4fdac --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb @@ -0,0 +1,289 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module V1 + # Trip metadata. + # @!attribute [r] name + # @return [::String] + # Output only. In the format "providers/\\{provider}/trips/\\{trip}" + # @!attribute [rw] vehicle_id + # @return [::String] + # ID of the vehicle making this trip. + # @!attribute [rw] trip_status + # @return [::Google::Maps::FleetEngine::V1::TripStatus] + # Current status of the trip. + # @!attribute [rw] trip_type + # @return [::Google::Maps::FleetEngine::V1::TripType] + # The type of the trip. + # @!attribute [rw] pickup_point + # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] + # Location where customer indicates they will be picked up. + # @!attribute [rw] actual_pickup_point + # @return [::Google::Maps::FleetEngine::V1::StopLocation] + # Input only. The actual location when and where customer was picked up. + # This field is for provider to provide feedback on actual pickup + # information. + # @!attribute [rw] actual_pickup_arrival_point + # @return [::Google::Maps::FleetEngine::V1::StopLocation] + # Input only. The actual time and location of the driver arrival at + # the pickup point. + # This field is for provider to provide feedback on actual arrival + # information at the pickup point. + # @!attribute [r] pickup_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Either the estimated future time when the rider(s) will be + # picked up, or the actual time when they were picked up. + # @!attribute [rw] intermediate_destinations + # @return [::Array<::Google::Maps::FleetEngine::V1::TerminalLocation>] + # Intermediate stops in order that the trip requests (in addition + # to pickup and dropoff). Initially this will not be supported for shared + # trips. + # @!attribute [rw] intermediate_destinations_version + # @return [::Google::Protobuf::Timestamp] + # Indicates the last time the `intermediate_destinations` was modified. + # Your server should cache this value and pass it in `UpdateTripRequest` + # when update `intermediate_destination_index` to ensure the + # `intermediate_destinations` is not changed. + # @!attribute [rw] intermediate_destination_index + # @return [::Integer] + # When `TripStatus` is `ENROUTE_TO_INTERMEDIATE_DESTINATION`, a number + # between [0..N-1] indicating which intermediate destination the vehicle will + # cross next. When `TripStatus` is `ARRIVED_AT_INTERMEDIATE_DESTINATION`, a + # number between [0..N-1] indicating which intermediate destination the + # vehicle is at. The provider sets this value. If there are no + # `intermediate_destinations`, this field is ignored. + # @!attribute [rw] actual_intermediate_destination_arrival_points + # @return [::Array<::Google::Maps::FleetEngine::V1::StopLocation>] + # Input only. The actual time and location of the driver's arrival at + # an intermediate destination. + # This field is for provider to provide feedback on actual arrival + # information at intermediate destinations. + # @!attribute [rw] actual_intermediate_destinations + # @return [::Array<::Google::Maps::FleetEngine::V1::StopLocation>] + # Input only. The actual time and location when and where the customer was + # picked up from an intermediate destination. This field is for provider to + # provide feedback on actual pickup information at intermediate destinations. + # @!attribute [rw] dropoff_point + # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] + # Location where customer indicates they will be dropped off. + # @!attribute [rw] actual_dropoff_point + # @return [::Google::Maps::FleetEngine::V1::StopLocation] + # Input only. The actual time and location when and where customer was + # dropped off. This field is for provider to provide feedback on actual + # dropoff information. + # @!attribute [r] dropoff_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Either the estimated future time when the rider(s) will be + # dropped off at the final destination, or the actual time when they were + # dropped off. + # @!attribute [r] remaining_waypoints + # @return [::Array<::Google::Maps::FleetEngine::V1::TripWaypoint>] + # Output only. The full path from the current location to the dropoff point, + # inclusive. This path could include waypoints from other trips. + # @!attribute [rw] vehicle_waypoints + # @return [::Array<::Google::Maps::FleetEngine::V1::TripWaypoint>] + # This field supports manual ordering of the waypoints for the trip. It + # contains all of the remaining waypoints for the assigned vehicle, as well + # as the pickup and drop-off waypoints for this trip. If the trip hasn't been + # assigned to a vehicle, then Fleet Engine ignores this field. For privacy + # reasons, this field is only populated by the server on `UpdateTrip` and + # `CreateTrip` calls, NOT on `GetTrip` calls. + # @!attribute [r] route + # @return [::Array<::Google::Type::LatLng>] + # Output only. Anticipated route for this trip to the first entry in + # remaining_waypoints. Note that the first waypoint may belong to a different + # trip. + # @!attribute [r] current_route_segment + # @return [::String] + # Output only. An encoded path to the next waypoint. + # + # Note: This field is intended only for use by the Driver SDK and Consumer + # SDK. Decoding is not yet supported. + # @!attribute [r] current_route_segment_version + # @return [::Google::Protobuf::Timestamp] + # Output only. Indicates the last time the route was modified. + # + # Note: This field is intended only for use by the Driver SDK and Consumer + # SDK. + # @!attribute [r] current_route_segment_traffic + # @return [::Google::Maps::FleetEngine::V1::ConsumableTrafficPolyline] + # Output only. Indicates the traffic conditions along the + # `current_route_segment` when they're available. + # + # Note: This field is intended only for use by the Driver SDK and Consumer + # SDK. + # @!attribute [r] current_route_segment_traffic_version + # @return [::Google::Protobuf::Timestamp] + # Output only. Indicates the last time the `current_route_segment_traffic` + # was modified. + # + # Note: This field is intended only for use by the Driver SDK and Consumer + # SDK. + # @!attribute [r] current_route_segment_end_point + # @return [::Google::Maps::FleetEngine::V1::TripWaypoint] + # Output only. The waypoint where `current_route_segment` ends. + # @!attribute [r] remaining_distance_meters + # @return [::Google::Protobuf::Int32Value] + # Output only. The remaining driving distance in the `current_route_segment` + # field. The value is unspecified if the trip is not assigned to a vehicle, + # or the trip is completed or cancelled. + # @!attribute [r] eta_to_first_waypoint + # @return [::Google::Protobuf::Timestamp] + # Output only. The ETA to the next waypoint (the first entry in the + # `remaining_waypoints` field). The value is unspecified if the trip is not + # assigned to a vehicle, or the trip is inactive (completed or cancelled). + # @!attribute [r] remaining_time_to_first_waypoint + # @return [::Google::Protobuf::Duration] + # Output only. The duration from when the Trip data is returned to the time + # in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is + # not assigned to a vehicle, or the trip is inactive (completed or + # cancelled). + # @!attribute [r] remaining_waypoints_version + # @return [::Google::Protobuf::Timestamp] + # Output only. Indicates the last time that `remaining_waypoints` was changed + # (a waypoint was added, removed, or changed). + # @!attribute [r] remaining_waypoints_route_version + # @return [::Google::Protobuf::Timestamp] + # Output only. Indicates the last time the + # `remaining_waypoints.path_to_waypoint` and + # `remaining_waypoints.traffic_to_waypoint` were modified. Your client app + # should cache this value and pass it in `GetTripRequest` to ensure the + # paths and traffic for `remaining_waypoints` are only returned if updated. + # @!attribute [rw] number_of_passengers + # @return [::Integer] + # Immutable. Indicates the number of passengers on this trip and does not + # include the driver. A vehicle must have available capacity to be returned + # in a `SearchVehicles` response. + # @!attribute [r] last_location + # @return [::Google::Maps::FleetEngine::V1::VehicleLocation] + # Output only. Indicates the last reported location of the vehicle along the + # route. + # @!attribute [r] last_location_snappable + # @return [::Boolean] + # Output only. Indicates whether the vehicle's `last_location` can be snapped + # to the current_route_segment. False if `last_location` or + # `current_route_segment` doesn't exist. + # It is computed by Fleet Engine. Any update from clients will be ignored. + # @!attribute [rw] view + # @return [::Google::Maps::FleetEngine::V1::TripView] + # The subset of Trip fields that are populated and how they should be + # interpreted. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::V1::TripAttribute>] + # A list of custom Trip attributes. Each attribute must have a unique key. + class Trip + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The actual location where a stop (pickup/dropoff) happened. + # @!attribute [rw] point + # @return [::Google::Type::LatLng] + # Required. Denotes the actual location. + # @!attribute [rw] timestamp + # @return [::Google::Protobuf::Timestamp] + # Indicates when the stop happened. + # @!attribute [rw] stop_time + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Timestamp] + # Input only. Deprecated. Use the timestamp field. + class StopLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The status of a trip indicating its progression. + module TripStatus + # Default, used for unspecified or unrecognized trip status. + UNKNOWN_TRIP_STATUS = 0 + + # Newly created trip. + NEW = 1 + + # The driver is on their way to the pickup point. + ENROUTE_TO_PICKUP = 2 + + # The driver has arrived at the pickup point. + ARRIVED_AT_PICKUP = 3 + + # The driver has arrived at an intermediate destination and is waiting for + # the rider. + ARRIVED_AT_INTERMEDIATE_DESTINATION = 7 + + # The driver is on their way to an intermediate destination + # (not the dropoff point). + ENROUTE_TO_INTERMEDIATE_DESTINATION = 8 + + # The driver has picked up the rider and is on their way to the + # next destination. + ENROUTE_TO_DROPOFF = 4 + + # The rider has been dropped off and the trip is complete. + COMPLETE = 5 + + # The trip was canceled prior to pickup by the driver, rider, or + # rideshare provider. + CANCELED = 6 + end + + # A set of values that indicate upon which platform the request was issued. + module BillingPlatformIdentifier + # Default. Used for unspecified platforms. + BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED = 0 + + # The platform is a client server. + SERVER = 1 + + # The platform is a web browser. + WEB = 2 + + # The platform is an Android mobile device. + ANDROID = 3 + + # The platform is an IOS mobile device. + IOS = 4 + + # Other platforms that are not listed in this enumeration. + OTHERS = 5 + end + + # Selector for different sets of Trip fields in a `GetTrip` response. See + # [AIP-157](https://google.aip.dev/157) for context. Additional views are + # likely to be added. + module TripView + # The default value. For backwards-compatibility, the API will default to an + # SDK view. To ensure stability and support, customers are + # advised to select a `TripView` other than `SDK`. + TRIP_VIEW_UNSPECIFIED = 0 + + # Includes fields that may not be interpretable or supportable using + # publicly available libraries. + SDK = 1 + + # Trip fields are populated for the Journey Sharing use case. This view is + # intended for server-to-server communications. + JOURNEY_SHARING_V1S = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb new file mode 100644 index 000000000000..501bd43c50a3 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb @@ -0,0 +1,674 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module V1 + # `CreateVehicle` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] vehicle_id + # @return [::String] + # Required. Unique Vehicle ID. + # Subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @!attribute [rw] vehicle + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # Required. The Vehicle entity to create. When creating a Vehicle, the + # following fields are required: + # + # * `vehicleState` + # * `supportedTripTypes` + # * `maximumCapacity` + # * `vehicleType` + # + # When creating a Vehicle, the following fields are ignored: + # + # * `name` + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_version` + # * `current_route_segment_traffic` + # * `route` + # * `waypoints` + # * `waypoints_version` + # * `remaining_distance_meters` + # * `remaining_time_seconds` + # * `eta_to_next_waypoint` + # * `navigation_status` + # + # All other fields are optional and used if provided. + class CreateVehicleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `GetVehicle` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] current_route_segment_version + # @return [::Google::Protobuf::Timestamp] + # Indicates the minimum timestamp (exclusive) for which + # `Vehicle.current_route_segment` is retrieved. + # If the route is unchanged since this timestamp, the `current_route_segment` + # field is not set in the response. If a minimum is unspecified, the + # `current_route_segment` is always retrieved. + # @!attribute [rw] waypoints_version + # @return [::Google::Protobuf::Timestamp] + # Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints` + # data is retrieved. If the waypoints are unchanged since this timestamp, the + # `vehicle.waypoints` data is not set in the response. If this field is + # unspecified, `vehicle.waypoints` is always retrieved. + class GetVehicleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteVehicle request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # Optional. The standard Fleet Engine request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + class DeleteVehicleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `UpdateVehicle request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] vehicle + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # Required. The `Vehicle` entity values to apply. When updating a `Vehicle`, + # the following fields may not be updated as they are managed by the + # server. + # + # * `available_capacity` + # * `current_route_segment_version` + # * `current_trips` + # * `name` + # * `waypoints_version` + # + # If the `attributes` field is updated, **all** the vehicle's attributes are + # replaced with the attributes provided in the request. If you want to update + # only some attributes, see the `UpdateVehicleAttributes` method. + # + # Likewise, the `waypoints` field can be updated, but must contain all the + # waypoints currently on the vehicle, and no other waypoints. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A field mask indicating which fields of the `Vehicle` to update. + # At least one field name must be provided. + class UpdateVehicleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `UpdateVehicleAttributes` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] + # Required. The vehicle attributes to update. Unmentioned attributes are not + # altered or removed. + class UpdateVehicleAttributesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `UpdateVehicleAttributes` response message. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] + # Required. The updated full list of vehicle attributes, including new, + # altered, and untouched attributes. + class UpdateVehicleAttributesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `SearchVehicles` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] pickup_point + # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] + # Required. The pickup point to search near. + # @!attribute [rw] dropoff_point + # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] + # The customer's intended dropoff location. The field is required if + # `trip_types` contains `TripType.SHARED`. + # @!attribute [rw] pickup_radius_meters + # @return [::Integer] + # Required. Defines the vehicle search radius around the pickup point. Only + # vehicles within the search radius will be returned. Value must be between + # 400 and 10000 meters (inclusive). + # @!attribute [rw] count + # @return [::Integer] + # Required. Specifies the maximum number of vehicles to return. The value + # must be between 1 and 50 (inclusive). + # @!attribute [rw] minimum_capacity + # @return [::Integer] + # Required. Specifies the number of passengers being considered for a trip. + # The value must be greater than or equal to one. The driver is not + # considered in the capacity value. + # @!attribute [rw] trip_types + # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>] + # Required. Represents the type of proposed trip. Must include exactly one + # type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only + # those vehicles that can support that trip type. + # @!attribute [rw] maximum_staleness + # @return [::Google::Protobuf::Duration] + # Restricts the search to only those vehicles that have sent location updates + # to Fleet Engine within the specified duration. Stationary vehicles still + # transmitting their locations are not considered stale. If this field is not + # set, the server uses five minutes as the default value. + # @!attribute [rw] vehicle_types + # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType>] + # Required. Restricts the search to vehicles with one of the specified types. + # At least one vehicle type must be specified. VehicleTypes with a category + # of `UNKNOWN` are not allowed. + # @!attribute [rw] required_attributes + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] + # Callers can form complex logical operations using any combination of the + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attribute_sets` fields. + # + # `required_attributes` is a list; `required_one_of_attributes` uses a + # message which allows a list of lists. In combination, the two fields allow + # the composition of this expression: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR + # ...) + # AND + # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR + # ...) + # ``` + # + # Restricts the search to only those vehicles with the specified attributes. + # This field is a conjunction/AND operation. A max of 50 required_attributes + # is allowed. This matches the maximum number of attributes allowed on a + # vehicle. + # @!attribute [rw] required_one_of_attributes + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList>] + # Restricts the search to only those vehicles with at least one of + # the specified attributes in each `VehicleAttributeList`. Within each + # list, a vehicle must match at least one of the attributes. This field is an + # inclusive disjunction/OR operation in each `VehicleAttributeList` and a + # conjunction/AND operation across the collection of `VehicleAttributeList`. + # @!attribute [rw] required_one_of_attribute_sets + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList>] + # `required_one_of_attribute_sets` provides additional functionality. + # + # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` + # uses a message which allows a list of lists, allowing expressions such as + # this one: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # ( + # (required_one_of_attribute_sets[0][0] AND + # required_one_of_attribute_sets[0][1] AND + # ...) + # OR + # (required_one_of_attribute_sets[1][0] AND + # required_one_of_attribute_sets[1][1] AND + # ...) + # ) + # ``` + # + # Restricts the search to only those vehicles with all the attributes in a + # `VehicleAttributeList`. Within each list, a + # vehicle must match all of the attributes. This field is a conjunction/AND + # operation in each `VehicleAttributeList` and inclusive disjunction/OR + # operation across the collection of `VehicleAttributeList`. + # @!attribute [rw] order_by + # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] + # Required. Specifies the desired ordering criterion for results. + # @!attribute [rw] include_back_to_back + # @return [::Boolean] + # This indicates if vehicles with a single active trip are eligible for this + # search. This field is only used when `current_trips_present` is + # unspecified. When `current_trips_present` is unspecified and this field + # is `false`, vehicles with assigned trips are excluded from the search + # results. When `current_trips_present` is unspecified and this field is + # `true`, search results can include vehicles with one active trip that has a + # status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified, + # this field cannot be set to true. + # + # The default value is `false`. + # @!attribute [rw] trip_id + # @return [::String] + # Indicates the trip associated with this `SearchVehicleRequest`. + # @!attribute [rw] current_trips_present + # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::CurrentTripsPresent] + # This indicates if vehicles with active trips are eligible for this search. + # This must be set to something other than + # `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter query to apply when searching vehicles. See + # http://aip.dev/160 for examples of the filter syntax. + # + # This field is designed to replace the `required_attributes`, + # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. + # If a non-empty value is specified here, the following fields must be empty: + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attributes_sets`. + # + # This filter functions as an AND clause with other constraints, + # such as `minimum_capacity` or `vehicle_types`. + # + # Note that the only queries supported are on vehicle attributes (for + # example, `attributes. = ` or `attributes. = AND + # attributes. = `). The maximum number of restrictions allowed + # in a filter query is 50. + # + # Also, all attributes are stored as strings, so the only supported + # comparisons against attributes are string comparisons. In order to compare + # against number or boolean values, the values must be explicitly quoted to + # be treated as strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + class SearchVehiclesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies the order of the vehicle matches in the response. + module VehicleMatchOrder + # Default, used for unspecified or unrecognized vehicle matches order. + UNKNOWN_VEHICLE_MATCH_ORDER = 0 + + # Ascending order by vehicle driving time to the pickup point. + PICKUP_POINT_ETA = 1 + + # Ascending order by vehicle driving distance to the pickup point. + PICKUP_POINT_DISTANCE = 2 + + # Ascending order by vehicle driving time to the dropoff point. This order + # can only be used if the dropoff point is specified in the request. + DROPOFF_POINT_ETA = 3 + + # Ascending order by straight-line distance from the vehicle's last + # reported location to the pickup point. + PICKUP_POINT_STRAIGHT_DISTANCE = 4 + + # Ascending order by the configured match cost. Match cost is defined as a + # weighted calculation between straight-line distance and ETA. Weights are + # set with default values and can be modified per customer. Please contact + # Google support if these weights need to be modified for your project. + COST = 5 + end + + # Specifies the types of restrictions on a vehicle's current trips. + module CurrentTripsPresent + # The availability of vehicles with trips present is governed by the + # `include_back_to_back` field. + CURRENT_TRIPS_PRESENT_UNSPECIFIED = 0 + + # Vehicles without trips can appear in search results. When this value is + # used, `include_back_to_back` cannot be `true`. + NONE = 1 + + # Vehicles with at most 5 current trips and 10 waypoints are included + # in the search results. When this value is used, `include_back_to_back` + # cannot be `true`. + ANY = 2 + end + end + + # `SearchVehicles` response message. + # @!attribute [rw] matches + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleMatch>] + # List of vehicles that match the `SearchVehiclesRequest` criteria, ordered + # according to `SearchVehiclesRequest.order_by` field. + class SearchVehiclesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListVehicles` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of vehicles to return. + # Default value: 100. + # @!attribute [rw] page_token + # @return [::String] + # The value of the `next_page_token` provided by a previous call to + # `ListVehicles` so that you can paginate through groups of vehicles. The + # value is undefined if the filter criteria of the request is not the same as + # the filter criteria for the previous call to `ListVehicles`. + # @!attribute [rw] minimum_capacity + # @return [::Google::Protobuf::Int32Value] + # Specifies the required minimum capacity of the vehicle. All vehicles + # returned will have a `maximum_capacity` greater than or equal to this + # value. If set, must be greater or equal to 0. + # @!attribute [rw] trip_types + # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>] + # Restricts the response to vehicles that support at least one of the + # specified trip types. + # @!attribute [rw] maximum_staleness + # @return [::Google::Protobuf::Duration] + # Restricts the response to vehicles that have sent location updates to Fleet + # Engine within the specified duration. Stationary vehicles still + # transmitting their locations are not considered stale. If present, must be + # a valid positive duration. + # @!attribute [rw] vehicle_type_categories + # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category>] + # Required. Restricts the response to vehicles with one of the specified type + # categories. `UNKNOWN` is not allowed. + # @!attribute [rw] required_attributes + # @return [::Array<::String>] + # Callers can form complex logical operations using any combination of the + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attribute_sets` fields. + # + # `required_attributes` is a list; `required_one_of_attributes` uses a + # message which allows a list of lists. In combination, the two fields allow + # the composition of this expression: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR + # ...) + # AND + # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR + # ...) + # ``` + # + # Restricts the response to vehicles with the specified attributes. This + # field is a conjunction/AND operation. A max of 50 required_attributes is + # allowed. This matches the maximum number of attributes allowed on a + # vehicle. Each repeated string should be of the format "key:value". + # @!attribute [rw] required_one_of_attributes + # @return [::Array<::String>] + # Restricts the response to vehicles with at least one of the specified + # attributes in each `VehicleAttributeList`. Within each list, a vehicle must + # match at least one of the attributes. This field is an inclusive + # disjunction/OR operation in each `VehicleAttributeList` and a + # conjunction/AND operation across the collection of `VehicleAttributeList`. + # Each repeated string should be of the format + # "key1:value1|key2:value2|key3:value3". + # @!attribute [rw] required_one_of_attribute_sets + # @return [::Array<::String>] + # `required_one_of_attribute_sets` provides additional functionality. + # + # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` + # uses a message which allows a list of lists, allowing expressions such as + # this one: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # ( + # (required_one_of_attribute_sets[0][0] AND + # required_one_of_attribute_sets[0][1] AND + # ...) + # OR + # (required_one_of_attribute_sets[1][0] AND + # required_one_of_attribute_sets[1][1] AND + # ...) + # ) + # ``` + # + # Restricts the response to vehicles that match all the attributes in a + # `VehicleAttributeList`. Within each list, a vehicle must match all of the + # attributes. This field is a conjunction/AND operation in each + # `VehicleAttributeList` and inclusive disjunction/OR operation across the + # collection of `VehicleAttributeList`. Each repeated string should be of the + # format "key1:value1|key2:value2|key3:value3". + # @!attribute [rw] vehicle_state + # @return [::Google::Maps::FleetEngine::V1::VehicleState] + # Restricts the response to vehicles that have this vehicle state. + # @!attribute [rw] on_trip_only + # @return [::Boolean] + # Only return the vehicles with current trip(s). + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter query to apply when listing vehicles. See + # http://aip.dev/160 for examples of the filter syntax. + # + # This field is designed to replace the `required_attributes`, + # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. + # If a non-empty value is specified here, the following fields must be empty: + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attributes_sets`. + # + # This filter functions as an AND clause with other constraints, + # such as `vehicle_state` or `on_trip_only`. + # + # Note that the only queries supported are on vehicle attributes (for + # example, `attributes. = ` or `attributes. = AND + # attributes. = `). The maximum number of restrictions allowed + # in a filter query is 50. + # + # Also, all attributes are stored as strings, so the only supported + # comparisons against attributes are string comparisons. In order to compare + # against number or boolean values, the values must be explicitly quoted to + # be treated as strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + # @!attribute [rw] viewport + # @return [::Google::Geo::Type::Viewport] + # Optional. A filter that limits the vehicles returned to those whose last + # known location was in the rectangular area defined by the viewport. + class ListVehiclesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListVehicles` response message. + # @!attribute [rw] vehicles + # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle>] + # Vehicles matching the criteria in the request. + # The maximum number of vehicles returned is determined by the `page_size` + # field in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of vehicles, or empty if there are no + # more vehicles that meet the request criteria. + # @!attribute [rw] total_size + # @return [::Integer] + # Required. Total number of vehicles matching the request criteria across all + # pages. + class ListVehiclesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes intermediate points along a route for a `VehicleMatch` in a + # `SearchVehiclesResponse`. This concept is represented as a `TripWaypoint` in + # all other endpoints. + # @!attribute [rw] lat_lng + # @return [::Google::Type::LatLng] + # The location of this waypoint. + # @!attribute [rw] eta + # @return [::Google::Protobuf::Timestamp] + # The estimated time that the vehicle will arrive at this waypoint. + class Waypoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains the vehicle and related estimates for a vehicle that match the + # points of active trips for the vehicle `SearchVehiclesRequest`. + # @!attribute [rw] vehicle + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # Required. A vehicle that matches the request. + # @!attribute [rw] vehicle_pickup_eta + # @return [::Google::Protobuf::Timestamp] + # The vehicle's driving ETA to the pickup point specified in the + # request. An empty value indicates a failure in calculating ETA for the + # vehicle. If `SearchVehiclesRequest.include_back_to_back` was `true` and + # this vehicle has an active trip, `vehicle_pickup_eta` includes the time + # required to complete the current active trip. + # @!attribute [rw] vehicle_pickup_distance_meters + # @return [::Google::Protobuf::Int32Value] + # The distance from the Vehicle's current location to the pickup point + # specified in the request, including any intermediate pickup or dropoff + # points for existing trips. This distance comprises the calculated driving + # (route) distance, plus the straight line distance between the navigation + # end point and the requested pickup point. (The distance between the + # navigation end point and the requested pickup point is typically small.) An + # empty value indicates an error in calculating the distance. + # @!attribute [rw] vehicle_pickup_straight_line_distance_meters + # @return [::Google::Protobuf::Int32Value] + # Required. The straight-line distance between the vehicle and the pickup + # point specified in the request. + # @!attribute [rw] vehicle_dropoff_eta + # @return [::Google::Protobuf::Timestamp] + # The complete vehicle's driving ETA to the drop off point specified in the + # request. The ETA includes stopping at any waypoints before the + # `dropoff_point` specified in the request. The value will only be populated + # when a drop off point is specified in the request. An empty value indicates + # an error calculating the ETA. + # @!attribute [rw] vehicle_pickup_to_dropoff_distance_meters + # @return [::Google::Protobuf::Int32Value] + # The vehicle's driving distance (in meters) from the pickup point + # to the drop off point specified in the request. The distance is only + # between the two points and does not include the vehicle location or any + # other points that must be visited before the vehicle visits either the + # pickup point or dropoff point. The value will only be populated when a + # `dropoff_point` is specified in the request. An empty value indicates + # a failure in calculating the distance from the pickup to + # drop off point specified in the request. + # @!attribute [rw] trip_type + # @return [::Google::Maps::FleetEngine::V1::TripType] + # Required. The trip type of the request that was used to calculate the ETA + # to the pickup point. + # @!attribute [rw] vehicle_trips_waypoints + # @return [::Array<::Google::Maps::FleetEngine::V1::Waypoint>] + # The ordered list of waypoints used to calculate the ETA. The list + # includes vehicle location, the pickup points of active + # trips for the vehicle, and the pickup points provided in the + # request. An empty list indicates a failure in calculating ETA for the + # vehicle. + # @!attribute [rw] vehicle_match_type + # @return [::Google::Maps::FleetEngine::V1::VehicleMatch::VehicleMatchType] + # Type of the vehicle match. + # @!attribute [rw] requested_ordered_by + # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] + # The order requested for sorting vehicle matches. Equivalent to + # `ordered_by`. + # @!attribute [rw] ordered_by + # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] + # The order requested for sorting vehicle matches. Equivalent to + # `requested_ordered_by`. + class VehicleMatch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of vehicle match. + module VehicleMatchType + # Unknown vehicle match type + UNKNOWN = 0 + + # The vehicle currently has no trip assigned to it and can proceed to the + # pickup point. + EXCLUSIVE = 1 + + # The vehicle is currently assigned to a trip, but can proceed to the + # pickup point after completing the in-progress trip. ETA and distance + # calculations take the existing trip into account. + BACK_TO_BACK = 2 + + # The vehicle has sufficient capacity for a shared ride. + CARPOOL = 3 + + # The vehicle will finish its current, active trip before proceeding to the + # pickup point. ETA and distance calculations take the existing trip into + # account. + CARPOOL_BACK_TO_BACK = 4 + end + end + + # A list-of-lists datatype for vehicle attributes. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] + # A list of attributes in this collection. + class VehicleAttributeList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb new file mode 100644 index 000000000000..59703d2da0b2 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb @@ -0,0 +1,365 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module V1 + # Vehicle metadata. + # @!attribute [r] name + # @return [::String] + # Output only. The unique name for this vehicle. + # The format is `providers/{provider}/vehicles/{vehicle}`. + # @!attribute [rw] vehicle_state + # @return [::Google::Maps::FleetEngine::V1::VehicleState] + # The vehicle state. + # @!attribute [rw] supported_trip_types + # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>] + # Trip types supported by this vehicle. + # @!attribute [r] current_trips + # @return [::Array<::String>] + # Output only. List of `trip_id`'s for trips currently assigned to this + # vehicle. + # @!attribute [rw] last_location + # @return [::Google::Maps::FleetEngine::V1::VehicleLocation] + # Last reported location of the vehicle. + # @!attribute [rw] past_locations + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleLocation>] + # Input only. Locations where this vehicle has been in the past that haven't + # yet been reported to Fleet Engine. This is used in `UpdateVehicleRequest` + # to record locations which were previously unable to be sent to the server. + # Typically this happens when the vehicle does not have internet + # connectivity. + # @!attribute [rw] maximum_capacity + # @return [::Integer] + # The total numbers of riders this vehicle can carry. The driver is not + # considered in this value. This value must be greater than or equal to one. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] + # List of vehicle attributes. A vehicle can have at most 100 + # attributes, and each attribute must have a unique key. + # @!attribute [rw] vehicle_type + # @return [::Google::Maps::FleetEngine::V1::Vehicle::VehicleType] + # Required. The type of this vehicle. Can be used to filter vehicles in + # `SearchVehicles` results. Also influences ETA and route calculations. + # @!attribute [rw] license_plate + # @return [::Google::Maps::FleetEngine::V1::LicensePlate] + # License plate information for the vehicle. + # @!attribute [rw] route + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::Google::Maps::FleetEngine::V1::TerminalLocation>] + # Deprecated: Use `Vehicle.waypoints` instead. + # @!attribute [rw] current_route_segment + # @return [::String] + # The polyline specifying the route the driver app intends to take to + # the next waypoint. This list is also returned in + # `Trip.current_route_segment` for all active trips assigned to the vehicle. + # + # Note: This field is intended only for use by the Driver SDK. Decoding is + # not yet supported. + # @!attribute [rw] current_route_segment_traffic + # @return [::Google::Maps::FleetEngine::V1::TrafficPolylineData] + # Input only. Fleet Engine uses this information to improve journey sharing. + # Note: This field is intended only for use by the Driver SDK. + # @!attribute [r] current_route_segment_version + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when `current_route_segment` was set. It can be stored by + # the client and passed in future `GetVehicle` requests to prevent returning + # routes that haven't changed. + # @!attribute [rw] current_route_segment_end_point + # @return [::Google::Maps::FleetEngine::V1::TripWaypoint] + # The waypoint where `current_route_segment` ends. This can be supplied by + # drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint + # `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet + # Engine will then do its best to interpolate to an actual waypoint if it is + # not fully specified. This field is ignored in `UpdateVehicle` calls unless + # `current_route_segment` is also specified. + # @!attribute [rw] remaining_distance_meters + # @return [::Google::Protobuf::Int32Value] + # The remaining driving distance for the `current_route_segment`. + # This value is also returned in `Trip.remaining_distance_meters` for all + # active trips assigned to the vehicle. The value is unspecified if the + # `current_route_segment` field is empty. + # @!attribute [rw] eta_to_first_waypoint + # @return [::Google::Protobuf::Timestamp] + # The ETA to the first entry in the `waypoints` field. The value is + # unspecified if the `waypoints` field is empty or the + # `Vehicle.current_route_segment` field is empty. + # + # When updating a vehicle, `remaining_time_seconds` takes precedence over + # `eta_to_first_waypoint` in the same request. + # @!attribute [rw] remaining_time_seconds + # @return [::Google::Protobuf::Int32Value] + # Input only. The remaining driving time for the `current_route_segment`. The + # value is unspecified if the `waypoints` field is empty or the + # `Vehicle.current_route_segment` field is empty. This value should match + # `eta_to_first_waypoint` - `current_time` if all parties are using the same + # clock. + # + # When updating a vehicle, `remaining_time_seconds` takes precedence over + # `eta_to_first_waypoint` in the same request. + # @!attribute [rw] waypoints + # @return [::Array<::Google::Maps::FleetEngine::V1::TripWaypoint>] + # The remaining waypoints assigned to this Vehicle. + # @!attribute [r] waypoints_version + # @return [::Google::Protobuf::Timestamp] + # Output only. Last time the `waypoints` field was updated. Clients should + # cache this value and pass it in `GetVehicleRequest` to ensure the + # `waypoints` field is only returned if it is updated. + # @!attribute [rw] back_to_back_enabled + # @return [::Boolean] + # Indicates if the driver accepts back-to-back trips. If `true`, + # `SearchVehicles` may include the vehicle even if it is currently assigned + # to a trip. The default value is `false`. + # @!attribute [rw] navigation_status + # @return [::Google::Maps::FleetEngine::V1::NavigationStatus] + # The vehicle's navigation status. + # @!attribute [rw] device_settings + # @return [::Google::Maps::FleetEngine::V1::DeviceSettings] + # Input only. Information about settings in the mobile device being used by + # the driver. + class Vehicle + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of vehicle. + # @!attribute [rw] category + # @return [::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category] + # Vehicle type category + class VehicleType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Vehicle type categories + module Category + # Default, used for unspecified or unrecognized vehicle categories. + UNKNOWN = 0 + + # An automobile. + AUTO = 1 + + # Any vehicle that acts as a taxi (typically licensed or regulated). + TAXI = 2 + + # Generally, a vehicle with a large storage capacity. + TRUCK = 3 + + # A motorcycle, moped, or other two-wheeled vehicle + TWO_WHEELER = 4 + + # Human-powered transport. + BICYCLE = 5 + + # A human transporter, typically walking or running, traveling along + # pedestrian pathways. + PEDESTRIAN = 6 + end + end + end + + # Information about the device's battery. + # @!attribute [rw] battery_status + # @return [::Google::Maps::FleetEngine::V1::BatteryStatus] + # Status of the battery, whether full or charging etc. + # @!attribute [rw] power_source + # @return [::Google::Maps::FleetEngine::V1::PowerSource] + # Status of battery power source. + # @!attribute [rw] battery_percentage + # @return [::Float] + # Current battery percentage [0-100]. + class BatteryInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about various settings on the mobile device. + # @!attribute [rw] location_power_save_mode + # @return [::Google::Maps::FleetEngine::V1::LocationPowerSaveMode] + # How location features are set to behave on the device when battery saver is + # on. + # @!attribute [rw] is_power_save_mode + # @return [::Boolean] + # Whether the device is currently in power save mode. + # @!attribute [rw] is_interactive + # @return [::Boolean] + # Whether the device is in an interactive state. + # @!attribute [rw] battery_info + # @return [::Google::Maps::FleetEngine::V1::BatteryInfo] + # Information about the battery state. + class DeviceSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The license plate information of the Vehicle. To avoid storing + # personally-identifiable information, only the minimum information + # about the license plate is stored as part of the entity. + # @!attribute [rw] country_code + # @return [::String] + # Required. CLDR Country/Region Code. For example, `US` for United States, + # or `IN` for India. + # @!attribute [rw] last_character + # @return [::String] + # The last digit of the license plate or "-1" to denote no numeric value + # is present in the license plate. + # + # * "ABC 1234" -> "4" + # * "AB 123 CD" -> "3" + # * "ABCDEF" -> "-1" + class LicensePlate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes how clients should color one portion of the polyline along the + # route. + # @!attribute [rw] road_stretch + # @return [::Array<::Google::Maps::FleetEngine::V1::VisualTrafficReportPolylineRendering::RoadStretch>] + # Optional. Road stretches that should be rendered along the polyline. + # Stretches are guaranteed to not overlap, and do not necessarily span the + # full route. + # + # In the absence of a road stretch to style, the client should apply the + # default for the route. + class VisualTrafficReportPolylineRendering + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # One road stretch that should be rendered. + # @!attribute [rw] style + # @return [::Google::Maps::FleetEngine::V1::VisualTrafficReportPolylineRendering::RoadStretch::Style] + # Required. The style to apply. + # @!attribute [rw] offset_meters + # @return [::Integer] + # Required. The style should be applied between `[offset_meters, + # offset_meters + length_meters)`. + # @!attribute [rw] length_meters + # @return [::Integer] + # Required. The length of the path where to apply the style. + class RoadStretch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The traffic style, indicating traffic speed. + module Style + # No style selected. + STYLE_UNSPECIFIED = 0 + + # Traffic is slowing down. + SLOWER_TRAFFIC = 1 + + # There is a traffic jam. + TRAFFIC_JAM = 2 + end + end + end + + # Traffic conditions along the expected vehicle route. + # @!attribute [rw] traffic_rendering + # @return [::Google::Maps::FleetEngine::V1::VisualTrafficReportPolylineRendering] + # A polyline rendering of how fast traffic is for all regions along + # one stretch of a customer ride. + class TrafficPolylineData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The state of a `Vehicle`. + module VehicleState + # Default, used for unspecified or unrecognized vehicle states. + UNKNOWN_VEHICLE_STATE = 0 + + # The vehicle is not accepting new trips. Note: the vehicle may continue to + # operate in this state while completing a trip assigned to it. + OFFLINE = 1 + + # The vehicle is accepting new trips. + ONLINE = 2 + end + + # How location features are configured to behave on the mobile device when the + # devices "battery saver" feature is on. + # (https://developer.android.com/reference/android/os/PowerManager#getLocationPowerSaveMode()) + module LocationPowerSaveMode + # Undefined LocationPowerSaveMode + UNKNOWN_LOCATION_POWER_SAVE_MODE = 0 + + # Either the location providers shouldn't be affected by battery saver, or + # battery saver is off. + LOCATION_MODE_NO_CHANGE = 1 + + # The GPS based location provider should be disabled when battery saver is on + # and the device is non-interactive. + LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF = 2 + + # All location providers should be disabled when battery saver is on and the + # device is non-interactive. + LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF = 3 + + # All the location providers will be kept available, but location fixes + # should only be provided to foreground apps. + LOCATION_MODE_FOREGROUND_ONLY = 4 + + # Location will not be turned off, but LocationManager will throttle all + # requests to providers when the device is non-interactive. + LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF = 5 + end + + # Status of the battery, whether full or charging etc. + module BatteryStatus + # Battery status unknown. + UNKNOWN_BATTERY_STATUS = 0 + + # Battery is being charged. + BATTERY_STATUS_CHARGING = 1 + + # Battery is discharging. + BATTERY_STATUS_DISCHARGING = 2 + + # Battery is full. + BATTERY_STATUS_FULL = 3 + + # Battery is not charging. + BATTERY_STATUS_NOT_CHARGING = 4 + + # Battery is low on power. + BATTERY_STATUS_POWER_LOW = 5 + end + + # Type of the charger being used to charge the battery. + module PowerSource + # Power source unknown. + UNKNOWN_POWER_SOURCE = 0 + + # Power source is an AC charger. + POWER_SOURCE_AC = 1 + + # Power source is a USB port. + POWER_SOURCE_USB = 2 + + # Power source is wireless. + POWER_SOURCE_WIRELESS = 3 + + # Battery is unplugged. + POWER_SOURCE_UNPLUGGED = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb new file mode 100644 index 000000000000..c15e78a39a56 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/snippets/Gemfile b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/Gemfile new file mode 100644 index 000000000000..1a35fc6011c5 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1", path: "../" +else + gem "google-maps-fleet_engine-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-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json new file mode 100644 index 000000000000..a69f797d658e --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json @@ -0,0 +1,535 @@ +{ + "client_library": { + "name": "google-maps-fleet_engine-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "maps.fleetengine.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "fleetengine_v1_generated_TripService_CreateTrip_sync", + "title": "Snippet for the create_trip call in the TripService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#create_trip.", + "file": "trip_service/create_trip.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_trip", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#create_trip", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::CreateTripRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::Trip", + "client": { + "short_name": "TripService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" + }, + "method": { + "short_name": "CreateTrip", + "full_name": "maps.fleetengine.v1.TripService.CreateTrip", + "service": { + "short_name": "TripService", + "full_name": "maps.fleetengine.v1.TripService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_TripService_GetTrip_sync", + "title": "Snippet for the get_trip call in the TripService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#get_trip.", + "file": "trip_service/get_trip.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_trip", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#get_trip", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::GetTripRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::Trip", + "client": { + "short_name": "TripService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" + }, + "method": { + "short_name": "GetTrip", + "full_name": "maps.fleetengine.v1.TripService.GetTrip", + "service": { + "short_name": "TripService", + "full_name": "maps.fleetengine.v1.TripService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_TripService_DeleteTrip_sync", + "title": "Snippet for the delete_trip call in the TripService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#delete_trip.", + "file": "trip_service/delete_trip.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_trip", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#delete_trip", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::DeleteTripRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "TripService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" + }, + "method": { + "short_name": "DeleteTrip", + "full_name": "maps.fleetengine.v1.TripService.DeleteTrip", + "service": { + "short_name": "TripService", + "full_name": "maps.fleetengine.v1.TripService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_TripService_ReportBillableTrip_sync", + "title": "Snippet for the report_billable_trip call in the TripService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#report_billable_trip.", + "file": "trip_service/report_billable_trip.rb", + "language": "RUBY", + "client_method": { + "short_name": "report_billable_trip", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#report_billable_trip", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::ReportBillableTripRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "TripService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" + }, + "method": { + "short_name": "ReportBillableTrip", + "full_name": "maps.fleetengine.v1.TripService.ReportBillableTrip", + "service": { + "short_name": "TripService", + "full_name": "maps.fleetengine.v1.TripService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_TripService_SearchTrips_sync", + "title": "Snippet for the search_trips call in the TripService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#search_trips.", + "file": "trip_service/search_trips.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_trips", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#search_trips", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::SearchTripsRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::SearchTripsResponse", + "client": { + "short_name": "TripService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" + }, + "method": { + "short_name": "SearchTrips", + "full_name": "maps.fleetengine.v1.TripService.SearchTrips", + "service": { + "short_name": "TripService", + "full_name": "maps.fleetengine.v1.TripService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_TripService_UpdateTrip_sync", + "title": "Snippet for the update_trip call in the TripService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#update_trip.", + "file": "trip_service/update_trip.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_trip", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#update_trip", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::UpdateTripRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::Trip", + "client": { + "short_name": "TripService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" + }, + "method": { + "short_name": "UpdateTrip", + "full_name": "maps.fleetengine.v1.TripService.UpdateTrip", + "service": { + "short_name": "TripService", + "full_name": "maps.fleetengine.v1.TripService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_VehicleService_CreateVehicle_sync", + "title": "Snippet for the create_vehicle call in the VehicleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#create_vehicle.", + "file": "vehicle_service/create_vehicle.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_vehicle", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#create_vehicle", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::CreateVehicleRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::Vehicle", + "client": { + "short_name": "VehicleService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" + }, + "method": { + "short_name": "CreateVehicle", + "full_name": "maps.fleetengine.v1.VehicleService.CreateVehicle", + "service": { + "short_name": "VehicleService", + "full_name": "maps.fleetengine.v1.VehicleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_VehicleService_GetVehicle_sync", + "title": "Snippet for the get_vehicle call in the VehicleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#get_vehicle.", + "file": "vehicle_service/get_vehicle.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_vehicle", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#get_vehicle", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::GetVehicleRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::Vehicle", + "client": { + "short_name": "VehicleService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" + }, + "method": { + "short_name": "GetVehicle", + "full_name": "maps.fleetengine.v1.VehicleService.GetVehicle", + "service": { + "short_name": "VehicleService", + "full_name": "maps.fleetengine.v1.VehicleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_VehicleService_DeleteVehicle_sync", + "title": "Snippet for the delete_vehicle call in the VehicleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#delete_vehicle.", + "file": "vehicle_service/delete_vehicle.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_vehicle", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#delete_vehicle", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::DeleteVehicleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "VehicleService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" + }, + "method": { + "short_name": "DeleteVehicle", + "full_name": "maps.fleetengine.v1.VehicleService.DeleteVehicle", + "service": { + "short_name": "VehicleService", + "full_name": "maps.fleetengine.v1.VehicleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_VehicleService_UpdateVehicle_sync", + "title": "Snippet for the update_vehicle call in the VehicleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle.", + "file": "vehicle_service/update_vehicle.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_vehicle", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::UpdateVehicleRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::Vehicle", + "client": { + "short_name": "VehicleService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" + }, + "method": { + "short_name": "UpdateVehicle", + "full_name": "maps.fleetengine.v1.VehicleService.UpdateVehicle", + "service": { + "short_name": "VehicleService", + "full_name": "maps.fleetengine.v1.VehicleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_VehicleService_UpdateVehicleAttributes_sync", + "title": "Snippet for the update_vehicle_attributes call in the VehicleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle_attributes.", + "file": "vehicle_service/update_vehicle_attributes.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_vehicle_attributes", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle_attributes", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse", + "client": { + "short_name": "VehicleService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" + }, + "method": { + "short_name": "UpdateVehicleAttributes", + "full_name": "maps.fleetengine.v1.VehicleService.UpdateVehicleAttributes", + "service": { + "short_name": "VehicleService", + "full_name": "maps.fleetengine.v1.VehicleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_VehicleService_ListVehicles_sync", + "title": "Snippet for the list_vehicles call in the VehicleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#list_vehicles.", + "file": "vehicle_service/list_vehicles.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_vehicles", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#list_vehicles", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::ListVehiclesRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::ListVehiclesResponse", + "client": { + "short_name": "VehicleService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" + }, + "method": { + "short_name": "ListVehicles", + "full_name": "maps.fleetengine.v1.VehicleService.ListVehicles", + "service": { + "short_name": "VehicleService", + "full_name": "maps.fleetengine.v1.VehicleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_VehicleService_SearchVehicles_sync", + "title": "Snippet for the search_vehicles call in the VehicleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#search_vehicles.", + "file": "vehicle_service/search_vehicles.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_vehicles", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#search_vehicles", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::SearchVehiclesRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::SearchVehiclesResponse", + "client": { + "short_name": "VehicleService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" + }, + "method": { + "short_name": "SearchVehicles", + "full_name": "maps.fleetengine.v1.VehicleService.SearchVehicles", + "service": { + "short_name": "VehicleService", + "full_name": "maps.fleetengine.v1.VehicleService" + } + } + }, + "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-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb new file mode 100644 index 000000000000..471ee490d00d --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_TripService_CreateTrip_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the create_trip call in the TripService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::TripService::Client#create_trip. +# +def create_trip + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::TripService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::CreateTripRequest.new + + # Call the create_trip method. + result = client.create_trip request + + # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + p result +end +# [END fleetengine_v1_generated_TripService_CreateTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb new file mode 100644 index 000000000000..892398e76959 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_TripService_DeleteTrip_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the delete_trip call in the TripService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::TripService::Client#delete_trip. +# +def delete_trip + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::TripService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::DeleteTripRequest.new + + # Call the delete_trip method. + result = client.delete_trip request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END fleetengine_v1_generated_TripService_DeleteTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb new file mode 100644 index 000000000000..d02ae4f6720c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_TripService_GetTrip_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the get_trip call in the TripService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::TripService::Client#get_trip. +# +def get_trip + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::TripService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::GetTripRequest.new + + # Call the get_trip method. + result = client.get_trip request + + # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + p result +end +# [END fleetengine_v1_generated_TripService_GetTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb new file mode 100644 index 000000000000..66c560dccfb5 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_TripService_ReportBillableTrip_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the report_billable_trip call in the TripService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::TripService::Client#report_billable_trip. +# +def report_billable_trip + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::TripService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new + + # Call the report_billable_trip method. + result = client.report_billable_trip request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END fleetengine_v1_generated_TripService_ReportBillableTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb new file mode 100644 index 000000000000..213ca35edfd8 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.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 fleetengine_v1_generated_TripService_SearchTrips_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the search_trips call in the TripService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::TripService::Client#search_trips. +# +def search_trips + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::TripService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::SearchTripsRequest.new + + # Call the search_trips method. + result = client.search_trips request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Maps::FleetEngine::V1::Trip. + p item + end +end +# [END fleetengine_v1_generated_TripService_SearchTrips_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb new file mode 100644 index 000000000000..caca64f14dad --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_TripService_UpdateTrip_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the update_trip call in the TripService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::TripService::Client#update_trip. +# +def update_trip + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::TripService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::UpdateTripRequest.new + + # Call the update_trip method. + result = client.update_trip request + + # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + p result +end +# [END fleetengine_v1_generated_TripService_UpdateTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb new file mode 100644 index 000000000000..70db086501d6 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_VehicleService_CreateVehicle_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the create_vehicle call in the VehicleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::VehicleService::Client#create_vehicle. +# +def create_vehicle + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::CreateVehicleRequest.new + + # Call the create_vehicle method. + result = client.create_vehicle request + + # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + p result +end +# [END fleetengine_v1_generated_VehicleService_CreateVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb new file mode 100644 index 000000000000..c040d402cb0b --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_VehicleService_DeleteVehicle_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the delete_vehicle call in the VehicleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::VehicleService::Client#delete_vehicle. +# +def delete_vehicle + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new + + # Call the delete_vehicle method. + result = client.delete_vehicle request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END fleetengine_v1_generated_VehicleService_DeleteVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb new file mode 100644 index 000000000000..4872490fa433 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_VehicleService_GetVehicle_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the get_vehicle call in the VehicleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::VehicleService::Client#get_vehicle. +# +def get_vehicle + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::GetVehicleRequest.new + + # Call the get_vehicle method. + result = client.get_vehicle request + + # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + p result +end +# [END fleetengine_v1_generated_VehicleService_GetVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb new file mode 100644 index 000000000000..1119502e68a1 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.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 fleetengine_v1_generated_VehicleService_ListVehicles_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the list_vehicles call in the VehicleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::VehicleService::Client#list_vehicles. +# +def list_vehicles + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::ListVehiclesRequest.new + + # Call the list_vehicles method. + result = client.list_vehicles request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Maps::FleetEngine::V1::Vehicle. + p item + end +end +# [END fleetengine_v1_generated_VehicleService_ListVehicles_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb new file mode 100644 index 000000000000..e28a620bb8ef --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_VehicleService_SearchVehicles_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the search_vehicles call in the VehicleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::VehicleService::Client#search_vehicles. +# +def search_vehicles + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new + + # Call the search_vehicles method. + result = client.search_vehicles request + + # The returned object is of type Google::Maps::FleetEngine::V1::SearchVehiclesResponse. + p result +end +# [END fleetengine_v1_generated_VehicleService_SearchVehicles_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb new file mode 100644 index 000000000000..87e5b21b85ad --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_VehicleService_UpdateVehicle_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the update_vehicle call in the VehicleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle. +# +def update_vehicle + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new + + # Call the update_vehicle method. + result = client.update_vehicle request + + # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + p result +end +# [END fleetengine_v1_generated_VehicleService_UpdateVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb new file mode 100644 index 000000000000..abf97493f162 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_VehicleService_UpdateVehicleAttributes_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the update_vehicle_attributes call in the VehicleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle_attributes. +# +def update_vehicle_attributes + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new + + # Call the update_vehicle_attributes method. + result = client.update_vehicle_attributes request + + # The returned object is of type Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse. + p result +end +# [END fleetengine_v1_generated_VehicleService_UpdateVehicleAttributes_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb new file mode 100644 index 000000000000..f1ddb3264a50 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_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/maps/fleet_engine/v1/trip_service" + +class ::Google::Maps::FleetEngine::V1::TripService::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_trip_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.trip_path provider: "value0", trip: "value1" + assert_equal "providers/value0/trips/value1", path + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb new file mode 100644 index 000000000000..8b384ca1bbf5 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb @@ -0,0 +1,447 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/maps/fleetengine/v1/trip_api_pb" +require "google/maps/fleet_engine/v1/trip_service/rest" + + +class ::Google::Maps::FleetEngine::V1::TripService::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_trip + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::Trip.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + trip_id = "hello world" + trip = {} + + create_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_create_trip_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_trip_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_trip header: header, parent: parent, trip_id: trip_id, trip: trip do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_trip ::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_trip(::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_trip_client_stub.call_count + end + end + end + + def test_get_trip + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::Trip.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + view = :TRIP_VIEW_UNSPECIFIED + current_route_segment_version = {} + remaining_waypoints_version = {} + route_format_type = :UNKNOWN_FORMAT_TYPE + current_route_segment_traffic_version = {} + remaining_waypoints_route_version = {} + + get_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_get_trip_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_trip_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_trip header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_trip ::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_trip(::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_trip_client_stub.call_count + end + end + end + + def test_delete_trip + # 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. + header = {} + name = "hello world" + + delete_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_delete_trip_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_trip_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_trip({ header: header, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_trip header: header, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_trip ::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_trip({ header: header, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_trip(::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_trip_client_stub.call_count + end + end + end + + def test_report_billable_trip + # 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" + country_code = "hello world" + platform = :BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED + related_ids = ["hello world"] + solution_type = :SOLUTION_TYPE_UNSPECIFIED + + report_billable_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_report_billable_trip_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, report_billable_trip_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.report_billable_trip name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.report_billable_trip ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.report_billable_trip(::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, report_billable_trip_client_stub.call_count + end + end + end + + def test_search_trips + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::SearchTripsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + vehicle_id = "hello world" + active_trips_only = true + page_size = 42 + page_token = "hello world" + minimum_staleness = {} + + search_trips_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_search_trips_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_trips_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_trips header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_trips ::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_trips(::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_trips_client_stub.call_count + end + end + end + + def test_update_trip + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::Trip.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + trip = {} + update_mask = {} + + update_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_update_trip_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_trip_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_trip header: header, name: name, trip: trip, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_trip ::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_trip(::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_trip_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::Maps::FleetEngine::V1::TripService::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::Maps::FleetEngine::V1::TripService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb new file mode 100644 index 000000000000..dfb6b14db01b --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb @@ -0,0 +1,505 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/maps/fleetengine/v1/trip_api_pb" +require "google/maps/fleet_engine/v1/trip_service" + +class ::Google::Maps::FleetEngine::V1::TripService::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_trip + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::Trip.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + trip_id = "hello world" + trip = {} + + create_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_trip, name + assert_kind_of ::Google::Maps::FleetEngine::V1::CreateTripRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["trip_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Trip), request["trip"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_trip_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_trip header: header, parent: parent, trip_id: trip_id, trip: trip do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_trip ::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_trip(::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_trip_client_stub.call_rpc_count + end + end + + def test_get_trip + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::Trip.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + view = :TRIP_VIEW_UNSPECIFIED + current_route_segment_version = {} + remaining_waypoints_version = {} + route_format_type = :UNKNOWN_FORMAT_TYPE + current_route_segment_traffic_version = {} + remaining_waypoints_route_version = {} + + get_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_trip, name + assert_kind_of ::Google::Maps::FleetEngine::V1::GetTripRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["name"] + assert_equal :TRIP_VIEW_UNSPECIFIED, request["view"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["current_route_segment_version"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["remaining_waypoints_version"] + assert_equal :UNKNOWN_FORMAT_TYPE, request["route_format_type"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["current_route_segment_traffic_version"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["remaining_waypoints_route_version"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_trip_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_trip header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_trip ::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_trip(::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_trip_client_stub.call_rpc_count + end + end + + def test_delete_trip + # 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. + header = {} + name = "hello world" + + delete_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_trip, name + assert_kind_of ::Google::Maps::FleetEngine::V1::DeleteTripRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_trip_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_trip({ header: header, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_trip header: header, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_trip ::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_trip({ header: header, 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_trip(::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, 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_trip_client_stub.call_rpc_count + end + end + + def test_report_billable_trip + # 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" + country_code = "hello world" + platform = :BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED + related_ids = ["hello world"] + solution_type = :SOLUTION_TYPE_UNSPECIFIED + + report_billable_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :report_billable_trip, name + assert_kind_of ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["country_code"] + assert_equal :BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED, request["platform"] + assert_equal ["hello world"], request["related_ids"] + assert_equal :SOLUTION_TYPE_UNSPECIFIED, request["solution_type"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, report_billable_trip_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.report_billable_trip name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.report_billable_trip ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.report_billable_trip(::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, report_billable_trip_client_stub.call_rpc_count + end + end + + def test_search_trips + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::SearchTripsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + vehicle_id = "hello world" + active_trips_only = true + page_size = 42 + page_token = "hello world" + minimum_staleness = {} + + search_trips_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_trips, name + assert_kind_of ::Google::Maps::FleetEngine::V1::SearchTripsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["vehicle_id"] + assert_equal true, request["active_trips_only"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["minimum_staleness"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_trips_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }) do |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_trips header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness do |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_trips ::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness) do |response, operation| + 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_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }, grpc_options) do |response, operation| + 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_trips(::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness), grpc_options) do |response, operation| + 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_trips_client_stub.call_rpc_count + end + end + + def test_update_trip + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::Trip.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + trip = {} + update_mask = {} + + update_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_trip, name + assert_kind_of ::Google::Maps::FleetEngine::V1::UpdateTripRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Trip), request["trip"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_trip_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_trip header: header, name: name, trip: trip, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_trip ::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, 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_trip({ header: header, name: name, trip: trip, 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_trip(::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, 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_trip_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::Maps::FleetEngine::V1::TripService::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::Maps::FleetEngine::V1::TripService::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::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Maps::FleetEngine::V1::TripService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb new file mode 100644 index 000000000000..104283f54a4c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_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/maps/fleet_engine/v1/vehicle_service" + +class ::Google::Maps::FleetEngine::V1::VehicleService::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_vehicle_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.vehicle_path provider: "value0", vehicle: "value1" + assert_equal "providers/value0/vehicles/value1", path + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb new file mode 100644 index 000000000000..636a49f15f63 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb @@ -0,0 +1,520 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/maps/fleetengine/v1/vehicle_api_pb" +require "google/maps/fleet_engine/v1/vehicle_service/rest" + + +class ::Google::Maps::FleetEngine::V1::VehicleService::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_vehicle + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::Vehicle.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + vehicle_id = "hello world" + vehicle = {} + + create_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_create_vehicle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_vehicle_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_vehicle header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_vehicle ::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_vehicle(::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_vehicle_client_stub.call_count + end + end + end + + def test_get_vehicle + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::Vehicle.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + current_route_segment_version = {} + waypoints_version = {} + + get_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_get_vehicle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_vehicle_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_vehicle header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_vehicle ::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_vehicle(::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_vehicle_client_stub.call_count + end + end + end + + def test_delete_vehicle + # 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. + header = {} + name = "hello world" + + delete_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_delete_vehicle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_vehicle_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_vehicle({ header: header, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_vehicle header: header, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_vehicle ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_vehicle({ header: header, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_vehicle(::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_vehicle_client_stub.call_count + end + end + end + + def test_update_vehicle + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::Vehicle.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + vehicle = {} + update_mask = {} + + update_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_update_vehicle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_vehicle_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_vehicle header: header, name: name, vehicle: vehicle, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_vehicle ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_vehicle(::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_vehicle_client_stub.call_count + end + end + end + + def test_update_vehicle_attributes + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + attributes = [{}] + + update_vehicle_attributes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_update_vehicle_attributes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_vehicle_attributes_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_vehicle_attributes({ header: header, name: name, attributes: attributes }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_vehicle_attributes header: header, name: name, attributes: attributes do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_vehicle_attributes ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_vehicle_attributes({ header: header, name: name, attributes: attributes }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_vehicle_attributes(::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_vehicle_attributes_client_stub.call_count + end + end + end + + def test_list_vehicles + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::ListVehiclesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + page_size = 42 + page_token = "hello world" + minimum_capacity = {} + trip_types = [:UNKNOWN_TRIP_TYPE] + maximum_staleness = {} + vehicle_type_categories = [:UNKNOWN] + required_attributes = ["hello world"] + required_one_of_attributes = ["hello world"] + required_one_of_attribute_sets = ["hello world"] + vehicle_state = :UNKNOWN_VEHICLE_STATE + on_trip_only = true + filter = "hello world" + viewport = {} + + list_vehicles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_list_vehicles_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_vehicles_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_vehicles ::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_vehicles(::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_vehicles_client_stub.call_count + end + end + end + + def test_search_vehicles + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + pickup_point = {} + dropoff_point = {} + pickup_radius_meters = 42 + count = 42 + minimum_capacity = 42 + trip_types = [:UNKNOWN_TRIP_TYPE] + maximum_staleness = {} + vehicle_types = [{}] + required_attributes = [{}] + required_one_of_attributes = [{}] + required_one_of_attribute_sets = [{}] + order_by = :UNKNOWN_VEHICLE_MATCH_ORDER + include_back_to_back = true + trip_id = "hello world" + current_trips_present = :CURRENT_TRIPS_PRESENT_UNSPECIFIED + filter = "hello world" + + search_vehicles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_search_vehicles_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_vehicles_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_vehicles header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_vehicles ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_vehicles(::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_vehicles_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::Maps::FleetEngine::V1::VehicleService::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::Maps::FleetEngine::V1::VehicleService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb new file mode 100644 index 000000000000..894d1ceb50d8 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb @@ -0,0 +1,601 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/maps/fleetengine/v1/vehicle_api_pb" +require "google/maps/fleet_engine/v1/vehicle_service" + +class ::Google::Maps::FleetEngine::V1::VehicleService::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_vehicle + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::Vehicle.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + vehicle_id = "hello world" + vehicle = {} + + create_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_vehicle, name + assert_kind_of ::Google::Maps::FleetEngine::V1::CreateVehicleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["vehicle_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Vehicle), request["vehicle"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_vehicle_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_vehicle header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_vehicle ::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_vehicle(::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_vehicle_client_stub.call_rpc_count + end + end + + def test_get_vehicle + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::Vehicle.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + current_route_segment_version = {} + waypoints_version = {} + + get_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_vehicle, name + assert_kind_of ::Google::Maps::FleetEngine::V1::GetVehicleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["current_route_segment_version"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["waypoints_version"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_vehicle_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_vehicle header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_vehicle ::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_vehicle(::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_vehicle_client_stub.call_rpc_count + end + end + + def test_delete_vehicle + # 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. + header = {} + name = "hello world" + + delete_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_vehicle, name + assert_kind_of ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_vehicle_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_vehicle({ header: header, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_vehicle header: header, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_vehicle ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_vehicle({ header: header, 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_vehicle(::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, 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_vehicle_client_stub.call_rpc_count + end + end + + def test_update_vehicle + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::Vehicle.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + vehicle = {} + update_mask = {} + + update_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_vehicle, name + assert_kind_of ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Vehicle), request["vehicle"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_vehicle_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_vehicle header: header, name: name, vehicle: vehicle, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_vehicle ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, 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_vehicle({ header: header, name: name, vehicle: vehicle, 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_vehicle(::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, 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_vehicle_client_stub.call_rpc_count + end + end + + def test_update_vehicle_attributes + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + attributes = [{}] + + update_vehicle_attributes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_vehicle_attributes, name + assert_kind_of ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["name"] + assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttribute, request["attributes"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_vehicle_attributes_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_vehicle_attributes({ header: header, name: name, attributes: attributes }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_vehicle_attributes header: header, name: name, attributes: attributes do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_vehicle_attributes ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_vehicle_attributes({ header: header, name: name, attributes: attributes }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_vehicle_attributes(::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_vehicle_attributes_client_stub.call_rpc_count + end + end + + def test_list_vehicles + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::ListVehiclesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + page_size = 42 + page_token = "hello world" + minimum_capacity = {} + trip_types = [:UNKNOWN_TRIP_TYPE] + maximum_staleness = {} + vehicle_type_categories = [:UNKNOWN] + required_attributes = ["hello world"] + required_one_of_attributes = ["hello world"] + required_one_of_attribute_sets = ["hello world"] + vehicle_state = :UNKNOWN_VEHICLE_STATE + on_trip_only = true + filter = "hello world" + viewport = {} + + list_vehicles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_vehicles, name + assert_kind_of ::Google::Maps::FleetEngine::V1::ListVehiclesRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Int32Value), request["minimum_capacity"] + assert_equal [:UNKNOWN_TRIP_TYPE], request["trip_types"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["maximum_staleness"] + assert_equal [:UNKNOWN], request["vehicle_type_categories"] + assert_equal ["hello world"], request["required_attributes"] + assert_equal ["hello world"], request["required_one_of_attributes"] + assert_equal ["hello world"], request["required_one_of_attribute_sets"] + assert_equal :UNKNOWN_VEHICLE_STATE, request["vehicle_state"] + assert_equal true, request["on_trip_only"] + assert_equal "hello world", request["filter"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Geo::Type::Viewport), request["viewport"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_vehicles_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_vehicles ::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_vehicles(::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_vehicles_client_stub.call_rpc_count + end + end + + def test_search_vehicles + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + pickup_point = {} + dropoff_point = {} + pickup_radius_meters = 42 + count = 42 + minimum_capacity = 42 + trip_types = [:UNKNOWN_TRIP_TYPE] + maximum_staleness = {} + vehicle_types = [{}] + required_attributes = [{}] + required_one_of_attributes = [{}] + required_one_of_attribute_sets = [{}] + order_by = :UNKNOWN_VEHICLE_MATCH_ORDER + include_back_to_back = true + trip_id = "hello world" + current_trips_present = :CURRENT_TRIPS_PRESENT_UNSPECIFIED + filter = "hello world" + + search_vehicles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_vehicles, name + assert_kind_of ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::TerminalLocation), request["pickup_point"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::TerminalLocation), request["dropoff_point"] + assert_equal 42, request["pickup_radius_meters"] + assert_equal 42, request["count"] + assert_equal 42, request["minimum_capacity"] + assert_equal [:UNKNOWN_TRIP_TYPE], request["trip_types"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["maximum_staleness"] + assert_kind_of ::Google::Maps::FleetEngine::V1::Vehicle::VehicleType, request["vehicle_types"].first + assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttribute, request["required_attributes"].first + assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttributeList, request["required_one_of_attributes"].first + assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttributeList, request["required_one_of_attribute_sets"].first + assert_equal :UNKNOWN_VEHICLE_MATCH_ORDER, request["order_by"] + assert_equal true, request["include_back_to_back"] + assert_equal "hello world", request["trip_id"] + assert_equal :CURRENT_TRIPS_PRESENT_UNSPECIFIED, request["current_trips_present"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_vehicles_client_stub do + # Create client + client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.search_vehicles header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.search_vehicles ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.search_vehicles(::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_vehicles_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::Maps::FleetEngine::V1::VehicleService::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::Maps::FleetEngine::V1::VehicleService::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::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-shopping-css-v1/.gitignore b/owl-bot-staging/google-shopping-css-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-css-v1/.repo-metadata.json new file mode 100644 index 000000000000..4ce57214d802 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "css.googleapis.com", + "api_shortname": "css", + "client_documentation": "https://rubydoc.info/gems/google-shopping-css-v1", + "distribution_name": "google-shopping-css-v1", + "is_cloud": false, + "language": "ruby", + "name": "css", + "name_pretty": "CSS V1 API", + "product_documentation": "https://developers.google.com/comparison-shopping-services/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Programmatically manage your Comparison Shopping Service (CSS) account data at scale. Note that google-shopping-css-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-css instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/comparison-shopping-services/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-css-v1/.rubocop.yml b/owl-bot-staging/google-shopping-css-v1/.rubocop.yml new file mode 100644 index 000000000000..b53d398f0a64 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-css-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-shopping-css-v1.rb" diff --git a/owl-bot-staging/google-shopping-css-v1/.toys.rb b/owl-bot-staging/google-shopping-css-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/.yardopts b/owl-bot-staging/google-shopping-css-v1/.yardopts new file mode 100644 index 000000000000..f293265f462f --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="CSS 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-shopping-css-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-css-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..bd124d2e6f59 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-css-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-shopping-css-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/shopping/css/v1" + +client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/css/v1" + +::Google::Shopping::Css::V1::AccountsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Css::V1::AccountsService::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-shopping-css-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/shopping/css/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Css::V1::AccountsService::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-shopping-css-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-css-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-css-v1/Gemfile b/owl-bot-staging/google-shopping-css-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/LICENSE.md b/owl-bot-staging/google-shopping-css-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/README.md b/owl-bot-staging/google-shopping-css-v1/README.md new file mode 100644 index 000000000000..08c18457b57e --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the CSS V1 API + +Programmatically manage your Comparison Shopping Service (CSS) account data at scale. + +Programmatically manage your Comparison Shopping Service (CSS) account data at scale. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the CSS V1 API. Most users should consider using +the main client gem, +[google-shopping-css](https://rubygems.org/gems/google-shopping-css). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-css-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/css.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/css/v1" + +client = ::Google::Shopping::Css::V1::AccountsService::Client.new +request = ::Google::Shopping::Css::V1::ListChildAccountsRequest.new # (request fields as keyword arguments...) +response = client.list_child_accounts request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-css-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/comparison-shopping-services/api) +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/shopping/css/v1" +require "logger" + +client = ::Google::Shopping::Css::V1::AccountsService::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-shopping-css`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-css-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-shopping-css`. +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-shopping-css-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-shopping-css-v1/Rakefile b/owl-bot-staging/google-shopping-css-v1/Rakefile new file mode 100644 index 000000000000..635d913938d1 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-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/shopping/css/v1/accounts_service/credentials" + ::Google::Shopping::Css::V1::AccountsService::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-shopping-css-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-shopping-css-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-shopping-css-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-shopping-css-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-css-v1" + header "google-shopping-css-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-css-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-css-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-shopping-css-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-shopping-css-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-shopping-css-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-css-v1/gapic_metadata.json new file mode 100644 index 000000000000..752bb921cc5e --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/gapic_metadata.json @@ -0,0 +1,119 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.css.v1", + "libraryPackage": "::Google::Shopping::Css::V1", + "services": { + "AccountsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Css::V1::AccountsService::Client", + "rpcs": { + "ListChildAccounts": { + "methods": [ + "list_child_accounts" + ] + }, + "GetAccount": { + "methods": [ + "get_account" + ] + }, + "UpdateLabels": { + "methods": [ + "update_labels" + ] + } + } + } + } + }, + "AccountLabelsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Css::V1::AccountLabelsService::Client", + "rpcs": { + "ListAccountLabels": { + "methods": [ + "list_account_labels" + ] + }, + "CreateAccountLabel": { + "methods": [ + "create_account_label" + ] + }, + "UpdateAccountLabel": { + "methods": [ + "update_account_label" + ] + }, + "DeleteAccountLabel": { + "methods": [ + "delete_account_label" + ] + } + } + } + } + }, + "CssProductInputsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Css::V1::CssProductInputsService::Client", + "rpcs": { + "InsertCssProductInput": { + "methods": [ + "insert_css_product_input" + ] + }, + "UpdateCssProductInput": { + "methods": [ + "update_css_product_input" + ] + }, + "DeleteCssProductInput": { + "methods": [ + "delete_css_product_input" + ] + } + } + } + } + }, + "CssProductsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Css::V1::CssProductsService::Client", + "rpcs": { + "GetCssProduct": { + "methods": [ + "get_css_product" + ] + }, + "ListCssProducts": { + "methods": [ + "list_css_products" + ] + } + } + } + } + }, + "QuotaService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Css::V1::QuotaService::Client", + "rpcs": { + "ListQuotaGroups": { + "methods": [ + "list_quota_groups" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec b/owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec new file mode 100644 index 000000000000..7feb57e56127 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/css/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-css-v1" + gem.version = Google::Shopping::Css::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Programmatically manage your Comparison Shopping Service (CSS) account data at scale. Note that google-shopping-css-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-css instead. See the readme for more details." + gem.summary = "Programmatically manage your Comparison Shopping Service (CSS) account data at scale." + 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-shopping-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-v1.rb b/owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-v1.rb new file mode 100644 index 000000000000..a93e9af0be45 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-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/shopping/css/v1" diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb new file mode 100644 index 000000000000..d1249eab068b --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.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/shopping/css/v1/accounts_service" +require "google/shopping/css/v1/account_labels_service" +require "google/shopping/css/v1/css_product_inputs_service" +require "google/shopping/css/v1/css_products_service" +require "google/shopping/css/v1/quota_service" +require "google/shopping/css/v1/version" + +module Google + module Shopping + module Css + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/css/v1" + # client = ::Google::Shopping::Css::V1::AccountsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/css/v1" + # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/css/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb new file mode 100644 index 000000000000..bd9585d09cc4 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_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/shopping/css/v1/version" + +require "google/shopping/css/v1/account_labels_service/credentials" +require "google/shopping/css/v1/account_labels_service/paths" +require "google/shopping/css/v1/account_labels_service/client" +require "google/shopping/css/v1/account_labels_service/rest" + +module Google + module Shopping + module Css + module V1 + ## + # Manages Merchant Center and CSS accounts labels. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/css/v1/account_labels_service" + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/css/v1/account_labels_service/rest" + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new + # + module AccountLabelsService + end + end + end + end +end + +helper_path = ::File.join __dir__, "account_labels_service", "helpers.rb" +require "google/shopping/css/v1/account_labels_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb new file mode 100644 index 000000000000..10289bc31747 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb @@ -0,0 +1,783 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/css/v1/accounts_labels_pb" + +module Google + module Shopping + module Css + module V1 + module AccountLabelsService + ## + # Client for the AccountLabelsService service. + # + # Manages Merchant Center and CSS accounts labels. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_labels_service_stub + + ## + # Configure the AccountLabelsService Client class. + # + # See {::Google::Shopping::Css::V1::AccountLabelsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountLabelsService clients + # ::Google::Shopping::Css::V1::AccountLabelsService::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", "Shopping", "Css", "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_account_labels.timeout = 60.0 + default_config.rpcs.list_account_labels.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_account_label.timeout = 60.0 + + default_config.rpcs.update_account_label.timeout = 60.0 + + default_config.rpcs.delete_account_label.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountLabelsService 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::Shopping::Css::V1::AccountLabelsService::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 + @account_labels_service_stub.universe_domain + end + + ## + # Create a new AccountLabelsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountLabelsService 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/shopping/css/v1/accounts_labels_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 + + @account_labels_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Css::V1::AccountLabelsService::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 + ) + + @account_labels_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 + @account_labels_service_stub.logger + end + + # Service calls + + ## + # Lists the labels owned by an account. + # + # @overload list_account_labels(request, options = nil) + # Pass arguments to `list_account_labels` via a request object, either of type + # {::Google::Shopping::Css::V1::ListAccountLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::ListAccountLabelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_account_labels(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_account_labels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 account. + # Format: accounts/\\{account} + # @param page_size [::Integer] + # The maximum number of labels to return. The service may return fewer than + # this value. + # If unspecified, at most 50 labels will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListAccountLabels` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountLabels` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::ListAccountLabelsRequest.new + # + # # Call the list_account_labels method. + # result = client.list_account_labels request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Css::V1::AccountLabel. + # p item + # end + # + def list_account_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListAccountLabelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_account_labels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_account_labels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_account_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_labels_service_stub.call_rpc :list_account_labels, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @account_labels_service_stub, :list_account_labels, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new label, not assigned to any account. + # + # @overload create_account_label(request, options = nil) + # Pass arguments to `create_account_label` via a request object, either of type + # {::Google::Shopping::Css::V1::CreateAccountLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::CreateAccountLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_account_label(parent: nil, account_label: nil) + # Pass arguments to `create_account_label` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 account. + # Format: accounts/\\{account} + # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] + # Required. The label to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Css::V1::AccountLabel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Css::V1::AccountLabel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::CreateAccountLabelRequest.new + # + # # Call the create_account_label method. + # result = client.create_account_label request + # + # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. + # p result + # + def create_account_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::CreateAccountLabelRequest + + # Converts hash and nil to 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_account_label.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_account_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_account_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_labels_service_stub.call_rpc :create_account_label, request, 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 label. + # + # @overload update_account_label(request, options = nil) + # Pass arguments to `update_account_label` via a request object, either of type + # {::Google::Shopping::Css::V1::UpdateAccountLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_account_label(account_label: nil) + # Pass arguments to `update_account_label` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] + # Required. The updated label. All fields must be provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Css::V1::AccountLabel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Css::V1::AccountLabel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::UpdateAccountLabelRequest.new + # + # # Call the update_account_label method. + # result = client.update_account_label request + # + # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. + # p result + # + def update_account_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelRequest + + # Converts hash and nil to 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_account_label.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account_label&.name + header_params["account_label.name"] = request.account_label.name + end + + request_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_account_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_account_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_labels_service_stub.call_rpc :update_account_label, request, 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 label and removes it from all accounts to which it was assigned. + # + # @overload delete_account_label(request, options = nil) + # Pass arguments to `delete_account_label` via a request object, either of type + # {::Google::Shopping::Css::V1::DeleteAccountLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::DeleteAccountLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_account_label(name: nil) + # Pass arguments to `delete_account_label` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the label to delete. + # Format: accounts/\\{account}/labels/\\{label} + # + # @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/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::DeleteAccountLabelRequest.new + # + # # Call the delete_account_label method. + # result = client.delete_account_label request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_account_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteAccountLabelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_account_label.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_account_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_account_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_labels_service_stub.call_rpc :delete_account_label, request, 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 AccountLabelsService API. + # + # This class represents the configuration for AccountLabelsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Css::V1::AccountLabelsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_account_labels to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::AccountLabelsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_labels.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_labels.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Css::V1::AccountLabelsService::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 = "css.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountLabelsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_account_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_labels + ## + # RPC-specific configuration for `create_account_label` + # @return [::Gapic::Config::Method] + # + attr_reader :create_account_label + ## + # RPC-specific configuration for `update_account_label` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account_label + ## + # RPC-specific configuration for `delete_account_label` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_account_label + + # @private + def initialize parent_rpcs = nil + list_account_labels_config = parent_rpcs.list_account_labels if parent_rpcs.respond_to? :list_account_labels + @list_account_labels = ::Gapic::Config::Method.new list_account_labels_config + create_account_label_config = parent_rpcs.create_account_label if parent_rpcs.respond_to? :create_account_label + @create_account_label = ::Gapic::Config::Method.new create_account_label_config + update_account_label_config = parent_rpcs.update_account_label if parent_rpcs.respond_to? :update_account_label + @update_account_label = ::Gapic::Config::Method.new update_account_label_config + delete_account_label_config = parent_rpcs.delete_account_label if parent_rpcs.respond_to? :delete_account_label + @delete_account_label = ::Gapic::Config::Method.new delete_account_label_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb new file mode 100644 index 000000000000..0e7c2cfdd5da --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Css + module V1 + module AccountLabelsService + # Credentials for the AccountLabelsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb new file mode 100644 index 000000000000..2f421e27577b --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_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 Shopping + module Css + module V1 + module AccountLabelsService + # Path helper methods for the AccountLabelsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified AccountLabel resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/labels/{label}` + # + # @param account [String] + # @param label [String] + # + # @return [::String] + def account_label_path account:, label: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/labels/#{label}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb new file mode 100644 index 000000000000..728b66d6ac46 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_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/shopping/css/v1/version" + +require "google/shopping/css/v1/account_labels_service/credentials" +require "google/shopping/css/v1/account_labels_service/paths" +require "google/shopping/css/v1/account_labels_service/rest/client" + +module Google + module Shopping + module Css + module V1 + ## + # Manages Merchant Center and CSS accounts labels. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/css/v1/account_labels_service/rest" + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new + # + module AccountLabelsService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/css/v1/account_labels_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb new file mode 100644 index 000000000000..1881e394243e --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb @@ -0,0 +1,712 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/css/v1/accounts_labels_pb" +require "google/shopping/css/v1/account_labels_service/rest/service_stub" + +module Google + module Shopping + module Css + module V1 + module AccountLabelsService + module Rest + ## + # REST client for the AccountLabelsService service. + # + # Manages Merchant Center and CSS accounts labels. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_labels_service_stub + + ## + # Configure the AccountLabelsService Client class. + # + # See {::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountLabelsService clients + # ::Google::Shopping::Css::V1::AccountLabelsService::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", "Shopping", "Css", "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_account_labels.timeout = 60.0 + default_config.rpcs.list_account_labels.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_account_label.timeout = 60.0 + + default_config.rpcs.update_account_label.timeout = 60.0 + + default_config.rpcs.delete_account_label.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountLabelsService 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::Shopping::Css::V1::AccountLabelsService::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 + @account_labels_service_stub.universe_domain + end + + ## + # Create a new AccountLabelsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountLabelsService 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 + + @account_labels_service_stub = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @account_labels_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 + @account_labels_service_stub.logger + end + + # Service calls + + ## + # Lists the labels owned by an account. + # + # @overload list_account_labels(request, options = nil) + # Pass arguments to `list_account_labels` via a request object, either of type + # {::Google::Shopping::Css::V1::ListAccountLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::ListAccountLabelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_account_labels(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_account_labels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 account. + # Format: accounts/\\{account} + # @param page_size [::Integer] + # The maximum number of labels to return. The service may return fewer than + # this value. + # If unspecified, at most 50 labels will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListAccountLabels` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountLabels` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::ListAccountLabelsRequest.new + # + # # Call the list_account_labels method. + # result = client.list_account_labels request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Css::V1::AccountLabel. + # p item + # end + # + def list_account_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListAccountLabelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_account_labels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_account_labels.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_account_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_labels_service_stub.list_account_labels request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @account_labels_service_stub, :list_account_labels, "account_labels", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new label, not assigned to any account. + # + # @overload create_account_label(request, options = nil) + # Pass arguments to `create_account_label` via a request object, either of type + # {::Google::Shopping::Css::V1::CreateAccountLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::CreateAccountLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_account_label(parent: nil, account_label: nil) + # Pass arguments to `create_account_label` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 account. + # Format: accounts/\\{account} + # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] + # Required. The label to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::AccountLabel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::CreateAccountLabelRequest.new + # + # # Call the create_account_label method. + # result = client.create_account_label request + # + # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. + # p result + # + def create_account_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::CreateAccountLabelRequest + + # Converts hash and nil to an 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_account_label.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_account_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_account_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_labels_service_stub.create_account_label request, 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 label. + # + # @overload update_account_label(request, options = nil) + # Pass arguments to `update_account_label` via a request object, either of type + # {::Google::Shopping::Css::V1::UpdateAccountLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_account_label(account_label: nil) + # Pass arguments to `update_account_label` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] + # Required. The updated label. All fields must be provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::AccountLabel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::UpdateAccountLabelRequest.new + # + # # Call the update_account_label method. + # result = client.update_account_label request + # + # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. + # p result + # + def update_account_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelRequest + + # Converts hash and nil to an 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_account_label.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_account_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_account_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_labels_service_stub.update_account_label request, 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 label and removes it from all accounts to which it was assigned. + # + # @overload delete_account_label(request, options = nil) + # Pass arguments to `delete_account_label` via a request object, either of type + # {::Google::Shopping::Css::V1::DeleteAccountLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::DeleteAccountLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_account_label(name: nil) + # Pass arguments to `delete_account_label` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the label to delete. + # Format: accounts/\\{account}/labels/\\{label} + # @yield [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/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::DeleteAccountLabelRequest.new + # + # # Call the delete_account_label method. + # result = client.delete_account_label request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_account_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteAccountLabelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_account_label.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_account_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_account_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_labels_service_stub.delete_account_label request, 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 AccountLabelsService REST API. + # + # This class represents the configuration for AccountLabelsService 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::Shopping::Css::V1::AccountLabelsService::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_account_labels to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_labels.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_labels.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "css.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountLabelsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_account_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_labels + ## + # RPC-specific configuration for `create_account_label` + # @return [::Gapic::Config::Method] + # + attr_reader :create_account_label + ## + # RPC-specific configuration for `update_account_label` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account_label + ## + # RPC-specific configuration for `delete_account_label` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_account_label + + # @private + def initialize parent_rpcs = nil + list_account_labels_config = parent_rpcs.list_account_labels if parent_rpcs.respond_to? :list_account_labels + @list_account_labels = ::Gapic::Config::Method.new list_account_labels_config + create_account_label_config = parent_rpcs.create_account_label if parent_rpcs.respond_to? :create_account_label + @create_account_label = ::Gapic::Config::Method.new create_account_label_config + update_account_label_config = parent_rpcs.update_account_label if parent_rpcs.respond_to? :update_account_label + @update_account_label = ::Gapic::Config::Method.new update_account_label_config + delete_account_label_config = parent_rpcs.delete_account_label if parent_rpcs.respond_to? :delete_account_label + @delete_account_label = ::Gapic::Config::Method.new delete_account_label_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb new file mode 100644 index 000000000000..a9b8cb91fe84 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb @@ -0,0 +1,327 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/css/v1/accounts_labels_pb" + +module Google + module Shopping + module Css + module V1 + module AccountLabelsService + module Rest + ## + # REST service stub for the AccountLabelsService 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_account_labels REST call + # + # @param request_pb [::Google::Shopping::Css::V1::ListAccountLabelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::ListAccountLabelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::ListAccountLabelsResponse] + # A result object deserialized from the server's reply + def list_account_labels request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_account_labels_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_account_labels", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::ListAccountLabelsResponse.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_account_label REST call + # + # @param request_pb [::Google::Shopping::Css::V1::CreateAccountLabelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::AccountLabel] + # A result object deserialized from the server's reply + def create_account_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_account_label_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_account_label", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::AccountLabel.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_account_label REST call + # + # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::AccountLabel] + # A result object deserialized from the server's reply + def update_account_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_account_label_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_account_label", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::AccountLabel.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_account_label REST call + # + # @param request_pb [::Google::Shopping::Css::V1::DeleteAccountLabelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_account_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_account_label_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_account_label", + 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_account_labels REST call + # + # @param request_pb [::Google::Shopping::Css::V1::ListAccountLabelsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_account_labels_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/labels", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_account_label REST call + # + # @param request_pb [::Google::Shopping::Css::V1::CreateAccountLabelRequest] + # 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_account_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/labels", + body: "account_label", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_account_label REST call + # + # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelRequest] + # 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_account_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{account_label.name}", + body: "account_label", + matches: [ + ["account_label.name", %r{^accounts/[^/]+/labels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_account_label REST call + # + # @param request_pb [::Google::Shopping::Css::V1::DeleteAccountLabelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_account_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/labels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb new file mode 100644 index 000000000000..91f38e92911a --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/css/v1/accounts_labels.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n,google/shopping/css/v1/accounts_labels.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x9a\x03\n\x0c\x41\x63\x63ountLabel\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x15\n\x08label_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x17\n\naccount_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tH\x01\x88\x01\x01\x12G\n\nlabel_type\x18\x06 \x01(\x0e\x32..google.shopping.css.v1.AccountLabel.LabelTypeB\x03\xe0\x41\x03\"B\n\tLabelType\x12\x1a\n\x16LABEL_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\r\n\tAUTOMATIC\x10\x02:d\xea\x41\x61\n\x1f\x63ss.googleapis.com/AccountLabel\x12!accounts/{account}/labels/{label}*\raccountLabels2\x0c\x61\x63\x63ountLabelB\x0f\n\r_display_nameB\x0e\n\x0c_description\"z\n\x18ListAccountLabelsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63ss.googleapis.com/AccountLabel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"r\n\x19ListAccountLabelsResponse\x12<\n\x0e\x61\x63\x63ount_labels\x18\x01 \x03(\x0b\x32$.google.shopping.css.v1.AccountLabel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x96\x01\n\x19\x43reateAccountLabelRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63ss.googleapis.com/AccountLabel\x12@\n\raccount_label\x18\x02 \x01(\x0b\x32$.google.shopping.css.v1.AccountLabelB\x03\xe0\x41\x02\"]\n\x19UpdateAccountLabelRequest\x12@\n\raccount_label\x18\x01 \x01(\x0b\x32$.google.shopping.css.v1.AccountLabelB\x03\xe0\x41\x02\"R\n\x19\x44\x65leteAccountLabelRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63ss.googleapis.com/AccountLabel2\x97\x06\n\x14\x41\x63\x63ountLabelsService\x12\xa9\x01\n\x11ListAccountLabels\x12\x30.google.shopping.css.v1.ListAccountLabelsRequest\x1a\x31.google.shopping.css.v1.ListAccountLabelsResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=accounts/*}/labels\x12\xbb\x01\n\x12\x43reateAccountLabel\x12\x31.google.shopping.css.v1.CreateAccountLabelRequest\x1a$.google.shopping.css.v1.AccountLabel\"L\xda\x41\x14parent,account_label\x82\xd3\xe4\x93\x02/\"\x1e/v1/{parent=accounts/*}/labels:\raccount_label\x12\xc2\x01\n\x12UpdateAccountLabel\x12\x31.google.shopping.css.v1.UpdateAccountLabelRequest\x1a$.google.shopping.css.v1.AccountLabel\"S\xda\x41\raccount_label\x82\xd3\xe4\x93\x02=2,/v1/{account_label.name=accounts/*/labels/*}:\raccount_label\x12\x8e\x01\n\x12\x44\x65leteAccountLabel\x12\x31.google.shopping.css.v1.DeleteAccountLabelRequest\x1a\x16.google.protobuf.Empty\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=accounts/*/labels/*}\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xb5\x01\n\x1a\x63om.google.shopping.css.v1B\x13\x41\x63\x63ountsLabelsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Css + module V1 + AccountLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.AccountLabel").msgclass + AccountLabel::LabelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.AccountLabel.LabelType").enummodule + ListAccountLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListAccountLabelsRequest").msgclass + ListAccountLabelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListAccountLabelsResponse").msgclass + CreateAccountLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CreateAccountLabelRequest").msgclass + UpdateAccountLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.UpdateAccountLabelRequest").msgclass + DeleteAccountLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.DeleteAccountLabelRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb new file mode 100644 index 000000000000..1d0c4f3552e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/css/v1/accounts_labels.proto for package 'Google.Shopping.Css.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/css/v1/accounts_labels_pb' + +module Google + module Shopping + module Css + module V1 + module AccountLabelsService + # Manages Merchant Center and CSS accounts labels. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.css.v1.AccountLabelsService' + + # Lists the labels owned by an account. + rpc :ListAccountLabels, ::Google::Shopping::Css::V1::ListAccountLabelsRequest, ::Google::Shopping::Css::V1::ListAccountLabelsResponse + # Creates a new label, not assigned to any account. + rpc :CreateAccountLabel, ::Google::Shopping::Css::V1::CreateAccountLabelRequest, ::Google::Shopping::Css::V1::AccountLabel + # Updates a label. + rpc :UpdateAccountLabel, ::Google::Shopping::Css::V1::UpdateAccountLabelRequest, ::Google::Shopping::Css::V1::AccountLabel + # Deletes a label and removes it from all accounts to which it was assigned. + rpc :DeleteAccountLabel, ::Google::Shopping::Css::V1::DeleteAccountLabelRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb new file mode 100644 index 000000000000..4c0a1eaabeb1 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/css/v1/accounts.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/shopping/css/v1/accounts.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc9\x01\n\x18ListChildAccountsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/Account\x12\x15\n\x08label_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x16\n\tfull_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x42\x0b\n\t_label_idB\x0c\n\n_full_name\"g\n\x19ListChildAccountsResponse\x12\x31\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x1f.google.shopping.css.v1.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x89\x01\n\x11GetAccountRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/Account\x12\x37\n\x06parent\x18\x02 \x01(\tB\"\xe0\x41\x01\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/AccountH\x00\x88\x01\x01\x42\t\n\x07_parent\"\xa5\x01\n\x1aUpdateAccountLabelsRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/Account\x12\x11\n\tlabel_ids\x18\x02 \x03(\x03\x12\x37\n\x06parent\x18\x03 \x01(\tB\"\xe0\x41\x01\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/AccountH\x00\x88\x01\x01\x42\t\n\x07_parent\"\xbb\x04\n\x07\x41\x63\x63ount\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\tfull_name\x18\x02 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x12!\n\x0chomepage_uri\x18\x04 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05H\x01\x88\x01\x01\x12\x13\n\x06parent\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x11\n\tlabel_ids\x18\x06 \x03(\x03\x12\x1b\n\x13\x61utomatic_label_ids\x18\x07 \x03(\x03\x12\x46\n\x0c\x61\x63\x63ount_type\x18\x08 \x01(\x0e\x32+.google.shopping.css.v1.Account.AccountTypeB\x03\xe0\x41\x03\"\xc6\x01\n\x0b\x41\x63\x63ountType\x12\x1c\n\x18\x41\x43\x43OUNT_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCSS_GROUP\x10\x01\x12\x0e\n\nCSS_DOMAIN\x10\x02\x12\x16\n\x12MC_PRIMARY_CSS_MCA\x10\x03\x12\x0e\n\nMC_CSS_MCA\x10\x04\x12\x16\n\x12MC_MARKETPLACE_MCA\x10\x05\x12\x10\n\x0cMC_OTHER_MCA\x10\x06\x12\x11\n\rMC_STANDALONE\x10\x07\x12\x15\n\x11MC_MCA_SUBACCOUNT\x10\x08:F\xea\x41\x43\n\x1a\x63ss.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}*\x08\x61\x63\x63ounts2\x07\x61\x63\x63ountB\x0f\n\r_display_nameB\x0f\n\r_homepage_uriB\t\n\x07_parent2\xa5\x04\n\x0f\x41\x63\x63ountsService\x12\xb4\x01\n\x11ListChildAccounts\x12\x30.google.shopping.css.v1.ListChildAccountsRequest\x1a\x31.google.shopping.css.v1.ListChildAccountsResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/v1/{parent=accounts/*}:listChildAccounts\x12~\n\nGetAccount\x12).google.shopping.css.v1.GetAccountRequest\x1a\x1f.google.shopping.css.v1.Account\"$\xda\x41\x04name\x82\xd3\xe4\x93\x02\x17\x12\x15/v1/{name=accounts/*}\x12\x99\x01\n\x0cUpdateLabels\x12\x32.google.shopping.css.v1.UpdateAccountLabelsRequest\x1a\x1f.google.shopping.css.v1.Account\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'\"\"/v1/{name=accounts/*}:updateLabels:\x01*\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xaf\x01\n\x1a\x63om.google.shopping.css.v1B\rAccountsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Css + module V1 + ListChildAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListChildAccountsRequest").msgclass + ListChildAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListChildAccountsResponse").msgclass + GetAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.GetAccountRequest").msgclass + UpdateAccountLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.UpdateAccountLabelsRequest").msgclass + Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Account").msgclass + Account::AccountType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Account.AccountType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb new file mode 100644 index 000000000000..cbe6be04f569 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_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/shopping/css/v1/version" + +require "google/shopping/css/v1/accounts_service/credentials" +require "google/shopping/css/v1/accounts_service/paths" +require "google/shopping/css/v1/accounts_service/client" +require "google/shopping/css/v1/accounts_service/rest" + +module Google + module Shopping + module Css + module V1 + ## + # Service for managing CSS/MC account information. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/css/v1/accounts_service" + # client = ::Google::Shopping::Css::V1::AccountsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/css/v1/accounts_service/rest" + # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new + # + module AccountsService + end + end + end + end +end + +helper_path = ::File.join __dir__, "accounts_service", "helpers.rb" +require "google/shopping/css/v1/accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb new file mode 100644 index 000000000000..4cab825031c9 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb @@ -0,0 +1,707 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/css/v1/accounts_pb" + +module Google + module Shopping + module Css + module V1 + module AccountsService + ## + # Client for the AccountsService service. + # + # Service for managing CSS/MC account information. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :accounts_service_stub + + ## + # Configure the AccountsService Client class. + # + # See {::Google::Shopping::Css::V1::AccountsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountsService clients + # ::Google::Shopping::Css::V1::AccountsService::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", "Shopping", "Css", "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_child_accounts.timeout = 60.0 + default_config.rpcs.list_child_accounts.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_account.timeout = 60.0 + default_config.rpcs.get_account.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_labels.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountsService 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::Shopping::Css::V1::AccountsService::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 + @accounts_service_stub.universe_domain + end + + ## + # Create a new AccountsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::AccountsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountsService 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/shopping/css/v1/accounts_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 + + @accounts_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Css::V1::AccountsService::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 + ) + + @accounts_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 + @accounts_service_stub.logger + end + + # Service calls + + ## + # Lists all the accounts under the specified CSS account ID, and + # optionally filters by label ID and account name. + # + # @overload list_child_accounts(request, options = nil) + # Pass arguments to `list_child_accounts` via a request object, either of type + # {::Google::Shopping::Css::V1::ListChildAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::ListChildAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_child_accounts(parent: nil, label_id: nil, full_name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_child_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 account. Must be a CSS group or domain. + # Format: accounts/\\{account} + # @param label_id [::Integer] + # If set, only the MC accounts with the given label ID will be returned. + # @param full_name [::String] + # If set, only the MC accounts with the given name (case sensitive) will be + # returned. + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 50 accounts will be + # returned. The maximum value is 100; values above 100 will be coerced to + # 100. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListChildAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListChildAccounts` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::Account>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::Account>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::ListChildAccountsRequest.new + # + # # Call the list_child_accounts method. + # result = client.list_child_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Css::V1::Account. + # p item + # end + # + def list_child_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListChildAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_child_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_child_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_child_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :list_child_accounts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_child_accounts, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a single CSS/MC account by ID. + # + # @overload get_account(request, options = nil) + # Pass arguments to `get_account` via a request object, either of type + # {::Google::Shopping::Css::V1::GetAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::GetAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_account(name: nil, parent: nil) + # Pass arguments to `get_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the managed CSS/MC account. + # Format: accounts/\\{account} + # @param parent [::String] + # Optional. Only required when retrieving MC account information. + # The CSS domain that is the parent resource of the MC account. + # Format: accounts/\\{account} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Css::V1::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Css::V1::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::GetAccountRequest.new + # + # # Call the get_account method. + # result = client.get_account request + # + # # The returned object is of type Google::Shopping::Css::V1::Account. + # p result + # + def get_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :get_account, request, 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 labels assigned to CSS/MC accounts by a CSS domain. + # + # @overload update_labels(request, options = nil) + # Pass arguments to `update_labels` via a request object, either of type + # {::Google::Shopping::Css::V1::UpdateAccountLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_labels(name: nil, label_ids: nil, parent: nil) + # Pass arguments to `update_labels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The label resource name. + # Format: accounts/\\{account} + # @param label_ids [::Array<::Integer>] + # The list of label IDs to overwrite the existing account label IDs. + # If the list is empty, all currently assigned label IDs will be deleted. + # @param parent [::String] + # Optional. Only required when updating MC account labels. + # The CSS domain that is the parent resource of the MC account. + # Format: accounts/\\{account} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Css::V1::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Css::V1::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new + # + # # Call the update_labels method. + # result = client.update_labels request + # + # # The returned object is of type Google::Shopping::Css::V1::Account. + # p result + # + def update_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest + + # Converts hash and nil to 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_labels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_labels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :update_labels, request, 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 AccountsService API. + # + # This class represents the configuration for AccountsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Css::V1::AccountsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_child_accounts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::AccountsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_child_accounts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_child_accounts.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Css::V1::AccountsService::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 = "css.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_child_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_child_accounts + ## + # RPC-specific configuration for `get_account` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account + ## + # RPC-specific configuration for `update_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :update_labels + + # @private + def initialize parent_rpcs = nil + list_child_accounts_config = parent_rpcs.list_child_accounts if parent_rpcs.respond_to? :list_child_accounts + @list_child_accounts = ::Gapic::Config::Method.new list_child_accounts_config + get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account + @get_account = ::Gapic::Config::Method.new get_account_config + update_labels_config = parent_rpcs.update_labels if parent_rpcs.respond_to? :update_labels + @update_labels = ::Gapic::Config::Method.new update_labels_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb new file mode 100644 index 000000000000..4584fe4873de --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Css + module V1 + module AccountsService + # Credentials for the AccountsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb new file mode 100644 index 000000000000..e069680bdb33 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Css + module V1 + module AccountsService + # Path helper methods for the AccountsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb new file mode 100644 index 000000000000..996c51dd8cec --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_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/shopping/css/v1/version" + +require "google/shopping/css/v1/accounts_service/credentials" +require "google/shopping/css/v1/accounts_service/paths" +require "google/shopping/css/v1/accounts_service/rest/client" + +module Google + module Shopping + module Css + module V1 + ## + # Service for managing CSS/MC account information. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/css/v1/accounts_service/rest" + # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new + # + module AccountsService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/css/v1/accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb new file mode 100644 index 000000000000..7aff86a899b6 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/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/shopping/css/v1/accounts_pb" +require "google/shopping/css/v1/accounts_service/rest/service_stub" + +module Google + module Shopping + module Css + module V1 + module AccountsService + module Rest + ## + # REST client for the AccountsService service. + # + # Service for managing CSS/MC account information. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :accounts_service_stub + + ## + # Configure the AccountsService Client class. + # + # See {::Google::Shopping::Css::V1::AccountsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountsService clients + # ::Google::Shopping::Css::V1::AccountsService::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", "Shopping", "Css", "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_child_accounts.timeout = 60.0 + default_config.rpcs.list_child_accounts.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_account.timeout = 60.0 + default_config.rpcs.get_account.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_labels.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountsService 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::Shopping::Css::V1::AccountsService::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 + @accounts_service_stub.universe_domain + end + + ## + # Create a new AccountsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountsService 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 + + @accounts_service_stub = ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @accounts_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 + @accounts_service_stub.logger + end + + # Service calls + + ## + # Lists all the accounts under the specified CSS account ID, and + # optionally filters by label ID and account name. + # + # @overload list_child_accounts(request, options = nil) + # Pass arguments to `list_child_accounts` via a request object, either of type + # {::Google::Shopping::Css::V1::ListChildAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::ListChildAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_child_accounts(parent: nil, label_id: nil, full_name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_child_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 account. Must be a CSS group or domain. + # Format: accounts/\\{account} + # @param label_id [::Integer] + # If set, only the MC accounts with the given label ID will be returned. + # @param full_name [::String] + # If set, only the MC accounts with the given name (case sensitive) will be + # returned. + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 50 accounts will be + # returned. The maximum value is 100; values above 100 will be coerced to + # 100. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListChildAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListChildAccounts` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::Account>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::Account>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::ListChildAccountsRequest.new + # + # # Call the list_child_accounts method. + # result = client.list_child_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Css::V1::Account. + # p item + # end + # + def list_child_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListChildAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_child_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_child_accounts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_child_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.list_child_accounts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_child_accounts, "accounts", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a single CSS/MC account by ID. + # + # @overload get_account(request, options = nil) + # Pass arguments to `get_account` via a request object, either of type + # {::Google::Shopping::Css::V1::GetAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::GetAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_account(name: nil, parent: nil) + # Pass arguments to `get_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the managed CSS/MC account. + # Format: accounts/\\{account} + # @param parent [::String] + # Optional. Only required when retrieving MC account information. + # The CSS domain that is the parent resource of the MC account. + # Format: accounts/\\{account} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::GetAccountRequest.new + # + # # Call the get_account method. + # result = client.get_account request + # + # # The returned object is of type Google::Shopping::Css::V1::Account. + # p result + # + def get_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.get_account request, 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 labels assigned to CSS/MC accounts by a CSS domain. + # + # @overload update_labels(request, options = nil) + # Pass arguments to `update_labels` via a request object, either of type + # {::Google::Shopping::Css::V1::UpdateAccountLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_labels(name: nil, label_ids: nil, parent: nil) + # Pass arguments to `update_labels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The label resource name. + # Format: accounts/\\{account} + # @param label_ids [::Array<::Integer>] + # The list of label IDs to overwrite the existing account label IDs. + # If the list is empty, all currently assigned label IDs will be deleted. + # @param parent [::String] + # Optional. Only required when updating MC account labels. + # The CSS domain that is the parent resource of the MC account. + # Format: accounts/\\{account} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new + # + # # Call the update_labels method. + # result = client.update_labels request + # + # # The returned object is of type Google::Shopping::Css::V1::Account. + # p result + # + def update_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest + + # Converts hash and nil to an 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_labels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_labels.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.update_labels request, 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 AccountsService REST API. + # + # This class represents the configuration for AccountsService 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::Shopping::Css::V1::AccountsService::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_child_accounts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::AccountsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_child_accounts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_child_accounts.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "css.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_child_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_child_accounts + ## + # RPC-specific configuration for `get_account` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account + ## + # RPC-specific configuration for `update_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :update_labels + + # @private + def initialize parent_rpcs = nil + list_child_accounts_config = parent_rpcs.list_child_accounts if parent_rpcs.respond_to? :list_child_accounts + @list_child_accounts = ::Gapic::Config::Method.new list_child_accounts_config + get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account + @get_account = ::Gapic::Config::Method.new get_account_config + update_labels_config = parent_rpcs.update_labels if parent_rpcs.respond_to? :update_labels + @update_labels = ::Gapic::Config::Method.new update_labels_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb new file mode 100644 index 000000000000..afe5123dbfaa --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb @@ -0,0 +1,265 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/css/v1/accounts_pb" + +module Google + module Shopping + module Css + module V1 + module AccountsService + module Rest + ## + # REST service stub for the AccountsService 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_child_accounts REST call + # + # @param request_pb [::Google::Shopping::Css::V1::ListChildAccountsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::ListChildAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::ListChildAccountsResponse] + # A result object deserialized from the server's reply + def list_child_accounts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_child_accounts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_child_accounts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::ListChildAccountsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_account REST call + # + # @param request_pb [::Google::Shopping::Css::V1::GetAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::Account] + # A result object deserialized from the server's reply + def get_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::Account.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_labels REST call + # + # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::Account] + # A result object deserialized from the server's reply + def update_labels request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_labels_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_labels", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::Account.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_child_accounts REST call + # + # @param request_pb [::Google::Shopping::Css::V1::ListChildAccountsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_child_accounts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}:listChildAccounts", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_account REST call + # + # @param request_pb [::Google::Shopping::Css::V1::GetAccountRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_labels REST call + # + # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest] + # 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_labels_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:updateLabels", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb new file mode 100644 index 000000000000..6528ad62148c --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/css/v1/accounts.proto for package 'Google.Shopping.Css.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/css/v1/accounts_pb' + +module Google + module Shopping + module Css + module V1 + module AccountsService + # Service for managing CSS/MC account information. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.css.v1.AccountsService' + + # Lists all the accounts under the specified CSS account ID, and + # optionally filters by label ID and account name. + rpc :ListChildAccounts, ::Google::Shopping::Css::V1::ListChildAccountsRequest, ::Google::Shopping::Css::V1::ListChildAccountsResponse + # Retrieves a single CSS/MC account by ID. + rpc :GetAccount, ::Google::Shopping::Css::V1::GetAccountRequest, ::Google::Shopping::Css::V1::Account + # Updates labels assigned to CSS/MC accounts by a CSS domain. + rpc :UpdateLabels, ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, ::Google::Shopping::Css::V1::Account + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb new file mode 100644 index 000000000000..bd5bfbf234cf --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/css/v1/css_product_common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n/google/shopping/css/v1/css_product_common.proto\x12\x16google.shopping.css.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xbc\x13\n\nAttributes\x12\x15\n\x08\x63pp_link\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63pp_mobile_link\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x10\x63pp_ads_redirect\x18* \x01(\tH\x02\x88\x01\x01\x12.\n\tlow_price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12/\n\nhigh_price\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x1d\n\x10number_of_offers\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12%\n\x18headline_offer_condition\x18\x06 \x01(\tH\x04\x88\x01\x01\x12\x39\n\x14headline_offer_price\x18\x07 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12 \n\x13headline_offer_link\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\'\n\x1aheadline_offer_mobile_link\x18\t \x01(\tH\x06\x88\x01\x01\x12\x42\n\x1dheadline_offer_shipping_price\x18) \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x12\n\x05title\x18\n \x01(\tH\x07\x88\x01\x01\x12\x17\n\nimage_link\x18\x0b \x01(\tH\x08\x88\x01\x01\x12\x1e\n\x16\x61\x64\x64itional_image_links\x18\x0c \x03(\t\x12\x18\n\x0b\x64\x65scription\x18\r \x01(\tH\t\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x0e \x01(\tH\n\x88\x01\x01\x12\x10\n\x03mpn\x18\x0f \x01(\tH\x0b\x88\x01\x01\x12\x11\n\x04gtin\x18\x10 \x01(\tH\x0c\x88\x01\x01\x12\x15\n\rproduct_types\x18$ \x03(\t\x12$\n\x17google_product_category\x18\x11 \x01(\tH\r\x88\x01\x01\x12\x12\n\x05\x61\x64ult\x18\x12 \x01(\x08H\x0e\x88\x01\x01\x12\x16\n\tmultipack\x18\x13 \x01(\x03H\x0f\x88\x01\x01\x12\x16\n\tis_bundle\x18\x14 \x01(\x08H\x10\x88\x01\x01\x12\x16\n\tage_group\x18\x15 \x01(\tH\x11\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x16 \x01(\tH\x12\x88\x01\x01\x12\x13\n\x06gender\x18\x17 \x01(\tH\x13\x88\x01\x01\x12\x15\n\x08material\x18\x18 \x01(\tH\x14\x88\x01\x01\x12\x14\n\x07pattern\x18\x19 \x01(\tH\x15\x88\x01\x01\x12\x11\n\x04size\x18\x1a \x01(\tH\x16\x88\x01\x01\x12\x18\n\x0bsize_system\x18\x1b \x01(\tH\x17\x88\x01\x01\x12\x12\n\nsize_types\x18\x1c \x03(\t\x12\x1a\n\ritem_group_id\x18\x1d \x01(\tH\x18\x88\x01\x01\x12>\n\x0fproduct_details\x18\x1e \x03(\x0b\x32%.google.shopping.css.v1.ProductDetail\x12=\n\x0eproduct_weight\x18\x1f \x01(\x0b\x32%.google.shopping.css.v1.ProductWeight\x12@\n\x0eproduct_length\x18 \x01(\x0b\x32(.google.shopping.css.v1.ProductDimension\x12?\n\rproduct_width\x18! \x01(\x0b\x32(.google.shopping.css.v1.ProductDimension\x12@\n\x0eproduct_height\x18\" \x01(\x0b\x32(.google.shopping.css.v1.ProductDimension\x12\x1a\n\x12product_highlights\x18# \x03(\t\x12=\n\x0e\x63\x65rtifications\x18\' \x03(\x0b\x32%.google.shopping.css.v1.Certification\x12\x33\n\x0f\x65xpiration_date\x18( \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1d\n\x15included_destinations\x18+ \x03(\t\x12\x1d\n\x15\x65xcluded_destinations\x18, \x03(\t\x12\x12\n\x05pause\x18- \x01(\tH\x19\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_0\x18. \x01(\tH\x1a\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_1\x18/ \x01(\tH\x1b\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_2\x18\x30 \x01(\tH\x1c\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_3\x18\x31 \x01(\tH\x1d\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_4\x18\x32 \x01(\tH\x1e\x88\x01\x01\x12T\n\x1aheadline_offer_installment\x18\x33 \x01(\x0b\x32\x30.google.shopping.css.v1.HeadlineOfferInstallment\x12_\n headline_offer_subscription_cost\x18\x34 \x01(\x0b\x32\x35.google.shopping.css.v1.HeadlineOfferSubscriptionCost\x12\x19\n\x0creview_count\x18\x36 \x01(\x03H\x1f\x88\x01\x01\x12\x17\n\nmin_rating\x18\x37 \x01(\x03H \x88\x01\x01\x12\x17\n\nmax_rating\x18\x38 \x01(\x03H!\x88\x01\x01\x12\x13\n\x06rating\x18\x39 \x01(\x01H\"\x88\x01\x01\x42\x0b\n\t_cpp_linkB\x12\n\x10_cpp_mobile_linkB\x13\n\x11_cpp_ads_redirectB\x13\n\x11_number_of_offersB\x1b\n\x19_headline_offer_conditionB\x16\n\x14_headline_offer_linkB\x1d\n\x1b_headline_offer_mobile_linkB\x08\n\x06_titleB\r\n\x0b_image_linkB\x0e\n\x0c_descriptionB\x08\n\x06_brandB\x06\n\x04_mpnB\x07\n\x05_gtinB\x1a\n\x18_google_product_categoryB\x08\n\x06_adultB\x0c\n\n_multipackB\x0c\n\n_is_bundleB\x0c\n\n_age_groupB\x08\n\x06_colorB\t\n\x07_genderB\x0b\n\t_materialB\n\n\x08_patternB\x07\n\x05_sizeB\x0e\n\x0c_size_systemB\x10\n\x0e_item_group_idB\x08\n\x06_pauseB\x11\n\x0f_custom_label_0B\x11\n\x0f_custom_label_1B\x11\n\x0f_custom_label_2B\x11\n\x0f_custom_label_3B\x11\n\x0f_custom_label_4B\x0f\n\r_review_countB\r\n\x0b_min_ratingB\r\n\x0b_max_ratingB\t\n\x07_rating\">\n\rCertification\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tauthority\x18\x02 \x01(\t\x12\x0c\n\x04\x63ode\x18\x03 \x01(\t\"V\n\rProductDetail\x12\x14\n\x0csection_name\x18\x01 \x01(\t\x12\x16\n\x0e\x61ttribute_name\x18\x02 \x01(\t\x12\x17\n\x0f\x61ttribute_value\x18\x03 \x01(\t\"9\n\x10ProductDimension\x12\x12\n\x05value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x02\"6\n\rProductWeight\x12\x12\n\x05value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xb1\x05\n\x10\x43ssProductStatus\x12X\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32:.google.shopping.css.v1.CssProductStatus.DestinationStatus\x12R\n\x11item_level_issues\x18\x04 \x03(\x0b\x32\x37.google.shopping.css.v1.CssProductStatus.ItemLevelIssue\x12\x31\n\rcreation_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_update_date\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x16google_expiration_date\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a~\n\x11\x44\x65stinationStatus\x12\x13\n\x0b\x64\x65stination\x18\x01 \x01(\t\x12\x1a\n\x12\x61pproved_countries\x18\x02 \x03(\t\x12\x19\n\x11pending_countries\x18\x03 \x03(\t\x12\x1d\n\x15\x64isapproved_countries\x18\x04 \x03(\t\x1a\xc9\x01\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x13\n\x0bservability\x18\x02 \x01(\t\x12\x12\n\nresolution\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65stination\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x07 \x01(\t\x12\x15\n\rdocumentation\x18\x08 \x01(\t\x12\x1c\n\x14\x61pplicable_countries\x18\t \x03(\t\"\x9f\x01\n\x1dHeadlineOfferSubscriptionCost\x12:\n\x06period\x18\x01 \x01(\x0e\x32*.google.shopping.css.v1.SubscriptionPeriod\x12\x15\n\rperiod_length\x18\x02 \x01(\x03\x12+\n\x06\x61mount\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\"\x89\x01\n\x18HeadlineOfferInstallment\x12\x0e\n\x06months\x18\x01 \x01(\x03\x12+\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x30\n\x0b\x64ownpayment\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price*N\n\x12SubscriptionPeriod\x12#\n\x1fSUBSCRIPTION_PERIOD_UNSPECIFIED\x10\x00\x12\t\n\x05MONTH\x10\x01\x12\x08\n\x04YEAR\x10\x02\x42\xb7\x01\n\x1a\x63om.google.shopping.css.v1B\x15\x43ssProductCommonProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Css + module V1 + Attributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Attributes").msgclass + Certification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Certification").msgclass + ProductDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ProductDetail").msgclass + ProductDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ProductDimension").msgclass + ProductWeight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ProductWeight").msgclass + CssProductStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductStatus").msgclass + CssProductStatus::DestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductStatus.DestinationStatus").msgclass + CssProductStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductStatus.ItemLevelIssue").msgclass + HeadlineOfferSubscriptionCost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.HeadlineOfferSubscriptionCost").msgclass + HeadlineOfferInstallment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.HeadlineOfferInstallment").msgclass + SubscriptionPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.SubscriptionPeriod").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb new file mode 100644 index 000000000000..4b67b42e62d4 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/css/v1/css_product_inputs.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/css/v1/css_product_common_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n/google/shopping/css/v1/css_product_inputs.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a/google/shopping/css/v1/css_product_common.proto\x1a google/shopping/type/types.proto\"\xa7\x03\n\x0f\x43ssProductInput\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\nfinal_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0fraw_provided_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nfeed_label\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x0e\x66reshness_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x36\n\nattributes\x18\x07 \x01(\x0b\x32\".google.shopping.css.v1.Attributes\x12@\n\x11\x63ustom_attributes\x18\x08 \x03(\x0b\x32%.google.shopping.type.CustomAttribute:`\xea\x41]\n\"css.googleapis.com/CssProductInput\x12\x37\x61\x63\x63ounts/{account}/cssProductInputs/{css_product_input}\"\xbb\x01\n\x1cInsertCssProductInputRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"css.googleapis.com/CssProductInput\x12G\n\x11\x63ss_product_input\x18\x02 \x01(\x0b\x32\'.google.shopping.css.v1.CssProductInputB\x03\xe0\x41\x02\x12\x16\n\x07\x66\x65\x65\x64_id\x18\x03 \x01(\x03\x42\x05\x18\x01\xe0\x41\x01\"\x98\x01\n\x1cUpdateCssProductInputRequest\x12G\n\x11\x63ss_product_input\x18\x01 \x01(\x0b\x32\'.google.shopping.css.v1.CssProductInputB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x94\x01\n\x1c\x44\x65leteCssProductInputRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"css.googleapis.com/CssProductInput\x12!\n\x14supplemental_feed_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x42\x17\n\x15_supplemental_feed_id2\xb0\x05\n\x17\x43ssProductInputsService\x12\xc2\x01\n\x15InsertCssProductInput\x12\x34.google.shopping.css.v1.InsertCssProductInputRequest\x1a\'.google.shopping.css.v1.CssProductInput\"J\x82\xd3\xe4\x93\x02\x44\"//v1/{parent=accounts/*}/cssProductInputs:insert:\x11\x63ss_product_input\x12\xed\x01\n\x15UpdateCssProductInput\x12\x34.google.shopping.css.v1.UpdateCssProductInputRequest\x1a\'.google.shopping.css.v1.CssProductInput\"u\xda\x41\x1d\x63ss_product_input,update_mask\x82\xd3\xe4\x93\x02O2:/v1/{css_product_input.name=accounts/*/cssProductInputs/*}:\x11\x63ss_product_input\x12\x9e\x01\n\x15\x44\x65leteCssProductInput\x12\x34.google.shopping.css.v1.DeleteCssProductInputRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=accounts/*/cssProductInputs/*}\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xb7\x01\n\x1a\x63om.google.shopping.css.v1B\x15\x43ssProductInputsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Css + module V1 + CssProductInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductInput").msgclass + InsertCssProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.InsertCssProductInputRequest").msgclass + UpdateCssProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.UpdateCssProductInputRequest").msgclass + DeleteCssProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.DeleteCssProductInputRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb new file mode 100644 index 000000000000..d9b82213398f --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_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/shopping/css/v1/version" + +require "google/shopping/css/v1/css_product_inputs_service/credentials" +require "google/shopping/css/v1/css_product_inputs_service/paths" +require "google/shopping/css/v1/css_product_inputs_service/client" +require "google/shopping/css/v1/css_product_inputs_service/rest" + +module Google + module Shopping + module Css + module V1 + ## + # Service to use CssProductInput resource. + # This service helps to insert/update/delete CSS Products. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/css/v1/css_product_inputs_service" + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/css/v1/css_product_inputs_service/rest" + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new + # + module CssProductInputsService + end + end + end + end +end + +helper_path = ::File.join __dir__, "css_product_inputs_service", "helpers.rb" +require "google/shopping/css/v1/css_product_inputs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb new file mode 100644 index 000000000000..03f889520666 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb @@ -0,0 +1,714 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/css/v1/css_product_inputs_pb" + +module Google + module Shopping + module Css + module V1 + module CssProductInputsService + ## + # Client for the CssProductInputsService service. + # + # Service to use CssProductInput resource. + # This service helps to insert/update/delete CSS Products. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :css_product_inputs_service_stub + + ## + # Configure the CssProductInputsService Client class. + # + # See {::Google::Shopping::Css::V1::CssProductInputsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CssProductInputsService clients + # ::Google::Shopping::Css::V1::CssProductInputsService::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", "Shopping", "Css", "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.insert_css_product_input.timeout = 60.0 + + default_config.rpcs.update_css_product_input.timeout = 60.0 + + default_config.rpcs.delete_css_product_input.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CssProductInputsService 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::Shopping::Css::V1::CssProductInputsService::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 + @css_product_inputs_service_stub.universe_domain + end + + ## + # Create a new CssProductInputsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CssProductInputsService 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/shopping/css/v1/css_product_inputs_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 + + @css_product_inputs_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Css::V1::CssProductInputsService::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 + ) + + @css_product_inputs_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 + @css_product_inputs_service_stub.logger + end + + # Service calls + + ## + # Uploads a CssProductInput to your CSS Center account. If an + # input with the same contentLanguage, identity, feedLabel and feedId already + # exists, this method replaces that entry. + # + # After inserting, updating, or deleting a CSS Product input, it may + # take several minutes before the processed CSS Product can be retrieved. + # + # @overload insert_css_product_input(request, options = nil) + # Pass arguments to `insert_css_product_input` via a request object, either of type + # {::Google::Shopping::Css::V1::InsertCssProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::InsertCssProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_css_product_input(parent: nil, css_product_input: nil, feed_id: nil) + # Pass arguments to `insert_css_product_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 account where this CSS Product will be inserted. + # Format: accounts/\\{account} + # @param css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] + # Required. The CSS Product Input to insert. + # @param feed_id [::Integer] + # Optional. DEPRECATED. Feed id is not required for CSS Products. + # The primary or supplemental feed id. If CSS Product already exists and + # feed id provided is different, then the CSS Product will be moved to a + # new feed. + # Note: For now, CSSs do not need to provide feed ids as we create + # feeds on the fly. + # We do not have supplemental feed support for CSS Products yet. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Css::V1::CssProductInput] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Css::V1::CssProductInput] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductInputsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::InsertCssProductInputRequest.new + # + # # Call the insert_css_product_input method. + # result = client.insert_css_product_input request + # + # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. + # p result + # + def insert_css_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::InsertCssProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_css_product_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::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_css_product_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_css_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_product_inputs_service_stub.call_rpc :insert_css_product_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 + + ## + # Updates the existing Css Product input in your CSS Center account. + # + # After inserting, updating, or deleting a CSS Product input, it may take + # several minutes before the processed Css Product can be retrieved. + # + # @overload update_css_product_input(request, options = nil) + # Pass arguments to `update_css_product_input` via a request object, either of type + # {::Google::Shopping::Css::V1::UpdateCssProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::UpdateCssProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_css_product_input(css_product_input: nil, update_mask: nil) + # Pass arguments to `update_css_product_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 css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] + # Required. The CSS product input resource to update. Information you submit + # will be applied to the processed CSS product as well. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of CSS product attributes to be updated. + # + # If the update mask is omitted, then it is treated as implied field mask + # equivalent to all fields that are populated (have a non-empty value). + # + # Attributes specified in the update mask without a value specified in the + # body will be deleted from the CSS product. + # + # Update mask can only be specified for top level fields in + # attributes and custom attributes. + # + # To specify the update mask for custom attributes you need to add the + # `custom_attribute.` prefix. + # + # Providing special "*" value for full CSS product replacement is not + # supported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Css::V1::CssProductInput] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Css::V1::CssProductInput] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductInputsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::UpdateCssProductInputRequest.new + # + # # Call the update_css_product_input method. + # result = client.update_css_product_input request + # + # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. + # p result + # + def update_css_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateCssProductInputRequest + + # Converts hash and nil to 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_css_product_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::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.css_product_input&.name + header_params["css_product_input.name"] = request.css_product_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_css_product_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_css_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_product_inputs_service_stub.call_rpc :update_css_product_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 a CSS Product input from your CSS Center account. + # + # After a delete it may take several minutes until the input is no longer + # available. + # + # @overload delete_css_product_input(request, options = nil) + # Pass arguments to `delete_css_product_input` via a request object, either of type + # {::Google::Shopping::Css::V1::DeleteCssProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::DeleteCssProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_css_product_input(name: nil, supplemental_feed_id: nil) + # Pass arguments to `delete_css_product_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 CSS product input resource to delete. + # Format: accounts/\\{account}/cssProductInputs/\\{css_product_input}, where the + # last section `css_product_input` consists of 3 parts: + # contentLanguage~feedLabel~offerId. Example: + # accounts/123/cssProductInputs/de~DE~rawProvidedId123 + # @param supplemental_feed_id [::Integer] + # The Content API Supplemental Feed ID. + # The field must not be set if the action applies to a primary feed. + # If the field is set, then product action applies to a supplemental feed + # instead of primary Content API feed. + # + # @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/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductInputsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::DeleteCssProductInputRequest.new + # + # # Call the delete_css_product_input method. + # result = client.delete_css_product_input request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_css_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteCssProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_css_product_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::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_css_product_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_css_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_product_inputs_service_stub.call_rpc :delete_css_product_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 + + ## + # Configuration class for the CssProductInputsService API. + # + # This class represents the configuration for CssProductInputsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Css::V1::CssProductInputsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # insert_css_product_input to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::CssProductInputsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_css_product_input.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_css_product_input.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Css::V1::CssProductInputsService::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 = "css.googleapis.com" + + config_attr :endpoint, nil, ::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 CssProductInputsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `insert_css_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_css_product_input + ## + # RPC-specific configuration for `update_css_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :update_css_product_input + ## + # RPC-specific configuration for `delete_css_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_css_product_input + + # @private + def initialize parent_rpcs = nil + insert_css_product_input_config = parent_rpcs.insert_css_product_input if parent_rpcs.respond_to? :insert_css_product_input + @insert_css_product_input = ::Gapic::Config::Method.new insert_css_product_input_config + update_css_product_input_config = parent_rpcs.update_css_product_input if parent_rpcs.respond_to? :update_css_product_input + @update_css_product_input = ::Gapic::Config::Method.new update_css_product_input_config + delete_css_product_input_config = parent_rpcs.delete_css_product_input if parent_rpcs.respond_to? :delete_css_product_input + @delete_css_product_input = ::Gapic::Config::Method.new delete_css_product_input_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb new file mode 100644 index 000000000000..066f5ca9210d --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Css + module V1 + module CssProductInputsService + # Credentials for the CssProductInputsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb new file mode 100644 index 000000000000..b71796db1d3e --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_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 Shopping + module Css + module V1 + module CssProductInputsService + # Path helper methods for the CssProductInputsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified CssProductInput resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/cssProductInputs/{css_product_input}` + # + # @param account [String] + # @param css_product_input [String] + # + # @return [::String] + def css_product_input_path account:, css_product_input: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/cssProductInputs/#{css_product_input}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb new file mode 100644 index 000000000000..06be63d42390 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_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/shopping/css/v1/version" + +require "google/shopping/css/v1/css_product_inputs_service/credentials" +require "google/shopping/css/v1/css_product_inputs_service/paths" +require "google/shopping/css/v1/css_product_inputs_service/rest/client" + +module Google + module Shopping + module Css + module V1 + ## + # Service to use CssProductInput resource. + # This service helps to insert/update/delete CSS Products. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/css/v1/css_product_inputs_service/rest" + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new + # + module CssProductInputsService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/css/v1/css_product_inputs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb new file mode 100644 index 000000000000..5236bfea7b1e --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb @@ -0,0 +1,650 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/css/v1/css_product_inputs_pb" +require "google/shopping/css/v1/css_product_inputs_service/rest/service_stub" + +module Google + module Shopping + module Css + module V1 + module CssProductInputsService + module Rest + ## + # REST client for the CssProductInputsService service. + # + # Service to use CssProductInput resource. + # This service helps to insert/update/delete CSS Products. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :css_product_inputs_service_stub + + ## + # Configure the CssProductInputsService Client class. + # + # See {::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CssProductInputsService clients + # ::Google::Shopping::Css::V1::CssProductInputsService::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", "Shopping", "Css", "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.insert_css_product_input.timeout = 60.0 + + default_config.rpcs.update_css_product_input.timeout = 60.0 + + default_config.rpcs.delete_css_product_input.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CssProductInputsService 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::Shopping::Css::V1::CssProductInputsService::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 + @css_product_inputs_service_stub.universe_domain + end + + ## + # Create a new CssProductInputsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CssProductInputsService 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 + + @css_product_inputs_service_stub = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @css_product_inputs_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 + @css_product_inputs_service_stub.logger + end + + # Service calls + + ## + # Uploads a CssProductInput to your CSS Center account. If an + # input with the same contentLanguage, identity, feedLabel and feedId already + # exists, this method replaces that entry. + # + # After inserting, updating, or deleting a CSS Product input, it may + # take several minutes before the processed CSS Product can be retrieved. + # + # @overload insert_css_product_input(request, options = nil) + # Pass arguments to `insert_css_product_input` via a request object, either of type + # {::Google::Shopping::Css::V1::InsertCssProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::InsertCssProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_css_product_input(parent: nil, css_product_input: nil, feed_id: nil) + # Pass arguments to `insert_css_product_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 account where this CSS Product will be inserted. + # Format: accounts/\\{account} + # @param css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] + # Required. The CSS Product Input to insert. + # @param feed_id [::Integer] + # Optional. DEPRECATED. Feed id is not required for CSS Products. + # The primary or supplemental feed id. If CSS Product already exists and + # feed id provided is different, then the CSS Product will be moved to a + # new feed. + # Note: For now, CSSs do not need to provide feed ids as we create + # feeds on the fly. + # We do not have supplemental feed support for CSS Products yet. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::CssProductInput] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::InsertCssProductInputRequest.new + # + # # Call the insert_css_product_input method. + # result = client.insert_css_product_input request + # + # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. + # p result + # + def insert_css_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::InsertCssProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_css_product_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::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_css_product_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_css_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_product_inputs_service_stub.insert_css_product_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 + + ## + # Updates the existing Css Product input in your CSS Center account. + # + # After inserting, updating, or deleting a CSS Product input, it may take + # several minutes before the processed Css Product can be retrieved. + # + # @overload update_css_product_input(request, options = nil) + # Pass arguments to `update_css_product_input` via a request object, either of type + # {::Google::Shopping::Css::V1::UpdateCssProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::UpdateCssProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_css_product_input(css_product_input: nil, update_mask: nil) + # Pass arguments to `update_css_product_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 css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] + # Required. The CSS product input resource to update. Information you submit + # will be applied to the processed CSS product as well. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of CSS product attributes to be updated. + # + # If the update mask is omitted, then it is treated as implied field mask + # equivalent to all fields that are populated (have a non-empty value). + # + # Attributes specified in the update mask without a value specified in the + # body will be deleted from the CSS product. + # + # Update mask can only be specified for top level fields in + # attributes and custom attributes. + # + # To specify the update mask for custom attributes you need to add the + # `custom_attribute.` prefix. + # + # Providing special "*" value for full CSS product replacement is not + # supported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::CssProductInput] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::UpdateCssProductInputRequest.new + # + # # Call the update_css_product_input method. + # result = client.update_css_product_input request + # + # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. + # p result + # + def update_css_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateCssProductInputRequest + + # Converts hash and nil to an 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_css_product_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::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_css_product_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_css_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_product_inputs_service_stub.update_css_product_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 a CSS Product input from your CSS Center account. + # + # After a delete it may take several minutes until the input is no longer + # available. + # + # @overload delete_css_product_input(request, options = nil) + # Pass arguments to `delete_css_product_input` via a request object, either of type + # {::Google::Shopping::Css::V1::DeleteCssProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::DeleteCssProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_css_product_input(name: nil, supplemental_feed_id: nil) + # Pass arguments to `delete_css_product_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 CSS product input resource to delete. + # Format: accounts/\\{account}/cssProductInputs/\\{css_product_input}, where the + # last section `css_product_input` consists of 3 parts: + # contentLanguage~feedLabel~offerId. Example: + # accounts/123/cssProductInputs/de~DE~rawProvidedId123 + # @param supplemental_feed_id [::Integer] + # The Content API Supplemental Feed ID. + # The field must not be set if the action applies to a primary feed. + # If the field is set, then product action applies to a supplemental feed + # instead of primary Content API feed. + # @yield [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/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::DeleteCssProductInputRequest.new + # + # # Call the delete_css_product_input method. + # result = client.delete_css_product_input request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_css_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteCssProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_css_product_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::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_css_product_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_css_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_product_inputs_service_stub.delete_css_product_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 + + ## + # Configuration class for the CssProductInputsService REST API. + # + # This class represents the configuration for CssProductInputsService 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::Shopping::Css::V1::CssProductInputsService::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 + # # insert_css_product_input to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_css_product_input.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_css_product_input.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "css.googleapis.com" + + config_attr :endpoint, nil, ::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 CssProductInputsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `insert_css_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_css_product_input + ## + # RPC-specific configuration for `update_css_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :update_css_product_input + ## + # RPC-specific configuration for `delete_css_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_css_product_input + + # @private + def initialize parent_rpcs = nil + insert_css_product_input_config = parent_rpcs.insert_css_product_input if parent_rpcs.respond_to? :insert_css_product_input + @insert_css_product_input = ::Gapic::Config::Method.new insert_css_product_input_config + update_css_product_input_config = parent_rpcs.update_css_product_input if parent_rpcs.respond_to? :update_css_product_input + @update_css_product_input = ::Gapic::Config::Method.new update_css_product_input_config + delete_css_product_input_config = parent_rpcs.delete_css_product_input if parent_rpcs.respond_to? :delete_css_product_input + @delete_css_product_input = ::Gapic::Config::Method.new delete_css_product_input_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb new file mode 100644 index 000000000000..3eb2aa0f1884 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_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/shopping/css/v1/css_product_inputs_pb" + +module Google + module Shopping + module Css + module V1 + module CssProductInputsService + module Rest + ## + # REST service stub for the CssProductInputsService 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 insert_css_product_input REST call + # + # @param request_pb [::Google::Shopping::Css::V1::InsertCssProductInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::CssProductInput] + # A result object deserialized from the server's reply + def insert_css_product_input request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_css_product_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: "insert_css_product_input", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::CssProductInput.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_css_product_input REST call + # + # @param request_pb [::Google::Shopping::Css::V1::UpdateCssProductInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::CssProductInput] + # A result object deserialized from the server's reply + def update_css_product_input request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_css_product_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_css_product_input", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::CssProductInput.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_css_product_input REST call + # + # @param request_pb [::Google::Shopping::Css::V1::DeleteCssProductInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_css_product_input request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_css_product_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_css_product_input", + 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 insert_css_product_input REST call + # + # @param request_pb [::Google::Shopping::Css::V1::InsertCssProductInputRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_css_product_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/cssProductInputs:insert", + body: "css_product_input", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_css_product_input REST call + # + # @param request_pb [::Google::Shopping::Css::V1::UpdateCssProductInputRequest] + # 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_css_product_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{css_product_input.name}", + body: "css_product_input", + matches: [ + ["css_product_input.name", %r{^accounts/[^/]+/cssProductInputs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_css_product_input REST call + # + # @param request_pb [::Google::Shopping::Css::V1::DeleteCssProductInputRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_css_product_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/cssProductInputs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb new file mode 100644 index 000000000000..a872c72a6951 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb @@ -0,0 +1,61 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/css/v1/css_product_inputs.proto for package 'Google.Shopping.Css.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/css/v1/css_product_inputs_pb' + +module Google + module Shopping + module Css + module V1 + module CssProductInputsService + # Service to use CssProductInput resource. + # This service helps to insert/update/delete CSS Products. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.css.v1.CssProductInputsService' + + # Uploads a CssProductInput to your CSS Center account. If an + # input with the same contentLanguage, identity, feedLabel and feedId already + # exists, this method replaces that entry. + # + # After inserting, updating, or deleting a CSS Product input, it may + # take several minutes before the processed CSS Product can be retrieved. + rpc :InsertCssProductInput, ::Google::Shopping::Css::V1::InsertCssProductInputRequest, ::Google::Shopping::Css::V1::CssProductInput + # Updates the existing Css Product input in your CSS Center account. + # + # After inserting, updating, or deleting a CSS Product input, it may take + # several minutes before the processed Css Product can be retrieved. + rpc :UpdateCssProductInput, ::Google::Shopping::Css::V1::UpdateCssProductInputRequest, ::Google::Shopping::Css::V1::CssProductInput + # Deletes a CSS Product input from your CSS Center account. + # + # After a delete it may take several minutes until the input is no longer + # available. + rpc :DeleteCssProductInput, ::Google::Shopping::Css::V1::DeleteCssProductInputRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb new file mode 100644 index 000000000000..b23a373fe93d --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/css/v1/css_products.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/shopping/css/v1/css_product_common_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n)google/shopping/css/v1/css_products.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/shopping/css/v1/css_product_common.proto\x1a google/shopping/type/types.proto\"K\n\x14GetCssProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63ss.googleapis.com/CssProduct\"\xaa\x03\n\nCssProduct\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1c\n\x0fraw_provided_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63ontent_language\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12;\n\nattributes\x18\x05 \x01(\x0b\x32\".google.shopping.css.v1.AttributesB\x03\xe0\x41\x03\x12\x45\n\x11\x63ustom_attributes\x18\x06 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x03\x12I\n\x12\x63ss_product_status\x18\x08 \x01(\x0b\x32(.google.shopping.css.v1.CssProductStatusB\x03\xe0\x41\x03:i\xea\x41\x66\n\x1d\x63ss.googleapis.com/CssProduct\x12,accounts/{account}/cssProducts/{css_product}*\x0b\x63ssProducts2\ncssProduct\"v\n\x16ListCssProductsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63ss.googleapis.com/CssProduct\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"l\n\x17ListCssProductsResponse\x12\x38\n\x0c\x63ss_products\x18\x01 \x03(\x0b\x32\".google.shopping.css.v1.CssProduct\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x98\x03\n\x12\x43ssProductsService\x12\x95\x01\n\rGetCssProduct\x12,.google.shopping.css.v1.GetCssProductRequest\x1a\".google.shopping.css.v1.CssProduct\"2\xda\x41\x04name\x82\xd3\xe4\x93\x02%\x12#/v1/{name=accounts/*/cssProducts/*}\x12\xa8\x01\n\x0fListCssProducts\x12..google.shopping.css.v1.ListCssProductsRequest\x1a/.google.shopping.css.v1.ListCssProductsResponse\"4\xda\x41\x06parent\x82\xd3\xe4\x93\x02%\x12#/v1/{parent=accounts/*}/cssProducts\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xb2\x01\n\x1a\x63om.google.shopping.css.v1B\x10\x43ssProductsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Css + module V1 + GetCssProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.GetCssProductRequest").msgclass + CssProduct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProduct").msgclass + ListCssProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListCssProductsRequest").msgclass + ListCssProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListCssProductsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb new file mode 100644 index 000000000000..ace56839641d --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_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/shopping/css/v1/version" + +require "google/shopping/css/v1/css_products_service/credentials" +require "google/shopping/css/v1/css_products_service/paths" +require "google/shopping/css/v1/css_products_service/client" +require "google/shopping/css/v1/css_products_service/rest" + +module Google + module Shopping + module Css + module V1 + ## + # Service for doing get and list on Css Products(a.k.a Aggregate Offers + # internally). + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/css/v1/css_products_service" + # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/css/v1/css_products_service/rest" + # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new + # + module CssProductsService + end + end + end + end +end + +helper_path = ::File.join __dir__, "css_products_service", "helpers.rb" +require "google/shopping/css/v1/css_products_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb new file mode 100644 index 000000000000..9bf1eb3a514c --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.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 "google/cloud/errors" +require "google/shopping/css/v1/css_products_pb" + +module Google + module Shopping + module Css + module V1 + module CssProductsService + ## + # Client for the CssProductsService service. + # + # Service for doing get and list on Css Products(a.k.a Aggregate Offers + # internally). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :css_products_service_stub + + ## + # Configure the CssProductsService Client class. + # + # See {::Google::Shopping::Css::V1::CssProductsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CssProductsService clients + # ::Google::Shopping::Css::V1::CssProductsService::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", "Shopping", "Css", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_css_product.timeout = 60.0 + default_config.rpcs.get_css_product.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_css_products.timeout = 60.0 + default_config.rpcs.list_css_products.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CssProductsService 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::Shopping::Css::V1::CssProductsService::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 + @css_products_service_stub.universe_domain + end + + ## + # Create a new CssProductsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CssProductsService 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/shopping/css/v1/css_products_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @css_products_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Css::V1::CssProductsService::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 + ) + + @css_products_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 + @css_products_service_stub.logger + end + + # Service calls + + ## + # Retrieves the processed CSS Product from your CSS Center account. After + # inserting, updating, or deleting a product input, it may take several + # minutes before the updated final product can be retrieved. + # + # @overload get_css_product(request, options = nil) + # Pass arguments to `get_css_product` via a request object, either of type + # {::Google::Shopping::Css::V1::GetCssProductRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::GetCssProductRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_css_product(name: nil) + # Pass arguments to `get_css_product` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the CSS product to retrieve. + # Format: `accounts/{account}/cssProducts/{css_product}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Css::V1::CssProduct] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Css::V1::CssProduct] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::GetCssProductRequest.new + # + # # Call the get_css_product method. + # result = client.get_css_product request + # + # # The returned object is of type Google::Shopping::Css::V1::CssProduct. + # p result + # + def get_css_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetCssProductRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_css_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::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_css_product.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_css_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_products_service_stub.call_rpc :get_css_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 the processed CSS Products in your CSS Center account. The response + # might contain fewer items than specified by pageSize. Rely on pageToken to + # determine if there are more items to be requested. + # + # After inserting, updating, or deleting a CSS product input, it may + # take several minutes before the updated processed CSS product can be + # retrieved. + # + # @overload list_css_products(request, options = nil) + # Pass arguments to `list_css_products` via a request object, either of type + # {::Google::Shopping::Css::V1::ListCssProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::ListCssProductsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_css_products(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_css_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 account/domain to list processed CSS Products for. + # Format: accounts/\\{account} + # @param page_size [::Integer] + # The maximum number of CSS Products to return. The service may return + # fewer than this value. + # The maximum value is 1000; values above 1000 will be coerced to 1000. If + # unspecified, the maximum number of CSS products will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListCssProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListCssProducts` + # must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::ListCssProductsRequest.new + # + # # Call the list_css_products method. + # result = client.list_css_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::Shopping::Css::V1::CssProduct. + # p item + # end + # + def list_css_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListCssProductsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_css_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::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_css_products.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_css_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_products_service_stub.call_rpc :list_css_products, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @css_products_service_stub, :list_css_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 + + ## + # Configuration class for the CssProductsService API. + # + # This class represents the configuration for CssProductsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Css::V1::CssProductsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_css_product to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::CssProductsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_css_product.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_css_product.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Css::V1::CssProductsService::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 = "css.googleapis.com" + + config_attr :endpoint, nil, ::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 CssProductsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_css_product` + # @return [::Gapic::Config::Method] + # + attr_reader :get_css_product + ## + # RPC-specific configuration for `list_css_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_css_products + + # @private + def initialize parent_rpcs = nil + get_css_product_config = parent_rpcs.get_css_product if parent_rpcs.respond_to? :get_css_product + @get_css_product = ::Gapic::Config::Method.new get_css_product_config + list_css_products_config = parent_rpcs.list_css_products if parent_rpcs.respond_to? :list_css_products + @list_css_products = ::Gapic::Config::Method.new list_css_products_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb new file mode 100644 index 000000000000..5656f955c92c --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Css + module V1 + module CssProductsService + # Credentials for the CssProductsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb new file mode 100644 index 000000000000..e311ef6467e0 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_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 Shopping + module Css + module V1 + module CssProductsService + # Path helper methods for the CssProductsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified CssProduct resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/cssProducts/{css_product}` + # + # @param account [String] + # @param css_product [String] + # + # @return [::String] + def css_product_path account:, css_product: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/cssProducts/#{css_product}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb new file mode 100644 index 000000000000..6c5a8ef0a46d --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_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/shopping/css/v1/version" + +require "google/shopping/css/v1/css_products_service/credentials" +require "google/shopping/css/v1/css_products_service/paths" +require "google/shopping/css/v1/css_products_service/rest/client" + +module Google + module Shopping + module Css + module V1 + ## + # Service for doing get and list on Css Products(a.k.a Aggregate Offers + # internally). + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/css/v1/css_products_service/rest" + # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new + # + module CssProductsService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/css/v1/css_products_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb new file mode 100644 index 000000000000..c9794b0bc92e --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb @@ -0,0 +1,547 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/css/v1/css_products_pb" +require "google/shopping/css/v1/css_products_service/rest/service_stub" + +module Google + module Shopping + module Css + module V1 + module CssProductsService + module Rest + ## + # REST client for the CssProductsService service. + # + # Service for doing get and list on Css Products(a.k.a Aggregate Offers + # internally). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :css_products_service_stub + + ## + # Configure the CssProductsService Client class. + # + # See {::Google::Shopping::Css::V1::CssProductsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CssProductsService clients + # ::Google::Shopping::Css::V1::CssProductsService::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", "Shopping", "Css", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_css_product.timeout = 60.0 + default_config.rpcs.get_css_product.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_css_products.timeout = 60.0 + default_config.rpcs.list_css_products.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CssProductsService 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::Shopping::Css::V1::CssProductsService::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 + @css_products_service_stub.universe_domain + end + + ## + # Create a new CssProductsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CssProductsService 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 + + @css_products_service_stub = ::Google::Shopping::Css::V1::CssProductsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @css_products_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 + @css_products_service_stub.logger + end + + # Service calls + + ## + # Retrieves the processed CSS Product from your CSS Center account. After + # inserting, updating, or deleting a product input, it may take several + # minutes before the updated final product can be retrieved. + # + # @overload get_css_product(request, options = nil) + # Pass arguments to `get_css_product` via a request object, either of type + # {::Google::Shopping::Css::V1::GetCssProductRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::GetCssProductRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_css_product(name: nil) + # Pass arguments to `get_css_product` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the CSS product to retrieve. + # Format: `accounts/{account}/cssProducts/{css_product}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::CssProduct] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::CssProduct] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::GetCssProductRequest.new + # + # # Call the get_css_product method. + # result = client.get_css_product request + # + # # The returned object is of type Google::Shopping::Css::V1::CssProduct. + # p result + # + def get_css_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetCssProductRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_css_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::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_css_product.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_css_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_products_service_stub.get_css_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 the processed CSS Products in your CSS Center account. The response + # might contain fewer items than specified by pageSize. Rely on pageToken to + # determine if there are more items to be requested. + # + # After inserting, updating, or deleting a CSS product input, it may + # take several minutes before the updated processed CSS product can be + # retrieved. + # + # @overload list_css_products(request, options = nil) + # Pass arguments to `list_css_products` via a request object, either of type + # {::Google::Shopping::Css::V1::ListCssProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::ListCssProductsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_css_products(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_css_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 account/domain to list processed CSS Products for. + # Format: accounts/\\{account} + # @param page_size [::Integer] + # The maximum number of CSS Products to return. The service may return + # fewer than this value. + # The maximum value is 1000; values above 1000 will be coerced to 1000. If + # unspecified, the maximum number of CSS products will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListCssProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListCssProducts` + # must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::ListCssProductsRequest.new + # + # # Call the list_css_products method. + # result = client.list_css_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::Shopping::Css::V1::CssProduct. + # p item + # end + # + def list_css_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListCssProductsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_css_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::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_css_products.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_css_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_products_service_stub.list_css_products request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @css_products_service_stub, :list_css_products, "css_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 + + ## + # Configuration class for the CssProductsService REST API. + # + # This class represents the configuration for CssProductsService 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::Shopping::Css::V1::CssProductsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_css_product to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_css_product.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_css_product.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "css.googleapis.com" + + config_attr :endpoint, nil, ::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 CssProductsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_css_product` + # @return [::Gapic::Config::Method] + # + attr_reader :get_css_product + ## + # RPC-specific configuration for `list_css_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_css_products + + # @private + def initialize parent_rpcs = nil + get_css_product_config = parent_rpcs.get_css_product if parent_rpcs.respond_to? :get_css_product + @get_css_product = ::Gapic::Config::Method.new get_css_product_config + list_css_products_config = parent_rpcs.list_css_products if parent_rpcs.respond_to? :list_css_products + @list_css_products = ::Gapic::Config::Method.new list_css_products_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb new file mode 100644 index 000000000000..d7eea4bfc0da --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/css/v1/css_products_pb" + +module Google + module Shopping + module Css + module V1 + module CssProductsService + module Rest + ## + # REST service stub for the CssProductsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_css_product REST call + # + # @param request_pb [::Google::Shopping::Css::V1::GetCssProductRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::CssProduct] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::CssProduct] + # A result object deserialized from the server's reply + def get_css_product request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_css_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_css_product", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::CssProduct.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_css_products REST call + # + # @param request_pb [::Google::Shopping::Css::V1::ListCssProductsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::ListCssProductsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::ListCssProductsResponse] + # A result object deserialized from the server's reply + def list_css_products request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_css_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_css_products", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::ListCssProductsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_css_product REST call + # + # @param request_pb [::Google::Shopping::Css::V1::GetCssProductRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_css_product_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/cssProducts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_css_products REST call + # + # @param request_pb [::Google::Shopping::Css::V1::ListCssProductsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_css_products_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/cssProducts", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb new file mode 100644 index 000000000000..50ec396539bb --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/css/v1/css_products.proto for package 'Google.Shopping.Css.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/css/v1/css_products_pb' + +module Google + module Shopping + module Css + module V1 + module CssProductsService + # Service for doing get and list on Css Products(a.k.a Aggregate Offers + # internally). + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.css.v1.CssProductsService' + + # Retrieves the processed CSS Product from your CSS Center account. After + # inserting, updating, or deleting a product input, it may take several + # minutes before the updated final product can be retrieved. + rpc :GetCssProduct, ::Google::Shopping::Css::V1::GetCssProductRequest, ::Google::Shopping::Css::V1::CssProduct + # Lists the processed CSS Products in your CSS Center account. The response + # might contain fewer items than specified by pageSize. Rely on pageToken to + # determine if there are more items to be requested. + # + # After inserting, updating, or deleting a CSS product input, it may + # take several minutes before the updated processed CSS product can be + # retrieved. + rpc :ListCssProducts, ::Google::Shopping::Css::V1::ListCssProductsRequest, ::Google::Shopping::Css::V1::ListCssProductsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb new file mode 100644 index 000000000000..6f35b13b6859 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/css/v1/quota.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/shopping/css/v1/quota.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa3\x02\n\nQuotaGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bquota_usage\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bquota_limit\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1f\n\x12quota_minute_limit\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x42\n\x0emethod_details\x18\x04 \x03(\x0b\x32%.google.shopping.css.v1.MethodDetailsB\x03\xe0\x41\x03:i\xea\x41\x66\n\x1d\x63ss.googleapis.com/QuotaGroup\x12,accounts/{account}/quotaGroups/{quota_group}*\x0bquotaGroups2\nquotaGroup\"b\n\rMethodDetails\x12\x13\n\x06method\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06subapi\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\x80\x01\n\x16ListQuotaGroupsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63ss.googleapis.com/QuotaGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"l\n\x17ListQuotaGroupsResponse\x12\x38\n\x0cquota_groups\x18\x01 \x03(\x0b\x32\".google.shopping.css.v1.QuotaGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf5\x01\n\x0cQuotaService\x12\xa3\x01\n\x0fListQuotaGroups\x12..google.shopping.css.v1.ListQuotaGroupsRequest\x1a/.google.shopping.css.v1.ListQuotaGroupsResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=accounts/*}/quotas\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xac\x01\n\x1a\x63om.google.shopping.css.v1B\nQuotaProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Css + module V1 + QuotaGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.QuotaGroup").msgclass + MethodDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.MethodDetails").msgclass + ListQuotaGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListQuotaGroupsRequest").msgclass + ListQuotaGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListQuotaGroupsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb new file mode 100644 index 000000000000..8318f2e1b7a3 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_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/shopping/css/v1/version" + +require "google/shopping/css/v1/quota_service/credentials" +require "google/shopping/css/v1/quota_service/paths" +require "google/shopping/css/v1/quota_service/client" +require "google/shopping/css/v1/quota_service/rest" + +module Google + module Shopping + module Css + module V1 + ## + # Service to get method call quota information per CSS API method. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/css/v1/quota_service" + # client = ::Google::Shopping::Css::V1::QuotaService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/css/v1/quota_service/rest" + # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new + # + module QuotaService + end + end + end + end +end + +helper_path = ::File.join __dir__, "quota_service", "helpers.rb" +require "google/shopping/css/v1/quota_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb new file mode 100644 index 000000000000..187b69820639 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb @@ -0,0 +1,493 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/css/v1/quota_pb" + +module Google + module Shopping + module Css + module V1 + module QuotaService + ## + # Client for the QuotaService service. + # + # Service to get method call quota information per CSS API method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :quota_service_stub + + ## + # Configure the QuotaService Client class. + # + # See {::Google::Shopping::Css::V1::QuotaService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all QuotaService clients + # ::Google::Shopping::Css::V1::QuotaService::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", "Shopping", "Css", "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_quota_groups.timeout = 60.0 + default_config.rpcs.list_quota_groups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the QuotaService 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::Shopping::Css::V1::QuotaService::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 + @quota_service_stub.universe_domain + end + + ## + # Create a new QuotaService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::QuotaService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the QuotaService 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/shopping/css/v1/quota_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 + + @quota_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Css::V1::QuotaService::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 + ) + + @quota_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 + @quota_service_stub.logger + end + + # Service calls + + ## + # Lists the daily call quota and usage per group for your CSS Center account. + # + # @overload list_quota_groups(request, options = nil) + # Pass arguments to `list_quota_groups` via a request object, either of type + # {::Google::Shopping::Css::V1::ListQuotaGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::ListQuotaGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_quota_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The CSS account that owns the collection of method quotas and + # resources. In most cases, this is the CSS domain. Format: + # accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of quotas to return in the response, used + # for paging. Defaults to 500; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Token (if provided) to retrieve the subsequent page. All other + # parameters must match the original call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::QuotaService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::ListQuotaGroupsRequest.new + # + # # Call the list_quota_groups method. + # result = client.list_quota_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Css::V1::QuotaGroup. + # p item + # end + # + def list_quota_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListQuotaGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_quota_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_quota_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @quota_service_stub.call_rpc :list_quota_groups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @quota_service_stub, :list_quota_groups, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the QuotaService API. + # + # This class represents the configuration for QuotaService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Css::V1::QuotaService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_quota_groups to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::QuotaService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Css::V1::QuotaService::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 = "css.googleapis.com" + + config_attr :endpoint, nil, ::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 QuotaService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_quota_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_quota_groups + + # @private + def initialize parent_rpcs = nil + list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups + @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb new file mode 100644 index 000000000000..300c3137cdf6 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Css + module V1 + module QuotaService + # Credentials for the QuotaService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb new file mode 100644 index 000000000000..d6952334dd8d --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Css + module V1 + module QuotaService + # Path helper methods for the QuotaService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb new file mode 100644 index 000000000000..d008263afad8 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_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/shopping/css/v1/version" + +require "google/shopping/css/v1/quota_service/credentials" +require "google/shopping/css/v1/quota_service/paths" +require "google/shopping/css/v1/quota_service/rest/client" + +module Google + module Shopping + module Css + module V1 + ## + # Service to get method call quota information per CSS API method. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/css/v1/quota_service/rest" + # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new + # + module QuotaService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/css/v1/quota_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb new file mode 100644 index 000000000000..1275fabc6b8b --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb @@ -0,0 +1,443 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/css/v1/quota_pb" +require "google/shopping/css/v1/quota_service/rest/service_stub" + +module Google + module Shopping + module Css + module V1 + module QuotaService + module Rest + ## + # REST client for the QuotaService service. + # + # Service to get method call quota information per CSS API method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :quota_service_stub + + ## + # Configure the QuotaService Client class. + # + # See {::Google::Shopping::Css::V1::QuotaService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all QuotaService clients + # ::Google::Shopping::Css::V1::QuotaService::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", "Shopping", "Css", "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_quota_groups.timeout = 60.0 + default_config.rpcs.list_quota_groups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the QuotaService 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::Shopping::Css::V1::QuotaService::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 + @quota_service_stub.universe_domain + end + + ## + # Create a new QuotaService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the QuotaService 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 + + @quota_service_stub = ::Google::Shopping::Css::V1::QuotaService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @quota_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 + @quota_service_stub.logger + end + + # Service calls + + ## + # Lists the daily call quota and usage per group for your CSS Center account. + # + # @overload list_quota_groups(request, options = nil) + # Pass arguments to `list_quota_groups` via a request object, either of type + # {::Google::Shopping::Css::V1::ListQuotaGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::ListQuotaGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_quota_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The CSS account that owns the collection of method quotas and + # resources. In most cases, this is the CSS domain. Format: + # accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of quotas to return in the response, used + # for paging. Defaults to 500; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Token (if provided) to retrieve the subsequent page. All other + # parameters must match the original call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::QuotaService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::ListQuotaGroupsRequest.new + # + # # Call the list_quota_groups method. + # result = client.list_quota_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Css::V1::QuotaGroup. + # p item + # end + # + def list_quota_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListQuotaGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_quota_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_quota_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @quota_service_stub.list_quota_groups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @quota_service_stub, :list_quota_groups, "quota_groups", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the QuotaService REST API. + # + # This class represents the configuration for QuotaService 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::Shopping::Css::V1::QuotaService::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_quota_groups to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::QuotaService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "css.googleapis.com" + + config_attr :endpoint, nil, ::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 QuotaService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_quota_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_quota_groups + + # @private + def initialize parent_rpcs = nil + list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups + @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb new file mode 100644 index 000000000000..0104aec48d94 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/css/v1/quota_pb" + +module Google + module Shopping + module Css + module V1 + module QuotaService + module Rest + ## + # REST service stub for the QuotaService 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_quota_groups REST call + # + # @param request_pb [::Google::Shopping::Css::V1::ListQuotaGroupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::ListQuotaGroupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::ListQuotaGroupsResponse] + # A result object deserialized from the server's reply + def list_quota_groups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_quota_groups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_quota_groups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::ListQuotaGroupsResponse.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_quota_groups REST call + # + # @param request_pb [::Google::Shopping::Css::V1::ListQuotaGroupsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_quota_groups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/quotas", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb new file mode 100644 index 000000000000..2176f57358bf --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb @@ -0,0 +1,45 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/css/v1/quota.proto for package 'Google.Shopping.Css.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/css/v1/quota_pb' + +module Google + module Shopping + module Css + module V1 + module QuotaService + # Service to get method call quota information per CSS API method. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.css.v1.QuotaService' + + # Lists the daily call quota and usage per group for your CSS Center account. + rpc :ListQuotaGroups, ::Google::Shopping::Css::V1::ListQuotaGroupsRequest, ::Google::Shopping::Css::V1::ListQuotaGroupsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb new file mode 100644 index 000000000000..2cc3b855b50d --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/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/shopping/css/v1/accounts_service/rest" +require "google/shopping/css/v1/account_labels_service/rest" +require "google/shopping/css/v1/css_product_inputs_service/rest" +require "google/shopping/css/v1/css_products_service/rest" +require "google/shopping/css/v1/quota_service/rest" +require "google/shopping/css/v1/version" + +module Google + module Shopping + module Css + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/css/v1/rest" + # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/version.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/version.rb new file mode 100644 index 000000000000..d1011ac40878 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/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 Shopping + module Css + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-css-v1/proto_docs/README.md new file mode 100644 index 000000000000..d5bb47472267 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# CSS 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-shopping-css-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb new file mode 100644 index 000000000000..eba13c9a7aad --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb @@ -0,0 +1,171 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Css + module V1 + # The request message for the `ListChildAccounts` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent account. Must be a CSS group or domain. + # Format: accounts/\\{account} + # @!attribute [rw] label_id + # @return [::Integer] + # If set, only the MC accounts with the given label ID will be returned. + # @!attribute [rw] full_name + # @return [::String] + # If set, only the MC accounts with the given name (case sensitive) will be + # returned. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 50 accounts will be + # returned. The maximum value is 100; values above 100 will be coerced to + # 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListChildAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListChildAccounts` must + # match the call that provided the page token. + class ListChildAccountsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListChildAccounts` method. + # @!attribute [rw] accounts + # @return [::Array<::Google::Shopping::Css::V1::Account>] + # The CSS/MC accounts returned for the specified CSS parent account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListChildAccountsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the `GetAccount` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the managed CSS/MC account. + # Format: accounts/\\{account} + # @!attribute [rw] parent + # @return [::String] + # Optional. Only required when retrieving MC account information. + # The CSS domain that is the parent resource of the MC account. + # Format: accounts/\\{account} + class GetAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the `UpdateLabels` method. + # @!attribute [rw] name + # @return [::String] + # Required. The label resource name. + # Format: accounts/\\{account} + # @!attribute [rw] label_ids + # @return [::Array<::Integer>] + # The list of label IDs to overwrite the existing account label IDs. + # If the list is empty, all currently assigned label IDs will be deleted. + # @!attribute [rw] parent + # @return [::String] + # Optional. Only required when updating MC account labels. + # The CSS domain that is the parent resource of the MC account. + # Format: accounts/\\{account} + class UpdateAccountLabelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about CSS/MC account. + # @!attribute [rw] name + # @return [::String] + # The label resource name. + # Format: accounts/\\{account} + # @!attribute [r] full_name + # @return [::String] + # Output only. Immutable. The CSS/MC account's full name. + # @!attribute [rw] display_name + # @return [::String] + # The CSS/MC account's short display name. + # @!attribute [r] homepage_uri + # @return [::String] + # Output only. Immutable. The CSS/MC account's homepage. + # @!attribute [rw] parent + # @return [::String] + # The CSS/MC account's parent resource. CSS group for CSS domains; CSS + # domain for MC accounts. Returned only if the user has access to the + # parent account. + # Note: For MC sub-accounts, this is also the CSS domain that is the parent + # resource of the MCA account, since we are effectively flattening the + # hierarchy." + # @!attribute [rw] label_ids + # @return [::Array<::Integer>] + # Manually created label IDs assigned to the CSS/MC account by a CSS parent + # account. + # @!attribute [rw] automatic_label_ids + # @return [::Array<::Integer>] + # Automatically created label IDs assigned to the MC account by + # CSS Center. + # @!attribute [r] account_type + # @return [::Google::Shopping::Css::V1::Account::AccountType] + # Output only. The type of this account. + class Account + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The account type. + module AccountType + # Unknown account type. + ACCOUNT_TYPE_UNSPECIFIED = 0 + + # CSS group account. + CSS_GROUP = 1 + + # CSS domain account. + CSS_DOMAIN = 2 + + # MC Primary CSS MCA account. + MC_PRIMARY_CSS_MCA = 3 + + # MC CSS MCA account. + MC_CSS_MCA = 4 + + # MC Marketplace MCA account. + MC_MARKETPLACE_MCA = 5 + + # MC Other MCA account. + MC_OTHER_MCA = 6 + + # MC Standalone account. + MC_STANDALONE = 7 + + # MC MCA sub-account. + MC_MCA_SUBACCOUNT = 8 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb new file mode 100644 index 000000000000..055f23e04511 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb @@ -0,0 +1,131 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Css + module V1 + # Label assigned by CSS domain or CSS group to one of its sub-accounts. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the label. + # Format: accounts/\\{account}/labels/\\{label} + # @!attribute [r] label_id + # @return [::Integer] + # Output only. The ID of the label. + # @!attribute [r] account_id + # @return [::Integer] + # Output only. The ID of account this label belongs to. + # @!attribute [rw] display_name + # @return [::String] + # The display name of this label. + # @!attribute [rw] description + # @return [::String] + # The description of this label. + # @!attribute [r] label_type + # @return [::Google::Shopping::Css::V1::AccountLabel::LabelType] + # Output only. The type of this label. + class AccountLabel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The label type. + module LabelType + # Unknown label type. + LABEL_TYPE_UNSPECIFIED = 0 + + # Indicates that the label was created manually. + MANUAL = 1 + + # Indicates that the label was created automatically by CSS Center. + AUTOMATIC = 2 + end + end + + # Request message for the `ListAccountLabels` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent account. + # Format: accounts/\\{account} + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of labels to return. The service may return fewer than + # this value. + # If unspecified, at most 50 labels will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListAccountLabels` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountLabels` must + # match the call that provided the page token. + class ListAccountLabelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListAccountLabels` method. + # @!attribute [rw] account_labels + # @return [::Array<::Google::Shopping::Css::V1::AccountLabel>] + # The labels from the specified account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListAccountLabelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the 'CreateAccountLanel' method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent account. + # Format: accounts/\\{account} + # @!attribute [rw] account_label + # @return [::Google::Shopping::Css::V1::AccountLabel] + # Required. The label to create. + class CreateAccountLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateAccountLabel` method. + # @!attribute [rw] account_label + # @return [::Google::Shopping::Css::V1::AccountLabel] + # Required. The updated label. All fields must be provided. + class UpdateAccountLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the 'DeleteAccountLabel' method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the label to delete. + # Format: accounts/\\{account}/labels/\\{label} + class DeleteAccountLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb new file mode 100644 index 000000000000..c00f0c3460d5 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb @@ -0,0 +1,436 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Css + module V1 + # Attributes for CSS Product. + # @!attribute [rw] cpp_link + # @return [::String] + # URL directly linking to your the Product Detail Page of the CSS. + # @!attribute [rw] cpp_mobile_link + # @return [::String] + # URL for the mobile-optimized version of the Product Detail Page of the CSS. + # @!attribute [rw] cpp_ads_redirect + # @return [::String] + # Allows advertisers to override the item URL when the product is shown + # within the context of Product Ads. + # @!attribute [rw] low_price + # @return [::Google::Shopping::Type::Price] + # Low Price of the CSS Product. + # @!attribute [rw] high_price + # @return [::Google::Shopping::Type::Price] + # High Price of the CSS Product. + # @!attribute [rw] number_of_offers + # @return [::Integer] + # The number of CSS Products. + # @!attribute [rw] headline_offer_condition + # @return [::String] + # Condition of the headline offer. + # @!attribute [rw] headline_offer_price + # @return [::Google::Shopping::Type::Price] + # Headline Price of the CSS Product. + # @!attribute [rw] headline_offer_link + # @return [::String] + # Link to the headline offer. + # @!attribute [rw] headline_offer_mobile_link + # @return [::String] + # Mobile Link to the headline offer. + # @!attribute [rw] headline_offer_shipping_price + # @return [::Google::Shopping::Type::Price] + # Headline Price of the CSS Product. + # @!attribute [rw] title + # @return [::String] + # Title of the item. + # @!attribute [rw] image_link + # @return [::String] + # URL of an image of the item. + # @!attribute [rw] additional_image_links + # @return [::Array<::String>] + # Additional URL of images of the item. + # @!attribute [rw] description + # @return [::String] + # Description of the item. + # @!attribute [rw] brand + # @return [::String] + # Product Related Attributes.[14-36] + # Brand of the item. + # @!attribute [rw] mpn + # @return [::String] + # Manufacturer Part Number + # ([MPN](https://support.google.com/merchants/answer/188494#mpn)) of the + # item. + # @!attribute [rw] gtin + # @return [::String] + # Global Trade Item Number + # ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the + # item. + # @!attribute [rw] product_types + # @return [::Array<::String>] + # Categories of the item (formatted as in [products data + # specification](https://support.google.com/merchants/answer/6324406)). + # @!attribute [rw] google_product_category + # @return [::String] + # Google's category of the item (see [Google product + # taxonomy](https://support.google.com/merchants/answer/1705911)). When + # querying products, this field will contain the user provided value. There + # is currently no way to get back the auto assigned google product + # categories through the API. + # @!attribute [rw] adult + # @return [::Boolean] + # Set to true if the item is targeted towards adults. + # @!attribute [rw] multipack + # @return [::Integer] + # The number of identical products in a merchant-defined multipack. + # @!attribute [rw] is_bundle + # @return [::Boolean] + # Whether the item is a merchant-defined bundle. A bundle is a custom + # grouping of different products sold by a merchant for a single price. + # @!attribute [rw] age_group + # @return [::String] + # Target age group of the item. + # @!attribute [rw] color + # @return [::String] + # Color of the item. + # @!attribute [rw] gender + # @return [::String] + # Target gender of the item. + # @!attribute [rw] material + # @return [::String] + # The material of which the item is made. + # @!attribute [rw] pattern + # @return [::String] + # The item's pattern (e.g. polka dots). + # @!attribute [rw] size + # @return [::String] + # Size of the item. Only one value is allowed. For variants with different + # sizes, insert a separate product for each size with the same + # `itemGroupId` value (see + # [https://support.google.com/merchants/answer/6324492](size definition)). + # @!attribute [rw] size_system + # @return [::String] + # System in which the size is specified. Recommended for apparel items. + # @!attribute [rw] size_types + # @return [::Array<::String>] + # The cut of the item. It can be used to represent combined size types for + # apparel items. Maximum two of size types can be provided (see + # [size type](https://support.google.com/merchants/answer/6324497). + # @!attribute [rw] item_group_id + # @return [::String] + # Shared identifier for all variants of the same product. + # @!attribute [rw] product_details + # @return [::Array<::Google::Shopping::Css::V1::ProductDetail>] + # Technical specification or additional product details. + # @!attribute [rw] product_weight + # @return [::Google::Shopping::Css::V1::ProductWeight] + # The weight of the product in the units provided. The value must be + # between 0 (exclusive) and 2000 (inclusive). + # @!attribute [rw] product_length + # @return [::Google::Shopping::Css::V1::ProductDimension] + # The length of the product in the units provided. The value must be + # between 0 (exclusive) and 3000 (inclusive). + # @!attribute [rw] product_width + # @return [::Google::Shopping::Css::V1::ProductDimension] + # The width of the product in the units provided. The value must be between + # 0 (exclusive) and 3000 (inclusive). + # @!attribute [rw] product_height + # @return [::Google::Shopping::Css::V1::ProductDimension] + # The height of the product in the units provided. The value must be + # between + # 0 (exclusive) and 3000 (inclusive). + # @!attribute [rw] product_highlights + # @return [::Array<::String>] + # Bullet points describing the most relevant highlights of a product. + # @!attribute [rw] certifications + # @return [::Array<::Google::Shopping::Css::V1::Certification>] + # A list of certificates claimed by the CSS for the given product. + # @!attribute [rw] expiration_date + # @return [::Google::Protobuf::Timestamp] + # Date on which the item should expire, as specified upon insertion, in + # [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. The actual + # expiration date is exposed in `productstatuses` as + # [googleExpirationDate](https://support.google.com/merchants/answer/6324499) + # and might be earlier if `expirationDate` is too far in the future. + # Note: It may take 2+ days from the expiration date for the item to + # actually get deleted. + # @!attribute [rw] included_destinations + # @return [::Array<::String>] + # The list of destinations to include for this target (corresponds to + # checked check boxes in Merchant Center). Default destinations are always + # included unless provided in `excludedDestinations`. + # @!attribute [rw] excluded_destinations + # @return [::Array<::String>] + # The list of destinations to exclude for this target (corresponds to + # unchecked check boxes in Merchant Center). + # @!attribute [rw] pause + # @return [::String] + # Publication of this item will be temporarily paused. + # @!attribute [rw] custom_label_0 + # @return [::String] + # Custom label 0 for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_1 + # @return [::String] + # Custom label 1 for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_2 + # @return [::String] + # Custom label 2 for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_3 + # @return [::String] + # Custom label 3 for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_4 + # @return [::String] + # Custom label 4 for custom grouping of items in a Shopping campaign. + # @!attribute [rw] headline_offer_installment + # @return [::Google::Shopping::Css::V1::HeadlineOfferInstallment] + # Number and amount of installments to pay for an item. + # @!attribute [rw] headline_offer_subscription_cost + # @return [::Google::Shopping::Css::V1::HeadlineOfferSubscriptionCost] + # Number of periods (months or years) and amount of payment per period + # for an item with an associated subscription contract. + # @!attribute [rw] review_count + # @return [::Integer] + # Number of reviews of the product. Required if + # {::Google::Shopping::Css::V1::Attributes#rating `rating`} is provided. + # This field is for an upcoming feature and is not yet used. + # @!attribute [rw] min_rating + # @return [::Integer] + # Minimum rating score of the product. Required if + # {::Google::Shopping::Css::V1::Attributes#rating `rating`} is provided. + # This field is for an upcoming feature and is not yet used. + # @!attribute [rw] max_rating + # @return [::Integer] + # Maximum rating score of the product. Required if + # {::Google::Shopping::Css::V1::Attributes#rating `rating`} is provided. + # This field is for an upcoming feature and is not yet used. + # @!attribute [rw] rating + # @return [::Float] + # Average rating score of the product. The value must be within the + # range of [`min_rating`, `max_rating`], inclusive. When displayed on the + # product page, this rating is normalized to a scale of [1, 5] with one + # decimal place. If provided, + # {::Google::Shopping::Css::V1::Attributes#review_count `review_count`}, + # {::Google::Shopping::Css::V1::Attributes#min_rating `min_rating`}, and + # {::Google::Shopping::Css::V1::Attributes#max_rating `max_rating`} are also + # required. This field is for an upcoming feature and is not yet used. + class Attributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The certification for the product. Use the this attribute to describe + # certifications, such as energy efficiency ratings, associated with a product. + # @!attribute [rw] name + # @return [::String] + # The name of the certification. At this time, the most common value is + # "EPREL", which represents energy efficiency certifications in the EU + # European Registry for Energy Labeling (EPREL) database. + # @!attribute [rw] authority + # @return [::String] + # The authority or certification body responsible for issuing the + # certification. At this time, the most common value is "EC" or + # “European_Commission” for energy labels in the EU. + # @!attribute [rw] code + # @return [::String] + # The code of the certification. For example, for the EPREL certificate with + # the link https://eprel.ec.europa.eu/screen/product/dishwashers2019/123456 + # the code is 123456. The code is required for European Energy Labels. + class Certification + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The product details. + # @!attribute [rw] section_name + # @return [::String] + # The section header used to group a set of product details. + # @!attribute [rw] attribute_name + # @return [::String] + # The name of the product detail. + # @!attribute [rw] attribute_value + # @return [::String] + # The value of the product detail. + class ProductDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dimension of the product. + # @!attribute [rw] value + # @return [::Float] + # Required. The dimension value represented as a number. The value can have a + # maximum precision of four decimal places. + # @!attribute [rw] unit + # @return [::String] + # Required. The dimension units. + # Acceptable values are: + # * "`in`" + # * "`cm`" + class ProductDimension + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The weight of the product. + # @!attribute [rw] value + # @return [::Float] + # Required. The weight represented as a number. The weight can have a maximum + # precision of four decimal places. + # @!attribute [rw] unit + # @return [::String] + # Required. The weight unit. + # Acceptable values are: + # * "`g`" + # * "`kg`" + # * "`oz`" + # * "`lb`" + class ProductWeight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The status of the Css Product, data validation issues, that is, + # information about the Css Product computed asynchronously. + # @!attribute [rw] destination_statuses + # @return [::Array<::Google::Shopping::Css::V1::CssProductStatus::DestinationStatus>] + # The intended destinations for the product. + # @!attribute [rw] item_level_issues + # @return [::Array<::Google::Shopping::Css::V1::CssProductStatus::ItemLevelIssue>] + # A list of all issues associated with the product. + # @!attribute [rw] creation_date + # @return [::Google::Protobuf::Timestamp] + # Date on which the item has been created, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + # @!attribute [rw] last_update_date + # @return [::Google::Protobuf::Timestamp] + # Date on which the item has been last updated, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + # @!attribute [rw] google_expiration_date + # @return [::Google::Protobuf::Timestamp] + # Date on which the item expires, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + class CssProductStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The destination status of the product status. + # @!attribute [rw] destination + # @return [::String] + # The name of the destination + # @!attribute [rw] approved_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where the CSS Product is + # approved. + # @!attribute [rw] pending_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where the CSS Product is + # pending approval. + # @!attribute [rw] disapproved_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where the CSS Product is + # disapproved. + class DestinationStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ItemLevelIssue of the product status. + # @!attribute [rw] code + # @return [::String] + # The error code of the issue. + # @!attribute [rw] servability + # @return [::String] + # How this issue affects serving of the CSS Product. + # @!attribute [rw] resolution + # @return [::String] + # Whether the issue can be resolved by the merchant. + # @!attribute [rw] attribute + # @return [::String] + # The attribute's name, if the issue is caused by a single attribute. + # @!attribute [rw] destination + # @return [::String] + # The destination the issue applies to. + # @!attribute [rw] description + # @return [::String] + # A short issue description in English. + # @!attribute [rw] detail + # @return [::String] + # A detailed issue description in English. + # @!attribute [rw] documentation + # @return [::String] + # The URL of a web page to help with resolving this issue. + # @!attribute [rw] applicable_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where issue applies to the + # CSS Product. + class ItemLevelIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The SubscriptionCost of the product. + # @!attribute [rw] period + # @return [::Google::Shopping::Css::V1::SubscriptionPeriod] + # The type of subscription period. + # Supported values are: + # * "`month`" + # * "`year`" + # @!attribute [rw] period_length + # @return [::Integer] + # The number of subscription periods the buyer has to pay. + # @!attribute [rw] amount + # @return [::Google::Shopping::Type::Price] + # The amount the buyer has to pay per subscription period. + class HeadlineOfferSubscriptionCost + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents installment. + # @!attribute [rw] months + # @return [::Integer] + # The number of installments the buyer has to pay. + # @!attribute [rw] amount + # @return [::Google::Shopping::Type::Price] + # The amount the buyer has to pay per month. + # @!attribute [rw] downpayment + # @return [::Google::Shopping::Type::Price] + # The up-front down payment amount the buyer has to pay. + class HeadlineOfferInstallment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The subscription period of the product. + module SubscriptionPeriod + # Indicates that the subscription period is unspecified. + SUBSCRIPTION_PERIOD_UNSPECIFIED = 0 + + # Indicates that the subscription period is month. + MONTH = 1 + + # Indicates that the subscription period is year. + YEAR = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb new file mode 100644 index 000000000000..c6945a0046a9 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb @@ -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! + + +module Google + module Shopping + module Css + module V1 + # This resource represents input data you submit for a CSS Product, not + # the processed CSS Product that you see in CSS Center, in Shopping Ads, or + # across Google surfaces. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the CSS Product input. + # Format: + # `accounts/{account}/cssProductInputs/{css_product_input}`, where the + # last section `css_product_input` consists of 3 parts: + # contentLanguage~feedLabel~offerId. Example: + # accounts/123/cssProductInputs/de~DE~rawProvidedId123 + # @!attribute [r] final_name + # @return [::String] + # Output only. The name of the processed CSS Product. + # Format: + # `accounts/{account}/cssProducts/{css_product}` + # " + # @!attribute [rw] raw_provided_id + # @return [::String] + # Required. Your unique identifier for the CSS Product. This is the same for + # the CSS Product input and processed CSS Product. We only allow ids with + # alphanumerics, underscores and dashes. See the [products feed + # specification](https://support.google.com/merchants/answer/188494#id) for + # details. + # @!attribute [rw] content_language + # @return [::String] + # Required. The two-letter [ISO + # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the CSS + # Product. + # @!attribute [rw] feed_label + # @return [::String] + # Required. The [feed + # label](https://developers.google.com/shopping-content/guides/products/feed-labels) + # for the CSS Product. + # Feed Label is synonymous to "target country" and hence should always be a + # valid region code. For example: 'DE' for Germany, 'FR' for France. + # @!attribute [rw] freshness_time + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Timestamp] + # DEPRECATED. Use expiration_date instead. + # Represents the existing version (freshness) of the CSS Product, which + # can be used to preserve the right order when multiple updates are done at + # the same time. + # + # This field must not be set to the future time. + # + # If set, the update is prevented if a newer version of the item already + # exists in our system (that is the last update time of the existing + # CSS products is later than the freshness time set in the update). If + # the update happens, the last update time is then set to this freshness + # time. + # + # If not set, the update will not be prevented and the last update time will + # default to when this request was received by the CSS API. + # + # If the operation is prevented, the aborted exception will be + # thrown. + # @!attribute [rw] attributes + # @return [::Google::Shopping::Css::V1::Attributes] + # A list of CSS Product attributes. + # @!attribute [rw] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # A list of custom (CSS-provided) attributes. It can also be used for + # submitting any attribute of the feed specification in its generic + # form (for example: + # `{ "name": "size type", "value": "regular" }`). + # This is useful for submitting attributes not explicitly exposed by the + # API, such as additional attributes used for Buy on Google. + class CssProductInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the InsertCssProductInput method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account where this CSS Product will be inserted. + # Format: accounts/\\{account} + # @!attribute [rw] css_product_input + # @return [::Google::Shopping::Css::V1::CssProductInput] + # Required. The CSS Product Input to insert. + # @!attribute [rw] feed_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # Optional. DEPRECATED. Feed id is not required for CSS Products. + # The primary or supplemental feed id. If CSS Product already exists and + # feed id provided is different, then the CSS Product will be moved to a + # new feed. + # Note: For now, CSSs do not need to provide feed ids as we create + # feeds on the fly. + # We do not have supplemental feed support for CSS Products yet. + class InsertCssProductInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateCssProductInput method. + # @!attribute [rw] css_product_input + # @return [::Google::Shopping::Css::V1::CssProductInput] + # Required. The CSS product input resource to update. Information you submit + # will be applied to the processed CSS product as well. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of CSS product attributes to be updated. + # + # If the update mask is omitted, then it is treated as implied field mask + # equivalent to all fields that are populated (have a non-empty value). + # + # Attributes specified in the update mask without a value specified in the + # body will be deleted from the CSS product. + # + # Update mask can only be specified for top level fields in + # attributes and custom attributes. + # + # To specify the update mask for custom attributes you need to add the + # `custom_attribute.` prefix. + # + # Providing special "*" value for full CSS product replacement is not + # supported. + class UpdateCssProductInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteCssProductInput method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the CSS product input resource to delete. + # Format: accounts/\\{account}/cssProductInputs/\\{css_product_input}, where the + # last section `css_product_input` consists of 3 parts: + # contentLanguage~feedLabel~offerId. Example: + # accounts/123/cssProductInputs/de~DE~rawProvidedId123 + # @!attribute [rw] supplemental_feed_id + # @return [::Integer] + # The Content API Supplemental Feed ID. + # The field must not be set if the action applies to a primary feed. + # If the field is set, then product action applies to a supplemental feed + # instead of primary Content API feed. + class DeleteCssProductInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb new file mode 100644 index 000000000000..d61414008787 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb @@ -0,0 +1,110 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Css + module V1 + # The request message for the `GetCssProduct` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the CSS product to retrieve. + # Format: `accounts/{account}/cssProducts/{css_product}` + class GetCssProductRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The processed CSS Product. + # @!attribute [rw] name + # @return [::String] + # The name of the CSS Product. + # Format: + # `"accounts/{account}/cssProducts/{css_product}"` + # @!attribute [r] raw_provided_id + # @return [::String] + # Output only. Your unique raw identifier for the product. + # @!attribute [r] content_language + # @return [::String] + # Output only. The two-letter [ISO + # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the + # product. + # @!attribute [r] feed_label + # @return [::String] + # Output only. The feed label for the product. + # @!attribute [r] attributes + # @return [::Google::Shopping::Css::V1::Attributes] + # Output only. A list of product attributes. + # @!attribute [r] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Output only. A list of custom (CSS-provided) attributes. It can also be + # used to submit any attribute of the feed specification in its generic form + # (for example, + # `{ "name": "size type", "value": "regular" }`). + # This is useful for submitting attributes not explicitly exposed by the + # API, such as additional attributes used for Buy on Google. + # @!attribute [r] css_product_status + # @return [::Google::Shopping::Css::V1::CssProductStatus] + # Output only. The status of a product, data validation issues, that is, + # information about a product computed asynchronously. + class CssProduct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListCssProducts method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account/domain to list processed CSS Products for. + # Format: accounts/\\{account} + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of CSS Products to return. The service may return + # fewer than this value. + # The maximum value is 1000; values above 1000 will be coerced to 1000. If + # unspecified, the maximum number of CSS products will be returned. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListCssProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListCssProducts` + # must match the call that provided the page token. + class ListCssProductsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListCssProducts method. + # @!attribute [rw] css_products + # @return [::Array<::Google::Shopping::Css::V1::CssProduct>] + # The processed CSS products from the specified account. These are your + # processed CSS products after applying rules and supplemental feeds. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListCssProductsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb new file mode 100644 index 000000000000..d0d83c380b21 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb @@ -0,0 +1,110 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Css + module V1 + # The group information for methods in the CSS API. The quota is shared + # between all methods in the group. Even if none of the methods within the + # group have usage the information for the group is returned. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the quota group. + # Format: accounts/\\{account}/quotas/\\{group} + # Example: `accounts/12345678/quotas/css-products-insert` + # Note: The \\{group} part is not guaranteed to follow a specific pattern. + # @!attribute [r] quota_usage + # @return [::Integer] + # Output only. The current quota usage, meaning the number of calls already + # made on a given day to the methods in the group. The daily quota limits + # reset at at 12:00 PM midday UTC. + # @!attribute [r] quota_limit + # @return [::Integer] + # Output only. The maximum number of calls allowed per day for the group. + # @!attribute [r] quota_minute_limit + # @return [::Integer] + # Output only. The maximum number of calls allowed per minute for the group. + # @!attribute [r] method_details + # @return [::Array<::Google::Shopping::Css::V1::MethodDetails>] + # Output only. List of all methods group quota applies to. + class QuotaGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The method details per method in the CSS API. + # @!attribute [r] method + # @return [::String] + # Output only. The name of the method for example + # `cssproductsservice.listcssproducts`. + # @!attribute [r] version + # @return [::String] + # Output only. The API version that the method belongs to. + # @!attribute [r] subapi + # @return [::String] + # Output only. The sub-API that the method belongs to. In the CSS API, this + # is always `css`. + # @!attribute [r] path + # @return [::String] + # Output only. The path for the method such as + # `v1/cssproductsservice.listcssproducts`. + class MethodDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListQuotaGroups method. + # @!attribute [rw] parent + # @return [::String] + # Required. The CSS account that owns the collection of method quotas and + # resources. In most cases, this is the CSS domain. Format: + # accounts/\\{account} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of quotas to return in the response, used + # for paging. Defaults to 500; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token (if provided) to retrieve the subsequent page. All other + # parameters must match the original call that provided the page token. + class ListQuotaGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListMethodGroups method. + # @!attribute [rw] quota_groups + # @return [::Array<::Google::Shopping::Css::V1::QuotaGroup>] + # The methods, current quota usage and limits per each group. The quota is + # shared between all methods in the group. The groups are sorted in + # descending order based on + # {::Google::Shopping::Css::V1::QuotaGroup#quota_usage quota_usage}. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListQuotaGroupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.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! + + +module Google + module Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + + # Youtube shopping checkout. + YOUTUBE_SHOPPING_CHECKOUT = 7 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 8 + + # [Free vehicle + # listings](https://support.google.com/merchants/answer/11189169). + FREE_VEHICLE_LISTINGS = 9 + + # [Vehicle ads](https://support.google.com/merchants/answer/11189169). + VEHICLE_ADS = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free product listings on UCP + # checkout](https://developers.google.com/merchant/ucp). + FREE_LISTINGS_UCP_CHECKOUT = 19 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 18 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + + # [Product + # Reviews](https://support.google.com/merchants/answer/14620732). + PRODUCT_REVIEWS = 15 + + # [Merchant + # Reviews](https://developers.google.com/merchant-review-feeds). + MERCHANT_REVIEWS = 16 + + # YouTube Checkout + # . + YOUTUBE_CHECKOUT = 17 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-css-v1/snippets/Gemfile new file mode 100644 index 000000000000..64af0f406f42 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1", path: "../" +else + gem "google-shopping-css-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-shopping-css-v1/snippets/account_labels_service/create_account_label.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb new file mode 100644 index 000000000000..3e0da7936320 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_AccountLabelsService_CreateAccountLabel_sync] +require "google/shopping/css/v1" + +## +# Snippet for the create_account_label call in the AccountLabelsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::AccountLabelsService::Client#create_account_label. +# +def create_account_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::AccountLabelsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::CreateAccountLabelRequest.new + + # Call the create_account_label method. + result = client.create_account_label request + + # The returned object is of type Google::Shopping::Css::V1::AccountLabel. + p result +end +# [END css_v1_generated_AccountLabelsService_CreateAccountLabel_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb new file mode 100644 index 000000000000..37acf2da6b88 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_AccountLabelsService_DeleteAccountLabel_sync] +require "google/shopping/css/v1" + +## +# Snippet for the delete_account_label call in the AccountLabelsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::AccountLabelsService::Client#delete_account_label. +# +def delete_account_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::AccountLabelsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::DeleteAccountLabelRequest.new + + # Call the delete_account_label method. + result = client.delete_account_label request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END css_v1_generated_AccountLabelsService_DeleteAccountLabel_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb new file mode 100644 index 000000000000..b6e45b80ec3f --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.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 css_v1_generated_AccountLabelsService_ListAccountLabels_sync] +require "google/shopping/css/v1" + +## +# Snippet for the list_account_labels call in the AccountLabelsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::AccountLabelsService::Client#list_account_labels. +# +def list_account_labels + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::AccountLabelsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::ListAccountLabelsRequest.new + + # Call the list_account_labels method. + result = client.list_account_labels request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Css::V1::AccountLabel. + p item + end +end +# [END css_v1_generated_AccountLabelsService_ListAccountLabels_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb new file mode 100644 index 000000000000..3a87e7d4688c --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_AccountLabelsService_UpdateAccountLabel_sync] +require "google/shopping/css/v1" + +## +# Snippet for the update_account_label call in the AccountLabelsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::AccountLabelsService::Client#update_account_label. +# +def update_account_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::AccountLabelsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::UpdateAccountLabelRequest.new + + # Call the update_account_label method. + result = client.update_account_label request + + # The returned object is of type Google::Shopping::Css::V1::AccountLabel. + p result +end +# [END css_v1_generated_AccountLabelsService_UpdateAccountLabel_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb new file mode 100644 index 000000000000..99a758913d47 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_AccountsService_GetAccount_sync] +require "google/shopping/css/v1" + +## +# Snippet for the get_account call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::AccountsService::Client#get_account. +# +def get_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::GetAccountRequest.new + + # Call the get_account method. + result = client.get_account request + + # The returned object is of type Google::Shopping::Css::V1::Account. + p result +end +# [END css_v1_generated_AccountsService_GetAccount_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb new file mode 100644 index 000000000000..56b92aa4cccf --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.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 css_v1_generated_AccountsService_ListChildAccounts_sync] +require "google/shopping/css/v1" + +## +# Snippet for the list_child_accounts call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::AccountsService::Client#list_child_accounts. +# +def list_child_accounts + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::ListChildAccountsRequest.new + + # Call the list_child_accounts method. + result = client.list_child_accounts request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Css::V1::Account. + p item + end +end +# [END css_v1_generated_AccountsService_ListChildAccounts_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb new file mode 100644 index 000000000000..d5f667ab066e --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_AccountsService_UpdateLabels_sync] +require "google/shopping/css/v1" + +## +# Snippet for the update_labels call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::AccountsService::Client#update_labels. +# +def update_labels + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new + + # Call the update_labels method. + result = client.update_labels request + + # The returned object is of type Google::Shopping::Css::V1::Account. + p result +end +# [END css_v1_generated_AccountsService_UpdateLabels_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb new file mode 100644 index 000000000000..006857df17cf --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_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 css_v1_generated_CssProductInputsService_DeleteCssProductInput_sync] +require "google/shopping/css/v1" + +## +# Snippet for the delete_css_product_input call in the CssProductInputsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::CssProductInputsService::Client#delete_css_product_input. +# +def delete_css_product_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::CssProductInputsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::DeleteCssProductInputRequest.new + + # Call the delete_css_product_input method. + result = client.delete_css_product_input request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END css_v1_generated_CssProductInputsService_DeleteCssProductInput_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb new file mode 100644 index 000000000000..1acf0e41e05a --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_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 css_v1_generated_CssProductInputsService_InsertCssProductInput_sync] +require "google/shopping/css/v1" + +## +# Snippet for the insert_css_product_input call in the CssProductInputsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::CssProductInputsService::Client#insert_css_product_input. +# +def insert_css_product_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::CssProductInputsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::InsertCssProductInputRequest.new + + # Call the insert_css_product_input method. + result = client.insert_css_product_input request + + # The returned object is of type Google::Shopping::Css::V1::CssProductInput. + p result +end +# [END css_v1_generated_CssProductInputsService_InsertCssProductInput_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb new file mode 100644 index 000000000000..b0f42257db06 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_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 css_v1_generated_CssProductInputsService_UpdateCssProductInput_sync] +require "google/shopping/css/v1" + +## +# Snippet for the update_css_product_input call in the CssProductInputsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::CssProductInputsService::Client#update_css_product_input. +# +def update_css_product_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::CssProductInputsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::UpdateCssProductInputRequest.new + + # Call the update_css_product_input method. + result = client.update_css_product_input request + + # The returned object is of type Google::Shopping::Css::V1::CssProductInput. + p result +end +# [END css_v1_generated_CssProductInputsService_UpdateCssProductInput_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb new file mode 100644 index 000000000000..859163887d62 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_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 css_v1_generated_CssProductsService_GetCssProduct_sync] +require "google/shopping/css/v1" + +## +# Snippet for the get_css_product call in the CssProductsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::CssProductsService::Client#get_css_product. +# +def get_css_product + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::CssProductsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::GetCssProductRequest.new + + # Call the get_css_product method. + result = client.get_css_product request + + # The returned object is of type Google::Shopping::Css::V1::CssProduct. + p result +end +# [END css_v1_generated_CssProductsService_GetCssProduct_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb new file mode 100644 index 000000000000..e65a9a1d0a0a --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_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 css_v1_generated_CssProductsService_ListCssProducts_sync] +require "google/shopping/css/v1" + +## +# Snippet for the list_css_products call in the CssProductsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::CssProductsService::Client#list_css_products. +# +def list_css_products + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::CssProductsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::ListCssProductsRequest.new + + # Call the list_css_products method. + result = client.list_css_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::Shopping::Css::V1::CssProduct. + p item + end +end +# [END css_v1_generated_CssProductsService_ListCssProducts_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb b/owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb new file mode 100644 index 000000000000..3efd74d00a2a --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_QuotaService_ListQuotaGroups_sync] +require "google/shopping/css/v1" + +## +# Snippet for the list_quota_groups call in the QuotaService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::QuotaService::Client#list_quota_groups. +# +def list_quota_groups + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::QuotaService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::ListQuotaGroupsRequest.new + + # Call the list_quota_groups method. + result = client.list_quota_groups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Css::V1::QuotaGroup. + p item + end +end +# [END css_v1_generated_QuotaService_ListQuotaGroups_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json b/owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json new file mode 100644 index 000000000000..eef1fd62fe59 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json @@ -0,0 +1,535 @@ +{ + "client_library": { + "name": "google-shopping-css-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.css.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "css_v1_generated_AccountsService_ListChildAccounts_sync", + "title": "Snippet for the list_child_accounts call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountsService::Client#list_child_accounts.", + "file": "accounts_service/list_child_accounts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_child_accounts", + "full_name": "::Google::Shopping::Css::V1::AccountsService::Client#list_child_accounts", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::ListChildAccountsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::ListChildAccountsResponse", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Css::V1::AccountsService::Client" + }, + "method": { + "short_name": "ListChildAccounts", + "full_name": "google.shopping.css.v1.AccountsService.ListChildAccounts", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.css.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_AccountsService_GetAccount_sync", + "title": "Snippet for the get_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountsService::Client#get_account.", + "file": "accounts_service/get_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_account", + "full_name": "::Google::Shopping::Css::V1::AccountsService::Client#get_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::GetAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Css::V1::AccountsService::Client" + }, + "method": { + "short_name": "GetAccount", + "full_name": "google.shopping.css.v1.AccountsService.GetAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.css.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_AccountsService_UpdateLabels_sync", + "title": "Snippet for the update_labels call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountsService::Client#update_labels.", + "file": "accounts_service/update_labels.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_labels", + "full_name": "::Google::Shopping::Css::V1::AccountsService::Client#update_labels", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::UpdateAccountLabelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Css::V1::AccountsService::Client" + }, + "method": { + "short_name": "UpdateLabels", + "full_name": "google.shopping.css.v1.AccountsService.UpdateLabels", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.css.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_AccountLabelsService_ListAccountLabels_sync", + "title": "Snippet for the list_account_labels call in the AccountLabelsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#list_account_labels.", + "file": "account_labels_service/list_account_labels.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_account_labels", + "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#list_account_labels", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::ListAccountLabelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::ListAccountLabelsResponse", + "client": { + "short_name": "AccountLabelsService::Client", + "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" + }, + "method": { + "short_name": "ListAccountLabels", + "full_name": "google.shopping.css.v1.AccountLabelsService.ListAccountLabels", + "service": { + "short_name": "AccountLabelsService", + "full_name": "google.shopping.css.v1.AccountLabelsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_AccountLabelsService_CreateAccountLabel_sync", + "title": "Snippet for the create_account_label call in the AccountLabelsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#create_account_label.", + "file": "account_labels_service/create_account_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_account_label", + "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#create_account_label", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::CreateAccountLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::AccountLabel", + "client": { + "short_name": "AccountLabelsService::Client", + "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" + }, + "method": { + "short_name": "CreateAccountLabel", + "full_name": "google.shopping.css.v1.AccountLabelsService.CreateAccountLabel", + "service": { + "short_name": "AccountLabelsService", + "full_name": "google.shopping.css.v1.AccountLabelsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_AccountLabelsService_UpdateAccountLabel_sync", + "title": "Snippet for the update_account_label call in the AccountLabelsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#update_account_label.", + "file": "account_labels_service/update_account_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_account_label", + "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#update_account_label", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::UpdateAccountLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::AccountLabel", + "client": { + "short_name": "AccountLabelsService::Client", + "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" + }, + "method": { + "short_name": "UpdateAccountLabel", + "full_name": "google.shopping.css.v1.AccountLabelsService.UpdateAccountLabel", + "service": { + "short_name": "AccountLabelsService", + "full_name": "google.shopping.css.v1.AccountLabelsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_AccountLabelsService_DeleteAccountLabel_sync", + "title": "Snippet for the delete_account_label call in the AccountLabelsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#delete_account_label.", + "file": "account_labels_service/delete_account_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_account_label", + "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#delete_account_label", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::DeleteAccountLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AccountLabelsService::Client", + "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" + }, + "method": { + "short_name": "DeleteAccountLabel", + "full_name": "google.shopping.css.v1.AccountLabelsService.DeleteAccountLabel", + "service": { + "short_name": "AccountLabelsService", + "full_name": "google.shopping.css.v1.AccountLabelsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_CssProductInputsService_InsertCssProductInput_sync", + "title": "Snippet for the insert_css_product_input call in the CssProductInputsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductInputsService::Client#insert_css_product_input.", + "file": "css_product_inputs_service/insert_css_product_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_css_product_input", + "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client#insert_css_product_input", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::InsertCssProductInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::CssProductInput", + "client": { + "short_name": "CssProductInputsService::Client", + "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client" + }, + "method": { + "short_name": "InsertCssProductInput", + "full_name": "google.shopping.css.v1.CssProductInputsService.InsertCssProductInput", + "service": { + "short_name": "CssProductInputsService", + "full_name": "google.shopping.css.v1.CssProductInputsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_CssProductInputsService_UpdateCssProductInput_sync", + "title": "Snippet for the update_css_product_input call in the CssProductInputsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductInputsService::Client#update_css_product_input.", + "file": "css_product_inputs_service/update_css_product_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_css_product_input", + "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client#update_css_product_input", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::UpdateCssProductInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::CssProductInput", + "client": { + "short_name": "CssProductInputsService::Client", + "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client" + }, + "method": { + "short_name": "UpdateCssProductInput", + "full_name": "google.shopping.css.v1.CssProductInputsService.UpdateCssProductInput", + "service": { + "short_name": "CssProductInputsService", + "full_name": "google.shopping.css.v1.CssProductInputsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_CssProductInputsService_DeleteCssProductInput_sync", + "title": "Snippet for the delete_css_product_input call in the CssProductInputsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductInputsService::Client#delete_css_product_input.", + "file": "css_product_inputs_service/delete_css_product_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_css_product_input", + "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client#delete_css_product_input", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::DeleteCssProductInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CssProductInputsService::Client", + "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client" + }, + "method": { + "short_name": "DeleteCssProductInput", + "full_name": "google.shopping.css.v1.CssProductInputsService.DeleteCssProductInput", + "service": { + "short_name": "CssProductInputsService", + "full_name": "google.shopping.css.v1.CssProductInputsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_CssProductsService_GetCssProduct_sync", + "title": "Snippet for the get_css_product call in the CssProductsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductsService::Client#get_css_product.", + "file": "css_products_service/get_css_product.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_css_product", + "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client#get_css_product", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::GetCssProductRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::CssProduct", + "client": { + "short_name": "CssProductsService::Client", + "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client" + }, + "method": { + "short_name": "GetCssProduct", + "full_name": "google.shopping.css.v1.CssProductsService.GetCssProduct", + "service": { + "short_name": "CssProductsService", + "full_name": "google.shopping.css.v1.CssProductsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_CssProductsService_ListCssProducts_sync", + "title": "Snippet for the list_css_products call in the CssProductsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductsService::Client#list_css_products.", + "file": "css_products_service/list_css_products.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_css_products", + "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client#list_css_products", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::ListCssProductsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::ListCssProductsResponse", + "client": { + "short_name": "CssProductsService::Client", + "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client" + }, + "method": { + "short_name": "ListCssProducts", + "full_name": "google.shopping.css.v1.CssProductsService.ListCssProducts", + "service": { + "short_name": "CssProductsService", + "full_name": "google.shopping.css.v1.CssProductsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_QuotaService_ListQuotaGroups_sync", + "title": "Snippet for the list_quota_groups call in the QuotaService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::QuotaService::Client#list_quota_groups.", + "file": "quota_service/list_quota_groups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_quota_groups", + "full_name": "::Google::Shopping::Css::V1::QuotaService::Client#list_quota_groups", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::ListQuotaGroupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::ListQuotaGroupsResponse", + "client": { + "short_name": "QuotaService::Client", + "full_name": "::Google::Shopping::Css::V1::QuotaService::Client" + }, + "method": { + "short_name": "ListQuotaGroups", + "full_name": "google.shopping.css.v1.QuotaService.ListQuotaGroups", + "service": { + "short_name": "QuotaService", + "full_name": "google.shopping.css.v1.QuotaService" + } + } + }, + "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-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb new file mode 100644 index 000000000000..06be5bd23520 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_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/shopping/css/v1/account_labels_service" + +class ::Google::Shopping::Css::V1::AccountLabelsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_account_label_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_label_path account: "value0", label: "value1" + assert_equal "accounts/value0/labels/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb new file mode 100644 index 000000000000..a5f9e49b2d62 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_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/rest" +require "google/shopping/css/v1/accounts_labels_pb" +require "google/shopping/css/v1/account_labels_service/rest" + + +class ::Google::Shopping::Css::V1::AccountLabelsService::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_account_labels + # Create test objects. + client_result = ::Google::Shopping::Css::V1::ListAccountLabelsResponse.new + http_response = OpenStruct.new 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_account_labels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_list_account_labels_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_account_labels_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_account_labels({ 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_account_labels 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_account_labels ::Google::Shopping::Css::V1::ListAccountLabelsRequest.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_account_labels({ 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_account_labels(::Google::Shopping::Css::V1::ListAccountLabelsRequest.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_account_labels_client_stub.call_count + end + end + end + + def test_create_account_label + # Create test objects. + client_result = ::Google::Shopping::Css::V1::AccountLabel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + account_label = {} + + create_account_label_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_create_account_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_account_label_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_account_label({ parent: parent, account_label: account_label }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_account_label parent: parent, account_label: account_label do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_account_label ::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_account_label({ parent: parent, account_label: account_label }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_account_label(::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_account_label_client_stub.call_count + end + end + end + + def test_update_account_label + # Create test objects. + client_result = ::Google::Shopping::Css::V1::AccountLabel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account_label = {} + + update_account_label_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_update_account_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_account_label_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_account_label({ account_label: account_label }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_account_label account_label: account_label do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_account_label ::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_account_label({ account_label: account_label }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_account_label(::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_account_label_client_stub.call_count + end + end + end + + def test_delete_account_label + # 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_account_label_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_delete_account_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_account_label_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_account_label({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_account_label name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_account_label ::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_account_label({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_account_label(::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_account_label_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::Shopping::Css::V1::AccountLabelsService::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::Shopping::Css::V1::AccountLabelsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb new file mode 100644 index 000000000000..5d4bb84187d2 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb @@ -0,0 +1,347 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/css/v1/accounts_labels_pb" +require "google/shopping/css/v1/account_labels_service" + +class ::Google::Shopping::Css::V1::AccountLabelsService::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_account_labels + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::ListAccountLabelsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_account_labels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_account_labels, name + assert_kind_of ::Google::Shopping::Css::V1::ListAccountLabelsRequest, 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_account_labels_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_account_labels({ 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_account_labels 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_account_labels ::Google::Shopping::Css::V1::ListAccountLabelsRequest.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_account_labels({ 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_account_labels(::Google::Shopping::Css::V1::ListAccountLabelsRequest.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_account_labels_client_stub.call_rpc_count + end + end + + def test_create_account_label + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::AccountLabel.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + account_label = {} + + create_account_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_account_label, name + assert_kind_of ::Google::Shopping::Css::V1::CreateAccountLabelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::AccountLabel), request["account_label"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_account_label_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_account_label({ parent: parent, account_label: account_label }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_account_label parent: parent, account_label: account_label do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_account_label ::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_account_label({ parent: parent, account_label: account_label }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_account_label(::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_account_label_client_stub.call_rpc_count + end + end + + def test_update_account_label + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::AccountLabel.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account_label = {} + + update_account_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_account_label, name + assert_kind_of ::Google::Shopping::Css::V1::UpdateAccountLabelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::AccountLabel), request["account_label"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_account_label_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_account_label({ account_label: account_label }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_account_label account_label: account_label do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_account_label ::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_account_label({ account_label: account_label }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_account_label(::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_account_label_client_stub.call_rpc_count + end + end + + def test_delete_account_label + # 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_account_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_account_label, name + assert_kind_of ::Google::Shopping::Css::V1::DeleteAccountLabelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_account_label_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_account_label({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_account_label name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_account_label ::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_account_label({ 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_account_label(::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(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_account_label_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::Shopping::Css::V1::AccountLabelsService::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::Shopping::Css::V1::AccountLabelsService::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::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Css::V1::AccountLabelsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb new file mode 100644 index 000000000000..5958f212e0cf --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_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/shopping/css/v1/accounts_service" + +class ::Google::Shopping::Css::V1::AccountsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb new file mode 100644 index 000000000000..6dafecea18ab --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb @@ -0,0 +1,268 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/css/v1/accounts_pb" +require "google/shopping/css/v1/accounts_service/rest" + + +class ::Google::Shopping::Css::V1::AccountsService::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_child_accounts + # Create test objects. + client_result = ::Google::Shopping::Css::V1::ListChildAccountsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + label_id = 42 + full_name = "hello world" + page_size = 42 + page_token = "hello world" + + list_child_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.stub :transcode_list_child_accounts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_child_accounts_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_child_accounts({ parent: parent, label_id: label_id, full_name: full_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_child_accounts parent: parent, label_id: label_id, full_name: full_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_child_accounts ::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_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_child_accounts({ parent: parent, label_id: label_id, full_name: full_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_child_accounts(::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_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_child_accounts_client_stub.call_count + end + end + end + + def test_get_account + # Create test objects. + client_result = ::Google::Shopping::Css::V1::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + parent = "hello world" + + get_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.stub :transcode_get_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_account_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_account({ name: name, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_account name: name, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_account ::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_account({ name: name, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_account(::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_account_client_stub.call_count + end + end + end + + def test_update_labels + # Create test objects. + client_result = ::Google::Shopping::Css::V1::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + label_ids = [42] + parent = "hello world" + + update_labels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.stub :transcode_update_labels_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_labels_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_labels({ name: name, label_ids: label_ids, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_labels name: name, label_ids: label_ids, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_labels ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_labels({ name: name, label_ids: label_ids, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_labels(::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_labels_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::Shopping::Css::V1::AccountsService::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::Shopping::Css::V1::AccountsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb new file mode 100644 index 000000000000..cc332acd4e2d --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_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/shopping/css/v1/accounts_pb" +require "google/shopping/css/v1/accounts_service" + +class ::Google::Shopping::Css::V1::AccountsService::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_child_accounts + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::ListChildAccountsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + label_id = 42 + full_name = "hello world" + page_size = 42 + page_token = "hello world" + + list_child_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_child_accounts, name + assert_kind_of ::Google::Shopping::Css::V1::ListChildAccountsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["label_id"] + assert request.has_label_id? + assert_equal "hello world", request["full_name"] + assert request.has_full_name? + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_child_accounts_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_child_accounts({ parent: parent, label_id: label_id, full_name: full_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_child_accounts parent: parent, label_id: label_id, full_name: full_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_child_accounts ::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_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_child_accounts({ parent: parent, label_id: label_id, full_name: full_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_child_accounts(::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_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_child_accounts_client_stub.call_rpc_count + end + end + + def test_get_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::Account.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + parent = "hello world" + + get_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_account, name + assert_kind_of ::Google::Shopping::Css::V1::GetAccountRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["parent"] + assert request.has_parent? + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_account_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_account({ name: name, parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_account name: name, parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_account ::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_account({ name: name, parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_account(::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_account_client_stub.call_rpc_count + end + end + + def test_update_labels + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::Account.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + label_ids = [42] + parent = "hello world" + + update_labels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_labels, name + assert_kind_of ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, request + assert_equal "hello world", request["name"] + assert_equal [42], request["label_ids"] + assert_equal "hello world", request["parent"] + assert request.has_parent? + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_labels_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_labels({ name: name, label_ids: label_ids, parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_labels name: name, label_ids: label_ids, parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_labels ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_labels({ name: name, label_ids: label_ids, parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_labels(::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_labels_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::Shopping::Css::V1::AccountsService::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::Shopping::Css::V1::AccountsService::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::Shopping::Css::V1::AccountsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Css::V1::AccountsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb new file mode 100644 index 000000000000..6f08e5fdf404 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_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/shopping/css/v1/css_product_inputs_service" + +class ::Google::Shopping::Css::V1::CssProductInputsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_css_product_input_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.css_product_input_path account: "value0", css_product_input: "value1" + assert_equal "accounts/value0/cssProductInputs/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb new file mode 100644 index 000000000000..51442a8b89bd --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb @@ -0,0 +1,265 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/css/v1/css_product_inputs_pb" +require "google/shopping/css/v1/css_product_inputs_service/rest" + + +class ::Google::Shopping::Css::V1::CssProductInputsService::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_insert_css_product_input + # Create test objects. + client_result = ::Google::Shopping::Css::V1::CssProductInput.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + css_product_input = {} + feed_id = 42 + + insert_css_product_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::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.stub :transcode_insert_css_product_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_css_product_input_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_css_product_input parent: parent, css_product_input: css_product_input, feed_id: feed_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_css_product_input ::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_css_product_input(::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_css_product_input_client_stub.call_count + end + end + end + + def test_update_css_product_input + # Create test objects. + client_result = ::Google::Shopping::Css::V1::CssProductInput.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + css_product_input = {} + update_mask = {} + + update_css_product_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::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.stub :transcode_update_css_product_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_css_product_input_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_css_product_input css_product_input: css_product_input, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_css_product_input ::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_css_product_input(::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_css_product_input_client_stub.call_count + end + end + end + + def test_delete_css_product_input + # 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" + supplemental_feed_id = 42 + + delete_css_product_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::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.stub :transcode_delete_css_product_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_css_product_input_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_css_product_input name: name, supplemental_feed_id: supplemental_feed_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_css_product_input ::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_css_product_input(::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_css_product_input_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::Shopping::Css::V1::CssProductInputsService::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::Shopping::Css::V1::CssProductInputsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb new file mode 100644 index 000000000000..d9807f60a100 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/css/v1/css_product_inputs_pb" +require "google/shopping/css/v1/css_product_inputs_service" + +class ::Google::Shopping::Css::V1::CssProductInputsService::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_insert_css_product_input + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::CssProductInput.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + css_product_input = {} + feed_id = 42 + + insert_css_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_css_product_input, name + assert_kind_of ::Google::Shopping::Css::V1::InsertCssProductInputRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::CssProductInput), request["css_product_input"] + assert_equal 42, request["feed_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_css_product_input_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_css_product_input parent: parent, css_product_input: css_product_input, feed_id: feed_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_css_product_input ::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_css_product_input(::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_css_product_input_client_stub.call_rpc_count + end + end + + def test_update_css_product_input + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::CssProductInput.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + css_product_input = {} + update_mask = {} + + update_css_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_css_product_input, name + assert_kind_of ::Google::Shopping::Css::V1::UpdateCssProductInputRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::CssProductInput), request["css_product_input"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_css_product_input_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_css_product_input css_product_input: css_product_input, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_css_product_input ::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, 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_css_product_input({ css_product_input: css_product_input, 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_css_product_input(::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, 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_css_product_input_client_stub.call_rpc_count + end + end + + def test_delete_css_product_input + # 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" + supplemental_feed_id = 42 + + delete_css_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_css_product_input, name + assert_kind_of ::Google::Shopping::Css::V1::DeleteCssProductInputRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["supplemental_feed_id"] + assert request.has_supplemental_feed_id? + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_css_product_input_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_css_product_input name: name, supplemental_feed_id: supplemental_feed_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_css_product_input ::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_css_product_input(::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_css_product_input_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::Shopping::Css::V1::CssProductInputsService::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::Shopping::Css::V1::CssProductInputsService::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::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Css::V1::CssProductInputsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb new file mode 100644 index 000000000000..7e9ac41a013e --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_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/shopping/css/v1/css_products_service" + +class ::Google::Shopping::Css::V1::CssProductsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_css_product_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.css_product_path account: "value0", css_product: "value1" + assert_equal "accounts/value0/cssProducts/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb new file mode 100644 index 000000000000..cb45e1d2e641 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb @@ -0,0 +1,209 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/css/v1/css_products_pb" +require "google/shopping/css/v1/css_products_service/rest" + + +class ::Google::Shopping::Css::V1::CssProductsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_css_product + # Create test objects. + client_result = ::Google::Shopping::Css::V1::CssProduct.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_css_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::Shopping::Css::V1::CssProductsService::Rest::ServiceStub.stub :transcode_get_css_product_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_css_product_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_css_product({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_css_product name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_css_product ::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_css_product({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_css_product(::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_css_product_client_stub.call_count + end + end + end + + def test_list_css_products + # Create test objects. + client_result = ::Google::Shopping::Css::V1::ListCssProductsResponse.new + http_response = OpenStruct.new 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_css_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::Shopping::Css::V1::CssProductsService::Rest::ServiceStub.stub :transcode_list_css_products_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_css_products_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_css_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_css_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_css_products ::Google::Shopping::Css::V1::ListCssProductsRequest.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_css_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_css_products(::Google::Shopping::Css::V1::ListCssProductsRequest.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_css_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::Shopping::Css::V1::CssProductsService::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::Shopping::Css::V1::CssProductsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb new file mode 100644 index 000000000000..f1ac51bd6e60 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/css/v1/css_products_pb" +require "google/shopping/css/v1/css_products_service" + +class ::Google::Shopping::Css::V1::CssProductsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_css_product + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::CssProduct.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_css_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_css_product, name + assert_kind_of ::Google::Shopping::Css::V1::GetCssProductRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_css_product_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_css_product({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_css_product name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_css_product ::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_css_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_css_product(::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_css_product_client_stub.call_rpc_count + end + end + + def test_list_css_products + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::ListCssProductsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_css_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_css_products, name + assert_kind_of ::Google::Shopping::Css::V1::ListCssProductsRequest, 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_css_products_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_css_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_css_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_css_products ::Google::Shopping::Css::V1::ListCssProductsRequest.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_css_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_css_products(::Google::Shopping::Css::V1::ListCssProductsRequest.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_css_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::Shopping::Css::V1::CssProductsService::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::Shopping::Css::V1::CssProductsService::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::Shopping::Css::V1::CssProductsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Css::V1::CssProductsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb new file mode 100644 index 000000000000..ebdbed9d44c1 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_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/shopping/css/v1/quota_service" + +class ::Google::Shopping::Css::V1::QuotaService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb new file mode 100644 index 000000000000..8de539d7e195 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb @@ -0,0 +1,155 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/css/v1/quota_pb" +require "google/shopping/css/v1/quota_service/rest" + + +class ::Google::Shopping::Css::V1::QuotaService::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_quota_groups + # Create test objects. + client_result = ::Google::Shopping::Css::V1::ListQuotaGroupsResponse.new + http_response = OpenStruct.new 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_quota_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::QuotaService::Rest::ServiceStub.stub :transcode_list_quota_groups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_quota_groups_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_quota_groups({ 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_quota_groups 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_quota_groups ::Google::Shopping::Css::V1::ListQuotaGroupsRequest.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_quota_groups({ 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_quota_groups(::Google::Shopping::Css::V1::ListQuotaGroupsRequest.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_quota_groups_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::Shopping::Css::V1::QuotaService::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::Shopping::Css::V1::QuotaService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb new file mode 100644 index 000000000000..b2461d360df5 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb @@ -0,0 +1,171 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/css/v1/quota_pb" +require "google/shopping/css/v1/quota_service" + +class ::Google::Shopping::Css::V1::QuotaService::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_quota_groups + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::ListQuotaGroupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_quota_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_quota_groups, name + assert_kind_of ::Google::Shopping::Css::V1::ListQuotaGroupsRequest, 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_quota_groups_client_stub do + # Create client + client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_quota_groups({ 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_quota_groups 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_quota_groups ::Google::Shopping::Css::V1::ListQuotaGroupsRequest.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_quota_groups({ 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_quota_groups(::Google::Shopping::Css::V1::ListQuotaGroupsRequest.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_quota_groups_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::Shopping::Css::V1::QuotaService::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::Shopping::Css::V1::QuotaService::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::Shopping::Css::V1::QuotaService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Css::V1::QuotaService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/helper.rb b/owl-bot-staging/google-shopping-css-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-merchant-accounts-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-accounts-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-accounts-v1/.repo-metadata.json new file mode 100644 index 000000000000..5b45e687009c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-accounts-v1", + "distribution_name": "google-shopping-merchant-accounts-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-accounts-v1/.rubocop.yml new file mode 100644 index 000000000000..ea4191fb75d1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-accounts-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant 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-shopping-merchant-accounts-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-accounts-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..8f0d9be65324 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-accounts-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-shopping-merchant-accounts-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/shopping/merchant/accounts/v1" + +client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/accounts/v1" + +::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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-shopping-merchant-accounts-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/shopping/merchant/accounts/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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-shopping-merchant-accounts-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-accounts-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-accounts-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/README.md b/owl-bot-staging/google-shopping-merchant-accounts-v1/README.md new file mode 100644 index 000000000000..e2d181aa5863 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-accounts](https://rubygems.org/gems/google-shopping-merchant-accounts). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-accounts-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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/accounts/v1" + +client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new +request = ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new # (request fields as keyword arguments...) +response = client.list_account_issues request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/accounts/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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-shopping-merchant-accounts`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-accounts-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-shopping-merchant-accounts`. +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-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-accounts-v1/Rakefile new file mode 100644 index 000000000000..5a9e20ab1576 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-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/shopping/merchant/accounts/v1/account_issue_service/credentials" + ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-accounts-v1" + header "google-shopping-merchant-accounts-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-accounts-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-accounts-v1/gapic_metadata.json new file mode 100644 index 000000000000..e5fcaeb505d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/gapic_metadata.json @@ -0,0 +1,587 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.accounts.v1", + "libraryPackage": "::Google::Shopping::Merchant::Accounts::V1", + "services": { + "AccountIssueService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client", + "rpcs": { + "ListAccountIssues": { + "methods": [ + "list_account_issues" + ] + } + } + } + } + }, + "AccountRelationshipsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client", + "rpcs": { + "GetAccountRelationship": { + "methods": [ + "get_account_relationship" + ] + }, + "UpdateAccountRelationship": { + "methods": [ + "update_account_relationship" + ] + }, + "ListAccountRelationships": { + "methods": [ + "list_account_relationships" + ] + } + } + } + } + }, + "AccountServicesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client", + "rpcs": { + "GetAccountService": { + "methods": [ + "get_account_service" + ] + }, + "ListAccountServices": { + "methods": [ + "list_account_services" + ] + }, + "ProposeAccountService": { + "methods": [ + "propose_account_service" + ] + }, + "ApproveAccountService": { + "methods": [ + "approve_account_service" + ] + }, + "RejectAccountService": { + "methods": [ + "reject_account_service" + ] + } + } + } + } + }, + "UserService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client", + "rpcs": { + "GetUser": { + "methods": [ + "get_user" + ] + }, + "CreateUser": { + "methods": [ + "create_user" + ] + }, + "DeleteUser": { + "methods": [ + "delete_user" + ] + }, + "UpdateUser": { + "methods": [ + "update_user" + ] + }, + "ListUsers": { + "methods": [ + "list_users" + ] + }, + "VerifySelf": { + "methods": [ + "verify_self" + ] + } + } + } + } + }, + "AccountsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client", + "rpcs": { + "GetAccount": { + "methods": [ + "get_account" + ] + }, + "CreateAndConfigureAccount": { + "methods": [ + "create_and_configure_account" + ] + }, + "CreateTestAccount": { + "methods": [ + "create_test_account" + ] + }, + "DeleteAccount": { + "methods": [ + "delete_account" + ] + }, + "UpdateAccount": { + "methods": [ + "update_account" + ] + }, + "ListAccounts": { + "methods": [ + "list_accounts" + ] + }, + "ListSubAccounts": { + "methods": [ + "list_sub_accounts" + ] + } + } + } + } + }, + "AutofeedSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client", + "rpcs": { + "GetAutofeedSettings": { + "methods": [ + "get_autofeed_settings" + ] + }, + "UpdateAutofeedSettings": { + "methods": [ + "update_autofeed_settings" + ] + } + } + } + } + }, + "AutomaticImprovementsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client", + "rpcs": { + "GetAutomaticImprovements": { + "methods": [ + "get_automatic_improvements" + ] + }, + "UpdateAutomaticImprovements": { + "methods": [ + "update_automatic_improvements" + ] + } + } + } + } + }, + "BusinessIdentityService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client", + "rpcs": { + "GetBusinessIdentity": { + "methods": [ + "get_business_identity" + ] + }, + "UpdateBusinessIdentity": { + "methods": [ + "update_business_identity" + ] + } + } + } + } + }, + "BusinessInfoService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client", + "rpcs": { + "GetBusinessInfo": { + "methods": [ + "get_business_info" + ] + }, + "UpdateBusinessInfo": { + "methods": [ + "update_business_info" + ] + } + } + } + } + }, + "CheckoutSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client", + "rpcs": { + "GetCheckoutSettings": { + "methods": [ + "get_checkout_settings" + ] + }, + "CreateCheckoutSettings": { + "methods": [ + "create_checkout_settings" + ] + }, + "UpdateCheckoutSettings": { + "methods": [ + "update_checkout_settings" + ] + }, + "DeleteCheckoutSettings": { + "methods": [ + "delete_checkout_settings" + ] + } + } + } + } + }, + "DeveloperRegistrationService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client", + "rpcs": { + "RegisterGcp": { + "methods": [ + "register_gcp" + ] + }, + "GetDeveloperRegistration": { + "methods": [ + "get_developer_registration" + ] + }, + "UnregisterGcp": { + "methods": [ + "unregister_gcp" + ] + }, + "GetAccountForGcpRegistration": { + "methods": [ + "get_account_for_gcp_registration" + ] + } + } + } + } + }, + "EmailPreferencesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client", + "rpcs": { + "GetEmailPreferences": { + "methods": [ + "get_email_preferences" + ] + }, + "UpdateEmailPreferences": { + "methods": [ + "update_email_preferences" + ] + } + } + } + } + }, + "GbpAccountsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client", + "rpcs": { + "ListGbpAccounts": { + "methods": [ + "list_gbp_accounts" + ] + }, + "LinkGbpAccount": { + "methods": [ + "link_gbp_account" + ] + } + } + } + } + }, + "HomepageService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client", + "rpcs": { + "GetHomepage": { + "methods": [ + "get_homepage" + ] + }, + "UpdateHomepage": { + "methods": [ + "update_homepage" + ] + }, + "ClaimHomepage": { + "methods": [ + "claim_homepage" + ] + }, + "UnclaimHomepage": { + "methods": [ + "unclaim_homepage" + ] + } + } + } + } + }, + "LfpProvidersService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client", + "rpcs": { + "FindLfpProviders": { + "methods": [ + "find_lfp_providers" + ] + }, + "LinkLfpProvider": { + "methods": [ + "link_lfp_provider" + ] + } + } + } + } + }, + "OmnichannelSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client", + "rpcs": { + "GetOmnichannelSetting": { + "methods": [ + "get_omnichannel_setting" + ] + }, + "ListOmnichannelSettings": { + "methods": [ + "list_omnichannel_settings" + ] + }, + "CreateOmnichannelSetting": { + "methods": [ + "create_omnichannel_setting" + ] + }, + "UpdateOmnichannelSetting": { + "methods": [ + "update_omnichannel_setting" + ] + }, + "RequestInventoryVerification": { + "methods": [ + "request_inventory_verification" + ] + } + } + } + } + }, + "OnlineReturnPolicyService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client", + "rpcs": { + "GetOnlineReturnPolicy": { + "methods": [ + "get_online_return_policy" + ] + }, + "ListOnlineReturnPolicies": { + "methods": [ + "list_online_return_policies" + ] + }, + "CreateOnlineReturnPolicy": { + "methods": [ + "create_online_return_policy" + ] + }, + "DeleteOnlineReturnPolicy": { + "methods": [ + "delete_online_return_policy" + ] + } + } + } + } + }, + "ProgramsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client", + "rpcs": { + "GetProgram": { + "methods": [ + "get_program" + ] + }, + "ListPrograms": { + "methods": [ + "list_programs" + ] + }, + "EnableProgram": { + "methods": [ + "enable_program" + ] + }, + "DisableProgram": { + "methods": [ + "disable_program" + ] + } + } + } + } + }, + "RegionsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client", + "rpcs": { + "GetRegion": { + "methods": [ + "get_region" + ] + }, + "CreateRegion": { + "methods": [ + "create_region" + ] + }, + "BatchCreateRegions": { + "methods": [ + "batch_create_regions" + ] + }, + "UpdateRegion": { + "methods": [ + "update_region" + ] + }, + "BatchUpdateRegions": { + "methods": [ + "batch_update_regions" + ] + }, + "DeleteRegion": { + "methods": [ + "delete_region" + ] + }, + "BatchDeleteRegions": { + "methods": [ + "batch_delete_regions" + ] + }, + "ListRegions": { + "methods": [ + "list_regions" + ] + } + } + } + } + }, + "ShippingSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client", + "rpcs": { + "GetShippingSettings": { + "methods": [ + "get_shipping_settings" + ] + }, + "InsertShippingSettings": { + "methods": [ + "insert_shipping_settings" + ] + } + } + } + } + }, + "TermsOfServiceAgreementStateService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client", + "rpcs": { + "GetTermsOfServiceAgreementState": { + "methods": [ + "get_terms_of_service_agreement_state" + ] + }, + "RetrieveForApplicationTermsOfServiceAgreementState": { + "methods": [ + "retrieve_for_application_terms_of_service_agreement_state" + ] + } + } + } + } + }, + "TermsOfServiceService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client", + "rpcs": { + "GetTermsOfService": { + "methods": [ + "get_terms_of_service" + ] + }, + "RetrieveLatestTermsOfService": { + "methods": [ + "retrieve_latest_terms_of_service" + ] + }, + "AcceptTermsOfService": { + "methods": [ + "accept_terms_of_service" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/google-shopping-merchant-accounts-v1.gemspec b/owl-bot-staging/google-shopping-merchant-accounts-v1/google-shopping-merchant-accounts-v1.gemspec new file mode 100644 index 000000000000..b1f1f53d2b8e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/google-shopping-merchant-accounts-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/accounts/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-accounts-v1" + gem.version = Google::Shopping::Merchant::Accounts::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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-shopping-type", "~> 1.0" +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google-shopping-merchant-accounts-v1.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google-shopping-merchant-accounts-v1.rb new file mode 100644 index 000000000000..4b03981d4244 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google-shopping-merchant-accounts-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/shopping/merchant/accounts/v1" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1.rb new file mode 100644 index 000000000000..74b3a214ea31 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1.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 "google/shopping/merchant/accounts/v1/account_issue_service" +require "google/shopping/merchant/accounts/v1/account_relationships_service" +require "google/shopping/merchant/accounts/v1/account_services_service" +require "google/shopping/merchant/accounts/v1/user_service" +require "google/shopping/merchant/accounts/v1/accounts_service" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service" +require "google/shopping/merchant/accounts/v1/business_identity_service" +require "google/shopping/merchant/accounts/v1/business_info_service" +require "google/shopping/merchant/accounts/v1/checkout_settings_service" +require "google/shopping/merchant/accounts/v1/developer_registration_service" +require "google/shopping/merchant/accounts/v1/email_preferences_service" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service" +require "google/shopping/merchant/accounts/v1/homepage_service" +require "google/shopping/merchant/accounts/v1/lfp_providers_service" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service" +require "google/shopping/merchant/accounts/v1/online_return_policy_service" +require "google/shopping/merchant/accounts/v1/programs_service" +require "google/shopping/merchant/accounts/v1/regions_service" +require "google/shopping/merchant/accounts/v1/shipping_settings_service" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service" +require "google/shopping/merchant/accounts/v1/terms_of_service_service" +require "google/shopping/merchant/accounts/v1/version" + +module Google + module Shopping + module Merchant + module Accounts + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/accounts/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accessright_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accessright_pb.rb new file mode 100644 index 000000000000..b7c9521c8eb4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accessright_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/accessright.proto + +require 'google/protobuf' + + +descriptor_data = "\n6google/shopping/merchant/accounts/v1/accessright.proto\x12$google.shopping.merchant.accounts.v1*\x81\x01\n\x0b\x41\x63\x63\x65ssRight\x12\x1c\n\x18\x41\x43\x43\x45SS_RIGHT_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\r\n\tREAD_ONLY\x10\x04\x12\t\n\x05\x41\x44MIN\x10\x02\x12\x19\n\x15PERFORMANCE_REPORTING\x10\x03\x12\x11\n\rAPI_DEVELOPER\x10\x05\x42\x83\x02\n(com.google.shopping.merchant.accounts.v1B\x10\x41\x63\x63\x65ssRightProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + AccessRight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccessRight").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service.rb new file mode 100644 index 000000000000..ac431d602f8c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/account_issue_service/credentials" +require "google/shopping/merchant/accounts/v1/account_issue_service/paths" +require "google/shopping/merchant/accounts/v1/account_issue_service/client" +require "google/shopping/merchant/accounts/v1/account_issue_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support `AccountIssueService` API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/account_issue_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/account_issue_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new + # + module AccountIssueService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "account_issue_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/account_issue_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/client.rb new file mode 100644 index 000000000000..1c95a0303451 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/client.rb @@ -0,0 +1,514 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/accountissue_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountIssueService + ## + # Client for the AccountIssueService service. + # + # Service to support `AccountIssueService` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_issue_service_stub + + ## + # Configure the AccountIssueService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountIssueService clients + # ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountIssueService 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::Shopping::Merchant::Accounts::V1::AccountIssueService::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 + @account_issue_service_stub.universe_domain + end + + ## + # Create a new AccountIssueService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountIssueService 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/shopping/merchant/accounts/v1/accountissue_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 + + @account_issue_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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 + ) + + @account_issue_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 + @account_issue_service_stub.logger + end + + # Service calls + + ## + # Lists all account issues of a Merchant Center account. + # + # When called on a multi-client account, this method only returns issues + # belonging to that account, not its sub-accounts. To retrieve issues for + # sub-accounts, you must first call the + # {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_sub_accounts accounts.listSubaccounts} + # method to obtain a list of sub-accounts, and then call + # `accounts.issues.list` for each sub-account individually. + # + # @overload list_account_issues(request, options = nil) + # Pass arguments to `list_account_issues` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil) + # Pass arguments to `list_account_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of issues. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of issues to return. The service may return + # fewer than this value. If unspecified, at most 50 issues will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccountIssues` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountIssues` must + # match the call that provided the page token. + # @param language_code [::String] + # Optional. The issues in the response will have human-readable fields in the + # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), + # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be + # used. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in human-readable fields. For example 'America/Los_Angeles'. + # If not set, 'America/Los_Angeles' will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountIssue>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountIssue>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new + # + # # Call the list_account_issues method. + # result = client.list_account_issues request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountIssue. + # p item + # end + # + def list_account_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_account_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_account_issues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_account_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_issue_service_stub.call_rpc :list_account_issues, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, 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 AccountIssueService API. + # + # This class represents the configuration for AccountIssueService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_account_issues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_issues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_issues.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::AccountIssueService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountIssueService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_account_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_issues + + # @private + def initialize parent_rpcs = nil + list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues + @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/credentials.rb new file mode 100644 index 000000000000..4f6ed53d9ee4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_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 Shopping + module Merchant + module Accounts + module V1 + module AccountIssueService + # Credentials for the AccountIssueService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/paths.rb new file mode 100644 index 000000000000..5d46838c9457 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/paths.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 Shopping + module Merchant + module Accounts + module V1 + module AccountIssueService + # Path helper methods for the AccountIssueService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest.rb new file mode 100644 index 000000000000..22206bc273f6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/account_issue_service/credentials" +require "google/shopping/merchant/accounts/v1/account_issue_service/paths" +require "google/shopping/merchant/accounts/v1/account_issue_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support `AccountIssueService` API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/account_issue_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new + # + module AccountIssueService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/account_issue_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/client.rb new file mode 100644 index 000000000000..b27f66db400b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/client.rb @@ -0,0 +1,464 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/accountissue_pb" +require "google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountIssueService + module Rest + ## + # REST client for the AccountIssueService service. + # + # Service to support `AccountIssueService` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_issue_service_stub + + ## + # Configure the AccountIssueService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountIssueService clients + # ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountIssueService 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::Shopping::Merchant::Accounts::V1::AccountIssueService::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 + @account_issue_service_stub.universe_domain + end + + ## + # Create a new AccountIssueService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountIssueService 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 + + @account_issue_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @account_issue_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 + @account_issue_service_stub.logger + end + + # Service calls + + ## + # Lists all account issues of a Merchant Center account. + # + # When called on a multi-client account, this method only returns issues + # belonging to that account, not its sub-accounts. To retrieve issues for + # sub-accounts, you must first call the + # {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client#list_sub_accounts accounts.listSubaccounts} + # method to obtain a list of sub-accounts, and then call + # `accounts.issues.list` for each sub-account individually. + # + # @overload list_account_issues(request, options = nil) + # Pass arguments to `list_account_issues` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil) + # Pass arguments to `list_account_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of issues. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of issues to return. The service may return + # fewer than this value. If unspecified, at most 50 issues will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccountIssues` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountIssues` must + # match the call that provided the page token. + # @param language_code [::String] + # Optional. The issues in the response will have human-readable fields in the + # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), + # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be + # used. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in human-readable fields. For example 'America/Los_Angeles'. + # If not set, 'America/Los_Angeles' will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountIssue>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountIssue>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new + # + # # Call the list_account_issues method. + # result = client.list_account_issues request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountIssue. + # p item + # end + # + def list_account_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_account_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_account_issues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_account_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_issue_service_stub.list_account_issues request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, "account_issues", request, result, 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 AccountIssueService REST API. + # + # This class represents the configuration for AccountIssueService 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::Shopping::Merchant::Accounts::V1::AccountIssueService::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_account_issues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_issues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_issues.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountIssueService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_account_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_issues + + # @private + def initialize parent_rpcs = nil + list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues + @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub.rb new file mode 100644 index 000000000000..f3ae29a7ab11 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub.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! + +require "google/shopping/merchant/accounts/v1/accountissue_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountIssueService + module Rest + ## + # REST service stub for the AccountIssueService 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_account_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse] + # A result object deserialized from the server's reply + def list_account_issues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_account_issues_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_account_issues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse.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_account_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_account_issues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/issues", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service.rb new file mode 100644 index 000000000000..65aa7386d5f8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/account_relationships_service/credentials" +require "google/shopping/merchant/accounts/v1/account_relationships_service/paths" +require "google/shopping/merchant/accounts/v1/account_relationships_service/client" +require "google/shopping/merchant/accounts/v1/account_relationships_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support AccountRelationship API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/account_relationships_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/account_relationships_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new + # + module AccountRelationshipsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "account_relationships_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/account_relationships_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/client.rb new file mode 100644 index 000000000000..4339f4ea4141 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/client.rb @@ -0,0 +1,688 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/accountrelationships_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountRelationshipsService + ## + # Client for the AccountRelationshipsService service. + # + # Service to support AccountRelationship API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_relationships_service_stub + + ## + # Configure the AccountRelationshipsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountRelationshipsService clients + # ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountRelationshipsService 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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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 + @account_relationships_service_stub.universe_domain + end + + ## + # Create a new AccountRelationshipsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountRelationshipsService 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/shopping/merchant/accounts/v1/accountrelationships_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 + + @account_relationships_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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 + ) + + @account_relationships_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 + @account_relationships_service_stub.logger + end + + # Service calls + + ## + # Retrieve an account relationship. + # + # @overload get_account_relationship(request, options = nil) + # Pass arguments to `get_account_relationship` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_account_relationship(name: nil) + # Pass arguments to `get_account_relationship` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the account relationship to get. + # Format: `accounts/{account}/relationships/{relationship}`. For example, + # `accounts/123456/relationships/567890`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new + # + # # Call the get_account_relationship method. + # result = client.get_account_relationship request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. + # p result + # + def get_account_relationship request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_account_relationship.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_account_relationship.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_account_relationship.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_relationships_service_stub.call_rpc :get_account_relationship, request, 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 account relationship. Executing this method requires admin + # access. + # + # @overload update_account_relationship(request, options = nil) + # Pass arguments to `update_account_relationship` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_account_relationship(account_relationship: nil, update_mask: nil) + # Pass arguments to `update_account_relationship` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account_relationship [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship, ::Hash] + # Required. The new version of the account relationship. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `account_id_alias` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new + # + # # Call the update_account_relationship method. + # result = client.update_account_relationship request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. + # p result + # + def update_account_relationship request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest + + # Converts hash and nil to 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_account_relationship.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account_relationship&.name + header_params["account_relationship.name"] = request.account_relationship.name + end + + request_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_account_relationship.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_account_relationship.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_relationships_service_stub.call_rpc :update_account_relationship, request, 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 account relationships for the specified account. + # + # @overload list_account_relationships(request, options = nil) + # Pass arguments to `list_account_relationships` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_account_relationships(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_account_relationships` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 account of the account relationship to filter by. + # Format: `accounts/{account}` + # @param page_token [::String] + # Optional. The token returned by the previous `list` request. + # @param page_size [::Integer] + # Optional. The maximum number of elements to return in the response. Use for + # paging. If no `page_size` is specified, `100` is used as the default value. + # The maximum allowed value is `1000`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountRelationship>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountRelationship>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.new + # + # # Call the list_account_relationships method. + # result = client.list_account_relationships request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship. + # p item + # end + # + def list_account_relationships request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_account_relationships.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_account_relationships.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_account_relationships.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_relationships_service_stub.call_rpc :list_account_relationships, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @account_relationships_service_stub, :list_account_relationships, 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 AccountRelationshipsService API. + # + # This class represents the configuration for AccountRelationshipsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_account_relationship to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_relationship.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_relationship.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountRelationshipsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_account_relationship` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_relationship + ## + # RPC-specific configuration for `update_account_relationship` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account_relationship + ## + # RPC-specific configuration for `list_account_relationships` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_relationships + + # @private + def initialize parent_rpcs = nil + get_account_relationship_config = parent_rpcs.get_account_relationship if parent_rpcs.respond_to? :get_account_relationship + @get_account_relationship = ::Gapic::Config::Method.new get_account_relationship_config + update_account_relationship_config = parent_rpcs.update_account_relationship if parent_rpcs.respond_to? :update_account_relationship + @update_account_relationship = ::Gapic::Config::Method.new update_account_relationship_config + list_account_relationships_config = parent_rpcs.list_account_relationships if parent_rpcs.respond_to? :list_account_relationships + @list_account_relationships = ::Gapic::Config::Method.new list_account_relationships_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/credentials.rb new file mode 100644 index 000000000000..d04c0be362cf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_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 Shopping + module Merchant + module Accounts + module V1 + module AccountRelationshipsService + # Credentials for the AccountRelationshipsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/paths.rb new file mode 100644 index 000000000000..27b34756df36 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_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 Shopping + module Merchant + module Accounts + module V1 + module AccountRelationshipsService + # Path helper methods for the AccountRelationshipsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified AccountRelationship resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/relationships/{relationship}` + # + # @param account [String] + # @param relationship [String] + # + # @return [::String] + def account_relationship_path account:, relationship: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/relationships/#{relationship}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest.rb new file mode 100644 index 000000000000..31b61fc059d4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/account_relationships_service/credentials" +require "google/shopping/merchant/accounts/v1/account_relationships_service/paths" +require "google/shopping/merchant/accounts/v1/account_relationships_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support AccountRelationship API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/account_relationships_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new + # + module AccountRelationshipsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/account_relationships_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/client.rb new file mode 100644 index 000000000000..eabb41838775 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/client.rb @@ -0,0 +1,624 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1/accountrelationships_pb" +require "google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountRelationshipsService + module Rest + ## + # REST client for the AccountRelationshipsService service. + # + # Service to support AccountRelationship API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_relationships_service_stub + + ## + # Configure the AccountRelationshipsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountRelationshipsService clients + # ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountRelationshipsService 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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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 + @account_relationships_service_stub.universe_domain + end + + ## + # Create a new AccountRelationshipsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountRelationshipsService 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 + + @account_relationships_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @account_relationships_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 + @account_relationships_service_stub.logger + end + + # Service calls + + ## + # Retrieve an account relationship. + # + # @overload get_account_relationship(request, options = nil) + # Pass arguments to `get_account_relationship` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_account_relationship(name: nil) + # Pass arguments to `get_account_relationship` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the account relationship to get. + # Format: `accounts/{account}/relationships/{relationship}`. For example, + # `accounts/123456/relationships/567890`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new + # + # # Call the get_account_relationship method. + # result = client.get_account_relationship request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. + # p result + # + def get_account_relationship request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_account_relationship.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_account_relationship.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_account_relationship.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_relationships_service_stub.get_account_relationship request, 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 account relationship. Executing this method requires admin + # access. + # + # @overload update_account_relationship(request, options = nil) + # Pass arguments to `update_account_relationship` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_account_relationship(account_relationship: nil, update_mask: nil) + # Pass arguments to `update_account_relationship` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account_relationship [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship, ::Hash] + # Required. The new version of the account relationship. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `account_id_alias` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new + # + # # Call the update_account_relationship method. + # result = client.update_account_relationship request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. + # p result + # + def update_account_relationship request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest + + # Converts hash and nil to an 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_account_relationship.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_account_relationship.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_account_relationship.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_relationships_service_stub.update_account_relationship request, 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 account relationships for the specified account. + # + # @overload list_account_relationships(request, options = nil) + # Pass arguments to `list_account_relationships` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_account_relationships(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_account_relationships` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 account of the account relationship to filter by. + # Format: `accounts/{account}` + # @param page_token [::String] + # Optional. The token returned by the previous `list` request. + # @param page_size [::Integer] + # Optional. The maximum number of elements to return in the response. Use for + # paging. If no `page_size` is specified, `100` is used as the default value. + # The maximum allowed value is `1000`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountRelationship>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountRelationship>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.new + # + # # Call the list_account_relationships method. + # result = client.list_account_relationships request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship. + # p item + # end + # + def list_account_relationships request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_account_relationships.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_account_relationships.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_account_relationships.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_relationships_service_stub.list_account_relationships request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @account_relationships_service_stub, :list_account_relationships, "account_relationships", request, result, 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 AccountRelationshipsService REST API. + # + # This class represents the configuration for AccountRelationshipsService 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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_account_relationship to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_relationship.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_relationship.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountRelationshipsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_account_relationship` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_relationship + ## + # RPC-specific configuration for `update_account_relationship` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account_relationship + ## + # RPC-specific configuration for `list_account_relationships` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_relationships + + # @private + def initialize parent_rpcs = nil + get_account_relationship_config = parent_rpcs.get_account_relationship if parent_rpcs.respond_to? :get_account_relationship + @get_account_relationship = ::Gapic::Config::Method.new get_account_relationship_config + update_account_relationship_config = parent_rpcs.update_account_relationship if parent_rpcs.respond_to? :update_account_relationship + @update_account_relationship = ::Gapic::Config::Method.new update_account_relationship_config + list_account_relationships_config = parent_rpcs.list_account_relationships if parent_rpcs.respond_to? :list_account_relationships + @list_account_relationships = ::Gapic::Config::Method.new list_account_relationships_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub.rb new file mode 100644 index 000000000000..065aeaccd145 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub.rb @@ -0,0 +1,267 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/accountrelationships_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountRelationshipsService + module Rest + ## + # REST service stub for the AccountRelationshipsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_account_relationship REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # A result object deserialized from the server's reply + def get_account_relationship request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_account_relationship_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_account_relationship", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.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_account_relationship REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # A result object deserialized from the server's reply + def update_account_relationship request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_account_relationship_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_account_relationship", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.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_account_relationships REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse] + # A result object deserialized from the server's reply + def list_account_relationships request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_account_relationships_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_account_relationships", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_account_relationship REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_account_relationship_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/relationships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_account_relationship REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest] + # 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_account_relationship_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{account_relationship.name}", + body: "account_relationship", + matches: [ + ["account_relationship.name", %r{^accounts/[^/]+/relationships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_account_relationships REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_account_relationships_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/relationships", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service.rb new file mode 100644 index 000000000000..ea6e4ab4f5da --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/account_services_service/credentials" +require "google/shopping/merchant/accounts/v1/account_services_service/paths" +require "google/shopping/merchant/accounts/v1/account_services_service/client" +require "google/shopping/merchant/accounts/v1/account_services_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support AccountService API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/account_services_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/account_services_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new + # + module AccountServicesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "account_services_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/account_services_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/client.rb new file mode 100644 index 000000000000..c407d9c5d2e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/client.rb @@ -0,0 +1,873 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/accountservices_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountServicesService + ## + # Client for the AccountServicesService service. + # + # Service to support AccountService API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_services_service_stub + + ## + # Configure the AccountServicesService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountServicesService clients + # ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountServicesService 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::Shopping::Merchant::Accounts::V1::AccountServicesService::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 + @account_services_service_stub.universe_domain + end + + ## + # Create a new AccountServicesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountServicesService 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/shopping/merchant/accounts/v1/accountservices_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 + + @account_services_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::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 + ) + + @account_services_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 + @account_services_service_stub.logger + end + + # Service calls + + ## + # Retrieve an account service. + # + # @overload get_account_service(request, options = nil) + # Pass arguments to `get_account_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_account_service(name: nil) + # Pass arguments to `get_account_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the account service to get. + # Format: `accounts/{account}/services/{service}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new + # + # # Call the get_account_service method. + # result = client.get_account_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + # p result + # + def get_account_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_account_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_account_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_account_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.call_rpc :get_account_service, request, 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 account services for the specified accounts. Supports filtering. + # + # @overload list_account_services(request, options = nil) + # Pass arguments to `list_account_services` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_account_services(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_account_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 account of the account service to filter by. + # Format: `accounts/{account}` + # @param page_token [::String] + # Optional. The token returned by the previous `list` request. + # @param page_size [::Integer] + # Optional. The maximum number of elements to return in the response. Use for + # paging. If no `page_size` is specified, `100` is used as the default value. + # The maximum allowed value is `1000`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountService>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountService>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.new + # + # # Call the list_account_services method. + # result = client.list_account_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountService. + # p item + # end + # + def list_account_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_account_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_account_services.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_account_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.call_rpc :list_account_services, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @account_services_service_stub, :list_account_services, 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 + + ## + # Propose an account service. + # + # @overload propose_account_service(request, options = nil) + # Pass arguments to `propose_account_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_account_service(parent: nil, provider: nil, account_service: nil) + # Pass arguments to `propose_account_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent account for the service. + # Format: `accounts/{account}` + # @param provider [::String] + # Required. The provider of the service. Either the reference to an account + # such as `providers/123` or a well-known service provider (one of + # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). + # @param account_service [::Google::Shopping::Merchant::Accounts::V1::AccountService, ::Hash] + # Required. The account service to propose. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new + # + # # Call the propose_account_service method. + # result = client.propose_account_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + # p result + # + def propose_account_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest + + # Converts hash and nil to 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_account_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_account_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.propose_account_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.call_rpc :propose_account_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Approve an account service proposal. + # + # @overload approve_account_service(request, options = nil) + # Pass arguments to `approve_account_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_account_service(name: nil) + # Pass arguments to `approve_account_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the account service to approve. + # Format: `accounts/{account}/services/{service}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new + # + # # Call the approve_account_service method. + # result = client.approve_account_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + # p result + # + def approve_account_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest + + # Converts hash and nil to 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_account_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_account_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.approve_account_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.call_rpc :approve_account_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Reject an account service (both proposed and approve services can be + # rejected). + # + # @overload reject_account_service(request, options = nil) + # Pass arguments to `reject_account_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_account_service(name: nil) + # Pass arguments to `reject_account_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the account service to reject. + # Format: `accounts/{account}/services/{service}` + # + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new + # + # # Call the reject_account_service method. + # result = client.reject_account_service request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def reject_account_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest + + # Converts hash and nil to 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_account_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_account_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.reject_account_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.call_rpc :reject_account_service, request, 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 AccountServicesService API. + # + # This class represents the configuration for AccountServicesService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_account_service to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_service.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_service.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::AccountServicesService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountServicesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_account_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_service + ## + # RPC-specific configuration for `list_account_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_services + ## + # RPC-specific configuration for `propose_account_service` + # @return [::Gapic::Config::Method] + # + attr_reader :propose_account_service + ## + # RPC-specific configuration for `approve_account_service` + # @return [::Gapic::Config::Method] + # + attr_reader :approve_account_service + ## + # RPC-specific configuration for `reject_account_service` + # @return [::Gapic::Config::Method] + # + attr_reader :reject_account_service + + # @private + def initialize parent_rpcs = nil + get_account_service_config = parent_rpcs.get_account_service if parent_rpcs.respond_to? :get_account_service + @get_account_service = ::Gapic::Config::Method.new get_account_service_config + list_account_services_config = parent_rpcs.list_account_services if parent_rpcs.respond_to? :list_account_services + @list_account_services = ::Gapic::Config::Method.new list_account_services_config + propose_account_service_config = parent_rpcs.propose_account_service if parent_rpcs.respond_to? :propose_account_service + @propose_account_service = ::Gapic::Config::Method.new propose_account_service_config + approve_account_service_config = parent_rpcs.approve_account_service if parent_rpcs.respond_to? :approve_account_service + @approve_account_service = ::Gapic::Config::Method.new approve_account_service_config + reject_account_service_config = parent_rpcs.reject_account_service if parent_rpcs.respond_to? :reject_account_service + @reject_account_service = ::Gapic::Config::Method.new reject_account_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/credentials.rb new file mode 100644 index 000000000000..0c18a2e4fc2c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_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 Shopping + module Merchant + module Accounts + module V1 + module AccountServicesService + # Credentials for the AccountServicesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/paths.rb new file mode 100644 index 000000000000..b172ae1ce8d2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_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 Shopping + module Merchant + module Accounts + module V1 + module AccountServicesService + # Path helper methods for the AccountServicesService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified AccountService resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/services/{service}` + # + # @param account [String] + # @param service [String] + # + # @return [::String] + def account_service_path account:, service: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/services/#{service}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest.rb new file mode 100644 index 000000000000..60328359fc48 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/account_services_service/credentials" +require "google/shopping/merchant/accounts/v1/account_services_service/paths" +require "google/shopping/merchant/accounts/v1/account_services_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support AccountService API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/account_services_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new + # + module AccountServicesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/account_services_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/client.rb new file mode 100644 index 000000000000..c874f5c51cdd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/client.rb @@ -0,0 +1,795 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/accountservices_pb" +require "google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountServicesService + module Rest + ## + # REST client for the AccountServicesService service. + # + # Service to support AccountService API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_services_service_stub + + ## + # Configure the AccountServicesService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountServicesService clients + # ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountServicesService 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::Shopping::Merchant::Accounts::V1::AccountServicesService::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 + @account_services_service_stub.universe_domain + end + + ## + # Create a new AccountServicesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountServicesService 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 + + @account_services_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @account_services_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 + @account_services_service_stub.logger + end + + # Service calls + + ## + # Retrieve an account service. + # + # @overload get_account_service(request, options = nil) + # Pass arguments to `get_account_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_account_service(name: nil) + # Pass arguments to `get_account_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the account service to get. + # Format: `accounts/{account}/services/{service}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new + # + # # Call the get_account_service method. + # result = client.get_account_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + # p result + # + def get_account_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_account_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_account_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_account_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.get_account_service request, 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 account services for the specified accounts. Supports filtering. + # + # @overload list_account_services(request, options = nil) + # Pass arguments to `list_account_services` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_account_services(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_account_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 account of the account service to filter by. + # Format: `accounts/{account}` + # @param page_token [::String] + # Optional. The token returned by the previous `list` request. + # @param page_size [::Integer] + # Optional. The maximum number of elements to return in the response. Use for + # paging. If no `page_size` is specified, `100` is used as the default value. + # The maximum allowed value is `1000`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountService>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountService>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.new + # + # # Call the list_account_services method. + # result = client.list_account_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountService. + # p item + # end + # + def list_account_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_account_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_account_services.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_account_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.list_account_services request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @account_services_service_stub, :list_account_services, "account_services", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Propose an account service. + # + # @overload propose_account_service(request, options = nil) + # Pass arguments to `propose_account_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_account_service(parent: nil, provider: nil, account_service: nil) + # Pass arguments to `propose_account_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent account for the service. + # Format: `accounts/{account}` + # @param provider [::String] + # Required. The provider of the service. Either the reference to an account + # such as `providers/123` or a well-known service provider (one of + # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). + # @param account_service [::Google::Shopping::Merchant::Accounts::V1::AccountService, ::Hash] + # Required. The account service to propose. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new + # + # # Call the propose_account_service method. + # result = client.propose_account_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + # p result + # + def propose_account_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest + + # Converts hash and nil to an 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_account_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_account_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.propose_account_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.propose_account_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Approve an account service proposal. + # + # @overload approve_account_service(request, options = nil) + # Pass arguments to `approve_account_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_account_service(name: nil) + # Pass arguments to `approve_account_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the account service to approve. + # Format: `accounts/{account}/services/{service}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new + # + # # Call the approve_account_service method. + # result = client.approve_account_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + # p result + # + def approve_account_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest + + # Converts hash and nil to an 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_account_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_account_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.approve_account_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.approve_account_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Reject an account service (both proposed and approve services can be + # rejected). + # + # @overload reject_account_service(request, options = nil) + # Pass arguments to `reject_account_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_account_service(name: nil) + # Pass arguments to `reject_account_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the account service to reject. + # Format: `accounts/{account}/services/{service}` + # @yield [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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new + # + # # Call the reject_account_service method. + # result = client.reject_account_service request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def reject_account_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest + + # Converts hash and nil to an 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_account_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_account_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.reject_account_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.reject_account_service request, 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 AccountServicesService REST API. + # + # This class represents the configuration for AccountServicesService 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::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_account_service to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_service.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_service.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountServicesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_account_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_service + ## + # RPC-specific configuration for `list_account_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_services + ## + # RPC-specific configuration for `propose_account_service` + # @return [::Gapic::Config::Method] + # + attr_reader :propose_account_service + ## + # RPC-specific configuration for `approve_account_service` + # @return [::Gapic::Config::Method] + # + attr_reader :approve_account_service + ## + # RPC-specific configuration for `reject_account_service` + # @return [::Gapic::Config::Method] + # + attr_reader :reject_account_service + + # @private + def initialize parent_rpcs = nil + get_account_service_config = parent_rpcs.get_account_service if parent_rpcs.respond_to? :get_account_service + @get_account_service = ::Gapic::Config::Method.new get_account_service_config + list_account_services_config = parent_rpcs.list_account_services if parent_rpcs.respond_to? :list_account_services + @list_account_services = ::Gapic::Config::Method.new list_account_services_config + propose_account_service_config = parent_rpcs.propose_account_service if parent_rpcs.respond_to? :propose_account_service + @propose_account_service = ::Gapic::Config::Method.new propose_account_service_config + approve_account_service_config = parent_rpcs.approve_account_service if parent_rpcs.respond_to? :approve_account_service + @approve_account_service = ::Gapic::Config::Method.new approve_account_service_config + reject_account_service_config = parent_rpcs.reject_account_service if parent_rpcs.respond_to? :reject_account_service + @reject_account_service = ::Gapic::Config::Method.new reject_account_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub.rb new file mode 100644 index 000000000000..f3ea2091c866 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub.rb @@ -0,0 +1,391 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/accountservices_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountServicesService + module Rest + ## + # REST service stub for the AccountServicesService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_account_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # A result object deserialized from the server's reply + def get_account_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_account_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_account_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.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_account_services REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse] + # A result object deserialized from the server's reply + def list_account_services request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_account_services_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_account_services", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse.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_account_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # A result object deserialized from the server's reply + def propose_account_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_propose_account_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_account_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.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_account_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # A result object deserialized from the server's reply + def approve_account_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_approve_account_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_account_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.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_account_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 reject_account_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_reject_account_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_account_service", + 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 get_account_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_account_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_account_services REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_account_services_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/services", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the propose_account_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest] + # 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_account_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/services:propose", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the approve_account_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest] + # 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_account_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:approve", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the reject_account_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest] + # 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_account_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:reject", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_pb.rb new file mode 100644 index 000000000000..7ea511319ff4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/accountissue.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/shopping/type/types_pb' + + +descriptor_data = "\n7google/shopping/merchant/accounts/v1/accountissue.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xa7\x06\n\x0c\x41\x63\x63ountIssue\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\r\n\x05title\x18\x02 \x01(\t\x12M\n\x08severity\x18\x03 \x01(\x0e\x32;.google.shopping.merchant.accounts.v1.AccountIssue.Severity\x12\x65\n\x15impacted_destinations\x18\x04 \x03(\x0b\x32\x46.google.shopping.merchant.accounts.v1.AccountIssue.ImpactedDestination\x12\x0e\n\x06\x64\x65tail\x18\x05 \x01(\t\x12\x19\n\x11\x64ocumentation_uri\x18\x06 \x01(\t\x1a\xd6\x02\n\x13ImpactedDestination\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x00\x88\x01\x01\x12^\n\x07impacts\x18\x02 \x03(\x0b\x32M.google.shopping.merchant.accounts.v1.AccountIssue.ImpactedDestination.Impact\x1al\n\x06Impact\x12\x13\n\x0bregion_code\x18\x01 \x01(\t\x12M\n\x08severity\x18\x02 \x01(\x0e\x32;.google.shopping.merchant.accounts.v1.AccountIssue.SeverityB\x14\n\x12_reporting_context\"M\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x12\x0e\n\nSUGGESTION\x10\x03:l\xea\x41i\n\'merchantapi.googleapis.com/AccountIssue\x12!accounts/{account}/issues/{issue}*\raccountIssues2\x0c\x61\x63\x63ountIssue\"\xbb\x01\n\x18ListAccountIssuesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\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\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x80\x01\n\x19ListAccountIssuesResponse\x12J\n\x0e\x61\x63\x63ount_issues\x18\x01 \x03(\x0b\x32\x32.google.shopping.merchant.accounts.v1.AccountIssue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xaf\x02\n\x13\x41\x63\x63ountIssueService\x12\xce\x01\n\x11ListAccountIssues\x12>.google.shopping.merchant.accounts.v1.ListAccountIssuesRequest\x1a?.google.shopping.merchant.accounts.v1.ListAccountIssuesResponse\"8\xda\x41\x06parent\x82\xd3\xe4\x93\x02)\x12\'/accounts/v1/{parent=accounts/*}/issues\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x84\x02\n(com.google.shopping.merchant.accounts.v1B\x11\x41\x63\x63ountIssueProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + AccountIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountIssue").msgclass + AccountIssue::ImpactedDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountIssue.ImpactedDestination").msgclass + AccountIssue::ImpactedDestination::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountIssue.ImpactedDestination.Impact").msgclass + AccountIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountIssue.Severity").enummodule + ListAccountIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountIssuesRequest").msgclass + ListAccountIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountIssuesResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_services_pb.rb new file mode 100644 index 000000000000..b9b9c0eb0d4b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_services_pb.rb @@ -0,0 +1,54 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/accountissue.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/accountissue_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountIssueService + # Service to support `AccountIssueService` API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.AccountIssueService' + + # Lists all account issues of a Merchant Center account. + # + # When called on a multi-client account, this method only returns issues + # belonging to that account, not its sub-accounts. To retrieve issues for + # sub-accounts, you must first call the + # [accounts.listSubaccounts][google.shopping.merchant.accounts.v1.AccountsService.ListSubAccounts] + # method to obtain a list of sub-accounts, and then call + # `accounts.issues.list` for each sub-account individually. + rpc :ListAccountIssues, ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest, ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_pb.rb new file mode 100644 index 000000000000..0b47b6dd46f7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/accountrelationships.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n?google/shopping/merchant/accounts/v1/accountrelationships.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa7\x02\n\x13\x41\x63\x63ountRelationship\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\x08provider\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x88\x01\x01\x12\"\n\x15provider_display_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x61\x63\x63ount_id_alias\x18\x04 \x01(\tB\x03\xe0\x41\x01:\x90\x01\xea\x41\x8c\x01\n.merchantapi.googleapis.com/AccountRelationship\x12/accounts/{account}/relationships/{relationship}*\x14\x61\x63\x63ountRelationships2\x13\x61\x63\x63ountRelationshipB\x0b\n\t_provider\"e\n\x1dGetAccountRelationshipRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.merchantapi.googleapis.com/AccountRelationship\"\xb6\x01\n UpdateAccountRelationshipRequest\x12\\\n\x14\x61\x63\x63ount_relationship\x18\x01 \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1.AccountRelationshipB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x8e\x01\n\x1fListAccountRelationshipsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\"\x95\x01\n ListAccountRelationshipsResponse\x12X\n\x15\x61\x63\x63ount_relationships\x18\x01 \x03(\x0b\x32\x39.google.shopping.merchant.accounts.v1.AccountRelationship\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xd5\x06\n\x1b\x41\x63\x63ountRelationshipsService\x12\xd7\x01\n\x16GetAccountRelationship\x12\x43.google.shopping.merchant.accounts.v1.GetAccountRelationshipRequest\x1a\x39.google.shopping.merchant.accounts.v1.AccountRelationship\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./accounts/v1/{name=accounts/*/relationships/*}\x12\xa5\x02\n\x19UpdateAccountRelationship\x12\x46.google.shopping.merchant.accounts.v1.UpdateAccountRelationshipRequest\x1a\x39.google.shopping.merchant.accounts.v1.AccountRelationship\"\x84\x01\xda\x41 account_relationship,update_mask\x82\xd3\xe4\x93\x02[2C/accounts/v1/{account_relationship.name=accounts/*/relationships/*}:\x14\x61\x63\x63ount_relationship\x12\xea\x01\n\x18ListAccountRelationships\x12\x45.google.shopping.merchant.accounts.v1.ListAccountRelationshipsRequest\x1a\x46.google.shopping.merchant.accounts.v1.ListAccountRelationshipsResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./accounts/v1/{parent=accounts/*}/relationships\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8c\x02\n(com.google.shopping.merchant.accounts.v1B\x19\x41\x63\x63ountRelationshipsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + AccountRelationship = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountRelationship").msgclass + GetAccountRelationshipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAccountRelationshipRequest").msgclass + UpdateAccountRelationshipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateAccountRelationshipRequest").msgclass + ListAccountRelationshipsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountRelationshipsRequest").msgclass + ListAccountRelationshipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountRelationshipsResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_services_pb.rb new file mode 100644 index 000000000000..3ad0f2ad6ef7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_services_pb.rb @@ -0,0 +1,52 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/accountrelationships.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/accountrelationships_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountRelationshipsService + # Service to support AccountRelationship API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.AccountRelationshipsService' + + # Retrieve an account relationship. + rpc :GetAccountRelationship, ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest, ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship + # Updates the account relationship. Executing this method requires admin + # access. + rpc :UpdateAccountRelationship, ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest, ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship + # List account relationships for the specified account. + rpc :ListAccountRelationships, ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_pb.rb new file mode 100644 index 000000000000..12098930ce0e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/accounts.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/accounts/v1/accountservices_pb' +require 'google/shopping/merchant/accounts/v1/user_pb' +require 'google/shopping/merchant/accounts/v1/verificationmailsettings_pb' +require 'google/type/datetime_pb' + + +descriptor_data = "\n3google/shopping/merchant/accounts/v1/accounts.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a:google/shopping/merchant/accounts/v1/accountservices.proto\x1a/google/shopping/merchant/accounts/v1/user.proto\x1a\x43google/shopping/merchant/accounts/v1/verificationmailsettings.proto\x1a\x1agoogle/type/datetime.proto\"\xb9\x02\n\x07\x41\x63\x63ount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\naccount_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x61\x63\x63ount_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\radult_content\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x19\n\x0ctest_account\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12-\n\ttime_zone\x18\x06 \x01(\x0b\x32\x15.google.type.TimeZoneB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x07 \x01(\tB\x03\xe0\x41\x02:N\xea\x41K\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}*\x08\x61\x63\x63ounts2\x07\x61\x63\x63ountB\x10\n\x0e_adult_content\"M\n\x11GetAccountRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\"\xfb\t\n CreateAndConfigureAccountRequest\x12\x43\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.AccountB\x03\xe0\x41\x02\x12\x61\n\x04user\x18\x03 \x03(\x0b\x32N.google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest.AddUserB\x03\xe0\x41\x01\x12n\n\x07service\x18\x04 \x03(\x0b\x32X.google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest.AddAccountServiceB\x03\xe0\x41\x02\x12v\n\tset_alias\x18\x05 \x03(\x0b\x32^.google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest.SetAliasForRelationshipB\x03\xe0\x41\x01\x1a\xc7\x01\n\x07\x41\x64\x64User\x12\x14\n\x07user_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12=\n\x04user\x18\x02 \x01(\x0b\x32*.google.shopping.merchant.accounts.v1.UserB\x03\xe0\x41\x01\x12g\n\x1averification_mail_settings\x18\x03 \x01(\x0b\x32>.google.shopping.merchant.accounts.v1.VerificationMailSettingsB\x03\xe0\x41\x01\x1a\xab\x04\n\x11\x41\x64\x64\x41\x63\x63ountService\x12W\n\x13\x61\x63\x63ount_aggregation\x18g \x01(\x0b\x32\x38.google.shopping.merchant.accounts.v1.AccountAggregationH\x00\x12U\n\x12\x61\x63\x63ount_management\x18h \x01(\x0b\x32\x37.google.shopping.merchant.accounts.v1.AccountManagementH\x00\x12W\n\x13\x63omparison_shopping\x18i \x01(\x0b\x32\x38.google.shopping.merchant.accounts.v1.ComparisonShoppingH\x00\x12W\n\x13products_management\x18j \x01(\x0b\x32\x38.google.shopping.merchant.accounts.v1.ProductsManagementH\x00\x12Y\n\x14\x63\x61mpaigns_management\x18k \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1.CampaignsManagementH\x00\x12\x1a\n\x08provider\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12 \n\x13\x65xternal_account_id\x18\x03 \x01(\tB\x03\xe0\x41\x05\x42\x0e\n\x0cservice_typeB\x0b\n\t_provider\x1aO\n\x17SetAliasForRelationship\x12\x15\n\x08provider\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x61\x63\x63ount_id_alias\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x9b\x01\n\x18\x43reateTestAccountRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x43\n\x07\x61\x63\x63ount\x18\x02 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.AccountB\x03\xe0\x41\x02\"d\n\x14\x44\x65leteAccountRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x91\x01\n\x14UpdateAccountRequest\x12\x43\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.AccountB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"[\n\x13ListAccountsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"p\n\x14ListAccountsResponse\x12?\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x87\x01\n\x16ListSubAccountsRequest\x12<\n\x08provider\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"s\n\x17ListSubAccountsResponse\x12?\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x85\x0b\n\x0f\x41\x63\x63ountsService\x12\xa3\x01\n\nGetAccount\x12\x37.google.shopping.merchant.accounts.v1.GetAccountRequest\x1a-.google.shopping.merchant.accounts.v1.Account\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 \x12\x1e/accounts/v1/{name=accounts/*}\x12\xc7\x01\n\x19\x43reateAndConfigureAccount\x12\x46.google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest\x1a-.google.shopping.merchant.accounts.v1.Account\"3\x82\xd3\xe4\x93\x02-\"(/accounts/v1/accounts:createAndConfigure:\x01*\x12\xd8\x01\n\x11\x43reateTestAccount\x12>.google.shopping.merchant.accounts.v1.CreateTestAccountRequest\x1a-.google.shopping.merchant.accounts.v1.Account\"T\xda\x41\x0eparent,account\x82\xd3\xe4\x93\x02=\"2/accounts/v1/{parent=accounts/*}:createTestAccount:\x07\x61\x63\x63ount\x12\x92\x01\n\rDeleteAccount\x12:.google.shopping.merchant.accounts.v1.DeleteAccountRequest\x1a\x16.google.protobuf.Empty\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/accounts/v1/{name=accounts/*}\x12\xc9\x01\n\rUpdateAccount\x12:.google.shopping.merchant.accounts.v1.UpdateAccountRequest\x1a-.google.shopping.merchant.accounts.v1.Account\"M\xda\x41\x13\x61\x63\x63ount,update_mask\x82\xd3\xe4\x93\x02\x31\x32&/accounts/v1/{account.name=accounts/*}:\x07\x61\x63\x63ount\x12\xa4\x01\n\x0cListAccounts\x12\x39.google.shopping.merchant.accounts.v1.ListAccountsRequest\x1a:.google.shopping.merchant.accounts.v1.ListAccountsResponse\"\x1d\x82\xd3\xe4\x93\x02\x17\x12\x15/accounts/v1/accounts\x12\xd5\x01\n\x0fListSubAccounts\x12<.google.shopping.merchant.accounts.v1.ListSubAccountsRequest\x1a=.google.shopping.merchant.accounts.v1.ListSubAccountsResponse\"E\xda\x41\x08provider\x82\xd3\xe4\x93\x02\x34\x12\x32/accounts/v1/{provider=accounts/*}:listSubaccounts\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x80\x02\n(com.google.shopping.merchant.accounts.v1B\rAccountsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Account").msgclass + GetAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAccountRequest").msgclass + CreateAndConfigureAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest").msgclass + CreateAndConfigureAccountRequest::AddUser = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest.AddUser").msgclass + CreateAndConfigureAccountRequest::AddAccountService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest.AddAccountService").msgclass + CreateAndConfigureAccountRequest::SetAliasForRelationship = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest.SetAliasForRelationship").msgclass + CreateTestAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateTestAccountRequest").msgclass + DeleteAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DeleteAccountRequest").msgclass + UpdateAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateAccountRequest").msgclass + ListAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountsRequest").msgclass + ListAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountsResponse").msgclass + ListSubAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListSubAccountsRequest").msgclass + ListSubAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListSubAccountsResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service.rb new file mode 100644 index 000000000000..14dea6438ab6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/accounts_service/credentials" +require "google/shopping/merchant/accounts/v1/accounts_service/paths" +require "google/shopping/merchant/accounts/v1/accounts_service/client" +require "google/shopping/merchant/accounts/v1/accounts_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support Accounts API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/accounts_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/accounts_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + module AccountsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "accounts_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/client.rb new file mode 100644 index 000000000000..388743591b06 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/client.rb @@ -0,0 +1,1119 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/accounts_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountsService + ## + # Client for the AccountsService service. + # + # Service to support Accounts API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :accounts_service_stub + + ## + # Configure the AccountsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountsService clients + # ::Google::Shopping::Merchant::Accounts::V1::AccountsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountsService 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::Shopping::Merchant::Accounts::V1::AccountsService::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 + @accounts_service_stub.universe_domain + end + + ## + # Create a new AccountsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountsService 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/shopping/merchant/accounts/v1/accounts_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 + + @accounts_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::AccountsService::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 + ) + + @accounts_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 + @accounts_service_stub.logger + end + + # Service calls + + ## + # Retrieves an account from your Merchant Center account. + # After inserting, updating, or deleting an account, it may take several + # minutes before changes take effect. + # + # @overload get_account(request, options = nil) + # Pass arguments to `get_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_account(name: nil) + # Pass arguments to `get_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the account to retrieve. + # Format: `accounts/{account}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new + # + # # Call the get_account method. + # result = client.get_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + # p result + # + def get_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :get_account, request, 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 Merchant Center account with additional configuration. Adds the + # user that makes the request as an admin for the new account. + # + # @overload create_and_configure_account(request, options = nil) + # Pass arguments to `create_and_configure_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_and_configure_account(account: nil, user: nil, service: nil, set_alias: nil) + # Pass arguments to `create_and_configure_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash] + # Required. The account to be created. + # @param user [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddUser, ::Hash>] + # Optional. Users to be added to the account. + # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>] + # Required. An account service between the account to be created and the + # provider account is initialized as part of the creation. At least one such + # service needs to be provided. Currently exactly one of these needs to be + # `account_aggregation` and `accounts.createAndConfigure` method can be + # used to create a sub-account under an existing advanced account through + # this method. Additional `account_management` or + # `products_management` services may be provided. + # @param set_alias [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::SetAliasForRelationship, ::Hash>] + # Optional. If a relationship is created with a provider, you can set an + # alias for it with this field. The calling user must be an admin on the + # provider to be able to set an alias. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new + # + # # Call the create_and_configure_account method. + # result = client.create_and_configure_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + # p result + # + def create_and_configure_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest + + # Converts hash and nil to 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_and_configure_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::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.create_and_configure_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_and_configure_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :create_and_configure_account, request, 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 Merchant Center test account. + # + # Test accounts are intended for development and testing purposes, such as + # validating API integrations or new feature behavior. + # + # Key characteristics and limitations of test accounts: + # - Immutable Type: A test account cannot be converted into a regular + # (live) Merchant Center account. Likewise, a regular account cannot be + # converted into a test account. + # - Non-Serving Products: Any products, offers, or data created within a + # test account will not be published or made visible to end-users on any + # Google surfaces. They are strictly for testing environments. + # - Separate Environment: Test accounts operate in a sandbox-like manner, + # isolated from live serving and real user traffic. + # + # @overload create_test_account(request, options = nil) + # Pass arguments to `create_test_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_test_account(parent: nil, account: nil) + # Pass arguments to `create_test_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account resource name to create the test account under. + # Format: accounts/\\{account} + # @param account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash] + # Required. The account to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest.new + # + # # Call the create_test_account method. + # result = client.create_test_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + # p result + # + def create_test_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest + + # Converts hash and nil to 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_test_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_test_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_test_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :create_test_account, request, 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 account regardless of its type: standalone, advanced + # account or sub-account. Deleting an advanced account leads to the deletion + # of all of its sub-accounts. This also deletes the account's [developer + # registration + # entity](/merchant/api/reference/rest/accounts_v1/accounts.developerRegistration) + # and any associated GCP project to the account. Executing this method + # requires admin access. The deletion succeeds only if the account does not + # provide services to any other account and has no processed offers. You can + # use the `force` parameter to override this. + # + # @overload delete_account(request, options = nil) + # Pass arguments to `delete_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_account(name: nil, force: nil) + # Pass arguments to `delete_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the account to delete. + # Format: `accounts/{account}` + # @param force [::Boolean] + # Optional. If set to `true`, the account is deleted even if it provides + # services to other accounts or has processed offers. + # + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new + # + # # Call the delete_account method. + # result = client.delete_account request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :delete_account, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an account regardless of its type: standalone, advanced account or + # sub-account. Executing this method requires admin access. + # + # @overload update_account(request, options = nil) + # Pass arguments to `update_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_account(account: nil, update_mask: nil) + # Pass arguments to `update_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash] + # Required. The new version of the account. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `account_name` + # - `adult_content` + # - `language_code` + # - `time_zone` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new + # + # # Call the update_account method. + # result = client.update_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + # p result + # + def update_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest + + # Converts hash and nil to 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_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account&.name + header_params["account.name"] = request.account.name + end + + request_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_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :update_account, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Note: For the `accounts.list` method, quota and limits usage are charged + # for each user, and not for the Merchant Center ID or the advanced account + # ID. To list several sub-accounts, you should use the + # `accounts.listSubaccounts` method, which is more suitable for advanced + # accounts use case. + # + # @overload list_accounts(request, options = nil) + # Pass arguments to `list_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_accounts(page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `accounts.list` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided in the `accounts.list` + # request must match the call that provided the page token. + # @param filter [::String] + # Optional. Returns only accounts that match the + # [filter](https://developers.google.com/merchant/api/guides/accounts/filter). + # For more details, see the + # [filter syntax + # reference](https://developers.google.com/merchant/api/guides/accounts/filter-syntax). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new + # + # # Call the list_accounts method. + # result = client.list_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Account. + # p item + # end + # + def list_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::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_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :list_accounts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_accounts, 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 all sub-accounts for a given advanced account. This is a + # convenience wrapper for the more powerful `accounts.list` method. This + # method will produce the same results as calling `ListsAccounts` with the + # following filter: + # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` + # + # @overload list_sub_accounts(request, options = nil) + # Pass arguments to `list_sub_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_sub_accounts(provider: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_sub_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param provider [::String] + # Required. The aggregation service provider. + # Format: `accounts/{accountId}` + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `accounts.list` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided in the `accounts.list` + # request must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new + # + # # Call the list_sub_accounts method. + # result = client.list_sub_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Account. + # p item + # end + # + def list_sub_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_sub_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.provider + header_params["provider"] = request.provider + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_sub_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sub_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :list_sub_accounts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, 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 AccountsService API. + # + # This class represents the configuration for AccountsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_account to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::AccountsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_account` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account + ## + # RPC-specific configuration for `create_and_configure_account` + # @return [::Gapic::Config::Method] + # + attr_reader :create_and_configure_account + ## + # RPC-specific configuration for `create_test_account` + # @return [::Gapic::Config::Method] + # + attr_reader :create_test_account + ## + # RPC-specific configuration for `delete_account` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_account + ## + # RPC-specific configuration for `update_account` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account + ## + # RPC-specific configuration for `list_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_accounts + ## + # RPC-specific configuration for `list_sub_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sub_accounts + + # @private + def initialize parent_rpcs = nil + get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account + @get_account = ::Gapic::Config::Method.new get_account_config + create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account + @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config + create_test_account_config = parent_rpcs.create_test_account if parent_rpcs.respond_to? :create_test_account + @create_test_account = ::Gapic::Config::Method.new create_test_account_config + delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account + @delete_account = ::Gapic::Config::Method.new delete_account_config + update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account + @update_account = ::Gapic::Config::Method.new update_account_config + list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts + @list_accounts = ::Gapic::Config::Method.new list_accounts_config + list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts + @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/credentials.rb new file mode 100644 index 000000000000..c8ec3ff6d0a0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_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 Shopping + module Merchant + module Accounts + module V1 + module AccountsService + # Credentials for the AccountsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/paths.rb new file mode 100644 index 000000000000..7b812673e211 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_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 Shopping + module Merchant + module Accounts + module V1 + module AccountsService + # Path helper methods for the AccountsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified User resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/users/{email}` + # + # @param account [String] + # @param email [String] + # + # @return [::String] + def user_path account:, email: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/users/#{email}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest.rb new file mode 100644 index 000000000000..972c9397b83c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/accounts_service/credentials" +require "google/shopping/merchant/accounts/v1/accounts_service/paths" +require "google/shopping/merchant/accounts/v1/accounts_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support Accounts API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/accounts_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + module AccountsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/client.rb new file mode 100644 index 000000000000..5084ce21d777 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/client.rb @@ -0,0 +1,1043 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/accounts_pb" +require "google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountsService + module Rest + ## + # REST client for the AccountsService service. + # + # Service to support Accounts API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :accounts_service_stub + + ## + # Configure the AccountsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountsService clients + # ::Google::Shopping::Merchant::Accounts::V1::AccountsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountsService 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::Shopping::Merchant::Accounts::V1::AccountsService::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 + @accounts_service_stub.universe_domain + end + + ## + # Create a new AccountsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountsService 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 + + @accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @accounts_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 + @accounts_service_stub.logger + end + + # Service calls + + ## + # Retrieves an account from your Merchant Center account. + # After inserting, updating, or deleting an account, it may take several + # minutes before changes take effect. + # + # @overload get_account(request, options = nil) + # Pass arguments to `get_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_account(name: nil) + # Pass arguments to `get_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the account to retrieve. + # Format: `accounts/{account}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new + # + # # Call the get_account method. + # result = client.get_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + # p result + # + def get_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.get_account request, 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 Merchant Center account with additional configuration. Adds the + # user that makes the request as an admin for the new account. + # + # @overload create_and_configure_account(request, options = nil) + # Pass arguments to `create_and_configure_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_and_configure_account(account: nil, user: nil, service: nil, set_alias: nil) + # Pass arguments to `create_and_configure_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash] + # Required. The account to be created. + # @param user [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddUser, ::Hash>] + # Optional. Users to be added to the account. + # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>] + # Required. An account service between the account to be created and the + # provider account is initialized as part of the creation. At least one such + # service needs to be provided. Currently exactly one of these needs to be + # `account_aggregation` and `accounts.createAndConfigure` method can be + # used to create a sub-account under an existing advanced account through + # this method. Additional `account_management` or + # `products_management` services may be provided. + # @param set_alias [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::SetAliasForRelationship, ::Hash>] + # Optional. If a relationship is created with a provider, you can set an + # alias for it with this field. The calling user must be an admin on the + # provider to be able to set an alias. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new + # + # # Call the create_and_configure_account method. + # result = client.create_and_configure_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + # p result + # + def create_and_configure_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest + + # Converts hash and nil to an 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_and_configure_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_and_configure_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_and_configure_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.create_and_configure_account request, 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 Merchant Center test account. + # + # Test accounts are intended for development and testing purposes, such as + # validating API integrations or new feature behavior. + # + # Key characteristics and limitations of test accounts: + # - Immutable Type: A test account cannot be converted into a regular + # (live) Merchant Center account. Likewise, a regular account cannot be + # converted into a test account. + # - Non-Serving Products: Any products, offers, or data created within a + # test account will not be published or made visible to end-users on any + # Google surfaces. They are strictly for testing environments. + # - Separate Environment: Test accounts operate in a sandbox-like manner, + # isolated from live serving and real user traffic. + # + # @overload create_test_account(request, options = nil) + # Pass arguments to `create_test_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_test_account(parent: nil, account: nil) + # Pass arguments to `create_test_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account resource name to create the test account under. + # Format: accounts/\\{account} + # @param account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash] + # Required. The account to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest.new + # + # # Call the create_test_account method. + # result = client.create_test_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + # p result + # + def create_test_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest + + # Converts hash and nil to an 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_test_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_test_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_test_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.create_test_account request, 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 account regardless of its type: standalone, advanced + # account or sub-account. Deleting an advanced account leads to the deletion + # of all of its sub-accounts. This also deletes the account's [developer + # registration + # entity](/merchant/api/reference/rest/accounts_v1/accounts.developerRegistration) + # and any associated GCP project to the account. Executing this method + # requires admin access. The deletion succeeds only if the account does not + # provide services to any other account and has no processed offers. You can + # use the `force` parameter to override this. + # + # @overload delete_account(request, options = nil) + # Pass arguments to `delete_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_account(name: nil, force: nil) + # Pass arguments to `delete_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the account to delete. + # Format: `accounts/{account}` + # @param force [::Boolean] + # Optional. If set to `true`, the account is deleted even if it provides + # services to other accounts or has processed offers. + # @yield [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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new + # + # # Call the delete_account method. + # result = client.delete_account request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.delete_account request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an account regardless of its type: standalone, advanced account or + # sub-account. Executing this method requires admin access. + # + # @overload update_account(request, options = nil) + # Pass arguments to `update_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_account(account: nil, update_mask: nil) + # Pass arguments to `update_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash] + # Required. The new version of the account. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `account_name` + # - `adult_content` + # - `language_code` + # - `time_zone` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new + # + # # Call the update_account method. + # result = client.update_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + # p result + # + def update_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest + + # Converts hash and nil to an 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_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.update_account request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Note: For the `accounts.list` method, quota and limits usage are charged + # for each user, and not for the Merchant Center ID or the advanced account + # ID. To list several sub-accounts, you should use the + # `accounts.listSubaccounts` method, which is more suitable for advanced + # accounts use case. + # + # @overload list_accounts(request, options = nil) + # Pass arguments to `list_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_accounts(page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `accounts.list` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided in the `accounts.list` + # request must match the call that provided the page token. + # @param filter [::String] + # Optional. Returns only accounts that match the + # [filter](https://developers.google.com/merchant/api/guides/accounts/filter). + # For more details, see the + # [filter syntax + # reference](https://developers.google.com/merchant/api/guides/accounts/filter-syntax). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new + # + # # Call the list_accounts method. + # result = client.list_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Account. + # p item + # end + # + def list_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_accounts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.list_accounts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_accounts, "accounts", request, result, 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 all sub-accounts for a given advanced account. This is a + # convenience wrapper for the more powerful `accounts.list` method. This + # method will produce the same results as calling `ListsAccounts` with the + # following filter: + # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` + # + # @overload list_sub_accounts(request, options = nil) + # Pass arguments to `list_sub_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_sub_accounts(provider: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_sub_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param provider [::String] + # Required. The aggregation service provider. + # Format: `accounts/{accountId}` + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `accounts.list` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided in the `accounts.list` + # request must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new + # + # # Call the list_sub_accounts method. + # result = client.list_sub_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Account. + # p item + # end + # + def list_sub_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_sub_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_sub_accounts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_sub_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.list_sub_accounts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, "accounts", request, result, 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 AccountsService REST API. + # + # This class represents the configuration for AccountsService 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::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_account to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_account` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account + ## + # RPC-specific configuration for `create_and_configure_account` + # @return [::Gapic::Config::Method] + # + attr_reader :create_and_configure_account + ## + # RPC-specific configuration for `create_test_account` + # @return [::Gapic::Config::Method] + # + attr_reader :create_test_account + ## + # RPC-specific configuration for `delete_account` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_account + ## + # RPC-specific configuration for `update_account` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account + ## + # RPC-specific configuration for `list_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_accounts + ## + # RPC-specific configuration for `list_sub_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sub_accounts + + # @private + def initialize parent_rpcs = nil + get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account + @get_account = ::Gapic::Config::Method.new get_account_config + create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account + @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config + create_test_account_config = parent_rpcs.create_test_account if parent_rpcs.respond_to? :create_test_account + @create_test_account = ::Gapic::Config::Method.new create_test_account_config + delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account + @delete_account = ::Gapic::Config::Method.new delete_account_config + update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account + @update_account = ::Gapic::Config::Method.new update_account_config + list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts + @list_accounts = ::Gapic::Config::Method.new list_accounts_config + list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts + @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub.rb new file mode 100644 index 000000000000..95cd6be45b12 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub.rb @@ -0,0 +1,509 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/accounts_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountsService + module Rest + ## + # REST service stub for the AccountsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # A result object deserialized from the server's reply + def get_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Account.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_and_configure_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # A result object deserialized from the server's reply + def create_and_configure_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_and_configure_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_and_configure_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Account.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_test_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # A result object deserialized from the server's reply + def create_test_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_test_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_test_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Account.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_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_account", + 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 update_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # A result object deserialized from the server's reply + def update_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Account.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_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse] + # A result object deserialized from the server's reply + def list_accounts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_accounts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_accounts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse.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_sub_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse] + # A result object deserialized from the server's reply + def list_sub_accounts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_sub_accounts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_sub_accounts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_and_configure_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest] + # 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_and_configure_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/accounts:createAndConfigure", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_test_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest] + # 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_test_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}:createTestAccount", + body: "account", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest] + # 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_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{account.name}", + body: "account", + matches: [ + ["account.name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_accounts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/accounts", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sub_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_sub_accounts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{provider}:listSubaccounts", + matches: [ + ["provider", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_services_pb.rb new file mode 100644 index 000000000000..2be0d4a8d89f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_services_pb.rb @@ -0,0 +1,92 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/accounts.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/accounts_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountsService + # Service to support Accounts API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.AccountsService' + + # Retrieves an account from your Merchant Center account. + # After inserting, updating, or deleting an account, it may take several + # minutes before changes take effect. + rpc :GetAccount, ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest, ::Google::Shopping::Merchant::Accounts::V1::Account + # Creates a Merchant Center account with additional configuration. Adds the + # user that makes the request as an admin for the new account. + rpc :CreateAndConfigureAccount, ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest, ::Google::Shopping::Merchant::Accounts::V1::Account + # Creates a Merchant Center test account. + # + # Test accounts are intended for development and testing purposes, such as + # validating API integrations or new feature behavior. + # + # Key characteristics and limitations of test accounts: + # - Immutable Type: A test account cannot be converted into a regular + # (live) Merchant Center account. Likewise, a regular account cannot be + # converted into a test account. + # - Non-Serving Products: Any products, offers, or data created within a + # test account will not be published or made visible to end-users on any + # Google surfaces. They are strictly for testing environments. + # - Separate Environment: Test accounts operate in a sandbox-like manner, + # isolated from live serving and real user traffic. + rpc :CreateTestAccount, ::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest, ::Google::Shopping::Merchant::Accounts::V1::Account + # Deletes the specified account regardless of its type: standalone, advanced + # account or sub-account. Deleting an advanced account leads to the deletion + # of all of its sub-accounts. This also deletes the account's [developer + # registration + # entity](/merchant/api/reference/rest/accounts_v1/accounts.developerRegistration) + # and any associated GCP project to the account. Executing this method + # requires admin access. The deletion succeeds only if the account does not + # provide services to any other account and has no processed offers. You can + # use the `force` parameter to override this. + rpc :DeleteAccount, ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest, ::Google::Protobuf::Empty + # Updates an account regardless of its type: standalone, advanced account or + # sub-account. Executing this method requires admin access. + rpc :UpdateAccount, ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest, ::Google::Shopping::Merchant::Accounts::V1::Account + # Note: For the `accounts.list` method, quota and limits usage are charged + # for each user, and not for the Merchant Center ID or the advanced account + # ID. To list several sub-accounts, you should use the + # `accounts.listSubaccounts` method, which is more suitable for advanced + # accounts use case. + rpc :ListAccounts, ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse + # List all sub-accounts for a given advanced account. This is a + # convenience wrapper for the more powerful `accounts.list` method. This + # method will produce the same results as calling `ListsAccounts` with the + # following filter: + # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` + rpc :ListSubAccounts, ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_pb.rb new file mode 100644 index 000000000000..5ce86e7a0b0d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/accountservices.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n:google/shopping/merchant/accounts/v1/accountservices.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xa2\x08\n\x0e\x41\x63\x63ountService\x12W\n\x13products_management\x18\x64 \x01(\x0b\x32\x38.google.shopping.merchant.accounts.v1.ProductsManagementH\x00\x12Y\n\x14\x63\x61mpaigns_management\x18\x65 \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1.CampaignsManagementH\x00\x12U\n\x12\x61\x63\x63ount_management\x18\x66 \x01(\x0b\x32\x37.google.shopping.merchant.accounts.v1.AccountManagementH\x00\x12W\n\x13\x61\x63\x63ount_aggregation\x18g \x01(\x0b\x32\x38.google.shopping.merchant.accounts.v1.AccountAggregationH\x00\x12`\n\x18local_listing_management\x18h \x01(\x0b\x32<.google.shopping.merchant.accounts.v1.LocalListingManagementH\x00\x12W\n\x13\x63omparison_shopping\x18i \x01(\x0b\x32\x38.google.shopping.merchant.accounts.v1.ComparisonShoppingH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\x08provider\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\"\n\x15provider_display_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12G\n\thandshake\x18\x04 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1.HandshakeB\x03\xe0\x41\x03\x12X\n\nmutability\x18\x05 \x01(\x0e\x32?.google.shopping.merchant.accounts.v1.AccountService.MutabilityB\x03\xe0\x41\x03\x12 \n\x13\x65xternal_account_id\x18\x06 \x01(\tB\x03\xe0\x41\x05\"D\n\nMutability\x12\x1a\n\x16MUTABILITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07MUTABLE\x10\x01\x12\r\n\tIMMUTABLE\x10\x02:v\xea\x41s\n)merchantapi.googleapis.com/AccountService\x12%accounts/{account}/services/{service}*\x0f\x61\x63\x63ountServices2\x0e\x61\x63\x63ountServiceB\x0e\n\x0cservice_typeB\x0b\n\t_provider\"[\n\x18GetAccountServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/AccountService\"\x89\x01\n\x1aListAccountServicesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\"\x86\x01\n\x1bListAccountServicesResponse\x12N\n\x10\x61\x63\x63ount_services\x18\x01 \x03(\x0b\x32\x34.google.shopping.merchant.accounts.v1.AccountService\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc5\x01\n\x1cProposeAccountServiceRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x15\n\x08provider\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x0f\x61\x63\x63ount_service\x18\x04 \x01(\x0b\x32\x34.google.shopping.merchant.accounts.v1.AccountServiceB\x03\xe0\x41\x02\"_\n\x1c\x41pproveAccountServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/AccountService\"^\n\x1bRejectAccountServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/AccountService\"\x14\n\x12ProductsManagement\"\x15\n\x13\x43\x61mpaignsManagement\"\x13\n\x11\x41\x63\x63ountManagement\"\x14\n\x12\x41\x63\x63ountAggregation\"\x18\n\x16LocalListingManagement\"\x14\n\x12\x43omparisonShopping\"\xcd\x02\n\tHandshake\x12Z\n\x0e\x61pproval_state\x18\x01 \x01(\x0e\x32=.google.shopping.merchant.accounts.v1.Handshake.ApprovalStateB\x03\xe0\x41\x03\x12I\n\x05\x61\x63tor\x18\x02 \x01(\x0e\x32\x35.google.shopping.merchant.accounts.v1.Handshake.ActorB\x03\xe0\x41\x03\"[\n\rApprovalState\x12\x1e\n\x1a\x41PPROVAL_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0f\n\x0b\x45STABLISHED\x10\x02\x12\x0c\n\x08REJECTED\x10\x03\"<\n\x05\x41\x63tor\x12\x15\n\x11\x41\x43TOR_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41\x43\x43OUNT\x10\x01\x12\x0f\n\x0bOTHER_PARTY\x10\x02\x32\x85\t\n\x16\x41\x63\x63ountServicesService\x12\xc3\x01\n\x11GetAccountService\x12>.google.shopping.merchant.accounts.v1.GetAccountServiceRequest\x1a\x34.google.shopping.merchant.accounts.v1.AccountService\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/accounts/v1/{name=accounts/*/services/*}\x12\xd6\x01\n\x13ListAccountServices\x12@.google.shopping.merchant.accounts.v1.ListAccountServicesRequest\x1a\x41.google.shopping.merchant.accounts.v1.ListAccountServicesResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/accounts/v1/{parent=accounts/*}/services\x12\xf1\x01\n\x15ProposeAccountService\x12\x42.google.shopping.merchant.accounts.v1.ProposeAccountServiceRequest\x1a\x34.google.shopping.merchant.accounts.v1.AccountService\"^\xda\x41\x1fparent,provider,account_service\x82\xd3\xe4\x93\x02\x36\"1/accounts/v1/{parent=accounts/*}/services:propose:\x01*\x12\xd6\x01\n\x15\x41pproveAccountService\x12\x42.google.shopping.merchant.accounts.v1.ApproveAccountServiceRequest\x1a\x34.google.shopping.merchant.accounts.v1.AccountService\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/accounts/v1/{name=accounts/*/services/*}:approve:\x01*\x12\xb5\x01\n\x14RejectAccountService\x12\x41.google.shopping.merchant.accounts.v1.RejectAccountServiceRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\"0/accounts/v1/{name=accounts/*/services/*}:reject:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x87\x02\n(com.google.shopping.merchant.accounts.v1B\x14\x41\x63\x63ountServicesProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + AccountService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountService").msgclass + AccountService::Mutability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountService.Mutability").enummodule + GetAccountServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAccountServiceRequest").msgclass + ListAccountServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountServicesRequest").msgclass + ListAccountServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountServicesResponse").msgclass + ProposeAccountServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ProposeAccountServiceRequest").msgclass + ApproveAccountServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ApproveAccountServiceRequest").msgclass + RejectAccountServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.RejectAccountServiceRequest").msgclass + ProductsManagement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ProductsManagement").msgclass + CampaignsManagement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CampaignsManagement").msgclass + AccountManagement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountManagement").msgclass + AccountAggregation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountAggregation").msgclass + LocalListingManagement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LocalListingManagement").msgclass + ComparisonShopping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ComparisonShopping").msgclass + Handshake = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Handshake").msgclass + Handshake::ApprovalState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Handshake.ApprovalState").enummodule + Handshake::Actor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Handshake.Actor").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_services_pb.rb new file mode 100644 index 000000000000..20f36bddf4c9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/accountservices.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/accountservices_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountServicesService + # Service to support AccountService API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.AccountServicesService' + + # Retrieve an account service. + rpc :GetAccountService, ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::AccountService + # List account services for the specified accounts. Supports filtering. + rpc :ListAccountServices, ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest, ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse + # Propose an account service. + rpc :ProposeAccountService, ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::AccountService + # Approve an account service proposal. + rpc :ApproveAccountService, ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::AccountService + # Reject an account service (both proposed and approve services can be + # rejected). + rpc :RejectAccountService, ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service.rb new file mode 100644 index 000000000000..7ef491076577 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/paths" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/client" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/autofeed_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new + # + module AutofeedSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "autofeed_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/client.rb new file mode 100644 index 000000000000..6c4691ab4695 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/client.rb @@ -0,0 +1,577 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/autofeedsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AutofeedSettingsService + ## + # Client for the AutofeedSettingsService service. + # + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :autofeed_settings_service_stub + + ## + # Configure the AutofeedSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutofeedSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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 + @autofeed_settings_service_stub.universe_domain + end + + ## + # Create a new AutofeedSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutofeedSettingsService 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/shopping/merchant/accounts/v1/autofeedsettings_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 + + @autofeed_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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 + ) + + @autofeed_settings_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 + @autofeed_settings_service_stub.logger + end + + # Service calls + + ## + # Retrieves the autofeed settings of an account. + # + # @overload get_autofeed_settings(request, options = nil) + # Pass arguments to `get_autofeed_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_autofeed_settings(name: nil) + # Pass arguments to `get_autofeed_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the autofeed settings. + # Format: `accounts/{account}/autofeedSettings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new + # + # # Call the get_autofeed_settings method. + # result = client.get_autofeed_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. + # p result + # + def get_autofeed_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_autofeed_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_autofeed_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_autofeed_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @autofeed_settings_service_stub.call_rpc :get_autofeed_settings, request, 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 autofeed settings of an account. + # + # @overload update_autofeed_settings(request, options = nil) + # Pass arguments to `update_autofeed_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_autofeed_settings(autofeed_settings: nil, update_mask: nil) + # Pass arguments to `update_autofeed_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param autofeed_settings [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings, ::Hash] + # Required. The new version of the autofeed setting. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new + # + # # Call the update_autofeed_settings method. + # result = client.update_autofeed_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. + # p result + # + def update_autofeed_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest + + # Converts hash and nil to 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_autofeed_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.autofeed_settings&.name + header_params["autofeed_settings.name"] = request.autofeed_settings.name + end + + request_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_autofeed_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_autofeed_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @autofeed_settings_service_stub.call_rpc :update_autofeed_settings, request, 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 AutofeedSettingsService API. + # + # This class represents the configuration for AutofeedSettingsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_autofeed_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_autofeed_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_autofeed_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AutofeedSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_autofeed_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_autofeed_settings + ## + # RPC-specific configuration for `update_autofeed_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_autofeed_settings + + # @private + def initialize parent_rpcs = nil + get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings + @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config + update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings + @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials.rb new file mode 100644 index 000000000000..2d1ff39c0d60 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_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 Shopping + module Merchant + module Accounts + module V1 + module AutofeedSettingsService + # Credentials for the AutofeedSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/paths.rb new file mode 100644 index 000000000000..a83da4cff7a4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/paths.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 Shopping + module Merchant + module Accounts + module V1 + module AutofeedSettingsService + # Path helper methods for the AutofeedSettingsService API. + module Paths + ## + # Create a fully-qualified AutofeedSettings resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/autofeedSettings` + # + # @param account [String] + # + # @return [::String] + def autofeed_settings_path account: + "accounts/#{account}/autofeedSettings" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest.rb new file mode 100644 index 000000000000..daf710746084 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/paths" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new + # + module AutofeedSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client.rb new file mode 100644 index 000000000000..15a8f28da8b0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client.rb @@ -0,0 +1,520 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1/autofeedsettings_pb" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AutofeedSettingsService + module Rest + ## + # REST client for the AutofeedSettingsService service. + # + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :autofeed_settings_service_stub + + ## + # Configure the AutofeedSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutofeedSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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 + @autofeed_settings_service_stub.universe_domain + end + + ## + # Create a new AutofeedSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutofeedSettingsService 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 + + @autofeed_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @autofeed_settings_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 + @autofeed_settings_service_stub.logger + end + + # Service calls + + ## + # Retrieves the autofeed settings of an account. + # + # @overload get_autofeed_settings(request, options = nil) + # Pass arguments to `get_autofeed_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_autofeed_settings(name: nil) + # Pass arguments to `get_autofeed_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the autofeed settings. + # Format: `accounts/{account}/autofeedSettings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new + # + # # Call the get_autofeed_settings method. + # result = client.get_autofeed_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. + # p result + # + def get_autofeed_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_autofeed_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_autofeed_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_autofeed_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @autofeed_settings_service_stub.get_autofeed_settings request, 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 autofeed settings of an account. + # + # @overload update_autofeed_settings(request, options = nil) + # Pass arguments to `update_autofeed_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_autofeed_settings(autofeed_settings: nil, update_mask: nil) + # Pass arguments to `update_autofeed_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param autofeed_settings [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings, ::Hash] + # Required. The new version of the autofeed setting. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new + # + # # Call the update_autofeed_settings method. + # result = client.update_autofeed_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. + # p result + # + def update_autofeed_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest + + # Converts hash and nil to an 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_autofeed_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_autofeed_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_autofeed_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @autofeed_settings_service_stub.update_autofeed_settings request, 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 AutofeedSettingsService REST API. + # + # This class represents the configuration for AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_autofeed_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_autofeed_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_autofeed_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AutofeedSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_autofeed_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_autofeed_settings + ## + # RPC-specific configuration for `update_autofeed_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_autofeed_settings + + # @private + def initialize parent_rpcs = nil + get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings + @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config + update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings + @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..01a2e1b90097 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/autofeedsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AutofeedSettingsService + module Rest + ## + # REST service stub for the AutofeedSettingsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_autofeed_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # A result object deserialized from the server's reply + def get_autofeed_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_autofeed_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_autofeed_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.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_autofeed_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # A result object deserialized from the server's reply + def update_autofeed_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_autofeed_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_autofeed_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_autofeed_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_autofeed_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/autofeedSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_autofeed_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest] + # 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_autofeed_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{autofeed_settings.name}", + body: "autofeed_settings", + matches: [ + ["autofeed_settings.name", %r{^accounts/[^/]+/autofeedSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_pb.rb new file mode 100644 index 000000000000..43e4343c0b3b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/autofeedsettings.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n;google/shopping/merchant/accounts/v1/autofeedsettings.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xd5\x01\n\x10\x41utofeedSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0f\x65nable_products\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02\x12\x15\n\x08\x65ligible\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03:y\xea\x41v\n+merchantapi.googleapis.com/AutofeedSettings\x12#accounts/{account}/autofeedSettings*\x10\x61utofeedSettings2\x10\x61utofeedSettings\"_\n\x1aGetAutofeedSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/AutofeedSettings\"\xad\x01\n\x1dUpdateAutofeedSettingsRequest\x12V\n\x11\x61utofeed_settings\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.AutofeedSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xca\x04\n\x17\x41utofeedSettingsService\x12\xcf\x01\n\x13GetAutofeedSettings\x12@.google.shopping.merchant.accounts.v1.GetAutofeedSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.AutofeedSettings\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1/{name=accounts/*/autofeedSettings}\x12\x93\x02\n\x16UpdateAutofeedSettings\x12\x43.google.shopping.merchant.accounts.v1.UpdateAutofeedSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.AutofeedSettings\"|\xda\x41\x1d\x61utofeed_settings,update_mask\x82\xd3\xe4\x93\x02V2A/accounts/v1/{autofeed_settings.name=accounts/*/autofeedSettings}:\x11\x61utofeed_settings\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x88\x02\n(com.google.shopping.merchant.accounts.v1B\x15\x41utofeedSettingsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + AutofeedSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutofeedSettings").msgclass + GetAutofeedSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAutofeedSettingsRequest").msgclass + UpdateAutofeedSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateAutofeedSettingsRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_services_pb.rb new file mode 100644 index 000000000000..0ab395d19681 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/autofeedsettings.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/autofeedsettings_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AutofeedSettingsService + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.AutofeedSettingsService' + + # Retrieves the autofeed settings of an account. + rpc :GetAutofeedSettings, ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings + # Updates the autofeed settings of an account. + rpc :UpdateAutofeedSettings, ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service.rb new file mode 100644 index 000000000000..4ba082f3e4bc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/paths" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/client" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/automatic_improvements_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new + # + module AutomaticImprovementsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "automatic_improvements_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/client.rb new file mode 100644 index 000000000000..6bcfb8b76430 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/client.rb @@ -0,0 +1,587 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/automaticimprovements_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AutomaticImprovementsService + ## + # Client for the AutomaticImprovementsService service. + # + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :automatic_improvements_service_stub + + ## + # Configure the AutomaticImprovementsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutomaticImprovementsService clients + # ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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 + @automatic_improvements_service_stub.universe_domain + end + + ## + # Create a new AutomaticImprovementsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutomaticImprovementsService 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/shopping/merchant/accounts/v1/automaticimprovements_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 + + @automatic_improvements_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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 + ) + + @automatic_improvements_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 + @automatic_improvements_service_stub.logger + end + + # Service calls + + ## + # Retrieves the automatic improvements of an account. + # + # @overload get_automatic_improvements(request, options = nil) + # Pass arguments to `get_automatic_improvements` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_automatic_improvements(name: nil) + # Pass arguments to `get_automatic_improvements` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the automatic improvements. + # Format: `accounts/{account}/automaticImprovements` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new + # + # # Call the get_automatic_improvements method. + # result = client.get_automatic_improvements request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. + # p result + # + def get_automatic_improvements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_automatic_improvements.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_automatic_improvements.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_automatic_improvements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatic_improvements_service_stub.call_rpc :get_automatic_improvements, request, 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 automatic improvements of an account. + # + # @overload update_automatic_improvements(request, options = nil) + # Pass arguments to `update_automatic_improvements` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_automatic_improvements(automatic_improvements: nil, update_mask: nil) + # Pass arguments to `update_automatic_improvements` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param automatic_improvements [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements, ::Hash] + # Required. The new version of the automatic imrovements. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `item_updates` + # - `item_updates.account_level_settings` + # - `image_improvements` + # - `image_improvements.account_level_settings` + # - `shipping_improvements` + # - `shipping_improvements.allow_shipping_improvements` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new + # + # # Call the update_automatic_improvements method. + # result = client.update_automatic_improvements request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. + # p result + # + def update_automatic_improvements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest + + # Converts hash and nil to 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_automatic_improvements.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.automatic_improvements&.name + header_params["automatic_improvements.name"] = request.automatic_improvements.name + end + + request_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_automatic_improvements.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_automatic_improvements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatic_improvements_service_stub.call_rpc :update_automatic_improvements, request, 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 AutomaticImprovementsService API. + # + # This class represents the configuration for AutomaticImprovementsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_automatic_improvements to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_automatic_improvements.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_automatic_improvements.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AutomaticImprovementsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_automatic_improvements` + # @return [::Gapic::Config::Method] + # + attr_reader :get_automatic_improvements + ## + # RPC-specific configuration for `update_automatic_improvements` + # @return [::Gapic::Config::Method] + # + attr_reader :update_automatic_improvements + + # @private + def initialize parent_rpcs = nil + get_automatic_improvements_config = parent_rpcs.get_automatic_improvements if parent_rpcs.respond_to? :get_automatic_improvements + @get_automatic_improvements = ::Gapic::Config::Method.new get_automatic_improvements_config + update_automatic_improvements_config = parent_rpcs.update_automatic_improvements if parent_rpcs.respond_to? :update_automatic_improvements + @update_automatic_improvements = ::Gapic::Config::Method.new update_automatic_improvements_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials.rb new file mode 100644 index 000000000000..c23f10a77faa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_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 Shopping + module Merchant + module Accounts + module V1 + module AutomaticImprovementsService + # Credentials for the AutomaticImprovementsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/paths.rb new file mode 100644 index 000000000000..4ceb1ee9a029 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/paths.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 Shopping + module Merchant + module Accounts + module V1 + module AutomaticImprovementsService + # Path helper methods for the AutomaticImprovementsService API. + module Paths + ## + # Create a fully-qualified AutomaticImprovements resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/automaticImprovements` + # + # @param account [String] + # + # @return [::String] + def automatic_improvements_path account: + "accounts/#{account}/automaticImprovements" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest.rb new file mode 100644 index 000000000000..e87170af9a83 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/paths" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new + # + module AutomaticImprovementsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/client.rb new file mode 100644 index 000000000000..a81cda5c6cc9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/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/shopping/merchant/accounts/v1/automaticimprovements_pb" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AutomaticImprovementsService + module Rest + ## + # REST client for the AutomaticImprovementsService service. + # + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :automatic_improvements_service_stub + + ## + # Configure the AutomaticImprovementsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutomaticImprovementsService clients + # ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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 + @automatic_improvements_service_stub.universe_domain + end + + ## + # Create a new AutomaticImprovementsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutomaticImprovementsService 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 + + @automatic_improvements_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @automatic_improvements_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 + @automatic_improvements_service_stub.logger + end + + # Service calls + + ## + # Retrieves the automatic improvements of an account. + # + # @overload get_automatic_improvements(request, options = nil) + # Pass arguments to `get_automatic_improvements` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_automatic_improvements(name: nil) + # Pass arguments to `get_automatic_improvements` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the automatic improvements. + # Format: `accounts/{account}/automaticImprovements` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new + # + # # Call the get_automatic_improvements method. + # result = client.get_automatic_improvements request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. + # p result + # + def get_automatic_improvements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_automatic_improvements.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_automatic_improvements.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_automatic_improvements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatic_improvements_service_stub.get_automatic_improvements request, 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 automatic improvements of an account. + # + # @overload update_automatic_improvements(request, options = nil) + # Pass arguments to `update_automatic_improvements` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_automatic_improvements(automatic_improvements: nil, update_mask: nil) + # Pass arguments to `update_automatic_improvements` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param automatic_improvements [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements, ::Hash] + # Required. The new version of the automatic imrovements. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `item_updates` + # - `item_updates.account_level_settings` + # - `image_improvements` + # - `image_improvements.account_level_settings` + # - `shipping_improvements` + # - `shipping_improvements.allow_shipping_improvements` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new + # + # # Call the update_automatic_improvements method. + # result = client.update_automatic_improvements request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. + # p result + # + def update_automatic_improvements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest + + # Converts hash and nil to an 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_automatic_improvements.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_automatic_improvements.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_automatic_improvements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatic_improvements_service_stub.update_automatic_improvements request, 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 AutomaticImprovementsService REST API. + # + # This class represents the configuration for AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_automatic_improvements to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_automatic_improvements.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_automatic_improvements.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AutomaticImprovementsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_automatic_improvements` + # @return [::Gapic::Config::Method] + # + attr_reader :get_automatic_improvements + ## + # RPC-specific configuration for `update_automatic_improvements` + # @return [::Gapic::Config::Method] + # + attr_reader :update_automatic_improvements + + # @private + def initialize parent_rpcs = nil + get_automatic_improvements_config = parent_rpcs.get_automatic_improvements if parent_rpcs.respond_to? :get_automatic_improvements + @get_automatic_improvements = ::Gapic::Config::Method.new get_automatic_improvements_config + update_automatic_improvements_config = parent_rpcs.update_automatic_improvements if parent_rpcs.respond_to? :update_automatic_improvements + @update_automatic_improvements = ::Gapic::Config::Method.new update_automatic_improvements_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub.rb new file mode 100644 index 000000000000..daa5590d0443 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/automaticimprovements_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AutomaticImprovementsService + module Rest + ## + # REST service stub for the AutomaticImprovementsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_automatic_improvements REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # A result object deserialized from the server's reply + def get_automatic_improvements request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_automatic_improvements_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_automatic_improvements", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.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_automatic_improvements REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # A result object deserialized from the server's reply + def update_automatic_improvements request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_automatic_improvements_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_automatic_improvements", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_automatic_improvements REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_automatic_improvements_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/automaticImprovements/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_automatic_improvements REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest] + # 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_automatic_improvements_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{automatic_improvements.name}", + body: "automatic_improvements", + matches: [ + ["automatic_improvements.name", %r{^accounts/[^/]+/automaticImprovements/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_pb.rb new file mode 100644 index 000000000000..b6035609a228 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/automaticimprovements.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n@google/shopping/merchant/accounts/v1/automaticimprovements.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa0\x04\n\x15\x41utomaticImprovements\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12U\n\x0citem_updates\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1.AutomaticItemUpdatesH\x00\x88\x01\x01\x12\x61\n\x12image_improvements\x18\x03 \x01(\x0b\x32@.google.shopping.merchant.accounts.v1.AutomaticImageImprovementsH\x01\x88\x01\x01\x12g\n\x15shipping_improvements\x18\x04 \x01(\x0b\x32\x43.google.shopping.merchant.accounts.v1.AutomaticShippingImprovementsH\x02\x88\x01\x01:\x8e\x01\xea\x41\x8a\x01\n0merchantapi.googleapis.com/AutomaticImprovements\x12(accounts/{account}/automaticImprovements*\x15\x61utomaticImprovements2\x15\x61utomaticImprovementsB\x0f\n\r_item_updatesB\x15\n\x13_image_improvementsB\x18\n\x16_shipping_improvements\"\xa6\x05\n\x14\x41utomaticItemUpdates\x12\x86\x01\n\x1d\x61\x63\x63ount_item_updates_settings\x18\x01 \x01(\x0b\x32Z.google.shopping.merchant.accounts.v1.AutomaticItemUpdates.ItemUpdatesAccountLevelSettingsB\x03\xe0\x41\x01\x12*\n\x1d\x65\x66\x66\x65\x63tive_allow_price_updates\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\x31\n$effective_allow_availability_updates\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12\x38\n+effective_allow_strict_availability_updates\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12.\n!effective_allow_condition_updates\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x1a\xbb\x02\n\x1fItemUpdatesAccountLevelSettings\x12 \n\x13\x61llow_price_updates\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\'\n\x1a\x61llow_availability_updates\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12.\n!allow_strict_availability_updates\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12$\n\x17\x61llow_condition_updates\x18\x04 \x01(\x08H\x03\x88\x01\x01\x42\x16\n\x14_allow_price_updatesB\x1d\n\x1b_allow_availability_updatesB$\n\"_allow_strict_availability_updatesB\x1a\n\x18_allow_condition_updates\"\xa0\x03\n\x1a\x41utomaticImageImprovements\x12\x9d\x01\n#account_image_improvements_settings\x18\x01 \x01(\x0b\x32\x66.google.shopping.merchant.accounts.v1.AutomaticImageImprovements.ImageImprovementsAccountLevelSettingsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x39\n,effective_allow_automatic_image_improvements\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x1a\x7f\n%ImageImprovementsAccountLevelSettings\x12/\n\"allow_automatic_image_improvements\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42%\n#_allow_automatic_image_improvementsB&\n$_account_image_improvements_settings\"i\n\x1d\x41utomaticShippingImprovements\x12(\n\x1b\x61llow_shipping_improvements\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x1e\n\x1c_allow_shipping_improvements\"i\n\x1fGetAutomaticImprovementsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/AutomaticImprovements\"\xbc\x01\n\"UpdateAutomaticImprovementsRequest\x12`\n\x16\x61utomatic_improvements\x18\x01 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1.AutomaticImprovementsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\x87\x05\n\x1c\x41utomaticImprovementsService\x12\xe3\x01\n\x18GetAutomaticImprovements\x12\x45.google.shopping.merchant.accounts.v1.GetAutomaticImprovementsRequest\x1a;.google.shopping.merchant.accounts.v1.AutomaticImprovements\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/accounts/v1/{name=accounts/*/automaticImprovements}\x12\xb7\x02\n\x1bUpdateAutomaticImprovements\x12H.google.shopping.merchant.accounts.v1.UpdateAutomaticImprovementsRequest\x1a;.google.shopping.merchant.accounts.v1.AutomaticImprovements\"\x90\x01\xda\x41\"automatic_improvements,update_mask\x82\xd3\xe4\x93\x02\x65\x32K/accounts/v1/{automatic_improvements.name=accounts/*/automaticImprovements}:\x16\x61utomatic_improvements\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8d\x02\n(com.google.shopping.merchant.accounts.v1B\x1a\x41utomaticImprovementsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + AutomaticImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticImprovements").msgclass + AutomaticItemUpdates = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticItemUpdates").msgclass + AutomaticItemUpdates::ItemUpdatesAccountLevelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings").msgclass + AutomaticImageImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticImageImprovements").msgclass + AutomaticImageImprovements::ImageImprovementsAccountLevelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings").msgclass + AutomaticShippingImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticShippingImprovements").msgclass + GetAutomaticImprovementsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAutomaticImprovementsRequest").msgclass + UpdateAutomaticImprovementsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateAutomaticImprovementsRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_services_pb.rb new file mode 100644 index 000000000000..44a1730d0c3b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/automaticimprovements.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/automaticimprovements_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AutomaticImprovementsService + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.AutomaticImprovementsService' + + # Retrieves the automatic improvements of an account. + rpc :GetAutomaticImprovements, ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest, ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements + # Updates the automatic improvements of an account. + rpc :UpdateAutomaticImprovements, ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest, ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service.rb new file mode 100644 index 000000000000..5c83ec0b659b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/business_identity_service/credentials" +require "google/shopping/merchant/accounts/v1/business_identity_service/paths" +require "google/shopping/merchant/accounts/v1/business_identity_service/client" +require "google/shopping/merchant/accounts/v1/business_identity_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/business_identity_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/business_identity_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new + # + module BusinessIdentityService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "business_identity_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/business_identity_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/client.rb new file mode 100644 index 000000000000..907261226e52 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/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! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1/businessidentity_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module BusinessIdentityService + ## + # Client for the BusinessIdentityService service. + # + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_identity_service_stub + + ## + # Configure the BusinessIdentityService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessIdentityService clients + # ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BusinessIdentityService 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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @business_identity_service_stub.universe_domain + end + + ## + # Create a new BusinessIdentityService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessIdentityService 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/shopping/merchant/accounts/v1/businessidentity_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 + + @business_identity_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @business_identity_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 + @business_identity_service_stub.logger + end + + # Service calls + + ## + # Retrieves the business identity of an account. + # + # @overload get_business_identity(request, options = nil) + # Pass arguments to `get_business_identity` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_business_identity(name: nil) + # Pass arguments to `get_business_identity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the business identity. + # Format: `accounts/{account}/businessIdentity`. For example, + # `accounts/123456/businessIdentity`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new + # + # # Call the get_business_identity method. + # result = client.get_business_identity request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. + # p result + # + def get_business_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_business_identity.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_business_identity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_business_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_identity_service_stub.call_rpc :get_business_identity, request, 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 business identity of an account. Executing this method requires + # admin access. + # + # @overload update_business_identity(request, options = nil) + # Pass arguments to `update_business_identity` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_business_identity(business_identity: nil, update_mask: nil) + # Pass arguments to `update_business_identity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param business_identity [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity, ::Hash] + # Required. The new version of the business identity. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `black_owned` + # - `latino_owned` + # - `promotions_consent` + # - `small_business` + # - `veteran_owned` + # - `women_owned` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new + # + # # Call the update_business_identity method. + # result = client.update_business_identity request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. + # p result + # + def update_business_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest + + # Converts hash and nil to 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_business_identity.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.business_identity&.name + header_params["business_identity.name"] = request.business_identity.name + end + + request_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_business_identity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_business_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_identity_service_stub.call_rpc :update_business_identity, request, 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 BusinessIdentityService API. + # + # This class represents the configuration for BusinessIdentityService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_business_identity to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_identity.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_identity.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 BusinessIdentityService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_business_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :get_business_identity + ## + # RPC-specific configuration for `update_business_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :update_business_identity + + # @private + def initialize parent_rpcs = nil + get_business_identity_config = parent_rpcs.get_business_identity if parent_rpcs.respond_to? :get_business_identity + @get_business_identity = ::Gapic::Config::Method.new get_business_identity_config + update_business_identity_config = parent_rpcs.update_business_identity if parent_rpcs.respond_to? :update_business_identity + @update_business_identity = ::Gapic::Config::Method.new update_business_identity_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/credentials.rb new file mode 100644 index 000000000000..29b28c46fdb0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_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 Shopping + module Merchant + module Accounts + module V1 + module BusinessIdentityService + # Credentials for the BusinessIdentityService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/paths.rb new file mode 100644 index 000000000000..7ad99f28e0c6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/paths.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 Shopping + module Merchant + module Accounts + module V1 + module BusinessIdentityService + # Path helper methods for the BusinessIdentityService API. + module Paths + ## + # Create a fully-qualified BusinessIdentity resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/businessIdentity` + # + # @param account [String] + # + # @return [::String] + def business_identity_path account: + "accounts/#{account}/businessIdentity" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest.rb new file mode 100644 index 000000000000..d1b21d4f1004 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/business_identity_service/credentials" +require "google/shopping/merchant/accounts/v1/business_identity_service/paths" +require "google/shopping/merchant/accounts/v1/business_identity_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/business_identity_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new + # + module BusinessIdentityService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/business_identity_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/client.rb new file mode 100644 index 000000000000..a973d6631647 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/client.rb @@ -0,0 +1,532 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/businessidentity_pb" +require "google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module BusinessIdentityService + module Rest + ## + # REST client for the BusinessIdentityService service. + # + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_identity_service_stub + + ## + # Configure the BusinessIdentityService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessIdentityService clients + # ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BusinessIdentityService 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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @business_identity_service_stub.universe_domain + end + + ## + # Create a new BusinessIdentityService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessIdentityService 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 + + @business_identity_service_stub = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @business_identity_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 + @business_identity_service_stub.logger + end + + # Service calls + + ## + # Retrieves the business identity of an account. + # + # @overload get_business_identity(request, options = nil) + # Pass arguments to `get_business_identity` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_business_identity(name: nil) + # Pass arguments to `get_business_identity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the business identity. + # Format: `accounts/{account}/businessIdentity`. For example, + # `accounts/123456/businessIdentity`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new + # + # # Call the get_business_identity method. + # result = client.get_business_identity request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. + # p result + # + def get_business_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_business_identity.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_business_identity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_business_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_identity_service_stub.get_business_identity request, 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 business identity of an account. Executing this method requires + # admin access. + # + # @overload update_business_identity(request, options = nil) + # Pass arguments to `update_business_identity` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_business_identity(business_identity: nil, update_mask: nil) + # Pass arguments to `update_business_identity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param business_identity [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity, ::Hash] + # Required. The new version of the business identity. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `black_owned` + # - `latino_owned` + # - `promotions_consent` + # - `small_business` + # - `veteran_owned` + # - `women_owned` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new + # + # # Call the update_business_identity method. + # result = client.update_business_identity request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. + # p result + # + def update_business_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest + + # Converts hash and nil to an 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_business_identity.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_business_identity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_business_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_identity_service_stub.update_business_identity request, 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 BusinessIdentityService REST API. + # + # This class represents the configuration for BusinessIdentityService 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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_business_identity to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_identity.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_identity.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 BusinessIdentityService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_business_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :get_business_identity + ## + # RPC-specific configuration for `update_business_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :update_business_identity + + # @private + def initialize parent_rpcs = nil + get_business_identity_config = parent_rpcs.get_business_identity if parent_rpcs.respond_to? :get_business_identity + @get_business_identity = ::Gapic::Config::Method.new get_business_identity_config + update_business_identity_config = parent_rpcs.update_business_identity if parent_rpcs.respond_to? :update_business_identity + @update_business_identity = ::Gapic::Config::Method.new update_business_identity_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub.rb new file mode 100644 index 000000000000..7fe004ede755 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/businessidentity_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module BusinessIdentityService + module Rest + ## + # REST service stub for the BusinessIdentityService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_business_identity REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # A result object deserialized from the server's reply + def get_business_identity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_business_identity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_business_identity", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.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_business_identity REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # A result object deserialized from the server's reply + def update_business_identity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_business_identity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_business_identity", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_business_identity REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_business_identity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/businessIdentity/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_business_identity REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest] + # 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_business_identity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{business_identity.name}", + body: "business_identity", + matches: [ + ["business_identity.name", %r{^accounts/[^/]+/businessIdentity/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service.rb new file mode 100644 index 000000000000..e6c6c80c875d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/business_info_service/credentials" +require "google/shopping/merchant/accounts/v1/business_info_service/paths" +require "google/shopping/merchant/accounts/v1/business_info_service/client" +require "google/shopping/merchant/accounts/v1/business_info_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support business info API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/business_info_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/business_info_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new + # + module BusinessInfoService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "business_info_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/business_info_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/client.rb new file mode 100644 index 000000000000..e9e7b76900fa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/client.rb @@ -0,0 +1,585 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/businessinfo_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module BusinessInfoService + ## + # Client for the BusinessInfoService service. + # + # Service to support business info API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_info_service_stub + + ## + # Configure the BusinessInfoService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessInfoService clients + # ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BusinessInfoService 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::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @business_info_service_stub.universe_domain + end + + ## + # Create a new BusinessInfoService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessInfoService 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/shopping/merchant/accounts/v1/businessinfo_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 + + @business_info_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @business_info_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 + @business_info_service_stub.logger + end + + # Service calls + + ## + # Retrieves the business info of an account. + # + # @overload get_business_info(request, options = nil) + # Pass arguments to `get_business_info` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_business_info(name: nil) + # Pass arguments to `get_business_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the business info. + # Format: `accounts/{account}/businessInfo`. For example, + # `accounts/123456/businessInfo`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new + # + # # Call the get_business_info method. + # result = client.get_business_info request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. + # p result + # + def get_business_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_business_info.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_business_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_business_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_info_service_stub.call_rpc :get_business_info, request, 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 business info of an account. Executing this method requires + # admin access. + # + # @overload update_business_info(request, options = nil) + # Pass arguments to `update_business_info` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_business_info(business_info: nil, update_mask: nil) + # Pass arguments to `update_business_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param business_info [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo, ::Hash] + # Required. The new version of the business info. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `address` + # - `customer_service` + # - `korean_business_registration_number` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new + # + # # Call the update_business_info method. + # result = client.update_business_info request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. + # p result + # + def update_business_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest + + # Converts hash and nil to 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_business_info.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.business_info&.name + header_params["business_info.name"] = request.business_info.name + end + + request_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_business_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_business_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_info_service_stub.call_rpc :update_business_info, request, 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 BusinessInfoService API. + # + # This class represents the configuration for BusinessInfoService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_business_info to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_info.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_info.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::BusinessInfoService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 BusinessInfoService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_business_info` + # @return [::Gapic::Config::Method] + # + attr_reader :get_business_info + ## + # RPC-specific configuration for `update_business_info` + # @return [::Gapic::Config::Method] + # + attr_reader :update_business_info + + # @private + def initialize parent_rpcs = nil + get_business_info_config = parent_rpcs.get_business_info if parent_rpcs.respond_to? :get_business_info + @get_business_info = ::Gapic::Config::Method.new get_business_info_config + update_business_info_config = parent_rpcs.update_business_info if parent_rpcs.respond_to? :update_business_info + @update_business_info = ::Gapic::Config::Method.new update_business_info_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/credentials.rb new file mode 100644 index 000000000000..f24916f13271 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_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 Shopping + module Merchant + module Accounts + module V1 + module BusinessInfoService + # Credentials for the BusinessInfoService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/paths.rb new file mode 100644 index 000000000000..f7bfa247a852 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/paths.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 Shopping + module Merchant + module Accounts + module V1 + module BusinessInfoService + # Path helper methods for the BusinessInfoService API. + module Paths + ## + # Create a fully-qualified BusinessInfo resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/businessInfo` + # + # @param account [String] + # + # @return [::String] + def business_info_path account: + "accounts/#{account}/businessInfo" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest.rb new file mode 100644 index 000000000000..da771cb896f3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/business_info_service/credentials" +require "google/shopping/merchant/accounts/v1/business_info_service/paths" +require "google/shopping/merchant/accounts/v1/business_info_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support business info API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/business_info_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new + # + module BusinessInfoService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/business_info_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/client.rb new file mode 100644 index 000000000000..5b74b6a26ee1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/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/shopping/merchant/accounts/v1/businessinfo_pb" +require "google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module BusinessInfoService + module Rest + ## + # REST client for the BusinessInfoService service. + # + # Service to support business info API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_info_service_stub + + ## + # Configure the BusinessInfoService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessInfoService clients + # ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BusinessInfoService 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::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @business_info_service_stub.universe_domain + end + + ## + # Create a new BusinessInfoService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessInfoService 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 + + @business_info_service_stub = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @business_info_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 + @business_info_service_stub.logger + end + + # Service calls + + ## + # Retrieves the business info of an account. + # + # @overload get_business_info(request, options = nil) + # Pass arguments to `get_business_info` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_business_info(name: nil) + # Pass arguments to `get_business_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the business info. + # Format: `accounts/{account}/businessInfo`. For example, + # `accounts/123456/businessInfo`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new + # + # # Call the get_business_info method. + # result = client.get_business_info request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. + # p result + # + def get_business_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_business_info.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_business_info.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_business_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_info_service_stub.get_business_info request, 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 business info of an account. Executing this method requires + # admin access. + # + # @overload update_business_info(request, options = nil) + # Pass arguments to `update_business_info` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_business_info(business_info: nil, update_mask: nil) + # Pass arguments to `update_business_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param business_info [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo, ::Hash] + # Required. The new version of the business info. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `address` + # - `customer_service` + # - `korean_business_registration_number` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new + # + # # Call the update_business_info method. + # result = client.update_business_info request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. + # p result + # + def update_business_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest + + # Converts hash and nil to an 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_business_info.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_business_info.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_business_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_info_service_stub.update_business_info request, 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 BusinessInfoService REST API. + # + # This class represents the configuration for BusinessInfoService 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::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_business_info to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_info.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_info.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 BusinessInfoService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_business_info` + # @return [::Gapic::Config::Method] + # + attr_reader :get_business_info + ## + # RPC-specific configuration for `update_business_info` + # @return [::Gapic::Config::Method] + # + attr_reader :update_business_info + + # @private + def initialize parent_rpcs = nil + get_business_info_config = parent_rpcs.get_business_info if parent_rpcs.respond_to? :get_business_info + @get_business_info = ::Gapic::Config::Method.new get_business_info_config + update_business_info_config = parent_rpcs.update_business_info if parent_rpcs.respond_to? :update_business_info + @update_business_info = ::Gapic::Config::Method.new update_business_info_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub.rb new file mode 100644 index 000000000000..72079f907b04 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/businessinfo_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module BusinessInfoService + module Rest + ## + # REST service stub for the BusinessInfoService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_business_info REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # A result object deserialized from the server's reply + def get_business_info request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_business_info_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_business_info", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.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_business_info REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # A result object deserialized from the server's reply + def update_business_info request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_business_info_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_business_info", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_business_info REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_business_info_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/businessInfo/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_business_info REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest] + # 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_business_info_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{business_info.name}", + body: "business_info", + matches: [ + ["business_info.name", %r{^accounts/[^/]+/businessInfo/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_pb.rb new file mode 100644 index 000000000000..6490e52c930f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/businessidentity.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n;google/shopping/merchant/accounts/v1/businessidentity.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x88\t\n\x10\x42usinessIdentity\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12i\n\x12promotions_consent\x18\x02 \x01(\x0e\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.PromotionsConsentB\x03\xe0\x41\x02\x12\x62\n\x0b\x62lack_owned\x18\x03 \x01(\x0b\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x62\n\x0bwomen_owned\x18\x04 \x01(\x0b\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x64\n\rveteran_owned\x18\x05 \x01(\x0b\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x63\n\x0clatino_owned\x18\x06 \x01(\x0b\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x65\n\x0esmall_business\x18\x07 \x01(\x0b\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x1a\x88\x02\n\x11IdentityAttribute\x12\x7f\n\x14identity_declaration\x18\x01 \x01(\x0e\x32\\.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttribute.IdentityDeclarationB\x03\xe0\x41\x02\"r\n\x13IdentityDeclaration\x12$\n IDENTITY_DECLARATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SELF_IDENTIFIES_AS\x10\x01\x12\x1d\n\x19\x44OES_NOT_SELF_IDENTIFY_AS\x10\x02\"t\n\x11PromotionsConsent\x12\"\n\x1ePROMOTIONS_CONSENT_UNSPECIFIED\x10\x00\x12\x1c\n\x18PROMOTIONS_CONSENT_GIVEN\x10\x01\x12\x1d\n\x19PROMOTIONS_CONSENT_DENIED\x10\x02:{\xea\x41x\n+merchantapi.googleapis.com/BusinessIdentity\x12#accounts/{account}/businessIdentity*\x12\x62usinessIdentities2\x10\x62usinessIdentity\"_\n\x1aGetBusinessIdentityRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/BusinessIdentity\"\xad\x01\n\x1dUpdateBusinessIdentityRequest\x12V\n\x11\x62usiness_identity\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.BusinessIdentityB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x32\xca\x04\n\x17\x42usinessIdentityService\x12\xcf\x01\n\x13GetBusinessIdentity\x12@.google.shopping.merchant.accounts.v1.GetBusinessIdentityRequest\x1a\x36.google.shopping.merchant.accounts.v1.BusinessIdentity\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1/{name=accounts/*/businessIdentity}\x12\x93\x02\n\x16UpdateBusinessIdentity\x12\x43.google.shopping.merchant.accounts.v1.UpdateBusinessIdentityRequest\x1a\x36.google.shopping.merchant.accounts.v1.BusinessIdentity\"|\xda\x41\x1d\x62usiness_identity,update_mask\x82\xd3\xe4\x93\x02V2A/accounts/v1/{business_identity.name=accounts/*/businessIdentity}:\x11\x62usiness_identity\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x88\x02\n(com.google.shopping.merchant.accounts.v1B\x15\x42usinessIdentityProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + BusinessIdentity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessIdentity").msgclass + BusinessIdentity::IdentityAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttribute").msgclass + BusinessIdentity::IdentityAttribute::IdentityDeclaration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttribute.IdentityDeclaration").enummodule + BusinessIdentity::PromotionsConsent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessIdentity.PromotionsConsent").enummodule + GetBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetBusinessIdentityRequest").msgclass + UpdateBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateBusinessIdentityRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_services_pb.rb new file mode 100644 index 000000000000..3a7682122855 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/businessidentity.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/businessidentity_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module BusinessIdentityService + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.BusinessIdentityService' + + # Retrieves the business identity of an account. + rpc :GetBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity + # Updates the business identity of an account. Executing this method requires + # admin access. + rpc :UpdateBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_pb.rb new file mode 100644 index 000000000000..55190ae34711 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/businessinfo.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/accounts/v1/customerservice_pb' +require 'google/shopping/merchant/accounts/v1/phoneverificationstate_pb' +require 'google/type/phone_number_pb' +require 'google/type/postal_address_pb' + + +descriptor_data = "\n7google/shopping/merchant/accounts/v1/businessinfo.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a:google/shopping/merchant/accounts/v1/customerservice.proto\x1a\x41google/shopping/merchant/accounts/v1/phoneverificationstate.proto\x1a\x1egoogle/type/phone_number.proto\x1a google/type/postal_address.proto\"\xe3\x04\n\x0c\x42usinessInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x35\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x1a.google.type.PostalAddressB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x31\n\x05phone\x18\x03 \x01(\x0b\x32\x18.google.type.PhoneNumberB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12h\n\x18phone_verification_state\x18\x04 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1.PhoneVerificationStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12Y\n\x10\x63ustomer_service\x18\x05 \x01(\x0b\x32\x35.google.shopping.merchant.accounts.v1.CustomerServiceB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x35\n#korean_business_registration_number\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01:j\xea\x41g\n\'merchantapi.googleapis.com/BusinessInfo\x12\x1f\x61\x63\x63ounts/{account}/businessInfo*\rbusinessInfos2\x0c\x62usinessInfoB\n\n\x08_addressB\x08\n\x06_phoneB\x1b\n\x19_phone_verification_stateB\x13\n\x11_customer_serviceB&\n$_korean_business_registration_number\"W\n\x16GetBusinessInfoRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/BusinessInfo\"\xa1\x01\n\x19UpdateBusinessInfoRequest\x12N\n\rbusiness_info\x18\x01 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1.BusinessInfoB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x32\x9a\x04\n\x13\x42usinessInfoService\x12\xbf\x01\n\x0fGetBusinessInfo\x12<.google.shopping.merchant.accounts.v1.GetBusinessInfoRequest\x1a\x32.google.shopping.merchant.accounts.v1.BusinessInfo\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/accounts/v1/{name=accounts/*/businessInfo}\x12\xf7\x01\n\x12UpdateBusinessInfo\x12?.google.shopping.merchant.accounts.v1.UpdateBusinessInfoRequest\x1a\x32.google.shopping.merchant.accounts.v1.BusinessInfo\"l\xda\x41\x19\x62usiness_info,update_mask\x82\xd3\xe4\x93\x02J29/accounts/v1/{business_info.name=accounts/*/businessInfo}:\rbusiness_info\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x84\x02\n(com.google.shopping.merchant.accounts.v1B\x11\x42usinessInfoProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + BusinessInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessInfo").msgclass + GetBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetBusinessInfoRequest").msgclass + UpdateBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateBusinessInfoRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_services_pb.rb new file mode 100644 index 000000000000..8032b196afc5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/businessinfo.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/businessinfo_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module BusinessInfoService + # Service to support business info API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.BusinessInfoService' + + # Retrieves the business info of an account. + rpc :GetBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo + # Updates the business info of an account. Executing this method requires + # admin access. + rpc :UpdateBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service.rb new file mode 100644 index 000000000000..b37169ae6c24 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/checkout_settings_service/credentials" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/paths" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/client" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/checkout_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new + # + module CheckoutSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "checkout_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/client.rb new file mode 100644 index 000000000000..cccf3ed13680 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/client.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/errors" +require "google/shopping/merchant/accounts/v1/checkoutsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module CheckoutSettingsService + ## + # Client for the CheckoutSettingsService service. + # + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :checkout_settings_service_stub + + ## + # Configure the CheckoutSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CheckoutSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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 + @checkout_settings_service_stub.universe_domain + end + + ## + # Create a new CheckoutSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CheckoutSettingsService 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/shopping/merchant/accounts/v1/checkoutsettings_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 + + @checkout_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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 + ) + + @checkout_settings_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 + @checkout_settings_service_stub.logger + end + + # Service calls + + ## + # Gets `CheckoutSettings` for the given merchant. This includes + # information about review state, enrollment state and URL settings. + # + # @overload get_checkout_settings(request, options = nil) + # Pass arguments to `get_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_checkout_settings(name: nil) + # Pass arguments to `get_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new + # + # # Call the get_checkout_settings method. + # result = client.get_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + # p result + # + def get_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :get_checkout_settings, request, 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 `CheckoutSettings` for the given merchant. + # + # @overload create_checkout_settings(request, options = nil) + # Pass arguments to `create_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_checkout_settings(parent: nil, checkout_settings: nil) + # Pass arguments to `create_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account for which the `CheckoutSettings` will be + # created. + # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings, ::Hash] + # Required. The `CheckoutSettings` object to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new + # + # # Call the create_checkout_settings method. + # result = client.create_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + # p result + # + def create_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest + + # Converts hash and nil to 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_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :create_checkout_settings, request, 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 `CheckoutSettings` for the given merchant. + # + # @overload update_checkout_settings(request, options = nil) + # Pass arguments to `update_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_checkout_settings(checkout_settings: nil, update_mask: nil) + # Pass arguments to `update_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings, ::Hash] + # Required. The updated version of the `CheckoutSettings`. + # The `name` field is used to identify the `CheckoutSettings`. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `eligible_destinations` + # - `uri_settings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new + # + # # Call the update_checkout_settings method. + # result = client.update_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + # p result + # + def update_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest + + # Converts hash and nil to 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_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.checkout_settings&.name + header_params["checkout_settings.name"] = request.checkout_settings.name + end + + request_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_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :update_checkout_settings, request, 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 `CheckoutSettings` and unenrolls merchant from + # `Checkout` program. + # + # @overload delete_checkout_settings(request, options = nil) + # Pass arguments to `delete_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_checkout_settings(name: nil) + # Pass arguments to `delete_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new + # + # # Call the delete_checkout_settings method. + # result = client.delete_checkout_settings request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :delete_checkout_settings, request, 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 CheckoutSettingsService API. + # + # This class represents the configuration for CheckoutSettingsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_checkout_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 CheckoutSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_checkout_settings + ## + # RPC-specific configuration for `create_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :create_checkout_settings + ## + # RPC-specific configuration for `update_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_checkout_settings + ## + # RPC-specific configuration for `delete_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_checkout_settings + + # @private + def initialize parent_rpcs = nil + get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings + @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config + create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings + @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config + update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings + @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config + delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings + @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/credentials.rb new file mode 100644 index 000000000000..8fcaae10247b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_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 Shopping + module Merchant + module Accounts + module V1 + module CheckoutSettingsService + # Credentials for the CheckoutSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/paths.rb new file mode 100644 index 000000000000..475823b2eea7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module CheckoutSettingsService + # Path helper methods for the CheckoutSettingsService API. + module Paths + ## + # Create a fully-qualified CheckoutSettings resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/programs/{program}/checkoutSettings` + # + # @param account [String] + # @param program [String] + # + # @return [::String] + def checkout_settings_path account:, program: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/programs/#{program}/checkoutSettings" + end + + ## + # Create a fully-qualified Program resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/programs/{program}` + # + # @param account [String] + # @param program [String] + # + # @return [::String] + def program_path account:, program: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/programs/#{program}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest.rb new file mode 100644 index 000000000000..9f311c8681c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/checkout_settings_service/credentials" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/paths" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new + # + module CheckoutSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client.rb new file mode 100644 index 000000000000..52e49e41960c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client.rb @@ -0,0 +1,703 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/checkoutsettings_pb" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module CheckoutSettingsService + module Rest + ## + # REST client for the CheckoutSettingsService service. + # + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :checkout_settings_service_stub + + ## + # Configure the CheckoutSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CheckoutSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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 + @checkout_settings_service_stub.universe_domain + end + + ## + # Create a new CheckoutSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CheckoutSettingsService 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 + + @checkout_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @checkout_settings_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 + @checkout_settings_service_stub.logger + end + + # Service calls + + ## + # Gets `CheckoutSettings` for the given merchant. This includes + # information about review state, enrollment state and URL settings. + # + # @overload get_checkout_settings(request, options = nil) + # Pass arguments to `get_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_checkout_settings(name: nil) + # Pass arguments to `get_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new + # + # # Call the get_checkout_settings method. + # result = client.get_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + # p result + # + def get_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.get_checkout_settings request, 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 `CheckoutSettings` for the given merchant. + # + # @overload create_checkout_settings(request, options = nil) + # Pass arguments to `create_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_checkout_settings(parent: nil, checkout_settings: nil) + # Pass arguments to `create_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account for which the `CheckoutSettings` will be + # created. + # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings, ::Hash] + # Required. The `CheckoutSettings` object to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new + # + # # Call the create_checkout_settings method. + # result = client.create_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + # p result + # + def create_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest + + # Converts hash and nil to an 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_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.create_checkout_settings request, 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 `CheckoutSettings` for the given merchant. + # + # @overload update_checkout_settings(request, options = nil) + # Pass arguments to `update_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_checkout_settings(checkout_settings: nil, update_mask: nil) + # Pass arguments to `update_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings, ::Hash] + # Required. The updated version of the `CheckoutSettings`. + # The `name` field is used to identify the `CheckoutSettings`. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `eligible_destinations` + # - `uri_settings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new + # + # # Call the update_checkout_settings method. + # result = client.update_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + # p result + # + def update_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest + + # Converts hash and nil to an 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_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.update_checkout_settings request, 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 `CheckoutSettings` and unenrolls merchant from + # `Checkout` program. + # + # @overload delete_checkout_settings(request, options = nil) + # Pass arguments to `delete_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_checkout_settings(name: nil) + # Pass arguments to `delete_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @yield [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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new + # + # # Call the delete_checkout_settings method. + # result = client.delete_checkout_settings request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.delete_checkout_settings request, 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 CheckoutSettingsService REST API. + # + # This class represents the configuration for CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_checkout_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 CheckoutSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_checkout_settings + ## + # RPC-specific configuration for `create_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :create_checkout_settings + ## + # RPC-specific configuration for `update_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_checkout_settings + ## + # RPC-specific configuration for `delete_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_checkout_settings + + # @private + def initialize parent_rpcs = nil + get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings + @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config + create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings + @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config + update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings + @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config + delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings + @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..c4543b706979 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub.rb @@ -0,0 +1,329 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/checkoutsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module CheckoutSettingsService + module Rest + ## + # REST service stub for the CheckoutSettingsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # A result object deserialized from the server's reply + def get_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_checkout_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_checkout_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.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_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # A result object deserialized from the server's reply + def create_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_checkout_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_checkout_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.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_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # A result object deserialized from the server's reply + def update_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_checkout_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_checkout_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.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_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_checkout_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_checkout_settings", + 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 get_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest] + # 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_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/checkoutSettings", + body: "checkout_settings", + matches: [ + ["parent", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest] + # 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_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{checkout_settings.name}", + body: "checkout_settings", + matches: [ + ["checkout_settings.name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkoutsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkoutsettings_pb.rb new file mode 100644 index 000000000000..ee608f015a7a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkoutsettings_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/checkoutsettings.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n;google/shopping/merchant/accounts/v1/checkoutsettings.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a google/shopping/type/types.proto\"_\n\x1aGetCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xbc\x01\n\x1d\x43reateCheckoutSettingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/CheckoutSettings\x12V\n\x11\x63heckout_settings\x18\x02 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.CheckoutSettingsB\x03\xe0\x41\x02\"\xad\x01\n\x1dUpdateCheckoutSettingsRequest\x12V\n\x11\x63heckout_settings\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.CheckoutSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"b\n\x1d\x44\x65leteCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xcc\t\n\x10\x43heckoutSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12L\n\x0curi_settings\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1.UriSettingsH\x00\x88\x01\x01\x12U\n\x15\x65ligible_destinations\x18\x08 \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnumB\x03\xe0\x41\x01\x12r\n\x10\x65nrollment_state\x18\x03 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12j\n\x0creview_state\x18\x04 \x01(\x0e\x32J.google.shopping.merchant.accounts.v1.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12V\n\x16\x65\x66\x66\x65\x63tive_uri_settings\x18\x05 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1.UriSettingsB\x03\xe0\x41\x03\x12|\n\x1a\x65\x66\x66\x65\x63tive_enrollment_state\x18\x06 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12t\n\x16\x65\x66\x66\x65\x63tive_review_state\x18\x07 \x01(\x0e\x32J.google.shopping.merchant.accounts.v1.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x04\x88\x01\x01\"o\n\x17\x43heckoutEnrollmentState\x12)\n%CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INACTIVE\x10\x01\x12\x0c\n\x08\x45NROLLED\x10\x02\x12\r\n\tOPTED_OUT\x10\x03\"j\n\x13\x43heckoutReviewState\x12%\n!CHECKOUT_REVIEW_STATE_UNSPECIFIED\x10\x00\x12\r\n\tIN_REVIEW\x10\x01\x12\x0c\n\x08\x41PPROVED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03:\x85\x01\xea\x41\x81\x01\n+merchantapi.googleapis.com/CheckoutSettings\x12\x36\x61\x63\x63ounts/{account}/programs/{program}/checkoutSettings*\x08settings2\x10\x63heckoutSettingsB\x0f\n\r_uri_settingsB\x13\n\x11_enrollment_stateB\x0f\n\r_review_stateB\x1d\n\x1b_effective_enrollment_stateB\x19\n\x17_effective_review_state\"[\n\x0bUriSettings\x12\x1f\n\x15\x63heckout_uri_template\x18\x01 \x01(\tH\x00\x12\x1b\n\x11\x63\x61rt_uri_template\x18\x02 \x01(\tH\x00\x42\x0e\n\x0curi_template2\xb0\x08\n\x17\x43heckoutSettingsService\x12\xda\x01\n\x13GetCheckoutSettings\x12@.google.shopping.merchant.accounts.v1.GetCheckoutSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.CheckoutSettings\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/accounts/v1/{name=accounts/*/programs/*/checkoutSettings}\x12\x89\x02\n\x16\x43reateCheckoutSettings\x12\x43.google.shopping.merchant.accounts.v1.CreateCheckoutSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.CheckoutSettings\"r\xda\x41\x18parent,checkout_settings\x82\xd3\xe4\x93\x02Q\" e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a developer registration for a merchant. + # + # @overload get_developer_registration(request, options = nil) + # Pass arguments to `get_developer_registration` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_developer_registration(name: nil) + # Pass arguments to `get_developer_registration` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` (ID) of the developer registration. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new + # + # # Call the get_developer_registration method. + # result = client.get_developer_registration request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration. + # p result + # + def get_developer_registration request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_developer_registration.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_developer_registration.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_developer_registration.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_registration_service_stub.call_rpc :get_developer_registration, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Unregister the calling GCP from the calling shopping account. Note that the + # GCP will still be able to access the API for at most 1 day from the + # unregister succussful call. + # + # @overload unregister_gcp(request, options = nil) + # Pass arguments to `unregister_gcp` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload unregister_gcp(name: nil) + # Pass arguments to `unregister_gcp` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the developer registration to be created for the + # merchant account that the GCP will be registered with. Format: + # `accounts/{account}/developerRegistration` + # + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new + # + # # Call the unregister_gcp method. + # result = client.unregister_gcp request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def unregister_gcp request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.unregister_gcp.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.unregister_gcp.timeout, + metadata: metadata, + retry_policy: @config.rpcs.unregister_gcp.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_registration_service_stub.call_rpc :unregister_gcp, request, 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 the merchant account that the calling GCP is registered with. + # + # @overload get_account_for_gcp_registration(request, options = nil) + # Pass arguments to `get_account_for_gcp_registration` via a request object, either of type + # {::Google::Protobuf::Empty} or an equivalent Hash. + # + # @param request [::Google::Protobuf::Empty, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @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 [::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Protobuf::Empty.new + # + # # Call the get_account_for_gcp_registration method. + # result = client.get_account_for_gcp_registration request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse. + # p result + # + def get_account_for_gcp_registration request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Protobuf::Empty + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_account_for_gcp_registration.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::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.get_account_for_gcp_registration.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_account_for_gcp_registration.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_registration_service_stub.call_rpc :get_account_for_gcp_registration, request, 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 DeveloperRegistrationService API. + # + # This class represents the configuration for DeveloperRegistrationService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # register_gcp to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.register_gcp.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.register_gcp.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 DeveloperRegistrationService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `register_gcp` + # @return [::Gapic::Config::Method] + # + attr_reader :register_gcp + ## + # RPC-specific configuration for `get_developer_registration` + # @return [::Gapic::Config::Method] + # + attr_reader :get_developer_registration + ## + # RPC-specific configuration for `unregister_gcp` + # @return [::Gapic::Config::Method] + # + attr_reader :unregister_gcp + ## + # RPC-specific configuration for `get_account_for_gcp_registration` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_for_gcp_registration + + # @private + def initialize parent_rpcs = nil + register_gcp_config = parent_rpcs.register_gcp if parent_rpcs.respond_to? :register_gcp + @register_gcp = ::Gapic::Config::Method.new register_gcp_config + get_developer_registration_config = parent_rpcs.get_developer_registration if parent_rpcs.respond_to? :get_developer_registration + @get_developer_registration = ::Gapic::Config::Method.new get_developer_registration_config + unregister_gcp_config = parent_rpcs.unregister_gcp if parent_rpcs.respond_to? :unregister_gcp + @unregister_gcp = ::Gapic::Config::Method.new unregister_gcp_config + get_account_for_gcp_registration_config = parent_rpcs.get_account_for_gcp_registration if parent_rpcs.respond_to? :get_account_for_gcp_registration + @get_account_for_gcp_registration = ::Gapic::Config::Method.new get_account_for_gcp_registration_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/credentials.rb new file mode 100644 index 000000000000..b47bb882f862 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_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 Shopping + module Merchant + module Accounts + module V1 + module DeveloperRegistrationService + # Credentials for the DeveloperRegistrationService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/paths.rb new file mode 100644 index 000000000000..d88bf1a146bf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/paths.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 Shopping + module Merchant + module Accounts + module V1 + module DeveloperRegistrationService + # Path helper methods for the DeveloperRegistrationService API. + module Paths + ## + # Create a fully-qualified DeveloperRegistration resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/developerRegistration` + # + # @param account [String] + # + # @return [::String] + def developer_registration_path account: + "accounts/#{account}/developerRegistration" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest.rb new file mode 100644 index 000000000000..8c16722273bb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/developer_registration_service/credentials" +require "google/shopping/merchant/accounts/v1/developer_registration_service/paths" +require "google/shopping/merchant/accounts/v1/developer_registration_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to access Developer Registration. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/developer_registration_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new + # + module DeveloperRegistrationService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/developer_registration_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/client.rb new file mode 100644 index 000000000000..56605c0d6986 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/client.rb @@ -0,0 +1,698 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/developerregistration_pb" +require "google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module DeveloperRegistrationService + module Rest + ## + # REST client for the DeveloperRegistrationService service. + # + # Service to access Developer Registration. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :developer_registration_service_stub + + ## + # Configure the DeveloperRegistrationService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DeveloperRegistrationService clients + # ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DeveloperRegistrationService 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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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 + @developer_registration_service_stub.universe_domain + end + + ## + # Create a new DeveloperRegistrationService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DeveloperRegistrationService 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 + + @developer_registration_service_stub = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @developer_registration_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 + @developer_registration_service_stub.logger + end + + # Service calls + + ## + # Registers the GCP used for the API call to the shopping account passed in + # the request. Will create a user with an "API developer" and add the + # "developer_email" as a contact with "API notifications" email preference + # on. + # + # @overload register_gcp(request, options = nil) + # Pass arguments to `register_gcp` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload register_gcp(name: nil, developer_email: nil) + # Pass arguments to `register_gcp` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the developer registration to be created for the + # merchant account that the GCP will be registered with. Format: + # `accounts/{account}/developerRegistration` + # @param developer_email [::String] + # Immutable. Optional field. Developer role can be also added by using + # `users.update` method. If the developer email provided is associated with a + # user in the provided merchant account, the user will be updated to have + # `API_DEVELOPER` `access_rights` and the email preference corresponding to + # that user will be updated to have the new API notifications preference. If + # the developer email provided is not associated with any user, it is added + # as a contact. The email preference corresponding to that contact will have + # the new API notifications preference. Make sure the email used is + # associated with a Google Account and is not a service account as service + # accounts can't receive emails. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new + # + # # Call the register_gcp method. + # result = client.register_gcp request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration. + # p result + # + def register_gcp request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.register_gcp.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.register_gcp.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.register_gcp.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_registration_service_stub.register_gcp request, 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 a developer registration for a merchant. + # + # @overload get_developer_registration(request, options = nil) + # Pass arguments to `get_developer_registration` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_developer_registration(name: nil) + # Pass arguments to `get_developer_registration` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` (ID) of the developer registration. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new + # + # # Call the get_developer_registration method. + # result = client.get_developer_registration request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration. + # p result + # + def get_developer_registration request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_developer_registration.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_developer_registration.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_developer_registration.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_registration_service_stub.get_developer_registration request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Unregister the calling GCP from the calling shopping account. Note that the + # GCP will still be able to access the API for at most 1 day from the + # unregister succussful call. + # + # @overload unregister_gcp(request, options = nil) + # Pass arguments to `unregister_gcp` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload unregister_gcp(name: nil) + # Pass arguments to `unregister_gcp` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the developer registration to be created for the + # merchant account that the GCP will be registered with. Format: + # `accounts/{account}/developerRegistration` + # @yield [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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new + # + # # Call the unregister_gcp method. + # result = client.unregister_gcp request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def unregister_gcp request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.unregister_gcp.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.unregister_gcp.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.unregister_gcp.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_registration_service_stub.unregister_gcp request, 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 the merchant account that the calling GCP is registered with. + # + # @overload get_account_for_gcp_registration(request, options = nil) + # Pass arguments to `get_account_for_gcp_registration` via a request object, either of type + # {::Google::Protobuf::Empty} or an equivalent Hash. + # + # @param request [::Google::Protobuf::Empty, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Protobuf::Empty.new + # + # # Call the get_account_for_gcp_registration method. + # result = client.get_account_for_gcp_registration request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse. + # p result + # + def get_account_for_gcp_registration request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Protobuf::Empty + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_account_for_gcp_registration.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_account_for_gcp_registration.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_account_for_gcp_registration.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_registration_service_stub.get_account_for_gcp_registration request, 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 DeveloperRegistrationService REST API. + # + # This class represents the configuration for DeveloperRegistrationService 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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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 + # # register_gcp to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.register_gcp.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.register_gcp.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 DeveloperRegistrationService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `register_gcp` + # @return [::Gapic::Config::Method] + # + attr_reader :register_gcp + ## + # RPC-specific configuration for `get_developer_registration` + # @return [::Gapic::Config::Method] + # + attr_reader :get_developer_registration + ## + # RPC-specific configuration for `unregister_gcp` + # @return [::Gapic::Config::Method] + # + attr_reader :unregister_gcp + ## + # RPC-specific configuration for `get_account_for_gcp_registration` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_for_gcp_registration + + # @private + def initialize parent_rpcs = nil + register_gcp_config = parent_rpcs.register_gcp if parent_rpcs.respond_to? :register_gcp + @register_gcp = ::Gapic::Config::Method.new register_gcp_config + get_developer_registration_config = parent_rpcs.get_developer_registration if parent_rpcs.respond_to? :get_developer_registration + @get_developer_registration = ::Gapic::Config::Method.new get_developer_registration_config + unregister_gcp_config = parent_rpcs.unregister_gcp if parent_rpcs.respond_to? :unregister_gcp + @unregister_gcp = ::Gapic::Config::Method.new unregister_gcp_config + get_account_for_gcp_registration_config = parent_rpcs.get_account_for_gcp_registration if parent_rpcs.respond_to? :get_account_for_gcp_registration + @get_account_for_gcp_registration = ::Gapic::Config::Method.new get_account_for_gcp_registration_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub.rb new file mode 100644 index 000000000000..3d20adc7d262 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub.rb @@ -0,0 +1,327 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/developerregistration_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module DeveloperRegistrationService + module Rest + ## + # REST service stub for the DeveloperRegistrationService 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 register_gcp REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # A result object deserialized from the server's reply + def register_gcp request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_register_gcp_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "register_gcp", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_developer_registration REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # A result object deserialized from the server's reply + def get_developer_registration request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_developer_registration_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_developer_registration", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the unregister_gcp REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 unregister_gcp request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_unregister_gcp_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "unregister_gcp", + 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_account_for_gcp_registration REST call + # + # @param request_pb [::Google::Protobuf::Empty] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse] + # A result object deserialized from the server's reply + def get_account_for_gcp_registration request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_account_for_gcp_registration_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_account_for_gcp_registration", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse.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 register_gcp REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_register_gcp_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:registerGcp", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/developerRegistration/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_developer_registration REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_developer_registration_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/developerRegistration/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the unregister_gcp REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_unregister_gcp_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:unregisterGcp", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/developerRegistration/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_account_for_gcp_registration REST call + # + # @param request_pb [::Google::Protobuf::Empty] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_account_for_gcp_registration_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/accounts:getAccountForGcpRegistration", + matches: [] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_pb.rb new file mode 100644 index 000000000000..b8290227687b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/developerregistration.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n@google/shopping/merchant/accounts/v1/developerregistration.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xd1\x01\n\x15\x44\x65veloperRegistration\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07gcp_ids\x18\x02 \x03(\tB\x03\xe0\x41\x03:\x8e\x01\xea\x41\x8a\x01\n0merchantapi.googleapis.com/DeveloperRegistration\x12(accounts/{account}/developerRegistration*\x15\x64\x65veloperRegistration2\x15\x64\x65veloperRegistration\"z\n\x12RegisterGcpRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/DeveloperRegistration\x12\x1c\n\x0f\x64\x65veloper_email\x18\x02 \x01(\tB\x03\xe0\x41\x05\"^\n\x14UnregisterGcpRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/DeveloperRegistration\"i\n\x1fGetDeveloperRegistrationRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/DeveloperRegistration\"4\n$GetAccountForGcpRegistrationResponse\x12\x0c\n\x04name\x18\x01 \x01(\t2\x97\x07\n\x1c\x44\x65veloperRegistrationService\x12\xd1\x01\n\x0bRegisterGcp\x12\x38.google.shopping.merchant.accounts.v1.RegisterGcpRequest\x1a;.google.shopping.merchant.accounts.v1.DeveloperRegistration\"K\x82\xd3\xe4\x93\x02\x45\"@/accounts/v1/{name=accounts/*/developerRegistration}:registerGcp:\x01*\x12\xe3\x01\n\x18GetDeveloperRegistration\x12\x45.google.shopping.merchant.accounts.v1.GetDeveloperRegistrationRequest\x1a;.google.shopping.merchant.accounts.v1.DeveloperRegistration\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/accounts/v1/{name=accounts/*/developerRegistration}\x12\xb2\x01\n\rUnregisterGcp\x12:.google.shopping.merchant.accounts.v1.UnregisterGcpRequest\x1a\x16.google.protobuf.Empty\"M\x82\xd3\xe4\x93\x02G\"B/accounts/v1/{name=accounts/*/developerRegistration}:unregisterGcp:\x01*\x12\xbe\x01\n\x1cGetAccountForGcpRegistration\x12\x16.google.protobuf.Empty\x1aJ.google.shopping.merchant.accounts.v1.GetAccountForGcpRegistrationResponse\":\x82\xd3\xe4\x93\x02\x34\x12\x32/accounts/v1/accounts:getAccountForGcpRegistration\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8d\x02\n(com.google.shopping.merchant.accounts.v1B\x1a\x44\x65veloperRegistrationProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + DeveloperRegistration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DeveloperRegistration").msgclass + RegisterGcpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.RegisterGcpRequest").msgclass + UnregisterGcpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UnregisterGcpRequest").msgclass + GetDeveloperRegistrationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetDeveloperRegistrationRequest").msgclass + GetAccountForGcpRegistrationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAccountForGcpRegistrationResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_services_pb.rb new file mode 100644 index 000000000000..d08d9b6e8dfb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/developerregistration.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/developerregistration_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module DeveloperRegistrationService + # Service to access Developer Registration. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.DeveloperRegistrationService' + + # Registers the GCP used for the API call to the shopping account passed in + # the request. Will create a user with an "API developer" and add the + # "developer_email" as a contact with "API notifications" email preference + # on. + rpc :RegisterGcp, ::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest, ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration + # Retrieves a developer registration for a merchant. + rpc :GetDeveloperRegistration, ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest, ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration + # Unregister the calling GCP from the calling shopping account. Note that the + # GCP will still be able to access the API for at most 1 day from the + # unregister succussful call. + rpc :UnregisterGcp, ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest, ::Google::Protobuf::Empty + # Retrieves the merchant account that the calling GCP is registered with. + rpc :GetAccountForGcpRegistration, ::Google::Protobuf::Empty, ::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service.rb new file mode 100644 index 000000000000..260618d16303 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/email_preferences_service/credentials" +require "google/shopping/merchant/accounts/v1/email_preferences_service/paths" +require "google/shopping/merchant/accounts/v1/email_preferences_service/client" +require "google/shopping/merchant/accounts/v1/email_preferences_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support the `EmailPreferences` API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/email_preferences_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/email_preferences_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new + # + module EmailPreferencesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "email_preferences_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/email_preferences_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/client.rb new file mode 100644 index 000000000000..672354a4b568 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/client.rb @@ -0,0 +1,596 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/emailpreferences_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module EmailPreferencesService + ## + # Client for the EmailPreferencesService service. + # + # Service to support the `EmailPreferences` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :email_preferences_service_stub + + ## + # Configure the EmailPreferencesService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EmailPreferencesService clients + # ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the EmailPreferencesService 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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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 + @email_preferences_service_stub.universe_domain + end + + ## + # Create a new EmailPreferencesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EmailPreferencesService 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/shopping/merchant/accounts/v1/emailpreferences_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 + + @email_preferences_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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 + ) + + @email_preferences_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 + @email_preferences_service_stub.logger + end + + # Service calls + + ## + # Returns the email preferences for a Merchant Center account user. + # This service only permits retrieving and updating email preferences for the + # authenticated user. + # Use the name=accounts/*/users/me/emailPreferences alias to get preferences + # for the authenticated user. + # + # @overload get_email_preferences(request, options = nil) + # Pass arguments to `get_email_preferences` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_email_preferences(name: nil) + # Pass arguments to `get_email_preferences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `EmailPreferences` resource. + # Format: `accounts/{account}/users/{email}/emailPreferences` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new + # + # # Call the get_email_preferences method. + # result = client.get_email_preferences request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. + # p result + # + def get_email_preferences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_email_preferences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_email_preferences.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_email_preferences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @email_preferences_service_stub.call_rpc :get_email_preferences, request, 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 email preferences for a Merchant Center account user. Advanced + # account users should specify the advanced account rather than a sub-account + # of the advanced account. + # + # Preferences which are not explicitly selected in the update mask will not + # be updated. + # + # It is invalid for updates to specify an UNCONFIRMED opt-in status value. + # + # Use the name=accounts/*/users/me/emailPreferences alias to update + # preferences + # for the authenticated user. + # + # @overload update_email_preferences(request, options = nil) + # Pass arguments to `update_email_preferences` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_email_preferences(email_preferences: nil, update_mask: nil) + # Pass arguments to `update_email_preferences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param email_preferences [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences, ::Hash] + # Required. Email Preferences to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `news_and_tips` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new + # + # # Call the update_email_preferences method. + # result = client.update_email_preferences request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. + # p result + # + def update_email_preferences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest + + # Converts hash and nil to 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_email_preferences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.email_preferences&.name + header_params["email_preferences.name"] = request.email_preferences.name + end + + request_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_email_preferences.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_email_preferences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @email_preferences_service_stub.call_rpc :update_email_preferences, request, 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 EmailPreferencesService API. + # + # This class represents the configuration for EmailPreferencesService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_email_preferences to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_email_preferences.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_email_preferences.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 EmailPreferencesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_email_preferences` + # @return [::Gapic::Config::Method] + # + attr_reader :get_email_preferences + ## + # RPC-specific configuration for `update_email_preferences` + # @return [::Gapic::Config::Method] + # + attr_reader :update_email_preferences + + # @private + def initialize parent_rpcs = nil + get_email_preferences_config = parent_rpcs.get_email_preferences if parent_rpcs.respond_to? :get_email_preferences + @get_email_preferences = ::Gapic::Config::Method.new get_email_preferences_config + update_email_preferences_config = parent_rpcs.update_email_preferences if parent_rpcs.respond_to? :update_email_preferences + @update_email_preferences = ::Gapic::Config::Method.new update_email_preferences_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/credentials.rb new file mode 100644 index 000000000000..15d792218b91 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_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 Shopping + module Merchant + module Accounts + module V1 + module EmailPreferencesService + # Credentials for the EmailPreferencesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/paths.rb new file mode 100644 index 000000000000..2f6437fe5b2c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/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 Shopping + module Merchant + module Accounts + module V1 + module EmailPreferencesService + # Path helper methods for the EmailPreferencesService API. + module Paths + ## + # Create a fully-qualified EmailPreferences resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/users/{email}/emailPreferences` + # + # @param account [String] + # @param email [String] + # + # @return [::String] + def email_preferences_path account:, email: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/users/#{email}/emailPreferences" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest.rb new file mode 100644 index 000000000000..00293d072efa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/email_preferences_service/credentials" +require "google/shopping/merchant/accounts/v1/email_preferences_service/paths" +require "google/shopping/merchant/accounts/v1/email_preferences_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support the `EmailPreferences` API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/email_preferences_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new + # + module EmailPreferencesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/email_preferences_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/client.rb new file mode 100644 index 000000000000..7adbf1c8b3fa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/client.rb @@ -0,0 +1,539 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/emailpreferences_pb" +require "google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module EmailPreferencesService + module Rest + ## + # REST client for the EmailPreferencesService service. + # + # Service to support the `EmailPreferences` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :email_preferences_service_stub + + ## + # Configure the EmailPreferencesService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EmailPreferencesService clients + # ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the EmailPreferencesService 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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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 + @email_preferences_service_stub.universe_domain + end + + ## + # Create a new EmailPreferencesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EmailPreferencesService 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 + + @email_preferences_service_stub = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @email_preferences_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 + @email_preferences_service_stub.logger + end + + # Service calls + + ## + # Returns the email preferences for a Merchant Center account user. + # This service only permits retrieving and updating email preferences for the + # authenticated user. + # Use the name=accounts/*/users/me/emailPreferences alias to get preferences + # for the authenticated user. + # + # @overload get_email_preferences(request, options = nil) + # Pass arguments to `get_email_preferences` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_email_preferences(name: nil) + # Pass arguments to `get_email_preferences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `EmailPreferences` resource. + # Format: `accounts/{account}/users/{email}/emailPreferences` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new + # + # # Call the get_email_preferences method. + # result = client.get_email_preferences request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. + # p result + # + def get_email_preferences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_email_preferences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_email_preferences.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_email_preferences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @email_preferences_service_stub.get_email_preferences request, 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 email preferences for a Merchant Center account user. Advanced + # account users should specify the advanced account rather than a sub-account + # of the advanced account. + # + # Preferences which are not explicitly selected in the update mask will not + # be updated. + # + # It is invalid for updates to specify an UNCONFIRMED opt-in status value. + # + # Use the name=accounts/*/users/me/emailPreferences alias to update + # preferences + # for the authenticated user. + # + # @overload update_email_preferences(request, options = nil) + # Pass arguments to `update_email_preferences` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_email_preferences(email_preferences: nil, update_mask: nil) + # Pass arguments to `update_email_preferences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param email_preferences [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences, ::Hash] + # Required. Email Preferences to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `news_and_tips` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new + # + # # Call the update_email_preferences method. + # result = client.update_email_preferences request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. + # p result + # + def update_email_preferences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest + + # Converts hash and nil to an 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_email_preferences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_email_preferences.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_email_preferences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @email_preferences_service_stub.update_email_preferences request, 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 EmailPreferencesService REST API. + # + # This class represents the configuration for EmailPreferencesService 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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_email_preferences to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_email_preferences.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_email_preferences.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 EmailPreferencesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_email_preferences` + # @return [::Gapic::Config::Method] + # + attr_reader :get_email_preferences + ## + # RPC-specific configuration for `update_email_preferences` + # @return [::Gapic::Config::Method] + # + attr_reader :update_email_preferences + + # @private + def initialize parent_rpcs = nil + get_email_preferences_config = parent_rpcs.get_email_preferences if parent_rpcs.respond_to? :get_email_preferences + @get_email_preferences = ::Gapic::Config::Method.new get_email_preferences_config + update_email_preferences_config = parent_rpcs.update_email_preferences if parent_rpcs.respond_to? :update_email_preferences + @update_email_preferences = ::Gapic::Config::Method.new update_email_preferences_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub.rb new file mode 100644 index 000000000000..b3796dc285a3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/emailpreferences_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module EmailPreferencesService + module Rest + ## + # REST service stub for the EmailPreferencesService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_email_preferences REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # A result object deserialized from the server's reply + def get_email_preferences request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_email_preferences_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_email_preferences", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.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_email_preferences REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # A result object deserialized from the server's reply + def update_email_preferences request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_email_preferences_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_email_preferences", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_email_preferences REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_email_preferences_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/users/[^/]+/emailPreferences/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_email_preferences REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest] + # 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_email_preferences_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{email_preferences.name}", + body: "email_preferences", + matches: [ + ["email_preferences.name", %r{^accounts/[^/]+/users/[^/]+/emailPreferences/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_pb.rb new file mode 100644 index 000000000000..5fa69b2e6387 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/emailpreferences.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n;google/shopping/merchant/accounts/v1/emailpreferences.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xe9\x02\n\x10\x45mailPreferences\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12]\n\rnews_and_tips\x18\x02 \x01(\x0e\x32\x41.google.shopping.merchant.accounts.v1.EmailPreferences.OptInStateB\x03\xe0\x41\x01\"X\n\nOptInState\x12\x1c\n\x18OPT_IN_STATE_UNSPECIFIED\x10\x00\x12\r\n\tOPTED_OUT\x10\x01\x12\x0c\n\x08OPTED_IN\x10\x02\x12\x0f\n\x0bUNCONFIRMED\x10\x03:\x88\x01\xea\x41\x84\x01\n+merchantapi.googleapis.com/EmailPreferences\x12\x31\x61\x63\x63ounts/{account}/users/{email}/emailPreferences*\x10\x65mailPreferences2\x10\x65mailPreferences\"_\n\x1aGetEmailPreferencesRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/EmailPreferences\"\xad\x01\n\x1dUpdateEmailPreferencesRequest\x12V\n\x11\x65mail_preferences\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.EmailPreferencesB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xdb\x04\n\x17\x45mailPreferencesService\x12\xd7\x01\n\x13GetEmailPreferences\x12@.google.shopping.merchant.accounts.v1.GetEmailPreferencesRequest\x1a\x36.google.shopping.merchant.accounts.v1.EmailPreferences\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/accounts/v1/{name=accounts/*/users/*/emailPreferences}\x12\x9c\x02\n\x16UpdateEmailPreferences\x12\x43.google.shopping.merchant.accounts.v1.UpdateEmailPreferencesRequest\x1a\x36.google.shopping.merchant.accounts.v1.EmailPreferences\"\x84\x01\xda\x41\x1d\x65mail_preferences,update_mask\x82\xd3\xe4\x93\x02^2I/accounts/v1/{email_preferences.name=accounts/*/users/*/emailPreferences}:\x11\x65mail_preferences\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x88\x02\n(com.google.shopping.merchant.accounts.v1B\x15\x45mailPreferencesProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + EmailPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.EmailPreferences").msgclass + EmailPreferences::OptInState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.EmailPreferences.OptInState").enummodule + GetEmailPreferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetEmailPreferencesRequest").msgclass + UpdateEmailPreferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateEmailPreferencesRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_services_pb.rb new file mode 100644 index 000000000000..a5f007dd29e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_services_pb.rb @@ -0,0 +1,64 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/emailpreferences.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/emailpreferences_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module EmailPreferencesService + # Service to support the `EmailPreferences` API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.EmailPreferencesService' + + # Returns the email preferences for a Merchant Center account user. + # This service only permits retrieving and updating email preferences for the + # authenticated user. + # Use the name=accounts/*/users/me/emailPreferences alias to get preferences + # for the authenticated user. + rpc :GetEmailPreferences, ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest, ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences + # Updates the email preferences for a Merchant Center account user. Advanced + # account users should specify the advanced account rather than a sub-account + # of the advanced account. + # + # Preferences which are not explicitly selected in the update mask will not + # be updated. + # + # It is invalid for updates to specify an UNCONFIRMED opt-in status value. + # + # Use the name=accounts/*/users/me/emailPreferences alias to update + # preferences + # for the authenticated user. + rpc :UpdateEmailPreferences, ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest, ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service.rb new file mode 100644 index 000000000000..d118d1f05be0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/paths" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/client" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - {::Google::Shopping::Merchant::Accounts::V1::GbpAccount GbpAccount} + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/gbp_accounts_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new + # + module GbpAccountsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "gbp_accounts_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/client.rb new file mode 100644 index 000000000000..9f6980ce46ca --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/client.rb @@ -0,0 +1,602 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/gbpaccounts_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module GbpAccountsService + ## + # Client for the GbpAccountsService service. + # + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - {::Google::Shopping::Merchant::Accounts::V1::GbpAccount GbpAccount} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :gbp_accounts_service_stub + + ## + # Configure the GbpAccountsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all GbpAccountsService clients + # ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the GbpAccountsService 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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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 + @gbp_accounts_service_stub.universe_domain + end + + ## + # Create a new GbpAccountsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the GbpAccountsService 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/shopping/merchant/accounts/v1/gbpaccounts_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 + + @gbp_accounts_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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 + ) + + @gbp_accounts_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 + @gbp_accounts_service_stub.logger + end + + # Service calls + + ## + # List the GBP accounts for a given merchant. + # + # @overload list_gbp_accounts(request, options = nil) + # Pass arguments to `list_gbp_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_gbp_accounts(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gbp_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 parent resource under which the GBP accounts are + # listed. Format: `accounts/{account}`. + # @param page_size [::Integer] + # Optional. The maximum number of `GbpAccount` resources to return. The + # service returns fewer than this value if the number of gbp accounts is less + # that than the `pageSize`. The default value is 50. The maximum value is + # 1000; If a value higher than the maximum is specified, then the `pageSize` + # will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListGbpAccounts` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListGbpAccounts` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::GbpAccount>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::GbpAccount>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.new + # + # # Call the list_gbp_accounts method. + # result = client.list_gbp_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::GbpAccount. + # p item + # end + # + def list_gbp_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_gbp_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_gbp_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_gbp_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gbp_accounts_service_stub.call_rpc :list_gbp_accounts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gbp_accounts_service_stub, :list_gbp_accounts, 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 + + ## + # Link the specified merchant to a GBP account for all countries. + # + # To run this method, you must have admin access to the Merchant Center + # account. If you don't have admin access, the request fails with the error + # message `User is not an administrator of account {ACCOUNT_ID}`. + # + # @overload link_gbp_account(request, options = nil) + # Pass arguments to `link_gbp_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload link_gbp_account(parent: nil, gbp_email: nil) + # Pass arguments to `link_gbp_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 parent resource to which the GBP account is + # linked. Format: `accounts/{account}`. + # @param gbp_email [::String] + # Required. The email address of the Business Profile account. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new + # + # # Call the link_gbp_account method. + # result = client.link_gbp_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse. + # p result + # + def link_gbp_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.link_gbp_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.link_gbp_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.link_gbp_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gbp_accounts_service_stub.call_rpc :link_gbp_account, request, 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 GbpAccountsService API. + # + # This class represents the configuration for GbpAccountsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_gbp_accounts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_gbp_accounts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_gbp_accounts.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 GbpAccountsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_gbp_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gbp_accounts + ## + # RPC-specific configuration for `link_gbp_account` + # @return [::Gapic::Config::Method] + # + attr_reader :link_gbp_account + + # @private + def initialize parent_rpcs = nil + list_gbp_accounts_config = parent_rpcs.list_gbp_accounts if parent_rpcs.respond_to? :list_gbp_accounts + @list_gbp_accounts = ::Gapic::Config::Method.new list_gbp_accounts_config + link_gbp_account_config = parent_rpcs.link_gbp_account if parent_rpcs.respond_to? :link_gbp_account + @link_gbp_account = ::Gapic::Config::Method.new link_gbp_account_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials.rb new file mode 100644 index 000000000000..6a603b611016 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_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 Shopping + module Merchant + module Accounts + module V1 + module GbpAccountsService + # Credentials for the GbpAccountsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/paths.rb new file mode 100644 index 000000000000..df9bed06fde0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/paths.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 Shopping + module Merchant + module Accounts + module V1 + module GbpAccountsService + # Path helper methods for the GbpAccountsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest.rb new file mode 100644 index 000000000000..350bccfeadbb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/paths" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - {::Google::Shopping::Merchant::Accounts::V1::GbpAccount GbpAccount} + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new + # + module GbpAccountsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client.rb new file mode 100644 index 000000000000..1c360a84d45a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client.rb @@ -0,0 +1,545 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/gbpaccounts_pb" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module GbpAccountsService + module Rest + ## + # REST client for the GbpAccountsService service. + # + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - {::Google::Shopping::Merchant::Accounts::V1::GbpAccount GbpAccount} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :gbp_accounts_service_stub + + ## + # Configure the GbpAccountsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all GbpAccountsService clients + # ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the GbpAccountsService 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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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 + @gbp_accounts_service_stub.universe_domain + end + + ## + # Create a new GbpAccountsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the GbpAccountsService 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 + + @gbp_accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @gbp_accounts_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 + @gbp_accounts_service_stub.logger + end + + # Service calls + + ## + # List the GBP accounts for a given merchant. + # + # @overload list_gbp_accounts(request, options = nil) + # Pass arguments to `list_gbp_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_gbp_accounts(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gbp_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 parent resource under which the GBP accounts are + # listed. Format: `accounts/{account}`. + # @param page_size [::Integer] + # Optional. The maximum number of `GbpAccount` resources to return. The + # service returns fewer than this value if the number of gbp accounts is less + # that than the `pageSize`. The default value is 50. The maximum value is + # 1000; If a value higher than the maximum is specified, then the `pageSize` + # will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListGbpAccounts` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListGbpAccounts` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::GbpAccount>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::GbpAccount>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.new + # + # # Call the list_gbp_accounts method. + # result = client.list_gbp_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::GbpAccount. + # p item + # end + # + def list_gbp_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_gbp_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_gbp_accounts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_gbp_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gbp_accounts_service_stub.list_gbp_accounts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gbp_accounts_service_stub, :list_gbp_accounts, "gbp_accounts", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Link the specified merchant to a GBP account for all countries. + # + # To run this method, you must have admin access to the Merchant Center + # account. If you don't have admin access, the request fails with the error + # message `User is not an administrator of account {ACCOUNT_ID}`. + # + # @overload link_gbp_account(request, options = nil) + # Pass arguments to `link_gbp_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload link_gbp_account(parent: nil, gbp_email: nil) + # Pass arguments to `link_gbp_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 parent resource to which the GBP account is + # linked. Format: `accounts/{account}`. + # @param gbp_email [::String] + # Required. The email address of the Business Profile account. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new + # + # # Call the link_gbp_account method. + # result = client.link_gbp_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse. + # p result + # + def link_gbp_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.link_gbp_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.link_gbp_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.link_gbp_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gbp_accounts_service_stub.link_gbp_account request, 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 GbpAccountsService REST API. + # + # This class represents the configuration for GbpAccountsService 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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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_gbp_accounts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_gbp_accounts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_gbp_accounts.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 GbpAccountsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_gbp_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gbp_accounts + ## + # RPC-specific configuration for `link_gbp_account` + # @return [::Gapic::Config::Method] + # + attr_reader :link_gbp_account + + # @private + def initialize parent_rpcs = nil + list_gbp_accounts_config = parent_rpcs.list_gbp_accounts if parent_rpcs.respond_to? :list_gbp_accounts + @list_gbp_accounts = ::Gapic::Config::Method.new list_gbp_accounts_config + link_gbp_account_config = parent_rpcs.link_gbp_account if parent_rpcs.respond_to? :link_gbp_account + @link_gbp_account = ::Gapic::Config::Method.new link_gbp_account_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub.rb new file mode 100644 index 000000000000..48bb92b3f0c6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/gbpaccounts_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module GbpAccountsService + module Rest + ## + # REST service stub for the GbpAccountsService 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_gbp_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse] + # A result object deserialized from the server's reply + def list_gbp_accounts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_gbp_accounts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_gbp_accounts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the link_gbp_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] + # A result object deserialized from the server's reply + def link_gbp_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_link_gbp_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "link_gbp_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse.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_gbp_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_gbp_accounts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/gbpAccounts", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the link_gbp_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_link_gbp_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/gbpAccounts:linkGbpAccount", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_pb.rb new file mode 100644 index 000000000000..d19682bba088 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/gbpaccounts.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n6google/shopping/merchant/accounts/v1/gbpaccounts.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xde\x02\n\nGbpAccount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\x0egbp_account_id\x18\x02 \x01(\t\x12\x43\n\x04type\x18\x03 \x01(\x0e\x32\x35.google.shopping.merchant.accounts.v1.GbpAccount.Type\x12\x18\n\x10gbp_account_name\x18\x05 \x01(\t\x12\x15\n\rlisting_count\x18\x06 \x01(\x03\"<\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x14\n\x10\x42USINESS_ACCOUNT\x10\x02:q\xea\x41n\n%merchantapi.googleapis.com/GbpAccount\x12,accounts/{account}/gbpAccounts/{gbp_account}*\x0bgbpAccounts2\ngbpAccount\"\x85\x01\n\x16ListGbpAccountsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"z\n\x17ListGbpAccountsResponse\x12\x46\n\x0cgbp_accounts\x18\x01 \x03(\x0b\x32\x30.google.shopping.merchant.accounts.v1.GbpAccount\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"k\n\x15LinkGbpAccountRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tgbp_email\x18\x02 \x01(\tB\x03\xe0\x41\x02\"B\n\x16LinkGbpAccountResponse\x12(\n\x08response\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Empty2\x8c\x04\n\x12GbpAccountsService\x12\xcd\x01\n\x0fListGbpAccounts\x12<.google.shopping.merchant.accounts.v1.ListGbpAccountsRequest\x1a=.google.shopping.merchant.accounts.v1.ListGbpAccountsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/accounts/v1/{parent=accounts/*}/gbpAccounts\x12\xdc\x01\n\x0eLinkGbpAccount\x12;.google.shopping.merchant.accounts.v1.LinkGbpAccountRequest\x1a<.google.shopping.merchant.accounts.v1.LinkGbpAccountResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\";/accounts/v1/{parent=accounts/*}/gbpAccounts:linkGbpAccount:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x83\x02\n(com.google.shopping.merchant.accounts.v1B\x10GbpAccountsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + GbpAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GbpAccount").msgclass + GbpAccount::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GbpAccount.Type").enummodule + ListGbpAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListGbpAccountsRequest").msgclass + ListGbpAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListGbpAccountsResponse").msgclass + LinkGbpAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LinkGbpAccountRequest").msgclass + LinkGbpAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LinkGbpAccountResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_services_pb.rb new file mode 100644 index 000000000000..1b507b506fae --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/gbpaccounts.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/gbpaccounts_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module GbpAccountsService + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.GbpAccountsService' + + # List the GBP accounts for a given merchant. + rpc :ListGbpAccounts, ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse + # Link the specified merchant to a GBP account for all countries. + # + # To run this method, you must have admin access to the Merchant Center + # account. If you don't have admin access, the request fails with the error + # message `User is not an administrator of account {ACCOUNT_ID}`. + rpc :LinkGbpAccount, ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest, ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_pb.rb new file mode 100644 index 000000000000..dc2a670c6dcb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/homepage.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n3google/shopping/merchant/accounts/v1/homepage.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xae\x01\n\x08Homepage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x15\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x14\n\x07\x63laimed\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03:Z\xea\x41W\n#merchantapi.googleapis.com/Homepage\x12\x1b\x61\x63\x63ounts/{account}/homepage*\thomepages2\x08homepageB\x06\n\x04_uri\"O\n\x12GetHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage\"\x94\x01\n\x15UpdateHomepageRequest\x12\x45\n\x08homepage\x18\x01 \x01(\x0b\x32..google.shopping.merchant.accounts.v1.HomepageB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"i\n\x14\x43laimHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage\x12\x16\n\toverwrite\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"S\n\x16UnclaimHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage2\xdd\x06\n\x0fHomepageService\x12\xaf\x01\n\x0bGetHomepage\x12\x38.google.shopping.merchant.accounts.v1.GetHomepageRequest\x1a..google.shopping.merchant.accounts.v1.Homepage\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)\x12\'/accounts/v1/{name=accounts/*/homepage}\x12\xd8\x01\n\x0eUpdateHomepage\x12;.google.shopping.merchant.accounts.v1.UpdateHomepageRequest\x1a..google.shopping.merchant.accounts.v1.Homepage\"Y\xda\x41\x14homepage,update_mask\x82\xd3\xe4\x93\x02<20/accounts/v1/{homepage.name=accounts/*/homepage}:\x08homepage\x12\xb5\x01\n\rClaimHomepage\x12:.google.shopping.merchant.accounts.v1.ClaimHomepageRequest\x1a..google.shopping.merchant.accounts.v1.Homepage\"8\x82\xd3\xe4\x93\x02\x32\"-/accounts/v1/{name=accounts/*/homepage}:claim:\x01*\x12\xbb\x01\n\x0fUnclaimHomepage\x12<.google.shopping.merchant.accounts.v1.UnclaimHomepageRequest\x1a..google.shopping.merchant.accounts.v1.Homepage\":\x82\xd3\xe4\x93\x02\x34\"//accounts/v1/{name=accounts/*/homepage}:unclaim:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x80\x02\n(com.google.shopping.merchant.accounts.v1B\rHomepageProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + Homepage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Homepage").msgclass + GetHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetHomepageRequest").msgclass + UpdateHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateHomepageRequest").msgclass + ClaimHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ClaimHomepageRequest").msgclass + UnclaimHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UnclaimHomepageRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service.rb new file mode 100644 index 000000000000..a4cfc220507d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/homepage_service/credentials" +require "google/shopping/merchant/accounts/v1/homepage_service/paths" +require "google/shopping/merchant/accounts/v1/homepage_service/client" +require "google/shopping/merchant/accounts/v1/homepage_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support an API for a store's homepage. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/homepage_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/homepage_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new + # + module HomepageService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "homepage_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/homepage_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/client.rb new file mode 100644 index 000000000000..076a29c20ab1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/client.rb @@ -0,0 +1,791 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/homepage_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module HomepageService + ## + # Client for the HomepageService service. + # + # Service to support an API for a store's homepage. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :homepage_service_stub + + ## + # Configure the HomepageService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all HomepageService clients + # ::Google::Shopping::Merchant::Accounts::V1::HomepageService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the HomepageService 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::Shopping::Merchant::Accounts::V1::HomepageService::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 + @homepage_service_stub.universe_domain + end + + ## + # Create a new HomepageService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the HomepageService 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/shopping/merchant/accounts/v1/homepage_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 + + @homepage_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::HomepageService::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 + ) + + @homepage_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 + @homepage_service_stub.logger + end + + # Service calls + + ## + # Retrieves a store's homepage. + # + # @overload get_homepage(request, options = nil) + # Pass arguments to `get_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_homepage(name: nil) + # Pass arguments to `get_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to retrieve. + # Format: `accounts/{account}/homepage` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new + # + # # Call the get_homepage method. + # result = client.get_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + # p result + # + def get_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_homepage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.call_rpc :get_homepage, request, 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 store's homepage. Executing this method requires admin access. + # + # @overload update_homepage(request, options = nil) + # Pass arguments to `update_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_homepage(homepage: nil, update_mask: nil) + # Pass arguments to `update_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param homepage [::Google::Shopping::Merchant::Accounts::V1::Homepage, ::Hash] + # Required. The new version of the homepage. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `uri` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new + # + # # Call the update_homepage method. + # result = client.update_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + # p result + # + def update_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest + + # Converts hash and nil to 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_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.homepage&.name + header_params["homepage.name"] = request.homepage.name + end + + request_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_homepage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.call_rpc :update_homepage, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Claims a store's homepage. Executing this method requires admin access. + # + # If the homepage is already claimed, this will recheck the + # verification (unless the business is exempted from claiming, which also + # exempts from verification) and return a successful response. If ownership + # can no longer be verified, it will return an error, but it won't clear the + # claim. + # + # In case of failure, a canonical error message is returned: + # + # * PERMISSION_DENIED: User doesn't have the necessary permissions on this + # Merchant Center account. + # + # * FAILED_PRECONDITION: + # + # - The account is not a Merchant Center account. + # + # - Merchant Center account doesn't have a homepage. + # + # - Claiming failed (in this case the error message contains more + # details). + # + # @overload claim_homepage(request, options = nil) + # Pass arguments to `claim_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload claim_homepage(name: nil, overwrite: nil) + # Pass arguments to `claim_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to claim. + # Format: `accounts/{account}/homepage` + # @param overwrite [::Boolean] + # Optional. When set to `true`, this option removes any existing claim on the + # requested website from any other account to the account making the request, + # effectively replacing the previous claim. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new + # + # # Call the claim_homepage method. + # result = client.claim_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + # p result + # + def claim_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.claim_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.claim_homepage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.claim_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.call_rpc :claim_homepage, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Unclaims a store's homepage. Executing this method requires admin access. + # + # @overload unclaim_homepage(request, options = nil) + # Pass arguments to `unclaim_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload unclaim_homepage(name: nil) + # Pass arguments to `unclaim_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to unclaim. + # Format: `accounts/{account}/homepage` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new + # + # # Call the unclaim_homepage method. + # result = client.unclaim_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + # p result + # + def unclaim_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.unclaim_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.unclaim_homepage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.unclaim_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.call_rpc :unclaim_homepage, request, 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 HomepageService API. + # + # This class represents the configuration for HomepageService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_homepage to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_homepage.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_homepage.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::HomepageService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 HomepageService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :get_homepage + ## + # RPC-specific configuration for `update_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :update_homepage + ## + # RPC-specific configuration for `claim_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :claim_homepage + ## + # RPC-specific configuration for `unclaim_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :unclaim_homepage + + # @private + def initialize parent_rpcs = nil + get_homepage_config = parent_rpcs.get_homepage if parent_rpcs.respond_to? :get_homepage + @get_homepage = ::Gapic::Config::Method.new get_homepage_config + update_homepage_config = parent_rpcs.update_homepage if parent_rpcs.respond_to? :update_homepage + @update_homepage = ::Gapic::Config::Method.new update_homepage_config + claim_homepage_config = parent_rpcs.claim_homepage if parent_rpcs.respond_to? :claim_homepage + @claim_homepage = ::Gapic::Config::Method.new claim_homepage_config + unclaim_homepage_config = parent_rpcs.unclaim_homepage if parent_rpcs.respond_to? :unclaim_homepage + @unclaim_homepage = ::Gapic::Config::Method.new unclaim_homepage_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/credentials.rb new file mode 100644 index 000000000000..61ceec6c39a1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_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 Shopping + module Merchant + module Accounts + module V1 + module HomepageService + # Credentials for the HomepageService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/paths.rb new file mode 100644 index 000000000000..7d9d4f07af62 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/paths.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 Shopping + module Merchant + module Accounts + module V1 + module HomepageService + # Path helper methods for the HomepageService API. + module Paths + ## + # Create a fully-qualified Homepage resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/homepage` + # + # @param account [String] + # + # @return [::String] + def homepage_path account: + "accounts/#{account}/homepage" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest.rb new file mode 100644 index 000000000000..7ea19263ba06 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/homepage_service/credentials" +require "google/shopping/merchant/accounts/v1/homepage_service/paths" +require "google/shopping/merchant/accounts/v1/homepage_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support an API for a store's homepage. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/homepage_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new + # + module HomepageService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/homepage_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/client.rb new file mode 100644 index 000000000000..b5cd4a5666c1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/client.rb @@ -0,0 +1,720 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/homepage_pb" +require "google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module HomepageService + module Rest + ## + # REST client for the HomepageService service. + # + # Service to support an API for a store's homepage. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :homepage_service_stub + + ## + # Configure the HomepageService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all HomepageService clients + # ::Google::Shopping::Merchant::Accounts::V1::HomepageService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the HomepageService 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::Shopping::Merchant::Accounts::V1::HomepageService::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 + @homepage_service_stub.universe_domain + end + + ## + # Create a new HomepageService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the HomepageService 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 + + @homepage_service_stub = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @homepage_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 + @homepage_service_stub.logger + end + + # Service calls + + ## + # Retrieves a store's homepage. + # + # @overload get_homepage(request, options = nil) + # Pass arguments to `get_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_homepage(name: nil) + # Pass arguments to `get_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to retrieve. + # Format: `accounts/{account}/homepage` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new + # + # # Call the get_homepage method. + # result = client.get_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + # p result + # + def get_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_homepage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.get_homepage request, 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 store's homepage. Executing this method requires admin access. + # + # @overload update_homepage(request, options = nil) + # Pass arguments to `update_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_homepage(homepage: nil, update_mask: nil) + # Pass arguments to `update_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param homepage [::Google::Shopping::Merchant::Accounts::V1::Homepage, ::Hash] + # Required. The new version of the homepage. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `uri` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new + # + # # Call the update_homepage method. + # result = client.update_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + # p result + # + def update_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest + + # Converts hash and nil to an 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_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_homepage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.update_homepage request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Claims a store's homepage. Executing this method requires admin access. + # + # If the homepage is already claimed, this will recheck the + # verification (unless the business is exempted from claiming, which also + # exempts from verification) and return a successful response. If ownership + # can no longer be verified, it will return an error, but it won't clear the + # claim. + # + # In case of failure, a canonical error message is returned: + # + # * PERMISSION_DENIED: User doesn't have the necessary permissions on this + # Merchant Center account. + # + # * FAILED_PRECONDITION: + # + # - The account is not a Merchant Center account. + # + # - Merchant Center account doesn't have a homepage. + # + # - Claiming failed (in this case the error message contains more + # details). + # + # @overload claim_homepage(request, options = nil) + # Pass arguments to `claim_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload claim_homepage(name: nil, overwrite: nil) + # Pass arguments to `claim_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to claim. + # Format: `accounts/{account}/homepage` + # @param overwrite [::Boolean] + # Optional. When set to `true`, this option removes any existing claim on the + # requested website from any other account to the account making the request, + # effectively replacing the previous claim. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new + # + # # Call the claim_homepage method. + # result = client.claim_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + # p result + # + def claim_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.claim_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.claim_homepage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.claim_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.claim_homepage request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Unclaims a store's homepage. Executing this method requires admin access. + # + # @overload unclaim_homepage(request, options = nil) + # Pass arguments to `unclaim_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload unclaim_homepage(name: nil) + # Pass arguments to `unclaim_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to unclaim. + # Format: `accounts/{account}/homepage` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new + # + # # Call the unclaim_homepage method. + # result = client.unclaim_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + # p result + # + def unclaim_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.unclaim_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.unclaim_homepage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.unclaim_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.unclaim_homepage request, 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 HomepageService REST API. + # + # This class represents the configuration for HomepageService 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::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_homepage to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_homepage.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_homepage.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 HomepageService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :get_homepage + ## + # RPC-specific configuration for `update_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :update_homepage + ## + # RPC-specific configuration for `claim_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :claim_homepage + ## + # RPC-specific configuration for `unclaim_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :unclaim_homepage + + # @private + def initialize parent_rpcs = nil + get_homepage_config = parent_rpcs.get_homepage if parent_rpcs.respond_to? :get_homepage + @get_homepage = ::Gapic::Config::Method.new get_homepage_config + update_homepage_config = parent_rpcs.update_homepage if parent_rpcs.respond_to? :update_homepage + @update_homepage = ::Gapic::Config::Method.new update_homepage_config + claim_homepage_config = parent_rpcs.claim_homepage if parent_rpcs.respond_to? :claim_homepage + @claim_homepage = ::Gapic::Config::Method.new claim_homepage_config + unclaim_homepage_config = parent_rpcs.unclaim_homepage if parent_rpcs.respond_to? :unclaim_homepage + @unclaim_homepage = ::Gapic::Config::Method.new unclaim_homepage_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub.rb new file mode 100644 index 000000000000..8a4823ca13a7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub.rb @@ -0,0 +1,330 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/homepage_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module HomepageService + module Rest + ## + # REST service stub for the HomepageService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # A result object deserialized from the server's reply + def get_homepage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_homepage_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_homepage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.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_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # A result object deserialized from the server's reply + def update_homepage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_homepage_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_homepage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the claim_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # A result object deserialized from the server's reply + def claim_homepage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_claim_homepage_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "claim_homepage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the unclaim_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # A result object deserialized from the server's reply + def unclaim_homepage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_unclaim_homepage_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "unclaim_homepage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_homepage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/homepage/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest] + # 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_homepage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{homepage.name}", + body: "homepage", + matches: [ + ["homepage.name", %r{^accounts/[^/]+/homepage/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the claim_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_claim_homepage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:claim", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/homepage/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the unclaim_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_unclaim_homepage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:unclaim", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/homepage/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_services_pb.rb new file mode 100644 index 000000000000..7b286df0e30c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_services_pb.rb @@ -0,0 +1,73 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/homepage.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/homepage_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module HomepageService + # Service to support an API for a store's homepage. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.HomepageService' + + # Retrieves a store's homepage. + rpc :GetHomepage, ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1::Homepage + # Updates a store's homepage. Executing this method requires admin access. + rpc :UpdateHomepage, ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1::Homepage + # Claims a store's homepage. Executing this method requires admin access. + # + # If the homepage is already claimed, this will recheck the + # verification (unless the business is exempted from claiming, which also + # exempts from verification) and return a successful response. If ownership + # can no longer be verified, it will return an error, but it won't clear the + # claim. + # + # In case of failure, a canonical error message is returned: + # + # * PERMISSION_DENIED: User doesn't have the necessary permissions on this + # Merchant Center account. + # + # * FAILED_PRECONDITION: + # + # - The account is not a Merchant Center account. + # + # - Merchant Center account doesn't have a homepage. + # + # - Claiming failed (in this case the error message contains more + # details). + rpc :ClaimHomepage, ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1::Homepage + # Unclaims a store's homepage. Executing this method requires admin access. + rpc :UnclaimHomepage, ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1::Homepage + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service.rb new file mode 100644 index 000000000000..e00d95dd7c34 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/lfp_providers_service/credentials" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/paths" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/client" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - {::Google::Shopping::Merchant::Accounts::V1::LfpProvider LfpProvider} + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/lfp_providers_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new + # + module LfpProvidersService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_providers_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/client.rb new file mode 100644 index 000000000000..41df020407f6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/client.rb @@ -0,0 +1,601 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/lfpproviders_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module LfpProvidersService + ## + # Client for the LfpProvidersService service. + # + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - {::Google::Shopping::Merchant::Accounts::V1::LfpProvider LfpProvider} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_providers_service_stub + + ## + # Configure the LfpProvidersService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpProvidersService clients + # ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpProvidersService 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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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 + @lfp_providers_service_stub.universe_domain + end + + ## + # Create a new LfpProvidersService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpProvidersService 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/shopping/merchant/accounts/v1/lfpproviders_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 + + @lfp_providers_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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 + ) + + @lfp_providers_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 + @lfp_providers_service_stub.logger + end + + # Service calls + + ## + # Find the LFP provider candidates in a given country. + # + # @overload find_lfp_providers(request, options = nil) + # Pass arguments to `find_lfp_providers` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload find_lfp_providers(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `find_lfp_providers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource under which the LFP providers are + # found. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. + # @param page_size [::Integer] + # Optional. The maximum number of `LfpProvider` resources to return. The + # service returns fewer than this value if the number of lfp providers is + # less that than the `pageSize`. The default value is 50. The maximum value + # is 1000; If a value higher than the maximum is specified, then the + # `pageSize` will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `FindLfpProviders` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `FindLfpProviders` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::LfpProvider>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::LfpProvider>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.new + # + # # Call the find_lfp_providers method. + # result = client.find_lfp_providers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::LfpProvider. + # p item + # end + # + def find_lfp_providers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.find_lfp_providers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.find_lfp_providers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.find_lfp_providers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_providers_service_stub.call_rpc :find_lfp_providers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Link the specified merchant to a LFP provider for the specified country. + # + # @overload link_lfp_provider(request, options = nil) + # Pass arguments to `link_lfp_provider` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload link_lfp_provider(name: nil, external_account_id: nil) + # Pass arguments to `link_lfp_provider` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the LFP provider resource to link. + # Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. + # The `lfp_provider` is the LFP provider ID. + # @param external_account_id [::String] + # Required. The external account ID by which this merchant is known to the + # LFP provider. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new + # + # # Call the link_lfp_provider method. + # result = client.link_lfp_provider request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse. + # p result + # + def link_lfp_provider request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.link_lfp_provider.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.link_lfp_provider.timeout, + metadata: metadata, + retry_policy: @config.rpcs.link_lfp_provider.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_providers_service_stub.call_rpc :link_lfp_provider, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LfpProvidersService API. + # + # This class represents the configuration for LfpProvidersService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # find_lfp_providers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.find_lfp_providers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.find_lfp_providers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpProvidersService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `find_lfp_providers` + # @return [::Gapic::Config::Method] + # + attr_reader :find_lfp_providers + ## + # RPC-specific configuration for `link_lfp_provider` + # @return [::Gapic::Config::Method] + # + attr_reader :link_lfp_provider + + # @private + def initialize parent_rpcs = nil + find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers + @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config + link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider + @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/credentials.rb new file mode 100644 index 000000000000..312b978d0c4c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_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 Shopping + module Merchant + module Accounts + module V1 + module LfpProvidersService + # Credentials for the LfpProvidersService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/paths.rb new file mode 100644 index 000000000000..ff66fc5ca214 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/paths.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 Shopping + module Merchant + module Accounts + module V1 + module LfpProvidersService + # Path helper methods for the LfpProvidersService API. + module Paths + ## + # Create a fully-qualified LfpProvider resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}` + # + # @param account [String] + # @param omnichannel_setting [String] + # @param lfp_provider [String] + # + # @return [::String] + def lfp_provider_path account:, omnichannel_setting:, lfp_provider: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "omnichannel_setting cannot contain /" if omnichannel_setting.to_s.include? "/" + + "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}/lfpProviders/#{lfp_provider}" + end + + ## + # Create a fully-qualified OmnichannelSetting resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # + # @param account [String] + # @param omnichannel_setting [String] + # + # @return [::String] + def omnichannel_setting_path account:, omnichannel_setting: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest.rb new file mode 100644 index 000000000000..d4024d5f1881 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/lfp_providers_service/credentials" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/paths" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - {::Google::Shopping::Merchant::Accounts::V1::LfpProvider LfpProvider} + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new + # + module LfpProvidersService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client.rb new file mode 100644 index 000000000000..cf1c1fa441f3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client.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 "google/cloud/errors" +require "google/shopping/merchant/accounts/v1/lfpproviders_pb" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module LfpProvidersService + module Rest + ## + # REST client for the LfpProvidersService service. + # + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - {::Google::Shopping::Merchant::Accounts::V1::LfpProvider LfpProvider} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_providers_service_stub + + ## + # Configure the LfpProvidersService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpProvidersService clients + # ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpProvidersService 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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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 + @lfp_providers_service_stub.universe_domain + end + + ## + # Create a new LfpProvidersService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpProvidersService 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 + + @lfp_providers_service_stub = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lfp_providers_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 + @lfp_providers_service_stub.logger + end + + # Service calls + + ## + # Find the LFP provider candidates in a given country. + # + # @overload find_lfp_providers(request, options = nil) + # Pass arguments to `find_lfp_providers` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload find_lfp_providers(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `find_lfp_providers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource under which the LFP providers are + # found. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. + # @param page_size [::Integer] + # Optional. The maximum number of `LfpProvider` resources to return. The + # service returns fewer than this value if the number of lfp providers is + # less that than the `pageSize`. The default value is 50. The maximum value + # is 1000; If a value higher than the maximum is specified, then the + # `pageSize` will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `FindLfpProviders` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `FindLfpProviders` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::LfpProvider>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::LfpProvider>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.new + # + # # Call the find_lfp_providers method. + # result = client.find_lfp_providers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::LfpProvider. + # p item + # end + # + def find_lfp_providers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.find_lfp_providers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.find_lfp_providers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.find_lfp_providers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_providers_service_stub.find_lfp_providers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, "lfp_providers", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Link the specified merchant to a LFP provider for the specified country. + # + # @overload link_lfp_provider(request, options = nil) + # Pass arguments to `link_lfp_provider` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload link_lfp_provider(name: nil, external_account_id: nil) + # Pass arguments to `link_lfp_provider` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the LFP provider resource to link. + # Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. + # The `lfp_provider` is the LFP provider ID. + # @param external_account_id [::String] + # Required. The external account ID by which this merchant is known to the + # LFP provider. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new + # + # # Call the link_lfp_provider method. + # result = client.link_lfp_provider request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse. + # p result + # + def link_lfp_provider request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.link_lfp_provider.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.link_lfp_provider.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.link_lfp_provider.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_providers_service_stub.link_lfp_provider request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LfpProvidersService REST API. + # + # This class represents the configuration for LfpProvidersService 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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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 + # # find_lfp_providers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.find_lfp_providers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.find_lfp_providers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpProvidersService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `find_lfp_providers` + # @return [::Gapic::Config::Method] + # + attr_reader :find_lfp_providers + ## + # RPC-specific configuration for `link_lfp_provider` + # @return [::Gapic::Config::Method] + # + attr_reader :link_lfp_provider + + # @private + def initialize parent_rpcs = nil + find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers + @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config + link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider + @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub.rb new file mode 100644 index 000000000000..8af6dcf79a28 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/lfpproviders_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module LfpProvidersService + module Rest + ## + # REST service stub for the LfpProvidersService 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 find_lfp_providers REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse] + # A result object deserialized from the server's reply + def find_lfp_providers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_find_lfp_providers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "find_lfp_providers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the link_lfp_provider REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] + # A result object deserialized from the server's reply + def link_lfp_provider request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_link_lfp_provider_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "link_lfp_provider", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse.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 find_lfp_providers REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_find_lfp_providers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/lfpProviders:find", + matches: [ + ["parent", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the link_lfp_provider REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_link_lfp_provider_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:linkLfpProvider", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/lfpProviders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_pb.rb new file mode 100644 index 000000000000..7d09ac504f63 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/lfpproviders.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n7google/shopping/merchant/accounts/v1/lfpproviders.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xf4\x01\n\x0bLfpProvider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t:\xa1\x01\xea\x41\x9d\x01\n&merchantapi.googleapis.com/LfpProvider\x12Xaccounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}*\x0clfpProviders2\x0blfpProvider\"\x91\x01\n\x17\x46indLfpProvidersRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-merchantapi.googleapis.com/OmnichannelSetting\x12\x16\n\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\x18\x46indLfpProvidersResponse\x12H\n\rlfp_providers\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1.LfpProvider\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n\x16LinkLfpProviderRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&merchantapi.googleapis.com/LfpProvider\x12 \n\x13\x65xternal_account_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"C\n\x17LinkLfpProviderResponse\x12(\n\x08response\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Empty2\xc5\x04\n\x13LfpProvidersService\x12\xec\x01\n\x10\x46indLfpProviders\x12=.google.shopping.merchant.accounts.v1.FindLfpProvidersRequest\x1a>.google.shopping.merchant.accounts.v1.FindLfpProvidersResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/accounts/v1/{parent=accounts/*/omnichannelSettings/*}/lfpProviders:find\x12\xf5\x01\n\x0fLinkLfpProvider\x12<.google.shopping.merchant.accounts.v1.LinkLfpProviderRequest\x1a=.google.shopping.merchant.accounts.v1.LinkLfpProviderResponse\"e\xda\x41\x04name\x82\xd3\xe4\x93\x02X\"S/accounts/v1/{name=accounts/*/omnichannelSettings/*/lfpProviders/*}:linkLfpProvider:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x84\x02\n(com.google.shopping.merchant.accounts.v1B\x11LfpProvidersProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + LfpProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LfpProvider").msgclass + FindLfpProvidersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.FindLfpProvidersRequest").msgclass + FindLfpProvidersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.FindLfpProvidersResponse").msgclass + LinkLfpProviderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LinkLfpProviderRequest").msgclass + LinkLfpProviderResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LinkLfpProviderResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_services_pb.rb new file mode 100644 index 000000000000..ebaef2f2a80c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/lfpproviders.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/lfpproviders_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module LfpProvidersService + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.LfpProvidersService' + + # Find the LFP provider candidates in a given country. + rpc :FindLfpProviders, ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest, ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse + # Link the specified merchant to a LFP provider for the specified country. + rpc :LinkLfpProvider, ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest, ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service.rb new file mode 100644 index 000000000000..ba327907e601 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/client" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # The service facilitates the management of a merchant's omnichannel settings. + # ## This API defines the following resource model: + # + # {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting OmnichannelSetting} + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/omnichannel_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new + # + module OmnichannelSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "omnichannel_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/client.rb new file mode 100644 index 000000000000..744932c8931f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/client.rb @@ -0,0 +1,892 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1/omnichannelsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module OmnichannelSettingsService + ## + # Client for the OmnichannelSettingsService service. + # + # The service facilitates the management of a merchant's omnichannel settings. + # ## This API defines the following resource model: + # + # {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting OmnichannelSetting} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :omnichannel_settings_service_stub + + ## + # Configure the OmnichannelSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OmnichannelSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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 + @omnichannel_settings_service_stub.universe_domain + end + + ## + # Create a new OmnichannelSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OmnichannelSettingsService 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/shopping/merchant/accounts/v1/omnichannelsettings_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 + + @omnichannel_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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 + ) + + @omnichannel_settings_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 + @omnichannel_settings_service_stub.logger + end + + # Service calls + + ## + # Get the omnichannel settings for a given merchant. + # + # @overload get_omnichannel_setting(request, options = nil) + # Pass arguments to `get_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_omnichannel_setting(name: nil) + # Pass arguments to `get_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the omnichannel setting to retrieve. + # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new + # + # # Call the get_omnichannel_setting method. + # result = client.get_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + # p result + # + def get_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_omnichannel_setting.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :get_omnichannel_setting, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all the omnichannel settings for a given merchant. + # + # @overload list_omnichannel_settings(request, options = nil) + # Pass arguments to `list_omnichannel_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_omnichannel_settings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_omnichannel_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of omnichannel settings. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of omnichannel settings to return. The service + # may return fewer than this value. If unspecified, at most 50 omnichannel + # settings will be returned. The maximum value is 1000; values above 1000 + # will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOmnichannelSettings` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListOmnichannelSettings` + # must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.new + # + # # Call the list_omnichannel_settings method. + # result = client.list_omnichannel_settings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + # p item + # end + # + def list_omnichannel_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_omnichannel_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_omnichannel_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :list_omnichannel_settings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create the omnichannel settings for a given merchant. + # + # @overload create_omnichannel_setting(request, options = nil) + # Pass arguments to `create_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_omnichannel_setting(parent: nil, omnichannel_setting: nil) + # Pass arguments to `create_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this omnichannel setting will be + # created. Format: `accounts/{account}` + # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting, ::Hash] + # Required. The omnichannel setting to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new + # + # # Call the create_omnichannel_setting method. + # result = client.create_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + # p result + # + def create_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest + + # Converts hash and nil to 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_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_omnichannel_setting.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :create_omnichannel_setting, request, 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 the omnichannel setting for a given merchant in a given country. + # + # @overload update_omnichannel_setting(request, options = nil) + # Pass arguments to `update_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil) + # Pass arguments to `update_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting, ::Hash] + # Required. The omnichannel setting to update. + # + # The omnichannel setting's `name` field is used to identify the + # omnichannel setting to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to be updated. + # + # The following fields are supported in snake_case only: + # - `lsf_type` + # - `in_stock` + # - `pickup` + # - `odo` + # - `about` + # - `inventory_verification` + # + # Full replacement with wildcard `*`is supported, while empty/implied update + # mask is not. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new + # + # # Call the update_omnichannel_setting method. + # result = client.update_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + # p result + # + def update_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest + + # Converts hash and nil to 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_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.omnichannel_setting&.name + header_params["omnichannel_setting.name"] = request.omnichannel_setting.name + end + + request_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_omnichannel_setting.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :update_omnichannel_setting, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Requests inventory verification for a given merchant in a given country. + # + # @overload request_inventory_verification(request, options = nil) + # Pass arguments to `request_inventory_verification` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload request_inventory_verification(name: nil) + # Pass arguments to `request_inventory_verification` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the omnichannel setting to request inventory + # verification. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new + # + # # Call the request_inventory_verification method. + # result = client.request_inventory_verification request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse. + # p result + # + def request_inventory_verification request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.request_inventory_verification.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.request_inventory_verification.timeout, + metadata: metadata, + retry_policy: @config.rpcs.request_inventory_verification.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :request_inventory_verification, request, 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 OmnichannelSettingsService API. + # + # This class represents the configuration for OmnichannelSettingsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_omnichannel_setting to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_omnichannel_setting.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_omnichannel_setting.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 OmnichannelSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :get_omnichannel_setting + ## + # RPC-specific configuration for `list_omnichannel_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_omnichannel_settings + ## + # RPC-specific configuration for `create_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :create_omnichannel_setting + ## + # RPC-specific configuration for `update_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :update_omnichannel_setting + ## + # RPC-specific configuration for `request_inventory_verification` + # @return [::Gapic::Config::Method] + # + attr_reader :request_inventory_verification + + # @private + def initialize parent_rpcs = nil + get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting + @get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config + list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings + @list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config + create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting + @create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config + update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting + @update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config + request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification + @request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials.rb new file mode 100644 index 000000000000..1e5bc2dae7c2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_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 Shopping + module Merchant + module Accounts + module V1 + module OmnichannelSettingsService + # Credentials for the OmnichannelSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths.rb new file mode 100644 index 000000000000..86e26a25f299 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_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 Shopping + module Merchant + module Accounts + module V1 + module OmnichannelSettingsService + # Path helper methods for the OmnichannelSettingsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified OmnichannelSetting resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # + # @param account [String] + # @param omnichannel_setting [String] + # + # @return [::String] + def omnichannel_setting_path account:, omnichannel_setting: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest.rb new file mode 100644 index 000000000000..fa22f84b9678 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # The service facilitates the management of a merchant's omnichannel settings. + # ## This API defines the following resource model: + # + # {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting OmnichannelSetting} + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new + # + module OmnichannelSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client.rb new file mode 100644 index 000000000000..9aab023fc63a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client.rb @@ -0,0 +1,814 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/omnichannelsettings_pb" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module OmnichannelSettingsService + module Rest + ## + # REST client for the OmnichannelSettingsService service. + # + # The service facilitates the management of a merchant's omnichannel settings. + # ## This API defines the following resource model: + # + # {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting OmnichannelSetting} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :omnichannel_settings_service_stub + + ## + # Configure the OmnichannelSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OmnichannelSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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 + @omnichannel_settings_service_stub.universe_domain + end + + ## + # Create a new OmnichannelSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OmnichannelSettingsService 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 + + @omnichannel_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @omnichannel_settings_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 + @omnichannel_settings_service_stub.logger + end + + # Service calls + + ## + # Get the omnichannel settings for a given merchant. + # + # @overload get_omnichannel_setting(request, options = nil) + # Pass arguments to `get_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_omnichannel_setting(name: nil) + # Pass arguments to `get_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the omnichannel setting to retrieve. + # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new + # + # # Call the get_omnichannel_setting method. + # result = client.get_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + # p result + # + def get_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_omnichannel_setting.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.get_omnichannel_setting request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all the omnichannel settings for a given merchant. + # + # @overload list_omnichannel_settings(request, options = nil) + # Pass arguments to `list_omnichannel_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_omnichannel_settings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_omnichannel_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of omnichannel settings. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of omnichannel settings to return. The service + # may return fewer than this value. If unspecified, at most 50 omnichannel + # settings will be returned. The maximum value is 1000; values above 1000 + # will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOmnichannelSettings` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListOmnichannelSettings` + # must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.new + # + # # Call the list_omnichannel_settings method. + # result = client.list_omnichannel_settings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + # p item + # end + # + def list_omnichannel_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_omnichannel_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_omnichannel_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.list_omnichannel_settings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, "omnichannel_settings", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create the omnichannel settings for a given merchant. + # + # @overload create_omnichannel_setting(request, options = nil) + # Pass arguments to `create_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_omnichannel_setting(parent: nil, omnichannel_setting: nil) + # Pass arguments to `create_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this omnichannel setting will be + # created. Format: `accounts/{account}` + # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting, ::Hash] + # Required. The omnichannel setting to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new + # + # # Call the create_omnichannel_setting method. + # result = client.create_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + # p result + # + def create_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest + + # Converts hash and nil to an 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_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_omnichannel_setting.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.create_omnichannel_setting request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update the omnichannel setting for a given merchant in a given country. + # + # @overload update_omnichannel_setting(request, options = nil) + # Pass arguments to `update_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil) + # Pass arguments to `update_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting, ::Hash] + # Required. The omnichannel setting to update. + # + # The omnichannel setting's `name` field is used to identify the + # omnichannel setting to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to be updated. + # + # The following fields are supported in snake_case only: + # - `lsf_type` + # - `in_stock` + # - `pickup` + # - `odo` + # - `about` + # - `inventory_verification` + # + # Full replacement with wildcard `*`is supported, while empty/implied update + # mask is not. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new + # + # # Call the update_omnichannel_setting method. + # result = client.update_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + # p result + # + def update_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest + + # Converts hash and nil to an 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_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_omnichannel_setting.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.update_omnichannel_setting request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Requests inventory verification for a given merchant in a given country. + # + # @overload request_inventory_verification(request, options = nil) + # Pass arguments to `request_inventory_verification` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload request_inventory_verification(name: nil) + # Pass arguments to `request_inventory_verification` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the omnichannel setting to request inventory + # verification. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new + # + # # Call the request_inventory_verification method. + # result = client.request_inventory_verification request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse. + # p result + # + def request_inventory_verification request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.request_inventory_verification.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.request_inventory_verification.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.request_inventory_verification.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.request_inventory_verification request, 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 OmnichannelSettingsService REST API. + # + # This class represents the configuration for OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_omnichannel_setting to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_omnichannel_setting.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_omnichannel_setting.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 OmnichannelSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :get_omnichannel_setting + ## + # RPC-specific configuration for `list_omnichannel_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_omnichannel_settings + ## + # RPC-specific configuration for `create_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :create_omnichannel_setting + ## + # RPC-specific configuration for `update_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :update_omnichannel_setting + ## + # RPC-specific configuration for `request_inventory_verification` + # @return [::Gapic::Config::Method] + # + attr_reader :request_inventory_verification + + # @private + def initialize parent_rpcs = nil + get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting + @get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config + list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings + @list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config + create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting + @create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config + update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting + @update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config + request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification + @request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..c25ce12cee60 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub.rb @@ -0,0 +1,391 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/omnichannelsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module OmnichannelSettingsService + module Rest + ## + # REST service stub for the OmnichannelSettingsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # A result object deserialized from the server's reply + def get_omnichannel_setting request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_omnichannel_setting_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_omnichannel_setting", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.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_omnichannel_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse] + # A result object deserialized from the server's reply + def list_omnichannel_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_omnichannel_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_omnichannel_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse.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_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # A result object deserialized from the server's reply + def create_omnichannel_setting request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_omnichannel_setting_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_omnichannel_setting", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.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_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # A result object deserialized from the server's reply + def update_omnichannel_setting request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_omnichannel_setting_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_omnichannel_setting", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the request_inventory_verification REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] + # A result object deserialized from the server's reply + def request_inventory_verification request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_request_inventory_verification_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "request_inventory_verification", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_omnichannel_setting_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_omnichannel_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_omnichannel_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/omnichannelSettings", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest] + # 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_omnichannel_setting_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/omnichannelSettings", + body: "omnichannel_setting", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest] + # 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_omnichannel_setting_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{omnichannel_setting.name}", + body: "omnichannel_setting", + matches: [ + ["omnichannel_setting.name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the request_inventory_verification REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_request_inventory_verification_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:requestInventoryVerification", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_pb.rb new file mode 100644 index 000000000000..7325e9c54c30 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/omnichannelsettings.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n>google/shopping/merchant/accounts/v1/omnichannelsettings.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xc7\x06\n\x12OmnichannelSetting\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0bregion_code\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12W\n\x08lsf_type\x18\x0c \x01(\x0e\x32@.google.shopping.merchant.accounts.v1.OmnichannelSetting.LsfTypeB\x03\xe0\x41\x02\x12\x44\n\x08in_stock\x18\r \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.InStockB\x03\xe0\x41\x01\x12\x41\n\x06pickup\x18\x0e \x01(\x0b\x32,.google.shopping.merchant.accounts.v1.PickupB\x03\xe0\x41\x01\x12\x44\n\x08lfp_link\x18\x05 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.LfpLinkB\x03\xe0\x41\x03\x12H\n\x03odo\x18\x06 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.OnDisplayToOrderB\x03\xe0\x41\x01\x12?\n\x05\x61\x62out\x18\x07 \x01(\x0b\x32+.google.shopping.merchant.accounts.v1.AboutB\x03\xe0\x41\x01\x12`\n\x16inventory_verification\x18\x08 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1.InventoryVerificationB\x03\xe0\x41\x01\"O\n\x07LsfType\x12\x18\n\x14LSF_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05GHLSF\x10\x01\x12\x0f\n\x0bMHLSF_BASIC\x10\x02\x12\x0e\n\nMHLSF_FULL\x10\x03:\x9a\x01\xea\x41\x96\x01\n-merchantapi.googleapis.com/OmnichannelSetting\x12 e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all existing return policies for a given business. + # + # @overload list_online_return_policies(request, options = nil) + # Pass arguments to `list_online_return_policies` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_online_return_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_online_return_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The Merchant Center account for which to list return policies. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of `OnlineReturnPolicy` resources to return. + # The service returns fewer than this value if the number of return policies + # for the given business is less that than the `pageSize`. The default value + # is 10. The maximum value is 100; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOnlineReturnPolicies` + # call. Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListOnlineReturnPolicies` must match the call that provided the page + # token. The token returned as + # {::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.new + # + # # Call the list_online_return_policies method. + # result = client.list_online_return_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. + # p item + # end + # + def list_online_return_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_online_return_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_online_return_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_online_return_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.call_rpc :list_online_return_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @online_return_policy_service_stub, :list_online_return_policies, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new return policy for a given business. + # + # @overload create_online_return_policy(request, options = nil) + # Pass arguments to `create_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_online_return_policy(parent: nil, online_return_policy: nil) + # Pass arguments to `create_online_return_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 parent [::String] + # Required. The Merchant Center account for which the return policy will be + # created. Format: `accounts/{account}` + # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy, ::Hash] + # Required. The return policy object to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new + # + # # Call the create_online_return_policy method. + # result = client.create_online_return_policy request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. + # p result + # + def create_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest + + # Converts hash and nil to 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_online_return_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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_online_return_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.call_rpc :create_online_return_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 + + ## + # Deletes an existing return policy. + # + # @overload delete_online_return_policy(request, options = nil) + # Pass arguments to `delete_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_online_return_policy(name: nil) + # Pass arguments to `delete_online_return_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 name [::String] + # Required. The name of the return policy to delete. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + # + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new + # + # # Call the delete_online_return_policy method. + # result = client.delete_online_return_policy request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_online_return_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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_online_return_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.call_rpc :delete_online_return_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 + + ## + # Configuration class for the OnlineReturnPolicyService API. + # + # This class represents the configuration for OnlineReturnPolicyService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_online_return_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_online_return_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_online_return_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 OnlineReturnPolicyService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_online_return_policy + ## + # RPC-specific configuration for `list_online_return_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_online_return_policies + ## + # RPC-specific configuration for `create_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_online_return_policy + ## + # RPC-specific configuration for `delete_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_online_return_policy + + # @private + def initialize parent_rpcs = nil + get_online_return_policy_config = parent_rpcs.get_online_return_policy if parent_rpcs.respond_to? :get_online_return_policy + @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config + list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies + @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config + create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy + @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config + delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy + @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/credentials.rb new file mode 100644 index 000000000000..c3c6be712f49 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_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 Shopping + module Merchant + module Accounts + module V1 + module OnlineReturnPolicyService + # Credentials for the OnlineReturnPolicyService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/paths.rb new file mode 100644 index 000000000000..ae6f0b183c04 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_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 Shopping + module Merchant + module Accounts + module V1 + module OnlineReturnPolicyService + # Path helper methods for the OnlineReturnPolicyService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified OnlineReturnPolicy resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/onlineReturnPolicies/{return_policy}` + # + # @param account [String] + # @param return_policy [String] + # + # @return [::String] + def online_return_policy_path account:, return_policy: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/onlineReturnPolicies/#{return_policy}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest.rb new file mode 100644 index 000000000000..a053361f3919 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/online_return_policy_service/credentials" +require "google/shopping/merchant/accounts/v1/online_return_policy_service/paths" +require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # The service facilitates the management of a business's remorse return policy + # configuration, encompassing return policies for both ads and free listings + # ## programs. This API defines the following resource model: + # + # {::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy OnlineReturnPolicy} + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new + # + module OnlineReturnPolicyService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb new file mode 100644 index 000000000000..c99c85bf2418 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb @@ -0,0 +1,717 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/online_return_policy_pb" +require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module OnlineReturnPolicyService + module Rest + ## + # REST client for the OnlineReturnPolicyService service. + # + # The service facilitates the management of a business's remorse return policy + # configuration, encompassing return policies for both ads and free listings + # ## programs. This API defines the following resource model: + # + # {::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy OnlineReturnPolicy} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :online_return_policy_service_stub + + ## + # Configure the OnlineReturnPolicyService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OnlineReturnPolicyService clients + # ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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 + @online_return_policy_service_stub.universe_domain + end + + ## + # Create a new OnlineReturnPolicyService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OnlineReturnPolicyService 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 + + @online_return_policy_service_stub = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @online_return_policy_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 + @online_return_policy_service_stub.logger + end + + # Service calls + + ## + # Gets an existing return policy for a given business. + # + # @overload get_online_return_policy(request, options = nil) + # Pass arguments to `get_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_online_return_policy(name: nil) + # Pass arguments to `get_online_return_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 name [::String] + # Required. The name of the return policy to retrieve. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new + # + # # Call the get_online_return_policy method. + # result = client.get_online_return_policy request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. + # p result + # + def get_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_online_return_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::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_online_return_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.get_online_return_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 + + ## + # Lists all existing return policies for a given business. + # + # @overload list_online_return_policies(request, options = nil) + # Pass arguments to `list_online_return_policies` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_online_return_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_online_return_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The Merchant Center account for which to list return policies. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of `OnlineReturnPolicy` resources to return. + # The service returns fewer than this value if the number of return policies + # for the given business is less that than the `pageSize`. The default value + # is 10. The maximum value is 100; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOnlineReturnPolicies` + # call. Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListOnlineReturnPolicies` must match the call that provided the page + # token. The token returned as + # {::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.new + # + # # Call the list_online_return_policies method. + # result = client.list_online_return_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. + # p item + # end + # + def list_online_return_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_online_return_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_online_return_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_online_return_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.list_online_return_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @online_return_policy_service_stub, :list_online_return_policies, "online_return_policies", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new return policy for a given business. + # + # @overload create_online_return_policy(request, options = nil) + # Pass arguments to `create_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_online_return_policy(parent: nil, online_return_policy: nil) + # Pass arguments to `create_online_return_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 parent [::String] + # Required. The Merchant Center account for which the return policy will be + # created. Format: `accounts/{account}` + # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy, ::Hash] + # Required. The return policy object to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new + # + # # Call the create_online_return_policy method. + # result = client.create_online_return_policy request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. + # p result + # + def create_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest + + # Converts hash and nil to an 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_online_return_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::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_online_return_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.create_online_return_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 + + ## + # Deletes an existing return policy. + # + # @overload delete_online_return_policy(request, options = nil) + # Pass arguments to `delete_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_online_return_policy(name: nil) + # Pass arguments to `delete_online_return_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 name [::String] + # Required. The name of the return policy to delete. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + # @yield [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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new + # + # # Call the delete_online_return_policy method. + # result = client.delete_online_return_policy request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_online_return_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::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_online_return_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.delete_online_return_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 + + ## + # Configuration class for the OnlineReturnPolicyService REST API. + # + # This class represents the configuration for OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_online_return_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_online_return_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_online_return_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 OnlineReturnPolicyService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_online_return_policy + ## + # RPC-specific configuration for `list_online_return_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_online_return_policies + ## + # RPC-specific configuration for `create_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_online_return_policy + ## + # RPC-specific configuration for `delete_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_online_return_policy + + # @private + def initialize parent_rpcs = nil + get_online_return_policy_config = parent_rpcs.get_online_return_policy if parent_rpcs.respond_to? :get_online_return_policy + @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config + list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies + @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config + create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy + @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config + delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy + @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub.rb new file mode 100644 index 000000000000..37d42c71e602 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub.rb @@ -0,0 +1,328 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/online_return_policy_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module OnlineReturnPolicyService + module Rest + ## + # REST service stub for the OnlineReturnPolicyService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # A result object deserialized from the server's reply + def get_online_return_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_online_return_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_online_return_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.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_online_return_policies REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse] + # A result object deserialized from the server's reply + def list_online_return_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_online_return_policies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_online_return_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse.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_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # A result object deserialized from the server's reply + def create_online_return_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_online_return_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: "create_online_return_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.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_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_online_return_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_online_return_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: "delete_online_return_policy", + 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 get_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_online_return_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_online_return_policies REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_online_return_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/onlineReturnPolicies", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest] + # 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_online_return_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/onlineReturnPolicies", + body: "online_return_policy", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_online_return_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb new file mode 100644 index 000000000000..c76d7bd0b200 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb @@ -0,0 +1,57 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/online_return_policy.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/online_return_policy_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module OnlineReturnPolicyService + # The service facilitates the management of a business's remorse return policy + # configuration, encompassing return policies for both ads and free listings + # ## programs. This API defines the following resource model: + # + # [OnlineReturnPolicy][google.shopping.merchant.accounts.v1.OnlineReturnPolicy] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.OnlineReturnPolicyService' + + # Gets an existing return policy for a given business. + rpc :GetOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy + # Lists all existing return policies for a given business. + rpc :ListOnlineReturnPolicies, ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest, ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse + # Creates a new return policy for a given business. + rpc :CreateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy + # Deletes an existing return policy. + rpc :DeleteOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/phoneverificationstate_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/phoneverificationstate_pb.rb new file mode 100644 index 000000000000..d9f97296594b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/phoneverificationstate_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/phoneverificationstate.proto + +require 'google/protobuf' + + +descriptor_data = "\nAgoogle/shopping/merchant/accounts/v1/phoneverificationstate.proto\x12$google.shopping.merchant.accounts.v1*\x92\x01\n\x16PhoneVerificationState\x12(\n$PHONE_VERIFICATION_STATE_UNSPECIFIED\x10\x00\x12%\n!PHONE_VERIFICATION_STATE_VERIFIED\x10\x01\x12\'\n#PHONE_VERIFICATION_STATE_UNVERIFIED\x10\x02\x42\x8e\x02\n(com.google.shopping.merchant.accounts.v1B\x1bPhoneVerificationStateProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + PhoneVerificationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.PhoneVerificationState").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_pb.rb new file mode 100644 index 000000000000..1cc5963ccb73 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/programs.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 = "\n3google/shopping/merchant/accounts/v1/programs.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x9a\x04\n\x07Program\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x11\x64ocumentation_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12G\n\x05state\x18\x03 \x01(\x0e\x32\x33.google.shopping.merchant.accounts.v1.Program.StateB\x03\xe0\x41\x03\x12 \n\x13\x61\x63tive_region_codes\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12Z\n\x12unmet_requirements\x18\x05 \x03(\x0b\x32\x39.google.shopping.merchant.accounts.v1.Program.RequirementB\x03\xe0\x41\x03\x1a\x65\n\x0bRequirement\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1e\n\x11\x64ocumentation_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15\x61\x66\x66\x65\x63ted_region_codes\x18\x03 \x03(\tB\x03\xe0\x41\x03\"K\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_ELIGIBLE\x10\x01\x12\x0c\n\x08\x45LIGIBLE\x10\x02\x12\x0b\n\x07\x45NABLED\x10\x03:a\xea\x41^\n\"merchantapi.googleapis.com/Program\x12%accounts/{account}/programs/{program}*\x08programs2\x07program\"M\n\x11GetProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program\"\x82\x01\n\x13ListProgramsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Program\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"p\n\x14ListProgramsResponse\x12?\n\x08programs\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1.Program\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x14\x45nableProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program\"Q\n\x15\x44isableProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program2\xd4\x06\n\x0fProgramsService\x12\xae\x01\n\nGetProgram\x12\x37.google.shopping.merchant.accounts.v1.GetProgramRequest\x1a-.google.shopping.merchant.accounts.v1.Program\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/accounts/v1/{name=accounts/*/programs/*}\x12\xc1\x01\n\x0cListPrograms\x12\x39.google.shopping.merchant.accounts.v1.ListProgramsRequest\x1a:.google.shopping.merchant.accounts.v1.ListProgramsResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/accounts/v1/{parent=accounts/*}/programs\x12\xbe\x01\n\rEnableProgram\x12:.google.shopping.merchant.accounts.v1.EnableProgramRequest\x1a-.google.shopping.merchant.accounts.v1.Program\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\"0/accounts/v1/{name=accounts/*/programs/*}:enable:\x01*\x12\xc1\x01\n\x0e\x44isableProgram\x12;.google.shopping.merchant.accounts.v1.DisableProgramRequest\x1a-.google.shopping.merchant.accounts.v1.Program\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/accounts/v1/{name=accounts/*/programs/*}:disable:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x80\x02\n(com.google.shopping.merchant.accounts.v1B\rProgramsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + Program = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Program").msgclass + Program::Requirement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Program.Requirement").msgclass + Program::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Program.State").enummodule + GetProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetProgramRequest").msgclass + ListProgramsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListProgramsRequest").msgclass + ListProgramsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListProgramsResponse").msgclass + EnableProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.EnableProgramRequest").msgclass + DisableProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DisableProgramRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service.rb new file mode 100644 index 000000000000..cdb11e3556e1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service.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 "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/programs_service/credentials" +require "google/shopping/merchant/accounts/v1/programs_service/paths" +require "google/shopping/merchant/accounts/v1/programs_service/client" +require "google/shopping/merchant/accounts/v1/programs_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/answer/13889434) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a business's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/programs_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/programs_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new + # + module ProgramsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "programs_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/programs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/client.rb new file mode 100644 index 000000000000..a058ff66b072 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/client.rb @@ -0,0 +1,787 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/programs_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ProgramsService + ## + # Client for the ProgramsService service. + # + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/answer/13889434) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a business's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :programs_service_stub + + ## + # Configure the ProgramsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProgramsService clients + # ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ProgramsService 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::Shopping::Merchant::Accounts::V1::ProgramsService::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 + @programs_service_stub.universe_domain + end + + ## + # Create a new ProgramsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProgramsService 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/shopping/merchant/accounts/v1/programs_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 + + @programs_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::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 + ) + + @programs_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 + @programs_service_stub.logger + end + + # Service calls + + ## + # Retrieves the specified program for the account. + # + # @overload get_program(request, options = nil) + # Pass arguments to `get_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_program(name: nil) + # Pass arguments to `get_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program to retrieve. + # Format: `accounts/{account}/programs/{program}`. For example, + # `accounts/123456/programs/free-listings`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new + # + # # Call the get_program method. + # result = client.get_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + # p result + # + def get_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_program.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.call_rpc :get_program, request, 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 all programs for the account. + # + # @overload list_programs(request, options = nil) + # Pass arguments to `list_programs` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_programs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_programs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 account for which to retrieve all programs. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of programs to return in a single response. If + # unspecified (or 0), a default size of 1000 is used. The maximum value is + # 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A continuation token, received from a previous `ListPrograms` + # call. Provide this to retrieve the next page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Program>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Program>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.new + # + # # Call the list_programs method. + # result = client.list_programs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Program. + # p item + # end + # + def list_programs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_programs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_programs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_programs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.call_rpc :list_programs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @programs_service_stub, :list_programs, 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 + + ## + # Enable participation in the specified program for the account. + # + # @overload enable_program(request, options = nil) + # Pass arguments to `enable_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload enable_program(name: nil) + # Pass arguments to `enable_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program for which to enable participation for the + # given account. Format: `accounts/{account}/programs/{program}`. For + # example, `accounts/123456/programs/free-listings`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new + # + # # Call the enable_program method. + # result = client.enable_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + # p result + # + def enable_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.enable_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.enable_program.timeout, + metadata: metadata, + retry_policy: @config.rpcs.enable_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.call_rpc :enable_program, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disable participation in the specified program for the account. + # + # @overload disable_program(request, options = nil) + # Pass arguments to `disable_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload disable_program(name: nil) + # Pass arguments to `disable_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program for which to disable participation for + # the given account. Format: `accounts/{account}/programs/{program}`. For + # example, `accounts/123456/programs/free-listings`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new + # + # # Call the disable_program method. + # result = client.disable_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + # p result + # + def disable_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.disable_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.disable_program.timeout, + metadata: metadata, + retry_policy: @config.rpcs.disable_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.call_rpc :disable_program, request, 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 ProgramsService API. + # + # This class represents the configuration for ProgramsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_program to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_program.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_program.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::ProgramsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 ProgramsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_program` + # @return [::Gapic::Config::Method] + # + attr_reader :get_program + ## + # RPC-specific configuration for `list_programs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_programs + ## + # RPC-specific configuration for `enable_program` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_program + ## + # RPC-specific configuration for `disable_program` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_program + + # @private + def initialize parent_rpcs = nil + get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program + @get_program = ::Gapic::Config::Method.new get_program_config + list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs + @list_programs = ::Gapic::Config::Method.new list_programs_config + enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program + @enable_program = ::Gapic::Config::Method.new enable_program_config + disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program + @disable_program = ::Gapic::Config::Method.new disable_program_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/credentials.rb new file mode 100644 index 000000000000..2de0d4a2a1ef --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_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 Shopping + module Merchant + module Accounts + module V1 + module ProgramsService + # Credentials for the ProgramsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/paths.rb new file mode 100644 index 000000000000..d792cd571b86 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_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 Shopping + module Merchant + module Accounts + module V1 + module ProgramsService + # Path helper methods for the ProgramsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified Program resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/programs/{program}` + # + # @param account [String] + # @param program [String] + # + # @return [::String] + def program_path account:, program: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/programs/#{program}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest.rb new file mode 100644 index 000000000000..d7d6f98fe0c8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/programs_service/credentials" +require "google/shopping/merchant/accounts/v1/programs_service/paths" +require "google/shopping/merchant/accounts/v1/programs_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/answer/13889434) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a business's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/programs_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new + # + module ProgramsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/programs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/client.rb new file mode 100644 index 000000000000..121724fc05af --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/client.rb @@ -0,0 +1,716 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/programs_pb" +require "google/shopping/merchant/accounts/v1/programs_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ProgramsService + module Rest + ## + # REST client for the ProgramsService service. + # + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/answer/13889434) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a business's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :programs_service_stub + + ## + # Configure the ProgramsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProgramsService clients + # ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ProgramsService 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::Shopping::Merchant::Accounts::V1::ProgramsService::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 + @programs_service_stub.universe_domain + end + + ## + # Create a new ProgramsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProgramsService 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 + + @programs_service_stub = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @programs_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 + @programs_service_stub.logger + end + + # Service calls + + ## + # Retrieves the specified program for the account. + # + # @overload get_program(request, options = nil) + # Pass arguments to `get_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_program(name: nil) + # Pass arguments to `get_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program to retrieve. + # Format: `accounts/{account}/programs/{program}`. For example, + # `accounts/123456/programs/free-listings`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new + # + # # Call the get_program method. + # result = client.get_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + # p result + # + def get_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_program.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.get_program request, 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 all programs for the account. + # + # @overload list_programs(request, options = nil) + # Pass arguments to `list_programs` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_programs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_programs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 account for which to retrieve all programs. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of programs to return in a single response. If + # unspecified (or 0), a default size of 1000 is used. The maximum value is + # 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A continuation token, received from a previous `ListPrograms` + # call. Provide this to retrieve the next page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Program>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Program>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.new + # + # # Call the list_programs method. + # result = client.list_programs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Program. + # p item + # end + # + def list_programs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_programs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_programs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_programs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.list_programs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @programs_service_stub, :list_programs, "programs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enable participation in the specified program for the account. + # + # @overload enable_program(request, options = nil) + # Pass arguments to `enable_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload enable_program(name: nil) + # Pass arguments to `enable_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program for which to enable participation for the + # given account. Format: `accounts/{account}/programs/{program}`. For + # example, `accounts/123456/programs/free-listings`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new + # + # # Call the enable_program method. + # result = client.enable_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + # p result + # + def enable_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.enable_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.enable_program.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.enable_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.enable_program request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disable participation in the specified program for the account. + # + # @overload disable_program(request, options = nil) + # Pass arguments to `disable_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload disable_program(name: nil) + # Pass arguments to `disable_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program for which to disable participation for + # the given account. Format: `accounts/{account}/programs/{program}`. For + # example, `accounts/123456/programs/free-listings`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new + # + # # Call the disable_program method. + # result = client.disable_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + # p result + # + def disable_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.disable_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.disable_program.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.disable_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.disable_program request, 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 ProgramsService REST API. + # + # This class represents the configuration for ProgramsService 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::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_program to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_program.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_program.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 ProgramsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_program` + # @return [::Gapic::Config::Method] + # + attr_reader :get_program + ## + # RPC-specific configuration for `list_programs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_programs + ## + # RPC-specific configuration for `enable_program` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_program + ## + # RPC-specific configuration for `disable_program` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_program + + # @private + def initialize parent_rpcs = nil + get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program + @get_program = ::Gapic::Config::Method.new get_program_config + list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs + @list_programs = ::Gapic::Config::Method.new list_programs_config + enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program + @enable_program = ::Gapic::Config::Method.new enable_program_config + disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program + @disable_program = ::Gapic::Config::Method.new disable_program_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/service_stub.rb new file mode 100644 index 000000000000..25330a6f4cee --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/service_stub.rb @@ -0,0 +1,329 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/programs_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ProgramsService + module Rest + ## + # REST service stub for the ProgramsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # A result object deserialized from the server's reply + def get_program request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_program_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_program", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Program.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_programs REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse] + # A result object deserialized from the server's reply + def list_programs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_programs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_programs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the enable_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # A result object deserialized from the server's reply + def enable_program request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_enable_program_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "enable_program", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Program.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the disable_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # A result object deserialized from the server's reply + def disable_program request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_disable_program_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "disable_program", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Program.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_program_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_programs REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_programs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/programs", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the enable_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_enable_program_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:enable", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the disable_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_disable_program_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:disable", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_services_pb.rb new file mode 100644 index 000000000000..afaf41dd0abb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_services_pb.rb @@ -0,0 +1,63 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/programs.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/programs_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ProgramsService + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/answer/13889434) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a business's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.ProgramsService' + + # Retrieves the specified program for the account. + rpc :GetProgram, ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest, ::Google::Shopping::Merchant::Accounts::V1::Program + # Retrieves all programs for the account. + rpc :ListPrograms, ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse + # Enable participation in the specified program for the account. + rpc :EnableProgram, ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1::Program + # Disable participation in the specified program for the account. + rpc :DisableProgram, ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1::Program + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_pb.rb new file mode 100644 index 000000000000..fee3993ca9e6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_pb.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/regions.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/wrappers_pb' +require 'google/type/latlng_pb' + + +descriptor_data = "\n2google/shopping/merchant/accounts/v1/regions.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"K\n\x10GetRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\xac\x01\n\x13\x43reateRegionRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tregion_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x06region\x18\x03 \x01(\x0b\x32,.google.shopping.merchant.accounts.v1.RegionB\x03\xe0\x41\x02\"\xa9\x01\n\x19\x42\x61tchCreateRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12P\n\x08requests\x18\x02 \x03(\x0b\x32\x39.google.shopping.merchant.accounts.v1.CreateRegionRequestB\x03\xe0\x41\x02\"[\n\x1a\x42\x61tchCreateRegionsResponse\x12=\n\x07regions\x18\x01 \x03(\x0b\x32,.google.shopping.merchant.accounts.v1.Region\"\x8e\x01\n\x13UpdateRegionRequest\x12\x41\n\x06region\x18\x01 \x01(\x0b\x32,.google.shopping.merchant.accounts.v1.RegionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xa9\x01\n\x19\x42\x61tchUpdateRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12P\n\x08requests\x18\x02 \x03(\x0b\x32\x39.google.shopping.merchant.accounts.v1.UpdateRegionRequestB\x03\xe0\x41\x02\"[\n\x1a\x42\x61tchUpdateRegionsResponse\x12=\n\x07regions\x18\x01 \x03(\x0b\x32,.google.shopping.merchant.accounts.v1.Region\"N\n\x13\x44\x65leteRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\xa9\x01\n\x19\x42\x61tchDeleteRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12P\n\x08requests\x18\x02 \x03(\x0b\x32\x39.google.shopping.merchant.accounts.v1.DeleteRegionRequestB\x03\xe0\x41\x02\"\x81\x01\n\x12ListRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"m\n\x13ListRegionsResponse\x12=\n\x07regions\x18\x01 \x03(\x0b\x32,.google.shopping.merchant.accounts.v1.Region\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc9\x08\n\x06Region\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12Z\n\x10postal_code_area\x18\x03 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1.Region.PostalCodeAreaB\x03\xe0\x41\x01\x12W\n\x0egeotarget_area\x18\x04 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1.Region.GeoTargetAreaB\x03\xe0\x41\x01\x12\x44\n\x1bregional_inventory_eligible\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12:\n\x11shipping_eligible\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12Q\n\x0bradius_area\x18\x07 \x01(\x0b\x32\x37.google.shopping.merchant.accounts.v1.Region.RadiusAreaB\x03\xe0\x41\x01\x1a\xcb\x01\n\x0ePostalCodeArea\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x66\n\x0cpostal_codes\x18\x02 \x03(\x0b\x32K.google.shopping.merchant.accounts.v1.Region.PostalCodeArea.PostalCodeRangeB\x03\xe0\x41\x02\x1a\x37\n\x0fPostalCodeRange\x12\x12\n\x05\x62\x65gin\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03\x65nd\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x34\n\rGeoTargetArea\x12#\n\x16geotarget_criteria_ids\x18\x01 \x03(\x03\x42\x03\xe0\x41\x02\x1a\x8e\x02\n\nRadiusArea\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12)\n\x07lat_lng\x18\x02 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12\x13\n\x06radius\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12^\n\x0cradius_units\x18\x04 \x01(\x0e\x32\x43.google.shopping.merchant.accounts.v1.Region.RadiusArea.RadiusUnitsB\x03\xe0\x41\x01\"F\n\x0bRadiusUnits\x12\x1c\n\x18RADIUS_UNITS_UNSPECIFIED\x10\x00\x12\t\n\x05MILES\x10\x01\x12\x0e\n\nKILOMETERS\x10\x02:\\\xea\x41Y\n!merchantapi.googleapis.com/Region\x12#accounts/{account}/regions/{region}*\x07regions2\x06regionB\x0f\n\r_display_name2\xe8\x0c\n\x0eRegionsService\x12\xaa\x01\n\tGetRegion\x12\x36.google.shopping.merchant.accounts.v1.GetRegionRequest\x1a,.google.shopping.merchant.accounts.v1.Region\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/accounts/v1/{name=accounts/*/regions/*}\x12\xcb\x01\n\x0c\x43reateRegion\x12\x39.google.shopping.merchant.accounts.v1.CreateRegionRequest\x1a,.google.shopping.merchant.accounts.v1.Region\"R\xda\x41\x17parent,region,region_id\x82\xd3\xe4\x93\x02\x32\"(/accounts/v1/{parent=accounts/*}/regions:\x06region\x12\xd8\x01\n\x12\x42\x61tchCreateRegions\x12?.google.shopping.merchant.accounts.v1.BatchCreateRegionsRequest\x1a@.google.shopping.merchant.accounts.v1.BatchCreateRegionsResponse\"?\x82\xd3\xe4\x93\x02\x39\"4/accounts/v1/{parent=accounts/*}/regions:batchCreate:\x01*\x12\xcd\x01\n\x0cUpdateRegion\x12\x39.google.shopping.merchant.accounts.v1.UpdateRegionRequest\x1a,.google.shopping.merchant.accounts.v1.Region\"T\xda\x41\x12region,update_mask\x82\xd3\xe4\x93\x02\x39\x32//accounts/v1/{region.name=accounts/*/regions/*}:\x06region\x12\xd8\x01\n\x12\x42\x61tchUpdateRegions\x12?.google.shopping.merchant.accounts.v1.BatchUpdateRegionsRequest\x1a@.google.shopping.merchant.accounts.v1.BatchUpdateRegionsResponse\"?\x82\xd3\xe4\x93\x02\x39\"4/accounts/v1/{parent=accounts/*}/regions:batchUpdate:\x01*\x12\x9a\x01\n\x0c\x44\x65leteRegion\x12\x39.google.shopping.merchant.accounts.v1.DeleteRegionRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/accounts/v1/{name=accounts/*/regions/*}\x12\xae\x01\n\x12\x42\x61tchDeleteRegions\x12?.google.shopping.merchant.accounts.v1.BatchDeleteRegionsRequest\x1a\x16.google.protobuf.Empty\"?\x82\xd3\xe4\x93\x02\x39\"4/accounts/v1/{parent=accounts/*}/regions:batchDelete:\x01*\x12\xbd\x01\n\x0bListRegions\x12\x38.google.shopping.merchant.accounts.v1.ListRegionsRequest\x1a\x39.google.shopping.merchant.accounts.v1.ListRegionsResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/accounts/v1/{parent=accounts/*}/regions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xff\x01\n(com.google.shopping.merchant.accounts.v1B\x0cRegionsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + GetRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetRegionRequest").msgclass + CreateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateRegionRequest").msgclass + BatchCreateRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BatchCreateRegionsRequest").msgclass + BatchCreateRegionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BatchCreateRegionsResponse").msgclass + UpdateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateRegionRequest").msgclass + BatchUpdateRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BatchUpdateRegionsRequest").msgclass + BatchUpdateRegionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BatchUpdateRegionsResponse").msgclass + DeleteRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DeleteRegionRequest").msgclass + BatchDeleteRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BatchDeleteRegionsRequest").msgclass + ListRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListRegionsRequest").msgclass + ListRegionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListRegionsResponse").msgclass + Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region").msgclass + Region::PostalCodeArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region.PostalCodeArea").msgclass + Region::PostalCodeArea::PostalCodeRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region.PostalCodeArea.PostalCodeRange").msgclass + Region::GeoTargetArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region.GeoTargetArea").msgclass + Region::RadiusArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region.RadiusArea").msgclass + Region::RadiusArea::RadiusUnits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region.RadiusArea.RadiusUnits").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service.rb new file mode 100644 index 000000000000..f83f9ec525af --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/regions_service/credentials" +require "google/shopping/merchant/accounts/v1/regions_service/paths" +require "google/shopping/merchant/accounts/v1/regions_service/client" +require "google/shopping/merchant/accounts/v1/regions_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - {::Google::Shopping::Merchant::Accounts::V1::Region Region} + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/regions_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/regions_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + module RegionsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "regions_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/regions_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/client.rb new file mode 100644 index 000000000000..8bb34891de7d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/client.rb @@ -0,0 +1,1177 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/regions_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module RegionsService + ## + # Client for the RegionsService service. + # + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - {::Google::Shopping::Merchant::Accounts::V1::Region Region} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :regions_service_stub + + ## + # Configure the RegionsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RegionsService clients + # ::Google::Shopping::Merchant::Accounts::V1::RegionsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RegionsService 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::Shopping::Merchant::Accounts::V1::RegionsService::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 + @regions_service_stub.universe_domain + end + + ## + # Create a new RegionsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RegionsService 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/shopping/merchant/accounts/v1/regions_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 + + @regions_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::RegionsService::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 + ) + + @regions_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 + @regions_service_stub.logger + end + + # Service calls + + ## + # Retrieves a region defined in your Merchant Center account. + # + # @overload get_region(request, options = nil) + # Pass arguments to `get_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_region(name: nil) + # Pass arguments to `get_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the region to retrieve. + # Format: `accounts/{account}/regions/{region}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new + # + # # Call the get_region method. + # result = client.get_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + # p result + # + def get_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_region.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :get_region, request, 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 region definition in your Merchant Center account. Executing this + # method requires admin access. + # + # @overload create_region(request, options = nil) + # Pass arguments to `create_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_region(parent: nil, region_id: nil, region: nil) + # Pass arguments to `create_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to create a region for. + # Format: `accounts/{account}` + # @param region_id [::String] + # Required. The identifier for the region, unique over all regions of the + # same account. + # @param region [::Google::Shopping::Merchant::Accounts::V1::Region, ::Hash] + # Required. The region to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new + # + # # Call the create_region method. + # result = client.create_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + # p result + # + def create_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest + + # Converts hash and nil to 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_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_region.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :create_region, request, 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 one or more regions in your Merchant Center account. + # Executing this method requires admin access. + # + # @overload batch_create_regions(request, options = nil) + # Pass arguments to `batch_create_regions` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_regions(parent: nil, requests: nil) + # Pass arguments to `batch_create_regions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to create one or more regions for. + # Format: `accounts/{account}` + # @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, ::Hash>] + # Required. The region(s) to create. + # The maximum number of regions that can be created in a batch is 100. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest.new + # + # # Call the batch_create_regions method. + # result = client.batch_create_regions request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse. + # p result + # + def batch_create_regions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest + + # Converts hash and nil to 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_regions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_regions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_create_regions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :batch_create_regions, request, 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 region definition in your Merchant Center account. + # Executing this method requires admin access. + # + # @overload update_region(request, options = nil) + # Pass arguments to `update_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_region(region: nil, update_mask: nil) + # Pass arguments to `update_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param region [::Google::Shopping::Merchant::Accounts::V1::Region, ::Hash] + # Required. The updated region. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The comma-separated field mask indicating the fields to update. + # Example: + # `"displayName,postalCodeArea.regionCode"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new + # + # # Call the update_region method. + # result = client.update_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + # p result + # + def update_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest + + # Converts hash and nil to 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_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.region&.name + header_params["region.name"] = request.region.name + end + + request_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_region.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :update_region, request, 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 one or more regions in your Merchant Center account. + # Executing this method requires admin access. + # + # @overload batch_update_regions(request, options = nil) + # Pass arguments to `batch_update_regions` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_regions(parent: nil, requests: nil) + # Pass arguments to `batch_update_regions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to update one or more regions for. + # Format: `accounts/{account}` + # @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, ::Hash>] + # Required. The region(s) to update. + # The maximum number of regions that can be updated in a batch is 100. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest.new + # + # # Call the batch_update_regions method. + # result = client.batch_update_regions request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse. + # p result + # + def batch_update_regions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest + + # Converts hash and nil to 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_regions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_regions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_update_regions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :batch_update_regions, request, 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 region definition from your Merchant Center account. Executing + # this method requires admin access. + # + # @overload delete_region(request, options = nil) + # Pass arguments to `delete_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_region(name: nil) + # Pass arguments to `delete_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the region to delete. + # Format: `accounts/{account}/regions/{region}` + # + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new + # + # # Call the delete_region method. + # result = client.delete_region request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_region.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :delete_region, request, 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 multiple regions by name from your Merchant Center account. + # Executing this method requires admin access. + # + # @overload batch_delete_regions(request, options = nil) + # Pass arguments to `batch_delete_regions` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_regions(parent: nil, requests: nil) + # Pass arguments to `batch_delete_regions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to delete one or more regions from. + # Format: `accounts/{account}` + # @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, ::Hash>] + # Required. The names of the regions to delete. + # A maximum of 100 regions can be deleted in a batch. + # + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest.new + # + # # Call the batch_delete_regions method. + # result = client.batch_delete_regions request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def batch_delete_regions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest + + # Converts hash and nil to 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_regions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_regions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_delete_regions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :batch_delete_regions, request, 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 regions in your Merchant Center account. + # + # @overload list_regions(request, options = nil) + # Pass arguments to `list_regions` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_regions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_regions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list regions for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of regions to return. The service may return + # fewer than this value. + # If unspecified, at most 50 regions will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListRegions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegions` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Region>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Region>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.new + # + # # Call the list_regions method. + # result = client.list_regions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Region. + # p item + # end + # + def list_regions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_regions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_regions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_regions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :list_regions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @regions_service_stub, :list_regions, 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 RegionsService API. + # + # This class represents the configuration for RegionsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_region to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_region.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_region.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::RegionsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 RegionsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_region` + # @return [::Gapic::Config::Method] + # + attr_reader :get_region + ## + # RPC-specific configuration for `create_region` + # @return [::Gapic::Config::Method] + # + attr_reader :create_region + ## + # RPC-specific configuration for `batch_create_regions` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_regions + ## + # RPC-specific configuration for `update_region` + # @return [::Gapic::Config::Method] + # + attr_reader :update_region + ## + # RPC-specific configuration for `batch_update_regions` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_update_regions + ## + # RPC-specific configuration for `delete_region` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_region + ## + # RPC-specific configuration for `batch_delete_regions` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_delete_regions + ## + # RPC-specific configuration for `list_regions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_regions + + # @private + def initialize parent_rpcs = nil + get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region + @get_region = ::Gapic::Config::Method.new get_region_config + create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region + @create_region = ::Gapic::Config::Method.new create_region_config + batch_create_regions_config = parent_rpcs.batch_create_regions if parent_rpcs.respond_to? :batch_create_regions + @batch_create_regions = ::Gapic::Config::Method.new batch_create_regions_config + update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region + @update_region = ::Gapic::Config::Method.new update_region_config + batch_update_regions_config = parent_rpcs.batch_update_regions if parent_rpcs.respond_to? :batch_update_regions + @batch_update_regions = ::Gapic::Config::Method.new batch_update_regions_config + delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region + @delete_region = ::Gapic::Config::Method.new delete_region_config + batch_delete_regions_config = parent_rpcs.batch_delete_regions if parent_rpcs.respond_to? :batch_delete_regions + @batch_delete_regions = ::Gapic::Config::Method.new batch_delete_regions_config + list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions + @list_regions = ::Gapic::Config::Method.new list_regions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/credentials.rb new file mode 100644 index 000000000000..a1dc21a6355b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_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 Shopping + module Merchant + module Accounts + module V1 + module RegionsService + # Credentials for the RegionsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/paths.rb new file mode 100644 index 000000000000..aae7ee6dfe96 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_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 Shopping + module Merchant + module Accounts + module V1 + module RegionsService + # Path helper methods for the RegionsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified Region resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/regions/{region}` + # + # @param account [String] + # @param region [String] + # + # @return [::String] + def region_path account:, region: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/regions/#{region}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest.rb new file mode 100644 index 000000000000..2f8d5ff753d1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/regions_service/credentials" +require "google/shopping/merchant/accounts/v1/regions_service/paths" +require "google/shopping/merchant/accounts/v1/regions_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - {::Google::Shopping::Merchant::Accounts::V1::Region Region} + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/regions_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + module RegionsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/regions_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/client.rb new file mode 100644 index 000000000000..9563857a6fbf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/client.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 "google/cloud/errors" +require "google/shopping/merchant/accounts/v1/regions_pb" +require "google/shopping/merchant/accounts/v1/regions_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module RegionsService + module Rest + ## + # REST client for the RegionsService service. + # + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - {::Google::Shopping::Merchant::Accounts::V1::Region Region} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :regions_service_stub + + ## + # Configure the RegionsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RegionsService clients + # ::Google::Shopping::Merchant::Accounts::V1::RegionsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RegionsService 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::Shopping::Merchant::Accounts::V1::RegionsService::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 + @regions_service_stub.universe_domain + end + + ## + # Create a new RegionsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RegionsService 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 + + @regions_service_stub = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @regions_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 + @regions_service_stub.logger + end + + # Service calls + + ## + # Retrieves a region defined in your Merchant Center account. + # + # @overload get_region(request, options = nil) + # Pass arguments to `get_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_region(name: nil) + # Pass arguments to `get_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the region to retrieve. + # Format: `accounts/{account}/regions/{region}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new + # + # # Call the get_region method. + # result = client.get_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + # p result + # + def get_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_region.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.get_region request, 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 region definition in your Merchant Center account. Executing this + # method requires admin access. + # + # @overload create_region(request, options = nil) + # Pass arguments to `create_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_region(parent: nil, region_id: nil, region: nil) + # Pass arguments to `create_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to create a region for. + # Format: `accounts/{account}` + # @param region_id [::String] + # Required. The identifier for the region, unique over all regions of the + # same account. + # @param region [::Google::Shopping::Merchant::Accounts::V1::Region, ::Hash] + # Required. The region to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new + # + # # Call the create_region method. + # result = client.create_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + # p result + # + def create_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest + + # Converts hash and nil to an 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_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_region.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.create_region request, 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 one or more regions in your Merchant Center account. + # Executing this method requires admin access. + # + # @overload batch_create_regions(request, options = nil) + # Pass arguments to `batch_create_regions` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_regions(parent: nil, requests: nil) + # Pass arguments to `batch_create_regions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to create one or more regions for. + # Format: `accounts/{account}` + # @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, ::Hash>] + # Required. The region(s) to create. + # The maximum number of regions that can be created in a batch is 100. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest.new + # + # # Call the batch_create_regions method. + # result = client.batch_create_regions request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse. + # p result + # + def batch_create_regions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest + + # Converts hash and nil to an 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_regions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_regions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_create_regions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.batch_create_regions request, 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 region definition in your Merchant Center account. + # Executing this method requires admin access. + # + # @overload update_region(request, options = nil) + # Pass arguments to `update_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_region(region: nil, update_mask: nil) + # Pass arguments to `update_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param region [::Google::Shopping::Merchant::Accounts::V1::Region, ::Hash] + # Required. The updated region. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The comma-separated field mask indicating the fields to update. + # Example: + # `"displayName,postalCodeArea.regionCode"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new + # + # # Call the update_region method. + # result = client.update_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + # p result + # + def update_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest + + # Converts hash and nil to an 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_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_region.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.update_region request, 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 one or more regions in your Merchant Center account. + # Executing this method requires admin access. + # + # @overload batch_update_regions(request, options = nil) + # Pass arguments to `batch_update_regions` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_regions(parent: nil, requests: nil) + # Pass arguments to `batch_update_regions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to update one or more regions for. + # Format: `accounts/{account}` + # @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, ::Hash>] + # Required. The region(s) to update. + # The maximum number of regions that can be updated in a batch is 100. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest.new + # + # # Call the batch_update_regions method. + # result = client.batch_update_regions request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse. + # p result + # + def batch_update_regions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest + + # Converts hash and nil to an 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_regions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_regions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_update_regions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.batch_update_regions request, 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 region definition from your Merchant Center account. Executing + # this method requires admin access. + # + # @overload delete_region(request, options = nil) + # Pass arguments to `delete_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_region(name: nil) + # Pass arguments to `delete_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the region to delete. + # Format: `accounts/{account}/regions/{region}` + # @yield [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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new + # + # # Call the delete_region method. + # result = client.delete_region request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_region.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.delete_region request, 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 multiple regions by name from your Merchant Center account. + # Executing this method requires admin access. + # + # @overload batch_delete_regions(request, options = nil) + # Pass arguments to `batch_delete_regions` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_regions(parent: nil, requests: nil) + # Pass arguments to `batch_delete_regions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to delete one or more regions from. + # Format: `accounts/{account}` + # @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, ::Hash>] + # Required. The names of the regions to delete. + # A maximum of 100 regions can be deleted in a batch. + # @yield [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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest.new + # + # # Call the batch_delete_regions method. + # result = client.batch_delete_regions request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def batch_delete_regions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest + + # Converts hash and nil to an 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_regions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_regions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_delete_regions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.batch_delete_regions request, 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 regions in your Merchant Center account. + # + # @overload list_regions(request, options = nil) + # Pass arguments to `list_regions` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_regions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_regions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list regions for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of regions to return. The service may return + # fewer than this value. + # If unspecified, at most 50 regions will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListRegions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegions` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Region>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Region>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.new + # + # # Call the list_regions method. + # result = client.list_regions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Region. + # p item + # end + # + def list_regions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_regions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_regions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_regions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.list_regions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @regions_service_stub, :list_regions, "regions", request, result, 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 RegionsService REST API. + # + # This class represents the configuration for RegionsService 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::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_region to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_region.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_region.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 RegionsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_region` + # @return [::Gapic::Config::Method] + # + attr_reader :get_region + ## + # RPC-specific configuration for `create_region` + # @return [::Gapic::Config::Method] + # + attr_reader :create_region + ## + # RPC-specific configuration for `batch_create_regions` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_regions + ## + # RPC-specific configuration for `update_region` + # @return [::Gapic::Config::Method] + # + attr_reader :update_region + ## + # RPC-specific configuration for `batch_update_regions` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_update_regions + ## + # RPC-specific configuration for `delete_region` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_region + ## + # RPC-specific configuration for `batch_delete_regions` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_delete_regions + ## + # RPC-specific configuration for `list_regions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_regions + + # @private + def initialize parent_rpcs = nil + get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region + @get_region = ::Gapic::Config::Method.new get_region_config + create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region + @create_region = ::Gapic::Config::Method.new create_region_config + batch_create_regions_config = parent_rpcs.batch_create_regions if parent_rpcs.respond_to? :batch_create_regions + @batch_create_regions = ::Gapic::Config::Method.new batch_create_regions_config + update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region + @update_region = ::Gapic::Config::Method.new update_region_config + batch_update_regions_config = parent_rpcs.batch_update_regions if parent_rpcs.respond_to? :batch_update_regions + @batch_update_regions = ::Gapic::Config::Method.new batch_update_regions_config + delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region + @delete_region = ::Gapic::Config::Method.new delete_region_config + batch_delete_regions_config = parent_rpcs.batch_delete_regions if parent_rpcs.respond_to? :batch_delete_regions + @batch_delete_regions = ::Gapic::Config::Method.new batch_delete_regions_config + list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions + @list_regions = ::Gapic::Config::Method.new list_regions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/service_stub.rb new file mode 100644 index 000000000000..1b255bef97d4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/service_stub.rb @@ -0,0 +1,576 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/regions_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module RegionsService + module Rest + ## + # REST service stub for the RegionsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # A result object deserialized from the server's reply + def get_region request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_region_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_region", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Region.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_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # A result object deserialized from the server's reply + def create_region request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_region_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_region", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Region.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_regions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse] + # A result object deserialized from the server's reply + def batch_create_regions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_regions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_regions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse.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_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # A result object deserialized from the server's reply + def update_region request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_region_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_region", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Region.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_regions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse] + # A result object deserialized from the server's reply + def batch_update_regions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_update_regions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_regions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse.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_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_region request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_region_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_region", + 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_regions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_regions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_delete_regions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_regions", + 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_regions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse] + # A result object deserialized from the server's reply + def list_regions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_regions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_regions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_region_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest] + # 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_region_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/regions", + body: "region", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_create_regions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest] + # 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_regions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/regions:batchCreate", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest] + # 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_region_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{region.name}", + body: "region", + matches: [ + ["region.name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_update_regions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest] + # 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_regions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/regions:batchUpdate", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_region_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_delete_regions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest] + # 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_regions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/regions:batchDelete", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_regions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_regions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/regions", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_services_pb.rb new file mode 100644 index 000000000000..b8835aa5d9bb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_services_pb.rb @@ -0,0 +1,71 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/regions.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/regions_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module RegionsService + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - [Region][google.shopping.merchant.accounts.v1.Region] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.RegionsService' + + # Retrieves a region defined in your Merchant Center account. + rpc :GetRegion, ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest, ::Google::Shopping::Merchant::Accounts::V1::Region + # Creates a region definition in your Merchant Center account. Executing this + # method requires admin access. + rpc :CreateRegion, ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1::Region + # Creates one or more regions in your Merchant Center account. + # Executing this method requires admin access. + rpc :BatchCreateRegions, ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest, ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse + # Updates a region definition in your Merchant Center account. + # Executing this method requires admin access. + rpc :UpdateRegion, ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1::Region + # Updates one or more regions in your Merchant Center account. + # Executing this method requires admin access. + rpc :BatchUpdateRegions, ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest, ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse + # Deletes a region definition from your Merchant Center account. Executing + # this method requires admin access. + rpc :DeleteRegion, ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, ::Google::Protobuf::Empty + # Deletes multiple regions by name from your Merchant Center account. + # Executing this method requires admin access. + rpc :BatchDeleteRegions, ::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest, ::Google::Protobuf::Empty + # Lists the regions in your Merchant Center account. + rpc :ListRegions, ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/rest.rb new file mode 100644 index 000000000000..7c8dc735d03e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/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 "google/shopping/merchant/accounts/v1/account_issue_service/rest" +require "google/shopping/merchant/accounts/v1/account_relationships_service/rest" +require "google/shopping/merchant/accounts/v1/account_services_service/rest" +require "google/shopping/merchant/accounts/v1/user_service/rest" +require "google/shopping/merchant/accounts/v1/accounts_service/rest" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest" +require "google/shopping/merchant/accounts/v1/business_identity_service/rest" +require "google/shopping/merchant/accounts/v1/business_info_service/rest" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest" +require "google/shopping/merchant/accounts/v1/developer_registration_service/rest" +require "google/shopping/merchant/accounts/v1/email_preferences_service/rest" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest" +require "google/shopping/merchant/accounts/v1/homepage_service/rest" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest" +require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest" +require "google/shopping/merchant/accounts/v1/programs_service/rest" +require "google/shopping/merchant/accounts/v1/regions_service/rest" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest" +require "google/shopping/merchant/accounts/v1/version" + +module Google + module Shopping + module Merchant + module Accounts + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/accounts/v1/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service.rb new file mode 100644 index 000000000000..63be3ac76824 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/shipping_settings_service/credentials" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/paths" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/client" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to get method call shipping setting information per Merchant API + # method. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/shipping_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new + # + module ShippingSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "shipping_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/client.rb new file mode 100644 index 000000000000..abfba1e3a1b8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/client.rb @@ -0,0 +1,581 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/shippingsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ShippingSettingsService + ## + # Client for the ShippingSettingsService service. + # + # Service to get method call shipping setting information per Merchant API + # method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :shipping_settings_service_stub + + ## + # Configure the ShippingSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ShippingSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ShippingSettingsService 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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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 + @shipping_settings_service_stub.universe_domain + end + + ## + # Create a new ShippingSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ShippingSettingsService 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/shopping/merchant/accounts/v1/shippingsettings_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 + + @shipping_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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 + ) + + @shipping_settings_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 + @shipping_settings_service_stub.logger + end + + # Service calls + + ## + # Retrieve shipping setting information. + # + # @overload get_shipping_settings(request, options = nil) + # Pass arguments to `get_shipping_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_shipping_settings(name: nil) + # Pass arguments to `get_shipping_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the shipping setting to retrieve. + # Format: `accounts/{account}/shippingsettings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new + # + # # Call the get_shipping_settings method. + # result = client.get_shipping_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. + # p result + # + def get_shipping_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_shipping_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_shipping_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_shipping_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shipping_settings_service_stub.call_rpc :get_shipping_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Replace the shipping setting of a business with the request shipping + # setting. Executing this method requires admin access. + # + # @overload insert_shipping_settings(request, options = nil) + # Pass arguments to `insert_shipping_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_shipping_settings(parent: nil, shipping_setting: nil) + # Pass arguments to `insert_shipping_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account for which this shipping setting will be inserted. If + # you are using an advanced account, you must specify the unique identifier + # of the sub-account for which you want to insert the shipping setting. + # Format: `accounts/{ACCOUNT_ID}` + # @param shipping_setting [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings, ::Hash] + # Required. The new version of the account. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new + # + # # Call the insert_shipping_settings method. + # result = client.insert_shipping_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. + # p result + # + def insert_shipping_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_shipping_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_shipping_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_shipping_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shipping_settings_service_stub.call_rpc :insert_shipping_settings, request, 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 ShippingSettingsService API. + # + # This class represents the configuration for ShippingSettingsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_shipping_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_shipping_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_shipping_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 ShippingSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_shipping_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_shipping_settings + ## + # RPC-specific configuration for `insert_shipping_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_shipping_settings + + # @private + def initialize parent_rpcs = nil + get_shipping_settings_config = parent_rpcs.get_shipping_settings if parent_rpcs.respond_to? :get_shipping_settings + @get_shipping_settings = ::Gapic::Config::Method.new get_shipping_settings_config + insert_shipping_settings_config = parent_rpcs.insert_shipping_settings if parent_rpcs.respond_to? :insert_shipping_settings + @insert_shipping_settings = ::Gapic::Config::Method.new insert_shipping_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/credentials.rb new file mode 100644 index 000000000000..9b864efbf96a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_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 Shopping + module Merchant + module Accounts + module V1 + module ShippingSettingsService + # Credentials for the ShippingSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/paths.rb new file mode 100644 index 000000000000..20fefc55698a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/paths.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ShippingSettingsService + # Path helper methods for the ShippingSettingsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified ShippingSettings resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/shippingSettings` + # + # @param account [String] + # + # @return [::String] + def shipping_settings_path account: + "accounts/#{account}/shippingSettings" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest.rb new file mode 100644 index 000000000000..f6bd48787330 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/shipping_settings_service/credentials" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/paths" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to get method call shipping setting information per Merchant API + # method. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new + # + module ShippingSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client.rb new file mode 100644 index 000000000000..7ecab5d3c95b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client.rb @@ -0,0 +1,524 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/shippingsettings_pb" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ShippingSettingsService + module Rest + ## + # REST client for the ShippingSettingsService service. + # + # Service to get method call shipping setting information per Merchant API + # method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :shipping_settings_service_stub + + ## + # Configure the ShippingSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ShippingSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ShippingSettingsService 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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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 + @shipping_settings_service_stub.universe_domain + end + + ## + # Create a new ShippingSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ShippingSettingsService 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 + + @shipping_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @shipping_settings_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 + @shipping_settings_service_stub.logger + end + + # Service calls + + ## + # Retrieve shipping setting information. + # + # @overload get_shipping_settings(request, options = nil) + # Pass arguments to `get_shipping_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_shipping_settings(name: nil) + # Pass arguments to `get_shipping_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the shipping setting to retrieve. + # Format: `accounts/{account}/shippingsettings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new + # + # # Call the get_shipping_settings method. + # result = client.get_shipping_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. + # p result + # + def get_shipping_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_shipping_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_shipping_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_shipping_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shipping_settings_service_stub.get_shipping_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Replace the shipping setting of a business with the request shipping + # setting. Executing this method requires admin access. + # + # @overload insert_shipping_settings(request, options = nil) + # Pass arguments to `insert_shipping_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_shipping_settings(parent: nil, shipping_setting: nil) + # Pass arguments to `insert_shipping_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account for which this shipping setting will be inserted. If + # you are using an advanced account, you must specify the unique identifier + # of the sub-account for which you want to insert the shipping setting. + # Format: `accounts/{ACCOUNT_ID}` + # @param shipping_setting [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings, ::Hash] + # Required. The new version of the account. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new + # + # # Call the insert_shipping_settings method. + # result = client.insert_shipping_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. + # p result + # + def insert_shipping_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_shipping_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_shipping_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_shipping_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shipping_settings_service_stub.insert_shipping_settings request, 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 ShippingSettingsService REST API. + # + # This class represents the configuration for ShippingSettingsService 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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_shipping_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_shipping_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_shipping_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 ShippingSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_shipping_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_shipping_settings + ## + # RPC-specific configuration for `insert_shipping_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_shipping_settings + + # @private + def initialize parent_rpcs = nil + get_shipping_settings_config = parent_rpcs.get_shipping_settings if parent_rpcs.respond_to? :get_shipping_settings + @get_shipping_settings = ::Gapic::Config::Method.new get_shipping_settings_config + insert_shipping_settings_config = parent_rpcs.insert_shipping_settings if parent_rpcs.respond_to? :insert_shipping_settings + @insert_shipping_settings = ::Gapic::Config::Method.new insert_shipping_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..ec5a6f4d1de1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/shippingsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ShippingSettingsService + module Rest + ## + # REST service stub for the ShippingSettingsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_shipping_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # A result object deserialized from the server's reply + def get_shipping_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_shipping_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_shipping_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the insert_shipping_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # A result object deserialized from the server's reply + def insert_shipping_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_shipping_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "insert_shipping_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_shipping_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_shipping_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/shippingSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_shipping_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_shipping_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/shippingSettings:insert", + body: "shipping_setting", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_pb.rb new file mode 100644 index 000000000000..d48a50f10e3d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/shippingsettings.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/shopping/type/types_pb' + + +descriptor_data = "\n;google/shopping/merchant/accounts/v1/shippingsettings.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xc3\x02\n\x10ShippingSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x44\n\x08services\x18\x02 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1.ServiceB\x03\xe0\x41\x01\x12H\n\nwarehouses\x18\x03 \x03(\x0b\x32/.google.shopping.merchant.accounts.v1.WarehouseB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x02:y\xea\x41v\n+merchantapi.googleapis.com/ShippingSettings\x12#accounts/{account}/shippingSettings*\x10shippingSettings2\x10shippingSettings\"\xaf\x10\n\x07Service\x12\x1e\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06\x61\x63tive\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1f\n\x12\x64\x65livery_countries\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12\x1f\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12S\n\rdelivery_time\x18\x05 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1.DeliveryTimeB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12I\n\x0brate_groups\x18\x06 \x03(\x0b\x32/.google.shopping.merchant.accounts.v1.RateGroupB\x03\xe0\x41\x01\x12[\n\rshipment_type\x18\x07 \x01(\x0e\x32:.google.shopping.merchant.accounts.v1.Service.ShipmentTypeB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x42\n\x13minimum_order_value\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12i\n\x19minimum_order_value_table\x18\t \x01(\x0b\x32<.google.shopping.merchant.accounts.v1.MinimumOrderValueTableB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12T\n\x0cstore_config\x18\n \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1.Service.StoreConfigH\x07\x88\x01\x01\x12[\n\x10loyalty_programs\x18\x0b \x03(\x0b\x32<.google.shopping.merchant.accounts.v1.Service.LoyaltyProgramB\x03\xe0\x41\x01\x1a\xd2\x06\n\x0bStoreConfig\x12k\n\x12store_service_type\x18\x01 \x01(\x0e\x32J.google.shopping.merchant.accounts.v1.Service.StoreConfig.StoreServiceTypeH\x00\x88\x01\x01\x12\x18\n\x0bstore_codes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x62\n\rcutoff_config\x18\x03 \x01(\x0b\x32\x46.google.shopping.merchant.accounts.v1.Service.StoreConfig.CutoffConfigH\x01\x88\x01\x01\x12K\n\x0eservice_radius\x18\x04 \x01(\x0b\x32..google.shopping.merchant.accounts.v1.DistanceH\x02\x88\x01\x01\x1a\xf1\x02\n\x0c\x43utoffConfig\x12v\n\x11local_cutoff_time\x18\x01 \x01(\x0b\x32V.google.shopping.merchant.accounts.v1.Service.StoreConfig.CutoffConfig.LocalCutoffTimeH\x00\x88\x01\x01\x12%\n\x18store_close_offset_hours\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12$\n\x17no_delivery_post_cutoff\x18\x03 \x01(\x08H\x02\x88\x01\x01\x1aM\n\x0fLocalCutoffTime\x12\x11\n\x04hour\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x13\n\x06minute\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minuteB\x14\n\x12_local_cutoff_timeB\x1b\n\x19_store_close_offset_hoursB\x1a\n\x18_no_delivery_post_cutoff\"[\n\x10StoreServiceType\x12\"\n\x1eSTORE_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nALL_STORES\x10\x01\x12\x13\n\x0fSELECTED_STORES\x10\x02\x42\x15\n\x13_store_service_typeB\x10\n\x0e_cutoff_configB\x11\n\x0f_service_radius\x1a\xf3\x01\n\x0eLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12t\n\x15loyalty_program_tiers\x18\x02 \x03(\x0b\x32P.google.shopping.merchant.accounts.v1.Service.LoyaltyProgram.LoyaltyProgramTiersB\x03\xe0\x41\x01\x1a=\n\x13LoyaltyProgramTiers\x12\x17\n\ntier_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_tier_labelB\x10\n\x0e_program_label\"e\n\x0cShipmentType\x12\x1d\n\x19SHIPMENT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45LIVERY\x10\x01\x12\x12\n\x0eLOCAL_DELIVERY\x10\x02\x12\x14\n\x10\x43OLLECTION_POINT\x10\x03\x42\x0f\n\r_service_nameB\t\n\x07_activeB\x10\n\x0e_currency_codeB\x10\n\x0e_delivery_timeB\x10\n\x0e_shipment_typeB\x16\n\x14_minimum_order_valueB\x1c\n\x1a_minimum_order_value_tableB\x0f\n\r_store_config\"\xb2\x01\n\x08\x44istance\x12\x12\n\x05value\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x46\n\x04unit\x18\x02 \x01(\x0e\x32\x33.google.shopping.merchant.accounts.v1.Distance.UnitH\x01\x88\x01\x01\"7\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\t\n\x05MILES\x10\x01\x12\x0e\n\nKILOMETERS\x10\x02\x42\x08\n\x06_valueB\x07\n\x05_unit\"\xa4\x03\n\tWarehouse\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12Q\n\x10shipping_address\x18\x02 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.AddressB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12X\n\x0b\x63utoff_time\x18\x03 \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1.WarehouseCutoffTimeB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x1f\n\rhandling_days\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02H\x03\x88\x01\x01\x12Y\n\x13\x62usiness_day_config\x18\x05 \x01(\x0b\x32\x37.google.shopping.merchant.accounts.v1.BusinessDayConfigH\x04\x88\x01\x01\x42\x07\n\x05_nameB\x13\n\x11_shipping_addressB\x0e\n\x0c_cutoff_timeB\x10\n\x0e_handling_daysB\x16\n\x14_business_day_config\"[\n\x13WarehouseCutoffTime\x12\x16\n\x04hour\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06minute\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minute\"\xf7\x01\n\x07\x41\x64\x64ress\x12\x1b\n\x0estreet_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x04\x63ity\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12%\n\x13\x61\x64ministrative_area\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x1d\n\x0bpostal_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\x1d\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02H\x04\x88\x01\x01\x42\x11\n\x0f_street_addressB\x07\n\x05_cityB\x16\n\x14_administrative_areaB\x0e\n\x0c_postal_codeB\x0e\n\x0c_region_code\"\xa1\x06\n\x0c\x44\x65liveryTime\x12\x1d\n\x10min_transit_days\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_transit_days\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12J\n\x0b\x63utoff_time\x18\x03 \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1.CutoffTimeH\x02\x88\x01\x01\x12\x1e\n\x11min_handling_days\x18\x04 \x01(\x05H\x03\x88\x01\x01\x12\x1e\n\x11max_handling_days\x18\x05 \x01(\x05H\x04\x88\x01\x01\x12S\n\x12transit_time_table\x18\x06 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1.TransitTableH\x05\x88\x01\x01\x12\x62\n\x1chandling_business_day_config\x18\x07 \x01(\x0b\x32\x37.google.shopping.merchant.accounts.v1.BusinessDayConfigH\x06\x88\x01\x01\x12\x61\n\x1btransit_business_day_config\x18\x08 \x01(\x0b\x32\x37.google.shopping.merchant.accounts.v1.BusinessDayConfigH\x07\x88\x01\x01\x12m\n\x1ewarehouse_based_delivery_times\x18\t \x03(\x0b\x32@.google.shopping.merchant.accounts.v1.WarehouseBasedDeliveryTimeB\x03\xe0\x41\x01\x42\x13\n\x11_min_transit_daysB\x13\n\x11_max_transit_daysB\x0e\n\x0c_cutoff_timeB\x14\n\x12_min_handling_daysB\x14\n\x12_max_handling_daysB\x15\n\x13_transit_time_tableB\x1f\n\x1d_handling_business_day_configB\x1e\n\x1c_transit_business_day_config\"}\n\nCutoffTime\x12\x16\n\x04hour\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06minute\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1b\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minuteB\x0c\n\n_time_zone\"\xf0\x01\n\x11\x42usinessDayConfig\x12[\n\rbusiness_days\x18\x01 \x03(\x0e\x32?.google.shopping.merchant.accounts.v1.BusinessDayConfig.WeekdayB\x03\xe0\x41\x02\"~\n\x07Weekday\x12\x17\n\x13WEEKDAY_UNSPECIFIED\x10\x00\x12\n\n\x06MONDAY\x10\x01\x12\x0b\n\x07TUESDAY\x10\x02\x12\r\n\tWEDNESDAY\x10\x03\x12\x0c\n\x08THURSDAY\x10\x04\x12\n\n\x06\x46RIDAY\x10\x05\x12\x0c\n\x08SATURDAY\x10\x06\x12\n\n\x06SUNDAY\x10\x07\"\xa5\x01\n\x1aWarehouseBasedDeliveryTime\x12\x19\n\x07\x63\x61rrier\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12!\n\x0f\x63\x61rrier_service\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1b\n\twarehouse\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\n\n\x08_carrierB\x12\n\x10_carrier_serviceB\x0c\n\n_warehouse\"\x97\x03\n\tRateGroup\x12\'\n\x1a\x61pplicable_shipping_labels\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x46\n\x0csingle_value\x18\x02 \x01(\x0b\x32+.google.shopping.merchant.accounts.v1.ValueH\x00\x88\x01\x01\x12\x44\n\nmain_table\x18\x03 \x01(\x0b\x32+.google.shopping.merchant.accounts.v1.TableH\x01\x88\x01\x01\x12\x43\n\tsubtables\x18\x04 \x03(\x0b\x32+.google.shopping.merchant.accounts.v1.TableB\x03\xe0\x41\x01\x12M\n\rcarrier_rates\x18\x05 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1.CarrierRateB\x03\xe0\x41\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x0f\n\r_single_valueB\r\n\x0b_main_tableB\x07\n\x05_name\"\x9e\x02\n\x05Table\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12L\n\x0brow_headers\x18\x02 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.HeadersB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12J\n\x0e\x63olumn_headers\x18\x03 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.HeadersH\x02\x88\x01\x01\x12<\n\x04rows\x18\x04 \x03(\x0b\x32).google.shopping.merchant.accounts.v1.RowB\x03\xe0\x41\x02\x42\x07\n\x05_nameB\x0e\n\x0c_row_headersB\x11\n\x0f_column_headers\"\xa4\x03\n\x0cTransitTable\x12$\n\x17postal_code_group_names\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12 \n\x13transit_time_labels\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12T\n\x04rows\x18\x03 \x03(\x0b\x32\x41.google.shopping.merchant.accounts.v1.TransitTable.TransitTimeRowB\x03\xe0\x41\x02\x1a\xf5\x01\n\x0eTransitTimeRow\x12g\n\x06values\x18\x01 \x03(\x0b\x32R.google.shopping.merchant.accounts.v1.TransitTable.TransitTimeRow.TransitTimeValueB\x03\xe0\x41\x02\x1az\n\x10TransitTimeValue\x12\x1d\n\x10min_transit_days\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_transit_days\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x13\n\x11_min_transit_daysB\x13\n\x11_max_transit_days\"\xfd\x01\n\x16MinimumOrderValueTable\x12w\n\x18store_code_set_with_movs\x18\x01 \x03(\x0b\x32P.google.shopping.merchant.accounts.v1.MinimumOrderValueTable.StoreCodeSetWithMovB\x03\xe0\x41\x02\x1aj\n\x13StoreCodeSetWithMov\x12\x18\n\x0bstore_codes\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12/\n\x05value\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x88\x01\x01\x42\x08\n\x06_value\"\x80\x02\n\x07Headers\x12\x30\n\x06prices\x18\x01 \x03(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02\x12\x32\n\x07weights\x18\x02 \x03(\x0b\x32\x1c.google.shopping.type.WeightB\x03\xe0\x41\x02\x12\x1c\n\x0fnumber_of_items\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12$\n\x17postal_code_group_names\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12K\n\tlocations\x18\x05 \x03(\x0b\x32\x33.google.shopping.merchant.accounts.v1.LocationIdSetB\x03\xe0\x41\x02\"*\n\rLocationIdSet\x12\x19\n\x0clocation_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02\"F\n\x03Row\x12?\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32+.google.shopping.merchant.accounts.v1.ValueB\x03\xe0\x41\x02\"\xf8\x01\n\x05Value\x12\x18\n\x0bno_shipping\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x33\n\tflat_rate\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x01\x88\x01\x01\x12\x1d\n\x10price_percentage\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0c\x63\x61rrier_rate\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08subtable\x18\x05 \x01(\tH\x04\x88\x01\x01\x42\x0e\n\x0c_no_shippingB\x0c\n\n_flat_rateB\x13\n\x11_price_percentageB\x0f\n\r_carrier_rateB\x0b\n\t_subtable\"\xe0\x02\n\x0b\x43\x61rrierRate\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x19\n\x07\x63\x61rrier\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12!\n\x0f\x63\x61rrier_service\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12$\n\x12origin_postal_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\'\n\x15percentage_adjustment\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12>\n\x0f\x66lat_adjustment\x18\x06 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x05\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_carrierB\x12\n\x10_carrier_serviceB\x15\n\x13_origin_postal_codeB\x18\n\x16_percentage_adjustmentB\x12\n\x10_flat_adjustment\"_\n\x1aGetShippingSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ShippingSettings\"\xb2\x01\n\x1dInsertShippingSettingsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12U\n\x10shipping_setting\x18\x02 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.ShippingSettingsB\x03\xe0\x41\x02\x32\xa0\x04\n\x17ShippingSettingsService\x12\xcf\x01\n\x13GetShippingSettings\x12@.google.shopping.merchant.accounts.v1.GetShippingSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.ShippingSettings\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1/{name=accounts/*/shippingSettings}\x12\xe9\x01\n\x16InsertShippingSettings\x12\x43.google.shopping.merchant.accounts.v1.InsertShippingSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.ShippingSettings\"R\x82\xd3\xe4\x93\x02L\"8/accounts/v1/{parent=accounts/*}/shippingSettings:insert:\x10shipping_setting\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x88\x02\n(com.google.shopping.merchant.accounts.v1B\x15ShippingSettingsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ShippingSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ShippingSettings").msgclass + Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service").msgclass + Service::StoreConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.StoreConfig").msgclass + Service::StoreConfig::CutoffConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.StoreConfig.CutoffConfig").msgclass + Service::StoreConfig::CutoffConfig::LocalCutoffTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.StoreConfig.CutoffConfig.LocalCutoffTime").msgclass + Service::StoreConfig::StoreServiceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.StoreConfig.StoreServiceType").enummodule + Service::LoyaltyProgram = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.LoyaltyProgram").msgclass + Service::LoyaltyProgram::LoyaltyProgramTiers = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.LoyaltyProgram.LoyaltyProgramTiers").msgclass + Service::ShipmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.ShipmentType").enummodule + Distance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Distance").msgclass + Distance::Unit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Distance.Unit").enummodule + Warehouse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Warehouse").msgclass + WarehouseCutoffTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.WarehouseCutoffTime").msgclass + Address = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Address").msgclass + DeliveryTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DeliveryTime").msgclass + CutoffTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CutoffTime").msgclass + BusinessDayConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessDayConfig").msgclass + BusinessDayConfig::Weekday = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessDayConfig.Weekday").enummodule + WarehouseBasedDeliveryTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.WarehouseBasedDeliveryTime").msgclass + RateGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.RateGroup").msgclass + Table = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Table").msgclass + TransitTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TransitTable").msgclass + TransitTable::TransitTimeRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TransitTable.TransitTimeRow").msgclass + TransitTable::TransitTimeRow::TransitTimeValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TransitTable.TransitTimeRow.TransitTimeValue").msgclass + MinimumOrderValueTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.MinimumOrderValueTable").msgclass + MinimumOrderValueTable::StoreCodeSetWithMov = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.MinimumOrderValueTable.StoreCodeSetWithMov").msgclass + Headers = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Headers").msgclass + LocationIdSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LocationIdSet").msgclass + Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Row").msgclass + Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Value").msgclass + CarrierRate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CarrierRate").msgclass + GetShippingSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetShippingSettingsRequest").msgclass + InsertShippingSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.InsertShippingSettingsRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_services_pb.rb new file mode 100644 index 000000000000..27a01058a35a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/shippingsettings.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/shippingsettings_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ShippingSettingsService + # Service to get method call shipping setting information per Merchant API + # method. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.ShippingSettingsService' + + # Retrieve shipping setting information. + rpc :GetShippingSettings, ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings + # Replace the shipping setting of a business with the request shipping + # setting. Executing this method requires admin access. + rpc :InsertShippingSettings, ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service.rb new file mode 100644 index 000000000000..55ae739527f4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support `TermsOfServiceAgreementState` API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new + # + module TermsOfServiceAgreementStateService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "terms_of_service_agreement_state_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client.rb new file mode 100644 index 000000000000..ad8702ecded4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client.rb @@ -0,0 +1,580 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceAgreementStateService + ## + # Client for the TermsOfServiceAgreementStateService service. + # + # Service to support `TermsOfServiceAgreementState` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :terms_of_service_agreement_state_service_stub + + ## + # Configure the TermsOfServiceAgreementStateService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TermsOfServiceAgreementStateService clients + # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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 + @terms_of_service_agreement_state_service_stub.universe_domain + end + + ## + # Create a new TermsOfServiceAgreementStateService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TermsOfServiceAgreementStateService 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/shopping/merchant/accounts/v1/termsofserviceagreementstate_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 + + @terms_of_service_agreement_state_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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 + ) + + @terms_of_service_agreement_state_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 + @terms_of_service_agreement_state_service_stub.logger + end + + # Service calls + + ## + # Returns the state of a terms of service agreement. + # + # @overload get_terms_of_service_agreement_state(request, options = nil) + # Pass arguments to `get_terms_of_service_agreement_state` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_terms_of_service_agreement_state(name: nil) + # Pass arguments to `get_terms_of_service_agreement_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the terms of service version. + # Format: `accounts/{account}/termsOfServiceAgreementStates/{identifier}` + # The identifier format is: `{TermsOfServiceKind}-{country}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new + # + # # Call the get_terms_of_service_agreement_state method. + # result = client.get_terms_of_service_agreement_state request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. + # p result + # + def get_terms_of_service_agreement_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_terms_of_service_agreement_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_terms_of_service_agreement_state.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_terms_of_service_agreement_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_agreement_state_service_stub.call_rpc :get_terms_of_service_agreement_state, request, 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 the state of the agreement for the application terms of service. + # + # Application terms of service covers permissions related to the usage of + # data provided through Merchant Center, CSS Center, Manufacturer Center, and + # more. + # + # @overload retrieve_for_application_terms_of_service_agreement_state(request, options = nil) + # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload retrieve_for_application_terms_of_service_agreement_state(parent: nil) + # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account for which to get a TermsOfServiceAgreementState + # Format: `accounts/{account}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new + # + # # Call the retrieve_for_application_terms_of_service_agreement_state method. + # result = client.retrieve_for_application_terms_of_service_agreement_state request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. + # p result + # + def retrieve_for_application_terms_of_service_agreement_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.timeout, + metadata: metadata, + retry_policy: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_agreement_state_service_stub.call_rpc :retrieve_for_application_terms_of_service_agreement_state, request, 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 TermsOfServiceAgreementStateService API. + # + # This class represents the configuration for TermsOfServiceAgreementStateService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_terms_of_service_agreement_state to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 TermsOfServiceAgreementStateService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_terms_of_service_agreement_state` + # @return [::Gapic::Config::Method] + # + attr_reader :get_terms_of_service_agreement_state + ## + # RPC-specific configuration for `retrieve_for_application_terms_of_service_agreement_state` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_for_application_terms_of_service_agreement_state + + # @private + def initialize parent_rpcs = nil + get_terms_of_service_agreement_state_config = parent_rpcs.get_terms_of_service_agreement_state if parent_rpcs.respond_to? :get_terms_of_service_agreement_state + @get_terms_of_service_agreement_state = ::Gapic::Config::Method.new get_terms_of_service_agreement_state_config + retrieve_for_application_terms_of_service_agreement_state_config = parent_rpcs.retrieve_for_application_terms_of_service_agreement_state if parent_rpcs.respond_to? :retrieve_for_application_terms_of_service_agreement_state + @retrieve_for_application_terms_of_service_agreement_state = ::Gapic::Config::Method.new retrieve_for_application_terms_of_service_agreement_state_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials.rb new file mode 100644 index 000000000000..429858db9677 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_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 Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceAgreementStateService + # Credentials for the TermsOfServiceAgreementStateService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths.rb new file mode 100644 index 000000000000..9047b288be94 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_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 Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceAgreementStateService + # Path helper methods for the TermsOfServiceAgreementStateService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified TermsOfServiceAgreementState resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/termsOfServiceAgreementStates/{identifier}` + # + # @param account [String] + # @param identifier [String] + # + # @return [::String] + def terms_of_service_agreement_state_path account:, identifier: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/termsOfServiceAgreementStates/#{identifier}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest.rb new file mode 100644 index 000000000000..6cca99c02938 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support `TermsOfServiceAgreementState` API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new + # + module TermsOfServiceAgreementStateService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/client.rb new file mode 100644 index 000000000000..aef7302ffcc1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceAgreementStateService + module Rest + ## + # REST client for the TermsOfServiceAgreementStateService service. + # + # Service to support `TermsOfServiceAgreementState` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :terms_of_service_agreement_state_service_stub + + ## + # Configure the TermsOfServiceAgreementStateService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TermsOfServiceAgreementStateService clients + # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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 + @terms_of_service_agreement_state_service_stub.universe_domain + end + + ## + # Create a new TermsOfServiceAgreementStateService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TermsOfServiceAgreementStateService 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 + + @terms_of_service_agreement_state_service_stub = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @terms_of_service_agreement_state_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 + @terms_of_service_agreement_state_service_stub.logger + end + + # Service calls + + ## + # Returns the state of a terms of service agreement. + # + # @overload get_terms_of_service_agreement_state(request, options = nil) + # Pass arguments to `get_terms_of_service_agreement_state` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_terms_of_service_agreement_state(name: nil) + # Pass arguments to `get_terms_of_service_agreement_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the terms of service version. + # Format: `accounts/{account}/termsOfServiceAgreementStates/{identifier}` + # The identifier format is: `{TermsOfServiceKind}-{country}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new + # + # # Call the get_terms_of_service_agreement_state method. + # result = client.get_terms_of_service_agreement_state request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. + # p result + # + def get_terms_of_service_agreement_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_terms_of_service_agreement_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_terms_of_service_agreement_state.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_terms_of_service_agreement_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_agreement_state_service_stub.get_terms_of_service_agreement_state request, 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 the state of the agreement for the application terms of service. + # + # Application terms of service covers permissions related to the usage of + # data provided through Merchant Center, CSS Center, Manufacturer Center, and + # more. + # + # @overload retrieve_for_application_terms_of_service_agreement_state(request, options = nil) + # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload retrieve_for_application_terms_of_service_agreement_state(parent: nil) + # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account for which to get a TermsOfServiceAgreementState + # Format: `accounts/{account}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new + # + # # Call the retrieve_for_application_terms_of_service_agreement_state method. + # result = client.retrieve_for_application_terms_of_service_agreement_state request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. + # p result + # + def retrieve_for_application_terms_of_service_agreement_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_agreement_state_service_stub.retrieve_for_application_terms_of_service_agreement_state request, 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 TermsOfServiceAgreementStateService REST API. + # + # This class represents the configuration for TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_terms_of_service_agreement_state to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 TermsOfServiceAgreementStateService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_terms_of_service_agreement_state` + # @return [::Gapic::Config::Method] + # + attr_reader :get_terms_of_service_agreement_state + ## + # RPC-specific configuration for `retrieve_for_application_terms_of_service_agreement_state` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_for_application_terms_of_service_agreement_state + + # @private + def initialize parent_rpcs = nil + get_terms_of_service_agreement_state_config = parent_rpcs.get_terms_of_service_agreement_state if parent_rpcs.respond_to? :get_terms_of_service_agreement_state + @get_terms_of_service_agreement_state = ::Gapic::Config::Method.new get_terms_of_service_agreement_state_config + retrieve_for_application_terms_of_service_agreement_state_config = parent_rpcs.retrieve_for_application_terms_of_service_agreement_state if parent_rpcs.respond_to? :retrieve_for_application_terms_of_service_agreement_state + @retrieve_for_application_terms_of_service_agreement_state = ::Gapic::Config::Method.new retrieve_for_application_terms_of_service_agreement_state_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/service_stub.rb new file mode 100644 index 000000000000..2aa342364908 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceAgreementStateService + module Rest + ## + # REST service stub for the TermsOfServiceAgreementStateService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_terms_of_service_agreement_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # A result object deserialized from the server's reply + def get_terms_of_service_agreement_state request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_terms_of_service_agreement_state_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_terms_of_service_agreement_state", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the retrieve_for_application_terms_of_service_agreement_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # A result object deserialized from the server's reply + def retrieve_for_application_terms_of_service_agreement_state request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_for_application_terms_of_service_agreement_state_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "retrieve_for_application_terms_of_service_agreement_state", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_terms_of_service_agreement_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_terms_of_service_agreement_state_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/termsOfServiceAgreementStates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the retrieve_for_application_terms_of_service_agreement_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_retrieve_for_application_terms_of_service_agreement_state_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/termsOfServiceAgreementStates:retrieveForApplication", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service.rb new file mode 100644 index 000000000000..422b05ba415d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/terms_of_service_service/credentials" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/paths" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/client" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support `TermsOfService` API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/terms_of_service_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new + # + module TermsOfServiceService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "terms_of_service_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/client.rb new file mode 100644 index 000000000000..9247645c44ea --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/client.rb @@ -0,0 +1,671 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/termsofservice_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceService + ## + # Client for the TermsOfServiceService service. + # + # Service to support `TermsOfService` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :terms_of_service_service_stub + + ## + # Configure the TermsOfServiceService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TermsOfServiceService clients + # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TermsOfServiceService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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 + @terms_of_service_service_stub.universe_domain + end + + ## + # Create a new TermsOfServiceService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TermsOfServiceService 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/shopping/merchant/accounts/v1/termsofservice_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 + + @terms_of_service_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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 + ) + + @terms_of_service_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 + @terms_of_service_service_stub.logger + end + + # Service calls + + ## + # Retrieves the `TermsOfService` associated with the provided version. + # + # @overload get_terms_of_service(request, options = nil) + # Pass arguments to `get_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_terms_of_service(name: nil) + # Pass arguments to `get_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new + # + # # Call the get_terms_of_service method. + # result = client.get_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. + # p result + # + def get_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_terms_of_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.call_rpc :get_terms_of_service, request, 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 the latest version of the `TermsOfService` for a given `kind` and + # `region_code`. + # + # @overload retrieve_latest_terms_of_service(request, options = nil) + # Pass arguments to `retrieve_latest_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload retrieve_latest_terms_of_service(region_code: nil, kind: nil) + # Pass arguments to `retrieve_latest_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param region_code [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # @param kind [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceKind] + # Required. The Kind this terms of service version applies to. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new + # + # # Call the retrieve_latest_terms_of_service method. + # result = client.retrieve_latest_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. + # p result + # + def retrieve_latest_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.retrieve_latest_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::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.retrieve_latest_terms_of_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.retrieve_latest_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.call_rpc :retrieve_latest_terms_of_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Accepts a `TermsOfService`. Executing this method requires admin access. + # + # @overload accept_terms_of_service(request, options = nil) + # Pass arguments to `accept_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload accept_terms_of_service(name: nil, account: nil, region_code: nil) + # Pass arguments to `accept_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @param account [::String] + # Required. The account for which to accept the ToS. + # Format: `accounts/{account}` + # @param region_code [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new + # + # # Call the accept_terms_of_service method. + # result = client.accept_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse. + # p result + # + def accept_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.accept_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.accept_terms_of_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.accept_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.call_rpc :accept_terms_of_service, request, 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 TermsOfServiceService API. + # + # This class represents the configuration for TermsOfServiceService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_terms_of_service to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 TermsOfServiceService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_terms_of_service + ## + # RPC-specific configuration for `retrieve_latest_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_latest_terms_of_service + ## + # RPC-specific configuration for `accept_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :accept_terms_of_service + + # @private + def initialize parent_rpcs = nil + get_terms_of_service_config = parent_rpcs.get_terms_of_service if parent_rpcs.respond_to? :get_terms_of_service + @get_terms_of_service = ::Gapic::Config::Method.new get_terms_of_service_config + retrieve_latest_terms_of_service_config = parent_rpcs.retrieve_latest_terms_of_service if parent_rpcs.respond_to? :retrieve_latest_terms_of_service + @retrieve_latest_terms_of_service = ::Gapic::Config::Method.new retrieve_latest_terms_of_service_config + accept_terms_of_service_config = parent_rpcs.accept_terms_of_service if parent_rpcs.respond_to? :accept_terms_of_service + @accept_terms_of_service = ::Gapic::Config::Method.new accept_terms_of_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/credentials.rb new file mode 100644 index 000000000000..b63015a95da6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_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 Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceService + # Credentials for the TermsOfServiceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/paths.rb new file mode 100644 index 000000000000..ec12d7511aed --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/paths.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceService + # Path helper methods for the TermsOfServiceService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified TermsOfService resource string. + # + # The resource will be in the following format: + # + # `termsOfService/{version}` + # + # @param version [String] + # + # @return [::String] + def terms_of_service_path version: + "termsOfService/#{version}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest.rb new file mode 100644 index 000000000000..3c45a6e4de3a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/terms_of_service_service/credentials" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/paths" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support `TermsOfService` API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new + # + module TermsOfServiceService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client.rb new file mode 100644 index 000000000000..ec3484a05430 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client.rb @@ -0,0 +1,615 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/termsofservice_pb" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceService + module Rest + ## + # REST client for the TermsOfServiceService service. + # + # Service to support `TermsOfService` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :terms_of_service_service_stub + + ## + # Configure the TermsOfServiceService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TermsOfServiceService clients + # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TermsOfServiceService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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 + @terms_of_service_service_stub.universe_domain + end + + ## + # Create a new TermsOfServiceService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TermsOfServiceService 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 + + @terms_of_service_service_stub = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @terms_of_service_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 + @terms_of_service_service_stub.logger + end + + # Service calls + + ## + # Retrieves the `TermsOfService` associated with the provided version. + # + # @overload get_terms_of_service(request, options = nil) + # Pass arguments to `get_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_terms_of_service(name: nil) + # Pass arguments to `get_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new + # + # # Call the get_terms_of_service method. + # result = client.get_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. + # p result + # + def get_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_terms_of_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.get_terms_of_service request, 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 the latest version of the `TermsOfService` for a given `kind` and + # `region_code`. + # + # @overload retrieve_latest_terms_of_service(request, options = nil) + # Pass arguments to `retrieve_latest_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload retrieve_latest_terms_of_service(region_code: nil, kind: nil) + # Pass arguments to `retrieve_latest_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param region_code [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # @param kind [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceKind] + # Required. The Kind this terms of service version applies to. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new + # + # # Call the retrieve_latest_terms_of_service method. + # result = client.retrieve_latest_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. + # p result + # + def retrieve_latest_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.retrieve_latest_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.retrieve_latest_terms_of_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.retrieve_latest_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.retrieve_latest_terms_of_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Accepts a `TermsOfService`. Executing this method requires admin access. + # + # @overload accept_terms_of_service(request, options = nil) + # Pass arguments to `accept_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload accept_terms_of_service(name: nil, account: nil, region_code: nil) + # Pass arguments to `accept_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @param account [::String] + # Required. The account for which to accept the ToS. + # Format: `accounts/{account}` + # @param region_code [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new + # + # # Call the accept_terms_of_service method. + # result = client.accept_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse. + # p result + # + def accept_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.accept_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.accept_terms_of_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.accept_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.accept_terms_of_service request, 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 TermsOfServiceService REST API. + # + # This class represents the configuration for TermsOfServiceService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_terms_of_service to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 TermsOfServiceService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_terms_of_service + ## + # RPC-specific configuration for `retrieve_latest_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_latest_terms_of_service + ## + # RPC-specific configuration for `accept_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :accept_terms_of_service + + # @private + def initialize parent_rpcs = nil + get_terms_of_service_config = parent_rpcs.get_terms_of_service if parent_rpcs.respond_to? :get_terms_of_service + @get_terms_of_service = ::Gapic::Config::Method.new get_terms_of_service_config + retrieve_latest_terms_of_service_config = parent_rpcs.retrieve_latest_terms_of_service if parent_rpcs.respond_to? :retrieve_latest_terms_of_service + @retrieve_latest_terms_of_service = ::Gapic::Config::Method.new retrieve_latest_terms_of_service_config + accept_terms_of_service_config = parent_rpcs.accept_terms_of_service if parent_rpcs.respond_to? :accept_terms_of_service + @accept_terms_of_service = ::Gapic::Config::Method.new accept_terms_of_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub.rb new file mode 100644 index 000000000000..bef043b6d879 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/termsofservice_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceService + module Rest + ## + # REST service stub for the TermsOfServiceService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # A result object deserialized from the server's reply + def get_terms_of_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_terms_of_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_terms_of_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the retrieve_latest_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # A result object deserialized from the server's reply + def retrieve_latest_terms_of_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_latest_terms_of_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "retrieve_latest_terms_of_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the accept_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] + # A result object deserialized from the server's reply + def accept_terms_of_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_accept_terms_of_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "accept_terms_of_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_terms_of_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^termsOfService/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the retrieve_latest_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_retrieve_latest_terms_of_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/termsOfService:retrieveLatest", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the accept_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_accept_terms_of_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:accept", + matches: [ + ["name", %r{^termsOfService/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_pb.rb new file mode 100644 index 000000000000..49d8d9549b21 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/termsofservice.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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb' +require 'google/shopping/merchant/accounts/v1/termsofservicekind_pb' + + +descriptor_data = "\n9google/shopping/merchant/accounts/v1/termsofservice.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1aGgoogle/shopping/merchant/accounts/v1/termsofserviceagreementstate.proto\x1a=google/shopping/merchant/accounts/v1/termsofservicekind.proto\"\xae\x02\n\x0eTermsOfService\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x08\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x46\n\x04kind\x18\x03 \x01(\x0e\x32\x38.google.shopping.merchant.accounts.v1.TermsOfServiceKind\x12\x15\n\x08\x66ile_uri\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08\x65xternal\x18\x05 \x01(\x08:H\xea\x41\x45\n)merchantapi.googleapis.com/TermsOfService\x12\x18termsOfService/{version}B\x0b\n\t_file_uri\"[\n\x18GetTermsOfServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\"\x8c\x01\n#RetrieveLatestTermsOfServiceRequest\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x04kind\x18\x02 \x01(\x0e\x32\x38.google.shopping.merchant.accounts.v1.TermsOfServiceKindB\x03\xe0\x41\x02\"\xb5\x01\n\x1b\x41\x63\x63\x65ptTermsOfServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12;\n\x07\x61\x63\x63ount\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x18\n\x0bregion_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x8c\x01\n\x1c\x41\x63\x63\x65ptTermsOfServiceResponse\x12l\n terms_of_service_agreement_state\x18\x01 \x01(\x0b\x32\x42.google.shopping.merchant.accounts.v1.TermsOfServiceAgreementState2\xd3\x05\n\x15TermsOfServiceService\x12\xbe\x01\n\x11GetTermsOfService\x12>.google.shopping.merchant.accounts.v1.GetTermsOfServiceRequest\x1a\x34.google.shopping.merchant.accounts.v1.TermsOfService\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/accounts/v1/{name=termsOfService/*}\x12\xd3\x01\n\x1cRetrieveLatestTermsOfService\x12I.google.shopping.merchant.accounts.v1.RetrieveLatestTermsOfServiceRequest\x1a\x34.google.shopping.merchant.accounts.v1.TermsOfService\"2\x82\xd3\xe4\x93\x02,\x12*/accounts/v1/termsOfService:retrieveLatest\x12\xd9\x01\n\x14\x41\x63\x63\x65ptTermsOfService\x12\x41.google.shopping.merchant.accounts.v1.AcceptTermsOfServiceRequest\x1a\x42.google.shopping.merchant.accounts.v1.AcceptTermsOfServiceResponse\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\"+/accounts/v1/{name=termsOfService/*}:accept\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x86\x02\n(com.google.shopping.merchant.accounts.v1B\x13TermsOfServiceProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + TermsOfService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TermsOfService").msgclass + GetTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetTermsOfServiceRequest").msgclass + RetrieveLatestTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.RetrieveLatestTermsOfServiceRequest").msgclass + AcceptTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AcceptTermsOfServiceRequest").msgclass + AcceptTermsOfServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AcceptTermsOfServiceResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_services_pb.rb new file mode 100644 index 000000000000..8e7dc8d99c55 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_services_pb.rb @@ -0,0 +1,52 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/termsofservice.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/termsofservice_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceService + # Service to support `TermsOfService` API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.TermsOfServiceService' + + # Retrieves the `TermsOfService` associated with the provided version. + rpc :GetTermsOfService, ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::TermsOfService + # Retrieves the latest version of the `TermsOfService` for a given `kind` and + # `region_code`. + rpc :RetrieveLatestTermsOfService, ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::TermsOfService + # Accepts a `TermsOfService`. Executing this method requires admin access. + rpc :AcceptTermsOfService, ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb.rb new file mode 100644 index 000000000000..b5eb6b3d4e38 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/termsofserviceagreementstate.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/shopping/merchant/accounts/v1/termsofservicekind_pb' +require 'google/type/date_pb' + + +descriptor_data = "\nGgoogle/shopping/merchant/accounts/v1/termsofserviceagreementstate.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a=google/shopping/merchant/accounts/v1/termsofservicekind.proto\x1a\x16google/type/date.proto\"\x97\x04\n\x1cTermsOfServiceAgreementState\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x15terms_of_service_kind\x18\x03 \x01(\x0e\x32\x38.google.shopping.merchant.accounts.v1.TermsOfServiceKindB\x03\xe0\x41\x02\x12J\n\x08\x61\x63\x63\x65pted\x18\x04 \x01(\x0b\x32..google.shopping.merchant.accounts.v1.AcceptedB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12J\n\x08required\x18\x05 \x01(\x0b\x32..google.shopping.merchant.accounts.v1.RequiredB\x03\xe0\x41\x01H\x01\x88\x01\x01:\xb9\x01\xea\x41\xb5\x01\n7merchantapi.googleapis.com/TermsOfServiceAgreementState\x12=accounts/{account}/termsOfServiceAgreementStates/{identifier}*\x1dtermsOfServiceAgreementStates2\x1ctermsOfServiceAgreementStateB\x0b\n\t_acceptedB\x0b\n\t_required\"\xda\x01\n\x08\x41\x63\x63\x65pted\x12K\n\x10terms_of_service\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12?\n\x0b\x61\x63\x63\x65pted_by\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x30\n\x0bvalid_until\x18\x03 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0e\n\x0c_valid_until\"r\n\x08Required\x12K\n\x10terms_of_service\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x19\n\x0ctos_file_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\"w\n&GetTermsOfServiceAgreementStateRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7merchantapi.googleapis.com/TermsOfServiceAgreementState\"\x8c\x01\n9RetrieveForApplicationTermsOfServiceAgreementStateRequest\x12O\n\x06parent\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\x12\x37merchantapi.googleapis.com/TermsOfServiceAgreementState2\xb7\x05\n#TermsOfServiceAgreementStateService\x12\x82\x02\n\x1fGetTermsOfServiceAgreementState\x12L.google.shopping.merchant.accounts.v1.GetTermsOfServiceAgreementStateRequest\x1a\x42.google.shopping.merchant.accounts.v1.TermsOfServiceAgreementState\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/accounts/v1/{name=accounts/*/termsOfServiceAgreementStates/*}\x12\xc1\x02\n2RetrieveForApplicationTermsOfServiceAgreementState\x12_.google.shopping.merchant.accounts.v1.RetrieveForApplicationTermsOfServiceAgreementStateRequest\x1a\x42.google.shopping.merchant.accounts.v1.TermsOfServiceAgreementState\"f\xda\x41\x06parent\x82\xd3\xe4\x93\x02W\x12U/accounts/v1/{parent=accounts/*}/termsOfServiceAgreementStates:retrieveForApplication\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x94\x02\n(com.google.shopping.merchant.accounts.v1B!TermsOfServiceAgreementStateProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + TermsOfServiceAgreementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TermsOfServiceAgreementState").msgclass + Accepted = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Accepted").msgclass + Required = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Required").msgclass + GetTermsOfServiceAgreementStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetTermsOfServiceAgreementStateRequest").msgclass + RetrieveForApplicationTermsOfServiceAgreementStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.RetrieveForApplicationTermsOfServiceAgreementStateRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_services_pb.rb new file mode 100644 index 000000000000..5a541ab0f07e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_services_pb.rb @@ -0,0 +1,53 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/termsofserviceagreementstate.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceAgreementStateService + # Service to support `TermsOfServiceAgreementState` API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.TermsOfServiceAgreementStateService' + + # Returns the state of a terms of service agreement. + rpc :GetTermsOfServiceAgreementState, ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest, ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState + # Retrieves the state of the agreement for the application terms of service. + # + # Application terms of service covers permissions related to the usage of + # data provided through Merchant Center, CSS Center, Manufacturer Center, and + # more. + rpc :RetrieveForApplicationTermsOfServiceAgreementState, ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservicekind_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservicekind_pb.rb new file mode 100644 index 000000000000..24e6714b938e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservicekind_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/termsofservicekind.proto + +require 'google/protobuf' + + +descriptor_data = "\n=google/shopping/merchant/accounts/v1/termsofservicekind.proto\x12$google.shopping.merchant.accounts.v1*P\n\x12TermsOfServiceKind\x12%\n!TERMS_OF_SERVICE_KIND_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_CENTER\x10\x01\x42\x8a\x02\n(com.google.shopping.merchant.accounts.v1B\x17TermsOfServiceKindProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + TermsOfServiceKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TermsOfServiceKind").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_pb.rb new file mode 100644 index 000000000000..d68d4789d5b5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/user.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/accounts/v1/accessright_pb' + + +descriptor_data = "\n/google/shopping/merchant/accounts/v1/user.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x36google/shopping/merchant/accounts/v1/accessright.proto\"\xbe\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x44\n\x05state\x18\x02 \x01(\x0e\x32\x30.google.shopping.merchant.accounts.v1.User.StateB\x03\xe0\x41\x03\x12M\n\raccess_rights\x18\x04 \x03(\x0e\x32\x31.google.shopping.merchant.accounts.v1.AccessRightB\x03\xe0\x41\x02\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08VERIFIED\x10\x02:S\xea\x41P\n\x1fmerchantapi.googleapis.com/User\x12 accounts/{account}/users/{email}*\x05users2\x04user\"G\n\x0eGetUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\xa4\x01\n\x11\x43reateUserRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x14\n\x07user_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x04user\x18\x03 \x01(\x0b\x32*.google.shopping.merchant.accounts.v1.UserB\x03\xe0\x41\x01\"J\n\x11\x44\x65leteUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\x88\x01\n\x11UpdateUserRequest\x12=\n\x04user\x18\x01 \x01(\x0b\x32*.google.shopping.merchant.accounts.v1.UserB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x7f\n\x10ListUsersRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\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\x11ListUsersResponse\x12\x39\n\x05users\x18\x01 \x03(\x0b\x32*.google.shopping.merchant.accounts.v1.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x11VerifySelfRequest\x12;\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account2\x8c\t\n\x0bUserService\x12\xa2\x01\n\x07GetUser\x12\x34.google.shopping.merchant.accounts.v1.GetUserRequest\x1a*.google.shopping.merchant.accounts.v1.User\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(\x12&/accounts/v1/{name=accounts/*/users/*}\x12\xbd\x01\n\nCreateUser\x12\x37.google.shopping.merchant.accounts.v1.CreateUserRequest\x1a*.google.shopping.merchant.accounts.v1.User\"J\xda\x41\x13parent,user,user_id\x82\xd3\xe4\x93\x02.\"&/accounts/v1/{parent=accounts/*}/users:\x04user\x12\x94\x01\n\nDeleteUser\x12\x37.google.shopping.merchant.accounts.v1.DeleteUserRequest\x1a\x16.google.protobuf.Empty\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(*&/accounts/v1/{name=accounts/*/users/*}\x12\xbf\x01\n\nUpdateUser\x12\x37.google.shopping.merchant.accounts.v1.UpdateUserRequest\x1a*.google.shopping.merchant.accounts.v1.User\"L\xda\x41\x10user,update_mask\x82\xd3\xe4\x93\x02\x33\x32+/accounts/v1/{user.name=accounts/*/users/*}:\x04user\x12\xb5\x01\n\tListUsers\x12\x36.google.shopping.merchant.accounts.v1.ListUsersRequest\x1a\x37.google.shopping.merchant.accounts.v1.ListUsersResponse\"7\xda\x41\x06parent\x82\xd3\xe4\x93\x02(\x12&/accounts/v1/{parent=accounts/*}/users\x12\xbd\x01\n\nVerifySelf\x12\x37.google.shopping.merchant.accounts.v1.VerifySelfRequest\x1a*.google.shopping.merchant.accounts.v1.User\"J\xda\x41\x07\x61\x63\x63ount\x82\xd3\xe4\x93\x02:25/accounts/v1/{account=accounts/*}/users/me:verifySelf:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xfc\x01\n(com.google.shopping.merchant.accounts.v1B\tUserProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + User = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.User").msgclass + User::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.User.State").enummodule + GetUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetUserRequest").msgclass + CreateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateUserRequest").msgclass + DeleteUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DeleteUserRequest").msgclass + UpdateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateUserRequest").msgclass + ListUsersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListUsersRequest").msgclass + ListUsersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListUsersResponse").msgclass + VerifySelfRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.VerifySelfRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service.rb new file mode 100644 index 000000000000..2406b49d1f08 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/user_service/credentials" +require "google/shopping/merchant/accounts/v1/user_service/paths" +require "google/shopping/merchant/accounts/v1/user_service/client" +require "google/shopping/merchant/accounts/v1/user_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support user API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/user_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/user_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + module UserService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "user_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/user_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/client.rb new file mode 100644 index 000000000000..755a45921f1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/client.rb @@ -0,0 +1,989 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/user_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module UserService + ## + # Client for the UserService service. + # + # Service to support user API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :user_service_stub + + ## + # Configure the UserService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::UserService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all UserService clients + # ::Google::Shopping::Merchant::Accounts::V1::UserService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the UserService 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::Shopping::Merchant::Accounts::V1::UserService::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 + @user_service_stub.universe_domain + end + + ## + # Create a new UserService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the UserService 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/shopping/merchant/accounts/v1/user_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 + + @user_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::UserService::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 + ) + + @user_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 + @user_service_stub.logger + end + + # Service calls + + ## + # Retrieves a Merchant Center account user. + # + # @overload get_user(request, options = nil) + # Pass arguments to `get_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_user(name: nil) + # Pass arguments to `get_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the user to retrieve. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to retrieve the user corresponding to the caller by + # using `me` rather than an email address as in + # `accounts/{account}/users/me`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new + # + # # Call the get_user method. + # result = client.get_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + # p result + # + def get_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :get_user, request, 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 Merchant Center account user. Executing this method requires + # admin access. + # + # @overload create_user(request, options = nil) + # Pass arguments to `create_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_user(parent: nil, user_id: nil, user: nil) + # Pass arguments to `create_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the account for which a user will be + # created. Format: `accounts/{account}` + # @param user_id [::String] + # Required. The email address of the user (for example, + # `john.doe@gmail.com`). + # @param user [::Google::Shopping::Merchant::Accounts::V1::User, ::Hash] + # Optional. The user to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new + # + # # Call the create_user method. + # result = client.create_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + # p result + # + def create_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :create_user, request, 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 Merchant Center account user. Executing this method requires + # admin access. The user to be deleted can't be the last admin user of that + # account. + # + # @overload delete_user(request, options = nil) + # Pass arguments to `delete_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_user(name: nil) + # Pass arguments to `delete_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the user to delete. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to delete the user corresponding to the caller by using + # `me` rather than an email address as in `accounts/{account}/users/me`. + # + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new + # + # # Call the delete_user method. + # result = client.delete_user request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :delete_user, request, 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 Merchant Center account user. Executing this method requires + # admin access. + # + # @overload update_user(request, options = nil) + # Pass arguments to `update_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_user(user: nil, update_mask: nil) + # Pass arguments to `update_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param user [::Google::Shopping::Merchant::Accounts::V1::User, ::Hash] + # Required. The new version of the user. + # + # Use `me` to refer to your own email address, for example + # `accounts/{account}/users/me`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `access_rights` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new + # + # # Call the update_user method. + # result = client.update_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + # p result + # + def update_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest + + # Converts hash and nil to 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_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.user&.name + header_params["user.name"] = request.user.name + end + + request_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_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :update_user, request, 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 users of a Merchant Center account. + # + # @overload list_users(request, options = nil) + # Pass arguments to `list_users` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_users(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_users` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of users. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of users to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @param page_token [::String] + # Optional. A page token, received from a previous `ListUsers` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListUsers` must match + # the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::User>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::User>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.new + # + # # Call the list_users method. + # result = client.list_users request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::User. + # p item + # end + # + def list_users request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_users.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_users.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_users.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :list_users, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @user_service_stub, :list_users, 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 the user that is represented by the caller from pending to + # verified. + # + # @overload verify_self(request, options = nil) + # Pass arguments to `verify_self` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload verify_self(account: nil) + # Pass arguments to `verify_self` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::String] + # Required. The name of the account under which the caller is a user. + # Format: `accounts/{account}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest.new + # + # # Call the verify_self method. + # result = client.verify_self request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + # p result + # + def verify_self request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.verify_self.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account + header_params["account"] = request.account + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.verify_self.timeout, + metadata: metadata, + retry_policy: @config.rpcs.verify_self.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :verify_self, request, 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 UserService API. + # + # This class represents the configuration for UserService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1::UserService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_user to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_user.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_user.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::UserService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 UserService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_user` + # @return [::Gapic::Config::Method] + # + attr_reader :get_user + ## + # RPC-specific configuration for `create_user` + # @return [::Gapic::Config::Method] + # + attr_reader :create_user + ## + # RPC-specific configuration for `delete_user` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_user + ## + # RPC-specific configuration for `update_user` + # @return [::Gapic::Config::Method] + # + attr_reader :update_user + ## + # RPC-specific configuration for `list_users` + # @return [::Gapic::Config::Method] + # + attr_reader :list_users + ## + # RPC-specific configuration for `verify_self` + # @return [::Gapic::Config::Method] + # + attr_reader :verify_self + + # @private + def initialize parent_rpcs = nil + get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user + @get_user = ::Gapic::Config::Method.new get_user_config + create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user + @create_user = ::Gapic::Config::Method.new create_user_config + delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user + @delete_user = ::Gapic::Config::Method.new delete_user_config + update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user + @update_user = ::Gapic::Config::Method.new update_user_config + list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users + @list_users = ::Gapic::Config::Method.new list_users_config + verify_self_config = parent_rpcs.verify_self if parent_rpcs.respond_to? :verify_self + @verify_self = ::Gapic::Config::Method.new verify_self_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/credentials.rb new file mode 100644 index 000000000000..c10c862a695e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_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 Shopping + module Merchant + module Accounts + module V1 + module UserService + # Credentials for the UserService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/paths.rb new file mode 100644 index 000000000000..d39ab1cf7e27 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_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 Shopping + module Merchant + module Accounts + module V1 + module UserService + # Path helper methods for the UserService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified User resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/users/{email}` + # + # @param account [String] + # @param email [String] + # + # @return [::String] + def user_path account:, email: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/users/#{email}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest.rb new file mode 100644 index 000000000000..90b94d47c5c7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/user_service/credentials" +require "google/shopping/merchant/accounts/v1/user_service/paths" +require "google/shopping/merchant/accounts/v1/user_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support user API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/user_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + module UserService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/user_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/client.rb new file mode 100644 index 000000000000..6c7665cbea61 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/client.rb @@ -0,0 +1,904 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1/user_pb" +require "google/shopping/merchant/accounts/v1/user_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module UserService + module Rest + ## + # REST client for the UserService service. + # + # Service to support user API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :user_service_stub + + ## + # Configure the UserService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all UserService clients + # ::Google::Shopping::Merchant::Accounts::V1::UserService::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", "Shopping", "Merchant", "Accounts", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the UserService 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::Shopping::Merchant::Accounts::V1::UserService::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 + @user_service_stub.universe_domain + end + + ## + # Create a new UserService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the UserService 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 + + @user_service_stub = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @user_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 + @user_service_stub.logger + end + + # Service calls + + ## + # Retrieves a Merchant Center account user. + # + # @overload get_user(request, options = nil) + # Pass arguments to `get_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_user(name: nil) + # Pass arguments to `get_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the user to retrieve. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to retrieve the user corresponding to the caller by + # using `me` rather than an email address as in + # `accounts/{account}/users/me`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new + # + # # Call the get_user method. + # result = client.get_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + # p result + # + def get_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.get_user request, 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 Merchant Center account user. Executing this method requires + # admin access. + # + # @overload create_user(request, options = nil) + # Pass arguments to `create_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_user(parent: nil, user_id: nil, user: nil) + # Pass arguments to `create_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the account for which a user will be + # created. Format: `accounts/{account}` + # @param user_id [::String] + # Required. The email address of the user (for example, + # `john.doe@gmail.com`). + # @param user [::Google::Shopping::Merchant::Accounts::V1::User, ::Hash] + # Optional. The user to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new + # + # # Call the create_user method. + # result = client.create_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + # p result + # + def create_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.create_user request, 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 Merchant Center account user. Executing this method requires + # admin access. The user to be deleted can't be the last admin user of that + # account. + # + # @overload delete_user(request, options = nil) + # Pass arguments to `delete_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_user(name: nil) + # Pass arguments to `delete_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the user to delete. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to delete the user corresponding to the caller by using + # `me` rather than an email address as in `accounts/{account}/users/me`. + # @yield [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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new + # + # # Call the delete_user method. + # result = client.delete_user request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.delete_user request, 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 Merchant Center account user. Executing this method requires + # admin access. + # + # @overload update_user(request, options = nil) + # Pass arguments to `update_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_user(user: nil, update_mask: nil) + # Pass arguments to `update_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param user [::Google::Shopping::Merchant::Accounts::V1::User, ::Hash] + # Required. The new version of the user. + # + # Use `me` to refer to your own email address, for example + # `accounts/{account}/users/me`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `access_rights` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new + # + # # Call the update_user method. + # result = client.update_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + # p result + # + def update_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest + + # Converts hash and nil to an 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_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.update_user request, 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 users of a Merchant Center account. + # + # @overload list_users(request, options = nil) + # Pass arguments to `list_users` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_users(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_users` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of users. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of users to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @param page_token [::String] + # Optional. A page token, received from a previous `ListUsers` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListUsers` must match + # the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::User>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::User>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.new + # + # # Call the list_users method. + # result = client.list_users request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::User. + # p item + # end + # + def list_users request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_users.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_users.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_users.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.list_users request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @user_service_stub, :list_users, "users", request, result, 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 user that is represented by the caller from pending to + # verified. + # + # @overload verify_self(request, options = nil) + # Pass arguments to `verify_self` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload verify_self(account: nil) + # Pass arguments to `verify_self` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::String] + # Required. The name of the account under which the caller is a user. + # Format: `accounts/{account}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest.new + # + # # Call the verify_self method. + # result = client.verify_self request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + # p result + # + def verify_self request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.verify_self.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.verify_self.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.verify_self.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.verify_self request, 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 UserService REST API. + # + # This class represents the configuration for UserService 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::Shopping::Merchant::Accounts::V1::UserService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_user to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_user.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_user.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 UserService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_user` + # @return [::Gapic::Config::Method] + # + attr_reader :get_user + ## + # RPC-specific configuration for `create_user` + # @return [::Gapic::Config::Method] + # + attr_reader :create_user + ## + # RPC-specific configuration for `delete_user` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_user + ## + # RPC-specific configuration for `update_user` + # @return [::Gapic::Config::Method] + # + attr_reader :update_user + ## + # RPC-specific configuration for `list_users` + # @return [::Gapic::Config::Method] + # + attr_reader :list_users + ## + # RPC-specific configuration for `verify_self` + # @return [::Gapic::Config::Method] + # + attr_reader :verify_self + + # @private + def initialize parent_rpcs = nil + get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user + @get_user = ::Gapic::Config::Method.new get_user_config + create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user + @create_user = ::Gapic::Config::Method.new create_user_config + delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user + @delete_user = ::Gapic::Config::Method.new delete_user_config + update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user + @update_user = ::Gapic::Config::Method.new update_user_config + list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users + @list_users = ::Gapic::Config::Method.new list_users_config + verify_self_config = parent_rpcs.verify_self if parent_rpcs.respond_to? :verify_self + @verify_self = ::Gapic::Config::Method.new verify_self_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/service_stub.rb new file mode 100644 index 000000000000..62e46437fc31 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/service_stub.rb @@ -0,0 +1,452 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1/user_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module UserService + module Rest + ## + # REST service stub for the UserService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetUserRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # A result object deserialized from the server's reply + def get_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_user_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_user", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::User.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # A result object deserialized from the server's reply + def create_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_user_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_user", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::User.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_user_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_user", + 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 update_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # A result object deserialized from the server's reply + def update_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_user_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_user", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::User.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_users REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse] + # A result object deserialized from the server's reply + def list_users request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_users_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_users", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the verify_self REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # A result object deserialized from the server's reply + def verify_self request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_verify_self_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "verify_self", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::User.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetUserRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/users", + body: "user", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest] + # 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_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{user.name}", + body: "user", + matches: [ + ["user.name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_users REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_users_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/users", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the verify_self REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_verify_self_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{account}/users/me:verifySelf", + body: "*", + matches: [ + ["account", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_services_pb.rb new file mode 100644 index 000000000000..7b9892454aa4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/user.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/accounts/v1/user_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module UserService + # Service to support user API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.UserService' + + # Retrieves a Merchant Center account user. + rpc :GetUser, ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest, ::Google::Shopping::Merchant::Accounts::V1::User + # Creates a Merchant Center account user. Executing this method requires + # admin access. + rpc :CreateUser, ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest, ::Google::Shopping::Merchant::Accounts::V1::User + # Deletes a Merchant Center account user. Executing this method requires + # admin access. The user to be deleted can't be the last admin user of that + # account. + rpc :DeleteUser, ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest, ::Google::Protobuf::Empty + # Updates a Merchant Center account user. Executing this method requires + # admin access. + rpc :UpdateUser, ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest, ::Google::Shopping::Merchant::Accounts::V1::User + # Lists all users of a Merchant Center account. + rpc :ListUsers, ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest, ::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse + # Updates the user that is represented by the caller from pending to + # verified. + rpc :VerifySelf, ::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest, ::Google::Shopping::Merchant::Accounts::V1::User + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/verificationmailsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/verificationmailsettings_pb.rb new file mode 100644 index 000000000000..09f17261f63c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/verificationmailsettings_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/verificationmailsettings.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\nCgoogle/shopping/merchant/accounts/v1/verificationmailsettings.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1fgoogle/api/field_behavior.proto\"\x90\x02\n\x18VerificationMailSettings\x12x\n\x16verification_mail_mode\x18\x01 \x01(\x0e\x32S.google.shopping.merchant.accounts.v1.VerificationMailSettings.VerificationMailModeB\x03\xe0\x41\x01\"z\n\x14VerificationMailMode\x12&\n\"VERIFICATION_MAIL_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SEND_VERIFICATION_MAIL\x10\x01\x12\x1e\n\x1aSUPPRESS_VERIFICATION_MAIL\x10\x02\x42\x90\x02\n(com.google.shopping.merchant.accounts.v1B\x1dVerificationMailSettingsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1 + VerificationMailSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.VerificationMailSettings").msgclass + VerificationMailSettings::VerificationMailMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.VerificationMailSettings.VerificationMailMode").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb new file mode 100644 index 000000000000..dec30c28b651 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/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 Shopping + module Merchant + module Accounts + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant 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-shopping-merchant-accounts-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accessright.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accessright.rb new file mode 100644 index 000000000000..3efe85ec310d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accessright.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # The access right defines the level of permission a + # user has within a Merchant Center account. + module AccessRight + # Default value. This value is unused. + ACCESS_RIGHT_UNSPECIFIED = 0 + + # Standard access rights. + STANDARD = 1 + + # Has access to the same read-only methods as STANDARD, but no access to + # any mutating methods. + READ_ONLY = 4 + + # Admin access rights. + ADMIN = 2 + + # Users with this right have access to performance and insights. + PERFORMANCE_REPORTING = 3 + + # Users with this right have access to Merchant API and its notifications. + # This role is only accessible to accounts that have a developer + # registration. + API_DEVELOPER = 5 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountissue.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountissue.rb new file mode 100644 index 000000000000..abd406a034ba --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountissue.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 Shopping + module Merchant + module Accounts + module V1 + # Issues with your Merchant Center account that can impact all your products. + # For more information, see [Account-level issues in Merchant + # Center](https://support.google.com/merchants/answer/12153802?sjid=17798438912526418908-EU#account). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the account issue. + # Format: `accounts/{account}/issues/{id}`. For example, + # `accounts/123456/issues/misrepresentation-of-self-or-products-unacceptable-business-practice-policy`. + # @!attribute [rw] title + # @return [::String] + # The localized title of the issue. + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountIssue::Severity] + # The overall severity of the issue. + # @!attribute [rw] impacted_destinations + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccountIssue::ImpactedDestination>] + # The impact this issue has on various destinations. + # @!attribute [rw] detail + # @return [::String] + # Further localized details about the issue. + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to Merchant Center Help Center providing further information about the + # issue and how to fix it. + class AccountIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The impact of the issue on a destination. + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # The impacted reporting context. + # @!attribute [rw] impacts + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccountIssue::ImpactedDestination::Impact>] + # The (negative) impact for various regions on the given destination. + class ImpactedDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The impact of the issue on a region. + # @!attribute [rw] region_code + # @return [::String] + # The [CLDR region code](https://cldr.unicode.org/) where this issue + # applies. + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountIssue::Severity] + # The severity of the issue on the destination and region. + class Impact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # All possible issue severities. + module Severity + # The severity is unknown. + SEVERITY_UNSPECIFIED = 0 + + # The issue causes offers to not serve. + CRITICAL = 1 + + # The issue might affect offers (in the future) or might be an + # indicator of issues with offers. + ERROR = 2 + + # The issue is a suggestion for improvement. + SUGGESTION = 3 + end + end + + # Request message for the `ListAccountIssues` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of issues. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of issues to return. The service may return + # fewer than this value. If unspecified, at most 50 issues will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListAccountIssues` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountIssues` must + # match the call that provided the page token. + # @!attribute [rw] language_code + # @return [::String] + # Optional. The issues in the response will have human-readable fields in the + # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), + # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be + # used. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in human-readable fields. For example 'America/Los_Angeles'. + # If not set, 'America/Los_Angeles' will be used. + class ListAccountIssuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListAccountIssues` method. + # @!attribute [rw] account_issues + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccountIssue>] + # The issues from the specified account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListAccountIssuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountrelationships.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountrelationships.rb new file mode 100644 index 000000000000..d5227510fa2a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountrelationships.rb @@ -0,0 +1,124 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # The `AccountRelationship` message defines a formal connection between a + # merchant's account and a service provider's account. This relationship + # enables the provider to offer specific services to the business, such as + # product management or campaign management. It specifies the access rights + # and permissions to the business's data relevant to those services. + # + # Establishing an account relationship involves linking the merchant's account + # with a provider's account. The provider could be another Google account (like + # Google Ads or Google My Business) or a third-party platform (such as Shopify + # or WooCommerce). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the account relationship. + # Format: `accounts/{account}/relationships/{relationship}`. For example, + # `accounts/123456/relationships/567890`. + # @!attribute [rw] provider + # @return [::String] + # Immutable. The provider of the service. Either the reference to an account + # such as `providers/123` or a well-known service provider (one of + # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). + # @!attribute [r] provider_display_name + # @return [::String] + # Output only. The human-readable display name of the provider account. + # @!attribute [rw] account_id_alias + # @return [::String] + # Optional. An optional alias you can assign to this account relationship. + # This alias acts as a convenient identifier for your own reference and + # management. It must be unique among all your account relationships with the + # same provider. + # + # For example, you might use `account_id_alias` to assign a friendly name + # to this relationship for easier identification in your systems. + class AccountRelationship + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get an account relationship. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the account relationship to get. + # Format: `accounts/{account}/relationships/{relationship}`. For example, + # `accounts/123456/relationships/567890`. + class GetAccountRelationshipRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateAccountRelationship` method. + # @!attribute [rw] account_relationship + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # Required. The new version of the account relationship. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `account_id_alias` + class UpdateAccountRelationshipRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list account relationships. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent account of the account relationship to filter by. + # Format: `accounts/{account}` + # @!attribute [rw] page_token + # @return [::String] + # Optional. The token returned by the previous `list` request. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of elements to return in the response. Use for + # paging. If no `page_size` is specified, `100` is used as the default value. + # The maximum allowed value is `1000`. + class ListAccountRelationshipsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response after trying to list account relationships. + # @!attribute [rw] account_relationships + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccountRelationship>] + # The account relationships that match your filter. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token. You can send the `page_token` to get the next page. + # Only included in the `list` response if there are more pages. + class ListAccountRelationshipsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accounts.rb new file mode 100644 index 000000000000..31fe70fbf2ed --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accounts.rb @@ -0,0 +1,337 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # The `Account` message represents a business's account within Shopping + # Ads. It's the primary entity for managing product data, settings, and + # interactions with Google's services and external providers. + # + # Accounts can operate as standalone entities or be part of a advanced account + # structure. In an advanced account setup the parent account manages multiple + # sub-accounts. + # + # Establishing an account involves configuring attributes like the account + # name, time zone, and language preferences. + # + # The `Account` message is the parent entity for many other resources, for + # example, `AccountRelationship`, `Homepage`, `BusinessInfo` and so on. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the account. + # Format: `accounts/{account}` + # @!attribute [r] account_id + # @return [::Integer] + # Output only. The ID of the account. + # @!attribute [rw] account_name + # @return [::String] + # Required. A human-readable name of the account. Don't use punctuation, + # capitalization, or non-alphanumeric symbols such as the "/" or "_" symbols. + # See + # [Adding a business + # name](https://support.google.com/merchants/answer/12159159) for more + # information. + # @!attribute [rw] adult_content + # @return [::Boolean] + # Optional. Whether this account contains adult content. + # @!attribute [r] test_account + # @return [::Boolean] + # Output only. Whether this is a test account. + # @!attribute [rw] time_zone + # @return [::Google::Type::TimeZone] + # Required. The time zone of the account. + # + # On writes, `time_zone` sets both the `reporting_time_zone` and the + # `display_time_zone`. + # + # For reads, `time_zone` always returns the `display_time_zone`. If + # `display_time_zone` doesn't exist for your account, `time_zone` is empty. + # + # The `version` field is not supported, won't be set in responses and will be + # silently ignored if specified in requests. + # @!attribute [rw] language_code + # @return [::String] + # Required. The account's [BCP-47 language + # code](https://tools.ietf.org/html/bcp47), such as `en-US` or `sr-Latn`. + class Account + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetAccount` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the account to retrieve. + # Format: `accounts/{account}` + class GetAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateAndConfigureAccount` method. + # @!attribute [rw] account + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # Required. The account to be created. + # @!attribute [rw] user + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddUser>] + # Optional. Users to be added to the account. + # @!attribute [rw] service + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddAccountService>] + # Required. An account service between the account to be created and the + # provider account is initialized as part of the creation. At least one such + # service needs to be provided. Currently exactly one of these needs to be + # `account_aggregation` and `accounts.createAndConfigure` method can be + # used to create a sub-account under an existing advanced account through + # this method. Additional `account_management` or + # `products_management` services may be provided. + # @!attribute [rw] set_alias + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::SetAliasForRelationship>] + # Optional. If a relationship is created with a provider, you can set an + # alias for it with this field. The calling user must be an admin on the + # provider to be able to set an alias. + class CreateAndConfigureAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Instruction for adding a user to the account during creation. + # @!attribute [rw] user_id + # @return [::String] + # Required. The email address of the user (for example, + # `john.doe@gmail.com`). + # @!attribute [rw] user + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # Optional. Details about the user to be added. At the moment, only access + # rights may be specified. + # @!attribute [rw] verification_mail_settings + # @return [::Google::Shopping::Merchant::Accounts::V1::VerificationMailSettings] + # Optional. Settings related to configuring the verification email that is + # sent after adding a user. + class AddUser + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Additional instructions to add account services during creation of the + # account. + # @!attribute [rw] account_aggregation + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountAggregation] + # The provider is an + # [aggregator](https://support.google.com/merchants/answer/188487) for + # the account. Payload for service type Account Aggregation. + # + # Note: The following fields are mutually exclusive: `account_aggregation`, `account_management`, `comparison_shopping`, `products_management`, `campaigns_management`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] account_management + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountManagement] + # The provider manages this account. Payload for service type Account + # Management. + # + # Note: The following fields are mutually exclusive: `account_management`, `account_aggregation`, `comparison_shopping`, `products_management`, `campaigns_management`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] comparison_shopping + # @return [::Google::Shopping::Merchant::Accounts::V1::ComparisonShopping] + # The provider is a CSS (Comparison Shopping Service) of this account. + # Payload for service type Comparison Shopping. + # + # Note: The following fields are mutually exclusive: `comparison_shopping`, `account_aggregation`, `account_management`, `products_management`, `campaigns_management`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] products_management + # @return [::Google::Shopping::Merchant::Accounts::V1::ProductsManagement] + # The provider manages products for this account. Payload for service + # type products management. + # + # Note: The following fields are mutually exclusive: `products_management`, `account_aggregation`, `account_management`, `comparison_shopping`, `campaigns_management`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] campaigns_management + # @return [::Google::Shopping::Merchant::Accounts::V1::CampaignsManagement] + # The provider manages campaigns for this account. Payload for service + # type campaigns management. + # + # Note: The following fields are mutually exclusive: `campaigns_management`, `account_aggregation`, `account_management`, `comparison_shopping`, `products_management`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] provider + # @return [::String] + # Required. The provider of the service. Either the reference to an account + # such as `providers/123` or a well-known service provider (one of + # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). + # @!attribute [rw] external_account_id + # @return [::String] + # Immutable. An optional, immutable identifier that Google uses to refer to + # this account when communicating with the provider. This should be the + # unique account ID within the provider's system (for example, your shop ID + # in Shopify). + # + # If you have multiple accounts with the same provider - for instance, + # different accounts for various regions — the `external_account_id` + # differentiates between them, ensuring accurate linking and integration + # between Google and the provider. + # + # The external account ID must be specified for the campaigns management + # service type. + # + # The external account ID must not be specified for the account aggregation + # service type. + # + # The external account ID is optional / may be specified for all other + # service types. + class AddAccountService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Set an alias for a relationship between a provider and the account to + # be created. + # @!attribute [rw] provider + # @return [::String] + # Required. The provider of the service. This is a reference to an account + # such as `providers/123` or `accounts/123`. The same provider must be + # specified in at least one of the `service` fields. + # @!attribute [rw] account_id_alias + # @return [::String] + # Required. The unique ID of this account in the provider's system. + # The value must be unique across all accounts on the platform for this + # provider. + class SetAliasForRelationship + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for the CreateTestAccount RPC + # @!attribute [rw] parent + # @return [::String] + # Required. The account resource name to create the test account under. + # Format: accounts/\\{account} + # @!attribute [rw] account + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # Required. The account to be created. + class CreateTestAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteAccount` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the account to delete. + # Format: `accounts/{account}` + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to `true`, the account is deleted even if it provides + # services to other accounts or has processed offers. + class DeleteAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateAccount` method. + # @!attribute [rw] account + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # Required. The new version of the account. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `account_name` + # - `adult_content` + # - `language_code` + # - `time_zone` + class UpdateAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `accounts.list` method. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `accounts.list` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided in the `accounts.list` + # request must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Returns only accounts that match the + # [filter](https://developers.google.com/merchant/api/guides/accounts/filter). + # For more details, see the + # [filter syntax + # reference](https://developers.google.com/merchant/api/guides/accounts/filter-syntax). + class ListAccountsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `accounts.list` method. + # @!attribute [rw] accounts + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Account>] + # The accounts matching the `ListAccountsRequest`. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListAccountsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListSubAccounts` method. + # @!attribute [rw] provider + # @return [::String] + # Required. The aggregation service provider. + # Format: `accounts/{accountId}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `accounts.list` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided in the `accounts.list` + # request must match the call that provided the page token. + class ListSubAccountsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListSubAccounts` method. + # @!attribute [rw] accounts + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Account>] + # The accounts for which the given parent account is an aggregator. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListSubAccountsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountservices.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountservices.rb new file mode 100644 index 000000000000..525817035c5e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountservices.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! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # The `AccountService` message represents a specific service that a provider + # account offers to a Merchant Center account. + # + # `AccountService` defines the permissions and capabilities granted to the + # provider, allowing for operations such as product management or campaign + # management. + # + # The lifecycle of an `AccountService` involves a proposal phase, where one + # party suggests the service, and an approval phase, where the other party + # accepts or rejects it. This handshake mechanism ensures mutual consent before + # any access is granted. This mechanism safeguards both parties by ensuring + # that access rights are granted appropriately and that both the business and + # provider are aware of the services enabled. In scenarios where a user is an + # admin of both accounts, the approval can happen automatically. + # + # The mutability of a service is also managed through `AccountService`. Some + # services might be immutable, for example, if they were established through + # other systems or APIs, and you cannot alter them through this API. + # @!attribute [rw] products_management + # @return [::Google::Shopping::Merchant::Accounts::V1::ProductsManagement] + # Service type for managing products. This allows the provider to handle + # product data on behalf of the business, including reading and writing + # product listings. It's commonly used when the provider offers inventory + # management or catalog synchronization services to keep the business's + # product information up-to-date across platforms. + # + # Note: The following fields are mutually exclusive: `products_management`, `campaigns_management`, `account_management`, `account_aggregation`, `local_listing_management`, `comparison_shopping`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] campaigns_management + # @return [::Google::Shopping::Merchant::Accounts::V1::CampaignsManagement] + # Service type for managing advertising campaigns. Grants the provider + # access to create and manage the business's ad campaigns, including + # setting up campaigns, adjusting bids, and optimizing performance. + # + # Note: The following fields are mutually exclusive: `campaigns_management`, `products_management`, `account_management`, `account_aggregation`, `local_listing_management`, `comparison_shopping`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] account_management + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountManagement] + # Service type for account management. Enables the provider to perform + # administrative actions on the business's account, such as + # configuring account settings, managing users, or updating business + # information. + # + # Note: The following fields are mutually exclusive: `account_management`, `products_management`, `campaigns_management`, `account_aggregation`, `local_listing_management`, `comparison_shopping`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] account_aggregation + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountAggregation] + # Service type for account aggregation. This enables the provider, which is + # an advanced account, to manage multiple sub-accounts (client + # accounts). Through this service, the advanced account provider can + # perform administrative and operational tasks across all linked + # sub-accounts. + # + # This is useful for agencies, aggregators, or large retailers that need + # centralized control over many Merchant Center accounts. + # + # Note: The following fields are mutually exclusive: `account_aggregation`, `products_management`, `campaigns_management`, `account_management`, `local_listing_management`, `comparison_shopping`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] local_listing_management + # @return [::Google::Shopping::Merchant::Accounts::V1::LocalListingManagement] + # Service type for local listings management. The business group associated + # with the external account id will be used to provide local inventory to + # this Merchant Center account. + # + # Note: The following fields are mutually exclusive: `local_listing_management`, `products_management`, `campaigns_management`, `account_management`, `account_aggregation`, `comparison_shopping`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] comparison_shopping + # @return [::Google::Shopping::Merchant::Accounts::V1::ComparisonShopping] + # Service type for comparison shopping. The provider is a CSS (Comparison + # Shopping Service) managing the account. See + # https://support.google.com/merchants/answer/12653197 + # + # Note: The following fields are mutually exclusive: `comparison_shopping`, `products_management`, `campaigns_management`, `account_management`, `account_aggregation`, `local_listing_management`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the account service. + # Format: `accounts/{account}/services/{service}` + # @!attribute [r] provider + # @return [::String] + # Output only. The provider of the service. Either the reference to an + # account such as `providers/123` or a well-known service provider (one of + # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). + # @!attribute [r] provider_display_name + # @return [::String] + # Output only. The human-readable display name of the provider account. + # @!attribute [r] handshake + # @return [::Google::Shopping::Merchant::Accounts::V1::Handshake] + # Output only. Information about the state of the service in terms of + # establishing it (e.g. is it pending approval or approved). + # @!attribute [r] mutability + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService::Mutability] + # Output only. Whether the service is mutable (e.g. through Approve / Reject + # RPCs). A service that was created through another system or API might be + # immutable. + # @!attribute [rw] external_account_id + # @return [::String] + # Immutable. An optional, immutable identifier that Google uses to refer to + # this account when communicating with the provider. This should be the + # unique account ID within the provider's system (for example, your shop ID + # in Shopify). + # + # If you have multiple accounts with the same provider - for instance, + # different accounts for various regions — the `external_account_id` + # differentiates between them, ensuring accurate linking and integration + # between Google and the provider. + class AccountService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of mutability option settings a service can have. + module Mutability + # Unused default value + MUTABILITY_UNSPECIFIED = 0 + + # The service can be mutated without restrictions. + MUTABLE = 1 + + # The service is read-only and must not be mutated. + IMMUTABLE = 2 + end + end + + # Request to get an account service. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the account service to get. + # Format: `accounts/{account}/services/{service}` + class GetAccountServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list account services. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent account of the account service to filter by. + # Format: `accounts/{account}` + # @!attribute [rw] page_token + # @return [::String] + # Optional. The token returned by the previous `list` request. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of elements to return in the response. Use for + # paging. If no `page_size` is specified, `100` is used as the default value. + # The maximum allowed value is `1000`. + class ListAccountServicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response after trying to list account services. + # @!attribute [rw] account_services + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccountService>] + # The account services that match your filter. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token. You can send the `page_token` to get the next page. + # Only included in the `list` response if there are more pages. + class ListAccountServicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to propose an account service. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent account for the service. + # Format: `accounts/{account}` + # @!attribute [rw] provider + # @return [::String] + # Required. The provider of the service. Either the reference to an account + # such as `providers/123` or a well-known service provider (one of + # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). + # @!attribute [rw] account_service + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # Required. The account service to propose. + class ProposeAccountServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to approve an account service. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the account service to approve. + # Format: `accounts/{account}/services/{service}` + class ApproveAccountServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to reject an account service. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the account service to reject. + # Format: `accounts/{account}/services/{service}` + class RejectAccountServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ProductsManagement` payload. + class ProductsManagement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `CampaignManagement` payload. + class CampaignsManagement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `AccountManagement` payload. + class AccountManagement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `AccountAggregation` payload. + class AccountAggregation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `LocalListingManagement` payload. + class LocalListingManagement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ComparisonShopping` payload. + class ComparisonShopping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The current status of establishing of the service. + # (for example, pending approval or approved). + # @!attribute [r] approval_state + # @return [::Google::Shopping::Merchant::Accounts::V1::Handshake::ApprovalState] + # Output only. The approval state of this handshake. + # @!attribute [r] actor + # @return [::Google::Shopping::Merchant::Accounts::V1::Handshake::Actor] + # Output only. The most recent account to modify the account service's + # `approval_status`. + class Handshake + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The approal state of a handshake. + module ApprovalState + # Unspecified approval status. + APPROVAL_STATE_UNSPECIFIED = 0 + + # The service was proposed and is waiting to be confirmed. + PENDING = 1 + + # Both parties have confirmed the service. + ESTABLISHED = 2 + + # The service proposal was rejected. + REJECTED = 3 + end + + # The various actors that can be involved in a handshake. + module Actor + # Unspecified actor. + ACTOR_UNSPECIFIED = 0 + + # The last change was done by the account who has this service. + ACCOUNT = 1 + + # The last change was done by the other party who this service points to. + OTHER_PARTY = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/autofeedsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/autofeedsettings.rb new file mode 100644 index 000000000000..021b8510b837 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/autofeedsettings.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 Shopping + module Merchant + module Accounts + module V1 + # Collection of information related to the + # [autofeed](https://support.google.com/merchants/answer/7538732) settings. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the autofeed settings. + # Format: `accounts/{account}/autofeedSettings`. + # @!attribute [rw] enable_products + # @return [::Boolean] + # Required. Enables or disables product crawling through the autofeed for the + # given account. Autofeed accounts must meet [certain + # conditions](https://support.google.com/merchants/answer/7538732#Configure_automated_feeds_Standard_Experience), + # which can be checked through the `eligible` field. + # The account must **not** be a marketplace. + # When the autofeed is enabled for the first time, the products usually + # appear instantly. When re-enabling, it might take up to 24 hours for + # products to appear. + # @!attribute [r] eligible + # @return [::Boolean] + # Output only. Determines whether the business is eligible for being enrolled + # into an autofeed. + class AutofeedSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetAutofeedSettings` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the autofeed settings. + # Format: `accounts/{account}/autofeedSettings` + class GetAutofeedSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateAutofeedSettings` method. + # @!attribute [rw] autofeed_settings + # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # Required. The new version of the autofeed setting. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateAutofeedSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/automaticimprovements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/automaticimprovements.rb new file mode 100644 index 000000000000..18047a5292cd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/automaticimprovements.rb @@ -0,0 +1,235 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # Collection of information related to the [automatic + # improvements](https://developers.google.com/shopping-content/guides/automatic-improvements) + # of an account. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the automatic improvements. + # Format: `accounts/{account}/automaticImprovements`. + # @!attribute [rw] item_updates + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticItemUpdates] + # Turning on [item + # updates](https://support.google.com/merchants/answer/3246284) allows + # Google to automatically update items for you. When item updates are on, + # Google uses the structured data markup on the website and advanced data + # extractors to update the price and availability of the items. When the item + # updates are off, items with mismatched data aren't shown. + # This field is only updated (cleared) if provided in the update mask. + # @!attribute [rw] image_improvements + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImageImprovements] + # This improvement will attempt to automatically correct submitted images if + # they don't meet the [image + # requirements](https://support.google.com/merchants/answer/6324350), for + # example, removing overlays. If successful, the image will be replaced and + # approved. This improvement is only applied to images of disapproved offers. + # For more information see: [Automatic image + # improvements](https://support.google.com/merchants/answer/9242973) + # This field is only updated (cleared) if provided in the update mask. + # @!attribute [rw] shipping_improvements + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticShippingImprovements] + # Not available for [advanced + # accounts](https://support.google.com/merchants/answer/188487). By turning + # on [automatic shipping + # improvements](https://support.google.com/merchants/answer/10027038), you + # are allowing Google to improve the accuracy of your delivery times shown to + # shoppers using Google. More accurate delivery times, especially when + # faster, typically lead to better conversion rates. Google will improve your + # estimated delivery times based on various factors: + # * Delivery address of an order + # * Current handling time and shipping time settings + # * Estimated weekdays or business days + # * Parcel tracking data + # This field is only updated (cleared) if provided in the update mask. + class AutomaticImprovements + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Turning on [item + # updates](https://support.google.com/merchants/answer/3246284) allows + # Google to automatically update items for you. When item updates are on, + # Google uses the structured data markup on the website and advanced data + # extractors to update the price and availability of the items. When the item + # updates are off, items with mismatched data aren't shown. + # @!attribute [rw] account_item_updates_settings + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticItemUpdates::ItemUpdatesAccountLevelSettings] + # Optional. Determines which attributes of the items should be automatically + # updated. If this field is not present and provided in the update mask, then + # the settings will be deleted. If there are no settings for subaccount, they + # are inherited from aggregator. + # @!attribute [r] effective_allow_price_updates + # @return [::Boolean] + # Output only. The effective value of allow_price_updates. + # If account_item_updates_settings is present, then this value is the same. + # Otherwise, it represents the inherited value of the parent account. + # The default value is true if no settings are present. + # Read-only. + # @!attribute [r] effective_allow_availability_updates + # @return [::Boolean] + # Output only. The effective value of allow_availability_updates. + # If account_item_updates_settings is present, then this value is the same. + # Otherwise, it represents the inherited value of the parent account. + # The default value is true if no settings are present. + # Read-only. + # @!attribute [r] effective_allow_strict_availability_updates + # @return [::Boolean] + # Output only. The effective value of + # allow_strict_availability_updates. + # If account_item_updates_settings is present, then this value is the same. + # Otherwise, it represents the inherited value of the parent account. + # The default value is true if no settings are present. + # Read-only. + # @!attribute [r] effective_allow_condition_updates + # @return [::Boolean] + # Output only. The effective value of allow_condition_updates. + # If account_item_updates_settings is present, then this value is the same. + # Otherwise, it represents the inherited value of the parent account. + # The default value is true if no settings are present. + # Read-only. + class AutomaticItemUpdates + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Settings for the Automatic Item Updates. + # @!attribute [rw] allow_price_updates + # @return [::Boolean] + # If price updates are enabled, Google always updates the active price with + # the crawled information. + # @!attribute [rw] allow_availability_updates + # @return [::Boolean] + # If availability updates are enabled, any previous availability values + # get overwritten if Google finds an out-of-stock annotation on the offer's + # page. + # If additionally `allow_strict_availability_updates` field is set to + # true, values get overwritten if Google finds an in-stock annotation on + # the offer’s page. + # @!attribute [rw] allow_strict_availability_updates + # @return [::Boolean] + # If `allow_availability_updates` is enabled, items are automatically + # updated in all your Shopping target countries. By default, availability + # updates will only be applied to items that are 'out of stock' on your + # website but 'in stock' on Shopping. Set this to true to also update items + # that are 'in stock' on your website, but 'out of stock' on Google + # Shopping. In order for this field to have an effect, you must also set + # `allow_availability_updates`. + # @!attribute [rw] allow_condition_updates + # @return [::Boolean] + # If condition updates are enabled, Google always updates item condition + # with the condition detected from the details of your product. + class ItemUpdatesAccountLevelSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This improvement will attempt to automatically correct submitted images if + # they don't meet the [image + # requirements](https://support.google.com/merchants/answer/6324350), for + # example, removing overlays. If successful, the image will be replaced and + # approved. This improvement is only applied to images of disapproved offers. + # For more information see: [Automatic image + # improvements](https://support.google.com/merchants/answer/9242973) + # @!attribute [rw] account_image_improvements_settings + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImageImprovements::ImageImprovementsAccountLevelSettings] + # Optional. Determines how the images should be automatically updated. + # If this field is not present and provided in the update mask, then the + # settings will be deleted. If there are no settings for subaccount, they are + # inherited from aggregator. + # @!attribute [r] effective_allow_automatic_image_improvements + # @return [::Boolean] + # Output only. The effective value of allow_automatic_image_improvements. + # If account_image_improvements_settings is present, then this value is the + # same. Otherwise, it represents the inherited value of the parent account. + # Read-only. + class AutomaticImageImprovements + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Settings for the Automatic Image Improvements. + # @!attribute [rw] allow_automatic_image_improvements + # @return [::Boolean] + # Enables automatic image improvements. + class ImageImprovementsAccountLevelSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Not available for [advanced + # accounts](https://support.google.com/merchants/answer/188487). By turning on + # [automatic shipping + # improvements](https://support.google.com/merchants/answer/10027038), + # you are allowing Google to improve the accuracy of your delivery times shown + # to shoppers using Google. More accurate delivery times, especially when + # faster, typically lead to better conversion rates. Google will improve your + # estimated delivery times based on various factors: + # * Delivery address of an order + # * Current handling time and shipping time settings + # * Estimated weekdays or business days + # * Parcel tracking data + # @!attribute [rw] allow_shipping_improvements + # @return [::Boolean] + # Enables automatic shipping improvements. + class AutomaticShippingImprovements + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetAutomaticImprovements` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the automatic improvements. + # Format: `accounts/{account}/automaticImprovements` + class GetAutomaticImprovementsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateAutomaticImprovements` method. + # @!attribute [rw] automatic_improvements + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # Required. The new version of the automatic imrovements. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `item_updates` + # - `item_updates.account_level_settings` + # - `image_improvements` + # - `image_improvements.account_level_settings` + # - `shipping_improvements` + # - `shipping_improvements.allow_shipping_improvements` + class UpdateAutomaticImprovementsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessidentity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessidentity.rb new file mode 100644 index 000000000000..35d89b006536 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessidentity.rb @@ -0,0 +1,140 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # Collection of information related to the [identity of a + # business](https://support.google.com/merchants/answer/12564247). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the business identity. + # Format: `accounts/{account}/businessIdentity` + # @!attribute [rw] promotions_consent + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::PromotionsConsent] + # Required. Whether the identity attributes may be used for promotions. + # @!attribute [rw] black_owned + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as being + # black-owned. This optional field will only be available for businesses with + # the business country set to `US`. It is also not applicable for + # marketplaces or marketplace sellers. + # @!attribute [rw] women_owned + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as being + # women-owned. This optional field will only be available for businesses with + # a business country set to `US`. It is also not applicable for marketplaces + # or marketplace sellers. + # @!attribute [rw] veteran_owned + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as being + # veteran-owned. This optional field will only be available for businesses + # with a business country set to `US`. It is also not applicable for + # marketplaces or marketplace sellers. + # @!attribute [rw] latino_owned + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as being + # latino-owned. This optional field will only be available for businesses + # with the business country set to `US`. It is also not applicable for + # marketplaces or marketplace sellers. + # @!attribute [rw] small_business + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as a small + # business. This optional field will only be available for businesses with a + # business country set to `US`. It is also not applicable for marketplaces. + class BusinessIdentity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # All information related to an identity attribute. + # @!attribute [rw] identity_declaration + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute::IdentityDeclaration] + # Required. The declaration of identity for this attribute. + class IdentityAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # All possible settings regarding the declaration of an identity. + module IdentityDeclaration + # Default value indicating that no selection was made. + IDENTITY_DECLARATION_UNSPECIFIED = 0 + + # Indicates that the account identifies with the attribute. + SELF_IDENTIFIES_AS = 1 + + # Indicates that the account does not identify with the attribute. + DOES_NOT_SELF_IDENTIFY_AS = 2 + end + end + + # All possible settings regarding promotions related to the business + # identity. + module PromotionsConsent + # Default value indicating that no selection was made. + PROMOTIONS_CONSENT_UNSPECIFIED = 0 + + # Indicates that the account consented to having their business identity + # used for promotions. + PROMOTIONS_CONSENT_GIVEN = 1 + + # Indicates that the account did not consent to having their business + # identity used for promotions. + PROMOTIONS_CONSENT_DENIED = 2 + end + end + + # Request message for the `GetBusinessIdentity` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the business identity. + # Format: `accounts/{account}/businessIdentity`. For example, + # `accounts/123456/businessIdentity`. + class GetBusinessIdentityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateBusinessIdentity` method. + # @!attribute [rw] business_identity + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # Required. The new version of the business identity. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `black_owned` + # - `latino_owned` + # - `promotions_consent` + # - `small_business` + # - `veteran_owned` + # - `women_owned` + class UpdateBusinessIdentityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessinfo.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessinfo.rb new file mode 100644 index 000000000000..0ef717f5804f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessinfo.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! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # The `BusinessInfo` message contains essential information about a + # business. + # + # This message captures key business details such as physical address, + # customer service contacts, and region-specific identifiers. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the business info. + # Format: `accounts/{account}/businessInfo` + # @!attribute [rw] address + # @return [::Google::Type::PostalAddress] + # Optional. The address of the business. Only `region_code`, `address_lines`, + # `postal_code`, `administrative_area` and `locality` fields are supported. + # All other fields are ignored. + # @!attribute [r] phone + # @return [::Google::Type::PhoneNumber] + # Output only. The phone number of the business. + # @!attribute [r] phone_verification_state + # @return [::Google::Shopping::Merchant::Accounts::V1::PhoneVerificationState] + # Output only. The phone verification state of the business. + # @!attribute [rw] customer_service + # @return [::Google::Shopping::Merchant::Accounts::V1::CustomerService] + # Optional. The customer service of the business. + # @!attribute [rw] korean_business_registration_number + # @return [::String] + # Optional. The 10-digit [Korean business registration + # number](https://support.google.com/merchants/answer/9037766) separated with + # dashes in the format: XXX-XX-XXXXX. + class BusinessInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetBusinessInfo` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the business info. + # Format: `accounts/{account}/businessInfo`. For example, + # `accounts/123456/businessInfo`. + class GetBusinessInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateBusinessInfo` method. + # @!attribute [rw] business_info + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # Required. The new version of the business info. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `address` + # - `customer_service` + # - `korean_business_registration_number` + class UpdateBusinessInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/checkoutsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/checkoutsettings.rb new file mode 100644 index 000000000000..9d189d02dd35 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/checkoutsettings.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 Shopping + module Merchant + module Accounts + module V1 + # Request message for `GetCheckoutSettings` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + class GetCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateCheckoutSettings` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account for which the `CheckoutSettings` will be + # created. + # @!attribute [rw] checkout_settings + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # Required. The `CheckoutSettings` object to create. + class CreateCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateCheckoutSettings` method. + # @!attribute [rw] checkout_settings + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # Required. The updated version of the `CheckoutSettings`. + # The `name` field is used to identify the `CheckoutSettings`. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `eligible_destinations` + # - `uri_settings` + class UpdateCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteCheckoutSettings` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + class DeleteCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [CheckoutSettings](https://support.google.com/merchants/answer/13945960) for + # a specific merchant. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the program configuration settings. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @!attribute [rw] uri_settings + # @return [::Google::Shopping::Merchant::Accounts::V1::UriSettings] + # URI settings for cart or checkout URL. + # @!attribute [rw] eligible_destinations + # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] + # Optional. Required for the create operation. The destinations (also known + # as [Marketing + # methods](https://support.google.com/merchants/answer/15130232)) to which + # the checkout program applies. Valid destination values are `SHOPPING_ADS` + # and `FREE_LISTINGS`. + # @!attribute [r] enrollment_state + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings::CheckoutEnrollmentState] + # Output only. Reflects the merchant enrollment state in `Checkout` program. + # @!attribute [r] review_state + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings::CheckoutReviewState] + # Output only. Reflects the merchant review state in `Checkout` program. + # This is set based on the data quality reviews of the URL provided by + # the merchant. + # A merchant with enrollment state + # as `ENROLLED` can be in the following review states: `IN_REVIEW`, + # `APPROVED` or `DISAPPROVED`. A merchant must be in an `enrollment_state` of + # `ENROLLED` before a review can begin for the merchant.For more details, + # check the help center doc. + # @!attribute [r] effective_uri_settings + # @return [::Google::Shopping::Merchant::Accounts::V1::UriSettings] + # Output only. The effective value of `uri_settings` for a given merchant. If + # account level settings are present then this value will be a copy of url + # settings. Otherwise, it will have the value of the parent account (for only + # marketplace sellers). + # @!attribute [r] effective_enrollment_state + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings::CheckoutEnrollmentState] + # Output only. The effective value of enrollment_state for a given merchant + # ID. If account level settings are present then this value will be a copy of + # the account level settings. Otherwise, it will have the value of the parent + # account (for only marketplace sellers). + # @!attribute [r] effective_review_state + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings::CheckoutReviewState] + # Output only. The effective value of `review_state` for a given merchant ID. + # If account level settings are present then this value will be a copy of the + # account level settings. Otherwise, it will have the value of the parent + # account (for only marketplace sellers). + class CheckoutSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum indicating the enrollment state of merchant in `Checkout` + # program. + module CheckoutEnrollmentState + # Default enrollment state when enrollment state is not specified. + CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED = 0 + + # Merchant has not enrolled into the program. + INACTIVE = 1 + + # Merchant has enrolled into the program by providing either an + # account level URL or checkout URLs as part of their feed. + ENROLLED = 2 + + # Merchant has previously enrolled but opted out of the program. + OPTED_OUT = 3 + end + + # Enum indicating the review state of merchant in `Checkout` + # program. + module CheckoutReviewState + # Default review state when review state is not specified. + CHECKOUT_REVIEW_STATE_UNSPECIFIED = 0 + + # Merchant provided URLs are being reviewed for data quality issues. + IN_REVIEW = 1 + + # Merchant account has been approved. Indicates the data quality checks + # have passed. + APPROVED = 2 + + # Merchant account has been disapproved due to data quality issues. + DISAPPROVED = 3 + end + end + + # URL settings for cart or checkout URL. + # @!attribute [rw] checkout_uri_template + # @return [::String] + # Checkout URL template. When the placeholders are expanded will redirect + # the buyer to the merchant checkout page with the item in the cart. For + # more details, check the [help center + # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) + # + # Note: The following fields are mutually exclusive: `checkout_uri_template`, `cart_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cart_uri_template + # @return [::String] + # Cart URL template. When the placeholders are expanded will redirect the + # buyer to the cart page on the merchant website with the selected + # item in cart. For more details, check the [help center + # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) + # + # Note: The following fields are mutually exclusive: `cart_uri_template`, `checkout_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class UriSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/customerservice.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/customerservice.rb new file mode 100644 index 000000000000..65b91705c33d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/customerservice.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 Shopping + module Merchant + module Accounts + module V1 + # Customer service information. + # @!attribute [rw] uri + # @return [::String] + # Optional. The URI where customer service may be found. + # @!attribute [rw] email + # @return [::String] + # Optional. The email address where customer service may be reached. + # @!attribute [rw] phone + # @return [::Google::Type::PhoneNumber] + # Optional. The phone number where customer service may be called. + class CustomerService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/developerregistration.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/developerregistration.rb new file mode 100644 index 000000000000..aaa571127439 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/developerregistration.rb @@ -0,0 +1,94 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # Represents a developer registration owned by a Merchant account. + # @!attribute [rw] name + # @return [::String] + # Identifier. The `name` (ID) of the developer registration. Generated by the + # Content API upon creation of a new `DeveloperRegistration`. The `account` + # represents the merchant ID of the merchant that owns the registration. + # @!attribute [r] gcp_ids + # @return [::Array<::String>] + # Output only. The GCP ids attached to this developer registration + class DeveloperRegistration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the RegisterGCP method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the developer registration to be created for the + # merchant account that the GCP will be registered with. Format: + # `accounts/{account}/developerRegistration` + # @!attribute [rw] developer_email + # @return [::String] + # Immutable. Optional field. Developer role can be also added by using + # `users.update` method. If the developer email provided is associated with a + # user in the provided merchant account, the user will be updated to have + # `API_DEVELOPER` `access_rights` and the email preference corresponding to + # that user will be updated to have the new API notifications preference. If + # the developer email provided is not associated with any user, it is added + # as a contact. The email preference corresponding to that contact will have + # the new API notifications preference. Make sure the email used is + # associated with a Google Account and is not a service account as service + # accounts can't receive emails. + class RegisterGcpRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UnregisterGCP method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the developer registration to be created for the + # merchant account that the GCP will be registered with. Format: + # `accounts/{account}/developerRegistration` + class UnregisterGcpRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the GetDeveloperRegistration method. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` (ID) of the developer registration. + class GetDeveloperRegistrationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the GetAccountForGcpRegistration method. + # @!attribute [rw] name + # @return [::String] + # The name of the merchant account id that the GCP is registered with. + class GetAccountForGcpRegistrationResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/emailpreferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/emailpreferences.rb new file mode 100644 index 000000000000..7bc4eb56ef56 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/emailpreferences.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 Shopping + module Merchant + module Accounts + module V1 + # The categories of notifications the user opted into / opted out of. The email + # preferences do not include mandatory announcements as users can't opt out of + # them. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the EmailPreferences. The endpoint is only + # supported for the authenticated user. + # @!attribute [rw] news_and_tips + # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences::OptInState] + # Optional. Updates on new features, tips and best practices. + class EmailPreferences + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Opt in state of the email preference. + module OptInState + # Opt-in status is not specified. + OPT_IN_STATE_UNSPECIFIED = 0 + + # User has opted out of receiving this type of email. + OPTED_OUT = 1 + + # User has opted in to receiving this type of email. + OPTED_IN = 2 + + # User has opted in to receiving this type of email and the confirmation + # email has been sent, but user has not yet confirmed the opt in (applies + # only to certain countries). + UNCONFIRMED = 3 + end + end + + # Request message for GetEmailPreferences method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the `EmailPreferences` resource. + # Format: `accounts/{account}/users/{email}/emailPreferences` + class GetEmailPreferencesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateEmailPreferences method. + # @!attribute [rw] email_preferences + # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # Required. Email Preferences to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `news_and_tips` + class UpdateEmailPreferencesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/gbpaccounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/gbpaccounts.rb new file mode 100644 index 000000000000..eefd5dec9351 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/gbpaccounts.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 Shopping + module Merchant + module Accounts + module V1 + # Collection of information related to a Google Business Profile (GBP) account. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the GBP account. Format: + # `accounts/{account}/gbpAccount/{gbp_account}` + # @!attribute [rw] gbp_account_id + # @return [::String] + # The id of the GBP account. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Accounts::V1::GbpAccount::Type] + # The type of the Business Profile. + # @!attribute [rw] gbp_account_name + # @return [::String] + # The name of the Business Profile. + # For personal accounts: Email id of the owner. + # For Business accounts: Name of the Business Account. + # @!attribute [rw] listing_count + # @return [::Integer] + # Number of listings under this account. + class GbpAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the GBP account. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # The GBP account is a user account. + USER = 1 + + # The GBP account is a business account. + BUSINESS_ACCOUNT = 2 + end + end + + # Request message for the ListGbpAccounts method. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource under which the GBP accounts are + # listed. Format: `accounts/{account}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `GbpAccount` resources to return. The + # service returns fewer than this value if the number of gbp accounts is less + # that than the `pageSize`. The default value is 50. The maximum value is + # 1000; If a value higher than the maximum is specified, then the `pageSize` + # will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListGbpAccounts` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListGbpAccounts` must + # match the call that provided the page token. + class ListGbpAccountsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListGbpAccounts method. + # @!attribute [rw] gbp_accounts + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::GbpAccount>] + # The GBP accounts from the specified merchant in the specified country. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListGbpAccountsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the LinkGbpAccount method. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource to which the GBP account is + # linked. Format: `accounts/{account}`. + # @!attribute [rw] gbp_email + # @return [::String] + # Required. The email address of the Business Profile account. + class LinkGbpAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the LinkGbpAccount method. + # @!attribute [rw] response + # @return [::Google::Protobuf::Empty] + # Empty response. + class LinkGbpAccountResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/homepage.rb new file mode 100644 index 000000000000..272a22c8cf60 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/homepage.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 Shopping + module Merchant + module Accounts + module V1 + # The `Homepage` message represents a business's store homepage within the + # system. + # + # A business's homepage is the primary domain where customers interact with + # their store. + # + # The homepage can be claimed and verified as a proof of ownership and allows + # the business to unlock features that require a verified website. For more + # information, see [Understanding online store URL + # verification](//support.google.com/merchants/answer/176793). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the store's homepage. + # Format: `accounts/{account}/homepage` + # @!attribute [rw] uri + # @return [::String] + # Required. The URI (typically a URL) of the store's homepage. + # @!attribute [r] claimed + # @return [::Boolean] + # Output only. Whether the homepage is claimed. See + # https://support.google.com/merchants/answer/176793. + class Homepage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetHomepage` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the homepage to retrieve. + # Format: `accounts/{account}/homepage` + class GetHomepageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateHomepage` method. + # @!attribute [rw] homepage + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # Required. The new version of the homepage. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `uri` + class UpdateHomepageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ClaimHomepage` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the homepage to claim. + # Format: `accounts/{account}/homepage` + # @!attribute [rw] overwrite + # @return [::Boolean] + # Optional. When set to `true`, this option removes any existing claim on the + # requested website from any other account to the account making the request, + # effectively replacing the previous claim. + class ClaimHomepageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UnclaimHomepage` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the homepage to unclaim. + # Format: `accounts/{account}/homepage` + class UnclaimHomepageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/lfpproviders.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/lfpproviders.rb new file mode 100644 index 000000000000..48d974792168 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/lfpproviders.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 Shopping + module Merchant + module Accounts + module V1 + # Collection of information related to a Local Feed Partnership (LFP) provider. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the LFP provider. + # Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}` + # @!attribute [r] region_code + # @return [::String] + # Output only. Region code defined by [CLDR](https://cldr.unicode.org/). + # @!attribute [rw] display_name + # @return [::String] + # The display name of the LFP provider. + class LfpProvider + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the FindLfpProviders method. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource under which the LFP providers are + # found. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `LfpProvider` resources to return. The + # service returns fewer than this value if the number of lfp providers is + # less that than the `pageSize`. The default value is 50. The maximum value + # is 1000; If a value higher than the maximum is specified, then the + # `pageSize` will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `FindLfpProviders` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `FindLfpProviders` must + # match the call that provided the page token. + class FindLfpProvidersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the FindLfpProviders method. + # @!attribute [rw] lfp_providers + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::LfpProvider>] + # The LFP providers from the specified merchant in the specified country. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class FindLfpProvidersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the LinkLfpProvider method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the LFP provider resource to link. + # Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. + # The `lfp_provider` is the LFP provider ID. + # @!attribute [rw] external_account_id + # @return [::String] + # Required. The external account ID by which this merchant is known to the + # LFP provider. + class LinkLfpProviderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the LinkLfpProvider method. + # @!attribute [rw] response + # @return [::Google::Protobuf::Empty] + # Empty response. + class LinkLfpProviderResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/omnichannelsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/omnichannelsettings.rb new file mode 100644 index 000000000000..80f3cde7bfd9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/omnichannelsettings.rb @@ -0,0 +1,336 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # Collection of information related to the omnichannel settings of a merchant. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the omnichannel setting. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # @!attribute [rw] region_code + # @return [::String] + # Required. Immutable. Region code defined by + # [CLDR](https://cldr.unicode.org/). Must be provided in the Create method, + # and is immutable. + # @!attribute [rw] lsf_type + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting::LsfType] + # Required. The Local Store Front type for this country. + # @!attribute [rw] in_stock + # @return [::Google::Shopping::Merchant::Accounts::V1::InStock] + # Optional. The InStock URI and state for this country. + # @!attribute [rw] pickup + # @return [::Google::Shopping::Merchant::Accounts::V1::Pickup] + # Optional. The Pickup URI and state for this country. + # @!attribute [r] lfp_link + # @return [::Google::Shopping::Merchant::Accounts::V1::LfpLink] + # Output only. The established link to a LFP provider. + # @!attribute [rw] odo + # @return [::Google::Shopping::Merchant::Accounts::V1::OnDisplayToOrder] + # Optional. The On Display to Order (ODO) policy URI and state for this + # country. + # @!attribute [rw] about + # @return [::Google::Shopping::Merchant::Accounts::V1::About] + # Optional. The about page URI and state for this country. + # @!attribute [rw] inventory_verification + # @return [::Google::Shopping::Merchant::Accounts::V1::InventoryVerification] + # Optional. The inventory verification contact and state for this country. + class OmnichannelSetting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The product page experience type, which is also called the Local Store + # Front (LSF) type. Check the [HC + # article](https://support.google.com/merchants/answer/7178526) for more + # details. + module LsfType + # Default value. This value is unused. + LSF_TYPE_UNSPECIFIED = 0 + + # Google-Hosted Local Store Front. Check the [HC + # article](https://support.google.com/merchants/answer/14869424) for more + # details. + GHLSF = 1 + + # Merchant-Hosted Local Store Front Basic. Check the [HC + # article](https://support.google.com/merchants/answer/14615867) for more + # details. + MHLSF_BASIC = 2 + + # Merchant-Hosted Local Store Front Full. Check the [HC + # article](https://support.google.com/merchants/answer/14617076) for more + # details. + MHLSF_FULL = 3 + end + end + + # The state of a omnichannel setting related review process. + class ReviewState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the review process. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The review process has concluded successfully. The reviewed item is + # active. + ACTIVE = 1 + + # The review process failed. + FAILED = 2 + + # The review process is running. + RUNNING = 3 + + # The review process is waiting for the merchant to take action. + ACTION_REQUIRED = 4 + end + end + + # Collection of information related to InStock. + # @!attribute [rw] uri + # @return [::String] + # Optional. Product landing page URI. It is only used for the review of MHLSF + # in-stock serving. This URI domain should match with the business's + # homepage. Required to be empty if the lsf_type is GHLSF, and required when + # the lsf_type is MHLSF_FULL or MHLSF_BASIC. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] + # Output only. The state of the in-stock serving. + class InStock + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to Pickup. + # @!attribute [rw] uri + # @return [::String] + # Required. Pickup product page URI. It is only used for the review of pickup + # serving. This URI domain should match with the business's homepage. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] + # Output only. The state of the pickup serving. + class Pickup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to the LFP link. + # @!attribute [rw] lfp_provider + # @return [::String] + # Required. The resource name of the LFP provider. + # Format: `lfpProviders/{lfp_provider}` + # @!attribute [rw] external_account_id + # @return [::String] + # Required. The account ID by which this merchant is known to the LFP + # provider. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] + # Output only. The state of the LFP link. + class LfpLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to the on display to order + # ([ODO](https://support.google.com/merchants/answer/14615056?ref_topic=15145747&sjid=6892280366904591178-NC)). + # @!attribute [rw] uri + # @return [::String] + # Required. The on display to order (ODO) policy URI. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] + # Output only. The state of the URI. + class OnDisplayToOrder + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to the about page + # ([impressum](https://support.google.com/merchants/answer/14675634?ref_topic=15145634&sjid=6892280366904591178-NC)). + # @!attribute [rw] uri + # @return [::String] + # Required. The about page URI. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] + # Output only. The state of the URI. + class About + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to [inventory + # verification](https://support.google.com/merchants/answer/14684499?ref_topic=15145634&sjid=6892280366904591178-NC). + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1::InventoryVerification::State] + # Output only. The state of the inventory verification process. + # @!attribute [rw] contact + # @return [::String] + # Required. The name of the contact for the inventory verification process. + # @!attribute [rw] contact_email + # @return [::String] + # Required. The email address of the contact for the inventory verification + # process. + # @!attribute [r] contact_state + # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] + # Output only. The state of the contact verification. + class InventoryVerification + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the [inventory + # verification](https://support.google.com/merchants/answer/14684499?ref_topic=15145634&sjid=6892280366904591178-NC) + # process. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # When the merchant needs to initiate the inventory + # verification process. The next state is INACTIVE. + ACTION_REQUIRED = 1 + + # When the merchant is ready to request inventory verification. + INACTIVE = 5 + + # The inventory verification process is running. If the merchant is + # rejected, the next state is INACTIVE. + RUNNING = 2 + + # The inventory verification process succeeded. + SUCCEEDED = 3 + + # When merchant fails the inventory verification process and all attempts + # are exhausted. + SUSPENDED = 4 + end + end + + # Request message for the GetOmnichannelSettings method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the omnichannel setting to retrieve. + # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + class GetOmnichannelSettingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListOmnichannelSettings method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of omnichannel settings. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of omnichannel settings to return. The service + # may return fewer than this value. If unspecified, at most 50 omnichannel + # settings will be returned. The maximum value is 1000; values above 1000 + # will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListOmnichannelSettings` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListOmnichannelSettings` + # must match the call that provided the page token. + class ListOmnichannelSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListOmnichannelSettings method. + # @!attribute [rw] omnichannel_settings + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting>] + # The omnichannel settings from the specified merchant. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListOmnichannelSettingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateOmnichannelSetting method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this omnichannel setting will be + # created. Format: `accounts/{account}` + # @!attribute [rw] omnichannel_setting + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # Required. The omnichannel setting to create. + class CreateOmnichannelSettingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateOmnichannelSetting method. + # @!attribute [rw] omnichannel_setting + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # Required. The omnichannel setting to update. + # + # The omnichannel setting's `name` field is used to identify the + # omnichannel setting to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to be updated. + # + # The following fields are supported in snake_case only: + # - `lsf_type` + # - `in_stock` + # - `pickup` + # - `odo` + # - `about` + # - `inventory_verification` + # + # Full replacement with wildcard `*`is supported, while empty/implied update + # mask is not. + class UpdateOmnichannelSettingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the RequestInventoryVerification method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the omnichannel setting to request inventory + # verification. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + class RequestInventoryVerificationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the RequestInventoryVerification method. + # @!attribute [rw] omnichannel_setting + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # The omnichannel setting that was updated. + class RequestInventoryVerificationResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/online_return_policy.rb new file mode 100644 index 000000000000..f82f2029f00f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/online_return_policy.rb @@ -0,0 +1,317 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # Request message for the `GetOnlineReturnPolicy` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the return policy to retrieve. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + class GetOnlineReturnPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateOnlineReturnPolicy` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The Merchant Center account for which the return policy will be + # created. Format: `accounts/{account}` + # @!attribute [rw] online_return_policy + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # Required. The return policy object to create. + class CreateOnlineReturnPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteOnlineReturnPolicy` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the return policy to delete. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + class DeleteOnlineReturnPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListOnlineReturnPolicies` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The Merchant Center account for which to list return policies. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `OnlineReturnPolicy` resources to return. + # The service returns fewer than this value if the number of return policies + # for the given business is less that than the `pageSize`. The default value + # is 10. The maximum value is 100; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListOnlineReturnPolicies` + # call. Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListOnlineReturnPolicies` must match the call that provided the page + # token. The token returned as + # {::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListOnlineReturnPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListOnlineReturnPolicies` method. + # @!attribute [rw] online_return_policies + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy>] + # The retrieved return policies. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListOnlineReturnPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [Online return policy](https://support.google.com/merchants/answer/10220642) + # object. This is currently used to represent return policies for ads and free + # listings programs. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the `OnlineReturnPolicy` resource. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + # @!attribute [r] return_policy_id + # @return [::String] + # Output only. Return policy ID generated by Google. + # @!attribute [rw] label + # @return [::String] + # Optional. Immutable. This field represents the unique user-defined label of + # the return policy for the given country. It is important to note that the + # same label cannot be used in different return policies for the same + # country. If not given, policies will be automatically treated as the + # 'default' for the country. When using label, you are creating an exception + # policy in that country to assign a custom return policy to certain product + # groups, follow the instructions provided in the [Return policy label] + # (https://support.google.com/merchants/answer/9445425). The label can + # contain up to 50 characters. + # @!attribute [rw] countries + # @return [::Array<::String>] + # Required. Immutable. The countries of sale where the return policy applies. + # The values must be a valid 2 letter ISO 3166 code. + # @!attribute [rw] policy + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::Policy] + # Optional. The return policy. + # @!attribute [rw] seasonal_overrides + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::SeasonalOverride>] + # Optional. Overrides to the general policy for orders placed during a + # specific set of time intervals. + # @!attribute [rw] restocking_fee + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::RestockingFee] + # Optional. The restocking fee that applies to all return reason categories. + # This would be treated as a free restocking fee if the value is not set. + # @!attribute [rw] return_methods + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::ReturnMethod>] + # Optional. The return methods of how customers can return an item. This + # value is required to not be empty unless the type of return policy is + # noReturns. + # @!attribute [rw] item_conditions + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::ItemCondition>] + # Optional. The item conditions accepted for returns must not be empty unless + # the type of return policy is 'noReturns'. + # @!attribute [rw] return_shipping_fee + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::ReturnShippingFee] + # Optional. The return shipping fee. Should be set only when customer need to + # download and print the return label. + # @!attribute [rw] return_policy_uri + # @return [::String] + # Required. The return policy uri. This can used by Google to do a sanity + # check for the policy. It must be a valid URL. + # @!attribute [rw] accept_defective_only + # @return [::Boolean] + # Optional. This field specifies if business + # only accepts defective products for returns. + # @!attribute [rw] process_refund_days + # @return [::Integer] + # Optional. The field specifies the number of + # days it takes for business to process refunds. + # @!attribute [rw] accept_exchange + # @return [::Boolean] + # Optional. This field specifies if business + # allows customers to exchange products. + # @!attribute [rw] return_label_source + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::ReturnLabelSource] + # Optional. The field specifies the return + # label source. + class OnlineReturnPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The return shipping fee. This can either be a fixed fee or a boolean to + # indicate that the customer pays the actual shipping cost. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::ReturnShippingFee::Type] + # Required. Type of return shipping fee. + # @!attribute [rw] fixed_fee + # @return [::Google::Shopping::Type::Price] + # Fixed return shipping fee amount. This value is only applicable when type + # is `FIXED`. We will treat the return shipping fee as free if type is + # `FIXED` and this value is not set. + class ReturnShippingFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Return shipping fee types. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # The return shipping fee is a fixed value. + FIXED = 1 + + # Customers will pay the actual return shipping fee. + CUSTOMER_PAYING_ACTUAL_FEE = 2 + end + end + + # The restocking fee. This can be a flat fee or a micro percent. + # @!attribute [rw] fixed_fee + # @return [::Google::Shopping::Type::Price] + # Fixed restocking fee. + # + # Note: The following fields are mutually exclusive: `fixed_fee`, `micro_percent`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] micro_percent + # @return [::Integer] + # Percent of total price in micros. 15,000,000 means 15% of the total + # price would be charged. + # + # Note: The following fields are mutually exclusive: `micro_percent`, `fixed_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class RestockingFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The available policies. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::Policy::Type] + # Policy type. + # @!attribute [rw] days + # @return [::Integer] + # The number of days items can be returned after delivery, where one day + # is defined as 24 hours after the delivery timestamp. Required for + # `NUMBER_OF_DAYS_AFTER_DELIVERY` returns. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Return policy types. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # The number of days within which a return is valid after delivery. + NUMBER_OF_DAYS_AFTER_DELIVERY = 1 + + # No returns. + NO_RETURNS = 2 + + # Life time returns. + LIFETIME_RETURNS = 3 + end + end + + # @!attribute [rw] return_days + # @return [::Integer] + # Number of days (from the delivery date) that the product can be + # returned. + # + # Note: The following fields are mutually exclusive: `return_days`, `return_until_date`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] return_until_date + # @return [::Google::Type::Date] + # Fixed end date until which the product can be returned. + # + # Note: The following fields are mutually exclusive: `return_until_date`, `return_days`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] label + # @return [::String] + # Required. Display name of this seasonal override in Merchant Center. + # @!attribute [rw] start_date + # @return [::Google::Type::Date] + # Required. Defines the date range when this seasonal override applies. + # Both start_date and end_date are inclusive. + # The dates of the seasonal overrides should not overlap. + # @!attribute [rw] end_date + # @return [::Google::Type::Date] + # Required. seasonal override end date (inclusive). + class SeasonalOverride + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The available return methods. + module ReturnMethod + # Default value. This value is unused. + RETURN_METHOD_UNSPECIFIED = 0 + + # Return by mail. + BY_MAIL = 1 + + # Return in store. + IN_STORE = 2 + + # Return at a kiosk. + AT_A_KIOSK = 3 + end + + # The available item conditions. + module ItemCondition + # Default value. This value is unused. + ITEM_CONDITION_UNSPECIFIED = 0 + + # New. + NEW = 1 + + # Used. + USED = 2 + end + + # The available return label sources. + module ReturnLabelSource + # Default value. This value is unused. + RETURN_LABEL_SOURCE_UNSPECIFIED = 0 + + # Download and print. + DOWNLOAD_AND_PRINT = 1 + + # Label include in the package. + IN_THE_PACKAGE = 2 + + # Customer to provide. + CUSTOMER_RESPONSIBILITY = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/phoneverificationstate.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/phoneverificationstate.rb new file mode 100644 index 000000000000..94432f48b8ed --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/phoneverificationstate.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 Shopping + module Merchant + module Accounts + module V1 + # The phone verification state. + module PhoneVerificationState + # Default value. This value is unused. + PHONE_VERIFICATION_STATE_UNSPECIFIED = 0 + + # The phone is verified. + PHONE_VERIFICATION_STATE_VERIFIED = 1 + + # The phone is unverified. + PHONE_VERIFICATION_STATE_UNVERIFIED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/programs.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/programs.rb new file mode 100644 index 000000000000..fc47869540ec --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/programs.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 Shopping + module Merchant + module Accounts + module V1 + # Defines participation in a given program for the specified account. + # + # Programs provide a mechanism for adding functionality to a Merchant Center + # accounts. A typical example of this is the [Free product + # listings](https://support.google.com/merchants/answer/13889434) + # program, which enables products from a business's store to be shown across + # Google for free. + # + # The following list is the available set of program resource IDs accessible + # through the API: + # + # * `checkout` + # * `free-listings` + # * `product-ratings` + # * `shopping-ads` + # * `youtube-shopping-checkout` + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the program. + # Format: `accounts/{account}/programs/{program}` + # @!attribute [r] documentation_uri + # @return [::String] + # Output only. The URL of a Merchant Center help page describing the program. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1::Program::State] + # Output only. The participation state of the account in the program. + # @!attribute [r] active_region_codes + # @return [::Array<::String>] + # Output only. The regions in which the account is actively participating in + # the program. Active regions are defined as those where all program + # requirements affecting the regions have been met. + # + # Region codes are defined by [CLDR](https://cldr.unicode.org/). This is + # either a country where the program applies specifically to that country or + # `001` when the program applies globally. + # @!attribute [r] unmet_requirements + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Program::Requirement>] + # Output only. The requirements that the account has not yet satisfied that + # are affecting participation in the program. + class Program + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines a requirement specified for participation in the program. + # @!attribute [r] title + # @return [::String] + # Output only. Name of the requirement. + # @!attribute [r] documentation_uri + # @return [::String] + # Output only. The URL of a help page describing the requirement. + # @!attribute [r] affected_region_codes + # @return [::Array<::String>] + # Output only. The regions that are currently affected by this requirement + # not being met. + # + # Region codes are defined by [CLDR](https://cldr.unicode.org/). This is + # either a country where the program applies specifically to that country + # or `001` when the program applies globally. + class Requirement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible program participation states for the account. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The account is not eligible to participate in the program. + NOT_ELIGIBLE = 1 + + # The account is eligible to participate in the program. + ELIGIBLE = 2 + + # The program is enabled for the account. + ENABLED = 3 + end + end + + # Request message for the GetProgram method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the program to retrieve. + # Format: `accounts/{account}/programs/{program}`. For example, + # `accounts/123456/programs/free-listings`. + class GetProgramRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListPrograms method. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the account for which to retrieve all programs. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of programs to return in a single response. If + # unspecified (or 0), a default size of 1000 is used. The maximum value is + # 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A continuation token, received from a previous `ListPrograms` + # call. Provide this to retrieve the next page. + class ListProgramsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListPrograms method. + # @!attribute [rw] programs + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Program>] + # The programs for the given account. + # @!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 ListProgramsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the EnableProgram method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the program for which to enable participation for the + # given account. Format: `accounts/{account}/programs/{program}`. For + # example, `accounts/123456/programs/free-listings`. + class EnableProgramRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DisableProgram method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the program for which to disable participation for + # the given account. Format: `accounts/{account}/programs/{program}`. For + # example, `accounts/123456/programs/free-listings`. + class DisableProgramRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/regions.rb new file mode 100644 index 000000000000..9f1e20033932 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/regions.rb @@ -0,0 +1,296 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # Request message for the `GetRegion` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the region to retrieve. + # Format: `accounts/{account}/regions/{region}` + class GetRegionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateRegion` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to create a region for. + # Format: `accounts/{account}` + # @!attribute [rw] region_id + # @return [::String] + # Required. The identifier for the region, unique over all regions of the + # same account. + # @!attribute [rw] region + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # Required. The region to create. + class CreateRegionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `BatchCreateRegions` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to create one or more regions for. + # Format: `accounts/{account}` + # @!attribute [rw] requests + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest>] + # Required. The region(s) to create. + # The maximum number of regions that can be created in a batch is 100. + class BatchCreateRegionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `BatchCreateRegions` method. + # @!attribute [rw] regions + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Region>] + # The created region(s). + class BatchCreateRegionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateRegion` method. + # @!attribute [rw] region + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # Required. The updated region. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The comma-separated field mask indicating the fields to update. + # Example: + # `"displayName,postalCodeArea.regionCode"`. + class UpdateRegionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `BatchUpdateRegions` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to update one or more regions for. + # Format: `accounts/{account}` + # @!attribute [rw] requests + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest>] + # Required. The region(s) to update. + # The maximum number of regions that can be updated in a batch is 100. + class BatchUpdateRegionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `BatchUpdateRegions` method. + # @!attribute [rw] regions + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Region>] + # The updated region(s). + class BatchUpdateRegionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteRegion` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the region to delete. + # Format: `accounts/{account}/regions/{region}` + class DeleteRegionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `BatchDeleteRegions` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to delete one or more regions from. + # Format: `accounts/{account}` + # @!attribute [rw] requests + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest>] + # Required. The names of the regions to delete. + # A maximum of 100 regions can be deleted in a batch. + class BatchDeleteRegionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListRegions` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list regions for. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of regions to return. The service may return + # fewer than this value. + # If unspecified, at most 50 regions will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListRegions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegions` must + # match the call that provided the page token. + class ListRegionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListRegions` method. + # @!attribute [rw] regions + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Region>] + # The regions from the specified business. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRegionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a geographic region that you can use as a target with both the + # `RegionalInventory` and `ShippingSettings` services. You can define regions + # as collections of either postal codes, radius areas or, in some countries, + # using predefined geotargets. + # + # A region must be defined by specifying exactly one of `postal_code_area`, + # `geotarget_area`, or `radius_area`. + # + # For more information, see [Set up regions + # ](https://support.google.com/merchants/answer/7410946#zippy=%2Ccreate-a-new-region) + # for more information. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the region. + # Format: `accounts/{account}/regions/{region}` + # @!attribute [rw] display_name + # @return [::String] + # Optional. The display name of the region. + # @!attribute [rw] postal_code_area + # @return [::Google::Shopping::Merchant::Accounts::V1::Region::PostalCodeArea] + # Optional. A list of postal codes that defines the region area. + # @!attribute [rw] geotarget_area + # @return [::Google::Shopping::Merchant::Accounts::V1::Region::GeoTargetArea] + # Optional. A list of geotargets that defines the region area. + # @!attribute [r] regional_inventory_eligible + # @return [::Google::Protobuf::BoolValue] + # Output only. Indicates if the region is eligible for use in the Regional + # Inventory configuration. + # @!attribute [r] shipping_eligible + # @return [::Google::Protobuf::BoolValue] + # Output only. Indicates if the region is eligible for use in the Shipping + # Services configuration. + # @!attribute [rw] radius_area + # @return [::Google::Shopping::Merchant::Accounts::V1::Region::RadiusArea] + # Optional. A radius area that defines the region area. + class Region + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A list of postal codes that defines the region area. + # Note: All regions defined using postal codes are accessible through the + # account's `ShippingSettings.postalCodeGroups` resource. + # @!attribute [rw] region_code + # @return [::String] + # Required. [CLDR territory + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # or the country the postal code group applies to. + # @!attribute [rw] postal_codes + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Region::PostalCodeArea::PostalCodeRange>] + # Required. A range of postal codes. + class PostalCodeArea + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A range of postal codes that defines the region area. + # @!attribute [rw] begin + # @return [::String] + # Required. A postal code or a pattern of the form prefix* denoting the + # inclusive lower bound of the range defining the area. Examples values: + # `94108`, `9410*`, `9*`. + # @!attribute [rw] end + # @return [::String] + # Optional. A postal code or a pattern of the form `prefix*` denoting the + # inclusive upper bound of the range defining the area. It must have the + # same length as postalCodeRangeBegin: if postalCodeRangeBegin is a + # postal code then postalCodeRangeEnd must be a postal code too; if + # postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a + # pattern with the same prefix length. Optional: if not set, then the + # area is defined as being all the postal codes matching + # postalCodeRangeBegin. + class PostalCodeRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A list of geotargets that defines the region area. + # @!attribute [rw] geotarget_criteria_ids + # @return [::Array<::Integer>] + # Required. A non-empty list of [location + # IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). + # They must all be of the same location type (for example, state). + class GeoTargetArea + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A radius area that defines the region area. + # @!attribute [rw] region_code + # @return [::String] + # Required. [CLDR territory + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # or the country the radius area applies to. + # @!attribute [rw] lat_lng + # @return [::Google::Type::LatLng] + # Required. The center of the radius area. It represents a + # latitude/longitude pair in decimal degrees format. + # @!attribute [rw] radius + # @return [::Float] + # Required. The radius distance of the area. + # @!attribute [rw] radius_units + # @return [::Google::Shopping::Merchant::Accounts::V1::Region::RadiusArea::RadiusUnits] + # Optional. The unit of the radius. + class RadiusArea + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The unit of measurement of the radius. Default is KILOMETERS. + module RadiusUnits + # Unused default value + RADIUS_UNITS_UNSPECIFIED = 0 + + # The distance is measured in miles. + MILES = 1 + + # The distance is measured in kilometers. + KILOMETERS = 2 + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/shippingsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/shippingsettings.rb new file mode 100644 index 000000000000..a7c66d8a48b1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/shippingsettings.rb @@ -0,0 +1,757 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # The Merchant Center account's [shipping + # settings](https://support.google.com/merchants/answer/6069284). The + # `ShippingSettings` resource lets you retrieve and update the shipping + # settings of your advanced account and all its associated sub-accounts. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the shipping settings. + # Format: `accounts/{account}/shippingSettings`. For example, + # `accounts/123456/shippingSettings`. + # @!attribute [rw] services + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Service>] + # Optional. The target account's list of services. + # @!attribute [rw] warehouses + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Warehouse>] + # Optional. A list of warehouses which can be referred to in `services`. + # @!attribute [rw] etag + # @return [::String] + # Required. This field helps avoid async issues. It ensures that the shipping + # setting + # data doesn't change between the `get` call and the `insert` call. The user + # should follow these steps: + # + # 1. Set the etag field as an empty string for the initial shipping setting + # creation. + # + # 2. After the initial creation, call the `get` method to obtain an etag and + # the current shipping setting data before calling `insert`. + # + # 3. Modify the shipping setting information. + # + # 4. Call the `insert` method with the shipping setting information + # and the etag obtained in step 2. + # + # 5. If the shipping setting data changes between step 2 and step 4, the + # insert request will fail because the etag changes every time the shipping + # setting data changes. In this case, the user should repeat steps 2-4 with + # the new etag. + class ShippingSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Shipping service. + # @!attribute [rw] service_name + # @return [::String] + # Required. Free-form name of the service. Must be unique within target + # account. + # @!attribute [rw] active + # @return [::Boolean] + # Required. A boolean exposing the active status of the shipping service. + # @!attribute [rw] delivery_countries + # @return [::Array<::String>] + # Required. The CLDR territory code of the countries to which the service + # applies. + # @!attribute [rw] currency_code + # @return [::String] + # Required. The CLDR code of the currency to which this service applies. Must + # match that of the prices in rate groups. + # @!attribute [rw] delivery_time + # @return [::Google::Shopping::Merchant::Accounts::V1::DeliveryTime] + # Required. Time spent in various aspects from order to the delivery of the + # product. + # @!attribute [rw] rate_groups + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::RateGroup>] + # Optional. Shipping rate group definitions. Only the last one is allowed to + # have an empty `applicable_shipping_labels`, which means "everything else". + # The other `applicable_shipping_labels` must not overlap. + # @!attribute [rw] shipment_type + # @return [::Google::Shopping::Merchant::Accounts::V1::Service::ShipmentType] + # Optional. Type of locations this service ships orders to. + # @!attribute [rw] minimum_order_value + # @return [::Google::Shopping::Type::Price] + # Optional. Minimum order value for this service. If set, indicates that + # customers will have to spend at least this amount. All prices within a + # service must have the same currency. Cannot be set together with + # `minimum_order_value_table`. + # @!attribute [rw] minimum_order_value_table + # @return [::Google::Shopping::Merchant::Accounts::V1::MinimumOrderValueTable] + # Optional. Table of per store minimum order values for the pickup + # fulfillment type. Cannot be set together with `minimum_order_value`. + # @!attribute [rw] store_config + # @return [::Google::Shopping::Merchant::Accounts::V1::Service::StoreConfig] + # A list of stores your products are delivered from. + # This is only valid for the local delivery shipment type. + # @!attribute [rw] loyalty_programs + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Service::LoyaltyProgram>] + # Optional. Loyalty programs that this shipping service is limited to. + class Service + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A list of stores your products are delivered from. This is only valid for + # the local delivery shipment type. + # @!attribute [rw] store_service_type + # @return [::Google::Shopping::Merchant::Accounts::V1::Service::StoreConfig::StoreServiceType] + # Indicates whether all stores, or selected stores, listed by this + # business provide local delivery. + # @!attribute [rw] store_codes + # @return [::Array<::String>] + # Optional. A list of store codes that provide local delivery. + # If empty, then `all_stores` must be true. + # @!attribute [rw] cutoff_config + # @return [::Google::Shopping::Merchant::Accounts::V1::Service::StoreConfig::CutoffConfig] + # Configs related to local delivery ends for the day. + # @!attribute [rw] service_radius + # @return [::Google::Shopping::Merchant::Accounts::V1::Distance] + # Maximum delivery radius. + # This is only required for the local delivery shipment type. + class StoreConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configs related to local delivery ends for the day. + # @!attribute [rw] local_cutoff_time + # @return [::Google::Shopping::Merchant::Accounts::V1::Service::StoreConfig::CutoffConfig::LocalCutoffTime] + # Time that local delivery ends for the day. + # @!attribute [rw] store_close_offset_hours + # @return [::Integer] + # Only valid with local delivery fulfillment. Represents cutoff time + # as the number of hours before store closing. Mutually exclusive + # with `local_cutoff_time`. + # @!attribute [rw] no_delivery_post_cutoff + # @return [::Boolean] + # Businesses can opt-out of showing n+1 day local delivery when they have + # a shipping service configured to n day local delivery. For example, if + # the shipping service defines same-day delivery, and it's past the + # cut-off, setting this field to `true` results in the calculated + # shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the + # same example, setting this field to `false` results in the calculated + # shipping time being one day. This is only for local delivery. + class CutoffConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Time that local delivery ends for the day. + # @!attribute [rw] hour + # @return [::Integer] + # Hour local delivery orders must be placed by to process the same + # day. + # @!attribute [rw] minute + # @return [::Integer] + # Minute local delivery orders must be placed by to process the same + # day. + class LocalCutoffTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Indicates whether all stores, or selected stores, listed by the + # business provide local delivery. + module StoreServiceType + # Did not specify store service type. + STORE_SERVICE_TYPE_UNSPECIFIED = 0 + + # Indicates whether all stores, current and future, listed by this + # business provide local delivery. + ALL_STORES = 1 + + # Indicates that only the stores listed in `store_codes` are eligible + # for local delivery. + SELECTED_STORES = 2 + end + end + + # [Loyalty program](https://support.google.com/merchants/answer/12922446) + # provided by a business. + # @!attribute [rw] program_label + # @return [::String] + # This is the loyalty program label set in your loyalty program settings in + # Merchant Center. This sub-attribute allows Google to map your loyalty + # program to eligible offers. + # @!attribute [rw] loyalty_program_tiers + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Service::LoyaltyProgram::LoyaltyProgramTiers>] + # Optional. Loyalty program tier of this shipping service. + class LoyaltyProgram + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Subset of a business's loyalty program. + # @!attribute [rw] tier_label + # @return [::String] + # The tier label [tier_label] sub-attribute differentiates offer level + # benefits between each tier. This value is also set in your program + # settings in Merchant Center, and is required for data source changes + # even if your loyalty program only has 1 tier. + class LoyaltyProgramTiers + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Shipment type of shipping service. + module ShipmentType + # This service did not specify shipment type. + SHIPMENT_TYPE_UNSPECIFIED = 0 + + # This service ships orders to an address chosen by the customer. + DELIVERY = 1 + + # This service ships orders to an address chosen by the customer. + # The order is shipped from a local store near by. + LOCAL_DELIVERY = 2 + + # This service ships orders to an address chosen by the customer. + # The order is shipped from a collection point. + COLLECTION_POINT = 3 + end + end + + # Maximum delivery radius. + # This is only required for the local delivery shipment type. + # @!attribute [rw] value + # @return [::Integer] + # Integer value of distance. + # @!attribute [rw] unit + # @return [::Google::Shopping::Merchant::Accounts::V1::Distance::Unit] + # Unit can differ based on country, it is parameterized to include miles + # and kilometers. + class Distance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Unit can differ based on country, it is parameterized to include miles + # and kilometers. + module Unit + # Unit unspecified + UNIT_UNSPECIFIED = 0 + + # Unit in miles + MILES = 1 + + # Unit in kilometers + KILOMETERS = 2 + end + end + + # A fulfillment warehouse, which stores and handles inventory. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the warehouse. Must be unique within account. + # @!attribute [rw] shipping_address + # @return [::Google::Shopping::Merchant::Accounts::V1::Address] + # Required. Shipping address of the warehouse. + # @!attribute [rw] cutoff_time + # @return [::Google::Shopping::Merchant::Accounts::V1::WarehouseCutoffTime] + # Required. The latest time of day that an order can be accepted and begin + # processing. Later orders will be processed in the next day. The time is + # based on the warehouse postal code. + # @!attribute [rw] handling_days + # @return [::Integer] + # Required. The number of days it takes for this warehouse to pack up and + # ship an item. This is on the warehouse level, but can be overridden on the + # offer level based on the attributes of an item. + # @!attribute [rw] business_day_config + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessDayConfig] + # Business days of the warehouse. + # If not set, will be Monday to Friday by default. + class Warehouse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The latest time of day that an order can be accepted and begin processing. + # Later orders will be processed in the next day. The time is based on the + # warehouse postal code. + # @!attribute [rw] hour + # @return [::Integer] + # Required. Hour of the cutoff time until which an order has to be placed to + # be processed in the same day by the warehouse. Hour is based on the + # timezone of warehouse. + # @!attribute [rw] minute + # @return [::Integer] + # Required. Minute of the cutoff time until which an order has to be placed + # to be processed in the same day by the warehouse. Minute is based on the + # timezone of warehouse. + class WarehouseCutoffTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Shipping address of the warehouse. + # @!attribute [rw] street_address + # @return [::String] + # Street-level part of the address. For example: `111w 31st Street`. + # @!attribute [rw] city + # @return [::String] + # Required. City, town or commune. May also include dependent localities or + # sublocalities (For example neighborhoods or suburbs). + # @!attribute [rw] administrative_area + # @return [::String] + # Required. Top-level administrative subdivision of the country. For example, + # a state like California ("CA") or a province like Quebec ("QC"). + # @!attribute [rw] postal_code + # @return [::String] + # Required. Postal code or ZIP (For example "94043"). + # @!attribute [rw] region_code + # @return [::String] + # Required. [CLDR country + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # (For example "US"). + class Address + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Time spent in various aspects from order to the delivery of the product. + # @!attribute [rw] min_transit_days + # @return [::Integer] + # Minimum number of business days that is spent in transit. 0 means same + # day delivery, 1 means next day delivery. + # Either `min_transit_days`, `max_transit_days` or + # `transit_time_table` must be set, but not both. + # @!attribute [rw] max_transit_days + # @return [::Integer] + # Maximum number of business days that is spent in transit. 0 means same + # day delivery, 1 means next day delivery. Must be greater than or equal + # to `min_transit_days`. + # @!attribute [rw] cutoff_time + # @return [::Google::Shopping::Merchant::Accounts::V1::CutoffTime] + # Business days cutoff time definition. + # If not configured the cutoff time will be defaulted to 8AM PST. + # @!attribute [rw] min_handling_days + # @return [::Integer] + # Minimum number of business days spent before an order is shipped. + # 0 means same day shipped, 1 means next day shipped. + # 'min_handling_days' and 'max_handling_days' should be either set or not set + # at the same time. + # @!attribute [rw] max_handling_days + # @return [::Integer] + # Maximum number of business days spent before an order is shipped. + # 0 means same day shipped, 1 means next day shipped. + # Must be greater than or equal to `min_handling_days`. + # 'min_handling_days' and 'max_handling_days' should be either set or not set + # at the same time. + # @!attribute [rw] transit_time_table + # @return [::Google::Shopping::Merchant::Accounts::V1::TransitTable] + # Transit time table, number of business days spent in transit based on row + # and column dimensions. Either `min_transit_days`, `max_transit_days` or + # `transit_time_table` can be set, but not both. + # @!attribute [rw] handling_business_day_config + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessDayConfig] + # The business days during which orders can be handled. + # If not provided, Monday to Friday business days will be assumed. + # @!attribute [rw] transit_business_day_config + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessDayConfig] + # The business days during which orders can be in-transit. + # If not provided, Monday to Friday business days will be assumed. + # @!attribute [rw] warehouse_based_delivery_times + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::WarehouseBasedDeliveryTime>] + # Optional. Indicates that the delivery time should be calculated per + # warehouse (shipping origin location) based on the settings of the selected + # carrier. When set, no other transit time related field in [delivery + # time][google.shopping.merchant.accounts.v1.DeliveryTime] should + # be set. + class DeliveryTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Business days cutoff time definition. + # @!attribute [rw] hour + # @return [::Integer] + # Required. Hour of the cutoff time until which an order has to be placed to + # be processed in the same day. + # @!attribute [rw] minute + # @return [::Integer] + # Required. Minute of the cutoff time until which an order has to be placed + # to be processed in the same day. + # @!attribute [rw] time_zone + # @return [::String] + # Required. [Timezone + # identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids) + # For example "Europe/Zurich". + class CutoffTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Business days of the warehouse. + # @!attribute [rw] business_days + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::BusinessDayConfig::Weekday>] + # Required. Regular business days. + # May not be empty. + class BusinessDayConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module Weekday + WEEKDAY_UNSPECIFIED = 0 + + MONDAY = 1 + + TUESDAY = 2 + + WEDNESDAY = 3 + + THURSDAY = 4 + + FRIDAY = 5 + + SATURDAY = 6 + + SUNDAY = 7 + end + end + + # Indicates that the delivery time should be calculated per warehouse + # (shipping origin location) based on the settings of the selected carrier. + # When set, no other transit time related field in `delivery_time` should be + # set. + # @!attribute [rw] carrier + # @return [::String] + # Required. Carrier, such as `"UPS"` or `"Fedex"`. + # [supported + # carriers](https://support.google.com/merchants/answer/7050921#zippy=%2Ccarrier-rates-au-de-uk-and-us-only) + # @!attribute [rw] carrier_service + # @return [::String] + # Required. Carrier service, such as `"ground"` or `"2 days"`. The name of + # the service must be in the eddSupportedServices list. + # @!attribute [rw] warehouse + # @return [::String] + # Required. Warehouse name. This should match + # {::Google::Shopping::Merchant::Accounts::V1::Warehouse warehouse}. + class WarehouseBasedDeliveryTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Shipping rate group definitions. Only the last one is allowed to have an + # empty `applicable_shipping_labels`, which means + # "everything else". The other `applicable_shipping_labels` must + # not overlap. + # @!attribute [rw] applicable_shipping_labels + # @return [::Array<::String>] + # Required. A list of [shipping + # labels](https://support.google.com/merchants/answer/6324504) defining the + # products to which this rate group applies to. This is a disjunction: only + # one of the labels has to match for the rate group to apply. May only be + # empty for the last rate group of a service. + # @!attribute [rw] single_value + # @return [::Google::Shopping::Merchant::Accounts::V1::Value] + # The value of the rate group (For example flat rate $10). Can only be set + # if `main_table` and `subtables` are not set. + # @!attribute [rw] main_table + # @return [::Google::Shopping::Merchant::Accounts::V1::Table] + # A table defining the rate group, when `single_value` is not + # expressive enough. Can only be set if `single_value` is not + # set. + # @!attribute [rw] subtables + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Table>] + # Optional. A list of subtables referred to by `main_table`. Can only + # be set if `main_table` is set. + # @!attribute [rw] carrier_rates + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::CarrierRate>] + # Optional. A list of carrier rates that can be referred to by + # `main_table` or `single_value`. + # @!attribute [rw] name + # @return [::String] + # Optional. Name of the rate group. + # If set has to be unique within shipping service. + class RateGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A table defining the rate group, when `single_value` is not + # expressive enough. + # @!attribute [rw] name + # @return [::String] + # Name of the table. Required for subtables, ignored for the main table. + # @!attribute [rw] row_headers + # @return [::Google::Shopping::Merchant::Accounts::V1::Headers] + # Required. Headers of the table's rows. + # @!attribute [rw] column_headers + # @return [::Google::Shopping::Merchant::Accounts::V1::Headers] + # Headers of the table's columns. Optional: if not set then the table has + # only one dimension. + # @!attribute [rw] rows + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Row>] + # Required. The list of rows that constitute the table. Must have the same + # length as `row_headers`. + class Table + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Transit time table, number of business days spent in transit based on row + # and column dimensions. Either `min_transit_days`, `max_transit_days` or + # `transit_time_table` can be set, but not both. + # @!attribute [rw] postal_code_group_names + # @return [::Array<::String>] + # Required. A list of region names + # {::Google::Shopping::Merchant::Accounts::V1::Region#name Region.name} . The last + # value can be + # `"all other locations"`. Example: + # `["zone 1", "zone 2", "all other locations"]`. The referred + # postal code groups must match the delivery country of the service. + # @!attribute [rw] transit_time_labels + # @return [::Array<::String>] + # Required. A list of transit time labels. The last value can be + # `"all other labels"`. Example: + # `["food", "electronics", "all other labels"]`. + # @!attribute [rw] rows + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::TransitTable::TransitTimeRow>] + # Required. If there's only one dimension set of `postal_code_group_names` or + # `transit_time_labels`, there are multiple rows each with one value + # for that dimension. If there are two dimensions, each row corresponds to a + # `postal_code_group_names`, and columns (values) to a + # `transit_time_labels`. + class TransitTable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # If there's only one dimension set of `postal_code_group_names` or + # `transit_time_labels`, there are multiple rows each with one value + # for that dimension. If there are two dimensions, each row corresponds to a + # `postal_code_group_names`, and columns (values) to a + # `transit_time_labels`. + # @!attribute [rw] values + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::TransitTable::TransitTimeRow::TransitTimeValue>] + # Required. Transit time range (min-max) in business days. + class TransitTimeRow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Transit time range (min-max) in business days. + # @!attribute [rw] min_transit_days + # @return [::Integer] + # Minimum transit time range in business days. 0 means same + # day delivery, 1 means next day delivery. + # @!attribute [rw] max_transit_days + # @return [::Integer] + # Must be greater than or equal to `min_transit_days`. + class TransitTimeValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Table of per store minimum order values for the pickup fulfillment type. + # @!attribute [rw] store_code_set_with_movs + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::MinimumOrderValueTable::StoreCodeSetWithMov>] + # Required. A list of store code sets sharing the same minimum order value + # (MOV). At least two sets are required and the last one must be empty, which + # signifies 'MOV for all other stores'. Each store code can only appear once + # across all the sets. All prices within a service must have the same + # currency. + class MinimumOrderValueTable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A list of store code sets sharing the same minimum order value. At least + # two sets are required and the last one must be empty, which signifies + # 'MOV for all other stores'. + # Each store code can only appear once across all the sets. + # All prices within a service must have the same currency. + # @!attribute [rw] store_codes + # @return [::Array<::String>] + # Optional. A list of unique store codes or empty for the catch all. + # @!attribute [rw] value + # @return [::Google::Shopping::Type::Price] + # The minimum order value for the given stores. + class StoreCodeSetWithMov + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A non-empty list of row or column headers for a table. + # Exactly one of `prices`, `weights`, + # `num_items`, `postal_code_group_names`, or + # `location` must be set. + # @!attribute [rw] prices + # @return [::Array<::Google::Shopping::Type::Price>] + # Required. A list of inclusive order price upper bounds. The last price's + # value can be infinity by setting price amount_micros = -1. For example + # `[{"amount_micros": 10000000, "currency_code": "USD"}, + # \\{"amount_micros": 500000000, "currency_code": "USD"}, + # \\{"amount_micros": -1, "currency_code": "USD"}]` represents the headers + # "<= $10", "<= $500", and "> $500". All prices within a service must have + # the same currency. Must be non-empty. Must be positive except -1. Can only + # be set if all other fields are not set. + # @!attribute [rw] weights + # @return [::Array<::Google::Shopping::Type::Weight>] + # Required. A list of inclusive order weight upper bounds. The last weight's + # value can be infinity by setting price amount_micros = -1. For example + # `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, + # "unit": "kg"}, + # \\{"amount_micros": -1, "unit": "kg"}]` represents the headers + # "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have + # the same unit. Must be non-empty. Must be positive except -1. Can only be + # set if all other fields are not set. + # @!attribute [rw] number_of_items + # @return [::Array<::String>] + # Required. A list of inclusive number of items upper bounds. The last value + # can be + # `"infinity"`. For example + # `["10", "50", "infinity"]` represents the headers + # "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can + # only be set if all other fields are not set. + # @!attribute [rw] postal_code_group_names + # @return [::Array<::String>] + # Required. A list of postal group names. The last value can be + # `"all other locations"`. Example: + # `["zone 1", "zone 2", "all other locations"]`. The referred + # postal code groups must match the delivery country of the service. Must + # be non-empty. Can only be set if all other fields are not set. + # @!attribute [rw] locations + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::LocationIdSet>] + # Required. A list of location ID sets. Must be non-empty. Can only be set if + # all other fields are not set. + class Headers + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of location ID sets. Must be non-empty. Can only be set if all + # other fields are not set. + # @!attribute [rw] location_ids + # @return [::Array<::String>] + # Required. A non-empty list of + # [location + # IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). + # They must all be of the same location type (For + # example, state). + class LocationIdSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Include a list of cells. + # @!attribute [rw] cells + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Value>] + # Required. The list of cells that constitute the row. Must have the same + # length as `columnHeaders` for two-dimensional tables, a length of 1 for + # one-dimensional tables. + class Row + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The single value of a rate group or the value of a rate group table's cell. + # Exactly one of `no_shipping`, `flat_rate`, + # `price_percentage`, `carrier_rateName`, + # `subtable_name` must be set. + # @!attribute [rw] no_shipping + # @return [::Boolean] + # If true, then the product can't be shipped. Must be true when set, can only + # be set if all other fields are not set. + # @!attribute [rw] flat_rate + # @return [::Google::Shopping::Type::Price] + # A flat rate. Can only be set if all other fields are not set. + # @!attribute [rw] price_percentage + # @return [::String] + # A percentage of the price represented as a number in decimal notation + # (For example, `"5.4"`). Can only be set if all other fields are not + # set. + # @!attribute [rw] carrier_rate + # @return [::String] + # The name of a carrier rate referring to a carrier rate defined in the + # same rate group. Can only be set if all other fields are not set. + # @!attribute [rw] subtable + # @return [::String] + # The name of a subtable. Can only be set in table cells (For example, not + # for single values), and only if all other fields are not set. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of carrier rates that can be referred to by + # `main_table` or `single_value`. + # Supported carrier services are defined in + # https://support.google.com/merchants/answer/12577710?ref_topic=12570808&sjid=10662598224319463032-NC#zippy=%2Cdelivery-cost-rate-type%2Ccarrier-rate-au-de-uk-and-us-only. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the carrier rate. Must be unique per rate group. + # @!attribute [rw] carrier + # @return [::String] + # Required. Carrier service, such as `"UPS"` or `"Fedex"`. + # @!attribute [rw] carrier_service + # @return [::String] + # Required. Carrier service, such as `"ground"` or `"2 days"`. + # @!attribute [rw] origin_postal_code + # @return [::String] + # Required. Shipping origin for this carrier rate. + # @!attribute [rw] percentage_adjustment + # @return [::String] + # Optional. Multiplicative shipping rate modifier as a number in decimal + # notation. Can be negative. For example `"5.4"` increases the rate by 5.4%, + # `"-3"` decreases the rate by 3%. + # @!attribute [rw] flat_adjustment + # @return [::Google::Shopping::Type::Price] + # Optional. Additive shipping rate modifier. Can be negative. For example + # `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate, + # `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the + # rate. + class CarrierRate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetShippingSetting` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the shipping setting to retrieve. + # Format: `accounts/{account}/shippingsettings` + class GetShippingSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertShippingSetting` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account for which this shipping setting will be inserted. If + # you are using an advanced account, you must specify the unique identifier + # of the sub-account for which you want to insert the shipping setting. + # Format: `accounts/{ACCOUNT_ID}` + # @!attribute [rw] shipping_setting + # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # Required. The new version of the account. + class InsertShippingSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservice.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservice.rb new file mode 100644 index 000000000000..d07a41cee44c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservice.rb @@ -0,0 +1,118 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # The `TermsOfService` message represents a specific version of the terms of + # service that merchants must accept to access certain features or services. + # For more information, see [Terms of + # Service](https://support.google.com/merchants/answer/160173). + # + # This message is important for the onboarding process, ensuring that merchants + # agree to the necessary legal agreements for using the service. Merchants can + # retrieve the latest terms of service for a given `kind` and `region` through + # `RetrieveLatestTermsOfService`, and accept them as required through + # `AcceptTermsOfService`. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @!attribute [rw] region_code + # @return [::String] + # Region code as defined by [CLDR](https://cldr.unicode.org/). This is either + # a country where the ToS applies specifically to that country or `001` when + # the same `TermsOfService` can be signed in any country. However note that + # when signing a ToS that applies globally we still expect that a specific + # country is provided (this should be merchant business country or program + # country of participation). + # @!attribute [rw] kind + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceKind] + # The Kind this terms of service version applies to. + # @!attribute [rw] file_uri + # @return [::String] + # URI for terms of service file that needs to be displayed to signing users. + # @!attribute [rw] external + # @return [::Boolean] + # Whether this terms of service version is external. External terms of + # service versions can only be agreed through external processes and not + # directly by the merchant through UI or API. + class TermsOfService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetTermsOfService` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + class GetTermsOfServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `RetrieveLatestTermsOfService` method. + # @!attribute [rw] region_code + # @return [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # @!attribute [rw] kind + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceKind] + # Required. The Kind this terms of service version applies to. + class RetrieveLatestTermsOfServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `AcceptTermsOfService` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @!attribute [rw] account + # @return [::String] + # Required. The account for which to accept the ToS. + # Format: `accounts/{account}` + # @!attribute [rw] region_code + # @return [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + class AcceptTermsOfServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `AcceptTermsOfService` method. + # @!attribute [rw] terms_of_service_agreement_state + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # The agreement state after accepting the ToS. + class AcceptTermsOfServiceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofserviceagreementstate.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofserviceagreementstate.rb new file mode 100644 index 000000000000..1f4550761503 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofserviceagreementstate.rb @@ -0,0 +1,136 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # This resource represents the agreement state for a given account and terms of + # service kind. + # The state is as follows: + # + # * If the business has accepted a terms of service, + # {::Google::Shopping::Merchant::Accounts::V1::Accepted `accepted`} + # will be populated, otherwise it will be empty + # * If the business must sign a terms of service, + # {::Google::Shopping::Merchant::Accounts::V1::Required `required`} + # will be populated, otherwise it will be empty. + # + # Note that both `required` and `accepted` can be present. In this case the + # `accepted` terms of services will have an expiration date set in the + # {::Google::Shopping::Merchant::Accounts::V1::Accepted#valid_until `valid_until`} + # field. The `required` terms of services need to be accepted before + # `valid_until` in order for the account to continue having a valid agreement. + # When accepting new terms of services we expect third-party providers to + # display the text associated with the given terms of service agreement (the + # url to the file containing the text is added in the Required message below as + # {::Google::Shopping::Merchant::Accounts::V1::Required#tos_file_uri `tos_file_uri`}). + # The actual acceptance of the terms of service is done by calling accept on + # the + # {::Google::Shopping::Merchant::Accounts::V1::Accepted#terms_of_service `TermsOfService`} + # resource. + # `valid_until` field. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the terms of service version. + # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` + # The identifier format is: + # `{[TermsOfServiceKind][google.shopping.merchant.accounts.v1.TermsOfServiceKind]}-{country}` + # For example, an identifier could be: `MERCHANT_CENTER-EU` or + # `MERCHANT_CENTER-US`. + # @!attribute [rw] region_code + # @return [::String] + # Required. Region code as defined by https://cldr.unicode.org/. This is the + # country the current state applies to. + # @!attribute [rw] terms_of_service_kind + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceKind] + # Required. Terms of Service kind associated with the particular version. + # @!attribute [rw] accepted + # @return [::Google::Shopping::Merchant::Accounts::V1::Accepted] + # Optional. The accepted terms of service of this kind and for the associated + # region_code + # @!attribute [rw] required + # @return [::Google::Shopping::Merchant::Accounts::V1::Required] + # Optional. The required terms of service + class TermsOfServiceAgreementState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the [accepted terms of + # service](https://developers.google.com/merchant/api/guides/accounts/create-and-configure#accept_the_merchant_center_terms_of_service). + # @!attribute [rw] terms_of_service + # @return [::String] + # Required. The accepted + # {::Google::Shopping::Merchant::Accounts::V1::TermsOfService termsOfService}. + # @!attribute [rw] accepted_by + # @return [::String] + # Required. The account where the acceptance was recorded. This can be the + # account itself or, in the case of subaccounts, the advanced account. + # @!attribute [rw] valid_until + # @return [::Google::Type::Date] + # Optional. When set, it states that the accepted `TermsOfService` is only + # valid until the end of this date (in UTC). A new one must be accepted + # before then. The information of the required `TermsOfService` is found in + # the `Required` message. + class Accepted + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the terms of service which are required to be accepted. + # @!attribute [rw] terms_of_service + # @return [::String] + # Required. The `TermsOfService` that need to be accepted. + # @!attribute [rw] tos_file_uri + # @return [::String] + # Required. Full URL to the terms of service file. This field is the same as + # `TermsOfService.file_uri`, it is added here for convenience only. + class Required + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetTermsOfServiceAgreementState` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the terms of service version. + # Format: `accounts/{account}/termsOfServiceAgreementStates/{identifier}` + # The identifier format is: `{TermsOfServiceKind}-{country}` + class GetTermsOfServiceAgreementStateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `RetrieveForApplicationTermsOfServiceAgreementState` + # method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account for which to get a TermsOfServiceAgreementState + # Format: `accounts/{account}` + class RetrieveForApplicationTermsOfServiceAgreementStateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservicekind.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservicekind.rb new file mode 100644 index 000000000000..e00fa7f79ae1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservicekind.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # The TermsOfService Kind. + module TermsOfServiceKind + # Default value. This value is unused. + TERMS_OF_SERVICE_KIND_UNSPECIFIED = 0 + + # Terms of service for the Merchant Center application. + MERCHANT_CENTER = 1 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/user.rb new file mode 100644 index 000000000000..c2a256030cd2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/user.rb @@ -0,0 +1,176 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # The `User` resource represents a user associated with a Merchant Center + # account. It is used to manage user permissions and access rights within the + # account. For more information, see [Frequently asked questions about people + # and access levels](//support.google.com/merchants/answer/12160472). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the user. + # Format: `accounts/{account}/user/{email}` + # + # Use `me` to refer to your own email address, for example + # `accounts/{account}/users/me`. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1::User::State] + # Output only. The state of the user. + # @!attribute [rw] access_rights + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccessRight>] + # Required. The [access + # rights](https://support.google.com/merchants/answer/12160472?sjid=6789834943175119429-EU#accesstypes) + # the user has. + class User + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state represents the possible statuses of a user. It is an output-only + # field that is set to `PENDING` when a user is invited to an account and + # changes to `VERIFIED` once the user accepts the invitation. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The user is pending confirmation. In this state, the user first needs to + # accept the invitation before performing other actions. + PENDING = 1 + + # The user is verified. + VERIFIED = 2 + end + end + + # Request message for the `GetUser` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the user to retrieve. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to retrieve the user corresponding to the caller by + # using `me` rather than an email address as in + # `accounts/{account}/users/me`. + class GetUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateUser` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the account for which a user will be + # created. Format: `accounts/{account}` + # @!attribute [rw] user_id + # @return [::String] + # Required. The email address of the user (for example, + # `john.doe@gmail.com`). + # @!attribute [rw] user + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # Optional. The user to create. + class CreateUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteUser` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the user to delete. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to delete the user corresponding to the caller by using + # `me` rather than an email address as in `accounts/{account}/users/me`. + class DeleteUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateUser` method. + # @!attribute [rw] user + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # Required. The new version of the user. + # + # Use `me` to refer to your own email address, for example + # `accounts/{account}/users/me`. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `access_rights` + class UpdateUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListUsers` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of users. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of users to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListUsers` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListUsers` must match + # the call that provided the page token. + class ListUsersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListUsers` method. + # @!attribute [rw] users + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::User>] + # The users from the specified account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListUsersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `VerifySelf` method. + # @!attribute [rw] account + # @return [::String] + # Required. The name of the account under which the caller is a user. + # Format: `accounts/{account}` + class VerifySelfRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/verificationmailsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/verificationmailsettings.rb new file mode 100644 index 000000000000..7c19a0ca8f38 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/verificationmailsettings.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1 + # Settings related to the verification email that is sent after adding a user. + # @!attribute [rw] verification_mail_mode + # @return [::Google::Shopping::Merchant::Accounts::V1::VerificationMailSettings::VerificationMailMode] + # Optional. Mode of the verification mail. If not set, the default is + # `SEND_VERIFICATION_MAIL`. + class VerificationMailSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The different configuration options for sending a verification email + # when adding a user. + module VerificationMailMode + # Default first member of every enum. Do not use. + VERIFICATION_MAIL_MODE_UNSPECIFIED = 0 + + # An invitation email is sent to the user added shortly after. + SEND_VERIFICATION_MAIL = 1 + + # No invitation email is sent. This can be useful if the user is + # expected to accept the invitation through the API without needing + # another notification. + SUPPRESS_VERIFICATION_MAIL = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/type/types.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! + + +module Google + module Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + + # Youtube shopping checkout. + YOUTUBE_SHOPPING_CHECKOUT = 7 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 8 + + # [Free vehicle + # listings](https://support.google.com/merchants/answer/11189169). + FREE_VEHICLE_LISTINGS = 9 + + # [Vehicle ads](https://support.google.com/merchants/answer/11189169). + VEHICLE_ADS = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free product listings on UCP + # checkout](https://developers.google.com/merchant/ucp). + FREE_LISTINGS_UCP_CHECKOUT = 19 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 18 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + + # [Product + # Reviews](https://support.google.com/merchants/answer/14620732). + PRODUCT_REVIEWS = 15 + + # [Merchant + # Reviews](https://developers.google.com/merchant-review-feeds). + MERCHANT_REVIEWS = 16 + + # YouTube Checkout + # . + YOUTUBE_CHECKOUT = 17 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/date.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..1d0a9780457f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/date.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values + # * A month and day value, with a zero year, such as an anniversary + # * A year on its own, with zero month and day values + # * A year and month value, with a zero day, such as a credit card expiration + # date + # + # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and + # `google.protobuf.Timestamp`. + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/datetime.rb new file mode 100644 index 000000000000..d15ba7af54e4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/latlng.rb new file mode 100644 index 000000000000..c15e78a39a56 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/type/phone_number.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/phone_number.rb new file mode 100644 index 000000000000..41b7c4af138c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/phone_number.rb @@ -0,0 +1,116 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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 representing a phone number, suitable as an API wire format. + # + # This representation: + # + # - should not be used for locale-specific formatting of a phone number, such + # as "+1 (650) 253-0000 ext. 123" + # + # - is not designed for efficient storage + # - may not be suitable for dialing - specialized libraries (see references) + # should be used to parse the number for that purpose + # + # To do something meaningful with this number, such as format it for various + # use-cases, convert it to an `i18n.phonenumbers.PhoneNumber` object first. + # + # For instance, in Java this would be: + # + # com.google.type.PhoneNumber wireProto = + # com.google.type.PhoneNumber.newBuilder().build(); + # com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber = + # PhoneNumberUtil.getInstance().parse(wireProto.getE164Number(), "ZZ"); + # if (!wireProto.getExtension().isEmpty()) { + # phoneNumber.setExtension(wireProto.getExtension()); + # } + # + # Reference(s): + # - https://github.com/google/libphonenumber + # @!attribute [rw] e164_number + # @return [::String] + # The phone number, represented as a leading plus sign ('+'), followed by a + # phone number that uses a relaxed ITU E.164 format consisting of the + # country calling code (1 to 3 digits) and the subscriber number, with no + # additional spaces or formatting, e.g.: + # - correct: "+15552220123" + # - incorrect: "+1 (555) 222-01234 x123". + # + # The ITU E.164 format limits the latter to 12 digits, but in practice not + # all countries respect that, so we relax that restriction here. + # National-only numbers are not allowed. + # + # References: + # - https://www.itu.int/rec/T-REC-E.164-201011-I + # - https://en.wikipedia.org/wiki/E.164. + # - https://en.wikipedia.org/wiki/List_of_country_calling_codes + # + # Note: The following fields are mutually exclusive: `e164_number`, `short_code`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] short_code + # @return [::Google::Type::PhoneNumber::ShortCode] + # A short code. + # + # Reference(s): + # - https://en.wikipedia.org/wiki/Short_code + # + # Note: The following fields are mutually exclusive: `short_code`, `e164_number`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] extension + # @return [::String] + # The phone number's extension. The extension is not standardized in ITU + # recommendations, except for being defined as a series of numbers with a + # maximum length of 40 digits. Other than digits, some other dialing + # characters such as ',' (indicating a wait) or '#' may be stored here. + # + # Note that no regions currently use extensions with short codes, so this + # field is normally only set in conjunction with an E.164 number. It is held + # separately from the E.164 number to allow for short code extensions in the + # future. + class PhoneNumber + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An object representing a short code, which is a phone number that is + # typically much shorter than regular phone numbers and can be used to + # address messages in MMS and SMS systems, as well as for abbreviated dialing + # (e.g. "Text 611 to see how many minutes you have remaining on your plan."). + # + # Short codes are restricted to a region and are not internationally + # dialable, which means the same short code can exist in different regions, + # with different usage and pricing, even if those regions share the same + # country calling code (e.g. US and CA). + # @!attribute [rw] region_code + # @return [::String] + # Required. The BCP-47 region code of the location where calls to this + # short code can be made, such as "US" and "BB". + # + # Reference(s): + # - http://www.unicode.org/reports/tr35/#unicode_region_subtag + # @!attribute [rw] number + # @return [::String] + # Required. The short code digits, without a leading plus ('+') or country + # calling code, e.g. "611". + class ShortCode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/postal_address.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/postal_address.rb new file mode 100644 index 000000000000..9cd0c16495dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/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-shopping-merchant-accounts-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/Gemfile new file mode 100644 index 000000000000..9dc0e8edd5b7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1", path: "../" +else + gem "google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/snippets/account_issue_service/list_account_issues.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_issue_service/list_account_issues.rb new file mode 100644 index 000000000000..e5b36a281fa8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_issue_service/list_account_issues.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 merchantapi_v1_generated_AccountIssueService_ListAccountIssues_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_account_issues call in the AccountIssueService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client#list_account_issues. +# +def list_account_issues + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new + + # Call the list_account_issues method. + result = client.list_account_issues request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountIssue. + p item + end +end +# [END merchantapi_v1_generated_AccountIssueService_ListAccountIssues_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/get_account_relationship.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/get_account_relationship.rb new file mode 100644 index 000000000000..553b02096e33 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/get_account_relationship.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_AccountRelationshipsService_GetAccountRelationship_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_account_relationship call in the AccountRelationshipsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#get_account_relationship. +# +def get_account_relationship + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new + + # Call the get_account_relationship method. + result = client.get_account_relationship request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. + p result +end +# [END merchantapi_v1_generated_AccountRelationshipsService_GetAccountRelationship_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/list_account_relationships.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/list_account_relationships.rb new file mode 100644 index 000000000000..ba6ade6cc82d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/list_account_relationships.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 merchantapi_v1_generated_AccountRelationshipsService_ListAccountRelationships_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_account_relationships call in the AccountRelationshipsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#list_account_relationships. +# +def list_account_relationships + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.new + + # Call the list_account_relationships method. + result = client.list_account_relationships request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship. + p item + end +end +# [END merchantapi_v1_generated_AccountRelationshipsService_ListAccountRelationships_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/update_account_relationship.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/update_account_relationship.rb new file mode 100644 index 000000000000..bd293a5ec954 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/update_account_relationship.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_AccountRelationshipsService_UpdateAccountRelationship_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_account_relationship call in the AccountRelationshipsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#update_account_relationship. +# +def update_account_relationship + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new + + # Call the update_account_relationship method. + result = client.update_account_relationship request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. + p result +end +# [END merchantapi_v1_generated_AccountRelationshipsService_UpdateAccountRelationship_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/approve_account_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/approve_account_service.rb new file mode 100644 index 000000000000..15bb0a60e7fb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/approve_account_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_AccountServicesService_ApproveAccountService_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the approve_account_service call in the AccountServicesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#approve_account_service. +# +def approve_account_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new + + # Call the approve_account_service method. + result = client.approve_account_service request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + p result +end +# [END merchantapi_v1_generated_AccountServicesService_ApproveAccountService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/get_account_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/get_account_service.rb new file mode 100644 index 000000000000..efde548c8d3a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/get_account_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_AccountServicesService_GetAccountService_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_account_service call in the AccountServicesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#get_account_service. +# +def get_account_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new + + # Call the get_account_service method. + result = client.get_account_service request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + p result +end +# [END merchantapi_v1_generated_AccountServicesService_GetAccountService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/list_account_services.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/list_account_services.rb new file mode 100644 index 000000000000..7f3bc9400305 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/list_account_services.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 merchantapi_v1_generated_AccountServicesService_ListAccountServices_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_account_services call in the AccountServicesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#list_account_services. +# +def list_account_services + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.new + + # Call the list_account_services method. + result = client.list_account_services request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountService. + p item + end +end +# [END merchantapi_v1_generated_AccountServicesService_ListAccountServices_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/propose_account_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/propose_account_service.rb new file mode 100644 index 000000000000..c8817e7bf93f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/propose_account_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_AccountServicesService_ProposeAccountService_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the propose_account_service call in the AccountServicesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#propose_account_service. +# +def propose_account_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new + + # Call the propose_account_service method. + result = client.propose_account_service request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + p result +end +# [END merchantapi_v1_generated_AccountServicesService_ProposeAccountService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/reject_account_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/reject_account_service.rb new file mode 100644 index 000000000000..336b00dc83a0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/reject_account_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_AccountServicesService_RejectAccountService_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the reject_account_service call in the AccountServicesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#reject_account_service. +# +def reject_account_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new + + # Call the reject_account_service method. + result = client.reject_account_service request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_AccountServicesService_RejectAccountService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_and_configure_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_and_configure_account.rb new file mode 100644 index 000000000000..015810cb732a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_and_configure_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_AccountsService_CreateAndConfigureAccount_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the create_and_configure_account call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#create_and_configure_account. +# +def create_and_configure_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new + + # Call the create_and_configure_account method. + result = client.create_and_configure_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + p result +end +# [END merchantapi_v1_generated_AccountsService_CreateAndConfigureAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_test_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_test_account.rb new file mode 100644 index 000000000000..2e2bebb12c1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_test_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_AccountsService_CreateTestAccount_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the create_test_account call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#create_test_account. +# +def create_test_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest.new + + # Call the create_test_account method. + result = client.create_test_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + p result +end +# [END merchantapi_v1_generated_AccountsService_CreateTestAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/delete_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/delete_account.rb new file mode 100644 index 000000000000..ea4c1cfb2331 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/delete_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_AccountsService_DeleteAccount_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the delete_account call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#delete_account. +# +def delete_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new + + # Call the delete_account method. + result = client.delete_account request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_AccountsService_DeleteAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/get_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/get_account.rb new file mode 100644 index 000000000000..48a9b68de530 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/get_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_AccountsService_GetAccount_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_account call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#get_account. +# +def get_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new + + # Call the get_account method. + result = client.get_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + p result +end +# [END merchantapi_v1_generated_AccountsService_GetAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_accounts.rb new file mode 100644 index 000000000000..d7b9b4aa7e6d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_accounts.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 merchantapi_v1_generated_AccountsService_ListAccounts_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_accounts call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_accounts. +# +def list_accounts + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new + + # Call the list_accounts method. + result = client.list_accounts request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Account. + p item + end +end +# [END merchantapi_v1_generated_AccountsService_ListAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_sub_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_sub_accounts.rb new file mode 100644 index 000000000000..48d5feea370c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_sub_accounts.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 merchantapi_v1_generated_AccountsService_ListSubAccounts_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_sub_accounts call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_sub_accounts. +# +def list_sub_accounts + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new + + # Call the list_sub_accounts method. + result = client.list_sub_accounts request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Account. + p item + end +end +# [END merchantapi_v1_generated_AccountsService_ListSubAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/update_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/update_account.rb new file mode 100644 index 000000000000..2f82e5dc2fcb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/update_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_AccountsService_UpdateAccount_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_account call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#update_account. +# +def update_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new + + # Call the update_account method. + result = client.update_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + p result +end +# [END merchantapi_v1_generated_AccountsService_UpdateAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/get_autofeed_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/get_autofeed_settings.rb new file mode 100644 index 000000000000..63c77b09af59 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/get_autofeed_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_AutofeedSettingsService_GetAutofeedSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_autofeed_settings call in the AutofeedSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#get_autofeed_settings. +# +def get_autofeed_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new + + # Call the get_autofeed_settings method. + result = client.get_autofeed_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. + p result +end +# [END merchantapi_v1_generated_AutofeedSettingsService_GetAutofeedSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/update_autofeed_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/update_autofeed_settings.rb new file mode 100644 index 000000000000..a9e87bf5c182 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/update_autofeed_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_autofeed_settings call in the AutofeedSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#update_autofeed_settings. +# +def update_autofeed_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new + + # Call the update_autofeed_settings method. + result = client.update_autofeed_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. + p result +end +# [END merchantapi_v1_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/get_automatic_improvements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/get_automatic_improvements.rb new file mode 100644 index 000000000000..49e950ba9557 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/get_automatic_improvements.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_automatic_improvements call in the AutomaticImprovementsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#get_automatic_improvements. +# +def get_automatic_improvements + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new + + # Call the get_automatic_improvements method. + result = client.get_automatic_improvements request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. + p result +end +# [END merchantapi_v1_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/update_automatic_improvements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/update_automatic_improvements.rb new file mode 100644 index 000000000000..19aa2b6818e9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/update_automatic_improvements.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_automatic_improvements call in the AutomaticImprovementsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#update_automatic_improvements. +# +def update_automatic_improvements + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new + + # Call the update_automatic_improvements method. + result = client.update_automatic_improvements request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. + p result +end +# [END merchantapi_v1_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_identity_service/get_business_identity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_identity_service/get_business_identity.rb new file mode 100644 index 000000000000..a44263807bcd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_identity_service/get_business_identity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_BusinessIdentityService_GetBusinessIdentity_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_business_identity call in the BusinessIdentityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#get_business_identity. +# +def get_business_identity + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new + + # Call the get_business_identity method. + result = client.get_business_identity request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. + p result +end +# [END merchantapi_v1_generated_BusinessIdentityService_GetBusinessIdentity_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_identity_service/update_business_identity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_identity_service/update_business_identity.rb new file mode 100644 index 000000000000..de6373fb24c6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_identity_service/update_business_identity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_BusinessIdentityService_UpdateBusinessIdentity_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_business_identity call in the BusinessIdentityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#update_business_identity. +# +def update_business_identity + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new + + # Call the update_business_identity method. + result = client.update_business_identity request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. + p result +end +# [END merchantapi_v1_generated_BusinessIdentityService_UpdateBusinessIdentity_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_info_service/get_business_info.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_info_service/get_business_info.rb new file mode 100644 index 000000000000..7b5dcdbb2be9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_info_service/get_business_info.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_BusinessInfoService_GetBusinessInfo_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_business_info call in the BusinessInfoService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#get_business_info. +# +def get_business_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new + + # Call the get_business_info method. + result = client.get_business_info request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. + p result +end +# [END merchantapi_v1_generated_BusinessInfoService_GetBusinessInfo_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_info_service/update_business_info.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_info_service/update_business_info.rb new file mode 100644 index 000000000000..63809bf76f3c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_info_service/update_business_info.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_BusinessInfoService_UpdateBusinessInfo_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_business_info call in the BusinessInfoService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#update_business_info. +# +def update_business_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new + + # Call the update_business_info method. + result = client.update_business_info request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. + p result +end +# [END merchantapi_v1_generated_BusinessInfoService_UpdateBusinessInfo_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/create_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/create_checkout_settings.rb new file mode 100644 index 000000000000..ff3625872d53 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/create_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the create_checkout_settings call in the CheckoutSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#create_checkout_settings. +# +def create_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new + + # Call the create_checkout_settings method. + result = client.create_checkout_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + p result +end +# [END merchantapi_v1_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/delete_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/delete_checkout_settings.rb new file mode 100644 index 000000000000..8654d4de4910 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/delete_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the delete_checkout_settings call in the CheckoutSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#delete_checkout_settings. +# +def delete_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new + + # Call the delete_checkout_settings method. + result = client.delete_checkout_settings request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/get_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/get_checkout_settings.rb new file mode 100644 index 000000000000..e7e531bc9d80 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/get_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_CheckoutSettingsService_GetCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_checkout_settings call in the CheckoutSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#get_checkout_settings. +# +def get_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new + + # Call the get_checkout_settings method. + result = client.get_checkout_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + p result +end +# [END merchantapi_v1_generated_CheckoutSettingsService_GetCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/update_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/update_checkout_settings.rb new file mode 100644 index 000000000000..5c3b5965bafa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/update_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_checkout_settings call in the CheckoutSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#update_checkout_settings. +# +def update_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new + + # Call the update_checkout_settings method. + result = client.update_checkout_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + p result +end +# [END merchantapi_v1_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_account_for_gcp_registration.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_account_for_gcp_registration.rb new file mode 100644 index 000000000000..457412177841 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_account_for_gcp_registration.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_DeveloperRegistrationService_GetAccountForGcpRegistration_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_account_for_gcp_registration call in the DeveloperRegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#get_account_for_gcp_registration. +# +def get_account_for_gcp_registration + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Protobuf::Empty.new + + # Call the get_account_for_gcp_registration method. + result = client.get_account_for_gcp_registration request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse. + p result +end +# [END merchantapi_v1_generated_DeveloperRegistrationService_GetAccountForGcpRegistration_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_developer_registration.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_developer_registration.rb new file mode 100644 index 000000000000..0e03fc905a8f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_developer_registration.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_DeveloperRegistrationService_GetDeveloperRegistration_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_developer_registration call in the DeveloperRegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#get_developer_registration. +# +def get_developer_registration + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new + + # Call the get_developer_registration method. + result = client.get_developer_registration request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration. + p result +end +# [END merchantapi_v1_generated_DeveloperRegistrationService_GetDeveloperRegistration_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/register_gcp.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/register_gcp.rb new file mode 100644 index 000000000000..8d3df36efa7c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/register_gcp.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_DeveloperRegistrationService_RegisterGcp_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the register_gcp call in the DeveloperRegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#register_gcp. +# +def register_gcp + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new + + # Call the register_gcp method. + result = client.register_gcp request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration. + p result +end +# [END merchantapi_v1_generated_DeveloperRegistrationService_RegisterGcp_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/unregister_gcp.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/unregister_gcp.rb new file mode 100644 index 000000000000..a912f2e25933 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/unregister_gcp.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_DeveloperRegistrationService_UnregisterGcp_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the unregister_gcp call in the DeveloperRegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#unregister_gcp. +# +def unregister_gcp + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new + + # Call the unregister_gcp method. + result = client.unregister_gcp request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_DeveloperRegistrationService_UnregisterGcp_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/get_email_preferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/get_email_preferences.rb new file mode 100644 index 000000000000..ed7e795f20ca --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/get_email_preferences.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_EmailPreferencesService_GetEmailPreferences_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_email_preferences call in the EmailPreferencesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#get_email_preferences. +# +def get_email_preferences + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new + + # Call the get_email_preferences method. + result = client.get_email_preferences request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. + p result +end +# [END merchantapi_v1_generated_EmailPreferencesService_GetEmailPreferences_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/update_email_preferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/update_email_preferences.rb new file mode 100644 index 000000000000..be8e100a92c2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/update_email_preferences.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_EmailPreferencesService_UpdateEmailPreferences_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_email_preferences call in the EmailPreferencesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#update_email_preferences. +# +def update_email_preferences + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new + + # Call the update_email_preferences method. + result = client.update_email_preferences request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. + p result +end +# [END merchantapi_v1_generated_EmailPreferencesService_UpdateEmailPreferences_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/link_gbp_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/link_gbp_account.rb new file mode 100644 index 000000000000..66d6a9e13037 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/link_gbp_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_GbpAccountsService_LinkGbpAccount_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the link_gbp_account call in the GbpAccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#link_gbp_account. +# +def link_gbp_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new + + # Call the link_gbp_account method. + result = client.link_gbp_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse. + p result +end +# [END merchantapi_v1_generated_GbpAccountsService_LinkGbpAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/list_gbp_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/list_gbp_accounts.rb new file mode 100644 index 000000000000..55b507f95e1f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/list_gbp_accounts.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 merchantapi_v1_generated_GbpAccountsService_ListGbpAccounts_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_gbp_accounts call in the GbpAccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#list_gbp_accounts. +# +def list_gbp_accounts + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.new + + # Call the list_gbp_accounts method. + result = client.list_gbp_accounts request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::GbpAccount. + p item + end +end +# [END merchantapi_v1_generated_GbpAccountsService_ListGbpAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/claim_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/claim_homepage.rb new file mode 100644 index 000000000000..9a759d791ca8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/claim_homepage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_HomepageService_ClaimHomepage_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the claim_homepage call in the HomepageService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#claim_homepage. +# +def claim_homepage + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new + + # Call the claim_homepage method. + result = client.claim_homepage request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + p result +end +# [END merchantapi_v1_generated_HomepageService_ClaimHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/get_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/get_homepage.rb new file mode 100644 index 000000000000..68b8b983a590 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/get_homepage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_HomepageService_GetHomepage_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_homepage call in the HomepageService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#get_homepage. +# +def get_homepage + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new + + # Call the get_homepage method. + result = client.get_homepage request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + p result +end +# [END merchantapi_v1_generated_HomepageService_GetHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/unclaim_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/unclaim_homepage.rb new file mode 100644 index 000000000000..b8ce229741a2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/unclaim_homepage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_HomepageService_UnclaimHomepage_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the unclaim_homepage call in the HomepageService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#unclaim_homepage. +# +def unclaim_homepage + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new + + # Call the unclaim_homepage method. + result = client.unclaim_homepage request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + p result +end +# [END merchantapi_v1_generated_HomepageService_UnclaimHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/update_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/update_homepage.rb new file mode 100644 index 000000000000..6a3b8bf4bb66 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/update_homepage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_HomepageService_UpdateHomepage_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_homepage call in the HomepageService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#update_homepage. +# +def update_homepage + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new + + # Call the update_homepage method. + result = client.update_homepage request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + p result +end +# [END merchantapi_v1_generated_HomepageService_UpdateHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/find_lfp_providers.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/find_lfp_providers.rb new file mode 100644 index 000000000000..e78aac0ac59b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/find_lfp_providers.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_LfpProvidersService_FindLfpProviders_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the find_lfp_providers call in the LfpProvidersService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#find_lfp_providers. +# +def find_lfp_providers + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.new + + # Call the find_lfp_providers method. + result = client.find_lfp_providers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::LfpProvider. + p item + end +end +# [END merchantapi_v1_generated_LfpProvidersService_FindLfpProviders_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/link_lfp_provider.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/link_lfp_provider.rb new file mode 100644 index 000000000000..277192f3a8de --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/link_lfp_provider.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_LfpProvidersService_LinkLfpProvider_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the link_lfp_provider call in the LfpProvidersService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#link_lfp_provider. +# +def link_lfp_provider + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new + + # Call the link_lfp_provider method. + result = client.link_lfp_provider request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse. + p result +end +# [END merchantapi_v1_generated_LfpProvidersService_LinkLfpProvider_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/create_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/create_omnichannel_setting.rb new file mode 100644 index 000000000000..78dd2a732a40 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/create_omnichannel_setting.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the create_omnichannel_setting call in the OmnichannelSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#create_omnichannel_setting. +# +def create_omnichannel_setting + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new + + # Call the create_omnichannel_setting method. + result = client.create_omnichannel_setting request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + p result +end +# [END merchantapi_v1_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/get_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/get_omnichannel_setting.rb new file mode 100644 index 000000000000..fd593f4b258b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/get_omnichannel_setting.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_omnichannel_setting call in the OmnichannelSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#get_omnichannel_setting. +# +def get_omnichannel_setting + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new + + # Call the get_omnichannel_setting method. + result = client.get_omnichannel_setting request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + p result +end +# [END merchantapi_v1_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/list_omnichannel_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/list_omnichannel_settings.rb new file mode 100644 index 000000000000..0a8ba4b80dda --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/list_omnichannel_settings.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 merchantapi_v1_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_omnichannel_settings call in the OmnichannelSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#list_omnichannel_settings. +# +def list_omnichannel_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.new + + # Call the list_omnichannel_settings method. + result = client.list_omnichannel_settings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + p item + end +end +# [END merchantapi_v1_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/request_inventory_verification.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/request_inventory_verification.rb new file mode 100644 index 000000000000..076ba53393ea --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/request_inventory_verification.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_OmnichannelSettingsService_RequestInventoryVerification_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the request_inventory_verification call in the OmnichannelSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#request_inventory_verification. +# +def request_inventory_verification + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new + + # Call the request_inventory_verification method. + result = client.request_inventory_verification request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse. + p result +end +# [END merchantapi_v1_generated_OmnichannelSettingsService_RequestInventoryVerification_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/update_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/update_omnichannel_setting.rb new file mode 100644 index 000000000000..c0fa5b526acc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/update_omnichannel_setting.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_omnichannel_setting call in the OmnichannelSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#update_omnichannel_setting. +# +def update_omnichannel_setting + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new + + # Call the update_omnichannel_setting method. + result = client.update_omnichannel_setting request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + p result +end +# [END merchantapi_v1_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/create_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/create_online_return_policy.rb new file mode 100644 index 000000000000..6531fd8ef92d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/create_online_return_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 merchantapi_v1_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the create_online_return_policy call in the OnlineReturnPolicyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#create_online_return_policy. +# +def create_online_return_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new + + # Call the create_online_return_policy method. + result = client.create_online_return_policy request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. + p result +end +# [END merchantapi_v1_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/delete_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/delete_online_return_policy.rb new file mode 100644 index 000000000000..89dff99eaa44 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/delete_online_return_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 merchantapi_v1_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the delete_online_return_policy call in the OnlineReturnPolicyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#delete_online_return_policy. +# +def delete_online_return_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new + + # Call the delete_online_return_policy method. + result = client.delete_online_return_policy request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/get_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/get_online_return_policy.rb new file mode 100644 index 000000000000..bd78b08d148c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/get_online_return_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 merchantapi_v1_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_online_return_policy call in the OnlineReturnPolicyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#get_online_return_policy. +# +def get_online_return_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new + + # Call the get_online_return_policy method. + result = client.get_online_return_policy request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. + p result +end +# [END merchantapi_v1_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/list_online_return_policies.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/list_online_return_policies.rb new file mode 100644 index 000000000000..94be76732d31 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/list_online_return_policies.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 merchantapi_v1_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_online_return_policies call in the OnlineReturnPolicyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#list_online_return_policies. +# +def list_online_return_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.new + + # Call the list_online_return_policies method. + result = client.list_online_return_policies request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. + p item + end +end +# [END merchantapi_v1_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/disable_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/disable_program.rb new file mode 100644 index 000000000000..f6b6f781e1bf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/disable_program.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ProgramsService_DisableProgram_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the disable_program call in the ProgramsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#disable_program. +# +def disable_program + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new + + # Call the disable_program method. + result = client.disable_program request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + p result +end +# [END merchantapi_v1_generated_ProgramsService_DisableProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/enable_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/enable_program.rb new file mode 100644 index 000000000000..900090789c06 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/enable_program.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ProgramsService_EnableProgram_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the enable_program call in the ProgramsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#enable_program. +# +def enable_program + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new + + # Call the enable_program method. + result = client.enable_program request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + p result +end +# [END merchantapi_v1_generated_ProgramsService_EnableProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/get_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/get_program.rb new file mode 100644 index 000000000000..1a675b41a36f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/get_program.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ProgramsService_GetProgram_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_program call in the ProgramsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#get_program. +# +def get_program + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new + + # Call the get_program method. + result = client.get_program request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + p result +end +# [END merchantapi_v1_generated_ProgramsService_GetProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/list_programs.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/list_programs.rb new file mode 100644 index 000000000000..271b0572f3fb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/list_programs.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 merchantapi_v1_generated_ProgramsService_ListPrograms_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_programs call in the ProgramsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#list_programs. +# +def list_programs + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.new + + # Call the list_programs method. + result = client.list_programs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Program. + p item + end +end +# [END merchantapi_v1_generated_ProgramsService_ListPrograms_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_create_regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_create_regions.rb new file mode 100644 index 000000000000..cd65362fe413 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_create_regions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_RegionsService_BatchCreateRegions_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the batch_create_regions call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_create_regions. +# +def batch_create_regions + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest.new + + # Call the batch_create_regions method. + result = client.batch_create_regions request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse. + p result +end +# [END merchantapi_v1_generated_RegionsService_BatchCreateRegions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_delete_regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_delete_regions.rb new file mode 100644 index 000000000000..bc2309b6a1e9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_delete_regions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_RegionsService_BatchDeleteRegions_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the batch_delete_regions call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_delete_regions. +# +def batch_delete_regions + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest.new + + # Call the batch_delete_regions method. + result = client.batch_delete_regions request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_RegionsService_BatchDeleteRegions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_update_regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_update_regions.rb new file mode 100644 index 000000000000..93b5d2883b0f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_update_regions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_RegionsService_BatchUpdateRegions_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the batch_update_regions call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_update_regions. +# +def batch_update_regions + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest.new + + # Call the batch_update_regions method. + result = client.batch_update_regions request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse. + p result +end +# [END merchantapi_v1_generated_RegionsService_BatchUpdateRegions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/create_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/create_region.rb new file mode 100644 index 000000000000..97da61cc61a4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/create_region.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_RegionsService_CreateRegion_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the create_region call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#create_region. +# +def create_region + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new + + # Call the create_region method. + result = client.create_region request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + p result +end +# [END merchantapi_v1_generated_RegionsService_CreateRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/delete_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/delete_region.rb new file mode 100644 index 000000000000..043ff24d67a7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/delete_region.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_RegionsService_DeleteRegion_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the delete_region call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#delete_region. +# +def delete_region + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new + + # Call the delete_region method. + result = client.delete_region request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_RegionsService_DeleteRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/get_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/get_region.rb new file mode 100644 index 000000000000..88544ad8b5c2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/get_region.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_RegionsService_GetRegion_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_region call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#get_region. +# +def get_region + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new + + # Call the get_region method. + result = client.get_region request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + p result +end +# [END merchantapi_v1_generated_RegionsService_GetRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/list_regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/list_regions.rb new file mode 100644 index 000000000000..bd30bcd2027c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/list_regions.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 merchantapi_v1_generated_RegionsService_ListRegions_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_regions call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#list_regions. +# +def list_regions + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.new + + # Call the list_regions method. + result = client.list_regions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Region. + p item + end +end +# [END merchantapi_v1_generated_RegionsService_ListRegions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/update_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/update_region.rb new file mode 100644 index 000000000000..a170234982c5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/update_region.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_RegionsService_UpdateRegion_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_region call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#update_region. +# +def update_region + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new + + # Call the update_region method. + result = client.update_region request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + p result +end +# [END merchantapi_v1_generated_RegionsService_UpdateRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/get_shipping_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/get_shipping_settings.rb new file mode 100644 index 000000000000..a8c386d3517c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/get_shipping_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ShippingSettingsService_GetShippingSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_shipping_settings call in the ShippingSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#get_shipping_settings. +# +def get_shipping_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new + + # Call the get_shipping_settings method. + result = client.get_shipping_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. + p result +end +# [END merchantapi_v1_generated_ShippingSettingsService_GetShippingSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/insert_shipping_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/insert_shipping_settings.rb new file mode 100644 index 000000000000..75e5c60eb8ec --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/insert_shipping_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ShippingSettingsService_InsertShippingSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the insert_shipping_settings call in the ShippingSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#insert_shipping_settings. +# +def insert_shipping_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new + + # Call the insert_shipping_settings method. + result = client.insert_shipping_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. + p result +end +# [END merchantapi_v1_generated_ShippingSettingsService_InsertShippingSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json new file mode 100644 index 000000000000..eae9344032a0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json @@ -0,0 +1,3055 @@ +{ + "client_library": { + "name": "google-shopping-merchant-accounts-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.accounts.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_AccountIssueService_ListAccountIssues_sync", + "title": "Snippet for the list_account_issues call in the AccountIssueService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client#list_account_issues.", + "file": "account_issue_service/list_account_issues.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_account_issues", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client#list_account_issues", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse", + "client": { + "short_name": "AccountIssueService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client" + }, + "method": { + "short_name": "ListAccountIssues", + "full_name": "google.shopping.merchant.accounts.v1.AccountIssueService.ListAccountIssues", + "service": { + "short_name": "AccountIssueService", + "full_name": "google.shopping.merchant.accounts.v1.AccountIssueService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountRelationshipsService_GetAccountRelationship_sync", + "title": "Snippet for the get_account_relationship call in the AccountRelationshipsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#get_account_relationship.", + "file": "account_relationships_service/get_account_relationship.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_account_relationship", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#get_account_relationship", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationship", + "client": { + "short_name": "AccountRelationshipsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client" + }, + "method": { + "short_name": "GetAccountRelationship", + "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService.GetAccountRelationship", + "service": { + "short_name": "AccountRelationshipsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountRelationshipsService_UpdateAccountRelationship_sync", + "title": "Snippet for the update_account_relationship call in the AccountRelationshipsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#update_account_relationship.", + "file": "account_relationships_service/update_account_relationship.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_account_relationship", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#update_account_relationship", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationship", + "client": { + "short_name": "AccountRelationshipsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client" + }, + "method": { + "short_name": "UpdateAccountRelationship", + "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService.UpdateAccountRelationship", + "service": { + "short_name": "AccountRelationshipsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountRelationshipsService_ListAccountRelationships_sync", + "title": "Snippet for the list_account_relationships call in the AccountRelationshipsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#list_account_relationships.", + "file": "account_relationships_service/list_account_relationships.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_account_relationships", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#list_account_relationships", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse", + "client": { + "short_name": "AccountRelationshipsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client" + }, + "method": { + "short_name": "ListAccountRelationships", + "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService.ListAccountRelationships", + "service": { + "short_name": "AccountRelationshipsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountServicesService_GetAccountService_sync", + "title": "Snippet for the get_account_service call in the AccountServicesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#get_account_service.", + "file": "account_services_service/get_account_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_account_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#get_account_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AccountService", + "client": { + "short_name": "AccountServicesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client" + }, + "method": { + "short_name": "GetAccountService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService.GetAccountService", + "service": { + "short_name": "AccountServicesService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountServicesService_ListAccountServices_sync", + "title": "Snippet for the list_account_services call in the AccountServicesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#list_account_services.", + "file": "account_services_service/list_account_services.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_account_services", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#list_account_services", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse", + "client": { + "short_name": "AccountServicesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client" + }, + "method": { + "short_name": "ListAccountServices", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService.ListAccountServices", + "service": { + "short_name": "AccountServicesService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountServicesService_ProposeAccountService_sync", + "title": "Snippet for the propose_account_service call in the AccountServicesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#propose_account_service.", + "file": "account_services_service/propose_account_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "propose_account_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#propose_account_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AccountService", + "client": { + "short_name": "AccountServicesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client" + }, + "method": { + "short_name": "ProposeAccountService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService.ProposeAccountService", + "service": { + "short_name": "AccountServicesService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountServicesService_ApproveAccountService_sync", + "title": "Snippet for the approve_account_service call in the AccountServicesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#approve_account_service.", + "file": "account_services_service/approve_account_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "approve_account_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#approve_account_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AccountService", + "client": { + "short_name": "AccountServicesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client" + }, + "method": { + "short_name": "ApproveAccountService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService.ApproveAccountService", + "service": { + "short_name": "AccountServicesService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountServicesService_RejectAccountService_sync", + "title": "Snippet for the reject_account_service call in the AccountServicesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#reject_account_service.", + "file": "account_services_service/reject_account_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "reject_account_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#reject_account_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AccountServicesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client" + }, + "method": { + "short_name": "RejectAccountService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService.RejectAccountService", + "service": { + "short_name": "AccountServicesService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_UserService_GetUser_sync", + "title": "Snippet for the get_user call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#get_user.", + "file": "user_service/get_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_user", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#get_user", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::User", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" + }, + "method": { + "short_name": "GetUser", + "full_name": "google.shopping.merchant.accounts.v1.UserService.GetUser", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_UserService_CreateUser_sync", + "title": "Snippet for the create_user call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#create_user.", + "file": "user_service/create_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_user", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#create_user", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::User", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" + }, + "method": { + "short_name": "CreateUser", + "full_name": "google.shopping.merchant.accounts.v1.UserService.CreateUser", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_UserService_DeleteUser_sync", + "title": "Snippet for the delete_user call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#delete_user.", + "file": "user_service/delete_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_user", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#delete_user", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" + }, + "method": { + "short_name": "DeleteUser", + "full_name": "google.shopping.merchant.accounts.v1.UserService.DeleteUser", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_UserService_UpdateUser_sync", + "title": "Snippet for the update_user call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#update_user.", + "file": "user_service/update_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_user", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#update_user", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::User", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" + }, + "method": { + "short_name": "UpdateUser", + "full_name": "google.shopping.merchant.accounts.v1.UserService.UpdateUser", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_UserService_ListUsers_sync", + "title": "Snippet for the list_users call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#list_users.", + "file": "user_service/list_users.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_users", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#list_users", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" + }, + "method": { + "short_name": "ListUsers", + "full_name": "google.shopping.merchant.accounts.v1.UserService.ListUsers", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_UserService_VerifySelf_sync", + "title": "Snippet for the verify_self call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#verify_self.", + "file": "user_service/verify_self.rb", + "language": "RUBY", + "client_method": { + "short_name": "verify_self", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#verify_self", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::User", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" + }, + "method": { + "short_name": "VerifySelf", + "full_name": "google.shopping.merchant.accounts.v1.UserService.VerifySelf", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountsService_GetAccount_sync", + "title": "Snippet for the get_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#get_account.", + "file": "accounts_service/get_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#get_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" + }, + "method": { + "short_name": "GetAccount", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService.GetAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountsService_CreateAndConfigureAccount_sync", + "title": "Snippet for the create_and_configure_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#create_and_configure_account.", + "file": "accounts_service/create_and_configure_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_and_configure_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#create_and_configure_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" + }, + "method": { + "short_name": "CreateAndConfigureAccount", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService.CreateAndConfigureAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountsService_CreateTestAccount_sync", + "title": "Snippet for the create_test_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#create_test_account.", + "file": "accounts_service/create_test_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_test_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#create_test_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" + }, + "method": { + "short_name": "CreateTestAccount", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService.CreateTestAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountsService_DeleteAccount_sync", + "title": "Snippet for the delete_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#delete_account.", + "file": "accounts_service/delete_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#delete_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" + }, + "method": { + "short_name": "DeleteAccount", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService.DeleteAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountsService_UpdateAccount_sync", + "title": "Snippet for the update_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#update_account.", + "file": "accounts_service/update_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#update_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" + }, + "method": { + "short_name": "UpdateAccount", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService.UpdateAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountsService_ListAccounts_sync", + "title": "Snippet for the list_accounts call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_accounts.", + "file": "accounts_service/list_accounts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_accounts", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_accounts", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" + }, + "method": { + "short_name": "ListAccounts", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService.ListAccounts", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountsService_ListSubAccounts_sync", + "title": "Snippet for the list_sub_accounts call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_sub_accounts.", + "file": "accounts_service/list_sub_accounts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sub_accounts", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_sub_accounts", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" + }, + "method": { + "short_name": "ListSubAccounts", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService.ListSubAccounts", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AutofeedSettingsService_GetAutofeedSettings_sync", + "title": "Snippet for the get_autofeed_settings call in the AutofeedSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#get_autofeed_settings.", + "file": "autofeed_settings_service/get_autofeed_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_autofeed_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#get_autofeed_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings", + "client": { + "short_name": "AutofeedSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client" + }, + "method": { + "short_name": "GetAutofeedSettings", + "full_name": "google.shopping.merchant.accounts.v1.AutofeedSettingsService.GetAutofeedSettings", + "service": { + "short_name": "AutofeedSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.AutofeedSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync", + "title": "Snippet for the update_autofeed_settings call in the AutofeedSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#update_autofeed_settings.", + "file": "autofeed_settings_service/update_autofeed_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_autofeed_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#update_autofeed_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings", + "client": { + "short_name": "AutofeedSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client" + }, + "method": { + "short_name": "UpdateAutofeedSettings", + "full_name": "google.shopping.merchant.accounts.v1.AutofeedSettingsService.UpdateAutofeedSettings", + "service": { + "short_name": "AutofeedSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.AutofeedSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync", + "title": "Snippet for the get_automatic_improvements call in the AutomaticImprovementsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#get_automatic_improvements.", + "file": "automatic_improvements_service/get_automatic_improvements.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_automatic_improvements", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#get_automatic_improvements", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements", + "client": { + "short_name": "AutomaticImprovementsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client" + }, + "method": { + "short_name": "GetAutomaticImprovements", + "full_name": "google.shopping.merchant.accounts.v1.AutomaticImprovementsService.GetAutomaticImprovements", + "service": { + "short_name": "AutomaticImprovementsService", + "full_name": "google.shopping.merchant.accounts.v1.AutomaticImprovementsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync", + "title": "Snippet for the update_automatic_improvements call in the AutomaticImprovementsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#update_automatic_improvements.", + "file": "automatic_improvements_service/update_automatic_improvements.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_automatic_improvements", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#update_automatic_improvements", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements", + "client": { + "short_name": "AutomaticImprovementsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client" + }, + "method": { + "short_name": "UpdateAutomaticImprovements", + "full_name": "google.shopping.merchant.accounts.v1.AutomaticImprovementsService.UpdateAutomaticImprovements", + "service": { + "short_name": "AutomaticImprovementsService", + "full_name": "google.shopping.merchant.accounts.v1.AutomaticImprovementsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_BusinessIdentityService_GetBusinessIdentity_sync", + "title": "Snippet for the get_business_identity call in the BusinessIdentityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#get_business_identity.", + "file": "business_identity_service/get_business_identity.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_business_identity", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#get_business_identity", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity", + "client": { + "short_name": "BusinessIdentityService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client" + }, + "method": { + "short_name": "GetBusinessIdentity", + "full_name": "google.shopping.merchant.accounts.v1.BusinessIdentityService.GetBusinessIdentity", + "service": { + "short_name": "BusinessIdentityService", + "full_name": "google.shopping.merchant.accounts.v1.BusinessIdentityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_BusinessIdentityService_UpdateBusinessIdentity_sync", + "title": "Snippet for the update_business_identity call in the BusinessIdentityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#update_business_identity.", + "file": "business_identity_service/update_business_identity.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_business_identity", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#update_business_identity", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity", + "client": { + "short_name": "BusinessIdentityService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client" + }, + "method": { + "short_name": "UpdateBusinessIdentity", + "full_name": "google.shopping.merchant.accounts.v1.BusinessIdentityService.UpdateBusinessIdentity", + "service": { + "short_name": "BusinessIdentityService", + "full_name": "google.shopping.merchant.accounts.v1.BusinessIdentityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_BusinessInfoService_GetBusinessInfo_sync", + "title": "Snippet for the get_business_info call in the BusinessInfoService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#get_business_info.", + "file": "business_info_service/get_business_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_business_info", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#get_business_info", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfo", + "client": { + "short_name": "BusinessInfoService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client" + }, + "method": { + "short_name": "GetBusinessInfo", + "full_name": "google.shopping.merchant.accounts.v1.BusinessInfoService.GetBusinessInfo", + "service": { + "short_name": "BusinessInfoService", + "full_name": "google.shopping.merchant.accounts.v1.BusinessInfoService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_BusinessInfoService_UpdateBusinessInfo_sync", + "title": "Snippet for the update_business_info call in the BusinessInfoService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#update_business_info.", + "file": "business_info_service/update_business_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_business_info", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#update_business_info", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfo", + "client": { + "short_name": "BusinessInfoService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client" + }, + "method": { + "short_name": "UpdateBusinessInfo", + "full_name": "google.shopping.merchant.accounts.v1.BusinessInfoService.UpdateBusinessInfo", + "service": { + "short_name": "BusinessInfoService", + "full_name": "google.shopping.merchant.accounts.v1.BusinessInfoService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_CheckoutSettingsService_GetCheckoutSettings_sync", + "title": "Snippet for the get_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#get_checkout_settings.", + "file": "checkout_settings_service/get_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#get_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "GetCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService.GetCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_CheckoutSettingsService_CreateCheckoutSettings_sync", + "title": "Snippet for the create_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#create_checkout_settings.", + "file": "checkout_settings_service/create_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#create_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "CreateCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService.CreateCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync", + "title": "Snippet for the update_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#update_checkout_settings.", + "file": "checkout_settings_service/update_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#update_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "UpdateCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService.UpdateCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync", + "title": "Snippet for the delete_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#delete_checkout_settings.", + "file": "checkout_settings_service/delete_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#delete_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "DeleteCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService.DeleteCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DeveloperRegistrationService_RegisterGcp_sync", + "title": "Snippet for the register_gcp call in the DeveloperRegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#register_gcp.", + "file": "developer_registration_service/register_gcp.rb", + "language": "RUBY", + "client_method": { + "short_name": "register_gcp", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#register_gcp", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration", + "client": { + "short_name": "DeveloperRegistrationService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client" + }, + "method": { + "short_name": "RegisterGcp", + "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService.RegisterGcp", + "service": { + "short_name": "DeveloperRegistrationService", + "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DeveloperRegistrationService_GetDeveloperRegistration_sync", + "title": "Snippet for the get_developer_registration call in the DeveloperRegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#get_developer_registration.", + "file": "developer_registration_service/get_developer_registration.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_developer_registration", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#get_developer_registration", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration", + "client": { + "short_name": "DeveloperRegistrationService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client" + }, + "method": { + "short_name": "GetDeveloperRegistration", + "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService.GetDeveloperRegistration", + "service": { + "short_name": "DeveloperRegistrationService", + "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DeveloperRegistrationService_UnregisterGcp_sync", + "title": "Snippet for the unregister_gcp call in the DeveloperRegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#unregister_gcp.", + "file": "developer_registration_service/unregister_gcp.rb", + "language": "RUBY", + "client_method": { + "short_name": "unregister_gcp", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#unregister_gcp", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DeveloperRegistrationService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client" + }, + "method": { + "short_name": "UnregisterGcp", + "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService.UnregisterGcp", + "service": { + "short_name": "DeveloperRegistrationService", + "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DeveloperRegistrationService_GetAccountForGcpRegistration_sync", + "title": "Snippet for the get_account_for_gcp_registration call in the DeveloperRegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#get_account_for_gcp_registration.", + "file": "developer_registration_service/get_account_for_gcp_registration.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_account_for_gcp_registration", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#get_account_for_gcp_registration", + "async": false, + "parameters": [ + { + "type": "::Google::Protobuf::Empty", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse", + "client": { + "short_name": "DeveloperRegistrationService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client" + }, + "method": { + "short_name": "GetAccountForGcpRegistration", + "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService.GetAccountForGcpRegistration", + "service": { + "short_name": "DeveloperRegistrationService", + "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_EmailPreferencesService_GetEmailPreferences_sync", + "title": "Snippet for the get_email_preferences call in the EmailPreferencesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#get_email_preferences.", + "file": "email_preferences_service/get_email_preferences.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_email_preferences", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#get_email_preferences", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferences", + "client": { + "short_name": "EmailPreferencesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client" + }, + "method": { + "short_name": "GetEmailPreferences", + "full_name": "google.shopping.merchant.accounts.v1.EmailPreferencesService.GetEmailPreferences", + "service": { + "short_name": "EmailPreferencesService", + "full_name": "google.shopping.merchant.accounts.v1.EmailPreferencesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_EmailPreferencesService_UpdateEmailPreferences_sync", + "title": "Snippet for the update_email_preferences call in the EmailPreferencesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#update_email_preferences.", + "file": "email_preferences_service/update_email_preferences.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_email_preferences", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#update_email_preferences", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferences", + "client": { + "short_name": "EmailPreferencesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client" + }, + "method": { + "short_name": "UpdateEmailPreferences", + "full_name": "google.shopping.merchant.accounts.v1.EmailPreferencesService.UpdateEmailPreferences", + "service": { + "short_name": "EmailPreferencesService", + "full_name": "google.shopping.merchant.accounts.v1.EmailPreferencesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_GbpAccountsService_ListGbpAccounts_sync", + "title": "Snippet for the list_gbp_accounts call in the GbpAccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#list_gbp_accounts.", + "file": "gbp_accounts_service/list_gbp_accounts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_gbp_accounts", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#list_gbp_accounts", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse", + "client": { + "short_name": "GbpAccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client" + }, + "method": { + "short_name": "ListGbpAccounts", + "full_name": "google.shopping.merchant.accounts.v1.GbpAccountsService.ListGbpAccounts", + "service": { + "short_name": "GbpAccountsService", + "full_name": "google.shopping.merchant.accounts.v1.GbpAccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_GbpAccountsService_LinkGbpAccount_sync", + "title": "Snippet for the link_gbp_account call in the GbpAccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#link_gbp_account.", + "file": "gbp_accounts_service/link_gbp_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "link_gbp_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#link_gbp_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse", + "client": { + "short_name": "GbpAccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client" + }, + "method": { + "short_name": "LinkGbpAccount", + "full_name": "google.shopping.merchant.accounts.v1.GbpAccountsService.LinkGbpAccount", + "service": { + "short_name": "GbpAccountsService", + "full_name": "google.shopping.merchant.accounts.v1.GbpAccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_HomepageService_GetHomepage_sync", + "title": "Snippet for the get_homepage call in the HomepageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#get_homepage.", + "file": "homepage_service/get_homepage.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_homepage", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#get_homepage", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Homepage", + "client": { + "short_name": "HomepageService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client" + }, + "method": { + "short_name": "GetHomepage", + "full_name": "google.shopping.merchant.accounts.v1.HomepageService.GetHomepage", + "service": { + "short_name": "HomepageService", + "full_name": "google.shopping.merchant.accounts.v1.HomepageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_HomepageService_UpdateHomepage_sync", + "title": "Snippet for the update_homepage call in the HomepageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#update_homepage.", + "file": "homepage_service/update_homepage.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_homepage", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#update_homepage", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Homepage", + "client": { + "short_name": "HomepageService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client" + }, + "method": { + "short_name": "UpdateHomepage", + "full_name": "google.shopping.merchant.accounts.v1.HomepageService.UpdateHomepage", + "service": { + "short_name": "HomepageService", + "full_name": "google.shopping.merchant.accounts.v1.HomepageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_HomepageService_ClaimHomepage_sync", + "title": "Snippet for the claim_homepage call in the HomepageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#claim_homepage.", + "file": "homepage_service/claim_homepage.rb", + "language": "RUBY", + "client_method": { + "short_name": "claim_homepage", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#claim_homepage", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Homepage", + "client": { + "short_name": "HomepageService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client" + }, + "method": { + "short_name": "ClaimHomepage", + "full_name": "google.shopping.merchant.accounts.v1.HomepageService.ClaimHomepage", + "service": { + "short_name": "HomepageService", + "full_name": "google.shopping.merchant.accounts.v1.HomepageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_HomepageService_UnclaimHomepage_sync", + "title": "Snippet for the unclaim_homepage call in the HomepageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#unclaim_homepage.", + "file": "homepage_service/unclaim_homepage.rb", + "language": "RUBY", + "client_method": { + "short_name": "unclaim_homepage", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#unclaim_homepage", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Homepage", + "client": { + "short_name": "HomepageService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client" + }, + "method": { + "short_name": "UnclaimHomepage", + "full_name": "google.shopping.merchant.accounts.v1.HomepageService.UnclaimHomepage", + "service": { + "short_name": "HomepageService", + "full_name": "google.shopping.merchant.accounts.v1.HomepageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LfpProvidersService_FindLfpProviders_sync", + "title": "Snippet for the find_lfp_providers call in the LfpProvidersService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#find_lfp_providers.", + "file": "lfp_providers_service/find_lfp_providers.rb", + "language": "RUBY", + "client_method": { + "short_name": "find_lfp_providers", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#find_lfp_providers", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse", + "client": { + "short_name": "LfpProvidersService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client" + }, + "method": { + "short_name": "FindLfpProviders", + "full_name": "google.shopping.merchant.accounts.v1.LfpProvidersService.FindLfpProviders", + "service": { + "short_name": "LfpProvidersService", + "full_name": "google.shopping.merchant.accounts.v1.LfpProvidersService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LfpProvidersService_LinkLfpProvider_sync", + "title": "Snippet for the link_lfp_provider call in the LfpProvidersService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#link_lfp_provider.", + "file": "lfp_providers_service/link_lfp_provider.rb", + "language": "RUBY", + "client_method": { + "short_name": "link_lfp_provider", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#link_lfp_provider", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse", + "client": { + "short_name": "LfpProvidersService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client" + }, + "method": { + "short_name": "LinkLfpProvider", + "full_name": "google.shopping.merchant.accounts.v1.LfpProvidersService.LinkLfpProvider", + "service": { + "short_name": "LfpProvidersService", + "full_name": "google.shopping.merchant.accounts.v1.LfpProvidersService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync", + "title": "Snippet for the get_omnichannel_setting call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#get_omnichannel_setting.", + "file": "omnichannel_settings_service/get_omnichannel_setting.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_omnichannel_setting", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#get_omnichannel_setting", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "GetOmnichannelSetting", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService.GetOmnichannelSetting", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync", + "title": "Snippet for the list_omnichannel_settings call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#list_omnichannel_settings.", + "file": "omnichannel_settings_service/list_omnichannel_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_omnichannel_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#list_omnichannel_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "ListOmnichannelSettings", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService.ListOmnichannelSettings", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync", + "title": "Snippet for the create_omnichannel_setting call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#create_omnichannel_setting.", + "file": "omnichannel_settings_service/create_omnichannel_setting.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_omnichannel_setting", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#create_omnichannel_setting", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "CreateOmnichannelSetting", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService.CreateOmnichannelSetting", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync", + "title": "Snippet for the update_omnichannel_setting call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#update_omnichannel_setting.", + "file": "omnichannel_settings_service/update_omnichannel_setting.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_omnichannel_setting", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#update_omnichannel_setting", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "UpdateOmnichannelSetting", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService.UpdateOmnichannelSetting", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OmnichannelSettingsService_RequestInventoryVerification_sync", + "title": "Snippet for the request_inventory_verification call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#request_inventory_verification.", + "file": "omnichannel_settings_service/request_inventory_verification.rb", + "language": "RUBY", + "client_method": { + "short_name": "request_inventory_verification", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#request_inventory_verification", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "RequestInventoryVerification", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService.RequestInventoryVerification", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync", + "title": "Snippet for the get_online_return_policy call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#get_online_return_policy.", + "file": "online_return_policy_service/get_online_return_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_online_return_policy", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#get_online_return_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "GetOnlineReturnPolicy", + "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService.GetOnlineReturnPolicy", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync", + "title": "Snippet for the list_online_return_policies call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#list_online_return_policies.", + "file": "online_return_policy_service/list_online_return_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_online_return_policies", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#list_online_return_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "ListOnlineReturnPolicies", + "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService.ListOnlineReturnPolicies", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync", + "title": "Snippet for the create_online_return_policy call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#create_online_return_policy.", + "file": "online_return_policy_service/create_online_return_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_online_return_policy", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#create_online_return_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "CreateOnlineReturnPolicy", + "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService.CreateOnlineReturnPolicy", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync", + "title": "Snippet for the delete_online_return_policy call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#delete_online_return_policy.", + "file": "online_return_policy_service/delete_online_return_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_online_return_policy", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#delete_online_return_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "DeleteOnlineReturnPolicy", + "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService.DeleteOnlineReturnPolicy", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ProgramsService_GetProgram_sync", + "title": "Snippet for the get_program call in the ProgramsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#get_program.", + "file": "programs_service/get_program.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_program", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#get_program", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Program", + "client": { + "short_name": "ProgramsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client" + }, + "method": { + "short_name": "GetProgram", + "full_name": "google.shopping.merchant.accounts.v1.ProgramsService.GetProgram", + "service": { + "short_name": "ProgramsService", + "full_name": "google.shopping.merchant.accounts.v1.ProgramsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ProgramsService_ListPrograms_sync", + "title": "Snippet for the list_programs call in the ProgramsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#list_programs.", + "file": "programs_service/list_programs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_programs", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#list_programs", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse", + "client": { + "short_name": "ProgramsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client" + }, + "method": { + "short_name": "ListPrograms", + "full_name": "google.shopping.merchant.accounts.v1.ProgramsService.ListPrograms", + "service": { + "short_name": "ProgramsService", + "full_name": "google.shopping.merchant.accounts.v1.ProgramsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ProgramsService_EnableProgram_sync", + "title": "Snippet for the enable_program call in the ProgramsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#enable_program.", + "file": "programs_service/enable_program.rb", + "language": "RUBY", + "client_method": { + "short_name": "enable_program", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#enable_program", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Program", + "client": { + "short_name": "ProgramsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client" + }, + "method": { + "short_name": "EnableProgram", + "full_name": "google.shopping.merchant.accounts.v1.ProgramsService.EnableProgram", + "service": { + "short_name": "ProgramsService", + "full_name": "google.shopping.merchant.accounts.v1.ProgramsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ProgramsService_DisableProgram_sync", + "title": "Snippet for the disable_program call in the ProgramsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#disable_program.", + "file": "programs_service/disable_program.rb", + "language": "RUBY", + "client_method": { + "short_name": "disable_program", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#disable_program", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Program", + "client": { + "short_name": "ProgramsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client" + }, + "method": { + "short_name": "DisableProgram", + "full_name": "google.shopping.merchant.accounts.v1.ProgramsService.DisableProgram", + "service": { + "short_name": "ProgramsService", + "full_name": "google.shopping.merchant.accounts.v1.ProgramsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionsService_GetRegion_sync", + "title": "Snippet for the get_region call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#get_region.", + "file": "regions_service/get_region.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_region", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#get_region", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Region", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" + }, + "method": { + "short_name": "GetRegion", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService.GetRegion", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionsService_CreateRegion_sync", + "title": "Snippet for the create_region call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#create_region.", + "file": "regions_service/create_region.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_region", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#create_region", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Region", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" + }, + "method": { + "short_name": "CreateRegion", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService.CreateRegion", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionsService_BatchCreateRegions_sync", + "title": "Snippet for the batch_create_regions call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_create_regions.", + "file": "regions_service/batch_create_regions.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_create_regions", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_create_regions", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" + }, + "method": { + "short_name": "BatchCreateRegions", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService.BatchCreateRegions", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionsService_UpdateRegion_sync", + "title": "Snippet for the update_region call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#update_region.", + "file": "regions_service/update_region.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_region", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#update_region", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Region", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" + }, + "method": { + "short_name": "UpdateRegion", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService.UpdateRegion", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionsService_BatchUpdateRegions_sync", + "title": "Snippet for the batch_update_regions call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_update_regions.", + "file": "regions_service/batch_update_regions.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_update_regions", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_update_regions", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" + }, + "method": { + "short_name": "BatchUpdateRegions", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService.BatchUpdateRegions", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionsService_DeleteRegion_sync", + "title": "Snippet for the delete_region call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#delete_region.", + "file": "regions_service/delete_region.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_region", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#delete_region", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" + }, + "method": { + "short_name": "DeleteRegion", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService.DeleteRegion", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionsService_BatchDeleteRegions_sync", + "title": "Snippet for the batch_delete_regions call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_delete_regions.", + "file": "regions_service/batch_delete_regions.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_delete_regions", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_delete_regions", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" + }, + "method": { + "short_name": "BatchDeleteRegions", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService.BatchDeleteRegions", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionsService_ListRegions_sync", + "title": "Snippet for the list_regions call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#list_regions.", + "file": "regions_service/list_regions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_regions", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#list_regions", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" + }, + "method": { + "short_name": "ListRegions", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService.ListRegions", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ShippingSettingsService_GetShippingSettings_sync", + "title": "Snippet for the get_shipping_settings call in the ShippingSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#get_shipping_settings.", + "file": "shipping_settings_service/get_shipping_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_shipping_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#get_shipping_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettings", + "client": { + "short_name": "ShippingSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client" + }, + "method": { + "short_name": "GetShippingSettings", + "full_name": "google.shopping.merchant.accounts.v1.ShippingSettingsService.GetShippingSettings", + "service": { + "short_name": "ShippingSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.ShippingSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ShippingSettingsService_InsertShippingSettings_sync", + "title": "Snippet for the insert_shipping_settings call in the ShippingSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#insert_shipping_settings.", + "file": "shipping_settings_service/insert_shipping_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_shipping_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#insert_shipping_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettings", + "client": { + "short_name": "ShippingSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client" + }, + "method": { + "short_name": "InsertShippingSettings", + "full_name": "google.shopping.merchant.accounts.v1.ShippingSettingsService.InsertShippingSettings", + "service": { + "short_name": "ShippingSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.ShippingSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync", + "title": "Snippet for the get_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state.", + "file": "terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_terms_of_service_agreement_state", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState", + "client": { + "short_name": "TermsOfServiceAgreementStateService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client" + }, + "method": { + "short_name": "GetTermsOfServiceAgreementState", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceAgreementStateService.GetTermsOfServiceAgreementState", + "service": { + "short_name": "TermsOfServiceAgreementStateService", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceAgreementStateService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync", + "title": "Snippet for the retrieve_for_application_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state.", + "file": "terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb", + "language": "RUBY", + "client_method": { + "short_name": "retrieve_for_application_terms_of_service_agreement_state", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState", + "client": { + "short_name": "TermsOfServiceAgreementStateService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client" + }, + "method": { + "short_name": "RetrieveForApplicationTermsOfServiceAgreementState", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceAgreementStateService.RetrieveForApplicationTermsOfServiceAgreementState", + "service": { + "short_name": "TermsOfServiceAgreementStateService", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceAgreementStateService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_TermsOfServiceService_GetTermsOfService_sync", + "title": "Snippet for the get_terms_of_service call in the TermsOfServiceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#get_terms_of_service.", + "file": "terms_of_service_service/get_terms_of_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_terms_of_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#get_terms_of_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::TermsOfService", + "client": { + "short_name": "TermsOfServiceService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client" + }, + "method": { + "short_name": "GetTermsOfService", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService.GetTermsOfService", + "service": { + "short_name": "TermsOfServiceService", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync", + "title": "Snippet for the retrieve_latest_terms_of_service call in the TermsOfServiceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#retrieve_latest_terms_of_service.", + "file": "terms_of_service_service/retrieve_latest_terms_of_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "retrieve_latest_terms_of_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#retrieve_latest_terms_of_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::TermsOfService", + "client": { + "short_name": "TermsOfServiceService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client" + }, + "method": { + "short_name": "RetrieveLatestTermsOfService", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService.RetrieveLatestTermsOfService", + "service": { + "short_name": "TermsOfServiceService", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_TermsOfServiceService_AcceptTermsOfService_sync", + "title": "Snippet for the accept_terms_of_service call in the TermsOfServiceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#accept_terms_of_service.", + "file": "terms_of_service_service/accept_terms_of_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "accept_terms_of_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#accept_terms_of_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse", + "client": { + "short_name": "TermsOfServiceService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client" + }, + "method": { + "short_name": "AcceptTermsOfService", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService.AcceptTermsOfService", + "service": { + "short_name": "TermsOfServiceService", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService" + } + } + }, + "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-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb new file mode 100644 index 000000000000..5736868f6958 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state. +# +def get_terms_of_service_agreement_state + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new + + # Call the get_terms_of_service_agreement_state method. + result = client.get_terms_of_service_agreement_state request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. + p result +end +# [END merchantapi_v1_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb new file mode 100644 index 000000000000..7a76e3bc4e6e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the retrieve_for_application_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state. +# +def retrieve_for_application_terms_of_service_agreement_state + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new + + # Call the retrieve_for_application_terms_of_service_agreement_state method. + result = client.retrieve_for_application_terms_of_service_agreement_state request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. + p result +end +# [END merchantapi_v1_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/accept_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/accept_terms_of_service.rb new file mode 100644 index 000000000000..70521bb55cbd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/accept_terms_of_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_TermsOfServiceService_AcceptTermsOfService_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the accept_terms_of_service call in the TermsOfServiceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#accept_terms_of_service. +# +def accept_terms_of_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new + + # Call the accept_terms_of_service method. + result = client.accept_terms_of_service request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse. + p result +end +# [END merchantapi_v1_generated_TermsOfServiceService_AcceptTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/get_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/get_terms_of_service.rb new file mode 100644 index 000000000000..4dfd73193222 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/get_terms_of_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_TermsOfServiceService_GetTermsOfService_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_terms_of_service call in the TermsOfServiceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#get_terms_of_service. +# +def get_terms_of_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new + + # Call the get_terms_of_service method. + result = client.get_terms_of_service request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. + p result +end +# [END merchantapi_v1_generated_TermsOfServiceService_GetTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb new file mode 100644 index 000000000000..3ef98a559d35 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the retrieve_latest_terms_of_service call in the TermsOfServiceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#retrieve_latest_terms_of_service. +# +def retrieve_latest_terms_of_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new + + # Call the retrieve_latest_terms_of_service method. + result = client.retrieve_latest_terms_of_service request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. + p result +end +# [END merchantapi_v1_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/create_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/create_user.rb new file mode 100644 index 000000000000..d146dc230aa7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/create_user.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_UserService_CreateUser_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the create_user call in the UserService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::UserService::Client#create_user. +# +def create_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new + + # Call the create_user method. + result = client.create_user request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + p result +end +# [END merchantapi_v1_generated_UserService_CreateUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/delete_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/delete_user.rb new file mode 100644 index 000000000000..5633c90cd640 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/delete_user.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_UserService_DeleteUser_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the delete_user call in the UserService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::UserService::Client#delete_user. +# +def delete_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new + + # Call the delete_user method. + result = client.delete_user request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_UserService_DeleteUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/get_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/get_user.rb new file mode 100644 index 000000000000..d67669c7ecbc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/get_user.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_UserService_GetUser_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_user call in the UserService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::UserService::Client#get_user. +# +def get_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new + + # Call the get_user method. + result = client.get_user request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + p result +end +# [END merchantapi_v1_generated_UserService_GetUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/list_users.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/list_users.rb new file mode 100644 index 000000000000..57e5942b531b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/list_users.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 merchantapi_v1_generated_UserService_ListUsers_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_users call in the UserService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::UserService::Client#list_users. +# +def list_users + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.new + + # Call the list_users method. + result = client.list_users request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::User. + p item + end +end +# [END merchantapi_v1_generated_UserService_ListUsers_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/update_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/update_user.rb new file mode 100644 index 000000000000..40bd7bda2f6a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/update_user.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_UserService_UpdateUser_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_user call in the UserService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::UserService::Client#update_user. +# +def update_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new + + # Call the update_user method. + result = client.update_user request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + p result +end +# [END merchantapi_v1_generated_UserService_UpdateUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/verify_self.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/verify_self.rb new file mode 100644 index 000000000000..e00e78809c6a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/verify_self.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_UserService_VerifySelf_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the verify_self call in the UserService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1::UserService::Client#verify_self. +# +def verify_self + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest.new + + # Call the verify_self method. + result = client.verify_self request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + p result +end +# [END merchantapi_v1_generated_UserService_VerifySelf_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_paths_test.rb new file mode 100644 index 000000000000..4d5e8fc9c564 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_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/shopping/merchant/accounts/v1/account_issue_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_rest_test.rb new file mode 100644 index 000000000000..25c7e17cbc7f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_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/shopping/merchant/accounts/v1/accountissue_pb" +require "google/shopping/merchant/accounts/v1/account_issue_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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_account_issues + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + time_zone = "hello world" + + list_account_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::ServiceStub.stub :transcode_list_account_issues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_account_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_account_issues parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_account_issues ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_account_issues(::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_account_issues_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::Shopping::Merchant::Accounts::V1::AccountIssueService::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::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb new file mode 100644 index 000000000000..983983373775 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb @@ -0,0 +1,175 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/accountissue_pb" +require "google/shopping/merchant/accounts/v1/account_issue_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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_account_issues + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + time_zone = "hello world" + + list_account_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_account_issues, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest, 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["language_code"] + assert_equal "hello world", request["time_zone"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_account_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_account_issues parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_account_issues ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_account_issues(::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_account_issues_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::Shopping::Merchant::Accounts::V1::AccountIssueService::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::Shopping::Merchant::Accounts::V1::AccountIssueService::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::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_paths_test.rb new file mode 100644 index 000000000000..f83647bb4c69 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_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/shopping/merchant/accounts/v1/account_relationships_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_account_relationship_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_relationship_path account: "value0", relationship: "value1" + assert_equal "accounts/value0/relationships/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_rest_test.rb new file mode 100644 index 000000000000..49ac7583555d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_rest_test.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1/accountrelationships_pb" +require "google/shopping/merchant/accounts/v1/account_relationships_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_account_relationship + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_relationship_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::ServiceStub.stub :transcode_get_account_relationship_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_account_relationship_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_account_relationship({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_account_relationship name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_account_relationship ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_account_relationship({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_account_relationship(::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_account_relationship_client_stub.call_count + end + end + end + + def test_update_account_relationship + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account_relationship = {} + update_mask = {} + + update_account_relationship_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::ServiceStub.stub :transcode_update_account_relationship_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_account_relationship_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_account_relationship({ account_relationship: account_relationship, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_account_relationship account_relationship: account_relationship, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_account_relationship ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new(account_relationship: account_relationship, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_account_relationship({ account_relationship: account_relationship, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_account_relationship(::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new(account_relationship: account_relationship, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_account_relationship_client_stub.call_count + end + end + end + + def test_list_account_relationships + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse.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_account_relationships_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::ServiceStub.stub :transcode_list_account_relationships_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_account_relationships_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_account_relationships({ 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_account_relationships 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_account_relationships ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.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_account_relationships({ 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_account_relationships(::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.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_account_relationships_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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb new file mode 100644 index 000000000000..bce8d87c1f91 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb @@ -0,0 +1,289 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/accountrelationships_pb" +require "google/shopping/merchant/accounts/v1/account_relationships_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_account_relationship + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_relationship_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_account_relationship, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_account_relationship_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_account_relationship({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_account_relationship name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_account_relationship ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_account_relationship({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_account_relationship(::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_account_relationship_client_stub.call_rpc_count + end + end + + def test_update_account_relationship + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account_relationship = {} + update_mask = {} + + update_account_relationship_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_account_relationship, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship), request["account_relationship"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_account_relationship_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_account_relationship({ account_relationship: account_relationship, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_account_relationship account_relationship: account_relationship, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_account_relationship ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new(account_relationship: account_relationship, 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_account_relationship({ account_relationship: account_relationship, 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_account_relationship(::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new(account_relationship: account_relationship, 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_account_relationship_client_stub.call_rpc_count + end + end + + def test_list_account_relationships + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = 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_account_relationships_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_account_relationships, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest, 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_account_relationships_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_account_relationships({ 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_account_relationships 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_account_relationships ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.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_account_relationships({ 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_account_relationships(::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.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_account_relationships_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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_paths_test.rb new file mode 100644 index 000000000000..1a4ae4767c91 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_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/shopping/merchant/accounts/v1/account_services_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_account_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_service_path account: "value0", service: "value1" + assert_equal "accounts/value0/services/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_rest_test.rb new file mode 100644 index 000000000000..a6bd359aa85f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_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/shopping/merchant/accounts/v1/accountservices_pb" +require "google/shopping/merchant/accounts/v1/account_services_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_account_service + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.stub :transcode_get_account_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_account_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_account_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_account_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_account_service ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_account_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_account_service(::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_account_service_client_stub.call_count + end + end + end + + def test_list_account_services + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse.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_account_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.stub :transcode_list_account_services_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_account_services_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_account_services({ 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_account_services 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_account_services ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.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_account_services({ 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_account_services(::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.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_account_services_client_stub.call_count + end + end + end + + def test_propose_account_service + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + provider = "hello world" + account_service = {} + + propose_account_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.stub :transcode_propose_account_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, propose_account_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.propose_account_service({ parent: parent, provider: provider, account_service: account_service }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.propose_account_service parent: parent, provider: provider, account_service: account_service do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.propose_account_service ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new(parent: parent, provider: provider, account_service: account_service) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.propose_account_service({ parent: parent, provider: provider, account_service: account_service }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.propose_account_service(::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new(parent: parent, provider: provider, account_service: account_service), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, propose_account_service_client_stub.call_count + end + end + end + + def test_approve_account_service + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + approve_account_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.stub :transcode_approve_account_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, approve_account_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.approve_account_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.approve_account_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.approve_account_service ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.approve_account_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.approve_account_service(::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, approve_account_service_client_stub.call_count + end + end + end + + def test_reject_account_service + # 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" + + reject_account_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.stub :transcode_reject_account_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, reject_account_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.reject_account_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.reject_account_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.reject_account_service ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.reject_account_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.reject_account_service(::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, reject_account_service_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::Shopping::Merchant::Accounts::V1::AccountServicesService::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::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_test.rb new file mode 100644 index 000000000000..ca41d7d091cb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_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/shopping/merchant/accounts/v1/accountservices_pb" +require "google/shopping/merchant/accounts/v1/account_services_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_account_service + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AccountService.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_account_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_account_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_account_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_account_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_account_service ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_account_service({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_account_service(::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_account_service_client_stub.call_rpc_count + end + end + + def test_list_account_services + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = 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_account_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_account_services, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest, 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_account_services_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_account_services({ 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_account_services 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_account_services ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.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_account_services({ 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_account_services(::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.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_account_services_client_stub.call_rpc_count + end + end + + def test_propose_account_service + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AccountService.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + provider = "hello world" + account_service = {} + + propose_account_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :propose_account_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["provider"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::AccountService), request["account_service"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, propose_account_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.propose_account_service({ parent: parent, provider: provider, account_service: account_service }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.propose_account_service parent: parent, provider: provider, account_service: account_service do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.propose_account_service ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new(parent: parent, provider: provider, account_service: account_service) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.propose_account_service({ parent: parent, provider: provider, account_service: account_service }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.propose_account_service(::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new(parent: parent, provider: provider, account_service: account_service), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, propose_account_service_client_stub.call_rpc_count + end + end + + def test_approve_account_service + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AccountService.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_account_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :approve_account_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, approve_account_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.approve_account_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.approve_account_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.approve_account_service ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.approve_account_service({ 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_account_service(::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new(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_account_service_client_stub.call_rpc_count + end + end + + def test_reject_account_service + # 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" + + reject_account_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :reject_account_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, reject_account_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.reject_account_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.reject_account_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.reject_account_service ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.reject_account_service({ 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_account_service(::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new(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_account_service_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::Shopping::Merchant::Accounts::V1::AccountServicesService::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::Shopping::Merchant::Accounts::V1::AccountServicesService::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::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_paths_test.rb new file mode 100644 index 000000000000..8d044ba0ebc7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_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/shopping/merchant/accounts/v1/accounts_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AccountsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_user_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.user_path account: "value0", email: "value1" + assert_equal "accounts/value0/users/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_rest_test.rb new file mode 100644 index 000000000000..36410e0ae86a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1/accounts_pb" +require "google/shopping/merchant/accounts/v1/accounts_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_get_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_account({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_account name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_account ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_account({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_account(::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_account_client_stub.call_count + end + end + end + + def test_create_and_configure_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account = {} + user = [{}] + service = [{}] + set_alias = [{}] + + create_and_configure_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_create_and_configure_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_and_configure_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_and_configure_account({ account: account, user: user, service: service, set_alias: set_alias }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_and_configure_account account: account, user: user, service: service, set_alias: set_alias do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_and_configure_account ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new(account: account, user: user, service: service, set_alias: set_alias) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_and_configure_account({ account: account, user: user, service: service, set_alias: set_alias }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_and_configure_account(::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new(account: account, user: user, service: service, set_alias: set_alias), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_and_configure_account_client_stub.call_count + end + end + end + + def test_create_test_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + account = {} + + create_test_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_create_test_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_test_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_test_account({ parent: parent, account: account }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_test_account parent: parent, account: account do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_test_account ::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest.new(parent: parent, account: account) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_test_account({ parent: parent, account: account }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_test_account(::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest.new(parent: parent, account: account), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_test_account_client_stub.call_count + end + end + end + + def test_delete_account + # 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" + force = true + + delete_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_delete_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_account({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_account name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_account ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_account({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_account(::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_account_client_stub.call_count + end + end + end + + def test_update_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account = {} + update_mask = {} + + update_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_update_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_account({ account: account, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_account account: account, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_account ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new(account: account, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_account({ account: account, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_account(::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new(account: account, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_account_client_stub.call_count + end + end + end + + def test_list_accounts + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_list_accounts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_accounts({ 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_accounts 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_accounts ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new(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_accounts({ 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_accounts(::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new(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_accounts_client_stub.call_count + end + end + end + + def test_list_sub_accounts + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + provider = "hello world" + page_size = 42 + page_token = "hello world" + + list_sub_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_list_sub_accounts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_sub_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_sub_accounts provider: provider, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_sub_accounts ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts({ provider: provider, 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_sub_accounts(::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts_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::Shopping::Merchant::Accounts::V1::AccountsService::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::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_test.rb new file mode 100644 index 000000000000..8ae5697b61c3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_test.rb @@ -0,0 +1,540 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/accounts_pb" +require "google/shopping/merchant/accounts/v1/accounts_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AccountsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Account.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_account({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_account name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_account ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_account({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_account(::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_account_client_stub.call_rpc_count + end + end + + def test_create_and_configure_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Account.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account = {} + user = [{}] + service = [{}] + set_alias = [{}] + + create_and_configure_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_and_configure_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Account), request["account"] + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddUser, request["user"].first + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddAccountService, request["service"].first + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::SetAliasForRelationship, request["set_alias"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_and_configure_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_and_configure_account({ account: account, user: user, service: service, set_alias: set_alias }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_and_configure_account account: account, user: user, service: service, set_alias: set_alias do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_and_configure_account ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new(account: account, user: user, service: service, set_alias: set_alias) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_and_configure_account({ account: account, user: user, service: service, set_alias: set_alias }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_and_configure_account(::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new(account: account, user: user, service: service, set_alias: set_alias), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_and_configure_account_client_stub.call_rpc_count + end + end + + def test_create_test_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Account.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + account = {} + + create_test_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_test_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Account), request["account"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_test_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_test_account({ parent: parent, account: account }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_test_account parent: parent, account: account do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_test_account ::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest.new(parent: parent, account: account) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_test_account({ parent: parent, account: account }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_test_account(::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest.new(parent: parent, account: account), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_test_account_client_stub.call_rpc_count + end + end + + def test_delete_account + # 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" + force = true + + delete_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_account({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_account name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_account ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_account({ name: name, force: force }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_account(::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_account_client_stub.call_rpc_count + end + end + + def test_update_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Account.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account = {} + update_mask = {} + + update_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Account), request["account"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_account({ account: account, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_account account: account, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_account ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new(account: account, 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_account({ account: account, 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_account(::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new(account: account, 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_account_client_stub.call_rpc_count + end + end + + def test_list_accounts + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_accounts, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest, request + 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_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_accounts({ 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_accounts 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_accounts ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new(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_accounts({ 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_accounts(::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new(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_accounts_client_stub.call_rpc_count + end + end + + def test_list_sub_accounts + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + provider = "hello world" + page_size = 42 + page_token = "hello world" + + list_sub_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sub_accounts, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest, request + assert_equal "hello world", request["provider"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_sub_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_sub_accounts({ provider: provider, page_size: page_size, page_token: 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_sub_accounts provider: provider, page_size: page_size, page_token: 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_sub_accounts ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new(provider: provider, page_size: page_size, page_token: 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_sub_accounts({ provider: provider, 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_sub_accounts(::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts_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::Shopping::Merchant::Accounts::V1::AccountsService::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::Shopping::Merchant::Accounts::V1::AccountsService::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::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_paths_test.rb new file mode 100644 index 000000000000..2d413f5c1328 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_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/shopping/merchant/accounts/v1/autofeed_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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_autofeed_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.autofeed_settings_path account: "value0" + assert_equal "accounts/value0/autofeedSettings", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_rest_test.rb new file mode 100644 index 000000000000..48b61682a1d7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1/autofeedsettings_pb" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_autofeed_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_autofeed_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::ServiceStub.stub :transcode_get_autofeed_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_autofeed_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_autofeed_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_autofeed_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_autofeed_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_autofeed_settings_client_stub.call_count + end + end + end + + def test_update_autofeed_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + autofeed_settings = {} + update_mask = {} + + update_autofeed_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::ServiceStub.stub :transcode_update_autofeed_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_autofeed_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_autofeed_settings autofeed_settings: autofeed_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_autofeed_settings_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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb new file mode 100644 index 000000000000..f691921a8369 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/autofeedsettings_pb" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_autofeed_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_autofeed_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_autofeed_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_autofeed_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_autofeed_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_autofeed_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_autofeed_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_autofeed_settings_client_stub.call_rpc_count + end + end + + def test_update_autofeed_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + autofeed_settings = {} + update_mask = {} + + update_autofeed_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_autofeed_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings), request["autofeed_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_autofeed_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_autofeed_settings autofeed_settings: autofeed_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, 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_autofeed_settings({ autofeed_settings: autofeed_settings, 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_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, 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_autofeed_settings_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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_paths_test.rb new file mode 100644 index 000000000000..8f54b71f567c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_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/shopping/merchant/accounts/v1/automatic_improvements_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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_automatic_improvements_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.automatic_improvements_path account: "value0" + assert_equal "accounts/value0/automaticImprovements", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_rest_test.rb new file mode 100644 index 000000000000..5255dda6e690 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1/automaticimprovements_pb" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_automatic_improvements + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_automatic_improvements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::ServiceStub.stub :transcode_get_automatic_improvements_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_automatic_improvements_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_automatic_improvements({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_automatic_improvements name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_automatic_improvements({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_automatic_improvements_client_stub.call_count + end + end + end + + def test_update_automatic_improvements + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + automatic_improvements = {} + update_mask = {} + + update_automatic_improvements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::ServiceStub.stub :transcode_update_automatic_improvements_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_automatic_improvements_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_automatic_improvements automatic_improvements: automatic_improvements, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_automatic_improvements_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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb new file mode 100644 index 000000000000..e275de5ed73f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/automaticimprovements_pb" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_automatic_improvements + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_automatic_improvements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_automatic_improvements, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_automatic_improvements_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_automatic_improvements({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_automatic_improvements name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_automatic_improvements({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_automatic_improvements_client_stub.call_rpc_count + end + end + + def test_update_automatic_improvements + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + automatic_improvements = {} + update_mask = {} + + update_automatic_improvements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_automatic_improvements, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements), request["automatic_improvements"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_automatic_improvements_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_automatic_improvements automatic_improvements: automatic_improvements, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, 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_automatic_improvements({ automatic_improvements: automatic_improvements, 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_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, 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_automatic_improvements_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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_paths_test.rb new file mode 100644 index 000000000000..0ed76c5a9835 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_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/shopping/merchant/accounts/v1/business_identity_service" + +class ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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_business_identity_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.business_identity_path account: "value0" + assert_equal "accounts/value0/businessIdentity", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_rest_test.rb new file mode 100644 index 000000000000..95abc830e393 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1/businessidentity_pb" +require "google/shopping/merchant/accounts/v1/business_identity_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_business_identity + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_business_identity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::ServiceStub.stub :transcode_get_business_identity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_business_identity_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_business_identity({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_business_identity name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_business_identity ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_business_identity({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_business_identity(::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_business_identity_client_stub.call_count + end + end + end + + def test_update_business_identity + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + business_identity = {} + update_mask = {} + + update_business_identity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::ServiceStub.stub :transcode_update_business_identity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_business_identity_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_business_identity({ business_identity: business_identity, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_business_identity business_identity: business_identity, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_business_identity ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_business_identity({ business_identity: business_identity, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_business_identity(::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_business_identity_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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb new file mode 100644 index 000000000000..63d3efcd0846 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/businessidentity_pb" +require "google/shopping/merchant/accounts/v1/business_identity_service" + +class ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_business_identity + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_business_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_business_identity, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_business_identity_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_business_identity({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_business_identity name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_business_identity ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_business_identity({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_business_identity(::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_business_identity_client_stub.call_rpc_count + end + end + + def test_update_business_identity + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + business_identity = {} + update_mask = {} + + update_business_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_business_identity, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity), request["business_identity"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_business_identity_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_business_identity({ business_identity: business_identity, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_business_identity business_identity: business_identity, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_business_identity ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new(business_identity: business_identity, 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_business_identity({ business_identity: business_identity, 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_business_identity(::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new(business_identity: business_identity, 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_business_identity_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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_paths_test.rb new file mode 100644 index 000000000000..a1e221703a36 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_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/shopping/merchant/accounts/v1/business_info_service" + +class ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::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_business_info_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.business_info_path account: "value0" + assert_equal "accounts/value0/businessInfo", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_rest_test.rb new file mode 100644 index 000000000000..891dc8a7a3e5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1/businessinfo_pb" +require "google/shopping/merchant/accounts/v1/business_info_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_business_info + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_business_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::ServiceStub.stub :transcode_get_business_info_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_business_info_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_business_info({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_business_info name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_business_info ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_business_info({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_business_info(::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_business_info_client_stub.call_count + end + end + end + + def test_update_business_info + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + business_info = {} + update_mask = {} + + update_business_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::ServiceStub.stub :transcode_update_business_info_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_business_info_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_business_info({ business_info: business_info, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_business_info business_info: business_info, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_business_info ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_business_info({ business_info: business_info, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_business_info(::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_business_info_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::Shopping::Merchant::Accounts::V1::BusinessInfoService::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::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_test.rb new file mode 100644 index 000000000000..a239f051ba42 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/businessinfo_pb" +require "google/shopping/merchant/accounts/v1/business_info_service" + +class ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_business_info + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_business_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_business_info, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_business_info_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_business_info({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_business_info name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_business_info ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_business_info({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_business_info(::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_business_info_client_stub.call_rpc_count + end + end + + def test_update_business_info + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + business_info = {} + update_mask = {} + + update_business_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_business_info, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo), request["business_info"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_business_info_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_business_info({ business_info: business_info, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_business_info business_info: business_info, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_business_info ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new(business_info: business_info, 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_business_info({ business_info: business_info, 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_business_info(::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new(business_info: business_info, 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_business_info_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::Shopping::Merchant::Accounts::V1::BusinessInfoService::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::Shopping::Merchant::Accounts::V1::BusinessInfoService::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::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_paths_test.rb new file mode 100644 index 000000000000..7443551ed7d0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_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/shopping/merchant/accounts/v1/checkout_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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_checkout_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.checkout_settings_path account: "value0", program: "value1" + assert_equal "accounts/value0/programs/value1/checkoutSettings", path + end + end + + def test_program_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.program_path account: "value0", program: "value1" + assert_equal "accounts/value0/programs/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_rest_test.rb new file mode 100644 index 000000000000..0224cdd58ebf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_rest_test.rb @@ -0,0 +1,317 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1/checkoutsettings_pb" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_checkout_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_get_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_checkout_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_checkout_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_checkout_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_checkout_settings_client_stub.call_count + end + end + end + + def test_create_checkout_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + checkout_settings = {} + + create_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_create_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_checkout_settings_client_stub.call_count + end + end + end + + def test_update_checkout_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + checkout_settings = {} + update_mask = {} + + update_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_update_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_checkout_settings_client_stub.call_count + end + end + end + + def test_delete_checkout_settings + # 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_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_delete_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_checkout_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_checkout_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_checkout_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_checkout_settings_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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb new file mode 100644 index 000000000000..8580a4b53df8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb @@ -0,0 +1,340 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/checkoutsettings_pb" +require "google/shopping/merchant/accounts/v1/checkout_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_checkout_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_checkout_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_checkout_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_checkout_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_checkout_settings_client_stub.call_rpc_count + end + end + + def test_create_checkout_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + checkout_settings = {} + + create_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings), request["checkout_settings"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_checkout_settings_client_stub.call_rpc_count + end + end + + def test_update_checkout_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + checkout_settings = {} + update_mask = {} + + update_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings), request["checkout_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, 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_checkout_settings({ checkout_settings: checkout_settings, 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_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, 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_checkout_settings_client_stub.call_rpc_count + end + end + + def test_delete_checkout_settings + # 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_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_checkout_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_checkout_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_checkout_settings({ 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_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new(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_checkout_settings_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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_paths_test.rb new file mode 100644 index 000000000000..397b0d34a5d5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_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/shopping/merchant/accounts/v1/developer_registration_service" + +class ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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_developer_registration_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.developer_registration_path account: "value0" + assert_equal "accounts/value0/developerRegistration", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_rest_test.rb new file mode 100644 index 000000000000..f09c738e49e0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_rest_test.rb @@ -0,0 +1,310 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/accounts/v1/developerregistration_pb" +require "google/shopping/merchant/accounts/v1/developer_registration_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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_register_gcp + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + developer_email = "hello world" + + register_gcp_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::ServiceStub.stub :transcode_register_gcp_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, register_gcp_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.register_gcp({ name: name, developer_email: developer_email }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.register_gcp name: name, developer_email: developer_email do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.register_gcp ::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new(name: name, developer_email: developer_email) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.register_gcp({ name: name, developer_email: developer_email }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.register_gcp(::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new(name: name, developer_email: developer_email), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, register_gcp_client_stub.call_count + end + end + end + + def test_get_developer_registration + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_developer_registration_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::ServiceStub.stub :transcode_get_developer_registration_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_developer_registration_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_developer_registration({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_developer_registration name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_developer_registration ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_developer_registration({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_developer_registration(::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_developer_registration_client_stub.call_count + end + end + end + + def test_unregister_gcp + # 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" + + unregister_gcp_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::ServiceStub.stub :transcode_unregister_gcp_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, unregister_gcp_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.unregister_gcp({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.unregister_gcp name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.unregister_gcp ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.unregister_gcp({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.unregister_gcp(::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, unregister_gcp_client_stub.call_count + end + end + end + + def test_get_account_for_gcp_registration + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + + get_account_for_gcp_registration_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::ServiceStub.stub :transcode_get_account_for_gcp_registration_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_account_for_gcp_registration_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_account_for_gcp_registration({ }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_account_for_gcp_registration ::Google::Protobuf::Empty.new() do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_account_for_gcp_registration({ }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_account_for_gcp_registration(::Google::Protobuf::Empty.new(), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 4, get_account_for_gcp_registration_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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb new file mode 100644 index 000000000000..af47466f3d9e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb @@ -0,0 +1,330 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/developerregistration_pb" +require "google/shopping/merchant/accounts/v1/developer_registration_service" + +class ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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_register_gcp + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + developer_email = "hello world" + + register_gcp_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :register_gcp, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["developer_email"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, register_gcp_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.register_gcp({ name: name, developer_email: developer_email }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.register_gcp name: name, developer_email: developer_email do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.register_gcp ::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new(name: name, developer_email: developer_email) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.register_gcp({ name: name, developer_email: developer_email }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.register_gcp(::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new(name: name, developer_email: developer_email), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, register_gcp_client_stub.call_rpc_count + end + end + + def test_get_developer_registration + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_developer_registration_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_developer_registration, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_developer_registration_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_developer_registration({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_developer_registration name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_developer_registration ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_developer_registration({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_developer_registration(::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_developer_registration_client_stub.call_rpc_count + end + end + + def test_unregister_gcp + # 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" + + unregister_gcp_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :unregister_gcp, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, unregister_gcp_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.unregister_gcp({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.unregister_gcp name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.unregister_gcp ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.unregister_gcp({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.unregister_gcp(::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, unregister_gcp_client_stub.call_rpc_count + end + end + + def test_get_account_for_gcp_registration + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + + get_account_for_gcp_registration_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_account_for_gcp_registration, name + assert_kind_of ::Google::Protobuf::Empty, request + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_account_for_gcp_registration_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_account_for_gcp_registration({ }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_account_for_gcp_registration ::Google::Protobuf::Empty.new() do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_account_for_gcp_registration({ }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_account_for_gcp_registration(::Google::Protobuf::Empty.new(), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 4, get_account_for_gcp_registration_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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_paths_test.rb new file mode 100644 index 000000000000..fceef70de69e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_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/shopping/merchant/accounts/v1/email_preferences_service" + +class ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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_email_preferences_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.email_preferences_path account: "value0", email: "value1" + assert_equal "accounts/value0/users/value1/emailPreferences", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_rest_test.rb new file mode 100644 index 000000000000..67a5ef8fb0ab --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1/emailpreferences_pb" +require "google/shopping/merchant/accounts/v1/email_preferences_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_email_preferences + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_email_preferences_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::ServiceStub.stub :transcode_get_email_preferences_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_email_preferences_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_email_preferences({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_email_preferences name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_email_preferences ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_email_preferences({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_email_preferences(::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_email_preferences_client_stub.call_count + end + end + end + + def test_update_email_preferences + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + email_preferences = {} + update_mask = {} + + update_email_preferences_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::ServiceStub.stub :transcode_update_email_preferences_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_email_preferences_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_email_preferences email_preferences: email_preferences, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_email_preferences ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_email_preferences(::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_email_preferences_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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb new file mode 100644 index 000000000000..848292fe9954 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/emailpreferences_pb" +require "google/shopping/merchant/accounts/v1/email_preferences_service" + +class ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_email_preferences + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_email_preferences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_email_preferences, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_email_preferences_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_email_preferences({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_email_preferences name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_email_preferences ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_email_preferences({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_email_preferences(::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_email_preferences_client_stub.call_rpc_count + end + end + + def test_update_email_preferences + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + email_preferences = {} + update_mask = {} + + update_email_preferences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_email_preferences, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences), request["email_preferences"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_email_preferences_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_email_preferences email_preferences: email_preferences, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_email_preferences ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, 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_email_preferences({ email_preferences: email_preferences, 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_email_preferences(::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, 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_email_preferences_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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_paths_test.rb new file mode 100644 index 000000000000..a18d614ae584 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_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/shopping/merchant/accounts/v1/gbp_accounts_service" + +class ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_rest_test.rb new file mode 100644 index 000000000000..2f57e8d53791 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_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/shopping/merchant/accounts/v1/gbpaccounts_pb" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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_gbp_accounts + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse.new + http_response = OpenStruct.new 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_gbp_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::ServiceStub.stub :transcode_list_gbp_accounts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_gbp_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_gbp_accounts({ 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_gbp_accounts 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_gbp_accounts ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.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_gbp_accounts({ 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_gbp_accounts(::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.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_gbp_accounts_client_stub.call_count + end + end + end + + def test_link_gbp_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + gbp_email = "hello world" + + link_gbp_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::ServiceStub.stub :transcode_link_gbp_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, link_gbp_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.link_gbp_account({ parent: parent, gbp_email: gbp_email }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.link_gbp_account parent: parent, gbp_email: gbp_email do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.link_gbp_account ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.link_gbp_account({ parent: parent, gbp_email: gbp_email }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.link_gbp_account(::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, link_gbp_account_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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb new file mode 100644 index 000000000000..b4477e71d26b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb @@ -0,0 +1,231 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/gbpaccounts_pb" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service" + +class ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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_gbp_accounts + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_gbp_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_gbp_accounts, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest, 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_gbp_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_gbp_accounts({ 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_gbp_accounts 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_gbp_accounts ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.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_gbp_accounts({ 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_gbp_accounts(::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.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_gbp_accounts_client_stub.call_rpc_count + end + end + + def test_link_gbp_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + gbp_email = "hello world" + + link_gbp_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :link_gbp_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["gbp_email"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, link_gbp_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.link_gbp_account({ parent: parent, gbp_email: gbp_email }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.link_gbp_account parent: parent, gbp_email: gbp_email do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.link_gbp_account ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.link_gbp_account({ parent: parent, gbp_email: gbp_email }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.link_gbp_account(::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, link_gbp_account_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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_paths_test.rb new file mode 100644 index 000000000000..f14d97d6a2c6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_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/shopping/merchant/accounts/v1/homepage_service" + +class ::Google::Shopping::Merchant::Accounts::V1::HomepageService::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_homepage_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.homepage_path account: "value0" + assert_equal "accounts/value0/homepage", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_rest_test.rb new file mode 100644 index 000000000000..6f0c2a45c603 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_rest_test.rb @@ -0,0 +1,317 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1/homepage_pb" +require "google/shopping/merchant/accounts/v1/homepage_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_homepage + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ServiceStub.stub :transcode_get_homepage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_homepage({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_homepage name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_homepage ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_homepage({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_homepage(::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_homepage_client_stub.call_count + end + end + end + + def test_update_homepage + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + homepage = {} + update_mask = {} + + update_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ServiceStub.stub :transcode_update_homepage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_homepage({ homepage: homepage, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_homepage homepage: homepage, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_homepage ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_homepage({ homepage: homepage, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_homepage(::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_homepage_client_stub.call_count + end + end + end + + def test_claim_homepage + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + overwrite = true + + claim_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ServiceStub.stub :transcode_claim_homepage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, claim_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.claim_homepage({ name: name, overwrite: overwrite }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.claim_homepage name: name, overwrite: overwrite do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.claim_homepage ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new(name: name, overwrite: overwrite) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.claim_homepage({ name: name, overwrite: overwrite }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.claim_homepage(::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new(name: name, overwrite: overwrite), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, claim_homepage_client_stub.call_count + end + end + end + + def test_unclaim_homepage + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + unclaim_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ServiceStub.stub :transcode_unclaim_homepage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, unclaim_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.unclaim_homepage({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.unclaim_homepage name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.unclaim_homepage ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.unclaim_homepage({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.unclaim_homepage(::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, unclaim_homepage_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::Shopping::Merchant::Accounts::V1::HomepageService::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::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_test.rb new file mode 100644 index 000000000000..50ed26f1e493 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_test.rb @@ -0,0 +1,340 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/homepage_pb" +require "google/shopping/merchant/accounts/v1/homepage_service" + +class ::Google::Shopping::Merchant::Accounts::V1::HomepageService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_homepage + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_homepage, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_homepage({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_homepage name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_homepage ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_homepage({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_homepage(::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_homepage_client_stub.call_rpc_count + end + end + + def test_update_homepage + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + homepage = {} + update_mask = {} + + update_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_homepage, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Homepage), request["homepage"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_homepage({ homepage: homepage, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_homepage homepage: homepage, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_homepage ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new(homepage: homepage, 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_homepage({ homepage: homepage, 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_homepage(::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new(homepage: homepage, 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_homepage_client_stub.call_rpc_count + end + end + + def test_claim_homepage + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + overwrite = true + + claim_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :claim_homepage, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["overwrite"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, claim_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.claim_homepage({ name: name, overwrite: overwrite }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.claim_homepage name: name, overwrite: overwrite do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.claim_homepage ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new(name: name, overwrite: overwrite) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.claim_homepage({ name: name, overwrite: overwrite }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.claim_homepage(::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new(name: name, overwrite: overwrite), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, claim_homepage_client_stub.call_rpc_count + end + end + + def test_unclaim_homepage + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + unclaim_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :unclaim_homepage, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, unclaim_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.unclaim_homepage({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.unclaim_homepage name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.unclaim_homepage ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.unclaim_homepage({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.unclaim_homepage(::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, unclaim_homepage_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::Shopping::Merchant::Accounts::V1::HomepageService::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::Shopping::Merchant::Accounts::V1::HomepageService::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::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_paths_test.rb new file mode 100644 index 000000000000..7c464e6be2db --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_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/shopping/merchant/accounts/v1/lfp_providers_service" + +class ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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_lfp_provider_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_provider_path account: "value0", omnichannel_setting: "value1", lfp_provider: "value2" + assert_equal "accounts/value0/omnichannelSettings/value1/lfpProviders/value2", path + end + end + + def test_omnichannel_setting_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.omnichannel_setting_path account: "value0", omnichannel_setting: "value1" + assert_equal "accounts/value0/omnichannelSettings/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_rest_test.rb new file mode 100644 index 000000000000..a20843454363 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_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/shopping/merchant/accounts/v1/lfpproviders_pb" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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_find_lfp_providers + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + find_lfp_providers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::ServiceStub.stub :transcode_find_lfp_providers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, find_lfp_providers_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.find_lfp_providers({ 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.find_lfp_providers 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.find_lfp_providers ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.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.find_lfp_providers({ 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.find_lfp_providers(::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.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, find_lfp_providers_client_stub.call_count + end + end + end + + def test_link_lfp_provider + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + external_account_id = "hello world" + + link_lfp_provider_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::ServiceStub.stub :transcode_link_lfp_provider_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, link_lfp_provider_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.link_lfp_provider({ name: name, external_account_id: external_account_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.link_lfp_provider name: name, external_account_id: external_account_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.link_lfp_provider ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.link_lfp_provider({ name: name, external_account_id: external_account_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.link_lfp_provider(::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, link_lfp_provider_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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb new file mode 100644 index 000000000000..d3d962a154ff --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb @@ -0,0 +1,231 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/lfpproviders_pb" +require "google/shopping/merchant/accounts/v1/lfp_providers_service" + +class ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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_find_lfp_providers + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + find_lfp_providers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :find_lfp_providers, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest, 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, find_lfp_providers_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.find_lfp_providers({ 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.find_lfp_providers 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.find_lfp_providers ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.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.find_lfp_providers({ 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.find_lfp_providers(::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.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, find_lfp_providers_client_stub.call_rpc_count + end + end + + def test_link_lfp_provider + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + external_account_id = "hello world" + + link_lfp_provider_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :link_lfp_provider, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["external_account_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, link_lfp_provider_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.link_lfp_provider({ name: name, external_account_id: external_account_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.link_lfp_provider name: name, external_account_id: external_account_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.link_lfp_provider ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.link_lfp_provider({ name: name, external_account_id: external_account_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.link_lfp_provider(::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, link_lfp_provider_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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_paths_test.rb new file mode 100644 index 000000000000..b271e6e41dfb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_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/shopping/merchant/accounts/v1/omnichannel_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_omnichannel_setting_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.omnichannel_setting_path account: "value0", omnichannel_setting: "value1" + assert_equal "accounts/value0/omnichannelSettings/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_rest_test.rb new file mode 100644 index 000000000000..3de422202e7c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_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/shopping/merchant/accounts/v1/omnichannelsettings_pb" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_omnichannel_setting + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_get_omnichannel_setting_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_omnichannel_setting({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_omnichannel_setting name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_omnichannel_setting({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_omnichannel_setting_client_stub.call_count + end + end + end + + def test_list_omnichannel_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse.new + http_response = OpenStruct.new 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_omnichannel_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_list_omnichannel_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_omnichannel_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_omnichannel_settings({ 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_omnichannel_settings 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_omnichannel_settings ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.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_omnichannel_settings({ 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_omnichannel_settings(::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.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_omnichannel_settings_client_stub.call_count + end + end + end + + def test_create_omnichannel_setting + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + omnichannel_setting = {} + + create_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_create_omnichannel_setting_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_omnichannel_setting parent: parent, omnichannel_setting: omnichannel_setting do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_omnichannel_setting_client_stub.call_count + end + end + end + + def test_update_omnichannel_setting + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + omnichannel_setting = {} + update_mask = {} + + update_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_update_omnichannel_setting_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_omnichannel_setting omnichannel_setting: omnichannel_setting, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_omnichannel_setting_client_stub.call_count + end + end + end + + def test_request_inventory_verification + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + request_inventory_verification_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_request_inventory_verification_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, request_inventory_verification_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.request_inventory_verification({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.request_inventory_verification name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.request_inventory_verification ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.request_inventory_verification({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.request_inventory_verification(::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, request_inventory_verification_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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_test.rb new file mode 100644 index 000000000000..3787e174d401 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_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/shopping/merchant/accounts/v1/omnichannelsettings_pb" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_omnichannel_setting + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_omnichannel_setting, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_omnichannel_setting({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_omnichannel_setting name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_omnichannel_setting({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_omnichannel_setting_client_stub.call_rpc_count + end + end + + def test_list_omnichannel_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_omnichannel_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_omnichannel_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest, 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_omnichannel_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_omnichannel_settings({ 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_omnichannel_settings 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_omnichannel_settings ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.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_omnichannel_settings({ 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_omnichannel_settings(::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.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_omnichannel_settings_client_stub.call_rpc_count + end + end + + def test_create_omnichannel_setting + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + omnichannel_setting = {} + + create_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_omnichannel_setting, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting), request["omnichannel_setting"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_omnichannel_setting parent: parent, omnichannel_setting: omnichannel_setting do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_omnichannel_setting_client_stub.call_rpc_count + end + end + + def test_update_omnichannel_setting + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + omnichannel_setting = {} + update_mask = {} + + update_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_omnichannel_setting, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting), request["omnichannel_setting"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_omnichannel_setting omnichannel_setting: omnichannel_setting, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, 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_omnichannel_setting({ omnichannel_setting: omnichannel_setting, 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_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, 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_omnichannel_setting_client_stub.call_rpc_count + end + end + + def test_request_inventory_verification + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_inventory_verification_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :request_inventory_verification, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, request_inventory_verification_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.request_inventory_verification({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.request_inventory_verification name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.request_inventory_verification ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.request_inventory_verification({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.request_inventory_verification(::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, request_inventory_verification_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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_paths_test.rb new file mode 100644 index 000000000000..24232f903c3f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_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/shopping/merchant/accounts/v1/online_return_policy_service" + +class ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_online_return_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.online_return_policy_path account: "value0", return_policy: "value1" + assert_equal "accounts/value0/onlineReturnPolicies/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_rest_test.rb new file mode 100644 index 000000000000..894d759226cf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_rest_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/rest" +require "google/shopping/merchant/accounts/v1/online_return_policy_pb" +require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_online_return_policy + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_online_return_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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_get_online_return_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_online_return_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_online_return_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_online_return_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_online_return_policy_client_stub.call_count + end + end + end + + def test_list_online_return_policies + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse.new + http_response = OpenStruct.new 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_online_return_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_list_online_return_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_online_return_policies_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_online_return_policies({ 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_online_return_policies 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_online_return_policies ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.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_online_return_policies({ 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_online_return_policies(::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.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_online_return_policies_client_stub.call_count + end + end + end + + def test_create_online_return_policy + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + online_return_policy = {} + + create_online_return_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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_create_online_return_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_online_return_policy parent: parent, online_return_policy: online_return_policy do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_online_return_policy_client_stub.call_count + end + end + end + + def test_delete_online_return_policy + # 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_online_return_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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_delete_online_return_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_online_return_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_online_return_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_online_return_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_online_return_policy_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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb new file mode 100644 index 000000000000..797843e167e9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb @@ -0,0 +1,347 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/online_return_policy_pb" +require "google/shopping/merchant/accounts/v1/online_return_policy_service" + +class ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_online_return_policy + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_online_return_policy, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_online_return_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_online_return_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_online_return_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_online_return_policy_client_stub.call_rpc_count + end + end + + def test_list_online_return_policies + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_online_return_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_online_return_policies, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest, 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_online_return_policies_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_online_return_policies({ 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_online_return_policies 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_online_return_policies ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.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_online_return_policies({ 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_online_return_policies(::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.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_online_return_policies_client_stub.call_rpc_count + end + end + + def test_create_online_return_policy + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + online_return_policy = {} + + create_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_online_return_policy, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy), request["online_return_policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_online_return_policy parent: parent, online_return_policy: online_return_policy do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_online_return_policy_client_stub.call_rpc_count + end + end + + def test_delete_online_return_policy + # 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_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_online_return_policy, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_online_return_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_online_return_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_online_return_policy({ 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_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new(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_online_return_policy_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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_paths_test.rb new file mode 100644 index 000000000000..1ef2405c401b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_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/shopping/merchant/accounts/v1/programs_service" + +class ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_program_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.program_path account: "value0", program: "value1" + assert_equal "accounts/value0/programs/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_rest_test.rb new file mode 100644 index 000000000000..a33f8b696e0c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_rest_test.rb @@ -0,0 +1,317 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1/programs_pb" +require "google/shopping/merchant/accounts/v1/programs_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_program + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Program.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ServiceStub.stub :transcode_get_program_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_program({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_program name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_program ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_program({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_program(::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_program_client_stub.call_count + end + end + end + + def test_list_programs + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse.new + http_response = OpenStruct.new 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_programs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ServiceStub.stub :transcode_list_programs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_programs_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_programs({ 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_programs 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_programs ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.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_programs({ 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_programs(::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.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_programs_client_stub.call_count + end + end + end + + def test_enable_program + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Program.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + enable_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ServiceStub.stub :transcode_enable_program_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, enable_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.enable_program({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.enable_program name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.enable_program ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.enable_program({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.enable_program(::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, enable_program_client_stub.call_count + end + end + end + + def test_disable_program + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Program.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + disable_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ServiceStub.stub :transcode_disable_program_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, disable_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.disable_program({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.disable_program name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.disable_program ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.disable_program({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.disable_program(::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, disable_program_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::Shopping::Merchant::Accounts::V1::ProgramsService::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::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_test.rb new file mode 100644 index 000000000000..91499ae0270f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_test.rb @@ -0,0 +1,345 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/programs_pb" +require "google/shopping/merchant/accounts/v1/programs_service" + +class ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_program + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Program.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_program, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_program({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_program name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_program ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_program({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_program(::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_program_client_stub.call_rpc_count + end + end + + def test_list_programs + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_programs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_programs, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest, 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_programs_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_programs({ 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_programs 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_programs ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.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_programs({ 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_programs(::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.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_programs_client_stub.call_rpc_count + end + end + + def test_enable_program + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Program.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + enable_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :enable_program, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, enable_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.enable_program({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.enable_program name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.enable_program ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.enable_program({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.enable_program(::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, enable_program_client_stub.call_rpc_count + end + end + + def test_disable_program + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Program.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + disable_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :disable_program, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, disable_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.disable_program({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.disable_program name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.disable_program ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.disable_program({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.disable_program(::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, disable_program_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::Shopping::Merchant::Accounts::V1::ProgramsService::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::Shopping::Merchant::Accounts::V1::ProgramsService::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::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_paths_test.rb new file mode 100644 index 000000000000..dfc2a9e6f99f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_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/shopping/merchant/accounts/v1/regions_service" + +class ::Google::Shopping::Merchant::Accounts::V1::RegionsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_region_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.region_path account: "value0", region: "value1" + assert_equal "accounts/value0/regions/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_rest_test.rb new file mode 100644 index 000000000000..ccec6752b7a8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_rest_test.rb @@ -0,0 +1,539 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/accounts/v1/regions_pb" +require "google/shopping/merchant/accounts/v1/regions_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_region + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Region.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_get_region_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_region({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_region name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_region ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_region({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_region(::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_region_client_stub.call_count + end + end + end + + def test_create_region + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Region.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + region_id = "hello world" + region = {} + + create_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_create_region_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_region({ parent: parent, region_id: region_id, region: region }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_region parent: parent, region_id: region_id, region: region do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_region ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_region({ parent: parent, region_id: region_id, region: region }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_region(::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_region_client_stub.call_count + end + end + end + + def test_batch_create_regions + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + batch_create_regions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_batch_create_regions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_create_regions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_create_regions({ parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_create_regions parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_create_regions ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest.new(parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_create_regions({ parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_create_regions(::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_create_regions_client_stub.call_count + end + end + end + + def test_update_region + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Region.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + region = {} + update_mask = {} + + update_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_update_region_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_region({ region: region, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_region region: region, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_region ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new(region: region, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_region({ region: region, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_region(::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new(region: region, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_region_client_stub.call_count + end + end + end + + def test_batch_update_regions + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + batch_update_regions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_batch_update_regions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_update_regions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_update_regions({ parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_update_regions parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_update_regions ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest.new(parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_update_regions({ parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_update_regions(::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_update_regions_client_stub.call_count + end + end + end + + def test_delete_region + # 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_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_delete_region_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_region({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_region name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_region ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_region({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_region(::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_region_client_stub.call_count + end + end + end + + def test_batch_delete_regions + # 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" + requests = [{}] + + batch_delete_regions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_batch_delete_regions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_delete_regions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_delete_regions({ parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_delete_regions parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_delete_regions ::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest.new(parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_delete_regions({ parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_delete_regions(::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_delete_regions_client_stub.call_count + end + end + end + + def test_list_regions + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse.new + http_response = OpenStruct.new 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_regions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_list_regions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_regions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_regions({ 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_regions 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_regions ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.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_regions({ 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_regions(::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.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_regions_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::Shopping::Merchant::Accounts::V1::RegionsService::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::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_test.rb new file mode 100644 index 000000000000..2498e37aa96b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/regions_pb" +require "google/shopping/merchant/accounts/v1/regions_service" + +class ::Google::Shopping::Merchant::Accounts::V1::RegionsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_region + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Region.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_region, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_region({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_region name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_region ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_region({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_region(::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_region_client_stub.call_rpc_count + end + end + + def test_create_region + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Region.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + region_id = "hello world" + region = {} + + create_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_region, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["region_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Region), request["region"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_region({ parent: parent, region_id: region_id, region: region }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_region parent: parent, region_id: region_id, region: region do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_region ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_region({ parent: parent, region_id: region_id, region: region }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_region(::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_region_client_stub.call_rpc_count + end + end + + def test_batch_create_regions + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + batch_create_regions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_create_regions, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_create_regions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_create_regions({ parent: parent, requests: requests }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_create_regions parent: parent, requests: requests do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_create_regions ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest.new(parent: parent, requests: requests) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_create_regions({ parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_create_regions(::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_create_regions_client_stub.call_rpc_count + end + end + + def test_update_region + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Region.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + region = {} + update_mask = {} + + update_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_region, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Region), request["region"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_region({ region: region, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_region region: region, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_region ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new(region: region, 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_region({ region: region, 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_region(::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new(region: region, 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_region_client_stub.call_rpc_count + end + end + + def test_batch_update_regions + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + batch_update_regions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_update_regions, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_update_regions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_update_regions({ parent: parent, requests: requests }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_update_regions parent: parent, requests: requests do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_update_regions ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest.new(parent: parent, requests: requests) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_update_regions({ parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_update_regions(::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_update_regions_client_stub.call_rpc_count + end + end + + def test_delete_region + # 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_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_region, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_region({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_region name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_region ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_region({ 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_region(::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new(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_region_client_stub.call_rpc_count + end + end + + def test_batch_delete_regions + # 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" + requests = [{}] + + batch_delete_regions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_delete_regions, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_delete_regions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_delete_regions({ parent: parent, requests: requests }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_delete_regions parent: parent, requests: requests do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_delete_regions ::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest.new(parent: parent, requests: requests) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_delete_regions({ parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_delete_regions(::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_delete_regions_client_stub.call_rpc_count + end + end + + def test_list_regions + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_regions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_regions, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest, 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_regions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_regions({ 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_regions 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_regions ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.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_regions({ 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_regions(::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.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_regions_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::Shopping::Merchant::Accounts::V1::RegionsService::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::Shopping::Merchant::Accounts::V1::RegionsService::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::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_paths_test.rb new file mode 100644 index 000000000000..7b536f46ae2b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_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/shopping/merchant/accounts/v1/shipping_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_shipping_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.shipping_settings_path account: "value0" + assert_equal "accounts/value0/shippingSettings", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_rest_test.rb new file mode 100644 index 000000000000..8359fdf326e1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1/shippingsettings_pb" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_shipping_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_shipping_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::ServiceStub.stub :transcode_get_shipping_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_shipping_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_shipping_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_shipping_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_shipping_settings ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_shipping_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_shipping_settings(::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_shipping_settings_client_stub.call_count + end + end + end + + def test_insert_shipping_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + shipping_setting = {} + + insert_shipping_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::ServiceStub.stub :transcode_insert_shipping_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_shipping_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_shipping_settings parent: parent, shipping_setting: shipping_setting do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_shipping_settings ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_shipping_settings(::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_shipping_settings_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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb new file mode 100644 index 000000000000..5f66c4d2e3d3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/shippingsettings_pb" +require "google/shopping/merchant/accounts/v1/shipping_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_shipping_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_shipping_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_shipping_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_shipping_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_shipping_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_shipping_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_shipping_settings ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_shipping_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_shipping_settings(::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_shipping_settings_client_stub.call_rpc_count + end + end + + def test_insert_shipping_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + shipping_setting = {} + + insert_shipping_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_shipping_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings), request["shipping_setting"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_shipping_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_shipping_settings parent: parent, shipping_setting: shipping_setting do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_shipping_settings ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_shipping_settings(::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_shipping_settings_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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_paths_test.rb new file mode 100644 index 000000000000..02c24e35694c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service" + +class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_terms_of_service_agreement_state_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.terms_of_service_agreement_state_path account: "value0", identifier: "value1" + assert_equal "accounts/value0/termsOfServiceAgreementStates/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_rest_test.rb new file mode 100644 index 000000000000..e4a395b398ff --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_rest_test.rb @@ -0,0 +1,207 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_terms_of_service_agreement_state + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_terms_of_service_agreement_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::ServiceStub.stub :transcode_get_terms_of_service_agreement_state_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_terms_of_service_agreement_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_terms_of_service_agreement_state({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_terms_of_service_agreement_state name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_terms_of_service_agreement_state({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_terms_of_service_agreement_state_client_stub.call_count + end + end + end + + def test_retrieve_for_application_terms_of_service_agreement_state + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + retrieve_for_application_terms_of_service_agreement_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::ServiceStub.stub :transcode_retrieve_for_application_terms_of_service_agreement_state_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, retrieve_for_application_terms_of_service_agreement_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.retrieve_for_application_terms_of_service_agreement_state parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.retrieve_for_application_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.retrieve_for_application_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, retrieve_for_application_terms_of_service_agreement_state_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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb new file mode 100644 index 000000000000..d129875a1043 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb @@ -0,0 +1,220 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service" + +class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_terms_of_service_agreement_state + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_terms_of_service_agreement_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_terms_of_service_agreement_state, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_terms_of_service_agreement_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_terms_of_service_agreement_state({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_terms_of_service_agreement_state name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_terms_of_service_agreement_state({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_terms_of_service_agreement_state_client_stub.call_rpc_count + end + end + + def test_retrieve_for_application_terms_of_service_agreement_state + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + retrieve_for_application_terms_of_service_agreement_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :retrieve_for_application_terms_of_service_agreement_state, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, retrieve_for_application_terms_of_service_agreement_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.retrieve_for_application_terms_of_service_agreement_state parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.retrieve_for_application_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.retrieve_for_application_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, retrieve_for_application_terms_of_service_agreement_state_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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_paths_test.rb new file mode 100644 index 000000000000..69b3d964582e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_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/shopping/merchant/accounts/v1/terms_of_service_service" + +class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_terms_of_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.terms_of_service_path version: "value0" + assert_equal "termsOfService/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_rest_test.rb new file mode 100644 index 000000000000..b0f5998ca69b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_rest_test.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1/termsofservice_pb" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_terms_of_service + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::ServiceStub.stub :transcode_get_terms_of_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_terms_of_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_terms_of_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_terms_of_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_terms_of_service_client_stub.call_count + end + end + end + + def test_retrieve_latest_terms_of_service + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + region_code = "hello world" + kind = :TERMS_OF_SERVICE_KIND_UNSPECIFIED + + retrieve_latest_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::ServiceStub.stub :transcode_retrieve_latest_terms_of_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, retrieve_latest_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.retrieve_latest_terms_of_service region_code: region_code, kind: kind do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.retrieve_latest_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.retrieve_latest_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, retrieve_latest_terms_of_service_client_stub.call_count + end + end + end + + def test_accept_terms_of_service + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + account = "hello world" + region_code = "hello world" + + accept_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::ServiceStub.stub :transcode_accept_terms_of_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, accept_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.accept_terms_of_service({ name: name, account: account, region_code: region_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.accept_terms_of_service name: name, account: account, region_code: region_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.accept_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.accept_terms_of_service({ name: name, account: account, region_code: region_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.accept_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, accept_terms_of_service_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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb new file mode 100644 index 000000000000..1d66866ca978 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb @@ -0,0 +1,284 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/termsofservice_pb" +require "google/shopping/merchant/accounts/v1/terms_of_service_service" + +class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_terms_of_service + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_terms_of_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_terms_of_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_terms_of_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_terms_of_service({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_terms_of_service_client_stub.call_rpc_count + end + end + + def test_retrieve_latest_terms_of_service + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + region_code = "hello world" + kind = :TERMS_OF_SERVICE_KIND_UNSPECIFIED + + retrieve_latest_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :retrieve_latest_terms_of_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest, request + assert_equal "hello world", request["region_code"] + assert_equal :TERMS_OF_SERVICE_KIND_UNSPECIFIED, request["kind"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, retrieve_latest_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.retrieve_latest_terms_of_service region_code: region_code, kind: kind do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.retrieve_latest_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.retrieve_latest_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, retrieve_latest_terms_of_service_client_stub.call_rpc_count + end + end + + def test_accept_terms_of_service + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + account = "hello world" + region_code = "hello world" + + accept_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :accept_terms_of_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["account"] + assert_equal "hello world", request["region_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, accept_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.accept_terms_of_service({ name: name, account: account, region_code: region_code }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.accept_terms_of_service name: name, account: account, region_code: region_code do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.accept_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.accept_terms_of_service({ name: name, account: account, region_code: region_code }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.accept_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, accept_terms_of_service_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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_paths_test.rb new file mode 100644 index 000000000000..12c2582215a5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_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/shopping/merchant/accounts/v1/user_service" + +class ::Google::Shopping::Merchant::Accounts::V1::UserService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_user_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.user_path account: "value0", email: "value1" + assert_equal "accounts/value0/users/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_rest_test.rb new file mode 100644 index 000000000000..41dfbe2fd771 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_rest_test.rb @@ -0,0 +1,428 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/accounts/v1/user_pb" +require "google/shopping/merchant/accounts/v1/user_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_user + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::User.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_get_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_user({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_user name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_user ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_user({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_user(::Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_user_client_stub.call_count + end + end + end + + def test_create_user + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::User.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + user_id = "hello world" + user = {} + + create_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_create_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_user({ parent: parent, user_id: user_id, user: user }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_user parent: parent, user_id: user_id, user: user do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_user ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new(parent: parent, user_id: user_id, user: user) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_user({ parent: parent, user_id: user_id, user: user }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_user(::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new(parent: parent, user_id: user_id, user: user), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_user_client_stub.call_count + end + end + end + + def test_delete_user + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_delete_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_user({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_user name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_user ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_user({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_user(::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_user_client_stub.call_count + end + end + end + + def test_update_user + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::User.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + user = {} + update_mask = {} + + update_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_update_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_user({ user: user, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_user user: user, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_user ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new(user: user, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_user({ user: user, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_user(::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new(user: user, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_user_client_stub.call_count + end + end + end + + def test_list_users + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse.new + http_response = OpenStruct.new 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_users_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_list_users_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_users_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_users({ 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_users 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_users ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.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_users({ 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_users(::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.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_users_client_stub.call_count + end + end + end + + def test_verify_self + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::User.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account = "hello world" + + verify_self_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_verify_self_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, verify_self_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.verify_self({ account: account }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.verify_self account: account do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.verify_self ::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest.new(account: account) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.verify_self({ account: account }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.verify_self(::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest.new(account: account), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, verify_self_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::Shopping::Merchant::Accounts::V1::UserService::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::Shopping::Merchant::Accounts::V1::UserService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_test.rb new file mode 100644 index 000000000000..394e97f79670 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_test.rb @@ -0,0 +1,467 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1/user_pb" +require "google/shopping/merchant/accounts/v1/user_service" + +class ::Google::Shopping::Merchant::Accounts::V1::UserService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_user + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::User.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_user, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_user({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_user name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_user ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_user({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_user(::Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_user_client_stub.call_rpc_count + end + end + + def test_create_user + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::User.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + user_id = "hello world" + user = {} + + create_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_user, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["user_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::User), request["user"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_user({ parent: parent, user_id: user_id, user: user }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_user parent: parent, user_id: user_id, user: user do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_user ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new(parent: parent, user_id: user_id, user: user) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_user({ parent: parent, user_id: user_id, user: user }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_user(::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new(parent: parent, user_id: user_id, user: user), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_user_client_stub.call_rpc_count + end + end + + def test_delete_user + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_user, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_user({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_user name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_user ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_user({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_user(::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_user_client_stub.call_rpc_count + end + end + + def test_update_user + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::User.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + user = {} + update_mask = {} + + update_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_user, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::User), request["user"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_user({ user: user, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_user user: user, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_user ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new(user: user, 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_user({ user: user, 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_user(::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new(user: user, 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_user_client_stub.call_rpc_count + end + end + + def test_list_users + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_users_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_users, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest, 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_users_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_users({ 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_users 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_users ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.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_users({ 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_users(::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.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_users_client_stub.call_rpc_count + end + end + + def test_verify_self + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::User.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account = "hello world" + + verify_self_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :verify_self, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest, request + assert_equal "hello world", request["account"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, verify_self_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.verify_self({ account: account }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.verify_self account: account do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.verify_self ::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest.new(account: account) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.verify_self({ account: account }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.verify_self(::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest.new(account: account), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, verify_self_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::Shopping::Merchant::Accounts::V1::UserService::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::Shopping::Merchant::Accounts::V1::UserService::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::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UserService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.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-shopping-merchant-accounts-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..788a554a5593 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta", + "distribution_name": "google-shopping-merchant-accounts-v1beta", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1BETA API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml new file mode 100644 index 000000000000..5fa9eb10ddf1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-accounts-v1beta.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-shopping-merchant-accounts-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.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-shopping-merchant-accounts-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1BETA 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-shopping-merchant-accounts-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..456fb36054bb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-accounts-v1beta 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-shopping-merchant-accounts-v1beta 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/shopping/merchant/accounts/v1beta" + +client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/accounts/v1beta" + +::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts-v1beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/accounts/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/README.md new file mode 100644 index 000000000000..751c304589af --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1BETA API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1BETA API. Most users should consider using +the main client gem, +[google-shopping-merchant-accounts](https://rubygems.org/gems/google-shopping-merchant-accounts). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-accounts-v1beta +``` + +## 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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/accounts/v1beta" + +client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new +request = ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new # (request fields as keyword arguments...) +response = client.get_account_tax request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/accounts/v1beta" +require "logger" + +client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-accounts-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-accounts`. +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-shopping-merchant-accounts-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Rakefile new file mode 100644 index 000000000000..dc4519177094 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta 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/shopping/merchant/accounts/v1beta/account_tax_service/credentials" + ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts-v1beta 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-shopping-merchant-accounts-v1beta 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-shopping-merchant-accounts-v1beta 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-shopping-merchant-accounts-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-accounts-v1beta" + header "google-shopping-merchant-accounts-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-accounts-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-accounts-v1beta 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-shopping-merchant-accounts-v1beta 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-shopping-merchant-accounts-v1beta 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-shopping-merchant-accounts-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..c3348ff56d9c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/gapic_metadata.json @@ -0,0 +1,504 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.accounts.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::Accounts::V1beta", + "services": { + "AccountTaxService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client", + "rpcs": { + "GetAccountTax": { + "methods": [ + "get_account_tax" + ] + }, + "ListAccountTax": { + "methods": [ + "list_account_tax" + ] + }, + "UpdateAccountTax": { + "methods": [ + "update_account_tax" + ] + } + } + } + } + }, + "AccountIssueService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client", + "rpcs": { + "ListAccountIssues": { + "methods": [ + "list_account_issues" + ] + } + } + } + } + }, + "UserService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client", + "rpcs": { + "GetUser": { + "methods": [ + "get_user" + ] + }, + "CreateUser": { + "methods": [ + "create_user" + ] + }, + "DeleteUser": { + "methods": [ + "delete_user" + ] + }, + "UpdateUser": { + "methods": [ + "update_user" + ] + }, + "ListUsers": { + "methods": [ + "list_users" + ] + } + } + } + } + }, + "AccountsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client", + "rpcs": { + "GetAccount": { + "methods": [ + "get_account" + ] + }, + "CreateAndConfigureAccount": { + "methods": [ + "create_and_configure_account" + ] + }, + "DeleteAccount": { + "methods": [ + "delete_account" + ] + }, + "UpdateAccount": { + "methods": [ + "update_account" + ] + }, + "ListAccounts": { + "methods": [ + "list_accounts" + ] + }, + "ListSubAccounts": { + "methods": [ + "list_sub_accounts" + ] + } + } + } + } + }, + "AutofeedSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client", + "rpcs": { + "GetAutofeedSettings": { + "methods": [ + "get_autofeed_settings" + ] + }, + "UpdateAutofeedSettings": { + "methods": [ + "update_autofeed_settings" + ] + } + } + } + } + }, + "AutomaticImprovementsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client", + "rpcs": { + "GetAutomaticImprovements": { + "methods": [ + "get_automatic_improvements" + ] + }, + "UpdateAutomaticImprovements": { + "methods": [ + "update_automatic_improvements" + ] + } + } + } + } + }, + "BusinessIdentityService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client", + "rpcs": { + "GetBusinessIdentity": { + "methods": [ + "get_business_identity" + ] + }, + "UpdateBusinessIdentity": { + "methods": [ + "update_business_identity" + ] + } + } + } + } + }, + "BusinessInfoService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client", + "rpcs": { + "GetBusinessInfo": { + "methods": [ + "get_business_info" + ] + }, + "UpdateBusinessInfo": { + "methods": [ + "update_business_info" + ] + } + } + } + } + }, + "CheckoutSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client", + "rpcs": { + "GetCheckoutSettings": { + "methods": [ + "get_checkout_settings" + ] + }, + "CreateCheckoutSettings": { + "methods": [ + "create_checkout_settings" + ] + }, + "UpdateCheckoutSettings": { + "methods": [ + "update_checkout_settings" + ] + }, + "DeleteCheckoutSettings": { + "methods": [ + "delete_checkout_settings" + ] + } + } + } + } + }, + "EmailPreferencesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client", + "rpcs": { + "GetEmailPreferences": { + "methods": [ + "get_email_preferences" + ] + }, + "UpdateEmailPreferences": { + "methods": [ + "update_email_preferences" + ] + } + } + } + } + }, + "GbpAccountsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client", + "rpcs": { + "ListGbpAccounts": { + "methods": [ + "list_gbp_accounts" + ] + }, + "LinkGbpAccount": { + "methods": [ + "link_gbp_account" + ] + } + } + } + } + }, + "HomepageService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client", + "rpcs": { + "GetHomepage": { + "methods": [ + "get_homepage" + ] + }, + "UpdateHomepage": { + "methods": [ + "update_homepage" + ] + }, + "ClaimHomepage": { + "methods": [ + "claim_homepage" + ] + }, + "UnclaimHomepage": { + "methods": [ + "unclaim_homepage" + ] + } + } + } + } + }, + "LfpProvidersService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client", + "rpcs": { + "FindLfpProviders": { + "methods": [ + "find_lfp_providers" + ] + }, + "LinkLfpProvider": { + "methods": [ + "link_lfp_provider" + ] + } + } + } + } + }, + "OmnichannelSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client", + "rpcs": { + "GetOmnichannelSetting": { + "methods": [ + "get_omnichannel_setting" + ] + }, + "ListOmnichannelSettings": { + "methods": [ + "list_omnichannel_settings" + ] + }, + "CreateOmnichannelSetting": { + "methods": [ + "create_omnichannel_setting" + ] + }, + "UpdateOmnichannelSetting": { + "methods": [ + "update_omnichannel_setting" + ] + }, + "RequestInventoryVerification": { + "methods": [ + "request_inventory_verification" + ] + } + } + } + } + }, + "OnlineReturnPolicyService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client", + "rpcs": { + "GetOnlineReturnPolicy": { + "methods": [ + "get_online_return_policy" + ] + }, + "ListOnlineReturnPolicies": { + "methods": [ + "list_online_return_policies" + ] + }, + "CreateOnlineReturnPolicy": { + "methods": [ + "create_online_return_policy" + ] + }, + "UpdateOnlineReturnPolicy": { + "methods": [ + "update_online_return_policy" + ] + }, + "DeleteOnlineReturnPolicy": { + "methods": [ + "delete_online_return_policy" + ] + } + } + } + } + }, + "ProgramsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client", + "rpcs": { + "GetProgram": { + "methods": [ + "get_program" + ] + }, + "ListPrograms": { + "methods": [ + "list_programs" + ] + }, + "EnableProgram": { + "methods": [ + "enable_program" + ] + }, + "DisableProgram": { + "methods": [ + "disable_program" + ] + } + } + } + } + }, + "RegionsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client", + "rpcs": { + "GetRegion": { + "methods": [ + "get_region" + ] + }, + "CreateRegion": { + "methods": [ + "create_region" + ] + }, + "UpdateRegion": { + "methods": [ + "update_region" + ] + }, + "DeleteRegion": { + "methods": [ + "delete_region" + ] + }, + "ListRegions": { + "methods": [ + "list_regions" + ] + } + } + } + } + }, + "ShippingSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client", + "rpcs": { + "GetShippingSettings": { + "methods": [ + "get_shipping_settings" + ] + }, + "InsertShippingSettings": { + "methods": [ + "insert_shipping_settings" + ] + } + } + } + } + }, + "TermsOfServiceService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client", + "rpcs": { + "GetTermsOfService": { + "methods": [ + "get_terms_of_service" + ] + }, + "RetrieveLatestTermsOfService": { + "methods": [ + "retrieve_latest_terms_of_service" + ] + }, + "AcceptTermsOfService": { + "methods": [ + "accept_terms_of_service" + ] + } + } + } + } + }, + "TermsOfServiceAgreementStateService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client", + "rpcs": { + "GetTermsOfServiceAgreementState": { + "methods": [ + "get_terms_of_service_agreement_state" + ] + }, + "RetrieveForApplicationTermsOfServiceAgreementState": { + "methods": [ + "retrieve_for_application_terms_of_service_agreement_state" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec new file mode 100644 index 000000000000..d4adca82cd27 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/accounts/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-accounts-v1beta" + gem.version = Google::Shopping::Merchant::Accounts::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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-shopping-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb new file mode 100644 index 000000000000..c0b2d7879e0c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.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/shopping/merchant/accounts/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb new file mode 100644 index 000000000000..e10eb5ebc89c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.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! + +require "google/shopping/merchant/accounts/v1beta/account_tax_service" +require "google/shopping/merchant/accounts/v1beta/account_issue_service" +require "google/shopping/merchant/accounts/v1beta/user_service" +require "google/shopping/merchant/accounts/v1beta/accounts_service" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" +require "google/shopping/merchant/accounts/v1beta/business_identity_service" +require "google/shopping/merchant/accounts/v1beta/business_info_service" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" +require "google/shopping/merchant/accounts/v1beta/homepage_service" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service" +require "google/shopping/merchant/accounts/v1beta/programs_service" +require "google/shopping/merchant/accounts/v1beta/regions_service" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service" +require "google/shopping/merchant/accounts/v1beta/version" + +module Google + module Shopping + module Merchant + module Accounts + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/accounts/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb new file mode 100644 index 000000000000..49903c0040db --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/accessright.proto + +require 'google/protobuf' + + +descriptor_data = "\n:google/shopping/merchant/accounts/v1beta/accessright.proto\x12(google.shopping.merchant.accounts.v1beta*_\n\x0b\x41\x63\x63\x65ssRight\x12\x1c\n\x18\x41\x43\x43\x45SS_RIGHT_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\t\n\x05\x41\x44MIN\x10\x02\x12\x19\n\x15PERFORMANCE_REPORTING\x10\x03\x42\x92\x01\n,com.google.shopping.merchant.accounts.v1betaB\x10\x41\x63\x63\x65ssRightProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + AccessRight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccessRight").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb new file mode 100644 index 000000000000..b613248a4cd9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/account_issue_service/credentials" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/paths" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/client" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support `AccountIssueService` API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/account_issue_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new + # + module AccountIssueService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "account_issue_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb new file mode 100644 index 000000000000..0b9febb4d60a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb @@ -0,0 +1,507 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/accountissue_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountIssueService + ## + # Client for the AccountIssueService service. + # + # Service to support `AccountIssueService` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_issue_service_stub + + ## + # Configure the AccountIssueService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountIssueService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountIssueService 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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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 + @account_issue_service_stub.universe_domain + end + + ## + # Create a new AccountIssueService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountIssueService 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/shopping/merchant/accounts/v1beta/accountissue_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 + + @account_issue_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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 + ) + + @account_issue_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 + @account_issue_service_stub.logger + end + + # Service calls + + ## + # Lists all account issues of a Merchant Center account. + # + # @overload list_account_issues(request, options = nil) + # Pass arguments to `list_account_issues` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil) + # Pass arguments to `list_account_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of issues. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of issues to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccountIssues` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountIssues` must + # match the call that provided the page token. + # @param language_code [::String] + # Optional. The issues in the response will have human-readable fields in the + # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), + # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be + # used. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in human-readable fields. For example 'America/Los_Angeles'. + # If not set, 'America/Los_Angeles' will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new + # + # # Call the list_account_issues method. + # result = client.list_account_issues request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue. + # p item + # end + # + def list_account_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_account_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_account_issues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_account_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_issue_service_stub.call_rpc :list_account_issues, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, 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 AccountIssueService API. + # + # This class represents the configuration for AccountIssueService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_account_issues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_issues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_issues.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountIssueService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_account_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_issues + + # @private + def initialize parent_rpcs = nil + list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues + @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb new file mode 100644 index 000000000000..bec671601e38 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_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 Shopping + module Merchant + module Accounts + module V1beta + module AccountIssueService + # Credentials for the AccountIssueService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb new file mode 100644 index 000000000000..71d24f829fad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.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 Shopping + module Merchant + module Accounts + module V1beta + module AccountIssueService + # Path helper methods for the AccountIssueService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb new file mode 100644 index 000000000000..3b76683c97dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/account_issue_service/credentials" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/paths" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support `AccountIssueService` API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new + # + module AccountIssueService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb new file mode 100644 index 000000000000..779e41fc1c3e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb @@ -0,0 +1,457 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/accountissue_pb" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountIssueService + module Rest + ## + # REST client for the AccountIssueService service. + # + # Service to support `AccountIssueService` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_issue_service_stub + + ## + # Configure the AccountIssueService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountIssueService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountIssueService 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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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 + @account_issue_service_stub.universe_domain + end + + ## + # Create a new AccountIssueService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountIssueService 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 + + @account_issue_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @account_issue_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 + @account_issue_service_stub.logger + end + + # Service calls + + ## + # Lists all account issues of a Merchant Center account. + # + # @overload list_account_issues(request, options = nil) + # Pass arguments to `list_account_issues` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil) + # Pass arguments to `list_account_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of issues. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of issues to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccountIssues` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountIssues` must + # match the call that provided the page token. + # @param language_code [::String] + # Optional. The issues in the response will have human-readable fields in the + # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), + # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be + # used. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in human-readable fields. For example 'America/Los_Angeles'. + # If not set, 'America/Los_Angeles' will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new + # + # # Call the list_account_issues method. + # result = client.list_account_issues request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue. + # p item + # end + # + def list_account_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_account_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_account_issues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_account_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_issue_service_stub.list_account_issues request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, "account_issues", request, result, 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 AccountIssueService REST API. + # + # This class represents the configuration for AccountIssueService 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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_issues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_issues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_issues.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountIssueService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_account_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_issues + + # @private + def initialize parent_rpcs = nil + list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues + @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb new file mode 100644 index 000000000000..625c0f5e9a9c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.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! + +require "google/shopping/merchant/accounts/v1beta/accountissue_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountIssueService + module Rest + ## + # REST service stub for the AccountIssueService 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_account_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse] + # A result object deserialized from the server's reply + def list_account_issues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_account_issues_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_account_issues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse.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_account_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_account_issues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/issues", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb new file mode 100644 index 000000000000..45fafd29eba8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/account_tax.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/accounts/v1beta/tax_rule_pb' + + +descriptor_data = "\n:google/shopping/merchant/accounts/v1beta/account_tax.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x37google/shopping/merchant/accounts/v1beta/tax_rule.proto\"\xe6\x01\n\nAccountTax\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x44\n\ttax_rules\x18\x03 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.TaxRule:i\xea\x41\x66\n%merchantapi.googleapis.com/AccountTax\x12#accounts/{account}/accounttax/{tax}*\x0c\x61\x63\x63ountTaxes2\naccountTax\"S\n\x14GetAccountTaxRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/AccountTax\"\x9a\x01\n\x17UpdateAccountTaxRequest\x12N\n\x0b\x61\x63\x63ount_tax\x18\x01 \x01(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.AccountTaxB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"}\n\x15ListAccountTaxRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%merchantapi.googleapis.com/AccountTax\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"~\n\x16ListAccountTaxResponse\x12K\n\raccount_taxes\x18\x01 \x03(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.AccountTax\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x84\x06\n\x11\x41\x63\x63ountTaxService\x12\xc5\x01\n\rGetAccountTax\x12>.google.shopping.merchant.accounts.v1beta.GetAccountTaxRequest\x1a\x34.google.shopping.merchant.accounts.v1beta.AccountTax\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{name=accounts/*/accounttax/*}\x12\xd5\x01\n\x0eListAccountTax\x12?.google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest\x1a@.google.shopping.merchant.accounts.v1beta.ListAccountTaxResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{parent=accounts/*}/accounttax\x12\x85\x02\n\x10UpdateAccountTax\x12\x41.google.shopping.merchant.accounts.v1beta.UpdateAccountTaxRequest\x1a\x34.google.shopping.merchant.accounts.v1beta.AccountTax\"x\xda\x41\x17\x61\x63\x63ount_tax,update_mask\xda\x41\x0b\x61\x63\x63ount_tax\x82\xd3\xe4\x93\x02J2;/accounts/v1beta/{account_tax.name=accounts/*/accounttax/*}:\x0b\x61\x63\x63ount_tax\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x91\x01\n,com.google.shopping.merchant.accounts.v1betaB\x0f\x41\x63\x63ountTaxProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + AccountTax = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountTax").msgclass + GetAccountTaxRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAccountTaxRequest").msgclass + UpdateAccountTaxRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAccountTaxRequest").msgclass + ListAccountTaxRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest").msgclass + ListAccountTaxResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountTaxResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb new file mode 100644 index 000000000000..fe883ee6aa6c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/account_tax_service/credentials" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/paths" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/client" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Manages account level tax setting data. + # + # This API defines the following resource model: + # + # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/account_tax_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new + # + module AccountTaxService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "account_tax_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb new file mode 100644 index 000000000000..811f8a756b2a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/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/shopping/merchant/accounts/v1beta/account_tax_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountTaxService + ## + # Client for the AccountTaxService service. + # + # Manages account level tax setting data. + # + # This API defines the following resource model: + # + # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_tax_service_stub + + ## + # Configure the AccountTaxService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountTaxService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountTaxService 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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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 + @account_tax_service_stub.universe_domain + end + + ## + # Create a new AccountTaxService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountTaxService 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/shopping/merchant/accounts/v1beta/account_tax_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 + + @account_tax_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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 + ) + + @account_tax_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 + @account_tax_service_stub.logger + end + + # Service calls + + ## + # Returns the tax rules that match the conditions of GetAccountTaxRequest + # + # @overload get_account_tax(request, options = nil) + # Pass arguments to `get_account_tax` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_account_tax(name: nil) + # Pass arguments to `get_account_tax` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name from which tax settings will be retrieved + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new + # + # # Call the get_account_tax method. + # result = client.get_account_tax request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + # p result + # + def get_account_tax request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_account_tax.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_account_tax.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_account_tax.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_tax_service_stub.call_rpc :get_account_tax, request, 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 tax settings of the sub-accounts only in your + # Merchant Center account. + # This method can only be called on a multi-client account, otherwise it'll + # return an error. + # + # @overload list_account_tax(request, options = nil) + # Pass arguments to `list_account_tax` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_account_tax(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_account_tax` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of account tax. + # Format: accounts/\\{account} + # @param page_size [::Integer] + # The maximum number of tax settings to return in the response, used for + # paging. + # @param page_token [::String] + # The token returned by the previous request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new + # + # # Call the list_account_tax method. + # result = client.list_account_tax request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + # p item + # end + # + def list_account_tax request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_account_tax.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_account_tax.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_account_tax.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_tax_service_stub.call_rpc :list_account_tax, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @account_tax_service_stub, :list_account_tax, 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 the tax settings of the account. + # + # @overload update_account_tax(request, options = nil) + # Pass arguments to `update_account_tax` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_account_tax(account_tax: nil, update_mask: nil) + # Pass arguments to `update_account_tax` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account_tax [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax, ::Hash] + # Required. The tax setting that will be updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new + # + # # Call the update_account_tax method. + # result = client.update_account_tax request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + # p result + # + def update_account_tax request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest + + # Converts hash and nil to 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_account_tax.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account_tax&.name + header_params["account_tax.name"] = request.account_tax.name + end + + request_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_account_tax.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_account_tax.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_tax_service_stub.call_rpc :update_account_tax, request, 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 AccountTaxService API. + # + # This class represents the configuration for AccountTaxService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_account_tax to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_tax.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_tax.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountTaxService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_account_tax` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_tax + ## + # RPC-specific configuration for `list_account_tax` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_tax + ## + # RPC-specific configuration for `update_account_tax` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account_tax + + # @private + def initialize parent_rpcs = nil + get_account_tax_config = parent_rpcs.get_account_tax if parent_rpcs.respond_to? :get_account_tax + @get_account_tax = ::Gapic::Config::Method.new get_account_tax_config + list_account_tax_config = parent_rpcs.list_account_tax if parent_rpcs.respond_to? :list_account_tax + @list_account_tax = ::Gapic::Config::Method.new list_account_tax_config + update_account_tax_config = parent_rpcs.update_account_tax if parent_rpcs.respond_to? :update_account_tax + @update_account_tax = ::Gapic::Config::Method.new update_account_tax_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb new file mode 100644 index 000000000000..fdecfb93cd56 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_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 Shopping + module Merchant + module Accounts + module V1beta + module AccountTaxService + # Credentials for the AccountTaxService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb new file mode 100644 index 000000000000..327a514a749b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_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 Shopping + module Merchant + module Accounts + module V1beta + module AccountTaxService + # Path helper methods for the AccountTaxService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified AccountTax resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/accounttax/{tax}` + # + # @param account [String] + # @param tax [String] + # + # @return [::String] + def account_tax_path account:, tax: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/accounttax/#{tax}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb new file mode 100644 index 000000000000..539c364b6e47 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/account_tax_service/credentials" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/paths" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Manages account level tax setting data. + # + # This API defines the following resource model: + # + # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new + # + module AccountTaxService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb new file mode 100644 index 000000000000..0b2b76a1feb7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb @@ -0,0 +1,622 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/account_tax_pb" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountTaxService + module Rest + ## + # REST client for the AccountTaxService service. + # + # Manages account level tax setting data. + # + # This API defines the following resource model: + # + # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_tax_service_stub + + ## + # Configure the AccountTaxService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountTaxService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountTaxService 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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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 + @account_tax_service_stub.universe_domain + end + + ## + # Create a new AccountTaxService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountTaxService 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 + + @account_tax_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @account_tax_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 + @account_tax_service_stub.logger + end + + # Service calls + + ## + # Returns the tax rules that match the conditions of GetAccountTaxRequest + # + # @overload get_account_tax(request, options = nil) + # Pass arguments to `get_account_tax` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_account_tax(name: nil) + # Pass arguments to `get_account_tax` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name from which tax settings will be retrieved + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new + # + # # Call the get_account_tax method. + # result = client.get_account_tax request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + # p result + # + def get_account_tax request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_account_tax.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_account_tax.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_account_tax.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_tax_service_stub.get_account_tax request, 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 tax settings of the sub-accounts only in your + # Merchant Center account. + # This method can only be called on a multi-client account, otherwise it'll + # return an error. + # + # @overload list_account_tax(request, options = nil) + # Pass arguments to `list_account_tax` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_account_tax(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_account_tax` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of account tax. + # Format: accounts/\\{account} + # @param page_size [::Integer] + # The maximum number of tax settings to return in the response, used for + # paging. + # @param page_token [::String] + # The token returned by the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new + # + # # Call the list_account_tax method. + # result = client.list_account_tax request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + # p item + # end + # + def list_account_tax request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_account_tax.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_account_tax.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_account_tax.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_tax_service_stub.list_account_tax request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @account_tax_service_stub, :list_account_tax, "account_taxes", request, result, 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 tax settings of the account. + # + # @overload update_account_tax(request, options = nil) + # Pass arguments to `update_account_tax` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_account_tax(account_tax: nil, update_mask: nil) + # Pass arguments to `update_account_tax` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account_tax [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax, ::Hash] + # Required. The tax setting that will be updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new + # + # # Call the update_account_tax method. + # result = client.update_account_tax request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + # p result + # + def update_account_tax request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest + + # Converts hash and nil to an 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_account_tax.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_account_tax.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_account_tax.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_tax_service_stub.update_account_tax request, 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 AccountTaxService REST API. + # + # This class represents the configuration for AccountTaxService 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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_account_tax to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_tax.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_tax.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountTaxService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_account_tax` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_tax + ## + # RPC-specific configuration for `list_account_tax` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_tax + ## + # RPC-specific configuration for `update_account_tax` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account_tax + + # @private + def initialize parent_rpcs = nil + get_account_tax_config = parent_rpcs.get_account_tax if parent_rpcs.respond_to? :get_account_tax + @get_account_tax = ::Gapic::Config::Method.new get_account_tax_config + list_account_tax_config = parent_rpcs.list_account_tax if parent_rpcs.respond_to? :list_account_tax + @list_account_tax = ::Gapic::Config::Method.new list_account_tax_config + update_account_tax_config = parent_rpcs.update_account_tax if parent_rpcs.respond_to? :update_account_tax + @update_account_tax = ::Gapic::Config::Method.new update_account_tax_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb new file mode 100644 index 000000000000..1793880416fc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb @@ -0,0 +1,267 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/account_tax_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountTaxService + module Rest + ## + # REST service stub for the AccountTaxService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_account_tax REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # A result object deserialized from the server's reply + def get_account_tax request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_account_tax_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_account_tax", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.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_account_tax REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse] + # A result object deserialized from the server's reply + def list_account_tax request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_account_tax_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_account_tax", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse.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_account_tax REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # A result object deserialized from the server's reply + def update_account_tax request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_account_tax_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_account_tax", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_account_tax REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_account_tax_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/accounttax/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_account_tax REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_account_tax_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/accounttax", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_account_tax REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest] + # 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_account_tax_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{account_tax.name}", + body: "account_tax", + matches: [ + ["account_tax.name", %r{^accounts/[^/]+/accounttax/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb new file mode 100644 index 000000000000..91544da451e6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/account_tax.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/account_tax_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountTaxService + # Manages account level tax setting data. + # + # This API defines the following resource model: + # + # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.AccountTaxService' + + # Returns the tax rules that match the conditions of GetAccountTaxRequest + rpc :GetAccountTax, ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax + # Lists the tax settings of the sub-accounts only in your + # Merchant Center account. + # This method can only be called on a multi-client account, otherwise it'll + # return an error. + rpc :ListAccountTax, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse + # Updates the tax settings of the account. + rpc :UpdateAccountTax, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb new file mode 100644 index 000000000000..1221df9fb2c8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/accountissue.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/shopping/type/types_pb' + + +descriptor_data = "\n;google/shopping/merchant/accounts/v1beta/accountissue.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xb7\x06\n\x0c\x41\x63\x63ountIssue\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\r\n\x05title\x18\x02 \x01(\t\x12Q\n\x08severity\x18\x03 \x01(\x0e\x32?.google.shopping.merchant.accounts.v1beta.AccountIssue.Severity\x12i\n\x15impacted_destinations\x18\x04 \x03(\x0b\x32J.google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination\x12\x0e\n\x06\x64\x65tail\x18\x05 \x01(\t\x12\x19\n\x11\x64ocumentation_uri\x18\x06 \x01(\t\x1a\xde\x02\n\x13ImpactedDestination\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x00\x88\x01\x01\x12\x62\n\x07impacts\x18\x02 \x03(\x0b\x32Q.google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination.Impact\x1ap\n\x06Impact\x12\x13\n\x0bregion_code\x18\x01 \x01(\t\x12Q\n\x08severity\x18\x02 \x01(\x0e\x32?.google.shopping.merchant.accounts.v1beta.AccountIssue.SeverityB\x14\n\x12_reporting_context\"M\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x12\x0e\n\nSUGGESTION\x10\x03:l\xea\x41i\n\'merchantapi.googleapis.com/AccountIssue\x12!accounts/{account}/issues/{issue}*\raccountIssues2\x0c\x61\x63\x63ountIssue\"\xbb\x01\n\x18ListAccountIssuesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\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\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x84\x01\n\x19ListAccountIssuesResponse\x12N\n\x0e\x61\x63\x63ount_issues\x18\x01 \x03(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.AccountIssue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xbb\x02\n\x13\x41\x63\x63ountIssueService\x12\xda\x01\n\x11ListAccountIssues\x12\x42.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest\x1a\x43.google.shopping.merchant.accounts.v1beta.ListAccountIssuesResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/accounts/v1beta/{parent=accounts/*}/issues\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x01\n,com.google.shopping.merchant.accounts.v1betaB\x11\x41\x63\x63ountIssueProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + AccountIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue").msgclass + AccountIssue::ImpactedDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination").msgclass + AccountIssue::ImpactedDestination::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination.Impact").msgclass + AccountIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue.Severity").enummodule + ListAccountIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest").msgclass + ListAccountIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountIssuesResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb new file mode 100644 index 000000000000..c925c068fe0e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/accountissue.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/accountissue_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountIssueService + # Service to support `AccountIssueService` API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.AccountIssueService' + + # Lists all account issues of a Merchant Center account. + rpc :ListAccountIssues, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb new file mode 100644 index 000000000000..ea1e691e4169 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/accounts.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/accounts/v1beta/accountservices_pb' +require 'google/shopping/merchant/accounts/v1beta/user_pb' +require 'google/type/datetime_pb' + + +descriptor_data = "\n7google/shopping/merchant/accounts/v1beta/accounts.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a>google/shopping/merchant/accounts/v1beta/accountservices.proto\x1a\x33google/shopping/merchant/accounts/v1beta/user.proto\x1a\x1agoogle/type/datetime.proto\"\x8a\x02\n\x07\x41\x63\x63ount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\naccount_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x61\x63\x63ount_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\radult_content\x18\x04 \x01(\x08\x12\x19\n\x0ctest_account\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12-\n\ttime_zone\x18\x06 \x01(\x0b\x32\x15.google.type.TimeZoneB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x07 \x01(\tB\x03\xe0\x41\x02:;\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\"M\n\x11GetAccountRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\"\x9f\x06\n CreateAndConfigureAccountRequest\x12G\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.AccountB\x03\xe0\x41\x02\x12O\n\x05users\x18\x02 \x03(\x0b\x32;.google.shopping.merchant.accounts.v1beta.CreateUserRequestB\x03\xe0\x41\x01\x12\x8a\x01\n\x17\x61\x63\x63\x65pt_terms_of_service\x18\x03 \x01(\x0b\x32_.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AcceptTermsOfServiceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12r\n\x07service\x18\x04 \x03(\x0b\x32\\.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AddAccountServiceB\x03\xe0\x41\x02\x1aq\n\x14\x41\x63\x63\x65ptTermsOfService\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x18\n\x0bregion_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x1a\xd0\x01\n\x11\x41\x64\x64\x41\x63\x63ountService\x12[\n\x13\x61\x63\x63ount_aggregation\x18g \x01(\x0b\x32<.google.shopping.merchant.accounts.v1beta.AccountAggregationH\x00\x12\x41\n\x08provider\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"merchantapi.googleapis.com/AccountH\x01\x88\x01\x01\x42\x0e\n\x0cservice_typeB\x0b\n\t_providerB\x1a\n\x18_accept_terms_of_service\"d\n\x14\x44\x65leteAccountRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x95\x01\n\x14UpdateAccountRequest\x12G\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.AccountB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"[\n\x13ListAccountsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"t\n\x14ListAccountsResponse\x12\x43\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x87\x01\n\x16ListSubAccountsRequest\x12<\n\x08provider\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"w\n\x17ListSubAccountsResponse\x12\x43\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xee\t\n\x0f\x41\x63\x63ountsService\x12\xaf\x01\n\nGetAccount\x12;.google.shopping.merchant.accounts.v1beta.GetAccountRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Account\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$\x12\"/accounts/v1beta/{name=accounts/*}\x12\xd3\x01\n\x19\x43reateAndConfigureAccount\x12J.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Account\"7\x82\xd3\xe4\x93\x02\x31\",/accounts/v1beta/accounts:createAndConfigure:\x01*\x12\x9a\x01\n\rDeleteAccount\x12>.google.shopping.merchant.accounts.v1beta.DeleteAccountRequest\x1a\x16.google.protobuf.Empty\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$*\"/accounts/v1beta/{name=accounts/*}\x12\xd5\x01\n\rUpdateAccount\x12>.google.shopping.merchant.accounts.v1beta.UpdateAccountRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Account\"Q\xda\x41\x13\x61\x63\x63ount,update_mask\x82\xd3\xe4\x93\x02\x35\x32*/accounts/v1beta/{account.name=accounts/*}:\x07\x61\x63\x63ount\x12\xb0\x01\n\x0cListAccounts\x12=.google.shopping.merchant.accounts.v1beta.ListAccountsRequest\x1a>.google.shopping.merchant.accounts.v1beta.ListAccountsResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/accounts/v1beta/accounts\x12\xe1\x01\n\x0fListSubAccounts\x12@.google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest\x1a\x41.google.shopping.merchant.accounts.v1beta.ListSubAccountsResponse\"I\xda\x41\x08provider\x82\xd3\xe4\x93\x02\x38\x12\x36/accounts/v1beta/{provider=accounts/*}:listSubaccounts\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8f\x01\n,com.google.shopping.merchant.accounts.v1betaB\rAccountsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Account").msgclass + GetAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAccountRequest").msgclass + CreateAndConfigureAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest").msgclass + CreateAndConfigureAccountRequest::AcceptTermsOfService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AcceptTermsOfService").msgclass + CreateAndConfigureAccountRequest::AddAccountService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AddAccountService").msgclass + DeleteAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteAccountRequest").msgclass + UpdateAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAccountRequest").msgclass + ListAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountsRequest").msgclass + ListAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountsResponse").msgclass + ListSubAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest").msgclass + ListSubAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListSubAccountsResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb new file mode 100644 index 000000000000..1db2def8535c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/accounts_service/credentials" +require "google/shopping/merchant/accounts/v1beta/accounts_service/paths" +require "google/shopping/merchant/accounts/v1beta/accounts_service/client" +require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support Accounts API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/accounts_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + module AccountsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "accounts_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb new file mode 100644 index 000000000000..c63df1b0ec97 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.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! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/accounts_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountsService + ## + # Client for the AccountsService service. + # + # Service to support Accounts API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :accounts_service_stub + + ## + # Configure the AccountsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountsService 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::Shopping::Merchant::Accounts::V1beta::AccountsService::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 + @accounts_service_stub.universe_domain + end + + ## + # Create a new AccountsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountsService 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/shopping/merchant/accounts/v1beta/accounts_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 + + @accounts_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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 + ) + + @accounts_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 + @accounts_service_stub.logger + end + + # Service calls + + ## + # Retrieves an account from your Merchant Center account. + # After inserting, updating, or deleting an account, it may take several + # minutes before changes take effect. + # + # @overload get_account(request, options = nil) + # Pass arguments to `get_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_account(name: nil) + # Pass arguments to `get_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the account to retrieve. + # Format: `accounts/{account}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new + # + # # Call the get_account method. + # result = client.get_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + # p result + # + def get_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :get_account, request, 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 standalone Merchant Center account with additional configuration. + # Adds the user that makes the request as an admin for the new account. + # + # @overload create_and_configure_account(request, options = nil) + # Pass arguments to `create_and_configure_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_and_configure_account(account: nil, users: nil, accept_terms_of_service: nil, service: nil) + # Pass arguments to `create_and_configure_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] + # Required. The account to be created. + # @param users [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash>] + # Optional. Users to be added to the account. + # @param accept_terms_of_service [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService, ::Hash] + # Optional. The Terms of Service (ToS) to be accepted immediately upon + # account creation. + # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>] + # Required. An account service between the account to be created and the + # provider account is initialized as part of the creation. At least one such + # service needs to be provided. Currently exactly one of these needs to be + # `account_aggregation`, which means you can only create sub accounts, not + # standalone account through this method. Additional `account_management` or + # `product_management` services may be provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new + # + # # Call the create_and_configure_account method. + # result = client.create_and_configure_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + # p result + # + def create_and_configure_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest + + # Converts hash and nil to 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_and_configure_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::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.create_and_configure_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_and_configure_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :create_and_configure_account, request, 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 account regardless of its type: standalone, MCA or + # sub-account. Deleting an MCA leads to the deletion of all of its + # sub-accounts. Executing this method requires admin access. + # The deletion succeeds only if the account does not provide services + # to any other account and has no processed offers. You can use the `force` + # parameter to override this. + # + # @overload delete_account(request, options = nil) + # Pass arguments to `delete_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_account(name: nil, force: nil) + # Pass arguments to `delete_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the account to delete. + # Format: `accounts/{account}` + # @param force [::Boolean] + # Optional. If set to `true`, the account is deleted even if it provides + # services to other accounts or has processed offers. + # + # @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/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new + # + # # Call the delete_account method. + # result = client.delete_account request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :delete_account, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an account regardless of its type: standalone, MCA or sub-account. + # Executing this method requires admin access. + # + # @overload update_account(request, options = nil) + # Pass arguments to `update_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_account(account: nil, update_mask: nil) + # Pass arguments to `update_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] + # Required. The new version of the account. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new + # + # # Call the update_account method. + # result = client.update_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + # p result + # + def update_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest + + # Converts hash and nil to 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_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account&.name + header_params["account.name"] = request.account.name + end + + request_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_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :update_account, request, 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 accounts accessible to the calling user and matching the + # constraints of the request such as page size or filters. + # This is not just listing the sub-accounts of an MCA, but all accounts the + # calling user has access to including other MCAs, linked accounts, + # standalone accounts and so on. If no filter is provided, then it returns + # accounts the user is directly added to. + # + # @overload list_accounts(request, options = nil) + # Pass arguments to `list_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_accounts(page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccounts` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. Returns only accounts that match the + # [filter](/merchant/api/guides/accounts/filter). + # For more details, see the + # [filter syntax reference](/merchant/api/guides/accounts/filter-syntax). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new + # + # # Call the list_accounts method. + # result = client.list_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. + # p item + # end + # + def list_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::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_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :list_accounts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_accounts, 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 all sub-accounts for a given multi client account. This is a + # convenience wrapper for the more powerful `ListAccounts` method. This + # method will produce the same results as calling `ListsAccounts` with the + # following filter: + # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` + # + # @overload list_sub_accounts(request, options = nil) + # Pass arguments to `list_sub_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_sub_accounts(provider: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_sub_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param provider [::String] + # Required. The parent account. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccounts` must match + # the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new + # + # # Call the list_sub_accounts method. + # result = client.list_sub_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. + # p item + # end + # + def list_sub_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_sub_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.provider + header_params["provider"] = request.provider + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_sub_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sub_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :list_sub_accounts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, 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 AccountsService API. + # + # This class represents the configuration for AccountsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_account to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::AccountsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_account` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account + ## + # RPC-specific configuration for `create_and_configure_account` + # @return [::Gapic::Config::Method] + # + attr_reader :create_and_configure_account + ## + # RPC-specific configuration for `delete_account` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_account + ## + # RPC-specific configuration for `update_account` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account + ## + # RPC-specific configuration for `list_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_accounts + ## + # RPC-specific configuration for `list_sub_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sub_accounts + + # @private + def initialize parent_rpcs = nil + get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account + @get_account = ::Gapic::Config::Method.new get_account_config + create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account + @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config + delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account + @delete_account = ::Gapic::Config::Method.new delete_account_config + update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account + @update_account = ::Gapic::Config::Method.new update_account_config + list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts + @list_accounts = ::Gapic::Config::Method.new list_accounts_config + list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts + @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb new file mode 100644 index 000000000000..d2510c2f46bd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_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 Shopping + module Merchant + module Accounts + module V1beta + module AccountsService + # Credentials for the AccountsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb new file mode 100644 index 000000000000..2be49373540a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.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 Shopping + module Merchant + module Accounts + module V1beta + module AccountsService + # Path helper methods for the AccountsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified TermsOfService resource string. + # + # The resource will be in the following format: + # + # `termsOfService/{version}` + # + # @param version [String] + # + # @return [::String] + def terms_of_service_path version: + "termsOfService/#{version}" + end + + ## + # Create a fully-qualified User resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/users/{email}` + # + # @param account [String] + # @param email [String] + # + # @return [::String] + def user_path account:, email: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/users/#{email}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb new file mode 100644 index 000000000000..0d514d6bb48c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/accounts_service/credentials" +require "google/shopping/merchant/accounts/v1beta/accounts_service/paths" +require "google/shopping/merchant/accounts/v1beta/accounts_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support Accounts API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + module AccountsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb new file mode 100644 index 000000000000..d6d0b6470a43 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb @@ -0,0 +1,929 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/accounts_pb" +require "google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountsService + module Rest + ## + # REST client for the AccountsService service. + # + # Service to support Accounts API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :accounts_service_stub + + ## + # Configure the AccountsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountsService 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::Shopping::Merchant::Accounts::V1beta::AccountsService::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 + @accounts_service_stub.universe_domain + end + + ## + # Create a new AccountsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountsService 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 + + @accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @accounts_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 + @accounts_service_stub.logger + end + + # Service calls + + ## + # Retrieves an account from your Merchant Center account. + # After inserting, updating, or deleting an account, it may take several + # minutes before changes take effect. + # + # @overload get_account(request, options = nil) + # Pass arguments to `get_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_account(name: nil) + # Pass arguments to `get_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the account to retrieve. + # Format: `accounts/{account}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new + # + # # Call the get_account method. + # result = client.get_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + # p result + # + def get_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.get_account request, 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 standalone Merchant Center account with additional configuration. + # Adds the user that makes the request as an admin for the new account. + # + # @overload create_and_configure_account(request, options = nil) + # Pass arguments to `create_and_configure_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_and_configure_account(account: nil, users: nil, accept_terms_of_service: nil, service: nil) + # Pass arguments to `create_and_configure_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] + # Required. The account to be created. + # @param users [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash>] + # Optional. Users to be added to the account. + # @param accept_terms_of_service [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService, ::Hash] + # Optional. The Terms of Service (ToS) to be accepted immediately upon + # account creation. + # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>] + # Required. An account service between the account to be created and the + # provider account is initialized as part of the creation. At least one such + # service needs to be provided. Currently exactly one of these needs to be + # `account_aggregation`, which means you can only create sub accounts, not + # standalone account through this method. Additional `account_management` or + # `product_management` services may be provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new + # + # # Call the create_and_configure_account method. + # result = client.create_and_configure_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + # p result + # + def create_and_configure_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest + + # Converts hash and nil to an 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_and_configure_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_and_configure_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_and_configure_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.create_and_configure_account request, 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 account regardless of its type: standalone, MCA or + # sub-account. Deleting an MCA leads to the deletion of all of its + # sub-accounts. Executing this method requires admin access. + # The deletion succeeds only if the account does not provide services + # to any other account and has no processed offers. You can use the `force` + # parameter to override this. + # + # @overload delete_account(request, options = nil) + # Pass arguments to `delete_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_account(name: nil, force: nil) + # Pass arguments to `delete_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the account to delete. + # Format: `accounts/{account}` + # @param force [::Boolean] + # Optional. If set to `true`, the account is deleted even if it provides + # services to other accounts or has processed offers. + # @yield [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/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new + # + # # Call the delete_account method. + # result = client.delete_account request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.delete_account request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an account regardless of its type: standalone, MCA or sub-account. + # Executing this method requires admin access. + # + # @overload update_account(request, options = nil) + # Pass arguments to `update_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_account(account: nil, update_mask: nil) + # Pass arguments to `update_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] + # Required. The new version of the account. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new + # + # # Call the update_account method. + # result = client.update_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + # p result + # + def update_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest + + # Converts hash and nil to an 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_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.update_account request, 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 accounts accessible to the calling user and matching the + # constraints of the request such as page size or filters. + # This is not just listing the sub-accounts of an MCA, but all accounts the + # calling user has access to including other MCAs, linked accounts, + # standalone accounts and so on. If no filter is provided, then it returns + # accounts the user is directly added to. + # + # @overload list_accounts(request, options = nil) + # Pass arguments to `list_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_accounts(page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccounts` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. Returns only accounts that match the + # [filter](/merchant/api/guides/accounts/filter). + # For more details, see the + # [filter syntax reference](/merchant/api/guides/accounts/filter-syntax). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new + # + # # Call the list_accounts method. + # result = client.list_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. + # p item + # end + # + def list_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_accounts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.list_accounts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_accounts, "accounts", request, result, 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 all sub-accounts for a given multi client account. This is a + # convenience wrapper for the more powerful `ListAccounts` method. This + # method will produce the same results as calling `ListsAccounts` with the + # following filter: + # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` + # + # @overload list_sub_accounts(request, options = nil) + # Pass arguments to `list_sub_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_sub_accounts(provider: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_sub_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param provider [::String] + # Required. The parent account. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccounts` must match + # the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new + # + # # Call the list_sub_accounts method. + # result = client.list_sub_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. + # p item + # end + # + def list_sub_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_sub_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_sub_accounts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_sub_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.list_sub_accounts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, "accounts", request, result, 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 AccountsService REST API. + # + # This class represents the configuration for AccountsService 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::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_account to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_account` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account + ## + # RPC-specific configuration for `create_and_configure_account` + # @return [::Gapic::Config::Method] + # + attr_reader :create_and_configure_account + ## + # RPC-specific configuration for `delete_account` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_account + ## + # RPC-specific configuration for `update_account` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account + ## + # RPC-specific configuration for `list_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_accounts + ## + # RPC-specific configuration for `list_sub_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sub_accounts + + # @private + def initialize parent_rpcs = nil + get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account + @get_account = ::Gapic::Config::Method.new get_account_config + create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account + @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config + delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account + @delete_account = ::Gapic::Config::Method.new delete_account_config + update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account + @update_account = ::Gapic::Config::Method.new update_account_config + list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts + @list_accounts = ::Gapic::Config::Method.new list_accounts_config + list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts + @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb new file mode 100644 index 000000000000..d62c09e78506 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb @@ -0,0 +1,447 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/accounts_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountsService + module Rest + ## + # REST service stub for the AccountsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # A result object deserialized from the server's reply + def get_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.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_and_configure_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # A result object deserialized from the server's reply + def create_and_configure_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_and_configure_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_and_configure_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.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_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_account", + 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 update_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # A result object deserialized from the server's reply + def update_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.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_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse] + # A result object deserialized from the server's reply + def list_accounts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_accounts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_accounts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse.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_sub_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse] + # A result object deserialized from the server's reply + def list_sub_accounts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_sub_accounts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_sub_accounts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_and_configure_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest] + # 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_and_configure_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/accounts:createAndConfigure", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest] + # 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_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{account.name}", + body: "account", + matches: [ + ["account.name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_accounts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/accounts", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sub_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_sub_accounts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{provider}:listSubaccounts", + matches: [ + ["provider", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb new file mode 100644 index 000000000000..df57e5bd28dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb @@ -0,0 +1,75 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/accounts.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/accounts_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountsService + # Service to support Accounts API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.AccountsService' + + # Retrieves an account from your Merchant Center account. + # After inserting, updating, or deleting an account, it may take several + # minutes before changes take effect. + rpc :GetAccount, ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Account + # Creates a standalone Merchant Center account with additional configuration. + # Adds the user that makes the request as an admin for the new account. + rpc :CreateAndConfigureAccount, ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Account + # Deletes the specified account regardless of its type: standalone, MCA or + # sub-account. Deleting an MCA leads to the deletion of all of its + # sub-accounts. Executing this method requires admin access. + # The deletion succeeds only if the account does not provide services + # to any other account and has no processed offers. You can use the `force` + # parameter to override this. + rpc :DeleteAccount, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, ::Google::Protobuf::Empty + # Updates an account regardless of its type: standalone, MCA or sub-account. + # Executing this method requires admin access. + rpc :UpdateAccount, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Account + # Lists accounts accessible to the calling user and matching the + # constraints of the request such as page size or filters. + # This is not just listing the sub-accounts of an MCA, but all accounts the + # calling user has access to including other MCAs, linked accounts, + # standalone accounts and so on. If no filter is provided, then it returns + # accounts the user is directly added to. + rpc :ListAccounts, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse + # List all sub-accounts for a given multi client account. This is a + # convenience wrapper for the more powerful `ListAccounts` method. This + # method will produce the same results as calling `ListsAccounts` with the + # following filter: + # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` + rpc :ListSubAccounts, ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb new file mode 100644 index 000000000000..cf8e6a5da5cb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/accountservices.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/shopping/merchant/accounts/v1beta/accountservices.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x14\n\x12\x41\x63\x63ountAggregationB\x96\x01\n,com.google.shopping.merchant.accounts.v1betaB\x14\x41\x63\x63ountServicesProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + AccountAggregation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountAggregation").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb new file mode 100644 index 000000000000..2d2bb35eeb25 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new + # + module AutofeedSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "autofeed_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb new file mode 100644 index 000000000000..78494e643071 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb @@ -0,0 +1,577 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/autofeedsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutofeedSettingsService + ## + # Client for the AutofeedSettingsService service. + # + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :autofeed_settings_service_stub + + ## + # Configure the AutofeedSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutofeedSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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 + @autofeed_settings_service_stub.universe_domain + end + + ## + # Create a new AutofeedSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutofeedSettingsService 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/shopping/merchant/accounts/v1beta/autofeedsettings_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 + + @autofeed_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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 + ) + + @autofeed_settings_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 + @autofeed_settings_service_stub.logger + end + + # Service calls + + ## + # Retrieves the autofeed settings of an account. + # + # @overload get_autofeed_settings(request, options = nil) + # Pass arguments to `get_autofeed_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_autofeed_settings(name: nil) + # Pass arguments to `get_autofeed_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the autofeed settings. + # Format: `accounts/{account}/autofeedSettings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new + # + # # Call the get_autofeed_settings method. + # result = client.get_autofeed_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. + # p result + # + def get_autofeed_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_autofeed_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_autofeed_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_autofeed_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @autofeed_settings_service_stub.call_rpc :get_autofeed_settings, request, 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 autofeed settings of an account. + # + # @overload update_autofeed_settings(request, options = nil) + # Pass arguments to `update_autofeed_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_autofeed_settings(autofeed_settings: nil, update_mask: nil) + # Pass arguments to `update_autofeed_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param autofeed_settings [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings, ::Hash] + # Required. The new version of the autofeed setting. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new + # + # # Call the update_autofeed_settings method. + # result = client.update_autofeed_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. + # p result + # + def update_autofeed_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest + + # Converts hash and nil to 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_autofeed_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.autofeed_settings&.name + header_params["autofeed_settings.name"] = request.autofeed_settings.name + end + + request_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_autofeed_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_autofeed_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @autofeed_settings_service_stub.call_rpc :update_autofeed_settings, request, 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 AutofeedSettingsService API. + # + # This class represents the configuration for AutofeedSettingsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_autofeed_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_autofeed_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_autofeed_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AutofeedSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_autofeed_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_autofeed_settings + ## + # RPC-specific configuration for `update_autofeed_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_autofeed_settings + + # @private + def initialize parent_rpcs = nil + get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings + @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config + update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings + @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb new file mode 100644 index 000000000000..2ebbb8b964ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_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 Shopping + module Merchant + module Accounts + module V1beta + module AutofeedSettingsService + # Credentials for the AutofeedSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb new file mode 100644 index 000000000000..4e13a4e879c1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.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 Shopping + module Merchant + module Accounts + module V1beta + module AutofeedSettingsService + # Path helper methods for the AutofeedSettingsService API. + module Paths + ## + # Create a fully-qualified AutofeedSettings resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/autofeedSettings` + # + # @param account [String] + # + # @return [::String] + def autofeed_settings_path account: + "accounts/#{account}/autofeedSettings" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb new file mode 100644 index 000000000000..089d4e01e4f1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new + # + module AutofeedSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb new file mode 100644 index 000000000000..7ae670abf44d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb @@ -0,0 +1,520 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutofeedSettingsService + module Rest + ## + # REST client for the AutofeedSettingsService service. + # + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :autofeed_settings_service_stub + + ## + # Configure the AutofeedSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutofeedSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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 + @autofeed_settings_service_stub.universe_domain + end + + ## + # Create a new AutofeedSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutofeedSettingsService 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 + + @autofeed_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @autofeed_settings_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 + @autofeed_settings_service_stub.logger + end + + # Service calls + + ## + # Retrieves the autofeed settings of an account. + # + # @overload get_autofeed_settings(request, options = nil) + # Pass arguments to `get_autofeed_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_autofeed_settings(name: nil) + # Pass arguments to `get_autofeed_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the autofeed settings. + # Format: `accounts/{account}/autofeedSettings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new + # + # # Call the get_autofeed_settings method. + # result = client.get_autofeed_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. + # p result + # + def get_autofeed_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_autofeed_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_autofeed_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_autofeed_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @autofeed_settings_service_stub.get_autofeed_settings request, 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 autofeed settings of an account. + # + # @overload update_autofeed_settings(request, options = nil) + # Pass arguments to `update_autofeed_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_autofeed_settings(autofeed_settings: nil, update_mask: nil) + # Pass arguments to `update_autofeed_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param autofeed_settings [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings, ::Hash] + # Required. The new version of the autofeed setting. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new + # + # # Call the update_autofeed_settings method. + # result = client.update_autofeed_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. + # p result + # + def update_autofeed_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest + + # Converts hash and nil to an 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_autofeed_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_autofeed_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_autofeed_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @autofeed_settings_service_stub.update_autofeed_settings request, 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 AutofeedSettingsService REST API. + # + # This class represents the configuration for AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_autofeed_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_autofeed_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_autofeed_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AutofeedSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_autofeed_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_autofeed_settings + ## + # RPC-specific configuration for `update_autofeed_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_autofeed_settings + + # @private + def initialize parent_rpcs = nil + get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings + @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config + update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings + @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..31c104de3eab --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutofeedSettingsService + module Rest + ## + # REST service stub for the AutofeedSettingsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_autofeed_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # A result object deserialized from the server's reply + def get_autofeed_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_autofeed_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_autofeed_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.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_autofeed_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # A result object deserialized from the server's reply + def update_autofeed_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_autofeed_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_autofeed_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_autofeed_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_autofeed_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/autofeedSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_autofeed_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest] + # 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_autofeed_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{autofeed_settings.name}", + body: "autofeed_settings", + matches: [ + ["autofeed_settings.name", %r{^accounts/[^/]+/autofeedSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb new file mode 100644 index 000000000000..d9f92c16c605 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/autofeedsettings.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/autofeedsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xd5\x01\n\x10\x41utofeedSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0f\x65nable_products\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02\x12\x15\n\x08\x65ligible\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03:y\xea\x41v\n+merchantapi.googleapis.com/AutofeedSettings\x12#accounts/{account}/autofeedSettings*\x10\x61utofeedSettings2\x10\x61utofeedSettings\"_\n\x1aGetAutofeedSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/AutofeedSettings\"\xb1\x01\n\x1dUpdateAutofeedSettingsRequest\x12Z\n\x11\x61utofeed_settings\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.AutofeedSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xe3\x04\n\x17\x41utofeedSettingsService\x12\xdb\x01\n\x13GetAutofeedSettings\x12\x44.google.shopping.merchant.accounts.v1beta.GetAutofeedSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.AutofeedSettings\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/accounts/v1beta/{name=accounts/*/autofeedSettings}\x12\xa0\x02\n\x16UpdateAutofeedSettings\x12G.google.shopping.merchant.accounts.v1beta.UpdateAutofeedSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.AutofeedSettings\"\x80\x01\xda\x41\x1d\x61utofeed_settings,update_mask\x82\xd3\xe4\x93\x02Z2E/accounts/v1beta/{autofeed_settings.name=accounts/*/autofeedSettings}:\x11\x61utofeed_settings\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x41utofeedSettingsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + AutofeedSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutofeedSettings").msgclass + GetAutofeedSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAutofeedSettingsRequest").msgclass + UpdateAutofeedSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAutofeedSettingsRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb new file mode 100644 index 000000000000..700b9a9139ef --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/autofeedsettings.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/autofeedsettings_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutofeedSettingsService + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.AutofeedSettingsService' + + # Retrieves the autofeed settings of an account. + rpc :GetAutofeedSettings, ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings + # Updates the autofeed settings of an account. + rpc :UpdateAutofeedSettings, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb new file mode 100644 index 000000000000..f49e147087f1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new + # + module AutomaticImprovementsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "automatic_improvements_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb new file mode 100644 index 000000000000..c9c3ddb45feb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb @@ -0,0 +1,587 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/automaticimprovements_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutomaticImprovementsService + ## + # Client for the AutomaticImprovementsService service. + # + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :automatic_improvements_service_stub + + ## + # Configure the AutomaticImprovementsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutomaticImprovementsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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 + @automatic_improvements_service_stub.universe_domain + end + + ## + # Create a new AutomaticImprovementsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutomaticImprovementsService 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/shopping/merchant/accounts/v1beta/automaticimprovements_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 + + @automatic_improvements_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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 + ) + + @automatic_improvements_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 + @automatic_improvements_service_stub.logger + end + + # Service calls + + ## + # Retrieves the automatic improvements of an account. + # + # @overload get_automatic_improvements(request, options = nil) + # Pass arguments to `get_automatic_improvements` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_automatic_improvements(name: nil) + # Pass arguments to `get_automatic_improvements` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the automatic improvements. + # Format: `accounts/{account}/automaticImprovements` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new + # + # # Call the get_automatic_improvements method. + # result = client.get_automatic_improvements request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. + # p result + # + def get_automatic_improvements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_automatic_improvements.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_automatic_improvements.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_automatic_improvements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatic_improvements_service_stub.call_rpc :get_automatic_improvements, request, 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 automatic improvements of an account. + # + # @overload update_automatic_improvements(request, options = nil) + # Pass arguments to `update_automatic_improvements` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_automatic_improvements(automatic_improvements: nil, update_mask: nil) + # Pass arguments to `update_automatic_improvements` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param automatic_improvements [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements, ::Hash] + # Required. The new version of the automatic imrovements. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `item_updates` + # - `item_updates.account_level_settings` + # - `image_improvements` + # - `image_improvements.account_level_settings` + # - `shipping_improvements` + # - `shipping_improvements.allow_shipping_improvements` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new + # + # # Call the update_automatic_improvements method. + # result = client.update_automatic_improvements request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. + # p result + # + def update_automatic_improvements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest + + # Converts hash and nil to 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_automatic_improvements.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.automatic_improvements&.name + header_params["automatic_improvements.name"] = request.automatic_improvements.name + end + + request_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_automatic_improvements.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_automatic_improvements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatic_improvements_service_stub.call_rpc :update_automatic_improvements, request, 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 AutomaticImprovementsService API. + # + # This class represents the configuration for AutomaticImprovementsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_automatic_improvements to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_automatic_improvements.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_automatic_improvements.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AutomaticImprovementsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_automatic_improvements` + # @return [::Gapic::Config::Method] + # + attr_reader :get_automatic_improvements + ## + # RPC-specific configuration for `update_automatic_improvements` + # @return [::Gapic::Config::Method] + # + attr_reader :update_automatic_improvements + + # @private + def initialize parent_rpcs = nil + get_automatic_improvements_config = parent_rpcs.get_automatic_improvements if parent_rpcs.respond_to? :get_automatic_improvements + @get_automatic_improvements = ::Gapic::Config::Method.new get_automatic_improvements_config + update_automatic_improvements_config = parent_rpcs.update_automatic_improvements if parent_rpcs.respond_to? :update_automatic_improvements + @update_automatic_improvements = ::Gapic::Config::Method.new update_automatic_improvements_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb new file mode 100644 index 000000000000..f8387a866b10 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_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 Shopping + module Merchant + module Accounts + module V1beta + module AutomaticImprovementsService + # Credentials for the AutomaticImprovementsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb new file mode 100644 index 000000000000..9450fc09a397 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.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 Shopping + module Merchant + module Accounts + module V1beta + module AutomaticImprovementsService + # Path helper methods for the AutomaticImprovementsService API. + module Paths + ## + # Create a fully-qualified AutomaticImprovements resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/automaticImprovements` + # + # @param account [String] + # + # @return [::String] + def automatic_improvements_path account: + "accounts/#{account}/automaticImprovements" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb new file mode 100644 index 000000000000..351bcf6d3b94 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new + # + module AutomaticImprovementsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb new file mode 100644 index 000000000000..935b0c3c30d9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/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/shopping/merchant/accounts/v1beta/automaticimprovements_pb" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutomaticImprovementsService + module Rest + ## + # REST client for the AutomaticImprovementsService service. + # + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :automatic_improvements_service_stub + + ## + # Configure the AutomaticImprovementsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutomaticImprovementsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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 + @automatic_improvements_service_stub.universe_domain + end + + ## + # Create a new AutomaticImprovementsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutomaticImprovementsService 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 + + @automatic_improvements_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @automatic_improvements_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 + @automatic_improvements_service_stub.logger + end + + # Service calls + + ## + # Retrieves the automatic improvements of an account. + # + # @overload get_automatic_improvements(request, options = nil) + # Pass arguments to `get_automatic_improvements` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_automatic_improvements(name: nil) + # Pass arguments to `get_automatic_improvements` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the automatic improvements. + # Format: `accounts/{account}/automaticImprovements` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new + # + # # Call the get_automatic_improvements method. + # result = client.get_automatic_improvements request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. + # p result + # + def get_automatic_improvements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_automatic_improvements.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_automatic_improvements.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_automatic_improvements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatic_improvements_service_stub.get_automatic_improvements request, 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 automatic improvements of an account. + # + # @overload update_automatic_improvements(request, options = nil) + # Pass arguments to `update_automatic_improvements` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_automatic_improvements(automatic_improvements: nil, update_mask: nil) + # Pass arguments to `update_automatic_improvements` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param automatic_improvements [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements, ::Hash] + # Required. The new version of the automatic imrovements. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `item_updates` + # - `item_updates.account_level_settings` + # - `image_improvements` + # - `image_improvements.account_level_settings` + # - `shipping_improvements` + # - `shipping_improvements.allow_shipping_improvements` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new + # + # # Call the update_automatic_improvements method. + # result = client.update_automatic_improvements request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. + # p result + # + def update_automatic_improvements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest + + # Converts hash and nil to an 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_automatic_improvements.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_automatic_improvements.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_automatic_improvements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatic_improvements_service_stub.update_automatic_improvements request, 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 AutomaticImprovementsService REST API. + # + # This class represents the configuration for AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_automatic_improvements to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_automatic_improvements.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_automatic_improvements.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AutomaticImprovementsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_automatic_improvements` + # @return [::Gapic::Config::Method] + # + attr_reader :get_automatic_improvements + ## + # RPC-specific configuration for `update_automatic_improvements` + # @return [::Gapic::Config::Method] + # + attr_reader :update_automatic_improvements + + # @private + def initialize parent_rpcs = nil + get_automatic_improvements_config = parent_rpcs.get_automatic_improvements if parent_rpcs.respond_to? :get_automatic_improvements + @get_automatic_improvements = ::Gapic::Config::Method.new get_automatic_improvements_config + update_automatic_improvements_config = parent_rpcs.update_automatic_improvements if parent_rpcs.respond_to? :update_automatic_improvements + @update_automatic_improvements = ::Gapic::Config::Method.new update_automatic_improvements_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb new file mode 100644 index 000000000000..3b8079dd1fa9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutomaticImprovementsService + module Rest + ## + # REST service stub for the AutomaticImprovementsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_automatic_improvements REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # A result object deserialized from the server's reply + def get_automatic_improvements request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_automatic_improvements_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_automatic_improvements", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.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_automatic_improvements REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # A result object deserialized from the server's reply + def update_automatic_improvements request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_automatic_improvements_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_automatic_improvements", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_automatic_improvements REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_automatic_improvements_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/automaticImprovements/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_automatic_improvements REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest] + # 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_automatic_improvements_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{automatic_improvements.name}", + body: "automatic_improvements", + matches: [ + ["automatic_improvements.name", %r{^accounts/[^/]+/automaticImprovements/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb new file mode 100644 index 000000000000..d9465d26faaa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/automaticimprovements.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nDgoogle/shopping/merchant/accounts/v1beta/automaticimprovements.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xac\x04\n\x15\x41utomaticImprovements\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12Y\n\x0citem_updates\x18\x02 \x01(\x0b\x32>.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdatesH\x00\x88\x01\x01\x12\x65\n\x12image_improvements\x18\x03 \x01(\x0b\x32\x44.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovementsH\x01\x88\x01\x01\x12k\n\x15shipping_improvements\x18\x04 \x01(\x0b\x32G.google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovementsH\x02\x88\x01\x01:\x8e\x01\xea\x41\x8a\x01\n0merchantapi.googleapis.com/AutomaticImprovements\x12(accounts/{account}/automaticImprovements*\x15\x61utomaticImprovements2\x15\x61utomaticImprovementsB\x0f\n\r_item_updatesB\x15\n\x13_image_improvementsB\x18\n\x16_shipping_improvements\"\xaa\x05\n\x14\x41utomaticItemUpdates\x12\x8a\x01\n\x1d\x61\x63\x63ount_item_updates_settings\x18\x01 \x01(\x0b\x32^.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettingsB\x03\xe0\x41\x01\x12*\n\x1d\x65\x66\x66\x65\x63tive_allow_price_updates\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\x31\n$effective_allow_availability_updates\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12\x38\n+effective_allow_strict_availability_updates\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12.\n!effective_allow_condition_updates\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x1a\xbb\x02\n\x1fItemUpdatesAccountLevelSettings\x12 \n\x13\x61llow_price_updates\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\'\n\x1a\x61llow_availability_updates\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12.\n!allow_strict_availability_updates\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12$\n\x17\x61llow_condition_updates\x18\x04 \x01(\x08H\x03\x88\x01\x01\x42\x16\n\x14_allow_price_updatesB\x1d\n\x1b_allow_availability_updatesB$\n\"_allow_strict_availability_updatesB\x1a\n\x18_allow_condition_updates\"\xa4\x03\n\x1a\x41utomaticImageImprovements\x12\xa1\x01\n#account_image_improvements_settings\x18\x01 \x01(\x0b\x32j.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettingsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x39\n,effective_allow_automatic_image_improvements\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x1a\x7f\n%ImageImprovementsAccountLevelSettings\x12/\n\"allow_automatic_image_improvements\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42%\n#_allow_automatic_image_improvementsB&\n$_account_image_improvements_settings\"i\n\x1d\x41utomaticShippingImprovements\x12(\n\x1b\x61llow_shipping_improvements\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x1e\n\x1c_allow_shipping_improvements\"i\n\x1fGetAutomaticImprovementsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/AutomaticImprovements\"\xc0\x01\n\"UpdateAutomaticImprovementsRequest\x12\x64\n\x16\x61utomatic_improvements\x18\x01 \x01(\x0b\x32?.google.shopping.merchant.accounts.v1beta.AutomaticImprovementsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\x9f\x05\n\x1c\x41utomaticImprovementsService\x12\xef\x01\n\x18GetAutomaticImprovements\x12I.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest\x1a?.google.shopping.merchant.accounts.v1beta.AutomaticImprovements\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/accounts/v1beta/{name=accounts/*/automaticImprovements}\x12\xc3\x02\n\x1bUpdateAutomaticImprovements\x12L.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest\x1a?.google.shopping.merchant.accounts.v1beta.AutomaticImprovements\"\x94\x01\xda\x41\"automatic_improvements,update_mask\x82\xd3\xe4\x93\x02i2O/accounts/v1beta/{automatic_improvements.name=accounts/*/automaticImprovements}:\x16\x61utomatic_improvements\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x9c\x01\n,com.google.shopping.merchant.accounts.v1betaB\x1a\x41utomaticImprovementsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + AutomaticImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticImprovements").msgclass + AutomaticItemUpdates = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates").msgclass + AutomaticItemUpdates::ItemUpdatesAccountLevelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings").msgclass + AutomaticImageImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements").msgclass + AutomaticImageImprovements::ImageImprovementsAccountLevelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings").msgclass + AutomaticShippingImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements").msgclass + GetAutomaticImprovementsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest").msgclass + UpdateAutomaticImprovementsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb new file mode 100644 index 000000000000..50bbf1aa06a2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/automaticimprovements.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/automaticimprovements_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutomaticImprovementsService + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService' + + # Retrieves the automatic improvements of an account. + rpc :GetAutomaticImprovements, ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements + # Updates the automatic improvements of an account. + rpc :UpdateAutomaticImprovements, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb new file mode 100644 index 000000000000..d43f48202612 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/business_identity_service/credentials" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/paths" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/client" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/business_identity_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new + # + module BusinessIdentityService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "business_identity_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb new file mode 100644 index 000000000000..83a197b183b7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb @@ -0,0 +1,578 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/businessidentity_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessIdentityService + ## + # Client for the BusinessIdentityService service. + # + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_identity_service_stub + + ## + # Configure the BusinessIdentityService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessIdentityService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BusinessIdentityService 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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @business_identity_service_stub.universe_domain + end + + ## + # Create a new BusinessIdentityService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessIdentityService 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/shopping/merchant/accounts/v1beta/businessidentity_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 + + @business_identity_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @business_identity_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 + @business_identity_service_stub.logger + end + + # Service calls + + ## + # Retrieves the business identity of an account. + # + # @overload get_business_identity(request, options = nil) + # Pass arguments to `get_business_identity` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_business_identity(name: nil) + # Pass arguments to `get_business_identity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the business identity. + # Format: `accounts/{account}/businessIdentity` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new + # + # # Call the get_business_identity method. + # result = client.get_business_identity request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. + # p result + # + def get_business_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_business_identity.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_business_identity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_business_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_identity_service_stub.call_rpc :get_business_identity, request, 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 business identity of an account. Executing this method requires + # admin access. + # + # @overload update_business_identity(request, options = nil) + # Pass arguments to `update_business_identity` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_business_identity(business_identity: nil, update_mask: nil) + # Pass arguments to `update_business_identity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param business_identity [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity, ::Hash] + # Required. The new version of the business identity. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new + # + # # Call the update_business_identity method. + # result = client.update_business_identity request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. + # p result + # + def update_business_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest + + # Converts hash and nil to 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_business_identity.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.business_identity&.name + header_params["business_identity.name"] = request.business_identity.name + end + + request_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_business_identity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_business_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_identity_service_stub.call_rpc :update_business_identity, request, 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 BusinessIdentityService API. + # + # This class represents the configuration for BusinessIdentityService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_business_identity to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_identity.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_identity.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 BusinessIdentityService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_business_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :get_business_identity + ## + # RPC-specific configuration for `update_business_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :update_business_identity + + # @private + def initialize parent_rpcs = nil + get_business_identity_config = parent_rpcs.get_business_identity if parent_rpcs.respond_to? :get_business_identity + @get_business_identity = ::Gapic::Config::Method.new get_business_identity_config + update_business_identity_config = parent_rpcs.update_business_identity if parent_rpcs.respond_to? :update_business_identity + @update_business_identity = ::Gapic::Config::Method.new update_business_identity_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb new file mode 100644 index 000000000000..411d0a8452ca --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_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 Shopping + module Merchant + module Accounts + module V1beta + module BusinessIdentityService + # Credentials for the BusinessIdentityService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb new file mode 100644 index 000000000000..684dbc65841c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.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 Shopping + module Merchant + module Accounts + module V1beta + module BusinessIdentityService + # Path helper methods for the BusinessIdentityService API. + module Paths + ## + # Create a fully-qualified BusinessIdentity resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/businessIdentity` + # + # @param account [String] + # + # @return [::String] + def business_identity_path account: + "accounts/#{account}/businessIdentity" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb new file mode 100644 index 000000000000..d1f0814edc5c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/business_identity_service/credentials" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/paths" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new + # + module BusinessIdentityService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb new file mode 100644 index 000000000000..3a57198332af --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.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! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessIdentityService + module Rest + ## + # REST client for the BusinessIdentityService service. + # + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_identity_service_stub + + ## + # Configure the BusinessIdentityService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessIdentityService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BusinessIdentityService 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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @business_identity_service_stub.universe_domain + end + + ## + # Create a new BusinessIdentityService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessIdentityService 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 + + @business_identity_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @business_identity_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 + @business_identity_service_stub.logger + end + + # Service calls + + ## + # Retrieves the business identity of an account. + # + # @overload get_business_identity(request, options = nil) + # Pass arguments to `get_business_identity` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_business_identity(name: nil) + # Pass arguments to `get_business_identity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the business identity. + # Format: `accounts/{account}/businessIdentity` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new + # + # # Call the get_business_identity method. + # result = client.get_business_identity request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. + # p result + # + def get_business_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_business_identity.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_business_identity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_business_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_identity_service_stub.get_business_identity request, 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 business identity of an account. Executing this method requires + # admin access. + # + # @overload update_business_identity(request, options = nil) + # Pass arguments to `update_business_identity` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_business_identity(business_identity: nil, update_mask: nil) + # Pass arguments to `update_business_identity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param business_identity [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity, ::Hash] + # Required. The new version of the business identity. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new + # + # # Call the update_business_identity method. + # result = client.update_business_identity request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. + # p result + # + def update_business_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest + + # Converts hash and nil to an 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_business_identity.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_business_identity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_business_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_identity_service_stub.update_business_identity request, 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 BusinessIdentityService REST API. + # + # This class represents the configuration for BusinessIdentityService 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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_business_identity to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_identity.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_identity.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 BusinessIdentityService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_business_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :get_business_identity + ## + # RPC-specific configuration for `update_business_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :update_business_identity + + # @private + def initialize parent_rpcs = nil + get_business_identity_config = parent_rpcs.get_business_identity if parent_rpcs.respond_to? :get_business_identity + @get_business_identity = ::Gapic::Config::Method.new get_business_identity_config + update_business_identity_config = parent_rpcs.update_business_identity if parent_rpcs.respond_to? :update_business_identity + @update_business_identity = ::Gapic::Config::Method.new update_business_identity_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb new file mode 100644 index 000000000000..650d5181843f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessIdentityService + module Rest + ## + # REST service stub for the BusinessIdentityService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_business_identity REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # A result object deserialized from the server's reply + def get_business_identity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_business_identity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_business_identity", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.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_business_identity REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # A result object deserialized from the server's reply + def update_business_identity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_business_identity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_business_identity", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_business_identity REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_business_identity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/businessIdentity/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_business_identity REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest] + # 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_business_identity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{business_identity.name}", + body: "business_identity", + matches: [ + ["business_identity.name", %r{^accounts/[^/]+/businessIdentity/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb new file mode 100644 index 000000000000..6bc1a26ad17a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/business_info_service/credentials" +require "google/shopping/merchant/accounts/v1beta/business_info_service/paths" +require "google/shopping/merchant/accounts/v1beta/business_info_service/client" +require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support business info API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/business_info_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new + # + module BusinessInfoService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "business_info_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/business_info_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb new file mode 100644 index 000000000000..3dc96f0ac02f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb @@ -0,0 +1,577 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/businessinfo_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessInfoService + ## + # Client for the BusinessInfoService service. + # + # Service to support business info API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_info_service_stub + + ## + # Configure the BusinessInfoService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessInfoService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BusinessInfoService 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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @business_info_service_stub.universe_domain + end + + ## + # Create a new BusinessInfoService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessInfoService 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/shopping/merchant/accounts/v1beta/businessinfo_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 + + @business_info_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @business_info_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 + @business_info_service_stub.logger + end + + # Service calls + + ## + # Retrieves the business info of an account. + # + # @overload get_business_info(request, options = nil) + # Pass arguments to `get_business_info` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_business_info(name: nil) + # Pass arguments to `get_business_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the business info. + # Format: `accounts/{account}/businessInfo` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new + # + # # Call the get_business_info method. + # result = client.get_business_info request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. + # p result + # + def get_business_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_business_info.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_business_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_business_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_info_service_stub.call_rpc :get_business_info, request, 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 business info of an account. Executing this method requires + # admin access. + # + # @overload update_business_info(request, options = nil) + # Pass arguments to `update_business_info` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_business_info(business_info: nil, update_mask: nil) + # Pass arguments to `update_business_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param business_info [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo, ::Hash] + # Required. The new version of the business info. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new + # + # # Call the update_business_info method. + # result = client.update_business_info request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. + # p result + # + def update_business_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest + + # Converts hash and nil to 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_business_info.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.business_info&.name + header_params["business_info.name"] = request.business_info.name + end + + request_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_business_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_business_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_info_service_stub.call_rpc :update_business_info, request, 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 BusinessInfoService API. + # + # This class represents the configuration for BusinessInfoService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_business_info to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_info.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_info.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 BusinessInfoService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_business_info` + # @return [::Gapic::Config::Method] + # + attr_reader :get_business_info + ## + # RPC-specific configuration for `update_business_info` + # @return [::Gapic::Config::Method] + # + attr_reader :update_business_info + + # @private + def initialize parent_rpcs = nil + get_business_info_config = parent_rpcs.get_business_info if parent_rpcs.respond_to? :get_business_info + @get_business_info = ::Gapic::Config::Method.new get_business_info_config + update_business_info_config = parent_rpcs.update_business_info if parent_rpcs.respond_to? :update_business_info + @update_business_info = ::Gapic::Config::Method.new update_business_info_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb new file mode 100644 index 000000000000..0308f8a5ad24 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_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 Shopping + module Merchant + module Accounts + module V1beta + module BusinessInfoService + # Credentials for the BusinessInfoService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb new file mode 100644 index 000000000000..0a2e4aaaee0b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.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 Shopping + module Merchant + module Accounts + module V1beta + module BusinessInfoService + # Path helper methods for the BusinessInfoService API. + module Paths + ## + # Create a fully-qualified BusinessInfo resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/businessInfo` + # + # @param account [String] + # + # @return [::String] + def business_info_path account: + "accounts/#{account}/businessInfo" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb new file mode 100644 index 000000000000..1a834ba1e2c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/business_info_service/credentials" +require "google/shopping/merchant/accounts/v1beta/business_info_service/paths" +require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support business info API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new + # + module BusinessInfoService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb new file mode 100644 index 000000000000..0bafb42d3b7e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb @@ -0,0 +1,520 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" +require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessInfoService + module Rest + ## + # REST client for the BusinessInfoService service. + # + # Service to support business info API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_info_service_stub + + ## + # Configure the BusinessInfoService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessInfoService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BusinessInfoService 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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @business_info_service_stub.universe_domain + end + + ## + # Create a new BusinessInfoService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessInfoService 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 + + @business_info_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @business_info_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 + @business_info_service_stub.logger + end + + # Service calls + + ## + # Retrieves the business info of an account. + # + # @overload get_business_info(request, options = nil) + # Pass arguments to `get_business_info` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_business_info(name: nil) + # Pass arguments to `get_business_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the business info. + # Format: `accounts/{account}/businessInfo` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new + # + # # Call the get_business_info method. + # result = client.get_business_info request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. + # p result + # + def get_business_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_business_info.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_business_info.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_business_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_info_service_stub.get_business_info request, 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 business info of an account. Executing this method requires + # admin access. + # + # @overload update_business_info(request, options = nil) + # Pass arguments to `update_business_info` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_business_info(business_info: nil, update_mask: nil) + # Pass arguments to `update_business_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param business_info [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo, ::Hash] + # Required. The new version of the business info. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new + # + # # Call the update_business_info method. + # result = client.update_business_info request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. + # p result + # + def update_business_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest + + # Converts hash and nil to an 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_business_info.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_business_info.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_business_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_info_service_stub.update_business_info request, 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 BusinessInfoService REST API. + # + # This class represents the configuration for BusinessInfoService 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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_business_info to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_info.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_info.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 BusinessInfoService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_business_info` + # @return [::Gapic::Config::Method] + # + attr_reader :get_business_info + ## + # RPC-specific configuration for `update_business_info` + # @return [::Gapic::Config::Method] + # + attr_reader :update_business_info + + # @private + def initialize parent_rpcs = nil + get_business_info_config = parent_rpcs.get_business_info if parent_rpcs.respond_to? :get_business_info + @get_business_info = ::Gapic::Config::Method.new get_business_info_config + update_business_info_config = parent_rpcs.update_business_info if parent_rpcs.respond_to? :update_business_info + @update_business_info = ::Gapic::Config::Method.new update_business_info_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb new file mode 100644 index 000000000000..b7cc0315c746 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessInfoService + module Rest + ## + # REST service stub for the BusinessInfoService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_business_info REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # A result object deserialized from the server's reply + def get_business_info request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_business_info_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_business_info", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.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_business_info REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # A result object deserialized from the server's reply + def update_business_info request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_business_info_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_business_info", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_business_info REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_business_info_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/businessInfo/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_business_info REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest] + # 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_business_info_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{business_info.name}", + body: "business_info", + matches: [ + ["business_info.name", %r{^accounts/[^/]+/businessInfo/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb new file mode 100644 index 000000000000..9dc1403d6850 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/businessidentity.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/businessidentity.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa5\t\n\x10\x42usinessIdentity\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12m\n\x12promotions_consent\x18\x02 \x01(\x0e\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.PromotionsConsentB\x03\xe0\x41\x01\x12\x66\n\x0b\x62lack_owned\x18\x03 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x66\n\x0bwomen_owned\x18\x04 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12h\n\rveteran_owned\x18\x05 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12g\n\x0clatino_owned\x18\x06 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12i\n\x0esmall_business\x18\x07 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x1a\x8d\x02\n\x11IdentityAttribute\x12\x83\x01\n\x14identity_declaration\x18\x01 \x01(\x0e\x32`.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute.IdentityDeclarationB\x03\xe0\x41\x02\"r\n\x13IdentityDeclaration\x12$\n IDENTITY_DECLARATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SELF_IDENTIFIES_AS\x10\x01\x12\x1d\n\x19\x44OES_NOT_SELF_IDENTIFY_AS\x10\x02\"t\n\x11PromotionsConsent\x12\"\n\x1ePROMOTIONS_CONSENT_UNSPECIFIED\x10\x00\x12\x1c\n\x18PROMOTIONS_CONSENT_GIVEN\x10\x01\x12\x1d\n\x19PROMOTIONS_CONSENT_DENIED\x10\x02:{\xea\x41x\n+merchantapi.googleapis.com/BusinessIdentity\x12#accounts/{account}/businessIdentity*\x12\x62usinessIdentities2\x10\x62usinessIdentity\"_\n\x1aGetBusinessIdentityRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/BusinessIdentity\"\xb1\x01\n\x1dUpdateBusinessIdentityRequest\x12Z\n\x11\x62usiness_identity\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.BusinessIdentityB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xe3\x04\n\x17\x42usinessIdentityService\x12\xdb\x01\n\x13GetBusinessIdentity\x12\x44.google.shopping.merchant.accounts.v1beta.GetBusinessIdentityRequest\x1a:.google.shopping.merchant.accounts.v1beta.BusinessIdentity\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/accounts/v1beta/{name=accounts/*/businessIdentity}\x12\xa0\x02\n\x16UpdateBusinessIdentity\x12G.google.shopping.merchant.accounts.v1beta.UpdateBusinessIdentityRequest\x1a:.google.shopping.merchant.accounts.v1beta.BusinessIdentity\"\x80\x01\xda\x41\x1d\x62usiness_identity,update_mask\x82\xd3\xe4\x93\x02Z2E/accounts/v1beta/{business_identity.name=accounts/*/businessIdentity}:\x11\x62usiness_identity\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x42usinessIdentityProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + BusinessIdentity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity").msgclass + BusinessIdentity::IdentityAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute").msgclass + BusinessIdentity::IdentityAttribute::IdentityDeclaration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute.IdentityDeclaration").enummodule + BusinessIdentity::PromotionsConsent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.PromotionsConsent").enummodule + GetBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetBusinessIdentityRequest").msgclass + UpdateBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateBusinessIdentityRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb new file mode 100644 index 000000000000..91a6e86252b1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/businessidentity.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/businessidentity_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessIdentityService + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.BusinessIdentityService' + + # Retrieves the business identity of an account. + rpc :GetBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity + # Updates the business identity of an account. Executing this method requires + # admin access. + rpc :UpdateBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb new file mode 100644 index 000000000000..254aa9f643ed --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/businessinfo.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/accounts/v1beta/customerservice_pb' +require 'google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb' +require 'google/type/phone_number_pb' +require 'google/type/postal_address_pb' + + +descriptor_data = "\n;google/shopping/merchant/accounts/v1beta/businessinfo.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a>google/shopping/merchant/accounts/v1beta/customerservice.proto\x1a\x45google/shopping/merchant/accounts/v1beta/phoneverificationstate.proto\x1a\x1egoogle/type/phone_number.proto\x1a google/type/postal_address.proto\"\xeb\x04\n\x0c\x42usinessInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x35\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x1a.google.type.PostalAddressB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x31\n\x05phone\x18\x03 \x01(\x0b\x32\x18.google.type.PhoneNumberB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12l\n\x18phone_verification_state\x18\x04 \x01(\x0e\x32@.google.shopping.merchant.accounts.v1beta.PhoneVerificationStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12]\n\x10\x63ustomer_service\x18\x05 \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1beta.CustomerServiceB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x35\n#korean_business_registration_number\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01:j\xea\x41g\n\'merchantapi.googleapis.com/BusinessInfo\x12\x1f\x61\x63\x63ounts/{account}/businessInfo*\rbusinessInfos2\x0c\x62usinessInfoB\n\n\x08_addressB\x08\n\x06_phoneB\x1b\n\x19_phone_verification_stateB\x13\n\x11_customer_serviceB&\n$_korean_business_registration_number\"W\n\x16GetBusinessInfoRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/BusinessInfo\"\xa5\x01\n\x19UpdateBusinessInfoRequest\x12R\n\rbusiness_info\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.BusinessInfoB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xb2\x04\n\x13\x42usinessInfoService\x12\xcb\x01\n\x0fGetBusinessInfo\x12@.google.shopping.merchant.accounts.v1beta.GetBusinessInfoRequest\x1a\x36.google.shopping.merchant.accounts.v1beta.BusinessInfo\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{name=accounts/*/businessInfo}\x12\x83\x02\n\x12UpdateBusinessInfo\x12\x43.google.shopping.merchant.accounts.v1beta.UpdateBusinessInfoRequest\x1a\x36.google.shopping.merchant.accounts.v1beta.BusinessInfo\"p\xda\x41\x19\x62usiness_info,update_mask\x82\xd3\xe4\x93\x02N2=/accounts/v1beta/{business_info.name=accounts/*/businessInfo}:\rbusiness_info\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x01\n,com.google.shopping.merchant.accounts.v1betaB\x11\x42usinessInfoProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + BusinessInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessInfo").msgclass + GetBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetBusinessInfoRequest").msgclass + UpdateBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateBusinessInfoRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb new file mode 100644 index 000000000000..b69a18296f1e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/businessinfo.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/businessinfo_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessInfoService + # Service to support business info API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.BusinessInfoService' + + # Retrieves the business info of an account. + rpc :GetBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo + # Updates the business info of an account. Executing this method requires + # admin access. + rpc :UpdateBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb new file mode 100644 index 000000000000..6510004f596a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/client" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + module CheckoutSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "checkout_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb new file mode 100644 index 000000000000..29c9fc0dab5c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.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/errors" +require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + ## + # Client for the CheckoutSettingsService service. + # + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :checkout_settings_service_stub + + ## + # Configure the CheckoutSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CheckoutSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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 + @checkout_settings_service_stub.universe_domain + end + + ## + # Create a new CheckoutSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CheckoutSettingsService 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/shopping/merchant/accounts/v1beta/checkoutsettings_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 + + @checkout_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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 + ) + + @checkout_settings_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 + @checkout_settings_service_stub.logger + end + + # Service calls + + ## + # Gets `CheckoutSettings` for the given merchant. This includes + # information about review state, enrollment state and URL settings. + # + # @overload get_checkout_settings(request, options = nil) + # Pass arguments to `get_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_checkout_settings(name: nil) + # Pass arguments to `get_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new + # + # # Call the get_checkout_settings method. + # result = client.get_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def get_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :get_checkout_settings, request, 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 `CheckoutSettings` for the given merchant. + # + # @overload create_checkout_settings(request, options = nil) + # Pass arguments to `create_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_checkout_settings(parent: nil, checkout_settings: nil) + # Pass arguments to `create_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account for which the `CheckoutSettings` will be + # created. + # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] + # Required. The `CheckoutSettings` object to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new + # + # # Call the create_checkout_settings method. + # result = client.create_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def create_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest + + # Converts hash and nil to 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_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :create_checkout_settings, request, 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 `CheckoutSettings` for the given merchant. + # + # @overload update_checkout_settings(request, options = nil) + # Pass arguments to `update_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_checkout_settings(checkout_settings: nil, update_mask: nil) + # Pass arguments to `update_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] + # Required. The updated version of the `CheckoutSettings`. + # The `name` field is used to identify the `CheckoutSettings`. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `eligible_destinations` + # - `uri_settings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new + # + # # Call the update_checkout_settings method. + # result = client.update_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def update_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest + + # Converts hash and nil to 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_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.checkout_settings&.name + header_params["checkout_settings.name"] = request.checkout_settings.name + end + + request_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_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :update_checkout_settings, request, 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 `CheckoutSettings` and unenrolls merchant from + # `Checkout` program. + # + # @overload delete_checkout_settings(request, options = nil) + # Pass arguments to `delete_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_checkout_settings(name: nil) + # Pass arguments to `delete_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # + # @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/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new + # + # # Call the delete_checkout_settings method. + # result = client.delete_checkout_settings request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :delete_checkout_settings, request, 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 CheckoutSettingsService API. + # + # This class represents the configuration for CheckoutSettingsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_checkout_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 CheckoutSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_checkout_settings + ## + # RPC-specific configuration for `create_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :create_checkout_settings + ## + # RPC-specific configuration for `update_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_checkout_settings + ## + # RPC-specific configuration for `delete_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_checkout_settings + + # @private + def initialize parent_rpcs = nil + get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings + @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config + create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings + @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config + update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings + @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config + delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings + @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb new file mode 100644 index 000000000000..59b479846819 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_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 Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + # Credentials for the CheckoutSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb new file mode 100644 index 000000000000..c2ce599e591d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + # Path helper methods for the CheckoutSettingsService API. + module Paths + ## + # Create a fully-qualified CheckoutSettings resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/programs/{program}/checkoutSettings` + # + # @param account [String] + # @param program [String] + # + # @return [::String] + def checkout_settings_path account:, program: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/programs/#{program}/checkoutSettings" + end + + ## + # Create a fully-qualified Program resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/programs/{program}` + # + # @param account [String] + # @param program [String] + # + # @return [::String] + def program_path account:, program: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/programs/#{program}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb new file mode 100644 index 000000000000..88121fed97ac --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + module CheckoutSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb new file mode 100644 index 000000000000..9ce8ea790731 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb @@ -0,0 +1,703 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/checkoutsettings_pb" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + module Rest + ## + # REST client for the CheckoutSettingsService service. + # + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :checkout_settings_service_stub + + ## + # Configure the CheckoutSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CheckoutSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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 + @checkout_settings_service_stub.universe_domain + end + + ## + # Create a new CheckoutSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CheckoutSettingsService 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 + + @checkout_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @checkout_settings_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 + @checkout_settings_service_stub.logger + end + + # Service calls + + ## + # Gets `CheckoutSettings` for the given merchant. This includes + # information about review state, enrollment state and URL settings. + # + # @overload get_checkout_settings(request, options = nil) + # Pass arguments to `get_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_checkout_settings(name: nil) + # Pass arguments to `get_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new + # + # # Call the get_checkout_settings method. + # result = client.get_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def get_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.get_checkout_settings request, 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 `CheckoutSettings` for the given merchant. + # + # @overload create_checkout_settings(request, options = nil) + # Pass arguments to `create_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_checkout_settings(parent: nil, checkout_settings: nil) + # Pass arguments to `create_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account for which the `CheckoutSettings` will be + # created. + # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] + # Required. The `CheckoutSettings` object to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new + # + # # Call the create_checkout_settings method. + # result = client.create_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def create_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest + + # Converts hash and nil to an 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_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.create_checkout_settings request, 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 `CheckoutSettings` for the given merchant. + # + # @overload update_checkout_settings(request, options = nil) + # Pass arguments to `update_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_checkout_settings(checkout_settings: nil, update_mask: nil) + # Pass arguments to `update_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] + # Required. The updated version of the `CheckoutSettings`. + # The `name` field is used to identify the `CheckoutSettings`. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `eligible_destinations` + # - `uri_settings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new + # + # # Call the update_checkout_settings method. + # result = client.update_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def update_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest + + # Converts hash and nil to an 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_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.update_checkout_settings request, 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 `CheckoutSettings` and unenrolls merchant from + # `Checkout` program. + # + # @overload delete_checkout_settings(request, options = nil) + # Pass arguments to `delete_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_checkout_settings(name: nil) + # Pass arguments to `delete_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @yield [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/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new + # + # # Call the delete_checkout_settings method. + # result = client.delete_checkout_settings request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.delete_checkout_settings request, 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 CheckoutSettingsService REST API. + # + # This class represents the configuration for CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_checkout_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 CheckoutSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_checkout_settings + ## + # RPC-specific configuration for `create_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :create_checkout_settings + ## + # RPC-specific configuration for `update_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_checkout_settings + ## + # RPC-specific configuration for `delete_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_checkout_settings + + # @private + def initialize parent_rpcs = nil + get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings + @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config + create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings + @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config + update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings + @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config + delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings + @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..ab727cfeab6f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb @@ -0,0 +1,329 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + module Rest + ## + # REST service stub for the CheckoutSettingsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # A result object deserialized from the server's reply + def get_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_checkout_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_checkout_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.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_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # A result object deserialized from the server's reply + def create_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_checkout_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_checkout_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.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_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # A result object deserialized from the server's reply + def update_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_checkout_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_checkout_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.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_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_checkout_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_checkout_settings", + 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 get_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest] + # 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_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{parent}/checkoutSettings", + body: "checkout_settings", + matches: [ + ["parent", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest] + # 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_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{checkout_settings.name}", + body: "checkout_settings", + matches: [ + ["checkout_settings.name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb new file mode 100644 index 000000000000..6d4141e47877 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/checkoutsettings.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/checkoutsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a google/shopping/type/types.proto\"_\n\x1aGetCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xc0\x01\n\x1d\x43reateCheckoutSettingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/CheckoutSettings\x12Z\n\x11\x63heckout_settings\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.CheckoutSettingsB\x03\xe0\x41\x02\"\xb1\x01\n\x1dUpdateCheckoutSettingsRequest\x12Z\n\x11\x63heckout_settings\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.CheckoutSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"b\n\x1d\x44\x65leteCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xe5\t\n\x10\x43heckoutSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12P\n\x0curi_settings\x18\x02 \x01(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.UriSettingsH\x00\x88\x01\x01\x12U\n\x15\x65ligible_destinations\x18\x08 \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnumB\x03\xe0\x41\x01\x12v\n\x10\x65nrollment_state\x18\x03 \x01(\x0e\x32R.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12n\n\x0creview_state\x18\x04 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12Z\n\x16\x65\x66\x66\x65\x63tive_uri_settings\x18\x05 \x01(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.UriSettingsB\x03\xe0\x41\x03\x12\x80\x01\n\x1a\x65\x66\x66\x65\x63tive_enrollment_state\x18\x06 \x01(\x0e\x32R.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12x\n\x16\x65\x66\x66\x65\x63tive_review_state\x18\x07 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x04\x88\x01\x01\"o\n\x17\x43heckoutEnrollmentState\x12)\n%CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INACTIVE\x10\x01\x12\x0c\n\x08\x45NROLLED\x10\x02\x12\r\n\tOPTED_OUT\x10\x03\"j\n\x13\x43heckoutReviewState\x12%\n!CHECKOUT_REVIEW_STATE_UNSPECIFIED\x10\x00\x12\r\n\tIN_REVIEW\x10\x01\x12\x0c\n\x08\x41PPROVED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03:\x85\x01\xea\x41\x81\x01\n+merchantapi.googleapis.com/CheckoutSettings\x12\x36\x61\x63\x63ounts/{account}/programs/{program}/checkoutSettings*\x08settings2\x10\x63heckoutSettingsB\x0f\n\r_uri_settingsB\x13\n\x11_enrollment_stateB\x0f\n\r_review_stateB\x1d\n\x1b_effective_enrollment_stateB\x19\n\x17_effective_review_state\"[\n\x0bUriSettings\x12\x1f\n\x15\x63heckout_uri_template\x18\x01 \x01(\tH\x00\x12\x1b\n\x11\x63\x61rt_uri_template\x18\x02 \x01(\tH\x00\x42\x0e\n\x0curi_template2\xdc\x08\n\x17\x43heckoutSettingsService\x12\xe6\x01\n\x13GetCheckoutSettings\x12\x44.google.shopping.merchant.accounts.v1beta.GetCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/accounts/v1beta/{name=accounts/*/programs/*/checkoutSettings}\x12\x95\x02\n\x16\x43reateCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.CreateCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"v\xda\x41\x18parent,checkout_settings\x82\xd3\xe4\x93\x02U\"@/accounts/v1beta/{parent=accounts/*/programs/*}/checkoutSettings:\x11\x63heckout_settings\x12\xab\x02\n\x16UpdateCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.UpdateCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"\x8b\x01\xda\x41\x1d\x63heckout_settings,update_mask\x82\xd3\xe4\x93\x02\x65\x32P/accounts/v1beta/{checkout_settings.name=accounts/*/programs/*/checkoutSettings}:\x11\x63heckout_settings\x12\xc8\x01\n\x16\x44\x65leteCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.DeleteCheckoutSettingsRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/accounts/v1beta/{name=accounts/*/programs/*/checkoutSettings}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x43heckoutsettingsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + GetCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetCheckoutSettingsRequest").msgclass + CreateCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateCheckoutSettingsRequest").msgclass + UpdateCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateCheckoutSettingsRequest").msgclass + DeleteCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteCheckoutSettingsRequest").msgclass + CheckoutSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings").msgclass + CheckoutSettings::CheckoutEnrollmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentState").enummodule + CheckoutSettings::CheckoutReviewState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewState").enummodule + UriSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UriSettings").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb new file mode 100644 index 000000000000..bd81b765e3d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/checkoutsettings.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/checkoutsettings_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.CheckoutSettingsService' + + # Gets `CheckoutSettings` for the given merchant. This includes + # information about review state, enrollment state and URL settings. + rpc :GetCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings + # Creates `CheckoutSettings` for the given merchant. + rpc :CreateCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings + # Updates `CheckoutSettings` for the given merchant. + rpc :UpdateCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings + # Deletes `CheckoutSettings` and unenrolls merchant from + # `Checkout` program. + rpc :DeleteCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb new file mode 100644 index 000000000000..c17c763ded0c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/customerservice.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/type/phone_number_pb' + + +descriptor_data = "\n>google/shopping/merchant/accounts/v1beta/customerservice.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/type/phone_number.proto\"\x90\x01\n\x0f\x43ustomerService\x12\x15\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05\x65mail\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x31\n\x05phone\x18\x03 \x01(\x0b\x32\x18.google.type.PhoneNumberB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x06\n\x04_uriB\x08\n\x06_emailB\x08\n\x06_phoneB\x96\x01\n,com.google.shopping.merchant.accounts.v1betaB\x14\x43ustomerServiceProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + CustomerService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CustomerService").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb new file mode 100644 index 000000000000..d06d098a05ba --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/paths" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/client" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support the `EmailPreferences` API. + # + # This service only permits retrieving and updating email preferences for the + # authenticated user. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/email_preferences_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new + # + module EmailPreferencesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "email_preferences_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb new file mode 100644 index 000000000000..80a6356b2fe2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb @@ -0,0 +1,592 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/emailpreferences_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module EmailPreferencesService + ## + # Client for the EmailPreferencesService service. + # + # Service to support the `EmailPreferences` API. + # + # This service only permits retrieving and updating email preferences for the + # authenticated user. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :email_preferences_service_stub + + ## + # Configure the EmailPreferencesService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EmailPreferencesService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the EmailPreferencesService 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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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 + @email_preferences_service_stub.universe_domain + end + + ## + # Create a new EmailPreferencesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EmailPreferencesService 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/shopping/merchant/accounts/v1beta/emailpreferences_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 + + @email_preferences_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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 + ) + + @email_preferences_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 + @email_preferences_service_stub.logger + end + + # Service calls + + ## + # Returns the email preferences for a Merchant Center account user. + # + # Use the name=accounts/*/users/me/emailPreferences alias to get preferences + # for the authenticated user. + # + # @overload get_email_preferences(request, options = nil) + # Pass arguments to `get_email_preferences` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_email_preferences(name: nil) + # Pass arguments to `get_email_preferences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `EmailPreferences` resource. + # Format: `accounts/{account}/users/{email}/emailPreferences` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new + # + # # Call the get_email_preferences method. + # result = client.get_email_preferences request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. + # p result + # + def get_email_preferences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_email_preferences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_email_preferences.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_email_preferences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @email_preferences_service_stub.call_rpc :get_email_preferences, request, 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 email preferences for a Merchant Center account user. MCA users + # should specify the MCA account rather than a sub-account of the MCA. + # + # Preferences which are not explicitly selected in the update mask will not + # be updated. + # + # It is invalid for updates to specify an UNCONFIRMED opt-in status value. + # + # Use the name=accounts/*/users/me/emailPreferences alias to update + # preferences + # for the authenticated user. + # + # @overload update_email_preferences(request, options = nil) + # Pass arguments to `update_email_preferences` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_email_preferences(email_preferences: nil, update_mask: nil) + # Pass arguments to `update_email_preferences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param email_preferences [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences, ::Hash] + # Required. Email Preferences to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new + # + # # Call the update_email_preferences method. + # result = client.update_email_preferences request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. + # p result + # + def update_email_preferences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest + + # Converts hash and nil to 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_email_preferences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.email_preferences&.name + header_params["email_preferences.name"] = request.email_preferences.name + end + + request_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_email_preferences.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_email_preferences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @email_preferences_service_stub.call_rpc :update_email_preferences, request, 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 EmailPreferencesService API. + # + # This class represents the configuration for EmailPreferencesService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_email_preferences to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_email_preferences.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_email_preferences.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 EmailPreferencesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_email_preferences` + # @return [::Gapic::Config::Method] + # + attr_reader :get_email_preferences + ## + # RPC-specific configuration for `update_email_preferences` + # @return [::Gapic::Config::Method] + # + attr_reader :update_email_preferences + + # @private + def initialize parent_rpcs = nil + get_email_preferences_config = parent_rpcs.get_email_preferences if parent_rpcs.respond_to? :get_email_preferences + @get_email_preferences = ::Gapic::Config::Method.new get_email_preferences_config + update_email_preferences_config = parent_rpcs.update_email_preferences if parent_rpcs.respond_to? :update_email_preferences + @update_email_preferences = ::Gapic::Config::Method.new update_email_preferences_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb new file mode 100644 index 000000000000..720eb9a879d7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_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 Shopping + module Merchant + module Accounts + module V1beta + module EmailPreferencesService + # Credentials for the EmailPreferencesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb new file mode 100644 index 000000000000..fd9c9497e227 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/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 Shopping + module Merchant + module Accounts + module V1beta + module EmailPreferencesService + # Path helper methods for the EmailPreferencesService API. + module Paths + ## + # Create a fully-qualified EmailPreferences resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/users/{email}/emailPreferences` + # + # @param account [String] + # @param email [String] + # + # @return [::String] + def email_preferences_path account:, email: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/users/#{email}/emailPreferences" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb new file mode 100644 index 000000000000..b2676240e767 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/paths" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support the `EmailPreferences` API. + # + # This service only permits retrieving and updating email preferences for the + # authenticated user. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new + # + module EmailPreferencesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb new file mode 100644 index 000000000000..57981b71c9e3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb @@ -0,0 +1,535 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/emailpreferences_pb" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module EmailPreferencesService + module Rest + ## + # REST client for the EmailPreferencesService service. + # + # Service to support the `EmailPreferences` API. + # + # This service only permits retrieving and updating email preferences for the + # authenticated user. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :email_preferences_service_stub + + ## + # Configure the EmailPreferencesService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EmailPreferencesService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the EmailPreferencesService 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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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 + @email_preferences_service_stub.universe_domain + end + + ## + # Create a new EmailPreferencesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EmailPreferencesService 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 + + @email_preferences_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @email_preferences_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 + @email_preferences_service_stub.logger + end + + # Service calls + + ## + # Returns the email preferences for a Merchant Center account user. + # + # Use the name=accounts/*/users/me/emailPreferences alias to get preferences + # for the authenticated user. + # + # @overload get_email_preferences(request, options = nil) + # Pass arguments to `get_email_preferences` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_email_preferences(name: nil) + # Pass arguments to `get_email_preferences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `EmailPreferences` resource. + # Format: `accounts/{account}/users/{email}/emailPreferences` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new + # + # # Call the get_email_preferences method. + # result = client.get_email_preferences request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. + # p result + # + def get_email_preferences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_email_preferences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_email_preferences.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_email_preferences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @email_preferences_service_stub.get_email_preferences request, 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 email preferences for a Merchant Center account user. MCA users + # should specify the MCA account rather than a sub-account of the MCA. + # + # Preferences which are not explicitly selected in the update mask will not + # be updated. + # + # It is invalid for updates to specify an UNCONFIRMED opt-in status value. + # + # Use the name=accounts/*/users/me/emailPreferences alias to update + # preferences + # for the authenticated user. + # + # @overload update_email_preferences(request, options = nil) + # Pass arguments to `update_email_preferences` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_email_preferences(email_preferences: nil, update_mask: nil) + # Pass arguments to `update_email_preferences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param email_preferences [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences, ::Hash] + # Required. Email Preferences to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new + # + # # Call the update_email_preferences method. + # result = client.update_email_preferences request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. + # p result + # + def update_email_preferences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest + + # Converts hash and nil to an 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_email_preferences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_email_preferences.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_email_preferences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @email_preferences_service_stub.update_email_preferences request, 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 EmailPreferencesService REST API. + # + # This class represents the configuration for EmailPreferencesService 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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_email_preferences to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_email_preferences.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_email_preferences.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 EmailPreferencesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_email_preferences` + # @return [::Gapic::Config::Method] + # + attr_reader :get_email_preferences + ## + # RPC-specific configuration for `update_email_preferences` + # @return [::Gapic::Config::Method] + # + attr_reader :update_email_preferences + + # @private + def initialize parent_rpcs = nil + get_email_preferences_config = parent_rpcs.get_email_preferences if parent_rpcs.respond_to? :get_email_preferences + @get_email_preferences = ::Gapic::Config::Method.new get_email_preferences_config + update_email_preferences_config = parent_rpcs.update_email_preferences if parent_rpcs.respond_to? :update_email_preferences + @update_email_preferences = ::Gapic::Config::Method.new update_email_preferences_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb new file mode 100644 index 000000000000..9193d3947fc0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module EmailPreferencesService + module Rest + ## + # REST service stub for the EmailPreferencesService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_email_preferences REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # A result object deserialized from the server's reply + def get_email_preferences request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_email_preferences_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_email_preferences", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.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_email_preferences REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # A result object deserialized from the server's reply + def update_email_preferences request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_email_preferences_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_email_preferences", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_email_preferences REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_email_preferences_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/users/[^/]+/emailPreferences/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_email_preferences REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest] + # 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_email_preferences_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{email_preferences.name}", + body: "email_preferences", + matches: [ + ["email_preferences.name", %r{^accounts/[^/]+/users/[^/]+/emailPreferences/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb new file mode 100644 index 000000000000..37d52395e2bd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/emailpreferences.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/emailpreferences.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xed\x02\n\x10\x45mailPreferences\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x61\n\rnews_and_tips\x18\x02 \x01(\x0e\x32\x45.google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInStateB\x03\xe0\x41\x01\"X\n\nOptInState\x12\x1c\n\x18OPT_IN_STATE_UNSPECIFIED\x10\x00\x12\r\n\tOPTED_OUT\x10\x01\x12\x0c\n\x08OPTED_IN\x10\x02\x12\x0f\n\x0bUNCONFIRMED\x10\x03:\x88\x01\xea\x41\x84\x01\n+merchantapi.googleapis.com/EmailPreferences\x12\x31\x61\x63\x63ounts/{account}/users/{email}/emailPreferences*\x10\x65mailPreferences2\x10\x65mailPreferences\"_\n\x1aGetEmailPreferencesRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/EmailPreferences\"\xb1\x01\n\x1dUpdateEmailPreferencesRequest\x12Z\n\x11\x65mail_preferences\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.EmailPreferencesB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xf3\x04\n\x17\x45mailPreferencesService\x12\xe3\x01\n\x13GetEmailPreferences\x12\x44.google.shopping.merchant.accounts.v1beta.GetEmailPreferencesRequest\x1a:.google.shopping.merchant.accounts.v1beta.EmailPreferences\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/accounts/v1beta/{name=accounts/*/users/*/emailPreferences}\x12\xa8\x02\n\x16UpdateEmailPreferences\x12G.google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest\x1a:.google.shopping.merchant.accounts.v1beta.EmailPreferences\"\x88\x01\xda\x41\x1d\x65mail_preferences,update_mask\x82\xd3\xe4\x93\x02\x62\x32M/accounts/v1beta/{email_preferences.name=accounts/*/users/*/emailPreferences}:\x11\x65mail_preferences\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x45mailPreferencesProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + EmailPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.EmailPreferences").msgclass + EmailPreferences::OptInState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInState").enummodule + GetEmailPreferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetEmailPreferencesRequest").msgclass + UpdateEmailPreferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb new file mode 100644 index 000000000000..4d4ab5d746e5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb @@ -0,0 +1,65 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/emailpreferences.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/emailpreferences_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module EmailPreferencesService + # Service to support the `EmailPreferences` API. + # + # This service only permits retrieving and updating email preferences for the + # authenticated user. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.EmailPreferencesService' + + # Returns the email preferences for a Merchant Center account user. + # + # Use the name=accounts/*/users/me/emailPreferences alias to get preferences + # for the authenticated user. + rpc :GetEmailPreferences, ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences + # Updates the email preferences for a Merchant Center account user. MCA users + # should specify the MCA account rather than a sub-account of the MCA. + # + # Preferences which are not explicitly selected in the update mask will not + # be updated. + # + # It is invalid for updates to specify an UNCONFIRMED opt-in status value. + # + # Use the name=accounts/*/users/me/emailPreferences alias to update + # preferences + # for the authenticated user. + rpc :UpdateEmailPreferences, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb new file mode 100644 index 000000000000..cdcf6b1c5dfd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new + # + module GbpAccountsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "gbp_accounts_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb new file mode 100644 index 000000000000..0e023cbb4b4e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb @@ -0,0 +1,598 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/gbpaccounts_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module GbpAccountsService + ## + # Client for the GbpAccountsService service. + # + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :gbp_accounts_service_stub + + ## + # Configure the GbpAccountsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all GbpAccountsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the GbpAccountsService 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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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 + @gbp_accounts_service_stub.universe_domain + end + + ## + # Create a new GbpAccountsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the GbpAccountsService 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/shopping/merchant/accounts/v1beta/gbpaccounts_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 + + @gbp_accounts_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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 + ) + + @gbp_accounts_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 + @gbp_accounts_service_stub.logger + end + + # Service calls + + ## + # List the GBP accounts for a given merchant. + # + # @overload list_gbp_accounts(request, options = nil) + # Pass arguments to `list_gbp_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_gbp_accounts(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gbp_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 parent resource under which the GBP accounts are + # listed. Format: `accounts/{account}`. + # @param page_size [::Integer] + # Optional. The maximum number of `GbpAccount` resources to return. The + # service returns fewer than this value if the number of gbp accounts is less + # that than the `pageSize`. The default value is 50. The maximum value is + # 1000; If a value higher than the maximum is specified, then the `pageSize` + # will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListGbpAccounts` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListGbpAccounts` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new + # + # # Call the list_gbp_accounts method. + # result = client.list_gbp_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount. + # p item + # end + # + def list_gbp_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_gbp_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_gbp_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_gbp_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gbp_accounts_service_stub.call_rpc :list_gbp_accounts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gbp_accounts_service_stub, :list_gbp_accounts, 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 + + ## + # Link the specified merchant to a GBP account for all countries. + # + # @overload link_gbp_account(request, options = nil) + # Pass arguments to `link_gbp_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload link_gbp_account(parent: nil, gbp_email: nil) + # Pass arguments to `link_gbp_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 parent resource to which the GBP account is + # linked. Format: `accounts/{account}`. + # @param gbp_email [::String] + # Required. The email address of the Business Profile account. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new + # + # # Call the link_gbp_account method. + # result = client.link_gbp_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse. + # p result + # + def link_gbp_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.link_gbp_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.link_gbp_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.link_gbp_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gbp_accounts_service_stub.call_rpc :link_gbp_account, request, 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 GbpAccountsService API. + # + # This class represents the configuration for GbpAccountsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_gbp_accounts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_gbp_accounts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_gbp_accounts.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 GbpAccountsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_gbp_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gbp_accounts + ## + # RPC-specific configuration for `link_gbp_account` + # @return [::Gapic::Config::Method] + # + attr_reader :link_gbp_account + + # @private + def initialize parent_rpcs = nil + list_gbp_accounts_config = parent_rpcs.list_gbp_accounts if parent_rpcs.respond_to? :list_gbp_accounts + @list_gbp_accounts = ::Gapic::Config::Method.new list_gbp_accounts_config + link_gbp_account_config = parent_rpcs.link_gbp_account if parent_rpcs.respond_to? :link_gbp_account + @link_gbp_account = ::Gapic::Config::Method.new link_gbp_account_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb new file mode 100644 index 000000000000..293bf2160f68 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_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 Shopping + module Merchant + module Accounts + module V1beta + module GbpAccountsService + # Credentials for the GbpAccountsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb new file mode 100644 index 000000000000..a10be9d7033a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.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 Shopping + module Merchant + module Accounts + module V1beta + module GbpAccountsService + # Path helper methods for the GbpAccountsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb new file mode 100644 index 000000000000..e9b645d1dcbe --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new + # + module GbpAccountsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb new file mode 100644 index 000000000000..2f963501342e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb @@ -0,0 +1,541 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/gbpaccounts_pb" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module GbpAccountsService + module Rest + ## + # REST client for the GbpAccountsService service. + # + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :gbp_accounts_service_stub + + ## + # Configure the GbpAccountsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all GbpAccountsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the GbpAccountsService 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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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 + @gbp_accounts_service_stub.universe_domain + end + + ## + # Create a new GbpAccountsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the GbpAccountsService 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 + + @gbp_accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @gbp_accounts_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 + @gbp_accounts_service_stub.logger + end + + # Service calls + + ## + # List the GBP accounts for a given merchant. + # + # @overload list_gbp_accounts(request, options = nil) + # Pass arguments to `list_gbp_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_gbp_accounts(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gbp_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 parent resource under which the GBP accounts are + # listed. Format: `accounts/{account}`. + # @param page_size [::Integer] + # Optional. The maximum number of `GbpAccount` resources to return. The + # service returns fewer than this value if the number of gbp accounts is less + # that than the `pageSize`. The default value is 50. The maximum value is + # 1000; If a value higher than the maximum is specified, then the `pageSize` + # will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListGbpAccounts` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListGbpAccounts` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new + # + # # Call the list_gbp_accounts method. + # result = client.list_gbp_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount. + # p item + # end + # + def list_gbp_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_gbp_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_gbp_accounts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_gbp_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gbp_accounts_service_stub.list_gbp_accounts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gbp_accounts_service_stub, :list_gbp_accounts, "gbp_accounts", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Link the specified merchant to a GBP account for all countries. + # + # @overload link_gbp_account(request, options = nil) + # Pass arguments to `link_gbp_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload link_gbp_account(parent: nil, gbp_email: nil) + # Pass arguments to `link_gbp_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 parent resource to which the GBP account is + # linked. Format: `accounts/{account}`. + # @param gbp_email [::String] + # Required. The email address of the Business Profile account. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new + # + # # Call the link_gbp_account method. + # result = client.link_gbp_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse. + # p result + # + def link_gbp_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.link_gbp_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.link_gbp_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.link_gbp_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gbp_accounts_service_stub.link_gbp_account request, 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 GbpAccountsService REST API. + # + # This class represents the configuration for GbpAccountsService 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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_gbp_accounts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_gbp_accounts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_gbp_accounts.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 GbpAccountsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_gbp_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gbp_accounts + ## + # RPC-specific configuration for `link_gbp_account` + # @return [::Gapic::Config::Method] + # + attr_reader :link_gbp_account + + # @private + def initialize parent_rpcs = nil + list_gbp_accounts_config = parent_rpcs.list_gbp_accounts if parent_rpcs.respond_to? :list_gbp_accounts + @list_gbp_accounts = ::Gapic::Config::Method.new list_gbp_accounts_config + link_gbp_account_config = parent_rpcs.link_gbp_account if parent_rpcs.respond_to? :link_gbp_account + @link_gbp_account = ::Gapic::Config::Method.new link_gbp_account_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb new file mode 100644 index 000000000000..d969d96d14e1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module GbpAccountsService + module Rest + ## + # REST service stub for the GbpAccountsService 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_gbp_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse] + # A result object deserialized from the server's reply + def list_gbp_accounts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_gbp_accounts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_gbp_accounts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the link_gbp_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] + # A result object deserialized from the server's reply + def link_gbp_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_link_gbp_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "link_gbp_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse.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_gbp_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_gbp_accounts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/gbpAccounts", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the link_gbp_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_link_gbp_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{parent}/gbpAccounts:linkGbpAccount", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb new file mode 100644 index 000000000000..ccccc7e7699e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/gbpaccounts.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n:google/shopping/merchant/accounts/v1beta/gbpaccounts.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xe2\x02\n\nGbpAccount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\x0egbp_account_id\x18\x02 \x01(\t\x12G\n\x04type\x18\x03 \x01(\x0e\x32\x39.google.shopping.merchant.accounts.v1beta.GbpAccount.Type\x12\x18\n\x10gbp_account_name\x18\x05 \x01(\t\x12\x15\n\rlisting_count\x18\x06 \x01(\x03\"<\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x14\n\x10\x42USINESS_ACCOUNT\x10\x02:q\xea\x41n\n%merchantapi.googleapis.com/GbpAccount\x12,accounts/{account}/gbpAccounts/{gbp_account}*\x0bgbpAccounts2\ngbpAccount\"\x85\x01\n\x16ListGbpAccountsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\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\x17ListGbpAccountsResponse\x12J\n\x0cgbp_accounts\x18\x01 \x03(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.GbpAccount\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"k\n\x15LinkGbpAccountRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tgbp_email\x18\x02 \x01(\tB\x03\xe0\x41\x02\"B\n\x16LinkGbpAccountResponse\x12(\n\x08response\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Empty2\xa4\x04\n\x12GbpAccountsService\x12\xd9\x01\n\x0fListGbpAccounts\x12@.google.shopping.merchant.accounts.v1beta.ListGbpAccountsRequest\x1a\x41.google.shopping.merchant.accounts.v1beta.ListGbpAccountsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/accounts/v1beta/{parent=accounts/*}/gbpAccounts\x12\xe8\x01\n\x0eLinkGbpAccount\x12?.google.shopping.merchant.accounts.v1beta.LinkGbpAccountRequest\x1a@.google.shopping.merchant.accounts.v1beta.LinkGbpAccountResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\"?/accounts/v1beta/{parent=accounts/*}/gbpAccounts:linkGbpAccount:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x92\x01\n,com.google.shopping.merchant.accounts.v1betaB\x10GbpAccountsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + GbpAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GbpAccount").msgclass + GbpAccount::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GbpAccount.Type").enummodule + ListGbpAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListGbpAccountsRequest").msgclass + ListGbpAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListGbpAccountsResponse").msgclass + LinkGbpAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkGbpAccountRequest").msgclass + LinkGbpAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkGbpAccountResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb new file mode 100644 index 000000000000..2e204bc48d59 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb @@ -0,0 +1,52 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/gbpaccounts.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/gbpaccounts_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module GbpAccountsService + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.GbpAccountsService' + + # List the GBP accounts for a given merchant. + rpc :ListGbpAccounts, ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse + # Link the specified merchant to a GBP account for all countries. + rpc :LinkGbpAccount, ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb new file mode 100644 index 000000000000..9c3fea67be84 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/homepage.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n7google/shopping/merchant/accounts/v1beta/homepage.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xae\x01\n\x08Homepage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x15\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x14\n\x07\x63laimed\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03:Z\xea\x41W\n#merchantapi.googleapis.com/Homepage\x12\x1b\x61\x63\x63ounts/{account}/homepage*\thomepages2\x08homepageB\x06\n\x04_uri\"O\n\x12GetHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage\"\x98\x01\n\x15UpdateHomepageRequest\x12I\n\x08homepage\x18\x01 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.HomepageB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"Q\n\x14\x43laimHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage\"S\n\x16UnclaimHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage2\x8d\x07\n\x0fHomepageService\x12\xbb\x01\n\x0bGetHomepage\x12<.google.shopping.merchant.accounts.v1beta.GetHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/accounts/v1beta/{name=accounts/*/homepage}\x12\xe4\x01\n\x0eUpdateHomepage\x12?.google.shopping.merchant.accounts.v1beta.UpdateHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\"]\xda\x41\x14homepage,update_mask\x82\xd3\xe4\x93\x02@24/accounts/v1beta/{homepage.name=accounts/*/homepage}:\x08homepage\x12\xc1\x01\n\rClaimHomepage\x12>.google.shopping.merchant.accounts.v1beta.ClaimHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\"<\x82\xd3\xe4\x93\x02\x36\"1/accounts/v1beta/{name=accounts/*/homepage}:claim:\x01*\x12\xc7\x01\n\x0fUnclaimHomepage\x12@.google.shopping.merchant.accounts.v1beta.UnclaimHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\">\x82\xd3\xe4\x93\x02\x38\"3/accounts/v1beta/{name=accounts/*/homepage}:unclaim:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8f\x01\n,com.google.shopping.merchant.accounts.v1betaB\rHomepageProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + Homepage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Homepage").msgclass + GetHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetHomepageRequest").msgclass + UpdateHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateHomepageRequest").msgclass + ClaimHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ClaimHomepageRequest").msgclass + UnclaimHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UnclaimHomepageRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb new file mode 100644 index 000000000000..d3c47366408e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/homepage_service/credentials" +require "google/shopping/merchant/accounts/v1beta/homepage_service/paths" +require "google/shopping/merchant/accounts/v1beta/homepage_service/client" +require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support an API for a store's homepage. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/homepage_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new + # + module HomepageService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "homepage_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/homepage_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb new file mode 100644 index 000000000000..573e4910d6ff --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.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! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/homepage_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module HomepageService + ## + # Client for the HomepageService service. + # + # Service to support an API for a store's homepage. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :homepage_service_stub + + ## + # Configure the HomepageService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all HomepageService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the HomepageService 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::Shopping::Merchant::Accounts::V1beta::HomepageService::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 + @homepage_service_stub.universe_domain + end + + ## + # Create a new HomepageService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the HomepageService 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/shopping/merchant/accounts/v1beta/homepage_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 + + @homepage_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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 + ) + + @homepage_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 + @homepage_service_stub.logger + end + + # Service calls + + ## + # Retrieves a store's homepage. + # + # @overload get_homepage(request, options = nil) + # Pass arguments to `get_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_homepage(name: nil) + # Pass arguments to `get_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to retrieve. + # Format: `accounts/{account}/homepage` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new + # + # # Call the get_homepage method. + # result = client.get_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + # p result + # + def get_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_homepage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.call_rpc :get_homepage, request, 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 store's homepage. Executing this method requires admin access. + # + # @overload update_homepage(request, options = nil) + # Pass arguments to `update_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_homepage(homepage: nil, update_mask: nil) + # Pass arguments to `update_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param homepage [::Google::Shopping::Merchant::Accounts::V1beta::Homepage, ::Hash] + # Required. The new version of the homepage. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new + # + # # Call the update_homepage method. + # result = client.update_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + # p result + # + def update_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest + + # Converts hash and nil to 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_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.homepage&.name + header_params["homepage.name"] = request.homepage.name + end + + request_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_homepage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.call_rpc :update_homepage, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Claims a store's homepage. Executing this method requires admin access. + # + # If the homepage is already claimed, this will recheck the + # verification (unless the merchant is exempted from claiming, which also + # exempts from verification) and return a successful response. If ownership + # can no longer be verified, it will return an error, but it won't clear the + # claim. In case of failure, a canonical error message will be returned: + # * PERMISSION_DENIED: user doesn't have the necessary permissions on this + # MC account; + # * FAILED_PRECONDITION: + # - The account is not a Merchant Center account; + # - MC account doesn't have a homepage; + # - claiming failed (in this case the error message will contain more + # details). + # + # @overload claim_homepage(request, options = nil) + # Pass arguments to `claim_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload claim_homepage(name: nil) + # Pass arguments to `claim_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to claim. + # Format: `accounts/{account}/homepage` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new + # + # # Call the claim_homepage method. + # result = client.claim_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + # p result + # + def claim_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.claim_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.claim_homepage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.claim_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.call_rpc :claim_homepage, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Unclaims a store's homepage. Executing this method requires admin access. + # + # @overload unclaim_homepage(request, options = nil) + # Pass arguments to `unclaim_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload unclaim_homepage(name: nil) + # Pass arguments to `unclaim_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to unclaim. + # Format: `accounts/{account}/homepage` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new + # + # # Call the unclaim_homepage method. + # result = client.unclaim_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + # p result + # + def unclaim_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.unclaim_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.unclaim_homepage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.unclaim_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.call_rpc :unclaim_homepage, request, 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 HomepageService API. + # + # This class represents the configuration for HomepageService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_homepage to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_homepage.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_homepage.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::HomepageService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 HomepageService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :get_homepage + ## + # RPC-specific configuration for `update_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :update_homepage + ## + # RPC-specific configuration for `claim_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :claim_homepage + ## + # RPC-specific configuration for `unclaim_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :unclaim_homepage + + # @private + def initialize parent_rpcs = nil + get_homepage_config = parent_rpcs.get_homepage if parent_rpcs.respond_to? :get_homepage + @get_homepage = ::Gapic::Config::Method.new get_homepage_config + update_homepage_config = parent_rpcs.update_homepage if parent_rpcs.respond_to? :update_homepage + @update_homepage = ::Gapic::Config::Method.new update_homepage_config + claim_homepage_config = parent_rpcs.claim_homepage if parent_rpcs.respond_to? :claim_homepage + @claim_homepage = ::Gapic::Config::Method.new claim_homepage_config + unclaim_homepage_config = parent_rpcs.unclaim_homepage if parent_rpcs.respond_to? :unclaim_homepage + @unclaim_homepage = ::Gapic::Config::Method.new unclaim_homepage_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb new file mode 100644 index 000000000000..cd945b510c57 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_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 Shopping + module Merchant + module Accounts + module V1beta + module HomepageService + # Credentials for the HomepageService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb new file mode 100644 index 000000000000..58d7b7105437 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.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 Shopping + module Merchant + module Accounts + module V1beta + module HomepageService + # Path helper methods for the HomepageService API. + module Paths + ## + # Create a fully-qualified Homepage resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/homepage` + # + # @param account [String] + # + # @return [::String] + def homepage_path account: + "accounts/#{account}/homepage" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb new file mode 100644 index 000000000000..87039ee3847c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/homepage_service/credentials" +require "google/shopping/merchant/accounts/v1beta/homepage_service/paths" +require "google/shopping/merchant/accounts/v1beta/homepage_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support an API for a store's homepage. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new + # + module HomepageService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/homepage_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb new file mode 100644 index 000000000000..8211a0e4c5e6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb @@ -0,0 +1,704 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/homepage_pb" +require "google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module HomepageService + module Rest + ## + # REST client for the HomepageService service. + # + # Service to support an API for a store's homepage. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :homepage_service_stub + + ## + # Configure the HomepageService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all HomepageService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the HomepageService 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::Shopping::Merchant::Accounts::V1beta::HomepageService::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 + @homepage_service_stub.universe_domain + end + + ## + # Create a new HomepageService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the HomepageService 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 + + @homepage_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @homepage_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 + @homepage_service_stub.logger + end + + # Service calls + + ## + # Retrieves a store's homepage. + # + # @overload get_homepage(request, options = nil) + # Pass arguments to `get_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_homepage(name: nil) + # Pass arguments to `get_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to retrieve. + # Format: `accounts/{account}/homepage` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new + # + # # Call the get_homepage method. + # result = client.get_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + # p result + # + def get_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_homepage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.get_homepage request, 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 store's homepage. Executing this method requires admin access. + # + # @overload update_homepage(request, options = nil) + # Pass arguments to `update_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_homepage(homepage: nil, update_mask: nil) + # Pass arguments to `update_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param homepage [::Google::Shopping::Merchant::Accounts::V1beta::Homepage, ::Hash] + # Required. The new version of the homepage. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new + # + # # Call the update_homepage method. + # result = client.update_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + # p result + # + def update_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest + + # Converts hash and nil to an 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_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_homepage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.update_homepage request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Claims a store's homepage. Executing this method requires admin access. + # + # If the homepage is already claimed, this will recheck the + # verification (unless the merchant is exempted from claiming, which also + # exempts from verification) and return a successful response. If ownership + # can no longer be verified, it will return an error, but it won't clear the + # claim. In case of failure, a canonical error message will be returned: + # * PERMISSION_DENIED: user doesn't have the necessary permissions on this + # MC account; + # * FAILED_PRECONDITION: + # - The account is not a Merchant Center account; + # - MC account doesn't have a homepage; + # - claiming failed (in this case the error message will contain more + # details). + # + # @overload claim_homepage(request, options = nil) + # Pass arguments to `claim_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload claim_homepage(name: nil) + # Pass arguments to `claim_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to claim. + # Format: `accounts/{account}/homepage` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new + # + # # Call the claim_homepage method. + # result = client.claim_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + # p result + # + def claim_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.claim_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.claim_homepage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.claim_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.claim_homepage request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Unclaims a store's homepage. Executing this method requires admin access. + # + # @overload unclaim_homepage(request, options = nil) + # Pass arguments to `unclaim_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload unclaim_homepage(name: nil) + # Pass arguments to `unclaim_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to unclaim. + # Format: `accounts/{account}/homepage` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new + # + # # Call the unclaim_homepage method. + # result = client.unclaim_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + # p result + # + def unclaim_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.unclaim_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.unclaim_homepage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.unclaim_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.unclaim_homepage request, 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 HomepageService REST API. + # + # This class represents the configuration for HomepageService 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::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_homepage to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_homepage.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_homepage.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 HomepageService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :get_homepage + ## + # RPC-specific configuration for `update_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :update_homepage + ## + # RPC-specific configuration for `claim_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :claim_homepage + ## + # RPC-specific configuration for `unclaim_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :unclaim_homepage + + # @private + def initialize parent_rpcs = nil + get_homepage_config = parent_rpcs.get_homepage if parent_rpcs.respond_to? :get_homepage + @get_homepage = ::Gapic::Config::Method.new get_homepage_config + update_homepage_config = parent_rpcs.update_homepage if parent_rpcs.respond_to? :update_homepage + @update_homepage = ::Gapic::Config::Method.new update_homepage_config + claim_homepage_config = parent_rpcs.claim_homepage if parent_rpcs.respond_to? :claim_homepage + @claim_homepage = ::Gapic::Config::Method.new claim_homepage_config + unclaim_homepage_config = parent_rpcs.unclaim_homepage if parent_rpcs.respond_to? :unclaim_homepage + @unclaim_homepage = ::Gapic::Config::Method.new unclaim_homepage_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb new file mode 100644 index 000000000000..9c3d3c797d7d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb @@ -0,0 +1,330 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/homepage_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module HomepageService + module Rest + ## + # REST service stub for the HomepageService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # A result object deserialized from the server's reply + def get_homepage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_homepage_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_homepage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.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_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # A result object deserialized from the server's reply + def update_homepage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_homepage_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_homepage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the claim_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # A result object deserialized from the server's reply + def claim_homepage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_claim_homepage_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "claim_homepage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the unclaim_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # A result object deserialized from the server's reply + def unclaim_homepage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_unclaim_homepage_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "unclaim_homepage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_homepage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/homepage/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest] + # 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_homepage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{homepage.name}", + body: "homepage", + matches: [ + ["homepage.name", %r{^accounts/[^/]+/homepage/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the claim_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_claim_homepage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{name}:claim", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/homepage/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the unclaim_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_unclaim_homepage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{name}:unclaim", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/homepage/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb new file mode 100644 index 000000000000..9767309ba008 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/homepage.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/homepage_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module HomepageService + # Service to support an API for a store's homepage. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.HomepageService' + + # Retrieves a store's homepage. + rpc :GetHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage + # Updates a store's homepage. Executing this method requires admin access. + rpc :UpdateHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage + # Claims a store's homepage. Executing this method requires admin access. + # + # If the homepage is already claimed, this will recheck the + # verification (unless the merchant is exempted from claiming, which also + # exempts from verification) and return a successful response. If ownership + # can no longer be verified, it will return an error, but it won't clear the + # claim. In case of failure, a canonical error message will be returned: + # * PERMISSION_DENIED: user doesn't have the necessary permissions on this + # MC account; + # * FAILED_PRECONDITION: + # - The account is not a Merchant Center account; + # - MC account doesn't have a homepage; + # - claiming failed (in this case the error message will contain more + # details). + rpc :ClaimHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage + # Unclaims a store's homepage. Executing this method requires admin access. + rpc :UnclaimHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb new file mode 100644 index 000000000000..058cc57bb288 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/client" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/lfp_providers_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new + # + module LfpProvidersService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_providers_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb new file mode 100644 index 000000000000..4a0cdc85420b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb @@ -0,0 +1,601 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/lfpproviders_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module LfpProvidersService + ## + # Client for the LfpProvidersService service. + # + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_providers_service_stub + + ## + # Configure the LfpProvidersService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpProvidersService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpProvidersService 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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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 + @lfp_providers_service_stub.universe_domain + end + + ## + # Create a new LfpProvidersService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpProvidersService 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/shopping/merchant/accounts/v1beta/lfpproviders_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 + + @lfp_providers_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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 + ) + + @lfp_providers_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 + @lfp_providers_service_stub.logger + end + + # Service calls + + ## + # Find the LFP provider candidates in a given country. + # + # @overload find_lfp_providers(request, options = nil) + # Pass arguments to `find_lfp_providers` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload find_lfp_providers(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `find_lfp_providers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource under which the LFP providers are + # found. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. + # @param page_size [::Integer] + # Optional. The maximum number of `LfpProvider` resources to return. The + # service returns fewer than this value if the number of lfp providers is + # less that than the `pageSize`. The default value is 50. The maximum value + # is 1000; If a value higher than the maximum is specified, then the + # `pageSize` will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `FindLfpProviders` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `FindLfpProviders` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new + # + # # Call the find_lfp_providers method. + # result = client.find_lfp_providers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider. + # p item + # end + # + def find_lfp_providers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.find_lfp_providers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.find_lfp_providers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.find_lfp_providers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_providers_service_stub.call_rpc :find_lfp_providers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Link the specified merchant to a LFP provider for the specified country. + # + # @overload link_lfp_provider(request, options = nil) + # Pass arguments to `link_lfp_provider` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload link_lfp_provider(name: nil, external_account_id: nil) + # Pass arguments to `link_lfp_provider` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the LFP provider resource to link. + # Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. + # The `lfp_provider` is the LFP provider ID. + # @param external_account_id [::String] + # Required. The external account ID by which this merchant is known to the + # LFP provider. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new + # + # # Call the link_lfp_provider method. + # result = client.link_lfp_provider request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse. + # p result + # + def link_lfp_provider request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.link_lfp_provider.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.link_lfp_provider.timeout, + metadata: metadata, + retry_policy: @config.rpcs.link_lfp_provider.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_providers_service_stub.call_rpc :link_lfp_provider, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LfpProvidersService API. + # + # This class represents the configuration for LfpProvidersService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # find_lfp_providers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.find_lfp_providers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.find_lfp_providers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpProvidersService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `find_lfp_providers` + # @return [::Gapic::Config::Method] + # + attr_reader :find_lfp_providers + ## + # RPC-specific configuration for `link_lfp_provider` + # @return [::Gapic::Config::Method] + # + attr_reader :link_lfp_provider + + # @private + def initialize parent_rpcs = nil + find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers + @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config + link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider + @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb new file mode 100644 index 000000000000..4e45d13facbf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_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 Shopping + module Merchant + module Accounts + module V1beta + module LfpProvidersService + # Credentials for the LfpProvidersService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb new file mode 100644 index 000000000000..668327ff63dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.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 Shopping + module Merchant + module Accounts + module V1beta + module LfpProvidersService + # Path helper methods for the LfpProvidersService API. + module Paths + ## + # Create a fully-qualified LfpProvider resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}` + # + # @param account [String] + # @param omnichannel_setting [String] + # @param lfp_provider [String] + # + # @return [::String] + def lfp_provider_path account:, omnichannel_setting:, lfp_provider: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "omnichannel_setting cannot contain /" if omnichannel_setting.to_s.include? "/" + + "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}/lfpProviders/#{lfp_provider}" + end + + ## + # Create a fully-qualified OmnichannelSetting resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # + # @param account [String] + # @param omnichannel_setting [String] + # + # @return [::String] + def omnichannel_setting_path account:, omnichannel_setting: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb new file mode 100644 index 000000000000..501c902dee0b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new + # + module LfpProvidersService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb new file mode 100644 index 000000000000..64254fe27015 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.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 "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module LfpProvidersService + module Rest + ## + # REST client for the LfpProvidersService service. + # + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_providers_service_stub + + ## + # Configure the LfpProvidersService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpProvidersService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpProvidersService 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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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 + @lfp_providers_service_stub.universe_domain + end + + ## + # Create a new LfpProvidersService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpProvidersService 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 + + @lfp_providers_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lfp_providers_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 + @lfp_providers_service_stub.logger + end + + # Service calls + + ## + # Find the LFP provider candidates in a given country. + # + # @overload find_lfp_providers(request, options = nil) + # Pass arguments to `find_lfp_providers` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload find_lfp_providers(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `find_lfp_providers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource under which the LFP providers are + # found. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. + # @param page_size [::Integer] + # Optional. The maximum number of `LfpProvider` resources to return. The + # service returns fewer than this value if the number of lfp providers is + # less that than the `pageSize`. The default value is 50. The maximum value + # is 1000; If a value higher than the maximum is specified, then the + # `pageSize` will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `FindLfpProviders` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `FindLfpProviders` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new + # + # # Call the find_lfp_providers method. + # result = client.find_lfp_providers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider. + # p item + # end + # + def find_lfp_providers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.find_lfp_providers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.find_lfp_providers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.find_lfp_providers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_providers_service_stub.find_lfp_providers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, "lfp_providers", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Link the specified merchant to a LFP provider for the specified country. + # + # @overload link_lfp_provider(request, options = nil) + # Pass arguments to `link_lfp_provider` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload link_lfp_provider(name: nil, external_account_id: nil) + # Pass arguments to `link_lfp_provider` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the LFP provider resource to link. + # Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. + # The `lfp_provider` is the LFP provider ID. + # @param external_account_id [::String] + # Required. The external account ID by which this merchant is known to the + # LFP provider. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new + # + # # Call the link_lfp_provider method. + # result = client.link_lfp_provider request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse. + # p result + # + def link_lfp_provider request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.link_lfp_provider.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.link_lfp_provider.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.link_lfp_provider.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_providers_service_stub.link_lfp_provider request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LfpProvidersService REST API. + # + # This class represents the configuration for LfpProvidersService 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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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 + # # find_lfp_providers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.find_lfp_providers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.find_lfp_providers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpProvidersService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `find_lfp_providers` + # @return [::Gapic::Config::Method] + # + attr_reader :find_lfp_providers + ## + # RPC-specific configuration for `link_lfp_provider` + # @return [::Gapic::Config::Method] + # + attr_reader :link_lfp_provider + + # @private + def initialize parent_rpcs = nil + find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers + @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config + link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider + @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb new file mode 100644 index 000000000000..490af09ca942 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module LfpProvidersService + module Rest + ## + # REST service stub for the LfpProvidersService 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 find_lfp_providers REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse] + # A result object deserialized from the server's reply + def find_lfp_providers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_find_lfp_providers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "find_lfp_providers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the link_lfp_provider REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] + # A result object deserialized from the server's reply + def link_lfp_provider request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_link_lfp_provider_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "link_lfp_provider", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse.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 find_lfp_providers REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_find_lfp_providers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/lfpProviders:find", + matches: [ + ["parent", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the link_lfp_provider REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_link_lfp_provider_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{name}:linkLfpProvider", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/lfpProviders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb new file mode 100644 index 000000000000..672686b1abaf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/lfpproviders.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n;google/shopping/merchant/accounts/v1beta/lfpproviders.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xf4\x01\n\x0bLfpProvider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t:\xa1\x01\xea\x41\x9d\x01\n&merchantapi.googleapis.com/LfpProvider\x12Xaccounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}*\x0clfpProviders2\x0blfpProvider\"\x91\x01\n\x17\x46indLfpProvidersRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-merchantapi.googleapis.com/OmnichannelSetting\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x81\x01\n\x18\x46indLfpProvidersResponse\x12L\n\rlfp_providers\x18\x01 \x03(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.LfpProvider\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n\x16LinkLfpProviderRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&merchantapi.googleapis.com/LfpProvider\x12 \n\x13\x65xternal_account_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"C\n\x17LinkLfpProviderResponse\x12(\n\x08response\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Empty2\xdd\x04\n\x13LfpProvidersService\x12\xf8\x01\n\x10\x46indLfpProviders\x12\x41.google.shopping.merchant.accounts.v1beta.FindLfpProvidersRequest\x1a\x42.google.shopping.merchant.accounts.v1beta.FindLfpProvidersResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/accounts/v1beta/{parent=accounts/*/omnichannelSettings/*}/lfpProviders:find\x12\x81\x02\n\x0fLinkLfpProvider\x12@.google.shopping.merchant.accounts.v1beta.LinkLfpProviderRequest\x1a\x41.google.shopping.merchant.accounts.v1beta.LinkLfpProviderResponse\"i\xda\x41\x04name\x82\xd3\xe4\x93\x02\\\"W/accounts/v1beta/{name=accounts/*/omnichannelSettings/*/lfpProviders/*}:linkLfpProvider:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x01\n,com.google.shopping.merchant.accounts.v1betaB\x11LfpProvidersProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + LfpProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LfpProvider").msgclass + FindLfpProvidersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.FindLfpProvidersRequest").msgclass + FindLfpProvidersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.FindLfpProvidersResponse").msgclass + LinkLfpProviderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkLfpProviderRequest").msgclass + LinkLfpProviderResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkLfpProviderResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb new file mode 100644 index 000000000000..f8deaf08100e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/lfpproviders.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/lfpproviders_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module LfpProvidersService + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.LfpProvidersService' + + # Find the LFP provider candidates in a given country. + rpc :FindLfpProviders, ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse + # Link the specified merchant to a LFP provider for the specified country. + rpc :LinkLfpProvider, ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb new file mode 100644 index 000000000000..a05a5462fd00 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # The service facilitates the management of a merchant's omnichannel settings. + # ## This API defines the following resource model: + # + # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new + # + module OmnichannelSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "omnichannel_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb new file mode 100644 index 000000000000..b8436779d0fe --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb @@ -0,0 +1,892 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module OmnichannelSettingsService + ## + # Client for the OmnichannelSettingsService service. + # + # The service facilitates the management of a merchant's omnichannel settings. + # ## This API defines the following resource model: + # + # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :omnichannel_settings_service_stub + + ## + # Configure the OmnichannelSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OmnichannelSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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 + @omnichannel_settings_service_stub.universe_domain + end + + ## + # Create a new OmnichannelSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OmnichannelSettingsService 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/shopping/merchant/accounts/v1beta/omnichannelsettings_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 + + @omnichannel_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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 + ) + + @omnichannel_settings_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 + @omnichannel_settings_service_stub.logger + end + + # Service calls + + ## + # Get the omnichannel settings for a given merchant. + # + # @overload get_omnichannel_setting(request, options = nil) + # Pass arguments to `get_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_omnichannel_setting(name: nil) + # Pass arguments to `get_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the omnichannel setting to retrieve. + # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new + # + # # Call the get_omnichannel_setting method. + # result = client.get_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + # p result + # + def get_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_omnichannel_setting.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :get_omnichannel_setting, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all the omnichannel settings for a given merchant. + # + # @overload list_omnichannel_settings(request, options = nil) + # Pass arguments to `list_omnichannel_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_omnichannel_settings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_omnichannel_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of omnichannel settings. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of omnichannel settings to return. The service + # may return fewer than this value. If unspecified, at most 50 omnichannel + # settings will be returned. The maximum value is 1000; values above 1000 + # will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOmnichannelSettings` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListOmnichannelSettings` + # must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new + # + # # Call the list_omnichannel_settings method. + # result = client.list_omnichannel_settings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + # p item + # end + # + def list_omnichannel_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_omnichannel_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_omnichannel_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :list_omnichannel_settings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create the omnichannel settings for a given merchant. + # + # @overload create_omnichannel_setting(request, options = nil) + # Pass arguments to `create_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_omnichannel_setting(parent: nil, omnichannel_setting: nil) + # Pass arguments to `create_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this omnichannel setting will be + # created. Format: `accounts/{account}` + # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] + # Required. The omnichannel setting to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new + # + # # Call the create_omnichannel_setting method. + # result = client.create_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + # p result + # + def create_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest + + # Converts hash and nil to 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_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_omnichannel_setting.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :create_omnichannel_setting, request, 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 the omnichannel setting for a given merchant in a given country. + # + # @overload update_omnichannel_setting(request, options = nil) + # Pass arguments to `update_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil) + # Pass arguments to `update_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] + # Required. The omnichannel setting to update. + # + # The omnichannel setting's `name` field is used to identify the + # omnichannel setting to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to be updated. + # + # The following fields are supported in snake_case only: + # - `lsf_type` + # - `in_stock` + # - `pickup` + # - `odo` + # - `about` + # - `inventory_verification` + # + # Full replacement with wildcard `*`is supported, while empty/implied update + # mask is not. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new + # + # # Call the update_omnichannel_setting method. + # result = client.update_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + # p result + # + def update_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest + + # Converts hash and nil to 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_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.omnichannel_setting&.name + header_params["omnichannel_setting.name"] = request.omnichannel_setting.name + end + + request_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_omnichannel_setting.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :update_omnichannel_setting, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Requests inventory verification for a given merchant in a given country. + # + # @overload request_inventory_verification(request, options = nil) + # Pass arguments to `request_inventory_verification` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload request_inventory_verification(name: nil) + # Pass arguments to `request_inventory_verification` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the omnichannel setting to request inventory + # verification. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new + # + # # Call the request_inventory_verification method. + # result = client.request_inventory_verification request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse. + # p result + # + def request_inventory_verification request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.request_inventory_verification.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.request_inventory_verification.timeout, + metadata: metadata, + retry_policy: @config.rpcs.request_inventory_verification.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :request_inventory_verification, request, 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 OmnichannelSettingsService API. + # + # This class represents the configuration for OmnichannelSettingsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_omnichannel_setting to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_omnichannel_setting.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_omnichannel_setting.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 OmnichannelSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :get_omnichannel_setting + ## + # RPC-specific configuration for `list_omnichannel_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_omnichannel_settings + ## + # RPC-specific configuration for `create_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :create_omnichannel_setting + ## + # RPC-specific configuration for `update_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :update_omnichannel_setting + ## + # RPC-specific configuration for `request_inventory_verification` + # @return [::Gapic::Config::Method] + # + attr_reader :request_inventory_verification + + # @private + def initialize parent_rpcs = nil + get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting + @get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config + list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings + @list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config + create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting + @create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config + update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting + @update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config + request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification + @request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb new file mode 100644 index 000000000000..b68c12fb3003 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_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 Shopping + module Merchant + module Accounts + module V1beta + module OmnichannelSettingsService + # Credentials for the OmnichannelSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb new file mode 100644 index 000000000000..e50d1ca4f146 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_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 Shopping + module Merchant + module Accounts + module V1beta + module OmnichannelSettingsService + # Path helper methods for the OmnichannelSettingsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified OmnichannelSetting resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # + # @param account [String] + # @param omnichannel_setting [String] + # + # @return [::String] + def omnichannel_setting_path account:, omnichannel_setting: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb new file mode 100644 index 000000000000..263f2eb40bce --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # The service facilitates the management of a merchant's omnichannel settings. + # ## This API defines the following resource model: + # + # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new + # + module OmnichannelSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb new file mode 100644 index 000000000000..6b7df2b5f6c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb @@ -0,0 +1,814 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module OmnichannelSettingsService + module Rest + ## + # REST client for the OmnichannelSettingsService service. + # + # The service facilitates the management of a merchant's omnichannel settings. + # ## This API defines the following resource model: + # + # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :omnichannel_settings_service_stub + + ## + # Configure the OmnichannelSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OmnichannelSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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 + @omnichannel_settings_service_stub.universe_domain + end + + ## + # Create a new OmnichannelSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OmnichannelSettingsService 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 + + @omnichannel_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @omnichannel_settings_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 + @omnichannel_settings_service_stub.logger + end + + # Service calls + + ## + # Get the omnichannel settings for a given merchant. + # + # @overload get_omnichannel_setting(request, options = nil) + # Pass arguments to `get_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_omnichannel_setting(name: nil) + # Pass arguments to `get_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the omnichannel setting to retrieve. + # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new + # + # # Call the get_omnichannel_setting method. + # result = client.get_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + # p result + # + def get_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_omnichannel_setting.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.get_omnichannel_setting request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all the omnichannel settings for a given merchant. + # + # @overload list_omnichannel_settings(request, options = nil) + # Pass arguments to `list_omnichannel_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_omnichannel_settings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_omnichannel_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of omnichannel settings. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of omnichannel settings to return. The service + # may return fewer than this value. If unspecified, at most 50 omnichannel + # settings will be returned. The maximum value is 1000; values above 1000 + # will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOmnichannelSettings` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListOmnichannelSettings` + # must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new + # + # # Call the list_omnichannel_settings method. + # result = client.list_omnichannel_settings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + # p item + # end + # + def list_omnichannel_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_omnichannel_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_omnichannel_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.list_omnichannel_settings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, "omnichannel_settings", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create the omnichannel settings for a given merchant. + # + # @overload create_omnichannel_setting(request, options = nil) + # Pass arguments to `create_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_omnichannel_setting(parent: nil, omnichannel_setting: nil) + # Pass arguments to `create_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this omnichannel setting will be + # created. Format: `accounts/{account}` + # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] + # Required. The omnichannel setting to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new + # + # # Call the create_omnichannel_setting method. + # result = client.create_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + # p result + # + def create_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest + + # Converts hash and nil to an 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_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_omnichannel_setting.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.create_omnichannel_setting request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update the omnichannel setting for a given merchant in a given country. + # + # @overload update_omnichannel_setting(request, options = nil) + # Pass arguments to `update_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil) + # Pass arguments to `update_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] + # Required. The omnichannel setting to update. + # + # The omnichannel setting's `name` field is used to identify the + # omnichannel setting to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to be updated. + # + # The following fields are supported in snake_case only: + # - `lsf_type` + # - `in_stock` + # - `pickup` + # - `odo` + # - `about` + # - `inventory_verification` + # + # Full replacement with wildcard `*`is supported, while empty/implied update + # mask is not. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new + # + # # Call the update_omnichannel_setting method. + # result = client.update_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + # p result + # + def update_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest + + # Converts hash and nil to an 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_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_omnichannel_setting.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.update_omnichannel_setting request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Requests inventory verification for a given merchant in a given country. + # + # @overload request_inventory_verification(request, options = nil) + # Pass arguments to `request_inventory_verification` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload request_inventory_verification(name: nil) + # Pass arguments to `request_inventory_verification` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the omnichannel setting to request inventory + # verification. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new + # + # # Call the request_inventory_verification method. + # result = client.request_inventory_verification request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse. + # p result + # + def request_inventory_verification request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.request_inventory_verification.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.request_inventory_verification.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.request_inventory_verification.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.request_inventory_verification request, 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 OmnichannelSettingsService REST API. + # + # This class represents the configuration for OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_omnichannel_setting to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_omnichannel_setting.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_omnichannel_setting.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 OmnichannelSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :get_omnichannel_setting + ## + # RPC-specific configuration for `list_omnichannel_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_omnichannel_settings + ## + # RPC-specific configuration for `create_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :create_omnichannel_setting + ## + # RPC-specific configuration for `update_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :update_omnichannel_setting + ## + # RPC-specific configuration for `request_inventory_verification` + # @return [::Gapic::Config::Method] + # + attr_reader :request_inventory_verification + + # @private + def initialize parent_rpcs = nil + get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting + @get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config + list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings + @list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config + create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting + @create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config + update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting + @update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config + request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification + @request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..6ceefbcd5ee9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb @@ -0,0 +1,391 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module OmnichannelSettingsService + module Rest + ## + # REST service stub for the OmnichannelSettingsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # A result object deserialized from the server's reply + def get_omnichannel_setting request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_omnichannel_setting_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_omnichannel_setting", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.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_omnichannel_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse] + # A result object deserialized from the server's reply + def list_omnichannel_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_omnichannel_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_omnichannel_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse.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_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # A result object deserialized from the server's reply + def create_omnichannel_setting request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_omnichannel_setting_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_omnichannel_setting", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.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_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # A result object deserialized from the server's reply + def update_omnichannel_setting request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_omnichannel_setting_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_omnichannel_setting", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the request_inventory_verification REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] + # A result object deserialized from the server's reply + def request_inventory_verification request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_request_inventory_verification_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "request_inventory_verification", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_omnichannel_setting_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_omnichannel_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_omnichannel_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/omnichannelSettings", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest] + # 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_omnichannel_setting_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{parent}/omnichannelSettings", + body: "omnichannel_setting", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest] + # 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_omnichannel_setting_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{omnichannel_setting.name}", + body: "omnichannel_setting", + matches: [ + ["omnichannel_setting.name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the request_inventory_verification REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_request_inventory_verification_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{name}:requestInventoryVerification", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb new file mode 100644 index 000000000000..7c74b858526a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/omnichannelsettings.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nBgoogle/shopping/merchant/accounts/v1beta/omnichannelsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xe3\x06\n\x12OmnichannelSetting\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0bregion_code\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12[\n\x08lsf_type\x18\x0c \x01(\x0e\x32\x44.google.shopping.merchant.accounts.v1beta.OmnichannelSetting.LsfTypeB\x03\xe0\x41\x02\x12H\n\x08in_stock\x18\r \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.InStockB\x03\xe0\x41\x01\x12\x45\n\x06pickup\x18\x0e \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.PickupB\x03\xe0\x41\x01\x12H\n\x08lfp_link\x18\x05 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.LfpLinkB\x03\xe0\x41\x03\x12L\n\x03odo\x18\x06 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.OnDisplayToOrderB\x03\xe0\x41\x01\x12\x43\n\x05\x61\x62out\x18\x07 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1beta.AboutB\x03\xe0\x41\x01\x12\x64\n\x16inventory_verification\x18\x08 \x01(\x0b\x32?.google.shopping.merchant.accounts.v1beta.InventoryVerificationB\x03\xe0\x41\x01\"O\n\x07LsfType\x12\x18\n\x14LSF_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05GHLSF\x10\x01\x12\x0f\n\x0bMHLSF_BASIC\x10\x02\x12\x0e\n\nMHLSF_FULL\x10\x03:\x9a\x01\xea\x41\x96\x01\n-merchantapi.googleapis.com/OmnichannelSetting\x12 e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all existing return policies for a given merchant. + # + # @overload list_online_return_policies(request, options = nil) + # Pass arguments to `list_online_return_policies` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_online_return_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_online_return_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account for which to list return policies. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of `OnlineReturnPolicy` resources to return. + # The service returns fewer than this value if the number of return policies + # for the given merchant is less that than the `pageSize`. The default value + # is 10. The maximum value is 100; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOnlineReturnPolicies` + # call. Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListOnlineReturnPolicies` must match the call that provided the page + # token. The token returned as + # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new + # + # # Call the list_online_return_policies method. + # result = client.list_online_return_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + # p item + # end + # + def list_online_return_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_online_return_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_online_return_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_online_return_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.call_rpc :list_online_return_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @online_return_policy_service_stub, :list_online_return_policies, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new return policy for a given merchant. + # + # @overload create_online_return_policy(request, options = nil) + # Pass arguments to `create_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_online_return_policy(parent: nil, online_return_policy: nil) + # Pass arguments to `create_online_return_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 parent [::String] + # Required. The merchant account for which the return policy will be created. + # Format: `accounts/{account}` + # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] + # Required. The return policy object to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new + # + # # Call the create_online_return_policy method. + # result = client.create_online_return_policy request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + # p result + # + def create_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest + + # Converts hash and nil to 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_online_return_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::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_online_return_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.call_rpc :create_online_return_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 + + ## + # Updates an existing return policy for a given merchant. + # + # @overload update_online_return_policy(request, options = nil) + # Pass arguments to `update_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_online_return_policy(online_return_policy: nil, update_mask: nil) + # Pass arguments to `update_online_return_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 online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] + # Required. The online return policy to update. + # The online return policy's `name` field is used to identify the + # online return policy to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `accept_defective_only` + # - `accept_exchange` + # - `item_conditions` + # - `policy` + # - `process_refund_days` + # - `restocking_fee` + # - `return_methods` + # - `return_policy_uri` + # - `return_shipping_fee` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new + # + # # Call the update_online_return_policy method. + # result = client.update_online_return_policy request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + # p result + # + def update_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest + + # Converts hash and nil to 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_online_return_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::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.online_return_policy&.name + header_params["online_return_policy.name"] = request.online_return_policy.name + end + + request_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_online_return_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.call_rpc :update_online_return_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 + + ## + # Deletes an existing return policy. + # + # @overload delete_online_return_policy(request, options = nil) + # Pass arguments to `delete_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_online_return_policy(name: nil) + # Pass arguments to `delete_online_return_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 name [::String] + # Required. The name of the return policy to delete. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + # + # @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/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new + # + # # Call the delete_online_return_policy method. + # result = client.delete_online_return_policy request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_online_return_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::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_online_return_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.call_rpc :delete_online_return_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 + + ## + # Configuration class for the OnlineReturnPolicyService API. + # + # This class represents the configuration for OnlineReturnPolicyService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_online_return_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_online_return_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_online_return_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 OnlineReturnPolicyService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_online_return_policy + ## + # RPC-specific configuration for `list_online_return_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_online_return_policies + ## + # RPC-specific configuration for `create_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_online_return_policy + ## + # RPC-specific configuration for `update_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_online_return_policy + ## + # RPC-specific configuration for `delete_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_online_return_policy + + # @private + def initialize parent_rpcs = nil + get_online_return_policy_config = parent_rpcs.get_online_return_policy if parent_rpcs.respond_to? :get_online_return_policy + @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config + list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies + @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config + create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy + @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config + update_online_return_policy_config = parent_rpcs.update_online_return_policy if parent_rpcs.respond_to? :update_online_return_policy + @update_online_return_policy = ::Gapic::Config::Method.new update_online_return_policy_config + delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy + @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb new file mode 100644 index 000000000000..65cce8eedd0a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_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 Shopping + module Merchant + module Accounts + module V1beta + module OnlineReturnPolicyService + # Credentials for the OnlineReturnPolicyService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb new file mode 100644 index 000000000000..99da2a7379d2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_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 Shopping + module Merchant + module Accounts + module V1beta + module OnlineReturnPolicyService + # Path helper methods for the OnlineReturnPolicyService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified OnlineReturnPolicy resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/onlineReturnPolicies/{return_policy}` + # + # @param account [String] + # @param return_policy [String] + # + # @return [::String] + def online_return_policy_path account:, return_policy: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/onlineReturnPolicies/#{return_policy}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb new file mode 100644 index 000000000000..aae7187d3bc3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # The service facilitates the management of a merchant's remorse return policy + # configuration, encompassing return policies for both ads and free listings + # ## programs. This API defines the following resource model: + # + # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy) + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new + # + module OnlineReturnPolicyService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb new file mode 100644 index 000000000000..4dd96a0fc90c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb @@ -0,0 +1,819 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/online_return_policy_pb" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module OnlineReturnPolicyService + module Rest + ## + # REST client for the OnlineReturnPolicyService service. + # + # The service facilitates the management of a merchant's remorse return policy + # configuration, encompassing return policies for both ads and free listings + # ## programs. This API defines the following resource model: + # + # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy) + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :online_return_policy_service_stub + + ## + # Configure the OnlineReturnPolicyService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OnlineReturnPolicyService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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 + @online_return_policy_service_stub.universe_domain + end + + ## + # Create a new OnlineReturnPolicyService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OnlineReturnPolicyService 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 + + @online_return_policy_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @online_return_policy_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 + @online_return_policy_service_stub.logger + end + + # Service calls + + ## + # Gets an existing return policy for a given merchant. + # + # @overload get_online_return_policy(request, options = nil) + # Pass arguments to `get_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_online_return_policy(name: nil) + # Pass arguments to `get_online_return_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 name [::String] + # Required. The name of the return policy to retrieve. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new + # + # # Call the get_online_return_policy method. + # result = client.get_online_return_policy request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + # p result + # + def get_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_online_return_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::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_online_return_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.get_online_return_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 + + ## + # Lists all existing return policies for a given merchant. + # + # @overload list_online_return_policies(request, options = nil) + # Pass arguments to `list_online_return_policies` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_online_return_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_online_return_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account for which to list return policies. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of `OnlineReturnPolicy` resources to return. + # The service returns fewer than this value if the number of return policies + # for the given merchant is less that than the `pageSize`. The default value + # is 10. The maximum value is 100; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOnlineReturnPolicies` + # call. Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListOnlineReturnPolicies` must match the call that provided the page + # token. The token returned as + # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new + # + # # Call the list_online_return_policies method. + # result = client.list_online_return_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + # p item + # end + # + def list_online_return_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_online_return_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_online_return_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_online_return_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.list_online_return_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @online_return_policy_service_stub, :list_online_return_policies, "online_return_policies", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new return policy for a given merchant. + # + # @overload create_online_return_policy(request, options = nil) + # Pass arguments to `create_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_online_return_policy(parent: nil, online_return_policy: nil) + # Pass arguments to `create_online_return_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 parent [::String] + # Required. The merchant account for which the return policy will be created. + # Format: `accounts/{account}` + # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] + # Required. The return policy object to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new + # + # # Call the create_online_return_policy method. + # result = client.create_online_return_policy request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + # p result + # + def create_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest + + # Converts hash and nil to an 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_online_return_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::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_online_return_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.create_online_return_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 + + ## + # Updates an existing return policy for a given merchant. + # + # @overload update_online_return_policy(request, options = nil) + # Pass arguments to `update_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_online_return_policy(online_return_policy: nil, update_mask: nil) + # Pass arguments to `update_online_return_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 online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] + # Required. The online return policy to update. + # The online return policy's `name` field is used to identify the + # online return policy to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `accept_defective_only` + # - `accept_exchange` + # - `item_conditions` + # - `policy` + # - `process_refund_days` + # - `restocking_fee` + # - `return_methods` + # - `return_policy_uri` + # - `return_shipping_fee` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new + # + # # Call the update_online_return_policy method. + # result = client.update_online_return_policy request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + # p result + # + def update_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest + + # Converts hash and nil to an 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_online_return_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::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_online_return_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.update_online_return_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 + + ## + # Deletes an existing return policy. + # + # @overload delete_online_return_policy(request, options = nil) + # Pass arguments to `delete_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_online_return_policy(name: nil) + # Pass arguments to `delete_online_return_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 name [::String] + # Required. The name of the return policy to delete. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + # @yield [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/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new + # + # # Call the delete_online_return_policy method. + # result = client.delete_online_return_policy request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_online_return_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::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_online_return_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.delete_online_return_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 + + ## + # Configuration class for the OnlineReturnPolicyService REST API. + # + # This class represents the configuration for OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_online_return_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_online_return_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_online_return_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 OnlineReturnPolicyService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_online_return_policy + ## + # RPC-specific configuration for `list_online_return_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_online_return_policies + ## + # RPC-specific configuration for `create_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_online_return_policy + ## + # RPC-specific configuration for `update_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_online_return_policy + ## + # RPC-specific configuration for `delete_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_online_return_policy + + # @private + def initialize parent_rpcs = nil + get_online_return_policy_config = parent_rpcs.get_online_return_policy if parent_rpcs.respond_to? :get_online_return_policy + @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config + list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies + @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config + create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy + @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config + update_online_return_policy_config = parent_rpcs.update_online_return_policy if parent_rpcs.respond_to? :update_online_return_policy + @update_online_return_policy = ::Gapic::Config::Method.new update_online_return_policy_config + delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy + @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb new file mode 100644 index 000000000000..dedd98287a41 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb @@ -0,0 +1,390 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/online_return_policy_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module OnlineReturnPolicyService + module Rest + ## + # REST service stub for the OnlineReturnPolicyService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # A result object deserialized from the server's reply + def get_online_return_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_online_return_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_online_return_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.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_online_return_policies REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse] + # A result object deserialized from the server's reply + def list_online_return_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_online_return_policies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_online_return_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse.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_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # A result object deserialized from the server's reply + def create_online_return_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_online_return_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: "create_online_return_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.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_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # A result object deserialized from the server's reply + def update_online_return_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_online_return_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: "update_online_return_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.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_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_online_return_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_online_return_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: "delete_online_return_policy", + 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 get_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_online_return_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_online_return_policies REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_online_return_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/onlineReturnPolicies", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest] + # 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_online_return_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{parent}/onlineReturnPolicies", + body: "online_return_policy", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest] + # 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_online_return_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{online_return_policy.name}", + body: "online_return_policy", + matches: [ + ["online_return_policy.name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_online_return_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb new file mode 100644 index 000000000000..0fe2ffb749d5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb @@ -0,0 +1,59 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/online_return_policy.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/online_return_policy_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module OnlineReturnPolicyService + # The service facilitates the management of a merchant's remorse return policy + # configuration, encompassing return policies for both ads and free listings + # ## programs. This API defines the following resource model: + # + # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy) + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService' + + # Gets an existing return policy for a given merchant. + rpc :GetOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy + # Lists all existing return policies for a given merchant. + rpc :ListOnlineReturnPolicies, ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse + # Creates a new return policy for a given merchant. + rpc :CreateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy + # Updates an existing return policy for a given merchant. + rpc :UpdateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy + # Deletes an existing return policy. + rpc :DeleteOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb new file mode 100644 index 000000000000..54a151690147 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/phoneverificationstate.proto + +require 'google/protobuf' + + +descriptor_data = "\nEgoogle/shopping/merchant/accounts/v1beta/phoneverificationstate.proto\x12(google.shopping.merchant.accounts.v1beta*\x92\x01\n\x16PhoneVerificationState\x12(\n$PHONE_VERIFICATION_STATE_UNSPECIFIED\x10\x00\x12%\n!PHONE_VERIFICATION_STATE_VERIFIED\x10\x01\x12\'\n#PHONE_VERIFICATION_STATE_UNVERIFIED\x10\x02\x42\x9d\x01\n,com.google.shopping.merchant.accounts.v1betaB\x1bPhoneVerificationStateProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + PhoneVerificationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.PhoneVerificationState").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb new file mode 100644 index 000000000000..b4a19137e869 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/programs.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 = "\n7google/shopping/merchant/accounts/v1beta/programs.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa2\x04\n\x07Program\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x11\x64ocumentation_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12K\n\x05state\x18\x03 \x01(\x0e\x32\x37.google.shopping.merchant.accounts.v1beta.Program.StateB\x03\xe0\x41\x03\x12 \n\x13\x61\x63tive_region_codes\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12^\n\x12unmet_requirements\x18\x05 \x03(\x0b\x32=.google.shopping.merchant.accounts.v1beta.Program.RequirementB\x03\xe0\x41\x03\x1a\x65\n\x0bRequirement\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1e\n\x11\x64ocumentation_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15\x61\x66\x66\x65\x63ted_region_codes\x18\x03 \x03(\tB\x03\xe0\x41\x03\"K\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_ELIGIBLE\x10\x01\x12\x0c\n\x08\x45LIGIBLE\x10\x02\x12\x0b\n\x07\x45NABLED\x10\x03:a\xea\x41^\n\"merchantapi.googleapis.com/Program\x12%accounts/{account}/programs/{program}*\x08programs2\x07program\"M\n\x11GetProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program\"\x82\x01\n\x13ListProgramsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Program\x12\x16\n\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\x14ListProgramsResponse\x12\x43\n\x08programs\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.Program\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x14\x45nableProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program\"Q\n\x15\x44isableProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program2\x84\x07\n\x0fProgramsService\x12\xba\x01\n\nGetProgram\x12;.google.shopping.merchant.accounts.v1beta.GetProgramRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Program\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/accounts/v1beta/{name=accounts/*/programs/*}\x12\xcd\x01\n\x0cListPrograms\x12=.google.shopping.merchant.accounts.v1beta.ListProgramsRequest\x1a>.google.shopping.merchant.accounts.v1beta.ListProgramsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/accounts/v1beta/{parent=accounts/*}/programs\x12\xca\x01\n\rEnableProgram\x12>.google.shopping.merchant.accounts.v1beta.EnableProgramRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Program\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/accounts/v1beta/{name=accounts/*/programs/*}:enable:\x01*\x12\xcd\x01\n\x0e\x44isableProgram\x12?.google.shopping.merchant.accounts.v1beta.DisableProgramRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Program\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/accounts/v1beta/{name=accounts/*/programs/*}:disable:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8f\x01\n,com.google.shopping.merchant.accounts.v1betaB\rProgramsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + Program = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Program").msgclass + Program::Requirement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Program.Requirement").msgclass + Program::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Program.State").enummodule + GetProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetProgramRequest").msgclass + ListProgramsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListProgramsRequest").msgclass + ListProgramsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListProgramsResponse").msgclass + EnableProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.EnableProgramRequest").msgclass + DisableProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DisableProgramRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb new file mode 100644 index 000000000000..5c31844c5c2f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.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 "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/programs_service/credentials" +require "google/shopping/merchant/accounts/v1beta/programs_service/paths" +require "google/shopping/merchant/accounts/v1beta/programs_service/client" +require "google/shopping/merchant/accounts/v1beta/programs_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a merchant's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/programs_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/programs_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new + # + module ProgramsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "programs_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/programs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb new file mode 100644 index 000000000000..6133609391bb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb @@ -0,0 +1,786 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/programs_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ProgramsService + ## + # Client for the ProgramsService service. + # + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a merchant's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :programs_service_stub + + ## + # Configure the ProgramsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProgramsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ProgramsService 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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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 + @programs_service_stub.universe_domain + end + + ## + # Create a new ProgramsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProgramsService 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/shopping/merchant/accounts/v1beta/programs_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 + + @programs_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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 + ) + + @programs_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 + @programs_service_stub.logger + end + + # Service calls + + ## + # Retrieves the specified program for the account. + # + # @overload get_program(request, options = nil) + # Pass arguments to `get_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_program(name: nil) + # Pass arguments to `get_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program to retrieve. + # Format: `accounts/{account}/programs/{program}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new + # + # # Call the get_program method. + # result = client.get_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + # p result + # + def get_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_program.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.call_rpc :get_program, request, 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 all programs for the account. + # + # @overload list_programs(request, options = nil) + # Pass arguments to `list_programs` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_programs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_programs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 account for which to retrieve all programs. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of programs to return in a single response. If + # unspecified (or 0), a default size of 1000 is used. The maximum value is + # 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A continuation token, received from a previous `ListPrograms` + # call. Provide this to retrieve the next page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new + # + # # Call the list_programs method. + # result = client.list_programs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Program. + # p item + # end + # + def list_programs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_programs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_programs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_programs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.call_rpc :list_programs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @programs_service_stub, :list_programs, 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 + + ## + # Enable participation in the specified program for the account. Executing + # this method requires admin access. + # + # @overload enable_program(request, options = nil) + # Pass arguments to `enable_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload enable_program(name: nil) + # Pass arguments to `enable_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program for which to enable participation for the + # given account. Format: `accounts/{account}/programs/{program}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new + # + # # Call the enable_program method. + # result = client.enable_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + # p result + # + def enable_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.enable_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.enable_program.timeout, + metadata: metadata, + retry_policy: @config.rpcs.enable_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.call_rpc :enable_program, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disable participation in the specified program for the account. Executing + # this method requires admin access. + # + # @overload disable_program(request, options = nil) + # Pass arguments to `disable_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload disable_program(name: nil) + # Pass arguments to `disable_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program for which to disable participation for + # the given account. Format: `accounts/{account}/programs/{program}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new + # + # # Call the disable_program method. + # result = client.disable_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + # p result + # + def disable_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.disable_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.disable_program.timeout, + metadata: metadata, + retry_policy: @config.rpcs.disable_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.call_rpc :disable_program, request, 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 ProgramsService API. + # + # This class represents the configuration for ProgramsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_program to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_program.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_program.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 ProgramsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_program` + # @return [::Gapic::Config::Method] + # + attr_reader :get_program + ## + # RPC-specific configuration for `list_programs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_programs + ## + # RPC-specific configuration for `enable_program` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_program + ## + # RPC-specific configuration for `disable_program` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_program + + # @private + def initialize parent_rpcs = nil + get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program + @get_program = ::Gapic::Config::Method.new get_program_config + list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs + @list_programs = ::Gapic::Config::Method.new list_programs_config + enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program + @enable_program = ::Gapic::Config::Method.new enable_program_config + disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program + @disable_program = ::Gapic::Config::Method.new disable_program_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb new file mode 100644 index 000000000000..2935731c5fc6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_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 Shopping + module Merchant + module Accounts + module V1beta + module ProgramsService + # Credentials for the ProgramsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb new file mode 100644 index 000000000000..3b9b815133bd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_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 Shopping + module Merchant + module Accounts + module V1beta + module ProgramsService + # Path helper methods for the ProgramsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified Program resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/programs/{program}` + # + # @param account [String] + # @param program [String] + # + # @return [::String] + def program_path account:, program: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/programs/#{program}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb new file mode 100644 index 000000000000..ffbd61628a98 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/programs_service/credentials" +require "google/shopping/merchant/accounts/v1beta/programs_service/paths" +require "google/shopping/merchant/accounts/v1beta/programs_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a merchant's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/programs_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new + # + module ProgramsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/programs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb new file mode 100644 index 000000000000..5376b543b7b1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb @@ -0,0 +1,715 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/programs_pb" +require "google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ProgramsService + module Rest + ## + # REST client for the ProgramsService service. + # + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a merchant's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :programs_service_stub + + ## + # Configure the ProgramsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProgramsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ProgramsService 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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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 + @programs_service_stub.universe_domain + end + + ## + # Create a new ProgramsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProgramsService 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 + + @programs_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @programs_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 + @programs_service_stub.logger + end + + # Service calls + + ## + # Retrieves the specified program for the account. + # + # @overload get_program(request, options = nil) + # Pass arguments to `get_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_program(name: nil) + # Pass arguments to `get_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program to retrieve. + # Format: `accounts/{account}/programs/{program}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new + # + # # Call the get_program method. + # result = client.get_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + # p result + # + def get_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_program.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.get_program request, 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 all programs for the account. + # + # @overload list_programs(request, options = nil) + # Pass arguments to `list_programs` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_programs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_programs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 account for which to retrieve all programs. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of programs to return in a single response. If + # unspecified (or 0), a default size of 1000 is used. The maximum value is + # 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A continuation token, received from a previous `ListPrograms` + # call. Provide this to retrieve the next page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new + # + # # Call the list_programs method. + # result = client.list_programs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Program. + # p item + # end + # + def list_programs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_programs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_programs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_programs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.list_programs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @programs_service_stub, :list_programs, "programs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enable participation in the specified program for the account. Executing + # this method requires admin access. + # + # @overload enable_program(request, options = nil) + # Pass arguments to `enable_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload enable_program(name: nil) + # Pass arguments to `enable_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program for which to enable participation for the + # given account. Format: `accounts/{account}/programs/{program}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new + # + # # Call the enable_program method. + # result = client.enable_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + # p result + # + def enable_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.enable_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.enable_program.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.enable_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.enable_program request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disable participation in the specified program for the account. Executing + # this method requires admin access. + # + # @overload disable_program(request, options = nil) + # Pass arguments to `disable_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload disable_program(name: nil) + # Pass arguments to `disable_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program for which to disable participation for + # the given account. Format: `accounts/{account}/programs/{program}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new + # + # # Call the disable_program method. + # result = client.disable_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + # p result + # + def disable_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.disable_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.disable_program.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.disable_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.disable_program request, 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 ProgramsService REST API. + # + # This class represents the configuration for ProgramsService 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::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_program to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_program.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_program.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 ProgramsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_program` + # @return [::Gapic::Config::Method] + # + attr_reader :get_program + ## + # RPC-specific configuration for `list_programs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_programs + ## + # RPC-specific configuration for `enable_program` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_program + ## + # RPC-specific configuration for `disable_program` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_program + + # @private + def initialize parent_rpcs = nil + get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program + @get_program = ::Gapic::Config::Method.new get_program_config + list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs + @list_programs = ::Gapic::Config::Method.new list_programs_config + enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program + @enable_program = ::Gapic::Config::Method.new enable_program_config + disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program + @disable_program = ::Gapic::Config::Method.new disable_program_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb new file mode 100644 index 000000000000..bb7144364d14 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb @@ -0,0 +1,329 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/programs_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ProgramsService + module Rest + ## + # REST service stub for the ProgramsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # A result object deserialized from the server's reply + def get_program request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_program_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_program", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.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_programs REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse] + # A result object deserialized from the server's reply + def list_programs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_programs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_programs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the enable_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # A result object deserialized from the server's reply + def enable_program request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_enable_program_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "enable_program", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the disable_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # A result object deserialized from the server's reply + def disable_program request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_disable_program_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "disable_program", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_program_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_programs REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_programs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/programs", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the enable_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_enable_program_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{name}:enable", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the disable_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_disable_program_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{name}:disable", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb new file mode 100644 index 000000000000..8282a0f080fc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb @@ -0,0 +1,65 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/programs.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/programs_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ProgramsService + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a merchant's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.ProgramsService' + + # Retrieves the specified program for the account. + rpc :GetProgram, ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program + # Retrieves all programs for the account. + rpc :ListPrograms, ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse + # Enable participation in the specified program for the account. Executing + # this method requires admin access. + rpc :EnableProgram, ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program + # Disable participation in the specified program for the account. Executing + # this method requires admin access. + rpc :DisableProgram, ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb new file mode 100644 index 000000000000..012299b8a9d6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/regions.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n6google/shopping/merchant/accounts/v1beta/regions.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1egoogle/protobuf/wrappers.proto\"K\n\x10GetRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\xb0\x01\n\x13\x43reateRegionRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tregion_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x06region\x18\x03 \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.RegionB\x03\xe0\x41\x02\"\x92\x01\n\x13UpdateRegionRequest\x12\x45\n\x06region\x18\x01 \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.RegionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x13\x44\x65leteRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\x81\x01\n\x12ListRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\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\x13ListRegionsResponse\x12\x41\n\x07regions\x18\x01 \x03(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.Region\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf1\x05\n\x06Region\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12^\n\x10postal_code_area\x18\x03 \x01(\x0b\x32?.google.shopping.merchant.accounts.v1beta.Region.PostalCodeAreaB\x03\xe0\x41\x01\x12[\n\x0egeotarget_area\x18\x04 \x01(\x0b\x32>.google.shopping.merchant.accounts.v1beta.Region.GeoTargetAreaB\x03\xe0\x41\x01\x12\x44\n\x1bregional_inventory_eligible\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12:\n\x11shipping_eligible\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x1a\xcf\x01\n\x0ePostalCodeArea\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12j\n\x0cpostal_codes\x18\x02 \x03(\x0b\x32O.google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea.PostalCodeRangeB\x03\xe0\x41\x02\x1a\x37\n\x0fPostalCodeRange\x12\x12\n\x05\x62\x65gin\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03\x65nd\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x34\n\rGeoTargetArea\x12#\n\x16geotarget_criteria_ids\x18\x01 \x03(\x03\x42\x03\xe0\x41\x02:\\\xea\x41Y\n!merchantapi.googleapis.com/Region\x12#accounts/{account}/regions/{region}*\x07regions2\x06regionB\x0f\n\r_display_name2\xb9\x08\n\x0eRegionsService\x12\xb6\x01\n\tGetRegion\x12:.google.shopping.merchant.accounts.v1beta.GetRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/accounts/v1beta/{name=accounts/*/regions/*}\x12\xd7\x01\n\x0c\x43reateRegion\x12=.google.shopping.merchant.accounts.v1beta.CreateRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\"V\xda\x41\x17parent,region,region_id\x82\xd3\xe4\x93\x02\x36\",/accounts/v1beta/{parent=accounts/*}/regions:\x06region\x12\xd9\x01\n\x0cUpdateRegion\x12=.google.shopping.merchant.accounts.v1beta.UpdateRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\"X\xda\x41\x12region,update_mask\x82\xd3\xe4\x93\x02=23/accounts/v1beta/{region.name=accounts/*/regions/*}:\x06region\x12\xa2\x01\n\x0c\x44\x65leteRegion\x12=.google.shopping.merchant.accounts.v1beta.DeleteRegionRequest\x1a\x16.google.protobuf.Empty\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/accounts/v1beta/{name=accounts/*/regions/*}\x12\xc9\x01\n\x0bListRegions\x12<.google.shopping.merchant.accounts.v1beta.ListRegionsRequest\x1a=.google.shopping.merchant.accounts.v1beta.ListRegionsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/accounts/v1beta/{parent=accounts/*}/regions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8e\x01\n,com.google.shopping.merchant.accounts.v1betaB\x0cRegionsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + GetRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetRegionRequest").msgclass + CreateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateRegionRequest").msgclass + UpdateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateRegionRequest").msgclass + DeleteRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteRegionRequest").msgclass + ListRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListRegionsRequest").msgclass + ListRegionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListRegionsResponse").msgclass + Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region").msgclass + Region::PostalCodeArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea").msgclass + Region::PostalCodeArea::PostalCodeRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea.PostalCodeRange").msgclass + Region::GeoTargetArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.GeoTargetArea").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb new file mode 100644 index 000000000000..a6f7d439e86b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/regions_service/credentials" +require "google/shopping/merchant/accounts/v1beta/regions_service/paths" +require "google/shopping/merchant/accounts/v1beta/regions_service/client" +require "google/shopping/merchant/accounts/v1beta/regions_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - [Region][google.shopping.merchant.accounts.v1main.Region] + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/regions_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/regions_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new + # + module RegionsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "regions_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/regions_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb new file mode 100644 index 000000000000..fce72afcb413 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb @@ -0,0 +1,886 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/regions_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module RegionsService + ## + # Client for the RegionsService service. + # + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - [Region][google.shopping.merchant.accounts.v1main.Region] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :regions_service_stub + + ## + # Configure the RegionsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RegionsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RegionsService 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::Shopping::Merchant::Accounts::V1beta::RegionsService::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 + @regions_service_stub.universe_domain + end + + ## + # Create a new RegionsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RegionsService 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/shopping/merchant/accounts/v1beta/regions_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 + + @regions_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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 + ) + + @regions_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 + @regions_service_stub.logger + end + + # Service calls + + ## + # Retrieves a region defined in your Merchant Center account. + # + # @overload get_region(request, options = nil) + # Pass arguments to `get_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_region(name: nil) + # Pass arguments to `get_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the region to retrieve. + # Format: `accounts/{account}/regions/{region}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new + # + # # Call the get_region method. + # result = client.get_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + # p result + # + def get_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_region.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :get_region, request, 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 region definition in your Merchant Center account. Executing this + # method requires admin access. + # + # @overload create_region(request, options = nil) + # Pass arguments to `create_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_region(parent: nil, region_id: nil, region: nil) + # Pass arguments to `create_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to create a region for. + # Format: `accounts/{account}` + # @param region_id [::String] + # Required. The identifier for the region, unique over all regions of the + # same account. + # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] + # Required. The region to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new + # + # # Call the create_region method. + # result = client.create_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + # p result + # + def create_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest + + # Converts hash and nil to 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_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_region.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :create_region, request, 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 region definition in your Merchant Center account. Executing this + # method requires admin access. + # + # @overload update_region(request, options = nil) + # Pass arguments to `update_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_region(region: nil, update_mask: nil) + # Pass arguments to `update_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] + # Required. The updated region. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The comma-separated field mask indicating the fields to update. + # Example: + # `"displayName,postalCodeArea.regionCode"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new + # + # # Call the update_region method. + # result = client.update_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + # p result + # + def update_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest + + # Converts hash and nil to 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_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.region&.name + header_params["region.name"] = request.region.name + end + + request_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_region.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :update_region, request, 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 region definition from your Merchant Center account. Executing + # this method requires admin access. + # + # @overload delete_region(request, options = nil) + # Pass arguments to `delete_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_region(name: nil) + # Pass arguments to `delete_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the region to delete. + # Format: `accounts/{account}/regions/{region}` + # + # @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/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new + # + # # Call the delete_region method. + # result = client.delete_region request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_region.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :delete_region, request, 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 regions in your Merchant Center account. + # + # @overload list_regions(request, options = nil) + # Pass arguments to `list_regions` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_regions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_regions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list regions for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of regions to return. The service may return + # fewer than this value. + # If unspecified, at most 50 regions will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListRegions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegions` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new + # + # # Call the list_regions method. + # result = client.list_regions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Region. + # p item + # end + # + def list_regions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_regions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_regions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_regions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :list_regions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @regions_service_stub, :list_regions, 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 RegionsService API. + # + # This class represents the configuration for RegionsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_region to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_region.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_region.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::RegionsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 RegionsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_region` + # @return [::Gapic::Config::Method] + # + attr_reader :get_region + ## + # RPC-specific configuration for `create_region` + # @return [::Gapic::Config::Method] + # + attr_reader :create_region + ## + # RPC-specific configuration for `update_region` + # @return [::Gapic::Config::Method] + # + attr_reader :update_region + ## + # RPC-specific configuration for `delete_region` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_region + ## + # RPC-specific configuration for `list_regions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_regions + + # @private + def initialize parent_rpcs = nil + get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region + @get_region = ::Gapic::Config::Method.new get_region_config + create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region + @create_region = ::Gapic::Config::Method.new create_region_config + update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region + @update_region = ::Gapic::Config::Method.new update_region_config + delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region + @delete_region = ::Gapic::Config::Method.new delete_region_config + list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions + @list_regions = ::Gapic::Config::Method.new list_regions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb new file mode 100644 index 000000000000..536fce1bdfaf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_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 Shopping + module Merchant + module Accounts + module V1beta + module RegionsService + # Credentials for the RegionsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb new file mode 100644 index 000000000000..b6f5e812e70d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_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 Shopping + module Merchant + module Accounts + module V1beta + module RegionsService + # Path helper methods for the RegionsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified Region resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/regions/{region}` + # + # @param account [String] + # @param region [String] + # + # @return [::String] + def region_path account:, region: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/regions/#{region}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb new file mode 100644 index 000000000000..f359bf4bc293 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/regions_service/credentials" +require "google/shopping/merchant/accounts/v1beta/regions_service/paths" +require "google/shopping/merchant/accounts/v1beta/regions_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - [Region][google.shopping.merchant.accounts.v1main.Region] + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/regions_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new + # + module RegionsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/regions_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb new file mode 100644 index 000000000000..4aa76953495d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb @@ -0,0 +1,808 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/regions_pb" +require "google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module RegionsService + module Rest + ## + # REST client for the RegionsService service. + # + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - [Region][google.shopping.merchant.accounts.v1main.Region] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :regions_service_stub + + ## + # Configure the RegionsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RegionsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RegionsService 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::Shopping::Merchant::Accounts::V1beta::RegionsService::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 + @regions_service_stub.universe_domain + end + + ## + # Create a new RegionsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RegionsService 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 + + @regions_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @regions_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 + @regions_service_stub.logger + end + + # Service calls + + ## + # Retrieves a region defined in your Merchant Center account. + # + # @overload get_region(request, options = nil) + # Pass arguments to `get_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_region(name: nil) + # Pass arguments to `get_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the region to retrieve. + # Format: `accounts/{account}/regions/{region}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new + # + # # Call the get_region method. + # result = client.get_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + # p result + # + def get_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_region.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.get_region request, 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 region definition in your Merchant Center account. Executing this + # method requires admin access. + # + # @overload create_region(request, options = nil) + # Pass arguments to `create_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_region(parent: nil, region_id: nil, region: nil) + # Pass arguments to `create_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to create a region for. + # Format: `accounts/{account}` + # @param region_id [::String] + # Required. The identifier for the region, unique over all regions of the + # same account. + # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] + # Required. The region to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new + # + # # Call the create_region method. + # result = client.create_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + # p result + # + def create_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest + + # Converts hash and nil to an 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_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_region.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.create_region request, 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 region definition in your Merchant Center account. Executing this + # method requires admin access. + # + # @overload update_region(request, options = nil) + # Pass arguments to `update_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_region(region: nil, update_mask: nil) + # Pass arguments to `update_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] + # Required. The updated region. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The comma-separated field mask indicating the fields to update. + # Example: + # `"displayName,postalCodeArea.regionCode"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new + # + # # Call the update_region method. + # result = client.update_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + # p result + # + def update_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest + + # Converts hash and nil to an 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_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_region.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.update_region request, 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 region definition from your Merchant Center account. Executing + # this method requires admin access. + # + # @overload delete_region(request, options = nil) + # Pass arguments to `delete_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_region(name: nil) + # Pass arguments to `delete_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the region to delete. + # Format: `accounts/{account}/regions/{region}` + # @yield [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/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new + # + # # Call the delete_region method. + # result = client.delete_region request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_region.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.delete_region request, 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 regions in your Merchant Center account. + # + # @overload list_regions(request, options = nil) + # Pass arguments to `list_regions` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_regions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_regions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list regions for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of regions to return. The service may return + # fewer than this value. + # If unspecified, at most 50 regions will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListRegions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegions` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new + # + # # Call the list_regions method. + # result = client.list_regions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Region. + # p item + # end + # + def list_regions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_regions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_regions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_regions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.list_regions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @regions_service_stub, :list_regions, "regions", request, result, 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 RegionsService REST API. + # + # This class represents the configuration for RegionsService 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::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_region to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_region.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_region.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 RegionsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_region` + # @return [::Gapic::Config::Method] + # + attr_reader :get_region + ## + # RPC-specific configuration for `create_region` + # @return [::Gapic::Config::Method] + # + attr_reader :create_region + ## + # RPC-specific configuration for `update_region` + # @return [::Gapic::Config::Method] + # + attr_reader :update_region + ## + # RPC-specific configuration for `delete_region` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_region + ## + # RPC-specific configuration for `list_regions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_regions + + # @private + def initialize parent_rpcs = nil + get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region + @get_region = ::Gapic::Config::Method.new get_region_config + create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region + @create_region = ::Gapic::Config::Method.new create_region_config + update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region + @update_region = ::Gapic::Config::Method.new update_region_config + delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region + @delete_region = ::Gapic::Config::Method.new delete_region_config + list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions + @list_regions = ::Gapic::Config::Method.new list_regions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb new file mode 100644 index 000000000000..2705002746ab --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb @@ -0,0 +1,390 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/regions_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module RegionsService + module Rest + ## + # REST service stub for the RegionsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # A result object deserialized from the server's reply + def get_region request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_region_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_region", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.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_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # A result object deserialized from the server's reply + def create_region request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_region_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_region", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.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_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # A result object deserialized from the server's reply + def update_region request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_region_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_region", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.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_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_region request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_region_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_region", + 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_regions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse] + # A result object deserialized from the server's reply + def list_regions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_regions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_regions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_region_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest] + # 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_region_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{parent}/regions", + body: "region", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest] + # 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_region_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{region.name}", + body: "region", + matches: [ + ["region.name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_region_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_regions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_regions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/regions", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb new file mode 100644 index 000000000000..dcb5e918d1ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/regions.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/regions_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module RegionsService + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - [Region][google.shopping.merchant.accounts.v1main.Region] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.RegionsService' + + # Retrieves a region defined in your Merchant Center account. + rpc :GetRegion, ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Region + # Creates a region definition in your Merchant Center account. Executing this + # method requires admin access. + rpc :CreateRegion, ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Region + # Updates a region definition in your Merchant Center account. Executing this + # method requires admin access. + rpc :UpdateRegion, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Region + # Deletes a region definition from your Merchant Center account. Executing + # this method requires admin access. + rpc :DeleteRegion, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, ::Google::Protobuf::Empty + # Lists the regions in your Merchant Center account. + rpc :ListRegions, ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb new file mode 100644 index 000000000000..7a948b075dea --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/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 "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" +require "google/shopping/merchant/accounts/v1beta/user_service/rest" +require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" +require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" +require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest" +require "google/shopping/merchant/accounts/v1beta/programs_service/rest" +require "google/shopping/merchant/accounts/v1beta/regions_service/rest" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest" +require "google/shopping/merchant/accounts/v1beta/version" + +module Google + module Shopping + module Merchant + module Accounts + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/accounts/v1beta/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb new file mode 100644 index 000000000000..883a132363a8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/client" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to get method call shipping setting information per Merchant API + # method. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/shipping_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new + # + module ShippingSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "shipping_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb new file mode 100644 index 000000000000..c51e8c162861 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb @@ -0,0 +1,574 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/shippingsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ShippingSettingsService + ## + # Client for the ShippingSettingsService service. + # + # Service to get method call shipping setting information per Merchant API + # method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :shipping_settings_service_stub + + ## + # Configure the ShippingSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ShippingSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 ShippingSettingsService 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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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 + @shipping_settings_service_stub.universe_domain + end + + ## + # Create a new ShippingSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ShippingSettingsService 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/shopping/merchant/accounts/v1beta/shippingsettings_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 + + @shipping_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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 + ) + + @shipping_settings_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 + @shipping_settings_service_stub.logger + end + + # Service calls + + ## + # Retrieve shipping setting information. + # + # @overload get_shipping_settings(request, options = nil) + # Pass arguments to `get_shipping_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_shipping_settings(name: nil) + # Pass arguments to `get_shipping_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the shipping setting to retrieve. + # Format: `accounts/{account}/shippingsetting` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new + # + # # Call the get_shipping_settings method. + # result = client.get_shipping_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. + # p result + # + def get_shipping_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_shipping_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_shipping_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_shipping_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shipping_settings_service_stub.call_rpc :get_shipping_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Replace the shipping setting of a merchant with the request shipping + # setting. Executing this method requires admin access. + # + # @overload insert_shipping_settings(request, options = nil) + # Pass arguments to `insert_shipping_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_shipping_settings(parent: nil, shipping_setting: nil) + # Pass arguments to `insert_shipping_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account where this product will be inserted. + # Format: accounts/\\{account} + # @param shipping_setting [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings, ::Hash] + # Required. The new version of the account. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new + # + # # Call the insert_shipping_settings method. + # result = client.insert_shipping_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. + # p result + # + def insert_shipping_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_shipping_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_shipping_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_shipping_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shipping_settings_service_stub.call_rpc :insert_shipping_settings, request, 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 ShippingSettingsService API. + # + # This class represents the configuration for ShippingSettingsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_shipping_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_shipping_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_shipping_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 ShippingSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_shipping_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_shipping_settings + ## + # RPC-specific configuration for `insert_shipping_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_shipping_settings + + # @private + def initialize parent_rpcs = nil + get_shipping_settings_config = parent_rpcs.get_shipping_settings if parent_rpcs.respond_to? :get_shipping_settings + @get_shipping_settings = ::Gapic::Config::Method.new get_shipping_settings_config + insert_shipping_settings_config = parent_rpcs.insert_shipping_settings if parent_rpcs.respond_to? :insert_shipping_settings + @insert_shipping_settings = ::Gapic::Config::Method.new insert_shipping_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb new file mode 100644 index 000000000000..b3b8b543ed1a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_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 Shopping + module Merchant + module Accounts + module V1beta + module ShippingSettingsService + # Credentials for the ShippingSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb new file mode 100644 index 000000000000..29bb68e960e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.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 Shopping + module Merchant + module Accounts + module V1beta + module ShippingSettingsService + # Path helper methods for the ShippingSettingsService API. + module Paths + ## + # Create a fully-qualified ShippingSettings resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/shippingSettings` + # + # @param account [String] + # + # @return [::String] + def shipping_settings_path account: + "accounts/#{account}/shippingSettings" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb new file mode 100644 index 000000000000..0d14c8f4c394 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to get method call shipping setting information per Merchant API + # method. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new + # + module ShippingSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb new file mode 100644 index 000000000000..766d44f4b10d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb @@ -0,0 +1,517 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/shippingsettings_pb" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ShippingSettingsService + module Rest + ## + # REST client for the ShippingSettingsService service. + # + # Service to get method call shipping setting information per Merchant API + # method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :shipping_settings_service_stub + + ## + # Configure the ShippingSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ShippingSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 ShippingSettingsService 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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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 + @shipping_settings_service_stub.universe_domain + end + + ## + # Create a new ShippingSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ShippingSettingsService 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 + + @shipping_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @shipping_settings_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 + @shipping_settings_service_stub.logger + end + + # Service calls + + ## + # Retrieve shipping setting information. + # + # @overload get_shipping_settings(request, options = nil) + # Pass arguments to `get_shipping_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_shipping_settings(name: nil) + # Pass arguments to `get_shipping_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the shipping setting to retrieve. + # Format: `accounts/{account}/shippingsetting` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new + # + # # Call the get_shipping_settings method. + # result = client.get_shipping_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. + # p result + # + def get_shipping_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_shipping_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_shipping_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_shipping_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shipping_settings_service_stub.get_shipping_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Replace the shipping setting of a merchant with the request shipping + # setting. Executing this method requires admin access. + # + # @overload insert_shipping_settings(request, options = nil) + # Pass arguments to `insert_shipping_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_shipping_settings(parent: nil, shipping_setting: nil) + # Pass arguments to `insert_shipping_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account where this product will be inserted. + # Format: accounts/\\{account} + # @param shipping_setting [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings, ::Hash] + # Required. The new version of the account. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new + # + # # Call the insert_shipping_settings method. + # result = client.insert_shipping_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. + # p result + # + def insert_shipping_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_shipping_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_shipping_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_shipping_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shipping_settings_service_stub.insert_shipping_settings request, 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 ShippingSettingsService REST API. + # + # This class represents the configuration for ShippingSettingsService 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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_shipping_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_shipping_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_shipping_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 ShippingSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_shipping_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_shipping_settings + ## + # RPC-specific configuration for `insert_shipping_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_shipping_settings + + # @private + def initialize parent_rpcs = nil + get_shipping_settings_config = parent_rpcs.get_shipping_settings if parent_rpcs.respond_to? :get_shipping_settings + @get_shipping_settings = ::Gapic::Config::Method.new get_shipping_settings_config + insert_shipping_settings_config = parent_rpcs.insert_shipping_settings if parent_rpcs.respond_to? :insert_shipping_settings + @insert_shipping_settings = ::Gapic::Config::Method.new insert_shipping_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..40faa8e51671 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ShippingSettingsService + module Rest + ## + # REST service stub for the ShippingSettingsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_shipping_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # A result object deserialized from the server's reply + def get_shipping_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_shipping_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_shipping_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the insert_shipping_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # A result object deserialized from the server's reply + def insert_shipping_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_shipping_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "insert_shipping_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_shipping_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_shipping_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/shippingSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_shipping_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_shipping_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{parent}/shippingSettings:insert", + body: "shipping_setting", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb new file mode 100644 index 000000000000..c3a11939d0fb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/shippingsettings.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/shopping/type/types_pb' + + +descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/shippingsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xcb\x02\n\x10ShippingSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12H\n\x08services\x18\x02 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.ServiceB\x03\xe0\x41\x01\x12L\n\nwarehouses\x18\x03 \x03(\x0b\x32\x33.google.shopping.merchant.accounts.v1beta.WarehouseB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x02:y\xea\x41v\n+merchantapi.googleapis.com/ShippingSettings\x12#accounts/{account}/shippingSettings*\x10shippingSettings2\x10shippingSettings\"\xc7\x10\n\x07Service\x12\x1e\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06\x61\x63tive\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1f\n\x12\x64\x65livery_countries\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tH\x02\x88\x01\x01\x12W\n\rdelivery_time\x18\x05 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.DeliveryTimeB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12M\n\x0brate_groups\x18\x06 \x03(\x0b\x32\x33.google.shopping.merchant.accounts.v1beta.RateGroupB\x03\xe0\x41\x01\x12Z\n\rshipment_type\x18\x07 \x01(\x0e\x32>.google.shopping.merchant.accounts.v1beta.Service.ShipmentTypeH\x04\x88\x01\x01\x12=\n\x13minimum_order_value\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x05\x88\x01\x01\x12h\n\x19minimum_order_value_table\x18\t \x01(\x0b\x32@.google.shopping.merchant.accounts.v1beta.MinimumOrderValueTableH\x06\x88\x01\x01\x12X\n\x0cstore_config\x18\n \x01(\x0b\x32=.google.shopping.merchant.accounts.v1beta.Service.StoreConfigH\x07\x88\x01\x01\x12_\n\x10loyalty_programs\x18\x0b \x03(\x0b\x32@.google.shopping.merchant.accounts.v1beta.Service.LoyaltyProgramB\x03\xe0\x41\x01\x1a\xe2\x06\n\x0bStoreConfig\x12o\n\x12store_service_type\x18\x01 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.Service.StoreConfig.StoreServiceTypeH\x00\x88\x01\x01\x12\x18\n\x0bstore_codes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x66\n\rcutoff_config\x18\x03 \x01(\x0b\x32J.google.shopping.merchant.accounts.v1beta.Service.StoreConfig.CutoffConfigH\x01\x88\x01\x01\x12O\n\x0eservice_radius\x18\x04 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.DistanceH\x02\x88\x01\x01\x1a\xf5\x02\n\x0c\x43utoffConfig\x12z\n\x11local_cutoff_time\x18\x01 \x01(\x0b\x32Z.google.shopping.merchant.accounts.v1beta.Service.StoreConfig.CutoffConfig.LocalCutoffTimeH\x00\x88\x01\x01\x12%\n\x18store_close_offset_hours\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12$\n\x17no_delivery_post_cutoff\x18\x03 \x01(\x08H\x02\x88\x01\x01\x1aM\n\x0fLocalCutoffTime\x12\x11\n\x04hour\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x13\n\x06minute\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minuteB\x14\n\x12_local_cutoff_timeB\x1b\n\x19_store_close_offset_hoursB\x1a\n\x18_no_delivery_post_cutoff\"[\n\x10StoreServiceType\x12\"\n\x1eSTORE_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nALL_STORES\x10\x01\x12\x13\n\x0fSELECTED_STORES\x10\x02\x42\x15\n\x13_store_service_typeB\x10\n\x0e_cutoff_configB\x11\n\x0f_service_radius\x1a\xf7\x01\n\x0eLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12x\n\x15loyalty_program_tiers\x18\x02 \x03(\x0b\x32T.google.shopping.merchant.accounts.v1beta.Service.LoyaltyProgram.LoyaltyProgramTiersB\x03\xe0\x41\x01\x1a=\n\x13LoyaltyProgramTiers\x12\x17\n\ntier_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_tier_labelB\x10\n\x0e_program_label\"e\n\x0cShipmentType\x12\x1d\n\x19SHIPMENT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45LIVERY\x10\x01\x12\x12\n\x0eLOCAL_DELIVERY\x10\x02\x12\x14\n\x10\x43OLLECTION_POINT\x10\x03\x42\x0f\n\r_service_nameB\t\n\x07_activeB\x10\n\x0e_currency_codeB\x10\n\x0e_delivery_timeB\x10\n\x0e_shipment_typeB\x16\n\x14_minimum_order_valueB\x1c\n\x1a_minimum_order_value_tableB\x0f\n\r_store_config\"\xb6\x01\n\x08\x44istance\x12\x12\n\x05value\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12J\n\x04unit\x18\x02 \x01(\x0e\x32\x37.google.shopping.merchant.accounts.v1beta.Distance.UnitH\x01\x88\x01\x01\"7\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\t\n\x05MILES\x10\x01\x12\x0e\n\nKILOMETERS\x10\x02\x42\x08\n\x06_valueB\x07\n\x05_unit\"\xb0\x03\n\tWarehouse\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12U\n\x10shipping_address\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.AddressB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\\\n\x0b\x63utoff_time\x18\x03 \x01(\x0b\x32=.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTimeB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x1f\n\rhandling_days\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02H\x03\x88\x01\x01\x12]\n\x13\x62usiness_day_config\x18\x05 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1beta.BusinessDayConfigH\x04\x88\x01\x01\x42\x07\n\x05_nameB\x13\n\x11_shipping_addressB\x0e\n\x0c_cutoff_timeB\x10\n\x0e_handling_daysB\x16\n\x14_business_day_config\"[\n\x13WarehouseCutoffTime\x12\x16\n\x04hour\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06minute\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minute\"\xf7\x01\n\x07\x41\x64\x64ress\x12\x1b\n\x0estreet_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x04\x63ity\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12%\n\x13\x61\x64ministrative_area\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x1d\n\x0bpostal_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\x1d\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02H\x04\x88\x01\x01\x42\x11\n\x0f_street_addressB\x07\n\x05_cityB\x16\n\x14_administrative_areaB\x0e\n\x0c_postal_codeB\x0e\n\x0c_region_code\"\xb5\x06\n\x0c\x44\x65liveryTime\x12\x1d\n\x10min_transit_days\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_transit_days\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12N\n\x0b\x63utoff_time\x18\x03 \x01(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.CutoffTimeH\x02\x88\x01\x01\x12\x1e\n\x11min_handling_days\x18\x04 \x01(\x05H\x03\x88\x01\x01\x12\x1e\n\x11max_handling_days\x18\x05 \x01(\x05H\x04\x88\x01\x01\x12W\n\x12transit_time_table\x18\x06 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.TransitTableH\x05\x88\x01\x01\x12\x66\n\x1chandling_business_day_config\x18\x07 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1beta.BusinessDayConfigH\x06\x88\x01\x01\x12\x65\n\x1btransit_business_day_config\x18\x08 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1beta.BusinessDayConfigH\x07\x88\x01\x01\x12q\n\x1ewarehouse_based_delivery_times\x18\t \x03(\x0b\x32\x44.google.shopping.merchant.accounts.v1beta.WarehouseBasedDeliveryTimeB\x03\xe0\x41\x01\x42\x13\n\x11_min_transit_daysB\x13\n\x11_max_transit_daysB\x0e\n\x0c_cutoff_timeB\x14\n\x12_min_handling_daysB\x14\n\x12_max_handling_daysB\x15\n\x13_transit_time_tableB\x1f\n\x1d_handling_business_day_configB\x1e\n\x1c_transit_business_day_config\"}\n\nCutoffTime\x12\x16\n\x04hour\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06minute\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1b\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minuteB\x0c\n\n_time_zone\"\xf4\x01\n\x11\x42usinessDayConfig\x12_\n\rbusiness_days\x18\x01 \x03(\x0e\x32\x43.google.shopping.merchant.accounts.v1beta.BusinessDayConfig.WeekdayB\x03\xe0\x41\x02\"~\n\x07Weekday\x12\x17\n\x13WEEKDAY_UNSPECIFIED\x10\x00\x12\n\n\x06MONDAY\x10\x01\x12\x0b\n\x07TUESDAY\x10\x02\x12\r\n\tWEDNESDAY\x10\x03\x12\x0c\n\x08THURSDAY\x10\x04\x12\n\n\x06\x46RIDAY\x10\x05\x12\x0c\n\x08SATURDAY\x10\x06\x12\n\n\x06SUNDAY\x10\x07\"\xa5\x01\n\x1aWarehouseBasedDeliveryTime\x12\x19\n\x07\x63\x61rrier\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12!\n\x0f\x63\x61rrier_service\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1b\n\twarehouse\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\n\n\x08_carrierB\x12\n\x10_carrier_serviceB\x0c\n\n_warehouse\"\xa7\x03\n\tRateGroup\x12\'\n\x1a\x61pplicable_shipping_labels\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12J\n\x0csingle_value\x18\x02 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1beta.ValueH\x00\x88\x01\x01\x12H\n\nmain_table\x18\x03 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1beta.TableH\x01\x88\x01\x01\x12G\n\tsubtables\x18\x04 \x03(\x0b\x32/.google.shopping.merchant.accounts.v1beta.TableB\x03\xe0\x41\x01\x12Q\n\rcarrier_rates\x18\x05 \x03(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.CarrierRateB\x03\xe0\x41\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x0f\n\r_single_valueB\r\n\x0b_main_tableB\x07\n\x05_name\"\xaa\x02\n\x05Table\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12P\n\x0brow_headers\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.HeadersB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12N\n\x0e\x63olumn_headers\x18\x03 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.HeadersH\x02\x88\x01\x01\x12@\n\x04rows\x18\x04 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1beta.RowB\x03\xe0\x41\x02\x42\x07\n\x05_nameB\x0e\n\x0c_row_headersB\x11\n\x0f_column_headers\"\xac\x03\n\x0cTransitTable\x12$\n\x17postal_code_group_names\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12 \n\x13transit_time_labels\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12X\n\x04rows\x18\x03 \x03(\x0b\x32\x45.google.shopping.merchant.accounts.v1beta.TransitTable.TransitTimeRowB\x03\xe0\x41\x02\x1a\xf9\x01\n\x0eTransitTimeRow\x12k\n\x06values\x18\x01 \x03(\x0b\x32V.google.shopping.merchant.accounts.v1beta.TransitTable.TransitTimeRow.TransitTimeValueB\x03\xe0\x41\x02\x1az\n\x10TransitTimeValue\x12\x1d\n\x10min_transit_days\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_transit_days\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x13\n\x11_min_transit_daysB\x13\n\x11_max_transit_days\"\x81\x02\n\x16MinimumOrderValueTable\x12{\n\x18store_code_set_with_movs\x18\x01 \x03(\x0b\x32T.google.shopping.merchant.accounts.v1beta.MinimumOrderValueTable.StoreCodeSetWithMovB\x03\xe0\x41\x02\x1aj\n\x13StoreCodeSetWithMov\x12\x18\n\x0bstore_codes\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12/\n\x05value\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x88\x01\x01\x42\x08\n\x06_value\"\x84\x02\n\x07Headers\x12\x30\n\x06prices\x18\x01 \x03(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02\x12\x32\n\x07weights\x18\x02 \x03(\x0b\x32\x1c.google.shopping.type.WeightB\x03\xe0\x41\x02\x12\x1c\n\x0fnumber_of_items\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12$\n\x17postal_code_group_names\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12O\n\tlocations\x18\x05 \x03(\x0b\x32\x37.google.shopping.merchant.accounts.v1beta.LocationIdSetB\x03\xe0\x41\x02\"*\n\rLocationIdSet\x12\x19\n\x0clocation_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02\"J\n\x03Row\x12\x43\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32/.google.shopping.merchant.accounts.v1beta.ValueB\x03\xe0\x41\x02\"\xf8\x01\n\x05Value\x12\x18\n\x0bno_shipping\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x33\n\tflat_rate\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x01\x88\x01\x01\x12\x1d\n\x10price_percentage\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0c\x63\x61rrier_rate\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08subtable\x18\x05 \x01(\tH\x04\x88\x01\x01\x42\x0e\n\x0c_no_shippingB\x0c\n\n_flat_rateB\x13\n\x11_price_percentageB\x0f\n\r_carrier_rateB\x0b\n\t_subtable\"\xe0\x02\n\x0b\x43\x61rrierRate\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x19\n\x07\x63\x61rrier\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12!\n\x0f\x63\x61rrier_service\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12$\n\x12origin_postal_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\'\n\x15percentage_adjustment\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12>\n\x0f\x66lat_adjustment\x18\x06 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x05\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_carrierB\x12\n\x10_carrier_serviceB\x15\n\x13_origin_postal_codeB\x18\n\x16_percentage_adjustmentB\x12\n\x10_flat_adjustment\"_\n\x1aGetShippingSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ShippingSettings\"\x8f\x01\n\x1dInsertShippingSettingsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x10shipping_setting\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.ShippingSettingsB\x03\xe0\x41\x02\x32\xb8\x04\n\x17ShippingSettingsService\x12\xdb\x01\n\x13GetShippingSettings\x12\x44.google.shopping.merchant.accounts.v1beta.GetShippingSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.ShippingSettings\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/accounts/v1beta/{name=accounts/*/shippingSettings}\x12\xf5\x01\n\x16InsertShippingSettings\x12G.google.shopping.merchant.accounts.v1beta.InsertShippingSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.ShippingSettings\"V\x82\xd3\xe4\x93\x02P\" e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the state of the agreement for the application terms of service. + # + # @overload retrieve_for_application_terms_of_service_agreement_state(request, options = nil) + # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload retrieve_for_application_terms_of_service_agreement_state(parent: nil) + # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account for which to get a TermsOfServiceAgreementState + # Format: `accounts/{account}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new + # + # # Call the retrieve_for_application_terms_of_service_agreement_state method. + # result = client.retrieve_for_application_terms_of_service_agreement_state request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. + # p result + # + def retrieve_for_application_terms_of_service_agreement_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.timeout, + metadata: metadata, + retry_policy: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_agreement_state_service_stub.call_rpc :retrieve_for_application_terms_of_service_agreement_state, request, 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 TermsOfServiceAgreementStateService API. + # + # This class represents the configuration for TermsOfServiceAgreementStateService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_terms_of_service_agreement_state to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 TermsOfServiceAgreementStateService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_terms_of_service_agreement_state` + # @return [::Gapic::Config::Method] + # + attr_reader :get_terms_of_service_agreement_state + ## + # RPC-specific configuration for `retrieve_for_application_terms_of_service_agreement_state` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_for_application_terms_of_service_agreement_state + + # @private + def initialize parent_rpcs = nil + get_terms_of_service_agreement_state_config = parent_rpcs.get_terms_of_service_agreement_state if parent_rpcs.respond_to? :get_terms_of_service_agreement_state + @get_terms_of_service_agreement_state = ::Gapic::Config::Method.new get_terms_of_service_agreement_state_config + retrieve_for_application_terms_of_service_agreement_state_config = parent_rpcs.retrieve_for_application_terms_of_service_agreement_state if parent_rpcs.respond_to? :retrieve_for_application_terms_of_service_agreement_state + @retrieve_for_application_terms_of_service_agreement_state = ::Gapic::Config::Method.new retrieve_for_application_terms_of_service_agreement_state_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb new file mode 100644 index 000000000000..08f405184324 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_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 Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceAgreementStateService + # Credentials for the TermsOfServiceAgreementStateService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb new file mode 100644 index 000000000000..8f1f50a9834f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_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 Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceAgreementStateService + # Path helper methods for the TermsOfServiceAgreementStateService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified TermsOfServiceAgreementState resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/termsOfServiceAgreementStates/{identifier}` + # + # @param account [String] + # @param identifier [String] + # + # @return [::String] + def terms_of_service_agreement_state_path account:, identifier: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/termsOfServiceAgreementStates/#{identifier}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb new file mode 100644 index 000000000000..33c9185e4e0a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support `TermsOfServiceAgreementState` API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new + # + module TermsOfServiceAgreementStateService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb new file mode 100644 index 000000000000..270b37221168 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb @@ -0,0 +1,519 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceAgreementStateService + module Rest + ## + # REST client for the TermsOfServiceAgreementStateService service. + # + # Service to support `TermsOfServiceAgreementState` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :terms_of_service_agreement_state_service_stub + + ## + # Configure the TermsOfServiceAgreementStateService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TermsOfServiceAgreementStateService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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 + @terms_of_service_agreement_state_service_stub.universe_domain + end + + ## + # Create a new TermsOfServiceAgreementStateService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TermsOfServiceAgreementStateService 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 + + @terms_of_service_agreement_state_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @terms_of_service_agreement_state_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 + @terms_of_service_agreement_state_service_stub.logger + end + + # Service calls + + ## + # Returns the state of a terms of service agreement. + # + # @overload get_terms_of_service_agreement_state(request, options = nil) + # Pass arguments to `get_terms_of_service_agreement_state` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_terms_of_service_agreement_state(name: nil) + # Pass arguments to `get_terms_of_service_agreement_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the terms of service version. + # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` + # The identifier format is: `{TermsOfServiceKind}-{country}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new + # + # # Call the get_terms_of_service_agreement_state method. + # result = client.get_terms_of_service_agreement_state request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. + # p result + # + def get_terms_of_service_agreement_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_terms_of_service_agreement_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_terms_of_service_agreement_state.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_terms_of_service_agreement_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_agreement_state_service_stub.get_terms_of_service_agreement_state request, 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 the state of the agreement for the application terms of service. + # + # @overload retrieve_for_application_terms_of_service_agreement_state(request, options = nil) + # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload retrieve_for_application_terms_of_service_agreement_state(parent: nil) + # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account for which to get a TermsOfServiceAgreementState + # Format: `accounts/{account}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new + # + # # Call the retrieve_for_application_terms_of_service_agreement_state method. + # result = client.retrieve_for_application_terms_of_service_agreement_state request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. + # p result + # + def retrieve_for_application_terms_of_service_agreement_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_agreement_state_service_stub.retrieve_for_application_terms_of_service_agreement_state request, 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 TermsOfServiceAgreementStateService REST API. + # + # This class represents the configuration for TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_terms_of_service_agreement_state to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 TermsOfServiceAgreementStateService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_terms_of_service_agreement_state` + # @return [::Gapic::Config::Method] + # + attr_reader :get_terms_of_service_agreement_state + ## + # RPC-specific configuration for `retrieve_for_application_terms_of_service_agreement_state` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_for_application_terms_of_service_agreement_state + + # @private + def initialize parent_rpcs = nil + get_terms_of_service_agreement_state_config = parent_rpcs.get_terms_of_service_agreement_state if parent_rpcs.respond_to? :get_terms_of_service_agreement_state + @get_terms_of_service_agreement_state = ::Gapic::Config::Method.new get_terms_of_service_agreement_state_config + retrieve_for_application_terms_of_service_agreement_state_config = parent_rpcs.retrieve_for_application_terms_of_service_agreement_state if parent_rpcs.respond_to? :retrieve_for_application_terms_of_service_agreement_state + @retrieve_for_application_terms_of_service_agreement_state = ::Gapic::Config::Method.new retrieve_for_application_terms_of_service_agreement_state_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb new file mode 100644 index 000000000000..c0a226adbfbc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceAgreementStateService + module Rest + ## + # REST service stub for the TermsOfServiceAgreementStateService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_terms_of_service_agreement_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # A result object deserialized from the server's reply + def get_terms_of_service_agreement_state request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_terms_of_service_agreement_state_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_terms_of_service_agreement_state", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the retrieve_for_application_terms_of_service_agreement_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # A result object deserialized from the server's reply + def retrieve_for_application_terms_of_service_agreement_state request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_for_application_terms_of_service_agreement_state_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "retrieve_for_application_terms_of_service_agreement_state", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_terms_of_service_agreement_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_terms_of_service_agreement_state_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/termsOfServiceAgreementStates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the retrieve_for_application_terms_of_service_agreement_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_retrieve_for_application_terms_of_service_agreement_state_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/termsOfServiceAgreementStates:retrieveForApplication", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb new file mode 100644 index 000000000000..7147a2323140 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/client" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support `TermsOfService` API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/terms_of_service_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new + # + module TermsOfServiceService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "terms_of_service_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb new file mode 100644 index 000000000000..14e060c6cf12 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb @@ -0,0 +1,670 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/termsofservice_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceService + ## + # Client for the TermsOfServiceService service. + # + # Service to support `TermsOfService` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :terms_of_service_service_stub + + ## + # Configure the TermsOfServiceService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TermsOfServiceService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TermsOfServiceService 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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 + @terms_of_service_service_stub.universe_domain + end + + ## + # Create a new TermsOfServiceService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TermsOfServiceService 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/shopping/merchant/accounts/v1beta/termsofservice_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 + + @terms_of_service_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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 + ) + + @terms_of_service_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 + @terms_of_service_service_stub.logger + end + + # Service calls + + ## + # Retrieves the `TermsOfService` associated with the provided version. + # + # @overload get_terms_of_service(request, options = nil) + # Pass arguments to `get_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_terms_of_service(name: nil) + # Pass arguments to `get_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new + # + # # Call the get_terms_of_service method. + # result = client.get_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. + # p result + # + def get_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_terms_of_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.call_rpc :get_terms_of_service, request, 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 the latest version of the `TermsOfService` for a given `kind` and + # `region_code`. + # + # @overload retrieve_latest_terms_of_service(request, options = nil) + # Pass arguments to `retrieve_latest_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload retrieve_latest_terms_of_service(region_code: nil, kind: nil) + # Pass arguments to `retrieve_latest_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param region_code [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # @param kind [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] + # Required. The Kind this terms of service version applies to. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new + # + # # Call the retrieve_latest_terms_of_service method. + # result = client.retrieve_latest_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. + # p result + # + def retrieve_latest_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.retrieve_latest_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::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.retrieve_latest_terms_of_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.retrieve_latest_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.call_rpc :retrieve_latest_terms_of_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Accepts a `TermsOfService`. Executing this method requires admin access. + # + # @overload accept_terms_of_service(request, options = nil) + # Pass arguments to `accept_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload accept_terms_of_service(name: nil, account: nil, region_code: nil) + # Pass arguments to `accept_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @param account [::String] + # Required. The account for which to accept the ToS. + # @param region_code [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # + # @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/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new + # + # # Call the accept_terms_of_service method. + # result = client.accept_terms_of_service request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def accept_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.accept_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.accept_terms_of_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.accept_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.call_rpc :accept_terms_of_service, request, 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 TermsOfServiceService API. + # + # This class represents the configuration for TermsOfServiceService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_terms_of_service to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 TermsOfServiceService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_terms_of_service + ## + # RPC-specific configuration for `retrieve_latest_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_latest_terms_of_service + ## + # RPC-specific configuration for `accept_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :accept_terms_of_service + + # @private + def initialize parent_rpcs = nil + get_terms_of_service_config = parent_rpcs.get_terms_of_service if parent_rpcs.respond_to? :get_terms_of_service + @get_terms_of_service = ::Gapic::Config::Method.new get_terms_of_service_config + retrieve_latest_terms_of_service_config = parent_rpcs.retrieve_latest_terms_of_service if parent_rpcs.respond_to? :retrieve_latest_terms_of_service + @retrieve_latest_terms_of_service = ::Gapic::Config::Method.new retrieve_latest_terms_of_service_config + accept_terms_of_service_config = parent_rpcs.accept_terms_of_service if parent_rpcs.respond_to? :accept_terms_of_service + @accept_terms_of_service = ::Gapic::Config::Method.new accept_terms_of_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb new file mode 100644 index 000000000000..46f3c20085d5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_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 Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceService + # Credentials for the TermsOfServiceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb new file mode 100644 index 000000000000..cbc86885e96c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceService + # Path helper methods for the TermsOfServiceService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified TermsOfService resource string. + # + # The resource will be in the following format: + # + # `termsOfService/{version}` + # + # @param version [String] + # + # @return [::String] + def terms_of_service_path version: + "termsOfService/#{version}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb new file mode 100644 index 000000000000..45348f1253e5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support `TermsOfService` API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new + # + module TermsOfServiceService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb new file mode 100644 index 000000000000..33fa3e6a098f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb @@ -0,0 +1,614 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/termsofservice_pb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceService + module Rest + ## + # REST client for the TermsOfServiceService service. + # + # Service to support `TermsOfService` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :terms_of_service_service_stub + + ## + # Configure the TermsOfServiceService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TermsOfServiceService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TermsOfServiceService 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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 + @terms_of_service_service_stub.universe_domain + end + + ## + # Create a new TermsOfServiceService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TermsOfServiceService 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 + + @terms_of_service_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @terms_of_service_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 + @terms_of_service_service_stub.logger + end + + # Service calls + + ## + # Retrieves the `TermsOfService` associated with the provided version. + # + # @overload get_terms_of_service(request, options = nil) + # Pass arguments to `get_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_terms_of_service(name: nil) + # Pass arguments to `get_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new + # + # # Call the get_terms_of_service method. + # result = client.get_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. + # p result + # + def get_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_terms_of_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.get_terms_of_service request, 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 the latest version of the `TermsOfService` for a given `kind` and + # `region_code`. + # + # @overload retrieve_latest_terms_of_service(request, options = nil) + # Pass arguments to `retrieve_latest_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload retrieve_latest_terms_of_service(region_code: nil, kind: nil) + # Pass arguments to `retrieve_latest_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param region_code [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # @param kind [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] + # Required. The Kind this terms of service version applies to. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new + # + # # Call the retrieve_latest_terms_of_service method. + # result = client.retrieve_latest_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. + # p result + # + def retrieve_latest_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.retrieve_latest_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.retrieve_latest_terms_of_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.retrieve_latest_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.retrieve_latest_terms_of_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Accepts a `TermsOfService`. Executing this method requires admin access. + # + # @overload accept_terms_of_service(request, options = nil) + # Pass arguments to `accept_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload accept_terms_of_service(name: nil, account: nil, region_code: nil) + # Pass arguments to `accept_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @param account [::String] + # Required. The account for which to accept the ToS. + # @param region_code [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # @yield [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/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new + # + # # Call the accept_terms_of_service method. + # result = client.accept_terms_of_service request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def accept_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.accept_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.accept_terms_of_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.accept_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.accept_terms_of_service request, 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 TermsOfServiceService REST API. + # + # This class represents the configuration for TermsOfServiceService 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_terms_of_service to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 TermsOfServiceService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_terms_of_service + ## + # RPC-specific configuration for `retrieve_latest_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_latest_terms_of_service + ## + # RPC-specific configuration for `accept_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :accept_terms_of_service + + # @private + def initialize parent_rpcs = nil + get_terms_of_service_config = parent_rpcs.get_terms_of_service if parent_rpcs.respond_to? :get_terms_of_service + @get_terms_of_service = ::Gapic::Config::Method.new get_terms_of_service_config + retrieve_latest_terms_of_service_config = parent_rpcs.retrieve_latest_terms_of_service if parent_rpcs.respond_to? :retrieve_latest_terms_of_service + @retrieve_latest_terms_of_service = ::Gapic::Config::Method.new retrieve_latest_terms_of_service_config + accept_terms_of_service_config = parent_rpcs.accept_terms_of_service if parent_rpcs.respond_to? :accept_terms_of_service + @accept_terms_of_service = ::Gapic::Config::Method.new accept_terms_of_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb new file mode 100644 index 000000000000..e44a62b60c86 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceService + module Rest + ## + # REST service stub for the TermsOfServiceService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # A result object deserialized from the server's reply + def get_terms_of_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_terms_of_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_terms_of_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the retrieve_latest_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # A result object deserialized from the server's reply + def retrieve_latest_terms_of_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_latest_terms_of_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "retrieve_latest_terms_of_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the accept_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 accept_terms_of_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_accept_terms_of_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "accept_terms_of_service", + 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 get_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_terms_of_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^termsOfService/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the retrieve_latest_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_retrieve_latest_terms_of_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/termsOfService:retrieveLatest", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the accept_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_accept_terms_of_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}:accept", + matches: [ + ["name", %r{^termsOfService/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb new file mode 100644 index 000000000000..e47173662cd5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/termsofservice.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/shopping/merchant/accounts/v1beta/termsofservicekind_pb' + + +descriptor_data = "\n=google/shopping/merchant/accounts/v1beta/termsofservice.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x41google/shopping/merchant/accounts/v1beta/termsofservicekind.proto\"\xb2\x02\n\x0eTermsOfService\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x08\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12J\n\x04kind\x18\x03 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1beta.TermsOfServiceKind\x12\x15\n\x08\x66ile_uri\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08\x65xternal\x18\x05 \x01(\x08:H\xea\x41\x45\n)merchantapi.googleapis.com/TermsOfService\x12\x18termsOfService/{version}B\x0b\n\t_file_uri\"[\n\x18GetTermsOfServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\"\x90\x01\n#RetrieveLatestTermsOfServiceRequest\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12O\n\x04kind\x18\x02 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1beta.TermsOfServiceKindB\x03\xe0\x41\x02\"\xb5\x01\n\x1b\x41\x63\x63\x65ptTermsOfServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12;\n\x07\x61\x63\x63ount\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x18\n\x0bregion_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x32\xc7\x05\n\x15TermsOfServiceService\x12\xca\x01\n\x11GetTermsOfService\x12\x42.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceRequest\x1a\x38.google.shopping.merchant.accounts.v1beta.TermsOfService\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/accounts/v1beta/{name=termsOfService/*}\x12\xdf\x01\n\x1cRetrieveLatestTermsOfService\x12M.google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest\x1a\x38.google.shopping.merchant.accounts.v1beta.TermsOfService\"6\x82\xd3\xe4\x93\x02\x30\x12./accounts/v1beta/termsOfService:retrieveLatest\x12\xb5\x01\n\x14\x41\x63\x63\x65ptTermsOfService\x12\x45.google.shopping.merchant.accounts.v1beta.AcceptTermsOfServiceRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{name=termsOfService/*}:accept\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x95\x01\n,com.google.shopping.merchant.accounts.v1betaB\x13TermsOfServiceProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + TermsOfService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.TermsOfService").msgclass + GetTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetTermsOfServiceRequest").msgclass + RetrieveLatestTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest").msgclass + AcceptTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AcceptTermsOfServiceRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb new file mode 100644 index 000000000000..f300591e6416 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb @@ -0,0 +1,52 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/termsofservice.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/termsofservice_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceService + # Service to support `TermsOfService` API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.TermsOfServiceService' + + # Retrieves the `TermsOfService` associated with the provided version. + rpc :GetTermsOfService, ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService + # Retrieves the latest version of the `TermsOfService` for a given `kind` and + # `region_code`. + rpc :RetrieveLatestTermsOfService, ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService + # Accepts a `TermsOfService`. Executing this method requires admin access. + rpc :AcceptTermsOfService, ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb new file mode 100644 index 000000000000..1be87bcf62c8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.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/shopping/merchant/accounts/v1beta/termsofservicekind_pb' +require 'google/type/date_pb' + + +descriptor_data = "\nKgoogle/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x41google/shopping/merchant/accounts/v1beta/termsofservicekind.proto\x1a\x16google/type/date.proto\"\x8f\x04\n\x1cTermsOfServiceAgreementState\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12[\n\x15terms_of_service_kind\x18\x03 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1beta.TermsOfServiceKind\x12I\n\x08\x61\x63\x63\x65pted\x18\x04 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.AcceptedH\x00\x88\x01\x01\x12I\n\x08required\x18\x05 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.RequiredH\x01\x88\x01\x01:\xb9\x01\xea\x41\xb5\x01\n7merchantapi.googleapis.com/TermsOfServiceAgreementState\x12=accounts/{account}/termsOfServiceAgreementStates/{identifier}*\x1dtermsOfServiceAgreementStates2\x1ctermsOfServiceAgreementStateB\x0b\n\t_acceptedB\x0b\n\t_required\"\xcf\x01\n\x08\x41\x63\x63\x65pted\x12H\n\x10terms_of_service\x18\x01 \x01(\tB.\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12<\n\x0b\x61\x63\x63\x65pted_by\x18\x02 \x01(\tB\'\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12+\n\x0bvalid_until\x18\x03 \x01(\x0b\x32\x11.google.type.DateH\x00\x88\x01\x01\x42\x0e\n\x0c_valid_until\"j\n\x08Required\x12H\n\x10terms_of_service\x18\x01 \x01(\tB.\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x14\n\x0ctos_file_uri\x18\x02 \x01(\t\"w\n&GetTermsOfServiceAgreementStateRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7merchantapi.googleapis.com/TermsOfServiceAgreementState\"\x8c\x01\n9RetrieveForApplicationTermsOfServiceAgreementStateRequest\x12O\n\x06parent\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\x12\x37merchantapi.googleapis.com/TermsOfServiceAgreementState2\xcf\x05\n#TermsOfServiceAgreementStateService\x12\x8e\x02\n\x1fGetTermsOfServiceAgreementState\x12P.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceAgreementStateRequest\x1a\x46.google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementState\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/accounts/v1beta/{name=accounts/*/termsOfServiceAgreementStates/*}\x12\xcd\x02\n2RetrieveForApplicationTermsOfServiceAgreementState\x12\x63.google.shopping.merchant.accounts.v1beta.RetrieveForApplicationTermsOfServiceAgreementStateRequest\x1a\x46.google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementState\"j\xda\x41\x06parent\x82\xd3\xe4\x93\x02[\x12Y/accounts/v1beta/{parent=accounts/*}/termsOfServiceAgreementStates:retrieveForApplication\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xa3\x01\n,com.google.shopping.merchant.accounts.v1betaB!TermsOfServiceAgreementStateProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + TermsOfServiceAgreementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementState").msgclass + Accepted = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Accepted").msgclass + Required = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Required").msgclass + GetTermsOfServiceAgreementStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetTermsOfServiceAgreementStateRequest").msgclass + RetrieveForApplicationTermsOfServiceAgreementStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.RetrieveForApplicationTermsOfServiceAgreementStateRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb new file mode 100644 index 000000000000..edbccf383c55 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb @@ -0,0 +1,49 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceAgreementStateService + # Service to support `TermsOfServiceAgreementState` API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService' + + # Returns the state of a terms of service agreement. + rpc :GetTermsOfServiceAgreementState, ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState + # Retrieves the state of the agreement for the application terms of service. + rpc :RetrieveForApplicationTermsOfServiceAgreementState, ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb new file mode 100644 index 000000000000..35ab44903852 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/termsofservicekind.proto + +require 'google/protobuf' + + +descriptor_data = "\nAgoogle/shopping/merchant/accounts/v1beta/termsofservicekind.proto\x12(google.shopping.merchant.accounts.v1beta*P\n\x12TermsOfServiceKind\x12%\n!TERMS_OF_SERVICE_KIND_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_CENTER\x10\x01\x42\x99\x01\n,com.google.shopping.merchant.accounts.v1betaB\x17TermsOfServiceKindProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + TermsOfServiceKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.TermsOfServiceKind").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb new file mode 100644 index 000000000000..a4ae3c613309 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/user.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/accounts/v1beta/accessright_pb' + + +descriptor_data = "\n3google/shopping/merchant/accounts/v1beta/user.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a:google/shopping/merchant/accounts/v1beta/accessright.proto\"\xc6\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x34.google.shopping.merchant.accounts.v1beta.User.StateB\x03\xe0\x41\x03\x12Q\n\raccess_rights\x18\x04 \x03(\x0e\x32\x35.google.shopping.merchant.accounts.v1beta.AccessRightB\x03\xe0\x41\x01\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08VERIFIED\x10\x02:S\xea\x41P\n\x1fmerchantapi.googleapis.com/User\x12 accounts/{account}/users/{email}*\x05users2\x04user\"G\n\x0eGetUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\xa8\x01\n\x11\x43reateUserRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x14\n\x07user_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x04user\x18\x03 \x01(\x0b\x32..google.shopping.merchant.accounts.v1beta.UserB\x03\xe0\x41\x02\"J\n\x11\x44\x65leteUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\x8c\x01\n\x11UpdateUserRequest\x12\x41\n\x04user\x18\x01 \x01(\x0b\x32..google.shopping.merchant.accounts.v1beta.UserB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x7f\n\x10ListUsersRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"k\n\x11ListUsersResponse\x12=\n\x05users\x18\x01 \x03(\x0b\x32..google.shopping.merchant.accounts.v1beta.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xfc\x07\n\x0bUserService\x12\xae\x01\n\x07GetUser\x12\x38.google.shopping.merchant.accounts.v1beta.GetUserRequest\x1a..google.shopping.merchant.accounts.v1beta.User\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/accounts/v1beta/{name=accounts/*/users/*}\x12\xc1\x01\n\nCreateUser\x12;.google.shopping.merchant.accounts.v1beta.CreateUserRequest\x1a..google.shopping.merchant.accounts.v1beta.User\"F\xda\x41\x0bparent,user\x82\xd3\xe4\x93\x02\x32\"*/accounts/v1beta/{parent=accounts/*}/users:\x04user\x12\x9c\x01\n\nDeleteUser\x12;.google.shopping.merchant.accounts.v1beta.DeleteUserRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/accounts/v1beta/{name=accounts/*/users/*}\x12\xcb\x01\n\nUpdateUser\x12;.google.shopping.merchant.accounts.v1beta.UpdateUserRequest\x1a..google.shopping.merchant.accounts.v1beta.User\"P\xda\x41\x10user,update_mask\x82\xd3\xe4\x93\x02\x37\x32//accounts/v1beta/{user.name=accounts/*/users/*}:\x04user\x12\xc1\x01\n\tListUsers\x12:.google.shopping.merchant.accounts.v1beta.ListUsersRequest\x1a;.google.shopping.merchant.accounts.v1beta.ListUsersResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/accounts/v1beta/{parent=accounts/*}/users\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8b\x01\n,com.google.shopping.merchant.accounts.v1betaB\tUserProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + User = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.User").msgclass + User::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.User.State").enummodule + GetUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetUserRequest").msgclass + CreateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateUserRequest").msgclass + DeleteUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteUserRequest").msgclass + UpdateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateUserRequest").msgclass + ListUsersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListUsersRequest").msgclass + ListUsersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListUsersResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb new file mode 100644 index 000000000000..64065f29308c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/user_service/credentials" +require "google/shopping/merchant/accounts/v1beta/user_service/paths" +require "google/shopping/merchant/accounts/v1beta/user_service/client" +require "google/shopping/merchant/accounts/v1beta/user_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support user API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/user_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/user_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new + # + module UserService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "user_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/user_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb new file mode 100644 index 000000000000..d409e306db68 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb @@ -0,0 +1,889 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/user_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module UserService + ## + # Client for the UserService service. + # + # Service to support user API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :user_service_stub + + ## + # Configure the UserService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all UserService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the UserService 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::Shopping::Merchant::Accounts::V1beta::UserService::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 + @user_service_stub.universe_domain + end + + ## + # Create a new UserService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the UserService 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/shopping/merchant/accounts/v1beta/user_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 + + @user_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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 + ) + + @user_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 + @user_service_stub.logger + end + + # Service calls + + ## + # Retrieves a Merchant Center account user. + # + # @overload get_user(request, options = nil) + # Pass arguments to `get_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_user(name: nil) + # Pass arguments to `get_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the user to retrieve. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to retrieve the user corresponding to the caller by + # using `me` rather than an email address as in + # `accounts/{account}/users/me`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new + # + # # Call the get_user method. + # result = client.get_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + # p result + # + def get_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :get_user, request, 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 Merchant Center account user. Executing this method requires + # admin access. + # + # @overload create_user(request, options = nil) + # Pass arguments to `create_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_user(parent: nil, user_id: nil, user: nil) + # Pass arguments to `create_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the account for which a user will be + # created. Format: `accounts/{account}` + # @param user_id [::String] + # Required. The email address of the user (for example, + # `john.doe@gmail.com`). + # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] + # Required. The user to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new + # + # # Call the create_user method. + # result = client.create_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + # p result + # + def create_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :create_user, request, 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 Merchant Center account user. Executing this method requires + # admin access. + # + # @overload delete_user(request, options = nil) + # Pass arguments to `delete_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_user(name: nil) + # Pass arguments to `delete_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the user to delete. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to delete the user corresponding to the caller by using + # `me` rather than an email address as in `accounts/{account}/users/me`. + # + # @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/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new + # + # # Call the delete_user method. + # result = client.delete_user request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :delete_user, request, 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 Merchant Center account user. Executing this method requires + # admin access. + # + # @overload update_user(request, options = nil) + # Pass arguments to `update_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_user(user: nil, update_mask: nil) + # Pass arguments to `update_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] + # Required. The new version of the user. + # + # Use `me` to refer to your own email address, for example + # `accounts/{account}/users/me`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new + # + # # Call the update_user method. + # result = client.update_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + # p result + # + def update_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest + + # Converts hash and nil to 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_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.user&.name + header_params["user.name"] = request.user.name + end + + request_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_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :update_user, request, 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 users of a Merchant Center account. + # + # @overload list_users(request, options = nil) + # Pass arguments to `list_users` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_users(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_users` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of users. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of users to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @param page_token [::String] + # Optional. A page token, received from a previous `ListUsers` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListUsers` must match + # the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new + # + # # Call the list_users method. + # result = client.list_users request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::User. + # p item + # end + # + def list_users request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_users.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_users.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_users.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :list_users, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @user_service_stub, :list_users, 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 UserService API. + # + # This class represents the configuration for UserService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_user to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_user.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_user.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::UserService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 UserService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_user` + # @return [::Gapic::Config::Method] + # + attr_reader :get_user + ## + # RPC-specific configuration for `create_user` + # @return [::Gapic::Config::Method] + # + attr_reader :create_user + ## + # RPC-specific configuration for `delete_user` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_user + ## + # RPC-specific configuration for `update_user` + # @return [::Gapic::Config::Method] + # + attr_reader :update_user + ## + # RPC-specific configuration for `list_users` + # @return [::Gapic::Config::Method] + # + attr_reader :list_users + + # @private + def initialize parent_rpcs = nil + get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user + @get_user = ::Gapic::Config::Method.new get_user_config + create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user + @create_user = ::Gapic::Config::Method.new create_user_config + delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user + @delete_user = ::Gapic::Config::Method.new delete_user_config + update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user + @update_user = ::Gapic::Config::Method.new update_user_config + list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users + @list_users = ::Gapic::Config::Method.new list_users_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb new file mode 100644 index 000000000000..b280d41b5a54 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_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 Shopping + module Merchant + module Accounts + module V1beta + module UserService + # Credentials for the UserService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb new file mode 100644 index 000000000000..e0b82b1f8295 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_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 Shopping + module Merchant + module Accounts + module V1beta + module UserService + # Path helper methods for the UserService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified User resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/users/{email}` + # + # @param account [String] + # @param email [String] + # + # @return [::String] + def user_path account:, email: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/users/#{email}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb new file mode 100644 index 000000000000..485719a9a0b7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/user_service/credentials" +require "google/shopping/merchant/accounts/v1beta/user_service/paths" +require "google/shopping/merchant/accounts/v1beta/user_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support user API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/user_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new + # + module UserService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/user_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb new file mode 100644 index 000000000000..1985fa37df55 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb @@ -0,0 +1,811 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/accounts/v1beta/user_pb" +require "google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module UserService + module Rest + ## + # REST client for the UserService service. + # + # Service to support user API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :user_service_stub + + ## + # Configure the UserService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all UserService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the UserService 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::Shopping::Merchant::Accounts::V1beta::UserService::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 + @user_service_stub.universe_domain + end + + ## + # Create a new UserService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the UserService 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 + + @user_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @user_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 + @user_service_stub.logger + end + + # Service calls + + ## + # Retrieves a Merchant Center account user. + # + # @overload get_user(request, options = nil) + # Pass arguments to `get_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_user(name: nil) + # Pass arguments to `get_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the user to retrieve. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to retrieve the user corresponding to the caller by + # using `me` rather than an email address as in + # `accounts/{account}/users/me`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new + # + # # Call the get_user method. + # result = client.get_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + # p result + # + def get_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.get_user request, 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 Merchant Center account user. Executing this method requires + # admin access. + # + # @overload create_user(request, options = nil) + # Pass arguments to `create_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_user(parent: nil, user_id: nil, user: nil) + # Pass arguments to `create_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the account for which a user will be + # created. Format: `accounts/{account}` + # @param user_id [::String] + # Required. The email address of the user (for example, + # `john.doe@gmail.com`). + # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] + # Required. The user to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new + # + # # Call the create_user method. + # result = client.create_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + # p result + # + def create_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.create_user request, 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 Merchant Center account user. Executing this method requires + # admin access. + # + # @overload delete_user(request, options = nil) + # Pass arguments to `delete_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_user(name: nil) + # Pass arguments to `delete_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the user to delete. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to delete the user corresponding to the caller by using + # `me` rather than an email address as in `accounts/{account}/users/me`. + # @yield [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/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new + # + # # Call the delete_user method. + # result = client.delete_user request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.delete_user request, 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 Merchant Center account user. Executing this method requires + # admin access. + # + # @overload update_user(request, options = nil) + # Pass arguments to `update_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_user(user: nil, update_mask: nil) + # Pass arguments to `update_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] + # Required. The new version of the user. + # + # Use `me` to refer to your own email address, for example + # `accounts/{account}/users/me`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new + # + # # Call the update_user method. + # result = client.update_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + # p result + # + def update_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest + + # Converts hash and nil to an 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_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.update_user request, 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 users of a Merchant Center account. + # + # @overload list_users(request, options = nil) + # Pass arguments to `list_users` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_users(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_users` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of users. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of users to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @param page_token [::String] + # Optional. A page token, received from a previous `ListUsers` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListUsers` must match + # the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new + # + # # Call the list_users method. + # result = client.list_users request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::User. + # p item + # end + # + def list_users request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_users.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_users.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_users.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.list_users request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @user_service_stub, :list_users, "users", request, result, 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 UserService REST API. + # + # This class represents the configuration for UserService 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::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_user to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_user.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_user.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 UserService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_user` + # @return [::Gapic::Config::Method] + # + attr_reader :get_user + ## + # RPC-specific configuration for `create_user` + # @return [::Gapic::Config::Method] + # + attr_reader :create_user + ## + # RPC-specific configuration for `delete_user` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_user + ## + # RPC-specific configuration for `update_user` + # @return [::Gapic::Config::Method] + # + attr_reader :update_user + ## + # RPC-specific configuration for `list_users` + # @return [::Gapic::Config::Method] + # + attr_reader :list_users + + # @private + def initialize parent_rpcs = nil + get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user + @get_user = ::Gapic::Config::Method.new get_user_config + create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user + @create_user = ::Gapic::Config::Method.new create_user_config + delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user + @delete_user = ::Gapic::Config::Method.new delete_user_config + update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user + @update_user = ::Gapic::Config::Method.new update_user_config + list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users + @list_users = ::Gapic::Config::Method.new list_users_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb new file mode 100644 index 000000000000..c297a2b417f7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb @@ -0,0 +1,390 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/user_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module UserService + module Rest + ## + # REST service stub for the UserService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # A result object deserialized from the server's reply + def get_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_user_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_user", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::User.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # A result object deserialized from the server's reply + def create_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_user_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_user", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::User.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_user_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_user", + 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 update_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # A result object deserialized from the server's reply + def update_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_user_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_user", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::User.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_users REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse] + # A result object deserialized from the server's reply + def list_users request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_users_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_users", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{parent}/users", + body: "user", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest] + # 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_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{user.name}", + body: "user", + matches: [ + ["user.name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_users REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_users_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/users", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb new file mode 100644 index 000000000000..54dabf37a72e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/user.proto for package 'google.shopping.merchant.accounts.v1beta' +# 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/shopping/merchant/accounts/v1beta/user_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module UserService + # Service to support user API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.UserService' + + # Retrieves a Merchant Center account user. + rpc :GetUser, ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, ::Google::Shopping::Merchant::Accounts::V1beta::User + # Creates a Merchant Center account user. Executing this method requires + # admin access. + rpc :CreateUser, ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Google::Shopping::Merchant::Accounts::V1beta::User + # Deletes a Merchant Center account user. Executing this method requires + # admin access. + rpc :DeleteUser, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, ::Google::Protobuf::Empty + # Updates a Merchant Center account user. Executing this method requires + # admin access. + rpc :UpdateUser, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, ::Google::Shopping::Merchant::Accounts::V1beta::User + # Lists all users of a Merchant Center account. + rpc :ListUsers, ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb new file mode 100644 index 000000000000..9d433caf1711 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/verificationmailsettings.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\nGgoogle/shopping/merchant/accounts/v1beta/verificationmailsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1fgoogle/api/field_behavior.proto\"\x94\x02\n\x18VerificationMailSettings\x12|\n\x16verification_mail_mode\x18\x01 \x01(\x0e\x32W.google.shopping.merchant.accounts.v1beta.VerificationMailSettings.VerificationMailModeB\x03\xe0\x41\x01\"z\n\x14VerificationMailMode\x12&\n\"VERIFICATION_MAIL_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SEND_VERIFICATION_MAIL\x10\x01\x12\x1e\n\x1aSUPPRESS_VERIFICATION_MAIL\x10\x02\x42\xa4\x02\n,com.google.shopping.merchant.accounts.v1betaB\x1dVerificationMailSettingsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspb\xaa\x02(Google.Shopping.Merchant.Accounts.V1Beta\xca\x02(Google\\Shopping\\Merchant\\Accounts\\V1beta\xea\x02,Google::Shopping::Merchant::Accounts::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + VerificationMailSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.VerificationMailSettings").msgclass + VerificationMailSettings::VerificationMailMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.VerificationMailSettings.VerificationMailMode").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb new file mode 100644 index 000000000000..b50ef86acc14 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/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 Shopping + module Merchant + module Accounts + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1BETA 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-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb new file mode 100644 index 000000000000..d51673a9fd9a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.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 Shopping + module Merchant + module Accounts + module V1beta + # The access right. + module AccessRight + # Default value. This value is unused. + ACCESS_RIGHT_UNSPECIFIED = 0 + + # Standard access rights. + STANDARD = 1 + + # Admin access rights. + ADMIN = 2 + + # Users with this right have access to performance and insights. + PERFORMANCE_REPORTING = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb new file mode 100644 index 000000000000..fb5a0c3c1f9b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb @@ -0,0 +1,101 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # The tax settings of a merchant account. All methods require the admin role. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the tax setting. + # Format: + # "\\{account_tax.name=accounts/\\{account}}" + # @!attribute [r] account + # @return [::Integer] + # Output only. The ID of the account to which these account tax settings + # belong. + # @!attribute [rw] tax_rules + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::TaxRule>] + # Tax rules. "Define the tax rules in each region. + # No tax will be presented if a region has no rule." + class AccountTax + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get tax settings + # @!attribute [rw] name + # @return [::String] + # Required. The name from which tax settings will be retrieved + class GetAccountTaxRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update the tax settings + # @!attribute [rw] account_tax + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # Required. The tax setting that will be updated + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated + class UpdateAccountTaxRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list all sub-account tax settings only for the requesting merchant + # This method can only be called on a multi-client account, otherwise it'll + # return an error. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of account tax. + # Format: accounts/\\{account} + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of tax settings to return in the response, used for + # paging. + # @!attribute [rw] page_token + # @return [::String] + # The token returned by the previous request. + class ListAccountTaxRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to account tax list request + # This method can only be called on a multi-client account, otherwise it'll + # return an error. + # @!attribute [rw] account_taxes + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] + # Page of accounttax settings + # @!attribute [rw] next_page_token + # @return [::String] + # The token for the retrieval of the next page of account tax settings. + class ListAccountTaxResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb new file mode 100644 index 000000000000..5cce1309c12e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # An + # [`AccountIssue`](https://support.google.com/merchants/answer/12153802?sjid=17798438912526418908-EU#account). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the account issue. + # Format: `accounts/{account}/issues/{id}` + # @!attribute [rw] title + # @return [::String] + # The localized title of the issue. + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::Severity] + # The overall severity of the issue. + # @!attribute [rw] impacted_destinations + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::ImpactedDestination>] + # The impact this issue has on various destinations. + # @!attribute [rw] detail + # @return [::String] + # Further localized details about the issue. + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to Merchant Center Help Center providing further information about the + # issue and how to fix it. + class AccountIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The impact of the issue on a destination. + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # The impacted reporting context. + # @!attribute [rw] impacts + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::ImpactedDestination::Impact>] + # The (negative) impact for various regions on the given destination. + class ImpactedDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The impact of the issue on a region. + # @!attribute [rw] region_code + # @return [::String] + # The [CLDR region code](https://cldr.unicode.org/) where this issue + # applies. + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::Severity] + # The severity of the issue on the destination and region. + class Impact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # All possible issue severities. + module Severity + # The severity is unknown. + SEVERITY_UNSPECIFIED = 0 + + # The issue causes offers to not serve. + CRITICAL = 1 + + # The issue might affect offers (in the future) or might be an + # indicator of issues with offers. + ERROR = 2 + + # The issue is a suggestion for improvement. + SUGGESTION = 3 + end + end + + # Request message for the `ListAccountIssues` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of issues. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of issues to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListAccountIssues` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountIssues` must + # match the call that provided the page token. + # @!attribute [rw] language_code + # @return [::String] + # Optional. The issues in the response will have human-readable fields in the + # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), + # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be + # used. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in human-readable fields. For example 'America/Los_Angeles'. + # If not set, 'America/Los_Angeles' will be used. + class ListAccountIssuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListAccountIssues` method. + # @!attribute [rw] account_issues + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] + # The issues from the specified account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListAccountIssuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb new file mode 100644 index 000000000000..573b329cfd2a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb @@ -0,0 +1,231 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # An account. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the account. + # Format: `accounts/{account}` + # @!attribute [r] account_id + # @return [::Integer] + # Output only. The ID of the account. + # @!attribute [rw] account_name + # @return [::String] + # Required. A human-readable name of the account. See + # [store name](https://support.google.com/merchants/answer/160556) and + # [business name](https://support.google.com/merchants/answer/12159159) for + # more information. + # @!attribute [rw] adult_content + # @return [::Boolean] + # Whether this account contains adult content. + # @!attribute [r] test_account + # @return [::Boolean] + # Output only. Whether this is a test account. + # @!attribute [rw] time_zone + # @return [::Google::Type::TimeZone] + # Required. The time zone of the account. + # + # On writes, `time_zone` sets both the `reporting_time_zone` and the + # `display_time_zone`. + # + # For reads, `time_zone` always returns the `display_time_zone`. If + # `display_time_zone` doesn't exist for your account, `time_zone` is empty. + # @!attribute [rw] language_code + # @return [::String] + # Required. The account's [BCP-47 language + # code](https://tools.ietf.org/html/bcp47), such as `en-US` or `sr-Latn`. + class Account + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetAccount` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the account to retrieve. + # Format: `accounts/{account}` + class GetAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateAndConfigureAccount` method. + # @!attribute [rw] account + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # Required. The account to be created. + # @!attribute [rw] users + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest>] + # Optional. Users to be added to the account. + # @!attribute [rw] accept_terms_of_service + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService] + # Optional. The Terms of Service (ToS) to be accepted immediately upon + # account creation. + # @!attribute [rw] service + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService>] + # Required. An account service between the account to be created and the + # provider account is initialized as part of the creation. At least one such + # service needs to be provided. Currently exactly one of these needs to be + # `account_aggregation`, which means you can only create sub accounts, not + # standalone account through this method. Additional `account_management` or + # `product_management` services may be provided. + class CreateAndConfigureAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reference to a Terms of Service resource. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the terms of service version in the format + # `termsOfService/{version}`. To retrieve the latest version, use the + # [termsOfService.retrieveLatest](/merchant/api/reference/rest/accounts_v1beta/termsOfService/retrieveLatest) + # method. + # @!attribute [rw] region_code + # @return [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). + # This is either a country when the ToS applies specifically to that + # country or `001` when it applies globally. + class AcceptTermsOfService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Additional instructions to add account services during creation of the + # account. + # @!attribute [rw] account_aggregation + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountAggregation] + # The provider is an + # [aggregator](https://support.google.com/merchants/answer/188487) for + # the account. Payload for service type Account Aggregation. + # @!attribute [rw] provider + # @return [::String] + # Optional. The provider of the service. + # Format: `accounts/{account}` + class AddAccountService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for the `DeleteAccount` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the account to delete. + # Format: `accounts/{account}` + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to `true`, the account is deleted even if it provides + # services to other accounts or has processed offers. + class DeleteAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateAccount` method. + # @!attribute [rw] account + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # Required. The new version of the account. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListAccounts` method. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccounts` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Returns only accounts that match the + # [filter](/merchant/api/guides/accounts/filter). + # For more details, see the + # [filter syntax reference](/merchant/api/guides/accounts/filter-syntax). + class ListAccountsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListAccounts` method. + # @!attribute [rw] accounts + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # The accounts matching the `ListAccountsRequest`. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListAccountsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListSubAccounts` method. + # @!attribute [rw] provider + # @return [::String] + # Required. The parent account. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccounts` must match + # the call that provided the page token. + class ListSubAccountsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListSubAccounts` method. + # @!attribute [rw] accounts + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # The accounts for which the given parent account is an aggregator. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListSubAccountsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb new file mode 100644 index 000000000000..19cff87b2479 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.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 Shopping + module Merchant + module Accounts + module V1beta + # `AccountAggregation` payload. + class AccountAggregation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb new file mode 100644 index 000000000000..e321368804c4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.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 Shopping + module Merchant + module Accounts + module V1beta + # Collection of information related to the + # [autofeed](https://support.google.com/merchants/answer/7538732) settings. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the autofeed settings. + # Format: `accounts/{account}/autofeedSettings`. + # @!attribute [rw] enable_products + # @return [::Boolean] + # Required. Enables or disables product crawling through the autofeed for the + # given account. Autofeed accounts must meet [certain + # conditions](https://support.google.com/merchants/answer/7538732#Configure_automated_feeds_Standard_Experience), + # which can be checked through the `eligible` field. + # The account must **not** be a marketplace. + # When the autofeed is enabled for the first time, the products usually + # appear instantly. When re-enabling, it might take up to 24 hours for + # products to appear. + # @!attribute [r] eligible + # @return [::Boolean] + # Output only. Determines whether merchant is eligible for being enrolled + # into an autofeed. + class AutofeedSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetAutofeedSettings` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the autofeed settings. + # Format: `accounts/{account}/autofeedSettings` + class GetAutofeedSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateAutofeedSettings` method. + # @!attribute [rw] autofeed_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # Required. The new version of the autofeed setting. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateAutofeedSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb new file mode 100644 index 000000000000..08941d3f76aa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb @@ -0,0 +1,235 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Collection of information related to the [automatic + # improvements](https://developers.google.com/shopping-content/guides/automatic-improvements) + # of an account. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the automatic improvements. + # Format: `accounts/{account}/automaticImprovements`. + # @!attribute [rw] item_updates + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticItemUpdates] + # Turning on [item + # updates](https://support.google.com/merchants/answer/3246284) allows + # Google to automatically update items for you. When item updates are on, + # Google uses the structured data markup on the website and advanced data + # extractors to update the price and availability of the items. When the item + # updates are off, items with mismatched data aren't shown. + # This field is only updated (cleared) if provided in the update mask. + # @!attribute [rw] image_improvements + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImageImprovements] + # This improvement will attempt to automatically correct submitted images if + # they don't meet the [image + # requirements](https://support.google.com/merchants/answer/6324350), for + # example, removing overlays. If successful, the image will be replaced and + # approved. This improvement is only applied to images of disapproved offers. + # For more information see: [Automatic image + # improvements](https://support.google.com/merchants/answer/9242973) + # This field is only updated (cleared) if provided in the update mask. + # @!attribute [rw] shipping_improvements + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticShippingImprovements] + # Not available for MCAs + # [accounts](https://support.google.com/merchants/answer/188487). By turning + # on [automatic shipping + # improvements](https://support.google.com/merchants/answer/10027038), + # you are allowing Google to improve the accuracy of your delivery times + # shown to shoppers using Google. More accurate delivery times, especially + # when faster, typically lead to better conversion rates. Google will improve + # your estimated delivery times based on various factors: + # * Delivery address of an order + # * Current handling time and shipping time settings + # * Estimated weekdays or business days + # * Parcel tracking data + # This field is only updated (cleared) if provided in the update mask. + class AutomaticImprovements + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Turning on [item + # updates](https://support.google.com/merchants/answer/3246284) allows + # Google to automatically update items for you. When item updates are on, + # Google uses the structured data markup on the website and advanced data + # extractors to update the price and availability of the items. When the item + # updates are off, items with mismatched data aren't shown. + # @!attribute [rw] account_item_updates_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticItemUpdates::ItemUpdatesAccountLevelSettings] + # Optional. Determines which attributes of the items should be automatically + # updated. If this field is not present and provided in the update mask, then + # the settings will be deleted. If there are no settings for subaccount, they + # are inherited from aggregator. + # @!attribute [r] effective_allow_price_updates + # @return [::Boolean] + # Output only. The effective value of allow_price_updates. + # If account_item_updates_settings is present, then this value is the same. + # Otherwise, it represents the inherited value of the parent account. + # The default value is true if no settings are present. + # Read-only. + # @!attribute [r] effective_allow_availability_updates + # @return [::Boolean] + # Output only. The effective value of allow_availability_updates. + # If account_item_updates_settings is present, then this value is the same. + # Otherwise, it represents the inherited value of the parent account. + # The default value is true if no settings are present. + # Read-only. + # @!attribute [r] effective_allow_strict_availability_updates + # @return [::Boolean] + # Output only. The effective value of + # allow_strict_availability_updates. + # If account_item_updates_settings is present, then this value is the same. + # Otherwise, it represents the inherited value of the parent account. + # The default value is true if no settings are present. + # Read-only. + # @!attribute [r] effective_allow_condition_updates + # @return [::Boolean] + # Output only. The effective value of allow_condition_updates. + # If account_item_updates_settings is present, then this value is the same. + # Otherwise, it represents the inherited value of the parent account. + # The default value is true if no settings are present. + # Read-only. + class AutomaticItemUpdates + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Settings for the Automatic Item Updates. + # @!attribute [rw] allow_price_updates + # @return [::Boolean] + # If price updates are enabled, Google always updates the active price with + # the crawled information. + # @!attribute [rw] allow_availability_updates + # @return [::Boolean] + # If availability updates are enabled, any previous availability values + # get overwritten if Google finds an out-of-stock annotation on the offer's + # page. + # If additionally `allow_strict_availability_updates` field is set to + # true, values get overwritten if Google finds an in-stock annotation on + # the offer’s page. + # @!attribute [rw] allow_strict_availability_updates + # @return [::Boolean] + # If `allow_availability_updates` is enabled, items are automatically + # updated in all your Shopping target countries. By default, availability + # updates will only be applied to items that are 'out of stock' on your + # website but 'in stock' on Shopping. Set this to true to also update items + # that are 'in stock' on your website, but 'out of stock' on Google + # Shopping. In order for this field to have an effect, you must also set + # `allow_availability_updates`. + # @!attribute [rw] allow_condition_updates + # @return [::Boolean] + # If condition updates are enabled, Google always updates item condition + # with the condition detected from the details of your product. + class ItemUpdatesAccountLevelSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This improvement will attempt to automatically correct submitted images if + # they don't meet the [image + # requirements](https://support.google.com/merchants/answer/6324350), for + # example, removing overlays. If successful, the image will be replaced and + # approved. This improvement is only applied to images of disapproved offers. + # For more information see: [Automatic image + # improvements](https://support.google.com/merchants/answer/9242973) + # @!attribute [rw] account_image_improvements_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImageImprovements::ImageImprovementsAccountLevelSettings] + # Optional. Determines how the images should be automatically updated. + # If this field is not present and provided in the update mask, then the + # settings will be deleted. If there are no settings for subaccount, they are + # inherited from aggregator. + # @!attribute [r] effective_allow_automatic_image_improvements + # @return [::Boolean] + # Output only. The effective value of allow_automatic_image_improvements. + # If account_image_improvements_settings is present, then this value is the + # same. Otherwise, it represents the inherited value of the parent account. + # Read-only. + class AutomaticImageImprovements + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Settings for the Automatic Image Improvements. + # @!attribute [rw] allow_automatic_image_improvements + # @return [::Boolean] + # Enables automatic image improvements. + class ImageImprovementsAccountLevelSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Not available for MCAs + # [accounts](https://support.google.com/merchants/answer/188487). By turning on + # [automatic shipping + # improvements](https://support.google.com/merchants/answer/10027038), + # you are allowing Google to improve the accuracy of your delivery times shown + # to shoppers using Google. More accurate delivery times, especially when + # faster, typically lead to better conversion rates. Google will improve your + # estimated delivery times based on various factors: + # * Delivery address of an order + # * Current handling time and shipping time settings + # * Estimated weekdays or business days + # * Parcel tracking data + # @!attribute [rw] allow_shipping_improvements + # @return [::Boolean] + # Enables automatic shipping improvements. + class AutomaticShippingImprovements + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetAutomaticImprovements` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the automatic improvements. + # Format: `accounts/{account}/automaticImprovements` + class GetAutomaticImprovementsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateAutomaticImprovements` method. + # @!attribute [rw] automatic_improvements + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # Required. The new version of the automatic imrovements. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `item_updates` + # - `item_updates.account_level_settings` + # - `image_improvements` + # - `image_improvements.account_level_settings` + # - `shipping_improvements` + # - `shipping_improvements.allow_shipping_improvements` + class UpdateAutomaticImprovementsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb new file mode 100644 index 000000000000..0e7e0a4c0677 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb @@ -0,0 +1,129 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Collection of information related to the [identity of a + # business](https://support.google.com/merchants/answer/12564247). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the business identity. + # Format: `accounts/{account}/businessIdentity` + # @!attribute [rw] promotions_consent + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::PromotionsConsent] + # Optional. Whether the identity attributes may be used for promotions. + # @!attribute [rw] black_owned + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as being + # black-owned. This optional field will only be available for merchants with + # a business country set to `US`. It is also not applicable for marketplaces + # or marketplace sellers. + # @!attribute [rw] women_owned + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as being + # women-owned. This optional field will only be available for merchants with + # a business country set to `US`. It is also not applicable for marketplaces + # or marketplace sellers. + # @!attribute [rw] veteran_owned + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as being + # veteran-owned. This optional field will only be available for merchants + # with a business country set to `US`. It is also not applicable for + # marketplaces or marketplace sellers. + # @!attribute [rw] latino_owned + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as being + # latino-owned. This optional field will only be available for merchants with + # a business country set to `US`. It is also not applicable for marketplaces + # or marketplace sellers. + # @!attribute [rw] small_business + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as a small + # business. This optional field will only be available for merchants with a + # business country set to `US`. It is also not applicable for marketplaces. + class BusinessIdentity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # All information related to an identity attribute. + # @!attribute [rw] identity_declaration + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute::IdentityDeclaration] + # Required. The declaration of identity for this attribute. + class IdentityAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # All possible settings regarding the declaration of an identity. + module IdentityDeclaration + # Default value indicating that no selection was made. + IDENTITY_DECLARATION_UNSPECIFIED = 0 + + # Indicates that the account identifies with the attribute. + SELF_IDENTIFIES_AS = 1 + + # Indicates that the account does not identify with the attribute. + DOES_NOT_SELF_IDENTIFY_AS = 2 + end + end + + # All possible settings regarding promotions related to the business + # identity. + module PromotionsConsent + # Default value indicating that no selection was made. + PROMOTIONS_CONSENT_UNSPECIFIED = 0 + + # Indicates that the account consented to having their business identity + # used for promotions. + PROMOTIONS_CONSENT_GIVEN = 1 + + # Indicates that the account did not consent to having their business + # identity used for promotions. + PROMOTIONS_CONSENT_DENIED = 2 + end + end + + # Request message for the `GetBusinessIdentity` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the business identity. + # Format: `accounts/{account}/businessIdentity` + class GetBusinessIdentityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateBusinessIdentity` method. + # @!attribute [rw] business_identity + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # Required. The new version of the business identity. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateBusinessIdentityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb new file mode 100644 index 000000000000..3546fd5ee3a5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.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 Shopping + module Merchant + module Accounts + module V1beta + # Collection of information related to a business. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the business info. + # Format: `accounts/{account}/businessInfo` + # @!attribute [rw] address + # @return [::Google::Type::PostalAddress] + # Optional. The address of the business. + # @!attribute [r] phone + # @return [::Google::Type::PhoneNumber] + # Output only. The phone number of the business. + # @!attribute [r] phone_verification_state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::PhoneVerificationState] + # Output only. The phone verification state of the business. + # @!attribute [rw] customer_service + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CustomerService] + # Optional. The customer service of the business. + # @!attribute [rw] korean_business_registration_number + # @return [::String] + # Optional. The 10-digit [Korean business registration + # number](https://support.google.com/merchants/answer/9037766) separated with + # dashes in the format: XXX-XX-XXXXX. + class BusinessInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetBusinessInfo` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the business info. + # Format: `accounts/{account}/businessInfo` + class GetBusinessInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateBusinessInfo` method. + # @!attribute [rw] business_info + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # Required. The new version of the business info. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateBusinessInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb new file mode 100644 index 000000000000..1acb59925679 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb @@ -0,0 +1,185 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Request message for `GetCheckoutSettings` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + class GetCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateCheckoutSettings` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account for which the `CheckoutSettings` will be + # created. + # @!attribute [rw] checkout_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # Required. The `CheckoutSettings` object to create. + class CreateCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateCheckoutSettings` method. + # @!attribute [rw] checkout_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # Required. The updated version of the `CheckoutSettings`. + # The `name` field is used to identify the `CheckoutSettings`. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `eligible_destinations` + # - `uri_settings` + class UpdateCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteCheckoutSettings` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + class DeleteCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [CheckoutSettings](https://support.google.com/merchants/answer/13945960) for + # a specific merchant. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the program configuration settings. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @!attribute [rw] uri_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::UriSettings] + # URI settings for cart or checkout URL. + # @!attribute [rw] eligible_destinations + # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] + # Optional. The destinations to which the checkout program applies, valid + # destination values are `SHOPPING_ADS`, `FREE_LISTINGS` + # @!attribute [r] enrollment_state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutEnrollmentState] + # Output only. Reflects the merchant enrollment state in `Checkout` program. + # @!attribute [r] review_state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutReviewState] + # Output only. Reflects the merchant review state in `Checkout` program. + # This is set based on the data quality reviews of the URL provided by + # the merchant. + # A merchant with enrollment state + # as `ENROLLED` can be in the following review states: `IN_REVIEW`, + # `APPROVED` or `DISAPPROVED`. A merchant must be in an `enrollment_state` of + # `ENROLLED` before a review can begin for the merchant.For more details, + # check the help center doc. + # @!attribute [r] effective_uri_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::UriSettings] + # Output only. The effective value of `uri_settings` for a given merchant. If + # account level settings are present then this value will be a copy of url + # settings. Otherwise, it will have the value of the parent account (for only + # marketplace sellers). + # @!attribute [r] effective_enrollment_state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutEnrollmentState] + # Output only. The effective value of enrollment_state for a given merchant + # ID. If account level settings are present then this value will be a copy of + # the account level settings. Otherwise, it will have the value of the parent + # account (for only marketplace sellers). + # @!attribute [r] effective_review_state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutReviewState] + # Output only. The effective value of `review_state` for a given merchant ID. + # If account level settings are present then this value will be a copy of the + # account level settings. Otherwise, it will have the value of the parent + # account (for only marketplace sellers). + class CheckoutSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum indicating the enrollment state of merchant in `Checkout` + # program. + module CheckoutEnrollmentState + # Default enrollment state when enrollment state is not specified. + CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED = 0 + + # Merchant has not enrolled into the program. + INACTIVE = 1 + + # Merchant has enrolled into the program by providing either an + # account level URL or checkout URLs as part of their feed. + ENROLLED = 2 + + # Merchant has previously enrolled but opted out of the program. + OPTED_OUT = 3 + end + + # Enum indicating the review state of merchant in `Checkout` + # program. + module CheckoutReviewState + # Default review state when review state is not specified. + CHECKOUT_REVIEW_STATE_UNSPECIFIED = 0 + + # Merchant provided URLs are being reviewed for data quality issues. + IN_REVIEW = 1 + + # Merchant account has been approved. Indicates the data quality checks + # have passed. + APPROVED = 2 + + # Merchant account has been disapproved due to data quality issues. + DISAPPROVED = 3 + end + end + + # URL settings for cart or checkout URL. + # @!attribute [rw] checkout_uri_template + # @return [::String] + # Checkout URL template. When the placeholders are expanded will redirect + # the buyer to the merchant checkout page with the item in the cart. For + # more details, check the [help center + # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) + # + # Note: The following fields are mutually exclusive: `checkout_uri_template`, `cart_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cart_uri_template + # @return [::String] + # Cart URL template. When the placeholders are expanded will redirect the + # buyer to the cart page on the merchant website with the selected + # item in cart. For more details, check the [help center + # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) + # + # Note: The following fields are mutually exclusive: `cart_uri_template`, `checkout_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class UriSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb new file mode 100644 index 000000000000..5a79025d60ca --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.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 Shopping + module Merchant + module Accounts + module V1beta + # Customer service information. + # @!attribute [rw] uri + # @return [::String] + # Optional. The URI where customer service may be found. + # @!attribute [rw] email + # @return [::String] + # Optional. The email address where customer service may be reached. + # @!attribute [rw] phone + # @return [::Google::Type::PhoneNumber] + # Optional. The phone number where customer service may be called. + class CustomerService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb new file mode 100644 index 000000000000..540f0e3bee48 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.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 Shopping + module Merchant + module Accounts + module V1beta + # The categories of notifications the user opted into / opted out of. The email + # preferences do not include mandatory announcements as users can't opt out of + # them. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the EmailPreferences. The endpoint is only + # supported for the authenticated user. + # @!attribute [rw] news_and_tips + # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences::OptInState] + # Optional. Updates on new features, tips and best practices. + class EmailPreferences + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Opt in state of the email preference. + module OptInState + # Opt-in status is not specified. + OPT_IN_STATE_UNSPECIFIED = 0 + + # User has opted out of receiving this type of email. + OPTED_OUT = 1 + + # User has opted in to receiving this type of email. + OPTED_IN = 2 + + # User has opted in to receiving this type of email and the confirmation + # email has been sent, but user has not yet confirmed the opt in (applies + # only to certain countries). + UNCONFIRMED = 3 + end + end + + # Request message for GetEmailPreferences method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the `EmailPreferences` resource. + # Format: `accounts/{account}/users/{email}/emailPreferences` + class GetEmailPreferencesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateEmailPreferences method. + # @!attribute [rw] email_preferences + # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # Required. Email Preferences to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateEmailPreferencesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb new file mode 100644 index 000000000000..b8c64f5452ff --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.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 Shopping + module Merchant + module Accounts + module V1beta + # Collection of information related to a Google Business Profile (GBP) account. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the GBP account. Format: + # `accounts/{account}/gbpAccount/{gbp_account}` + # @!attribute [rw] gbp_account_id + # @return [::String] + # The id of the GBP account. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount::Type] + # The type of the Business Profile. + # @!attribute [rw] gbp_account_name + # @return [::String] + # The name of the Business Profile. + # For personal accounts: Email id of the owner. + # For Business accounts: Name of the Business Account. + # @!attribute [rw] listing_count + # @return [::Integer] + # Number of listings under this account. + class GbpAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the GBP account. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # The GBP account is a user account. + USER = 1 + + # The GBP account is a business account. + BUSINESS_ACCOUNT = 2 + end + end + + # Request message for the ListGbpAccounts method. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource under which the GBP accounts are + # listed. Format: `accounts/{account}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `GbpAccount` resources to return. The + # service returns fewer than this value if the number of gbp accounts is less + # that than the `pageSize`. The default value is 50. The maximum value is + # 1000; If a value higher than the maximum is specified, then the `pageSize` + # will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListGbpAccounts` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListGbpAccounts` must + # match the call that provided the page token. + class ListGbpAccountsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListGbpAccounts method. + # @!attribute [rw] gbp_accounts + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] + # The GBP accounts from the specified merchant in the specified country. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListGbpAccountsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the LinkGbpAccount method. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource to which the GBP account is + # linked. Format: `accounts/{account}`. + # @!attribute [rw] gbp_email + # @return [::String] + # Required. The email address of the Business Profile account. + class LinkGbpAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the LinkGbpAccount method. + # @!attribute [rw] response + # @return [::Google::Protobuf::Empty] + # Empty response. + class LinkGbpAccountResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb new file mode 100644 index 000000000000..24696e1e3b3f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.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 Shopping + module Merchant + module Accounts + module V1beta + # A store's homepage. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the store's homepage. + # Format: `accounts/{account}/homepage` + # @!attribute [rw] uri + # @return [::String] + # Required. The URI (typically a URL) of the store's homepage. + # @!attribute [r] claimed + # @return [::Boolean] + # Output only. Whether the homepage is claimed. See + # https://support.google.com/merchants/answer/176793. + class Homepage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetHomepage` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the homepage to retrieve. + # Format: `accounts/{account}/homepage` + class GetHomepageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateHomepage` method. + # @!attribute [rw] homepage + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # Required. The new version of the homepage. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateHomepageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ClaimHomepage` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the homepage to claim. + # Format: `accounts/{account}/homepage` + class ClaimHomepageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UnclaimHomepage` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the homepage to unclaim. + # Format: `accounts/{account}/homepage` + class UnclaimHomepageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb new file mode 100644 index 000000000000..f4a962b34c31 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.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 Shopping + module Merchant + module Accounts + module V1beta + # Collection of information related to a Local Feed Partnership (LFP) provider. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the LFP provider. + # Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}` + # @!attribute [r] region_code + # @return [::String] + # Output only. Region code defined by [CLDR](https://cldr.unicode.org/). + # @!attribute [rw] display_name + # @return [::String] + # The display name of the LFP provider. + class LfpProvider + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the FindLfpProviders method. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource under which the LFP providers are + # found. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `LfpProvider` resources to return. The + # service returns fewer than this value if the number of lfp providers is + # less that than the `pageSize`. The default value is 50. The maximum value + # is 1000; If a value higher than the maximum is specified, then the + # `pageSize` will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `FindLfpProviders` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `FindLfpProviders` must + # match the call that provided the page token. + class FindLfpProvidersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the FindLfpProviders method. + # @!attribute [rw] lfp_providers + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] + # The LFP providers from the specified merchant in the specified country. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class FindLfpProvidersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the LinkLfpProvider method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the LFP provider resource to link. + # Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. + # The `lfp_provider` is the LFP provider ID. + # @!attribute [rw] external_account_id + # @return [::String] + # Required. The external account ID by which this merchant is known to the + # LFP provider. + class LinkLfpProviderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the LinkLfpProvider method. + # @!attribute [rw] response + # @return [::Google::Protobuf::Empty] + # Empty response. + class LinkLfpProviderResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb new file mode 100644 index 000000000000..17d29142b0ff --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb @@ -0,0 +1,336 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Collection of information related to the omnichannel settings of a merchant. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the omnichannel setting. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # @!attribute [rw] region_code + # @return [::String] + # Required. Immutable. Region code defined by + # [CLDR](https://cldr.unicode.org/). Must be provided in the Create method, + # and is immutable. + # @!attribute [rw] lsf_type + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting::LsfType] + # Required. The Local Store Front type for this country. + # @!attribute [rw] in_stock + # @return [::Google::Shopping::Merchant::Accounts::V1beta::InStock] + # Optional. The InStock URI and state for this country. + # @!attribute [rw] pickup + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Pickup] + # Optional. The Pickup URI and state for this country. + # @!attribute [r] lfp_link + # @return [::Google::Shopping::Merchant::Accounts::V1beta::LfpLink] + # Output only. The established link to a LFP provider. + # @!attribute [rw] odo + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnDisplayToOrder] + # Optional. The On Display to Order (ODO) policy URI and state for this + # country. + # @!attribute [rw] about + # @return [::Google::Shopping::Merchant::Accounts::V1beta::About] + # Optional. The about page URI and state for this country. + # @!attribute [rw] inventory_verification + # @return [::Google::Shopping::Merchant::Accounts::V1beta::InventoryVerification] + # Optional. The inventory verification contact and state for this country. + class OmnichannelSetting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The product page experience type, which is also called the Local Store + # Front (LSF) type. Check the [HC + # article](https://support.google.com/merchants/answer/7178526) for more + # details. + module LsfType + # Default value. This value is unused. + LSF_TYPE_UNSPECIFIED = 0 + + # Google-Hosted Local Store Front. Check the [HC + # article](https://support.google.com/merchants/answer/14869424) for more + # details. + GHLSF = 1 + + # Merchant-Hosted Local Store Front Basic. Check the [HC + # article](https://support.google.com/merchants/answer/14615867) for more + # details. + MHLSF_BASIC = 2 + + # Merchant-Hosted Local Store Front Full. Check the [HC + # article](https://support.google.com/merchants/answer/14617076) for more + # details. + MHLSF_FULL = 3 + end + end + + # The state of a omnichannel setting related review process. + class ReviewState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the review process. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The review process has concluded successfully. The reviewed item is + # active. + ACTIVE = 1 + + # The review process failed. + FAILED = 2 + + # The review process is running. + RUNNING = 3 + + # The review process is waiting for the merchant to take action. + ACTION_REQUIRED = 4 + end + end + + # Collection of information related to InStock. + # @!attribute [rw] uri + # @return [::String] + # Optional. Product landing page URI. It is only used for the review of MHLSF + # in-stock serving. This URI domain should match with the business's + # homepage. Required to be empty if the lsf_type is GHLSF, and required when + # the lsf_type is MHLSF_FULL or MHLSF_BASIC. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] + # Output only. The state of the in-stock serving. + class InStock + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to Pickup. + # @!attribute [rw] uri + # @return [::String] + # Required. Pickup product page URI. It is only used for the review of pickup + # serving. This URI domain should match with the business's homepage. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] + # Output only. The state of the pickup serving. + class Pickup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to the LFP link. + # @!attribute [rw] lfp_provider + # @return [::String] + # Required. The resource name of the LFP provider. + # Format: `lfpProviders/{lfp_provider}` + # @!attribute [rw] external_account_id + # @return [::String] + # Required. The account ID by which this merchant is known to the LFP + # provider. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] + # Output only. The state of the LFP link. + class LfpLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to the on display to order + # ([ODO](https://support.google.com/merchants/answer/14615056?hl=en&ref_topic=15145747&sjid=6892280366904591178-NC)). + # @!attribute [rw] uri + # @return [::String] + # Required. The on display to order (ODO) policy URI. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] + # Output only. The state of the URI. + class OnDisplayToOrder + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to the about page + # ([impressum](https://support.google.com/merchants/answer/14675634?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC)). + # @!attribute [rw] uri + # @return [::String] + # Required. The about page URI. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] + # Output only. The state of the URI. + class About + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to [inventory + # verification](https://support.google.com/merchants/answer/14684499?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC). + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::InventoryVerification::State] + # Output only. The state of the inventory verification process. + # @!attribute [rw] contact + # @return [::String] + # Required. The name of the contact for the inventory verification process. + # @!attribute [rw] contact_email + # @return [::String] + # Required. The email address of the contact for the inventory verification + # process. + # @!attribute [r] contact_state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] + # Output only. The state of the contact verification. + class InventoryVerification + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the [inventory + # verification](https://support.google.com/merchants/answer/14684499?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC) + # process. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # When the merchant needs to initiate the inventory + # verification process. The next state is INACTIVE. + ACTION_REQUIRED = 1 + + # When the merchant is ready to request inventory verification. + INACTIVE = 5 + + # The inventory verification process is running. If the merchant is + # rejected, the next state is INACTIVE. + RUNNING = 2 + + # The inventory verification process succeeded. + SUCCEEDED = 3 + + # When merchant fails the inventory verification process and all attempts + # are exhausted. + SUSPENDED = 4 + end + end + + # Request message for the GetOmnichannelSettings method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the omnichannel setting to retrieve. + # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + class GetOmnichannelSettingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListOmnichannelSettings method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of omnichannel settings. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of omnichannel settings to return. The service + # may return fewer than this value. If unspecified, at most 50 omnichannel + # settings will be returned. The maximum value is 1000; values above 1000 + # will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListOmnichannelSettings` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListOmnichannelSettings` + # must match the call that provided the page token. + class ListOmnichannelSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListOmnichannelSettings method. + # @!attribute [rw] omnichannel_settings + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] + # The omnichannel settings from the specified merchant. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListOmnichannelSettingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateOmnichannelSetting method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this omnichannel setting will be + # created. Format: `accounts/{account}` + # @!attribute [rw] omnichannel_setting + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # Required. The omnichannel setting to create. + class CreateOmnichannelSettingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateOmnichannelSetting method. + # @!attribute [rw] omnichannel_setting + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # Required. The omnichannel setting to update. + # + # The omnichannel setting's `name` field is used to identify the + # omnichannel setting to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to be updated. + # + # The following fields are supported in snake_case only: + # - `lsf_type` + # - `in_stock` + # - `pickup` + # - `odo` + # - `about` + # - `inventory_verification` + # + # Full replacement with wildcard `*`is supported, while empty/implied update + # mask is not. + class UpdateOmnichannelSettingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the RequestInventoryVerification method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the omnichannel setting to request inventory + # verification. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + class RequestInventoryVerificationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the RequestInventoryVerification method. + # @!attribute [rw] omnichannel_setting + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # The omnichannel setting that was updated. + class RequestInventoryVerificationResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb new file mode 100644 index 000000000000..7e1e51be1a93 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb @@ -0,0 +1,345 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Request message for the `GetOnlineReturnPolicy` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the return policy to retrieve. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + class GetOnlineReturnPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateOnlineReturnPolicy` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account for which the return policy will be created. + # Format: `accounts/{account}` + # @!attribute [rw] online_return_policy + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # Required. The return policy object to create. + class CreateOnlineReturnPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateOnlineReturnPolicy` method. The method + # supports field masks and when the mask is provided, only the fields specified + # in the mask are updated. + # @!attribute [rw] online_return_policy + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # Required. The online return policy to update. + # The online return policy's `name` field is used to identify the + # online return policy to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `accept_defective_only` + # - `accept_exchange` + # - `item_conditions` + # - `policy` + # - `process_refund_days` + # - `restocking_fee` + # - `return_methods` + # - `return_policy_uri` + # - `return_shipping_fee` + class UpdateOnlineReturnPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteOnlineReturnPolicy` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the return policy to delete. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + class DeleteOnlineReturnPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListOnlineReturnPolicies` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account for which to list return policies. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `OnlineReturnPolicy` resources to return. + # The service returns fewer than this value if the number of return policies + # for the given merchant is less that than the `pageSize`. The default value + # is 10. The maximum value is 100; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListOnlineReturnPolicies` + # call. Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListOnlineReturnPolicies` must match the call that provided the page + # token. The token returned as + # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListOnlineReturnPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListOnlineReturnPolicies` method. + # @!attribute [rw] online_return_policies + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] + # The retrieved return policies. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListOnlineReturnPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [Online return policy](https://support.google.com/merchants/answer/10220642) + # object. This is currently used to represent return policies for ads and free + # listings programs. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the `OnlineReturnPolicy` resource. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + # @!attribute [r] return_policy_id + # @return [::String] + # Output only. Return policy ID generated by Google. + # @!attribute [rw] label + # @return [::String] + # Required. Immutable. This field represents the unique user-defined label of + # the return policy. It is important to note that the same label cannot be + # used in different return policies for the same country. Unless a product + # specifies a specific label attribute, policies will be automatically + # labeled as 'default'. To assign a custom return policy to certain product + # groups, follow the instructions provided in the [Return policy label] + # (https://support.google.com/merchants/answer/9445425). + # The label can contain up to 50 characters. + # @!attribute [rw] countries + # @return [::Array<::String>] + # Required. Immutable. The countries of sale where the return policy applies. + # The values must be a valid 2 letter ISO 3166 code. + # @!attribute [rw] policy + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::Policy] + # Optional. The return policy. + # @!attribute [rw] seasonal_overrides + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::SeasonalOverride>] + # Optional. Overrides to the general policy for orders placed during a + # specific set of time intervals. + # @!attribute [rw] restocking_fee + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::RestockingFee] + # Optional. The restocking fee that applies to all return reason categories. + # This would be treated as a free restocking fee if the value is not set. + # @!attribute [rw] return_methods + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnMethod>] + # Optional. The return methods of how customers can return an item. This + # value is required to not be empty unless the type of return policy is + # noReturns. + # @!attribute [rw] item_conditions + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ItemCondition>] + # Optional. The item conditions accepted for returns must not be empty unless + # the type of return policy is 'noReturns'. + # @!attribute [rw] return_shipping_fee + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnShippingFee] + # Optional. The return shipping fee. Should be set only when customer need to + # download and print the return label. + # @!attribute [rw] return_policy_uri + # @return [::String] + # Required. The return policy uri. This can used by Google to do a sanity + # check for the policy. It must be a valid URL. + # @!attribute [rw] accept_defective_only + # @return [::Boolean] + # Optional. This field specifies if merchant + # only accepts defective products for returns. + # @!attribute [rw] process_refund_days + # @return [::Integer] + # Optional. The field specifies the number of + # days it takes for merchants to process refunds. + # @!attribute [rw] accept_exchange + # @return [::Boolean] + # Optional. This field specifies if merchant + # allows customers to exchange products. + # @!attribute [rw] return_label_source + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnLabelSource] + # Optional. The field specifies the return + # label source. + class OnlineReturnPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The return shipping fee. This can either be a fixed fee or a boolean to + # indicate that the customer pays the actual shipping cost. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnShippingFee::Type] + # Required. Type of return shipping fee. + # @!attribute [rw] fixed_fee + # @return [::Google::Shopping::Type::Price] + # Fixed return shipping fee amount. This value is only applicable when type + # is `FIXED`. We will treat the return shipping fee as free if type is + # `FIXED` and this value is not set. + class ReturnShippingFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Return shipping fee types. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # The return shipping fee is a fixed value. + FIXED = 1 + + # Customers will pay the actual return shipping fee. + CUSTOMER_PAYING_ACTUAL_FEE = 2 + end + end + + # The restocking fee. This can be a flat fee or a micro percent. + # @!attribute [rw] fixed_fee + # @return [::Google::Shopping::Type::Price] + # Fixed restocking fee. + # + # Note: The following fields are mutually exclusive: `fixed_fee`, `micro_percent`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] micro_percent + # @return [::Integer] + # Percent of total price in micros. 15,000,000 means 15% of the total + # price would be charged. + # + # Note: The following fields are mutually exclusive: `micro_percent`, `fixed_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class RestockingFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The available policies. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::Policy::Type] + # Policy type. + # @!attribute [rw] days + # @return [::Integer] + # The number of days items can be returned after delivery, where one day + # is defined as 24 hours after the delivery timestamp. Required for + # `NUMBER_OF_DAYS_AFTER_DELIVERY` returns. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Return policy types. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # The number of days within which a return is valid after delivery. + NUMBER_OF_DAYS_AFTER_DELIVERY = 1 + + # No returns. + NO_RETURNS = 2 + + # Life time returns. + LIFETIME_RETURNS = 3 + end + end + + # @!attribute [rw] return_days + # @return [::Integer] + # Number of days (from the delivery date) that the product can be + # returned. + # + # Note: The following fields are mutually exclusive: `return_days`, `return_until_date`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] return_until_date + # @return [::Google::Type::Date] + # Fixed end date until which the product can be returned. + # + # Note: The following fields are mutually exclusive: `return_until_date`, `return_days`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] label + # @return [::String] + # Required. Display name of this seasonal override in Merchant Center. + # @!attribute [rw] start_date + # @return [::Google::Type::Date] + # Required. Defines the date range when this seasonal override applies. + # Both start_date and end_date are inclusive. + # The dates of the seasonal overrides should not overlap. + # @!attribute [rw] end_date + # @return [::Google::Type::Date] + # Required. seasonal override end date (inclusive). + class SeasonalOverride + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The available return methods. + module ReturnMethod + # Default value. This value is unused. + RETURN_METHOD_UNSPECIFIED = 0 + + # Return by mail. + BY_MAIL = 1 + + # Return in store. + IN_STORE = 2 + + # Return at a kiosk. + AT_A_KIOSK = 3 + end + + # The available item conditions. + module ItemCondition + # Default value. This value is unused. + ITEM_CONDITION_UNSPECIFIED = 0 + + # New. + NEW = 1 + + # Used. + USED = 2 + end + + # The available return label sources. + module ReturnLabelSource + # Default value. This value is unused. + RETURN_LABEL_SOURCE_UNSPECIFIED = 0 + + # Download and print. + DOWNLOAD_AND_PRINT = 1 + + # Label include in the package. + IN_THE_PACKAGE = 2 + + # Customer to provide. + CUSTOMER_RESPONSIBILITY = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb new file mode 100644 index 000000000000..8dd1d729cfe1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.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 Shopping + module Merchant + module Accounts + module V1beta + # The phone verification state. + module PhoneVerificationState + # Default value. This value is unused. + PHONE_VERIFICATION_STATE_UNSPECIFIED = 0 + + # The phone is verified. + PHONE_VERIFICATION_STATE_VERIFIED = 1 + + # The phone is unverified + PHONE_VERIFICATION_STATE_UNVERIFIED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb new file mode 100644 index 000000000000..7a16e89b6c29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb @@ -0,0 +1,160 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Defines participation in a given program for the specified account. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the program. + # Format: `accounts/{account}/programs/{program}` + # @!attribute [r] documentation_uri + # @return [::String] + # Output only. The URL of a Merchant Center help page describing the program. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program::State] + # Output only. The participation state of the account in the program. + # @!attribute [r] active_region_codes + # @return [::Array<::String>] + # Output only. The regions in which the account is actively participating in + # the program. Active regions are defined as those where all program + # requirements affecting the regions have been met. + # + # Region codes are defined by [CLDR](https://cldr.unicode.org/). This is + # either a country where the program applies specifically to that country or + # `001` when the program applies globally. + # @!attribute [r] unmet_requirements + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Program::Requirement>] + # Output only. The requirements that the account has not yet satisfied that + # are affecting participation in the program. + class Program + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines a requirement specified for participation in the program. + # @!attribute [r] title + # @return [::String] + # Output only. Name of the requirement. + # @!attribute [r] documentation_uri + # @return [::String] + # Output only. The URL of a help page describing the requirement. + # @!attribute [r] affected_region_codes + # @return [::Array<::String>] + # Output only. The regions that are currently affected by this requirement + # not being met. + # + # Region codes are defined by [CLDR](https://cldr.unicode.org/). This is + # either a country where the program applies specifically to that country + # or `001` when the program applies globally. + class Requirement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible program participation states for the account. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The account is not eligible to participate in the program. + NOT_ELIGIBLE = 1 + + # The account is eligible to participate in the program. + ELIGIBLE = 2 + + # The program is enabled for the account. + ENABLED = 3 + end + end + + # Request message for the GetProgram method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the program to retrieve. + # Format: `accounts/{account}/programs/{program}` + class GetProgramRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListPrograms method. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the account for which to retrieve all programs. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of programs to return in a single response. If + # unspecified (or 0), a default size of 1000 is used. The maximum value is + # 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A continuation token, received from a previous `ListPrograms` + # call. Provide this to retrieve the next page. + class ListProgramsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListPrograms method. + # @!attribute [rw] programs + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Program>] + # The programs for the given account. + # @!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 ListProgramsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the EnableProgram method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the program for which to enable participation for the + # given account. Format: `accounts/{account}/programs/{program}` + class EnableProgramRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DisableProgram method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the program for which to disable participation for + # the given account. Format: `accounts/{account}/programs/{program}` + class DisableProgramRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb new file mode 100644 index 000000000000..6757ee510eca --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb @@ -0,0 +1,195 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Request message for the `GetRegion` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the region to retrieve. + # Format: `accounts/{account}/regions/{region}` + class GetRegionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateRegion` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to create a region for. + # Format: `accounts/{account}` + # @!attribute [rw] region_id + # @return [::String] + # Required. The identifier for the region, unique over all regions of the + # same account. + # @!attribute [rw] region + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # Required. The region to create. + class CreateRegionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateRegion` method. + # @!attribute [rw] region + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # Required. The updated region. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The comma-separated field mask indicating the fields to update. + # Example: + # `"displayName,postalCodeArea.regionCode"`. + class UpdateRegionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteRegion` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the region to delete. + # Format: `accounts/{account}/regions/{region}` + class DeleteRegionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListRegions` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list regions for. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of regions to return. The service may return + # fewer than this value. + # If unspecified, at most 50 regions will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListRegions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegions` must + # match the call that provided the page token. + class ListRegionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListRegions` method. + # @!attribute [rw] regions + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Region>] + # The regions from the specified merchant. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRegionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a geographic region that you can use as a target with both the + # `RegionalInventory` and `ShippingSettings` services. You can define regions + # as collections of either postal codes or, in some countries, using predefined + # geotargets. For more information, see [Set up regions + # ](https://support.google.com/merchants/answer/7410946#zippy=%2Ccreate-a-new-region) + # for more information. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the region. + # Format: `accounts/{account}/regions/{region}` + # @!attribute [rw] display_name + # @return [::String] + # Optional. The display name of the region. + # @!attribute [rw] postal_code_area + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region::PostalCodeArea] + # Optional. A list of postal codes that defines the region area. + # @!attribute [rw] geotarget_area + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region::GeoTargetArea] + # Optional. A list of geotargets that defines the region area. + # @!attribute [r] regional_inventory_eligible + # @return [::Google::Protobuf::BoolValue] + # Output only. Indicates if the region is eligible for use in the Regional + # Inventory configuration. + # @!attribute [r] shipping_eligible + # @return [::Google::Protobuf::BoolValue] + # Output only. Indicates if the region is eligible for use in the Shipping + # Services configuration. + class Region + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A list of postal codes that defines the region area. + # Note: All regions defined using postal codes are accessible through the + # account's `ShippingSettings.postalCodeGroups` resource. + # @!attribute [rw] region_code + # @return [::String] + # Required. [CLDR territory + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # or the country the postal code group applies to. + # @!attribute [rw] postal_codes + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Region::PostalCodeArea::PostalCodeRange>] + # Required. A range of postal codes. + class PostalCodeArea + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A range of postal codes that defines the region area. + # @!attribute [rw] begin + # @return [::String] + # Required. A postal code or a pattern of the form prefix* denoting the + # inclusive lower bound of the range defining the area. Examples values: + # `94108`, `9410*`, `9*`. + # @!attribute [rw] end + # @return [::String] + # Optional. A postal code or a pattern of the form `prefix*` denoting the + # inclusive upper bound of the range defining the area. It must have the + # same length as postalCodeRangeBegin: if postalCodeRangeBegin is a + # postal code then postalCodeRangeEnd must be a postal code too; if + # postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a + # pattern with the same prefix length. Optional: if not set, then the + # area is defined as being all the postal codes matching + # postalCodeRangeBegin. + class PostalCodeRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A list of geotargets that defines the region area. + # @!attribute [rw] geotarget_criteria_ids + # @return [::Array<::Integer>] + # Required. A non-empty list of [location + # IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). + # They must all be of the same location type (for example, state). + class GeoTargetArea + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb new file mode 100644 index 000000000000..e5456e04275e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb @@ -0,0 +1,747 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # The merchant account's [shipping + # setting](https://support.google.com/merchants/answer/6069284). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the shipping setting. + # Format: `accounts/{account}/shippingSetting` + # @!attribute [rw] services + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Service>] + # Optional. The target account's list of services. + # @!attribute [rw] warehouses + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Warehouse>] + # Optional. A list of warehouses which can be referred to in `services`. + # @!attribute [rw] etag + # @return [::String] + # Required. This field is used for avoid async issue. Make sure shipping + # setting data + # didn't change between get call and insert call. The user should do + # following steps: + # + # 1. Set etag field as empty string for initial shipping setting creation. + # + # 2. After initial creation, call get method to obtain an etag and current + # shipping setting data before call insert. + # + # 3. Modify to wanted shipping setting information. + # + # 4. Call insert method with the wanted shipping setting information with + # the etag obtained from step 2. + # + # 5. If shipping setting data changed between step 2 and step 4. Insert + # request will fail because the etag changes every time the shipping setting + # data changes. User should repeate step 2-4 with the new etag. + class ShippingSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Shipping service. + # @!attribute [rw] service_name + # @return [::String] + # Required. Free-form name of the service. Must be unique within target + # account. + # @!attribute [rw] active + # @return [::Boolean] + # Required. A boolean exposing the active status of the shipping service. + # @!attribute [rw] delivery_countries + # @return [::Array<::String>] + # Required. The CLDR territory code of the countries to which the service + # applies. + # @!attribute [rw] currency_code + # @return [::String] + # The CLDR code of the currency to which this service applies. Must match + # that of the prices in rate groups. + # @!attribute [rw] delivery_time + # @return [::Google::Shopping::Merchant::Accounts::V1beta::DeliveryTime] + # Required. Time spent in various aspects from order to the delivery of the + # product. + # @!attribute [rw] rate_groups + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::RateGroup>] + # Optional. Shipping rate group definitions. Only the last one is allowed to + # have an empty `applicable_shipping_labels`, which means "everything else". + # The other `applicable_shipping_labels` must not overlap. + # @!attribute [rw] shipment_type + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::ShipmentType] + # Type of locations this service ships orders to. + # @!attribute [rw] minimum_order_value + # @return [::Google::Shopping::Type::Price] + # Minimum order value for this service. If set, indicates that customers + # will have to spend at least this amount. + # All prices within a service must have the same currency. + # Cannot be set together with minimum_order_value_table. + # @!attribute [rw] minimum_order_value_table + # @return [::Google::Shopping::Merchant::Accounts::V1beta::MinimumOrderValueTable] + # Table of per store minimum order values for the pickup fulfillment type. + # Cannot be set together with minimum_order_value. + # @!attribute [rw] store_config + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig] + # A list of stores your products are delivered from. + # This is only valid for the local delivery shipment type. + # @!attribute [rw] loyalty_programs + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Service::LoyaltyProgram>] + # Optional. Loyalty programs that this shipping service is limited to. + class Service + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A list of stores your products are delivered from. + # This is only valid for the local delivery shipment type. + # @!attribute [rw] store_service_type + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig::StoreServiceType] + # Indicates whether all stores, or selected stores, listed by this + # merchant provide local delivery. + # @!attribute [rw] store_codes + # @return [::Array<::String>] + # Optional. A list of store codes that provide local delivery. + # If empty, then `all_stores` must be true. + # @!attribute [rw] cutoff_config + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig::CutoffConfig] + # Configs related to local delivery ends for the day. + # @!attribute [rw] service_radius + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Distance] + # Maximum delivery radius. + # This is only required for the local delivery shipment type. + class StoreConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configs related to local delivery ends for the day. + # @!attribute [rw] local_cutoff_time + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig::CutoffConfig::LocalCutoffTime] + # Time that local delivery ends for the day. + # @!attribute [rw] store_close_offset_hours + # @return [::Integer] + # Only valid with local delivery fulfillment. Represents cutoff time + # as the number of hours before store closing. Mutually exclusive + # with `local_cutoff_time`. + # @!attribute [rw] no_delivery_post_cutoff + # @return [::Boolean] + # Merchants can opt-out of showing n+1 day local delivery when they have + # a shipping service configured to n day local delivery. For example, if + # the shipping service defines same-day delivery, and it's past the + # cut-off, setting this field to `true` results in the calculated + # shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the + # same example, setting this field to `false` results in the calculated + # shipping time being one day. This is only for local delivery. + class CutoffConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Time that local delivery ends for the day. + # @!attribute [rw] hour + # @return [::Integer] + # Hour local delivery orders must be placed by to process the same + # day. + # @!attribute [rw] minute + # @return [::Integer] + # Minute local delivery orders must be placed by to process the same + # day. + class LocalCutoffTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Indicates whether all stores, or selected stores, listed by the + # merchant provide local delivery. + module StoreServiceType + # Did not specify store service type. + STORE_SERVICE_TYPE_UNSPECIFIED = 0 + + # Indicates whether all stores, current and future, listed by this + # merchant provide local delivery. + ALL_STORES = 1 + + # Indicates that only the stores listed in `store_codes` are eligible + # for local delivery. + SELECTED_STORES = 2 + end + end + + # [Loyalty program](https://support.google.com/merchants/answer/12922446) + # provided by a merchant. + # @!attribute [rw] program_label + # @return [::String] + # This is the loyalty program label set in your loyalty program settings in + # Merchant Center. This sub-attribute allows Google to map your loyalty + # program to eligible offers. + # @!attribute [rw] loyalty_program_tiers + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Service::LoyaltyProgram::LoyaltyProgramTiers>] + # Optional. Loyalty program tier of this shipping service. + class LoyaltyProgram + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Subset of a merchants loyalty program. + # @!attribute [rw] tier_label + # @return [::String] + # The tier label [tier_label] sub-attribute differentiates offer level + # benefits between each tier. This value is also set in your program + # settings in Merchant Center, and is required for data source changes + # even if your loyalty program only has 1 tier. + class LoyaltyProgramTiers + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Shipment type of shipping service. + module ShipmentType + # This service did not specify shipment type. + SHIPMENT_TYPE_UNSPECIFIED = 0 + + # This service ships orders to an address chosen by the customer. + DELIVERY = 1 + + # This service ships orders to an address chosen by the customer. + # The order is shipped from a local store near by. + LOCAL_DELIVERY = 2 + + # This service ships orders to an address chosen by the customer. + # The order is shipped from a collection point. + COLLECTION_POINT = 3 + end + end + + # Maximum delivery radius. + # This is only required for the local delivery shipment type. + # @!attribute [rw] value + # @return [::Integer] + # Integer value of distance. + # @!attribute [rw] unit + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Distance::Unit] + # Unit can differ based on country, it is parameterized to include miles + # and kilometers. + class Distance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Unit can differ based on country, it is parameterized to include miles + # and kilometers. + module Unit + # Unit unspecified + UNIT_UNSPECIFIED = 0 + + # Unit in miles + MILES = 1 + + # Unit in kilometers + KILOMETERS = 2 + end + end + + # A fulfillment warehouse, which stores and handles inventory. + # Next tag: 7 + # @!attribute [rw] name + # @return [::String] + # Required. The name of the warehouse. Must be unique within account. + # @!attribute [rw] shipping_address + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Address] + # Required. Shipping address of the warehouse. + # @!attribute [rw] cutoff_time + # @return [::Google::Shopping::Merchant::Accounts::V1beta::WarehouseCutoffTime] + # Required. The latest time of day that an order can be accepted and begin + # processing. Later orders will be processed in the next day. The time is + # based on the warehouse postal code. + # @!attribute [rw] handling_days + # @return [::Integer] + # Required. The number of days it takes for this warehouse to pack up and + # ship an item. This is on the warehouse level, but can be overridden on the + # offer level based on the attributes of an item. + # @!attribute [rw] business_day_config + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig] + # Business days of the warehouse. + # If not set, will be Monday to Friday by default. + class Warehouse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The latest time of day that an order can be accepted and begin processing. + # Later orders will be processed in the next day. The time is based on the + # warehouse postal code. + # @!attribute [rw] hour + # @return [::Integer] + # Required. Hour of the cutoff time until which an order has to be placed to + # be processed in the same day by the warehouse. Hour is based on the + # timezone of warehouse. + # @!attribute [rw] minute + # @return [::Integer] + # Required. Minute of the cutoff time until which an order has to be placed + # to be processed in the same day by the warehouse. Minute is based on the + # timezone of warehouse. + class WarehouseCutoffTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Shipping address of the warehouse. + # @!attribute [rw] street_address + # @return [::String] + # Street-level part of the address. For example: `111w 31st Street`. + # @!attribute [rw] city + # @return [::String] + # Required. City, town or commune. May also include dependent localities or + # sublocalities (For example neighborhoods or suburbs). + # @!attribute [rw] administrative_area + # @return [::String] + # Required. Top-level administrative subdivision of the country. For example, + # a state like California ("CA") or a province like Quebec ("QC"). + # @!attribute [rw] postal_code + # @return [::String] + # Required. Postal code or ZIP (For example "94043"). + # @!attribute [rw] region_code + # @return [::String] + # Required. [CLDR country + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # (For example "US"). + class Address + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Time spent in various aspects from order to the delivery of the product. + # @!attribute [rw] min_transit_days + # @return [::Integer] + # Minimum number of business days that is spent in transit. 0 means same + # day delivery, 1 means next day delivery. + # Either `min_transit_days`, `max_transit_days` or + # `transit_time_table` must be set, but not both. + # @!attribute [rw] max_transit_days + # @return [::Integer] + # Maximum number of business days that is spent in transit. 0 means same + # day delivery, 1 means next day delivery. Must be greater than or equal + # to `min_transit_days`. + # @!attribute [rw] cutoff_time + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CutoffTime] + # Business days cutoff time definition. + # If not configured the cutoff time will be defaulted to 8AM PST. + # @!attribute [rw] min_handling_days + # @return [::Integer] + # Minimum number of business days spent before an order is shipped. + # 0 means same day shipped, 1 means next day shipped. + # 'min_handling_days' and 'max_handling_days' should be either set or not set + # at the same time. + # @!attribute [rw] max_handling_days + # @return [::Integer] + # Maximum number of business days spent before an order is shipped. + # 0 means same day shipped, 1 means next day shipped. + # Must be greater than or equal to `min_handling_days`. + # 'min_handling_days' and 'max_handling_days' should be either set or not set + # at the same time. + # @!attribute [rw] transit_time_table + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TransitTable] + # Transit time table, number of business days spent in transit based on row + # and column dimensions. Either `min_transit_days`, `max_transit_days` or + # `transit_time_table` can be set, but not both. + # @!attribute [rw] handling_business_day_config + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig] + # The business days during which orders can be handled. + # If not provided, Monday to Friday business days will be assumed. + # @!attribute [rw] transit_business_day_config + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig] + # The business days during which orders can be in-transit. + # If not provided, Monday to Friday business days will be assumed. + # @!attribute [rw] warehouse_based_delivery_times + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::WarehouseBasedDeliveryTime>] + # Optional. Indicates that the delivery time should be calculated per + # warehouse (shipping origin location) based on the settings of the selected + # carrier. When set, no other transit time related field in [delivery + # time][[google.shopping.content.bundles.ShippingSetting.DeliveryTime] should + # be set. + class DeliveryTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Business days cutoff time definition. + # @!attribute [rw] hour + # @return [::Integer] + # Required. Hour of the cutoff time until which an order has to be placed to + # be processed in the same day. + # @!attribute [rw] minute + # @return [::Integer] + # Required. Minute of the cutoff time until which an order has to be placed + # to be processed in the same day. + # @!attribute [rw] time_zone + # @return [::String] + # Required. [Timezone + # identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids) + # For example "Europe/Zurich". + class CutoffTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Business days of the warehouse. + # @!attribute [rw] business_days + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig::Weekday>] + # Required. Regular business days. + # May not be empty. + class BusinessDayConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module Weekday + WEEKDAY_UNSPECIFIED = 0 + + MONDAY = 1 + + TUESDAY = 2 + + WEDNESDAY = 3 + + THURSDAY = 4 + + FRIDAY = 5 + + SATURDAY = 6 + + SUNDAY = 7 + end + end + + # Indicates that the delivery time should be calculated per warehouse + # (shipping origin location) based on the settings of the selected carrier. + # When set, no other transit time related field in `delivery_time` should be + # set. + # @!attribute [rw] carrier + # @return [::String] + # Required. Carrier, such as `"UPS"` or `"Fedex"`. + # @!attribute [rw] carrier_service + # @return [::String] + # Required. Carrier service, such as `"ground"` or `"2 days"`. The name of + # the service must be in the eddSupportedServices list. + # @!attribute [rw] warehouse + # @return [::String] + # Required. Warehouse name. This should match + # [warehouse][ShippingSetting.warehouses.name] + class WarehouseBasedDeliveryTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Shipping rate group definitions. Only the last one is allowed to have an + # empty `applicable_shipping_labels`, which means + # "everything else". The other `applicable_shipping_labels` must + # not overlap. + # @!attribute [rw] applicable_shipping_labels + # @return [::Array<::String>] + # Required. A list of [shipping + # labels](https://support.google.com/merchants/answer/6324504) defining the + # products to which this rate group applies to. This is a disjunction: only + # one of the labels has to match for the rate group to apply. May only be + # empty for the last rate group of a service. + # @!attribute [rw] single_value + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Value] + # The value of the rate group (For example flat rate $10). Can only be set + # if `main_table` and `subtables` are not set. + # @!attribute [rw] main_table + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Table] + # A table defining the rate group, when `single_value` is not + # expressive enough. Can only be set if `single_value` is not + # set. + # @!attribute [rw] subtables + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Table>] + # Optional. A list of subtables referred to by `main_table`. Can only + # be set if `main_table` is set. + # @!attribute [rw] carrier_rates + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CarrierRate>] + # Optional. A list of carrier rates that can be referred to by + # `main_table` or `single_value`. + # @!attribute [rw] name + # @return [::String] + # Optional. Name of the rate group. + # If set has to be unique within shipping service. + class RateGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A table defining the rate group, when `single_value` is not + # expressive enough. + # @!attribute [rw] name + # @return [::String] + # Name of the table. Required for subtables, ignored for the main table. + # @!attribute [rw] row_headers + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Headers] + # Required. Headers of the table's rows. + # @!attribute [rw] column_headers + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Headers] + # Headers of the table's columns. Optional: if not set then the table has + # only one dimension. + # @!attribute [rw] rows + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Row>] + # Required. The list of rows that constitute the table. Must have the same + # length as `row_headers`. + class Table + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Transit time table, number of business days spent in transit based on row + # and column dimensions. Either `min_transit_days`, `max_transit_days` or + # `transit_time_table` can be set, but not both. + # @!attribute [rw] postal_code_group_names + # @return [::Array<::String>] + # Required. A list of region names + # {::Google::Shopping::Merchant::Accounts::V1beta::Region#name Region.name} . The + # last value can be + # `"all other locations"`. Example: + # `["zone 1", "zone 2", "all other locations"]`. The referred + # postal code groups must match the delivery country of the service. + # @!attribute [rw] transit_time_labels + # @return [::Array<::String>] + # Required. A list of transit time labels. The last value can be + # `"all other labels"`. Example: + # `["food", "electronics", "all other labels"]`. + # @!attribute [rw] rows + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::TransitTable::TransitTimeRow>] + # Required. If there's only one dimension set of `postal_code_group_names` or + # `transit_time_labels`, there are multiple rows each with one value + # for that dimension. If there are two dimensions, each row corresponds to a + # `postal_code_group_names`, and columns (values) to a + # `transit_time_labels`. + class TransitTable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # If there's only one dimension set of `postal_code_group_names` or + # `transit_time_labels`, there are multiple rows each with one value + # for that dimension. If there are two dimensions, each row corresponds to a + # `postal_code_group_names`, and columns (values) to a + # `transit_time_labels`. + # @!attribute [rw] values + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::TransitTable::TransitTimeRow::TransitTimeValue>] + # Required. Transit time range (min-max) in business days. + class TransitTimeRow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Transit time range (min-max) in business days. + # @!attribute [rw] min_transit_days + # @return [::Integer] + # Minimum transit time range in business days. 0 means same + # day delivery, 1 means next day delivery. + # @!attribute [rw] max_transit_days + # @return [::Integer] + # Must be greater than or equal to `min_transit_days`. + class TransitTimeValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Table of per store minimum order values for the pickup fulfillment type. + # @!attribute [rw] store_code_set_with_movs + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::MinimumOrderValueTable::StoreCodeSetWithMov>] + # Required. A list of store code sets sharing the same minimum order value + # (MOV). At least two sets are required and the last one must be empty, which + # signifies 'MOV for all other stores'. Each store code can only appear once + # across all the sets. All prices within a service must have the same + # currency. + class MinimumOrderValueTable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A list of store code sets sharing the same minimum order value. At least + # two sets are required and the last one must be empty, which signifies + # 'MOV for all other stores'. + # Each store code can only appear once across all the sets. + # All prices within a service must have the same currency. + # @!attribute [rw] store_codes + # @return [::Array<::String>] + # Optional. A list of unique store codes or empty for the catch all. + # @!attribute [rw] value + # @return [::Google::Shopping::Type::Price] + # The minimum order value for the given stores. + class StoreCodeSetWithMov + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A non-empty list of row or column headers for a table. + # Exactly one of `prices`, `weights`, + # `num_items`, `postal_code_group_names`, or + # `location` must be set. + # @!attribute [rw] prices + # @return [::Array<::Google::Shopping::Type::Price>] + # Required. A list of inclusive order price upper bounds. The last price's + # value can be infinity by setting price amount_micros = -1. For example + # `[{"amount_micros": 10000000, "currency_code": "USD"}, + # \\{"amount_micros": 500000000, "currency_code": "USD"}, + # \\{"amount_micros": -1, "currency_code": "USD"}]` represents the headers + # "<= $10", "<= $500", and "> $500". All prices within a service must have + # the same currency. Must be non-empty. Must be positive except -1. Can only + # be set if all other fields are not set. + # @!attribute [rw] weights + # @return [::Array<::Google::Shopping::Type::Weight>] + # Required. A list of inclusive order weight upper bounds. The last weight's + # value can be infinity by setting price amount_micros = -1. For example + # `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, + # "unit": "kg"}, + # \\{"amount_micros": -1, "unit": "kg"}]` represents the headers + # "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have + # the same unit. Must be non-empty. Must be positive except -1. Can only be + # set if all other fields are not set. + # @!attribute [rw] number_of_items + # @return [::Array<::String>] + # Required. A list of inclusive number of items upper bounds. The last value + # can be + # `"infinity"`. For example + # `["10", "50", "infinity"]` represents the headers + # "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can + # only be set if all other fields are not set. + # @!attribute [rw] postal_code_group_names + # @return [::Array<::String>] + # Required. A list of postal group names. The last value can be + # `"all other locations"`. Example: + # `["zone 1", "zone 2", "all other locations"]`. The referred + # postal code groups must match the delivery country of the service. Must + # be non-empty. Can only be set if all other fields are not set. + # @!attribute [rw] locations + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::LocationIdSet>] + # Required. A list of location ID sets. Must be non-empty. Can only be set if + # all other fields are not set. + class Headers + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of location ID sets. Must be non-empty. Can only be set if all + # other fields are not set. + # @!attribute [rw] location_ids + # @return [::Array<::String>] + # Required. A non-empty list of + # [location + # IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). + # They must all be of the same location type (For + # example, state). + class LocationIdSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Include a list of cells. + # @!attribute [rw] cells + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Value>] + # Required. The list of cells that constitute the row. Must have the same + # length as `columnHeaders` for two-dimensional tables, a length of 1 for + # one-dimensional tables. + class Row + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The single value of a rate group or the value of a rate group table's cell. + # Exactly one of `no_shipping`, `flat_rate`, + # `price_percentage`, `carrier_rateName`, + # `subtable_name` must be set. + # @!attribute [rw] no_shipping + # @return [::Boolean] + # If true, then the product can't be shipped. Must be true when set, can only + # be set if all other fields are not set. + # @!attribute [rw] flat_rate + # @return [::Google::Shopping::Type::Price] + # A flat rate. Can only be set if all other fields are not set. + # @!attribute [rw] price_percentage + # @return [::String] + # A percentage of the price represented as a number in decimal notation + # (For example, `"5.4"`). Can only be set if all other fields are not + # set. + # @!attribute [rw] carrier_rate + # @return [::String] + # The name of a carrier rate referring to a carrier rate defined in the + # same rate group. Can only be set if all other fields are not set. + # @!attribute [rw] subtable + # @return [::String] + # The name of a subtable. Can only be set in table cells (For example, not + # for single values), and only if all other fields are not set. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of carrier rates that can be referred to by + # `main_table` or `single_value`. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the carrier rate. Must be unique per rate group. + # @!attribute [rw] carrier + # @return [::String] + # Required. Carrier service, such as `"UPS"` or `"Fedex"`. + # @!attribute [rw] carrier_service + # @return [::String] + # Required. Carrier service, such as `"ground"` or `"2 days"`. + # @!attribute [rw] origin_postal_code + # @return [::String] + # Required. Shipping origin for this carrier rate. + # @!attribute [rw] percentage_adjustment + # @return [::String] + # Optional. Multiplicative shipping rate modifier as a number in decimal + # notation. Can be negative. For example `"5.4"` increases the rate by 5.4%, + # `"-3"` decreases the rate by 3%. + # @!attribute [rw] flat_adjustment + # @return [::Google::Shopping::Type::Price] + # Optional. Additive shipping rate modifier. Can be negative. For example + # `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate, + # `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the + # rate. + class CarrierRate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetShippingSetting` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the shipping setting to retrieve. + # Format: `accounts/{account}/shippingsetting` + class GetShippingSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertShippingSetting` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account where this product will be inserted. + # Format: accounts/\\{account} + # @!attribute [rw] shipping_setting + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # Required. The new version of the account. + class InsertShippingSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb new file mode 100644 index 000000000000..5cbe635b16ed --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Primary type convension + # + # percent micro : 100% = 1 000 000 and 1% = 10 000 + # cannot be negative. + # + # Information about tax nexus and related parameters applicable to orders + # delivered to the area covered by a single tax admin. Nexus is created when a + # merchant is doing business in an area administered by tax admin (only US + # states are supported for nexus configuration). If merchant has nexus in a US + # state, merchant needs to pay tax to all tax authorities associated with + # the shipping destination. + # Next Id : 8 + # @!attribute [rw] location_id + # @return [::Integer] + # The admin_id or criteria_id of the region in which this rule is + # applicable. + # + # Note: The following fields are mutually exclusive: `location_id`, `post_code_range`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] post_code_range + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TaxRule::TaxPostalCodeRange] + # The range of postal codes in which this rule is applicable. + # + # Note: The following fields are mutually exclusive: `post_code_range`, `location_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] use_google_rate + # @return [::Boolean] + # Rate that depends on delivery location: if merchant has a nexus in + # corresponding US state, rates from authorities with jurisdiction over + # delivery area are added up. + # + # Note: The following fields are mutually exclusive: `use_google_rate`, `self_specified_rate_micros`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] self_specified_rate_micros + # @return [::Integer] + # A fixed rate specified in micros, where 100% = 1_000_000. + # Suitable for origin-based states. + # + # Note: The following fields are mutually exclusive: `self_specified_rate_micros`, `use_google_rate`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] region_code + # @return [::String] + # Region code in which this rule is applicable + # @!attribute [rw] shipping_taxed + # @return [::Boolean] + # If set, shipping charge is taxed (at the same rate as product) when + # delivering to this admin's area. + # Can only be set on US states without category. + # @!attribute [rw] effective_time_period + # @return [::Google::Type::Interval] + # Required. Time period when this rule is effective. If the duration is + # missing from effective_time listed, then it is open ended to the future. + # The start of this time period is inclusive, and the end is exclusive. + class TaxRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A range of postal codes that defines the area. + # @!attribute [rw] start + # @return [::String] + # Required. The start of the postal code range, which is also the smallest + # in the range. + # @!attribute [rw] end + # @return [::String] + # The end of the postal code range. Will be the same as start if not + # specified. + class TaxPostalCodeRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb new file mode 100644 index 000000000000..1b414fd1bccf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb @@ -0,0 +1,99 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # A `TermsOfService`. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @!attribute [rw] region_code + # @return [::String] + # Region code as defined by [CLDR](https://cldr.unicode.org/). This is either + # a country where the ToS applies specifically to that country or `001` when + # the same `TermsOfService` can be signed in any country. However note that + # when signing a ToS that applies globally we still expect that a specific + # country is provided (this should be merchant business country or program + # country of participation). + # @!attribute [rw] kind + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] + # The Kind this terms of service version applies to. + # @!attribute [rw] file_uri + # @return [::String] + # URI for terms of service file that needs to be displayed to signing users. + # @!attribute [rw] external + # @return [::Boolean] + # Whether this terms of service version is external. External terms of + # service versions can only be agreed through external processes and not + # directly by the merchant through UI or API. + class TermsOfService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetTermsOfService` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + class GetTermsOfServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `RetrieveLatestTermsOfService` method. + # @!attribute [rw] region_code + # @return [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # @!attribute [rw] kind + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] + # Required. The Kind this terms of service version applies to. + class RetrieveLatestTermsOfServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `AcceptTermsOfService` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @!attribute [rw] account + # @return [::String] + # Required. The account for which to accept the ToS. + # @!attribute [rw] region_code + # @return [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + class AcceptTermsOfServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb new file mode 100644 index 000000000000..0390b017c401 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.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 Shopping + module Merchant + module Accounts + module V1beta + # This resource represents the agreement state for a given account and terms of + # service kind. + # The state is as follows: + # + # * If the merchant has accepted a terms of service: + # [accepted](TermsOfServiceAggrementState.accepted) will be populated, + # otherwise it will be empty + # * If the merchant must sign a terms of service: + # [required](TermsOfServiceAggrementState.required) will be populated, + # otherwise it will be empty. + # + # Note that both [required](TermsOfServiceAggrementState.required) and + # [accepted](TermsOfServiceAggrementState.accepted) can be present. In this + # case the `accepted` terms of services will have an expiration date set in the + # [valid_until](Accepted.valid_until) field. The `required` terms of services + # need to be accepted before `valid_until` in order for the account to continue + # having a valid agreement. When accepting new terms of services we expect 3Ps + # to display the text associated with the given terms of service agreement (the + # url to the file containing the text is added in the Required message below as + # [tos_file_uri](Accepted.tos_file_uri). The actual acceptance of the terms of + # service is done by calling accept on the [TermsOfService](TermsOfService) + # resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the terms of service version. + # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` + # The identifier format is: `{TermsOfServiceKind}-{country}` + # For example, an identifier could be: `MERCHANT_CENTER-US` + # @!attribute [rw] region_code + # @return [::String] + # Region code as defined by https://cldr.unicode.org/. This is the + # country the current state applies to. + # @!attribute [rw] terms_of_service_kind + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] + # Terms of Service kind associated with the particular version. + # @!attribute [rw] accepted + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Accepted] + # The accepted terms of service of this kind and for the associated + # region_code + # @!attribute [rw] required + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Required] + # The required terms of service + class TermsOfServiceAgreementState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the accepted terms of service. + # @!attribute [rw] terms_of_service + # @return [::String] + # The accepted + # [termsOfService](google.shopping.merchant.accounts.v1main.TermsOfService). + # @!attribute [rw] accepted_by + # @return [::String] + # The account where the acceptance was recorded. This can be the account + # itself or, in the case of subaccounts, the MCA account. + # @!attribute [rw] valid_until + # @return [::Google::Type::Date] + # When set, it states that the accepted + # [TermsOfService](google.shopping.merchant.accounts.v1main.TermsOfService) + # is only valid until the end of this date (in UTC). A new one must be + # accepted before then. The information of the required + # [TermsOfService](google.shopping.merchant.accounts.v1main.TermsOfService) + # is found in the [Required](Required) message. + class Accepted + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the terms of service which are required to be accepted. + # @!attribute [rw] terms_of_service + # @return [::String] + # The + # [termsOfService](google.shopping.merchant.accounts.v1main.TermsOfService) + # that need to be accepted. + # @!attribute [rw] tos_file_uri + # @return [::String] + # Full URL to the terms of service file. This field is the same as + # [TermsOfService.file_uri](TermsOfService.file_uri), it is added + # here for convenience only. + class Required + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetTermsOfServiceAgreementState` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the terms of service version. + # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` + # The identifier format is: `{TermsOfServiceKind}-{country}` + class GetTermsOfServiceAgreementStateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `RetrieveForApplicationTermsOfServiceAgreementState` + # method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account for which to get a TermsOfServiceAgreementState + # Format: `accounts/{account}` + class RetrieveForApplicationTermsOfServiceAgreementStateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb new file mode 100644 index 000000000000..636da0a3420a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # The TermsOfService Kind. + module TermsOfServiceKind + # Default value. This value is unused. + TERMS_OF_SERVICE_KIND_UNSPECIFIED = 0 + + # Merchant Center application. + MERCHANT_CENTER = 1 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb new file mode 100644 index 000000000000..549b2ff4eff2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb @@ -0,0 +1,156 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # A [user](https://support.google.com/merchants/answer/12160472). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the user. + # Format: `accounts/{account}/user/{email}` + # + # Use `me` to refer to your own email address, for example + # `accounts/{account}/users/me`. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User::State] + # Output only. The state of the user. + # @!attribute [rw] access_rights + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccessRight>] + # Optional. The [access + # rights](https://support.google.com/merchants/answer/12160472?sjid=6789834943175119429-EU#accesstypes) + # the user has. + class User + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible states of a user. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The user is pending confirmation. In this state, the user first needs to + # accept the invitation before performing other actions. + PENDING = 1 + + # The user is verified. + VERIFIED = 2 + end + end + + # Request message for the `GetUser` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the user to retrieve. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to retrieve the user corresponding to the caller by + # using `me` rather than an email address as in + # `accounts/{account}/users/me`. + class GetUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateUser` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the account for which a user will be + # created. Format: `accounts/{account}` + # @!attribute [rw] user_id + # @return [::String] + # Required. The email address of the user (for example, + # `john.doe@gmail.com`). + # @!attribute [rw] user + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # Required. The user to create. + class CreateUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteUser` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the user to delete. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to delete the user corresponding to the caller by using + # `me` rather than an email address as in `accounts/{account}/users/me`. + class DeleteUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateUser` method. + # @!attribute [rw] user + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # Required. The new version of the user. + # + # Use `me` to refer to your own email address, for example + # `accounts/{account}/users/me`. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListUsers` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of users. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of users to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListUsers` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListUsers` must match + # the call that provided the page token. + class ListUsersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListUsers` method. + # @!attribute [rw] users + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::User>] + # The users from the specified account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListUsersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb new file mode 100644 index 000000000000..50aab1617c36 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Settings related to the verification email that is sent after adding a user. + # @!attribute [rw] verification_mail_mode + # @return [::Google::Shopping::Merchant::Accounts::V1beta::VerificationMailSettings::VerificationMailMode] + # Optional. Mode of the verification mail. If not set, the default is + # `SEND_VERIFICATION_MAIL`. + class VerificationMailSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The different configuration options for sending a verification email + # when adding a user. + module VerificationMailMode + # Default first member of every enum. Do not use. + VERIFICATION_MAIL_MODE_UNSPECIFIED = 0 + + # An invitation email is sent to the user added shortly after. + SEND_VERIFICATION_MAIL = 1 + + # No invitation email is sent. This can be useful if the user is + # expected to accept the invitation through the API without needing + # another notification. + SUPPRESS_VERIFICATION_MAIL = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.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! + + +module Google + module Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + + # Youtube shopping checkout. + YOUTUBE_SHOPPING_CHECKOUT = 7 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 8 + + # [Free vehicle + # listings](https://support.google.com/merchants/answer/11189169). + FREE_VEHICLE_LISTINGS = 9 + + # [Vehicle ads](https://support.google.com/merchants/answer/11189169). + VEHICLE_ADS = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free product listings on UCP + # checkout](https://developers.google.com/merchant/ucp). + FREE_LISTINGS_UCP_CHECKOUT = 19 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 18 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + + # [Product + # Reviews](https://support.google.com/merchants/answer/14620732). + PRODUCT_REVIEWS = 15 + + # [Merchant + # Reviews](https://developers.google.com/merchant-review-feeds). + MERCHANT_REVIEWS = 16 + + # YouTube Checkout + # . + YOUTUBE_CHECKOUT = 17 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..1d0a9780457f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values + # * A month and day value, with a zero year, such as an anniversary + # * A year on its own, with zero month and day values + # * A year and month value, with a zero day, such as a credit card expiration + # date + # + # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and + # `google.protobuf.Timestamp`. + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb new file mode 100644 index 000000000000..d15ba7af54e4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..9350ca479005 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a time interval, encoded as a Timestamp start (inclusive) and a + # Timestamp end (exclusive). + # + # The start must be less than or equal to the end. + # When the start equals the end, the interval is empty (matches no time). + # When both start and end are unspecified, the interval matches any time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Inclusive start of the interval. + # + # If specified, a Timestamp matching this interval will have to be the same + # or after the start. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Exclusive end of the interval. + # + # If specified, a Timestamp matching this interval will have to be before the + # end. + class Interval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb new file mode 100644 index 000000000000..41b7c4af138c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb @@ -0,0 +1,116 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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 representing a phone number, suitable as an API wire format. + # + # This representation: + # + # - should not be used for locale-specific formatting of a phone number, such + # as "+1 (650) 253-0000 ext. 123" + # + # - is not designed for efficient storage + # - may not be suitable for dialing - specialized libraries (see references) + # should be used to parse the number for that purpose + # + # To do something meaningful with this number, such as format it for various + # use-cases, convert it to an `i18n.phonenumbers.PhoneNumber` object first. + # + # For instance, in Java this would be: + # + # com.google.type.PhoneNumber wireProto = + # com.google.type.PhoneNumber.newBuilder().build(); + # com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber = + # PhoneNumberUtil.getInstance().parse(wireProto.getE164Number(), "ZZ"); + # if (!wireProto.getExtension().isEmpty()) { + # phoneNumber.setExtension(wireProto.getExtension()); + # } + # + # Reference(s): + # - https://github.com/google/libphonenumber + # @!attribute [rw] e164_number + # @return [::String] + # The phone number, represented as a leading plus sign ('+'), followed by a + # phone number that uses a relaxed ITU E.164 format consisting of the + # country calling code (1 to 3 digits) and the subscriber number, with no + # additional spaces or formatting, e.g.: + # - correct: "+15552220123" + # - incorrect: "+1 (555) 222-01234 x123". + # + # The ITU E.164 format limits the latter to 12 digits, but in practice not + # all countries respect that, so we relax that restriction here. + # National-only numbers are not allowed. + # + # References: + # - https://www.itu.int/rec/T-REC-E.164-201011-I + # - https://en.wikipedia.org/wiki/E.164. + # - https://en.wikipedia.org/wiki/List_of_country_calling_codes + # + # Note: The following fields are mutually exclusive: `e164_number`, `short_code`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] short_code + # @return [::Google::Type::PhoneNumber::ShortCode] + # A short code. + # + # Reference(s): + # - https://en.wikipedia.org/wiki/Short_code + # + # Note: The following fields are mutually exclusive: `short_code`, `e164_number`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] extension + # @return [::String] + # The phone number's extension. The extension is not standardized in ITU + # recommendations, except for being defined as a series of numbers with a + # maximum length of 40 digits. Other than digits, some other dialing + # characters such as ',' (indicating a wait) or '#' may be stored here. + # + # Note that no regions currently use extensions with short codes, so this + # field is normally only set in conjunction with an E.164 number. It is held + # separately from the E.164 number to allow for short code extensions in the + # future. + class PhoneNumber + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An object representing a short code, which is a phone number that is + # typically much shorter than regular phone numbers and can be used to + # address messages in MMS and SMS systems, as well as for abbreviated dialing + # (e.g. "Text 611 to see how many minutes you have remaining on your plan."). + # + # Short codes are restricted to a region and are not internationally + # dialable, which means the same short code can exist in different regions, + # with different usage and pricing, even if those regions share the same + # country calling code (e.g. US and CA). + # @!attribute [rw] region_code + # @return [::String] + # Required. The BCP-47 region code of the location where calls to this + # short code can be made, such as "US" and "BB". + # + # Reference(s): + # - http://www.unicode.org/reports/tr35/#unicode_region_subtag + # @!attribute [rw] number + # @return [::String] + # Required. The short code digits, without a leading plus ('+') or country + # calling code, e.g. "611". + class ShortCode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb new file mode 100644 index 000000000000..9cd0c16495dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..1661c67a33c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta", path: "../" +else + gem "google-shopping-merchant-accounts-v1beta" +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-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb new file mode 100644 index 000000000000..d2c2f5b7044e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.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 merchantapi_v1beta_generated_AccountIssueService_ListAccountIssues_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_account_issues call in the AccountIssueService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client#list_account_issues. +# +def list_account_issues + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new + + # Call the list_account_issues method. + result = client.list_account_issues request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue. + p item + end +end +# [END merchantapi_v1beta_generated_AccountIssueService_ListAccountIssues_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb new file mode 100644 index 000000000000..a6ee5c5ad6a3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AccountTaxService_GetAccountTax_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_account_tax call in the AccountTaxService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#get_account_tax. +# +def get_account_tax + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new + + # Call the get_account_tax method. + result = client.get_account_tax request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + p result +end +# [END merchantapi_v1beta_generated_AccountTaxService_GetAccountTax_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb new file mode 100644 index 000000000000..05f1f64c9431 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.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 merchantapi_v1beta_generated_AccountTaxService_ListAccountTax_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_account_tax call in the AccountTaxService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#list_account_tax. +# +def list_account_tax + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new + + # Call the list_account_tax method. + result = client.list_account_tax request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + p item + end +end +# [END merchantapi_v1beta_generated_AccountTaxService_ListAccountTax_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb new file mode 100644 index 000000000000..eac84cb07759 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AccountTaxService_UpdateAccountTax_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_account_tax call in the AccountTaxService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#update_account_tax. +# +def update_account_tax + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new + + # Call the update_account_tax method. + result = client.update_account_tax request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + p result +end +# [END merchantapi_v1beta_generated_AccountTaxService_UpdateAccountTax_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb new file mode 100644 index 000000000000..c4b1730282e8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AccountsService_CreateAndConfigureAccount_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the create_and_configure_account call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#create_and_configure_account. +# +def create_and_configure_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new + + # Call the create_and_configure_account method. + result = client.create_and_configure_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + p result +end +# [END merchantapi_v1beta_generated_AccountsService_CreateAndConfigureAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb new file mode 100644 index 000000000000..be1e82db0406 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AccountsService_DeleteAccount_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the delete_account call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#delete_account. +# +def delete_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new + + # Call the delete_account method. + result = client.delete_account request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_AccountsService_DeleteAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb new file mode 100644 index 000000000000..ce0c105100dc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AccountsService_GetAccount_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_account call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#get_account. +# +def get_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new + + # Call the get_account method. + result = client.get_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + p result +end +# [END merchantapi_v1beta_generated_AccountsService_GetAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb new file mode 100644 index 000000000000..507751cb8634 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.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 merchantapi_v1beta_generated_AccountsService_ListAccounts_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_accounts call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_accounts. +# +def list_accounts + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new + + # Call the list_accounts method. + result = client.list_accounts request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. + p item + end +end +# [END merchantapi_v1beta_generated_AccountsService_ListAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb new file mode 100644 index 000000000000..8db5c917e70c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.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 merchantapi_v1beta_generated_AccountsService_ListSubAccounts_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_sub_accounts call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_sub_accounts. +# +def list_sub_accounts + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new + + # Call the list_sub_accounts method. + result = client.list_sub_accounts request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. + p item + end +end +# [END merchantapi_v1beta_generated_AccountsService_ListSubAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb new file mode 100644 index 000000000000..d17466b32f14 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AccountsService_UpdateAccount_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_account call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#update_account. +# +def update_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new + + # Call the update_account method. + result = client.update_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + p result +end +# [END merchantapi_v1beta_generated_AccountsService_UpdateAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb new file mode 100644 index 000000000000..74c288fe1afe --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AutofeedSettingsService_GetAutofeedSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_autofeed_settings call in the AutofeedSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#get_autofeed_settings. +# +def get_autofeed_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new + + # Call the get_autofeed_settings method. + result = client.get_autofeed_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. + p result +end +# [END merchantapi_v1beta_generated_AutofeedSettingsService_GetAutofeedSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb new file mode 100644 index 000000000000..fdcde06c5e91 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_autofeed_settings call in the AutofeedSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#update_autofeed_settings. +# +def update_autofeed_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new + + # Call the update_autofeed_settings method. + result = client.update_autofeed_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. + p result +end +# [END merchantapi_v1beta_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb new file mode 100644 index 000000000000..aae1e325fdef --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_automatic_improvements call in the AutomaticImprovementsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#get_automatic_improvements. +# +def get_automatic_improvements + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new + + # Call the get_automatic_improvements method. + result = client.get_automatic_improvements request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. + p result +end +# [END merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb new file mode 100644 index 000000000000..846c9557c5b8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_automatic_improvements call in the AutomaticImprovementsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#update_automatic_improvements. +# +def update_automatic_improvements + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new + + # Call the update_automatic_improvements method. + result = client.update_automatic_improvements request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. + p result +end +# [END merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb new file mode 100644 index 000000000000..b23cc7bee95a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_BusinessIdentityService_GetBusinessIdentity_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_business_identity call in the BusinessIdentityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#get_business_identity. +# +def get_business_identity + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new + + # Call the get_business_identity method. + result = client.get_business_identity request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. + p result +end +# [END merchantapi_v1beta_generated_BusinessIdentityService_GetBusinessIdentity_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb new file mode 100644 index 000000000000..b6b4835aabd4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_BusinessIdentityService_UpdateBusinessIdentity_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_business_identity call in the BusinessIdentityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#update_business_identity. +# +def update_business_identity + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new + + # Call the update_business_identity method. + result = client.update_business_identity request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. + p result +end +# [END merchantapi_v1beta_generated_BusinessIdentityService_UpdateBusinessIdentity_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb new file mode 100644 index 000000000000..7c8d4345e227 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_BusinessInfoService_GetBusinessInfo_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_business_info call in the BusinessInfoService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#get_business_info. +# +def get_business_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new + + # Call the get_business_info method. + result = client.get_business_info request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. + p result +end +# [END merchantapi_v1beta_generated_BusinessInfoService_GetBusinessInfo_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb new file mode 100644 index 000000000000..cd34a45a3abd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_BusinessInfoService_UpdateBusinessInfo_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_business_info call in the BusinessInfoService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#update_business_info. +# +def update_business_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new + + # Call the update_business_info method. + result = client.update_business_info request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. + p result +end +# [END merchantapi_v1beta_generated_BusinessInfoService_UpdateBusinessInfo_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb new file mode 100644 index 000000000000..ea2f979f5cd7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the create_checkout_settings call in the CheckoutSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings. +# +def create_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new + + # Call the create_checkout_settings method. + result = client.create_checkout_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + p result +end +# [END merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb new file mode 100644 index 000000000000..b7b8c95e0bf3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the delete_checkout_settings call in the CheckoutSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings. +# +def delete_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new + + # Call the delete_checkout_settings method. + result = client.delete_checkout_settings request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb new file mode 100644 index 000000000000..c7b80b5590d4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_checkout_settings call in the CheckoutSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings. +# +def get_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new + + # Call the get_checkout_settings method. + result = client.get_checkout_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + p result +end +# [END merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb new file mode 100644 index 000000000000..4bdc2f2116dc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_checkout_settings call in the CheckoutSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings. +# +def update_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new + + # Call the update_checkout_settings method. + result = client.update_checkout_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + p result +end +# [END merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb new file mode 100644 index 000000000000..f1cfbb47c184 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_EmailPreferencesService_GetEmailPreferences_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_email_preferences call in the EmailPreferencesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#get_email_preferences. +# +def get_email_preferences + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new + + # Call the get_email_preferences method. + result = client.get_email_preferences request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. + p result +end +# [END merchantapi_v1beta_generated_EmailPreferencesService_GetEmailPreferences_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb new file mode 100644 index 000000000000..efce339f0560 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_EmailPreferencesService_UpdateEmailPreferences_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_email_preferences call in the EmailPreferencesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#update_email_preferences. +# +def update_email_preferences + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new + + # Call the update_email_preferences method. + result = client.update_email_preferences request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. + p result +end +# [END merchantapi_v1beta_generated_EmailPreferencesService_UpdateEmailPreferences_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb new file mode 100644 index 000000000000..cb5845dd1e9e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_GbpAccountsService_LinkGbpAccount_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the link_gbp_account call in the GbpAccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#link_gbp_account. +# +def link_gbp_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new + + # Call the link_gbp_account method. + result = client.link_gbp_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse. + p result +end +# [END merchantapi_v1beta_generated_GbpAccountsService_LinkGbpAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb new file mode 100644 index 000000000000..db5611b0eb27 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.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 merchantapi_v1beta_generated_GbpAccountsService_ListGbpAccounts_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_gbp_accounts call in the GbpAccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#list_gbp_accounts. +# +def list_gbp_accounts + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new + + # Call the list_gbp_accounts method. + result = client.list_gbp_accounts request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount. + p item + end +end +# [END merchantapi_v1beta_generated_GbpAccountsService_ListGbpAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb new file mode 100644 index 000000000000..5d6017d56856 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_HomepageService_ClaimHomepage_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the claim_homepage call in the HomepageService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#claim_homepage. +# +def claim_homepage + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new + + # Call the claim_homepage method. + result = client.claim_homepage request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + p result +end +# [END merchantapi_v1beta_generated_HomepageService_ClaimHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb new file mode 100644 index 000000000000..b371da4cfb57 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_HomepageService_GetHomepage_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_homepage call in the HomepageService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#get_homepage. +# +def get_homepage + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new + + # Call the get_homepage method. + result = client.get_homepage request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + p result +end +# [END merchantapi_v1beta_generated_HomepageService_GetHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb new file mode 100644 index 000000000000..7119627b9aeb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_HomepageService_UnclaimHomepage_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the unclaim_homepage call in the HomepageService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#unclaim_homepage. +# +def unclaim_homepage + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new + + # Call the unclaim_homepage method. + result = client.unclaim_homepage request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + p result +end +# [END merchantapi_v1beta_generated_HomepageService_UnclaimHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb new file mode 100644 index 000000000000..19c3e42071a9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_HomepageService_UpdateHomepage_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_homepage call in the HomepageService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#update_homepage. +# +def update_homepage + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new + + # Call the update_homepage method. + result = client.update_homepage request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + p result +end +# [END merchantapi_v1beta_generated_HomepageService_UpdateHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb new file mode 100644 index 000000000000..e093657726da --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LfpProvidersService_FindLfpProviders_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the find_lfp_providers call in the LfpProvidersService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#find_lfp_providers. +# +def find_lfp_providers + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new + + # Call the find_lfp_providers method. + result = client.find_lfp_providers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider. + p item + end +end +# [END merchantapi_v1beta_generated_LfpProvidersService_FindLfpProviders_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb new file mode 100644 index 000000000000..0e786754f919 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LfpProvidersService_LinkLfpProvider_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the link_lfp_provider call in the LfpProvidersService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#link_lfp_provider. +# +def link_lfp_provider + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new + + # Call the link_lfp_provider method. + result = client.link_lfp_provider request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse. + p result +end +# [END merchantapi_v1beta_generated_LfpProvidersService_LinkLfpProvider_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb new file mode 100644 index 000000000000..925b54971955 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the create_omnichannel_setting call in the OmnichannelSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#create_omnichannel_setting. +# +def create_omnichannel_setting + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new + + # Call the create_omnichannel_setting method. + result = client.create_omnichannel_setting request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + p result +end +# [END merchantapi_v1beta_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb new file mode 100644 index 000000000000..f41ee01542d3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_omnichannel_setting call in the OmnichannelSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#get_omnichannel_setting. +# +def get_omnichannel_setting + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new + + # Call the get_omnichannel_setting method. + result = client.get_omnichannel_setting request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + p result +end +# [END merchantapi_v1beta_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb new file mode 100644 index 000000000000..3b764f8ff84d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.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 merchantapi_v1beta_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_omnichannel_settings call in the OmnichannelSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#list_omnichannel_settings. +# +def list_omnichannel_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new + + # Call the list_omnichannel_settings method. + result = client.list_omnichannel_settings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + p item + end +end +# [END merchantapi_v1beta_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb new file mode 100644 index 000000000000..61b421be1805 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_OmnichannelSettingsService_RequestInventoryVerification_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the request_inventory_verification call in the OmnichannelSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#request_inventory_verification. +# +def request_inventory_verification + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new + + # Call the request_inventory_verification method. + result = client.request_inventory_verification request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse. + p result +end +# [END merchantapi_v1beta_generated_OmnichannelSettingsService_RequestInventoryVerification_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb new file mode 100644 index 000000000000..c9ab04368e53 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_omnichannel_setting call in the OmnichannelSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#update_omnichannel_setting. +# +def update_omnichannel_setting + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new + + # Call the update_omnichannel_setting method. + result = client.update_omnichannel_setting request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + p result +end +# [END merchantapi_v1beta_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb new file mode 100644 index 000000000000..83bc00b2c1df --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_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 merchantapi_v1beta_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the create_online_return_policy call in the OnlineReturnPolicyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#create_online_return_policy. +# +def create_online_return_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new + + # Call the create_online_return_policy method. + result = client.create_online_return_policy request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + p result +end +# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb new file mode 100644 index 000000000000..642b3bdcdc00 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_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 merchantapi_v1beta_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the delete_online_return_policy call in the OnlineReturnPolicyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#delete_online_return_policy. +# +def delete_online_return_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new + + # Call the delete_online_return_policy method. + result = client.delete_online_return_policy request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb new file mode 100644 index 000000000000..2105a2c947a5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_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 merchantapi_v1beta_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_online_return_policy call in the OnlineReturnPolicyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#get_online_return_policy. +# +def get_online_return_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new + + # Call the get_online_return_policy method. + result = client.get_online_return_policy request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + p result +end +# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb new file mode 100644 index 000000000000..f9a0b2b0a844 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.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 merchantapi_v1beta_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_online_return_policies call in the OnlineReturnPolicyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#list_online_return_policies. +# +def list_online_return_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new + + # Call the list_online_return_policies method. + result = client.list_online_return_policies request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + p item + end +end +# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb new file mode 100644 index 000000000000..4034ff554461 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_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 merchantapi_v1beta_generated_OnlineReturnPolicyService_UpdateOnlineReturnPolicy_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_online_return_policy call in the OnlineReturnPolicyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#update_online_return_policy. +# +def update_online_return_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new + + # Call the update_online_return_policy method. + result = client.update_online_return_policy request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + p result +end +# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_UpdateOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb new file mode 100644 index 000000000000..775a998697dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ProgramsService_DisableProgram_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the disable_program call in the ProgramsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#disable_program. +# +def disable_program + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new + + # Call the disable_program method. + result = client.disable_program request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + p result +end +# [END merchantapi_v1beta_generated_ProgramsService_DisableProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb new file mode 100644 index 000000000000..d1bdf22bfbc7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ProgramsService_EnableProgram_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the enable_program call in the ProgramsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#enable_program. +# +def enable_program + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new + + # Call the enable_program method. + result = client.enable_program request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + p result +end +# [END merchantapi_v1beta_generated_ProgramsService_EnableProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb new file mode 100644 index 000000000000..ca8e55bfb1f4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ProgramsService_GetProgram_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_program call in the ProgramsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#get_program. +# +def get_program + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new + + # Call the get_program method. + result = client.get_program request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + p result +end +# [END merchantapi_v1beta_generated_ProgramsService_GetProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb new file mode 100644 index 000000000000..f3249c03a812 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.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 merchantapi_v1beta_generated_ProgramsService_ListPrograms_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_programs call in the ProgramsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#list_programs. +# +def list_programs + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new + + # Call the list_programs method. + result = client.list_programs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Program. + p item + end +end +# [END merchantapi_v1beta_generated_ProgramsService_ListPrograms_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb new file mode 100644 index 000000000000..8b0ad849b120 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_RegionsService_CreateRegion_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the create_region call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#create_region. +# +def create_region + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new + + # Call the create_region method. + result = client.create_region request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + p result +end +# [END merchantapi_v1beta_generated_RegionsService_CreateRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb new file mode 100644 index 000000000000..97ee0432dab6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_RegionsService_DeleteRegion_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the delete_region call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#delete_region. +# +def delete_region + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new + + # Call the delete_region method. + result = client.delete_region request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_RegionsService_DeleteRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb new file mode 100644 index 000000000000..6929030f8c97 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_RegionsService_GetRegion_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_region call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#get_region. +# +def get_region + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new + + # Call the get_region method. + result = client.get_region request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + p result +end +# [END merchantapi_v1beta_generated_RegionsService_GetRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb new file mode 100644 index 000000000000..390e2d0f9420 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.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 merchantapi_v1beta_generated_RegionsService_ListRegions_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_regions call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#list_regions. +# +def list_regions + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new + + # Call the list_regions method. + result = client.list_regions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Region. + p item + end +end +# [END merchantapi_v1beta_generated_RegionsService_ListRegions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb new file mode 100644 index 000000000000..ef1e556cc578 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_RegionsService_UpdateRegion_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_region call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#update_region. +# +def update_region + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new + + # Call the update_region method. + result = client.update_region request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + p result +end +# [END merchantapi_v1beta_generated_RegionsService_UpdateRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb new file mode 100644 index 000000000000..e6cbd703b4dc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ShippingSettingsService_GetShippingSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_shipping_settings call in the ShippingSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#get_shipping_settings. +# +def get_shipping_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new + + # Call the get_shipping_settings method. + result = client.get_shipping_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. + p result +end +# [END merchantapi_v1beta_generated_ShippingSettingsService_GetShippingSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb new file mode 100644 index 000000000000..592e8881b30b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ShippingSettingsService_InsertShippingSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the insert_shipping_settings call in the ShippingSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#insert_shipping_settings. +# +def insert_shipping_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new + + # Call the insert_shipping_settings method. + result = client.insert_shipping_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. + p result +end +# [END merchantapi_v1beta_generated_ShippingSettingsService_InsertShippingSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json new file mode 100644 index 000000000000..519af736323e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json @@ -0,0 +1,2535 @@ +{ + "client_library": { + "name": "google-shopping-merchant-accounts-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.accounts.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_AccountTaxService_GetAccountTax_sync", + "title": "Snippet for the get_account_tax call in the AccountTaxService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#get_account_tax.", + "file": "account_tax_service/get_account_tax.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_account_tax", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#get_account_tax", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTax", + "client": { + "short_name": "AccountTaxService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client" + }, + "method": { + "short_name": "GetAccountTax", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService.GetAccountTax", + "service": { + "short_name": "AccountTaxService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountTaxService_ListAccountTax_sync", + "title": "Snippet for the list_account_tax call in the AccountTaxService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#list_account_tax.", + "file": "account_tax_service/list_account_tax.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_account_tax", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#list_account_tax", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse", + "client": { + "short_name": "AccountTaxService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client" + }, + "method": { + "short_name": "ListAccountTax", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService.ListAccountTax", + "service": { + "short_name": "AccountTaxService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountTaxService_UpdateAccountTax_sync", + "title": "Snippet for the update_account_tax call in the AccountTaxService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#update_account_tax.", + "file": "account_tax_service/update_account_tax.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_account_tax", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#update_account_tax", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTax", + "client": { + "short_name": "AccountTaxService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client" + }, + "method": { + "short_name": "UpdateAccountTax", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService.UpdateAccountTax", + "service": { + "short_name": "AccountTaxService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountIssueService_ListAccountIssues_sync", + "title": "Snippet for the list_account_issues call in the AccountIssueService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client#list_account_issues.", + "file": "account_issue_service/list_account_issues.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_account_issues", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client#list_account_issues", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse", + "client": { + "short_name": "AccountIssueService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client" + }, + "method": { + "short_name": "ListAccountIssues", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountIssueService.ListAccountIssues", + "service": { + "short_name": "AccountIssueService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountIssueService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_UserService_GetUser_sync", + "title": "Snippet for the get_user call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#get_user.", + "file": "user_service/get_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_user", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#get_user", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::User", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" + }, + "method": { + "short_name": "GetUser", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService.GetUser", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_UserService_CreateUser_sync", + "title": "Snippet for the create_user call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#create_user.", + "file": "user_service/create_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_user", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#create_user", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::User", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" + }, + "method": { + "short_name": "CreateUser", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService.CreateUser", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_UserService_DeleteUser_sync", + "title": "Snippet for the delete_user call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#delete_user.", + "file": "user_service/delete_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_user", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#delete_user", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" + }, + "method": { + "short_name": "DeleteUser", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService.DeleteUser", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_UserService_UpdateUser_sync", + "title": "Snippet for the update_user call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#update_user.", + "file": "user_service/update_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_user", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#update_user", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::User", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" + }, + "method": { + "short_name": "UpdateUser", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService.UpdateUser", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_UserService_ListUsers_sync", + "title": "Snippet for the list_users call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#list_users.", + "file": "user_service/list_users.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_users", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#list_users", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" + }, + "method": { + "short_name": "ListUsers", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService.ListUsers", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountsService_GetAccount_sync", + "title": "Snippet for the get_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#get_account.", + "file": "accounts_service/get_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#get_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" + }, + "method": { + "short_name": "GetAccount", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.GetAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountsService_CreateAndConfigureAccount_sync", + "title": "Snippet for the create_and_configure_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#create_and_configure_account.", + "file": "accounts_service/create_and_configure_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_and_configure_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#create_and_configure_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" + }, + "method": { + "short_name": "CreateAndConfigureAccount", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.CreateAndConfigureAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountsService_DeleteAccount_sync", + "title": "Snippet for the delete_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#delete_account.", + "file": "accounts_service/delete_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#delete_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" + }, + "method": { + "short_name": "DeleteAccount", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.DeleteAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountsService_UpdateAccount_sync", + "title": "Snippet for the update_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#update_account.", + "file": "accounts_service/update_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#update_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" + }, + "method": { + "short_name": "UpdateAccount", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.UpdateAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountsService_ListAccounts_sync", + "title": "Snippet for the list_accounts call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_accounts.", + "file": "accounts_service/list_accounts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_accounts", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_accounts", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" + }, + "method": { + "short_name": "ListAccounts", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.ListAccounts", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountsService_ListSubAccounts_sync", + "title": "Snippet for the list_sub_accounts call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_sub_accounts.", + "file": "accounts_service/list_sub_accounts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sub_accounts", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_sub_accounts", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" + }, + "method": { + "short_name": "ListSubAccounts", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.ListSubAccounts", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AutofeedSettingsService_GetAutofeedSettings_sync", + "title": "Snippet for the get_autofeed_settings call in the AutofeedSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#get_autofeed_settings.", + "file": "autofeed_settings_service/get_autofeed_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_autofeed_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#get_autofeed_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings", + "client": { + "short_name": "AutofeedSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client" + }, + "method": { + "short_name": "GetAutofeedSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService.GetAutofeedSettings", + "service": { + "short_name": "AutofeedSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync", + "title": "Snippet for the update_autofeed_settings call in the AutofeedSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#update_autofeed_settings.", + "file": "autofeed_settings_service/update_autofeed_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_autofeed_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#update_autofeed_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings", + "client": { + "short_name": "AutofeedSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client" + }, + "method": { + "short_name": "UpdateAutofeedSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService.UpdateAutofeedSettings", + "service": { + "short_name": "AutofeedSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync", + "title": "Snippet for the get_automatic_improvements call in the AutomaticImprovementsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#get_automatic_improvements.", + "file": "automatic_improvements_service/get_automatic_improvements.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_automatic_improvements", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#get_automatic_improvements", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements", + "client": { + "short_name": "AutomaticImprovementsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client" + }, + "method": { + "short_name": "GetAutomaticImprovements", + "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.GetAutomaticImprovements", + "service": { + "short_name": "AutomaticImprovementsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync", + "title": "Snippet for the update_automatic_improvements call in the AutomaticImprovementsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#update_automatic_improvements.", + "file": "automatic_improvements_service/update_automatic_improvements.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_automatic_improvements", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#update_automatic_improvements", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements", + "client": { + "short_name": "AutomaticImprovementsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client" + }, + "method": { + "short_name": "UpdateAutomaticImprovements", + "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.UpdateAutomaticImprovements", + "service": { + "short_name": "AutomaticImprovementsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_BusinessIdentityService_GetBusinessIdentity_sync", + "title": "Snippet for the get_business_identity call in the BusinessIdentityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#get_business_identity.", + "file": "business_identity_service/get_business_identity.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_business_identity", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#get_business_identity", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity", + "client": { + "short_name": "BusinessIdentityService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client" + }, + "method": { + "short_name": "GetBusinessIdentity", + "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService.GetBusinessIdentity", + "service": { + "short_name": "BusinessIdentityService", + "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_BusinessIdentityService_UpdateBusinessIdentity_sync", + "title": "Snippet for the update_business_identity call in the BusinessIdentityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#update_business_identity.", + "file": "business_identity_service/update_business_identity.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_business_identity", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#update_business_identity", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity", + "client": { + "short_name": "BusinessIdentityService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client" + }, + "method": { + "short_name": "UpdateBusinessIdentity", + "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService.UpdateBusinessIdentity", + "service": { + "short_name": "BusinessIdentityService", + "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_BusinessInfoService_GetBusinessInfo_sync", + "title": "Snippet for the get_business_info call in the BusinessInfoService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#get_business_info.", + "file": "business_info_service/get_business_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_business_info", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#get_business_info", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo", + "client": { + "short_name": "BusinessInfoService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client" + }, + "method": { + "short_name": "GetBusinessInfo", + "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService.GetBusinessInfo", + "service": { + "short_name": "BusinessInfoService", + "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_BusinessInfoService_UpdateBusinessInfo_sync", + "title": "Snippet for the update_business_info call in the BusinessInfoService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#update_business_info.", + "file": "business_info_service/update_business_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_business_info", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#update_business_info", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo", + "client": { + "short_name": "BusinessInfoService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client" + }, + "method": { + "short_name": "UpdateBusinessInfo", + "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService.UpdateBusinessInfo", + "service": { + "short_name": "BusinessInfoService", + "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync", + "title": "Snippet for the get_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings.", + "file": "checkout_settings_service/get_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "GetCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.GetCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync", + "title": "Snippet for the create_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings.", + "file": "checkout_settings_service/create_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "CreateCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.CreateCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync", + "title": "Snippet for the update_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings.", + "file": "checkout_settings_service/update_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "UpdateCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.UpdateCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync", + "title": "Snippet for the delete_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings.", + "file": "checkout_settings_service/delete_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "DeleteCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.DeleteCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_EmailPreferencesService_GetEmailPreferences_sync", + "title": "Snippet for the get_email_preferences call in the EmailPreferencesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#get_email_preferences.", + "file": "email_preferences_service/get_email_preferences.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_email_preferences", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#get_email_preferences", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences", + "client": { + "short_name": "EmailPreferencesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client" + }, + "method": { + "short_name": "GetEmailPreferences", + "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService.GetEmailPreferences", + "service": { + "short_name": "EmailPreferencesService", + "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_EmailPreferencesService_UpdateEmailPreferences_sync", + "title": "Snippet for the update_email_preferences call in the EmailPreferencesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#update_email_preferences.", + "file": "email_preferences_service/update_email_preferences.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_email_preferences", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#update_email_preferences", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences", + "client": { + "short_name": "EmailPreferencesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client" + }, + "method": { + "short_name": "UpdateEmailPreferences", + "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService.UpdateEmailPreferences", + "service": { + "short_name": "EmailPreferencesService", + "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_GbpAccountsService_ListGbpAccounts_sync", + "title": "Snippet for the list_gbp_accounts call in the GbpAccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#list_gbp_accounts.", + "file": "gbp_accounts_service/list_gbp_accounts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_gbp_accounts", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#list_gbp_accounts", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse", + "client": { + "short_name": "GbpAccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client" + }, + "method": { + "short_name": "ListGbpAccounts", + "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService.ListGbpAccounts", + "service": { + "short_name": "GbpAccountsService", + "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_GbpAccountsService_LinkGbpAccount_sync", + "title": "Snippet for the link_gbp_account call in the GbpAccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#link_gbp_account.", + "file": "gbp_accounts_service/link_gbp_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "link_gbp_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#link_gbp_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse", + "client": { + "short_name": "GbpAccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client" + }, + "method": { + "short_name": "LinkGbpAccount", + "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService.LinkGbpAccount", + "service": { + "short_name": "GbpAccountsService", + "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_HomepageService_GetHomepage_sync", + "title": "Snippet for the get_homepage call in the HomepageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#get_homepage.", + "file": "homepage_service/get_homepage.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_homepage", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#get_homepage", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", + "client": { + "short_name": "HomepageService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" + }, + "method": { + "short_name": "GetHomepage", + "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.GetHomepage", + "service": { + "short_name": "HomepageService", + "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_HomepageService_UpdateHomepage_sync", + "title": "Snippet for the update_homepage call in the HomepageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#update_homepage.", + "file": "homepage_service/update_homepage.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_homepage", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#update_homepage", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", + "client": { + "short_name": "HomepageService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" + }, + "method": { + "short_name": "UpdateHomepage", + "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.UpdateHomepage", + "service": { + "short_name": "HomepageService", + "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_HomepageService_ClaimHomepage_sync", + "title": "Snippet for the claim_homepage call in the HomepageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#claim_homepage.", + "file": "homepage_service/claim_homepage.rb", + "language": "RUBY", + "client_method": { + "short_name": "claim_homepage", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#claim_homepage", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", + "client": { + "short_name": "HomepageService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" + }, + "method": { + "short_name": "ClaimHomepage", + "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.ClaimHomepage", + "service": { + "short_name": "HomepageService", + "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_HomepageService_UnclaimHomepage_sync", + "title": "Snippet for the unclaim_homepage call in the HomepageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#unclaim_homepage.", + "file": "homepage_service/unclaim_homepage.rb", + "language": "RUBY", + "client_method": { + "short_name": "unclaim_homepage", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#unclaim_homepage", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", + "client": { + "short_name": "HomepageService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" + }, + "method": { + "short_name": "UnclaimHomepage", + "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.UnclaimHomepage", + "service": { + "short_name": "HomepageService", + "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LfpProvidersService_FindLfpProviders_sync", + "title": "Snippet for the find_lfp_providers call in the LfpProvidersService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#find_lfp_providers.", + "file": "lfp_providers_service/find_lfp_providers.rb", + "language": "RUBY", + "client_method": { + "short_name": "find_lfp_providers", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#find_lfp_providers", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse", + "client": { + "short_name": "LfpProvidersService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client" + }, + "method": { + "short_name": "FindLfpProviders", + "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService.FindLfpProviders", + "service": { + "short_name": "LfpProvidersService", + "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LfpProvidersService_LinkLfpProvider_sync", + "title": "Snippet for the link_lfp_provider call in the LfpProvidersService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#link_lfp_provider.", + "file": "lfp_providers_service/link_lfp_provider.rb", + "language": "RUBY", + "client_method": { + "short_name": "link_lfp_provider", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#link_lfp_provider", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse", + "client": { + "short_name": "LfpProvidersService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client" + }, + "method": { + "short_name": "LinkLfpProvider", + "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService.LinkLfpProvider", + "service": { + "short_name": "LfpProvidersService", + "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync", + "title": "Snippet for the get_omnichannel_setting call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#get_omnichannel_setting.", + "file": "omnichannel_settings_service/get_omnichannel_setting.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_omnichannel_setting", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#get_omnichannel_setting", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "GetOmnichannelSetting", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.GetOmnichannelSetting", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync", + "title": "Snippet for the list_omnichannel_settings call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#list_omnichannel_settings.", + "file": "omnichannel_settings_service/list_omnichannel_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_omnichannel_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#list_omnichannel_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "ListOmnichannelSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.ListOmnichannelSettings", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync", + "title": "Snippet for the create_omnichannel_setting call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#create_omnichannel_setting.", + "file": "omnichannel_settings_service/create_omnichannel_setting.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_omnichannel_setting", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#create_omnichannel_setting", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "CreateOmnichannelSetting", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.CreateOmnichannelSetting", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync", + "title": "Snippet for the update_omnichannel_setting call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#update_omnichannel_setting.", + "file": "omnichannel_settings_service/update_omnichannel_setting.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_omnichannel_setting", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#update_omnichannel_setting", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "UpdateOmnichannelSetting", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.UpdateOmnichannelSetting", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_RequestInventoryVerification_sync", + "title": "Snippet for the request_inventory_verification call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#request_inventory_verification.", + "file": "omnichannel_settings_service/request_inventory_verification.rb", + "language": "RUBY", + "client_method": { + "short_name": "request_inventory_verification", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#request_inventory_verification", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "RequestInventoryVerification", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.RequestInventoryVerification", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync", + "title": "Snippet for the get_online_return_policy call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#get_online_return_policy.", + "file": "online_return_policy_service/get_online_return_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_online_return_policy", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#get_online_return_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "GetOnlineReturnPolicy", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.GetOnlineReturnPolicy", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync", + "title": "Snippet for the list_online_return_policies call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#list_online_return_policies.", + "file": "online_return_policy_service/list_online_return_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_online_return_policies", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#list_online_return_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "ListOnlineReturnPolicies", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.ListOnlineReturnPolicies", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync", + "title": "Snippet for the create_online_return_policy call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#create_online_return_policy.", + "file": "online_return_policy_service/create_online_return_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_online_return_policy", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#create_online_return_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "CreateOnlineReturnPolicy", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.CreateOnlineReturnPolicy", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_UpdateOnlineReturnPolicy_sync", + "title": "Snippet for the update_online_return_policy call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#update_online_return_policy.", + "file": "online_return_policy_service/update_online_return_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_online_return_policy", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#update_online_return_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "UpdateOnlineReturnPolicy", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.UpdateOnlineReturnPolicy", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync", + "title": "Snippet for the delete_online_return_policy call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#delete_online_return_policy.", + "file": "online_return_policy_service/delete_online_return_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_online_return_policy", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#delete_online_return_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "DeleteOnlineReturnPolicy", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.DeleteOnlineReturnPolicy", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ProgramsService_GetProgram_sync", + "title": "Snippet for the get_program call in the ProgramsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#get_program.", + "file": "programs_service/get_program.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_program", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#get_program", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Program", + "client": { + "short_name": "ProgramsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" + }, + "method": { + "short_name": "GetProgram", + "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.GetProgram", + "service": { + "short_name": "ProgramsService", + "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ProgramsService_ListPrograms_sync", + "title": "Snippet for the list_programs call in the ProgramsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#list_programs.", + "file": "programs_service/list_programs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_programs", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#list_programs", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse", + "client": { + "short_name": "ProgramsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" + }, + "method": { + "short_name": "ListPrograms", + "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.ListPrograms", + "service": { + "short_name": "ProgramsService", + "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ProgramsService_EnableProgram_sync", + "title": "Snippet for the enable_program call in the ProgramsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#enable_program.", + "file": "programs_service/enable_program.rb", + "language": "RUBY", + "client_method": { + "short_name": "enable_program", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#enable_program", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Program", + "client": { + "short_name": "ProgramsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" + }, + "method": { + "short_name": "EnableProgram", + "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.EnableProgram", + "service": { + "short_name": "ProgramsService", + "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ProgramsService_DisableProgram_sync", + "title": "Snippet for the disable_program call in the ProgramsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#disable_program.", + "file": "programs_service/disable_program.rb", + "language": "RUBY", + "client_method": { + "short_name": "disable_program", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#disable_program", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Program", + "client": { + "short_name": "ProgramsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" + }, + "method": { + "short_name": "DisableProgram", + "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.DisableProgram", + "service": { + "short_name": "ProgramsService", + "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_RegionsService_GetRegion_sync", + "title": "Snippet for the get_region call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#get_region.", + "file": "regions_service/get_region.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_region", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#get_region", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Region", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" + }, + "method": { + "short_name": "GetRegion", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.GetRegion", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_RegionsService_CreateRegion_sync", + "title": "Snippet for the create_region call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#create_region.", + "file": "regions_service/create_region.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_region", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#create_region", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Region", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" + }, + "method": { + "short_name": "CreateRegion", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.CreateRegion", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_RegionsService_UpdateRegion_sync", + "title": "Snippet for the update_region call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#update_region.", + "file": "regions_service/update_region.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_region", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#update_region", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Region", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" + }, + "method": { + "short_name": "UpdateRegion", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.UpdateRegion", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_RegionsService_DeleteRegion_sync", + "title": "Snippet for the delete_region call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#delete_region.", + "file": "regions_service/delete_region.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_region", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#delete_region", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" + }, + "method": { + "short_name": "DeleteRegion", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.DeleteRegion", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_RegionsService_ListRegions_sync", + "title": "Snippet for the list_regions call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#list_regions.", + "file": "regions_service/list_regions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_regions", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#list_regions", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" + }, + "method": { + "short_name": "ListRegions", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.ListRegions", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ShippingSettingsService_GetShippingSettings_sync", + "title": "Snippet for the get_shipping_settings call in the ShippingSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#get_shipping_settings.", + "file": "shipping_settings_service/get_shipping_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_shipping_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#get_shipping_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings", + "client": { + "short_name": "ShippingSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client" + }, + "method": { + "short_name": "GetShippingSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService.GetShippingSettings", + "service": { + "short_name": "ShippingSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ShippingSettingsService_InsertShippingSettings_sync", + "title": "Snippet for the insert_shipping_settings call in the ShippingSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#insert_shipping_settings.", + "file": "shipping_settings_service/insert_shipping_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_shipping_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#insert_shipping_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings", + "client": { + "short_name": "ShippingSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client" + }, + "method": { + "short_name": "InsertShippingSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService.InsertShippingSettings", + "service": { + "short_name": "ShippingSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_TermsOfServiceService_GetTermsOfService_sync", + "title": "Snippet for the get_terms_of_service call in the TermsOfServiceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#get_terms_of_service.", + "file": "terms_of_service_service/get_terms_of_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_terms_of_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#get_terms_of_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService", + "client": { + "short_name": "TermsOfServiceService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client" + }, + "method": { + "short_name": "GetTermsOfService", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService.GetTermsOfService", + "service": { + "short_name": "TermsOfServiceService", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync", + "title": "Snippet for the retrieve_latest_terms_of_service call in the TermsOfServiceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#retrieve_latest_terms_of_service.", + "file": "terms_of_service_service/retrieve_latest_terms_of_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "retrieve_latest_terms_of_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#retrieve_latest_terms_of_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService", + "client": { + "short_name": "TermsOfServiceService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client" + }, + "method": { + "short_name": "RetrieveLatestTermsOfService", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService.RetrieveLatestTermsOfService", + "service": { + "short_name": "TermsOfServiceService", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_TermsOfServiceService_AcceptTermsOfService_sync", + "title": "Snippet for the accept_terms_of_service call in the TermsOfServiceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#accept_terms_of_service.", + "file": "terms_of_service_service/accept_terms_of_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "accept_terms_of_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#accept_terms_of_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "TermsOfServiceService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client" + }, + "method": { + "short_name": "AcceptTermsOfService", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService.AcceptTermsOfService", + "service": { + "short_name": "TermsOfServiceService", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync", + "title": "Snippet for the get_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state.", + "file": "terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_terms_of_service_agreement_state", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState", + "client": { + "short_name": "TermsOfServiceAgreementStateService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client" + }, + "method": { + "short_name": "GetTermsOfServiceAgreementState", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService.GetTermsOfServiceAgreementState", + "service": { + "short_name": "TermsOfServiceAgreementStateService", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync", + "title": "Snippet for the retrieve_for_application_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state.", + "file": "terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb", + "language": "RUBY", + "client_method": { + "short_name": "retrieve_for_application_terms_of_service_agreement_state", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState", + "client": { + "short_name": "TermsOfServiceAgreementStateService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client" + }, + "method": { + "short_name": "RetrieveForApplicationTermsOfServiceAgreementState", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService.RetrieveForApplicationTermsOfServiceAgreementState", + "service": { + "short_name": "TermsOfServiceAgreementStateService", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService" + } + } + }, + "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-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb new file mode 100644 index 000000000000..6002493fa06e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state. +# +def get_terms_of_service_agreement_state + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new + + # Call the get_terms_of_service_agreement_state method. + result = client.get_terms_of_service_agreement_state request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. + p result +end +# [END merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb new file mode 100644 index 000000000000..fce83e3ae057 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the retrieve_for_application_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state. +# +def retrieve_for_application_terms_of_service_agreement_state + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new + + # Call the retrieve_for_application_terms_of_service_agreement_state method. + result = client.retrieve_for_application_terms_of_service_agreement_state request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. + p result +end +# [END merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb new file mode 100644 index 000000000000..b1e3c65fd56f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_TermsOfServiceService_AcceptTermsOfService_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the accept_terms_of_service call in the TermsOfServiceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#accept_terms_of_service. +# +def accept_terms_of_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new + + # Call the accept_terms_of_service method. + result = client.accept_terms_of_service request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_TermsOfServiceService_AcceptTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb new file mode 100644 index 000000000000..72780fd192f1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_TermsOfServiceService_GetTermsOfService_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_terms_of_service call in the TermsOfServiceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#get_terms_of_service. +# +def get_terms_of_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new + + # Call the get_terms_of_service method. + result = client.get_terms_of_service request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. + p result +end +# [END merchantapi_v1beta_generated_TermsOfServiceService_GetTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb new file mode 100644 index 000000000000..e0039a91db2f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the retrieve_latest_terms_of_service call in the TermsOfServiceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#retrieve_latest_terms_of_service. +# +def retrieve_latest_terms_of_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new + + # Call the retrieve_latest_terms_of_service method. + result = client.retrieve_latest_terms_of_service request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. + p result +end +# [END merchantapi_v1beta_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb new file mode 100644 index 000000000000..99337d55834e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_UserService_CreateUser_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the create_user call in the UserService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#create_user. +# +def create_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new + + # Call the create_user method. + result = client.create_user request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + p result +end +# [END merchantapi_v1beta_generated_UserService_CreateUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb new file mode 100644 index 000000000000..07a8a692be99 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_UserService_DeleteUser_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the delete_user call in the UserService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#delete_user. +# +def delete_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new + + # Call the delete_user method. + result = client.delete_user request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_UserService_DeleteUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb new file mode 100644 index 000000000000..7e279d65f5b8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_UserService_GetUser_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_user call in the UserService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#get_user. +# +def get_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new + + # Call the get_user method. + result = client.get_user request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + p result +end +# [END merchantapi_v1beta_generated_UserService_GetUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb new file mode 100644 index 000000000000..17dca433a258 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.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 merchantapi_v1beta_generated_UserService_ListUsers_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_users call in the UserService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#list_users. +# +def list_users + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new + + # Call the list_users method. + result = client.list_users request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::User. + p item + end +end +# [END merchantapi_v1beta_generated_UserService_ListUsers_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb new file mode 100644 index 000000000000..a39e0c84162a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_UserService_UpdateUser_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_user call in the UserService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#update_user. +# +def update_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new + + # Call the update_user method. + result = client.update_user request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + p result +end +# [END merchantapi_v1beta_generated_UserService_UpdateUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb new file mode 100644 index 000000000000..d759cbee13e3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_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/shopping/merchant/accounts/v1beta/account_issue_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb new file mode 100644 index 000000000000..e4c44183ebb3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_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/shopping/merchant/accounts/v1beta/accountissue_pb" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_issues + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + time_zone = "hello world" + + list_account_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::ServiceStub.stub :transcode_list_account_issues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_account_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_account_issues parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_account_issues ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_account_issues(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_account_issues_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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb new file mode 100644 index 000000000000..9a61e1e6f5ee --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb @@ -0,0 +1,175 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/accountissue_pb" +require "google/shopping/merchant/accounts/v1beta/account_issue_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_issues + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + time_zone = "hello world" + + list_account_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_account_issues, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, 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["language_code"] + assert_equal "hello world", request["time_zone"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_account_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_account_issues parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_account_issues ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_account_issues(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_account_issues_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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb new file mode 100644 index 000000000000..f72de9504a1c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_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/shopping/merchant/accounts/v1beta/account_tax_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_account_tax_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_tax_path account: "value0", tax: "value1" + assert_equal "accounts/value0/accounttax/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb new file mode 100644 index 000000000000..522b58c23bd2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/account_tax_pb" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_account_tax + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_tax_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.stub :transcode_get_account_tax_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_account_tax_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_account_tax({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_account_tax name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_account_tax({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_account_tax_client_stub.call_count + end + end + end + + def test_list_account_tax + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse.new + http_response = OpenStruct.new 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_account_tax_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.stub :transcode_list_account_tax_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_account_tax_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_account_tax({ 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_account_tax 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_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.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_account_tax({ 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_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.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_account_tax_client_stub.call_count + end + end + end + + def test_update_account_tax + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account_tax = {} + update_mask = {} + + update_account_tax_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.stub :transcode_update_account_tax_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_account_tax_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_account_tax({ account_tax: account_tax, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_account_tax account_tax: account_tax, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_account_tax({ account_tax: account_tax, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_account_tax_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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb new file mode 100644 index 000000000000..434a6b00b4d0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb @@ -0,0 +1,289 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/account_tax_pb" +require "google/shopping/merchant/accounts/v1beta/account_tax_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_account_tax + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_tax_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_account_tax, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_account_tax_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_account_tax({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_account_tax name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_account_tax({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_account_tax_client_stub.call_rpc_count + end + end + + def test_list_account_tax + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_account_tax_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_account_tax, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, 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_account_tax_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_account_tax({ 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_account_tax 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_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.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_account_tax({ 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_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.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_account_tax_client_stub.call_rpc_count + end + end + + def test_update_account_tax + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account_tax = {} + update_mask = {} + + update_account_tax_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_account_tax, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax), request["account_tax"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_account_tax_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_account_tax({ account_tax: account_tax, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_account_tax account_tax: account_tax, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, 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_account_tax({ account_tax: account_tax, 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_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, 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_account_tax_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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb new file mode 100644 index 000000000000..62d77fd98b02 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_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/shopping/merchant/accounts/v1beta/accounts_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_terms_of_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.terms_of_service_path version: "value0" + assert_equal "termsOfService/value0", path + end + end + + def test_user_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.user_path account: "value0", email: "value1" + assert_equal "accounts/value0/users/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb new file mode 100644 index 000000000000..ba9233339f03 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb @@ -0,0 +1,432 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/accounts/v1beta/accounts_pb" +require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_get_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_account({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_account name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_account ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_account({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_account(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_account_client_stub.call_count + end + end + end + + def test_create_and_configure_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account = {} + users = [{}] + accept_terms_of_service = {} + service = [{}] + + create_and_configure_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_create_and_configure_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_and_configure_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_and_configure_account account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_and_configure_account ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_and_configure_account(::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_and_configure_account_client_stub.call_count + end + end + end + + def test_delete_account + # 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" + force = true + + delete_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_delete_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_account({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_account name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_account ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_account({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_account(::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_account_client_stub.call_count + end + end + end + + def test_update_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account = {} + update_mask = {} + + update_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_update_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_account({ account: account, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_account account: account, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_account ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_account({ account: account, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_account(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_account_client_stub.call_count + end + end + end + + def test_list_accounts + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_list_accounts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_accounts({ 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_accounts 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_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(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_accounts({ 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_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(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_accounts_client_stub.call_count + end + end + end + + def test_list_sub_accounts + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + provider = "hello world" + page_size = 42 + page_token = "hello world" + + list_sub_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_list_sub_accounts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_sub_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_sub_accounts provider: provider, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_sub_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts({ provider: provider, 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_sub_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts_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::Shopping::Merchant::Accounts::V1beta::AccountsService::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::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb new file mode 100644 index 000000000000..e37342237ea8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.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 "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/accounts_pb" +require "google/shopping/merchant/accounts/v1beta/accounts_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_account({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_account name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_account ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_account({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_account(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_account_client_stub.call_rpc_count + end + end + + def test_create_and_configure_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account = {} + users = [{}] + accept_terms_of_service = {} + service = [{}] + + create_and_configure_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_and_configure_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Account), request["account"] + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, request["users"].first + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService), request["accept_terms_of_service"] + assert request.has_accept_terms_of_service? + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService, request["service"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_and_configure_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_and_configure_account account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_and_configure_account ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_and_configure_account(::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_and_configure_account_client_stub.call_rpc_count + end + end + + def test_delete_account + # 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" + force = true + + delete_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_account({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_account name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_account ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_account({ name: name, force: force }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_account(::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_account_client_stub.call_rpc_count + end + end + + def test_update_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account = {} + update_mask = {} + + update_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Account), request["account"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_account({ account: account, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_account account: account, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_account ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, 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_account({ account: account, 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_account(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, 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_account_client_stub.call_rpc_count + end + end + + def test_list_accounts + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_accounts, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, request + 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_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_accounts({ 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_accounts 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_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(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_accounts({ 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_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(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_accounts_client_stub.call_rpc_count + end + end + + def test_list_sub_accounts + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + provider = "hello world" + page_size = 42 + page_token = "hello world" + + list_sub_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sub_accounts, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, request + assert_equal "hello world", request["provider"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_sub_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_sub_accounts({ provider: provider, page_size: page_size, page_token: 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_sub_accounts provider: provider, page_size: page_size, page_token: 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_sub_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, page_size: page_size, page_token: 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_sub_accounts({ provider: provider, 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_sub_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts_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::Shopping::Merchant::Accounts::V1beta::AccountsService::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::Shopping::Merchant::Accounts::V1beta::AccountsService::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::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb new file mode 100644 index 000000000000..0d03f7e27cbf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_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/shopping/merchant/accounts/v1beta/autofeed_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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_autofeed_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.autofeed_settings_path account: "value0" + assert_equal "accounts/value0/autofeedSettings", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb new file mode 100644 index 000000000000..28fdef608f40 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_autofeed_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_autofeed_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ServiceStub.stub :transcode_get_autofeed_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_autofeed_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_autofeed_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_autofeed_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_autofeed_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_autofeed_settings_client_stub.call_count + end + end + end + + def test_update_autofeed_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + autofeed_settings = {} + update_mask = {} + + update_autofeed_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ServiceStub.stub :transcode_update_autofeed_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_autofeed_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_autofeed_settings autofeed_settings: autofeed_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_autofeed_settings_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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb new file mode 100644 index 000000000000..8c8923e68a8b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_autofeed_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_autofeed_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_autofeed_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_autofeed_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_autofeed_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_autofeed_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_autofeed_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_autofeed_settings_client_stub.call_rpc_count + end + end + + def test_update_autofeed_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + autofeed_settings = {} + update_mask = {} + + update_autofeed_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_autofeed_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings), request["autofeed_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_autofeed_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_autofeed_settings autofeed_settings: autofeed_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, 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_autofeed_settings({ autofeed_settings: autofeed_settings, 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_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, 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_autofeed_settings_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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb new file mode 100644 index 000000000000..5432846fad2e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_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/shopping/merchant/accounts/v1beta/automatic_improvements_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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_automatic_improvements_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.automatic_improvements_path account: "value0" + assert_equal "accounts/value0/automaticImprovements", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb new file mode 100644 index 000000000000..e5e64a6eadd5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_automatic_improvements + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_automatic_improvements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ServiceStub.stub :transcode_get_automatic_improvements_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_automatic_improvements_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_automatic_improvements({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_automatic_improvements name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_automatic_improvements({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_automatic_improvements_client_stub.call_count + end + end + end + + def test_update_automatic_improvements + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + automatic_improvements = {} + update_mask = {} + + update_automatic_improvements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ServiceStub.stub :transcode_update_automatic_improvements_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_automatic_improvements_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_automatic_improvements automatic_improvements: automatic_improvements, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_automatic_improvements_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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb new file mode 100644 index 000000000000..86cb99cf7bb5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_automatic_improvements + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_automatic_improvements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_automatic_improvements, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_automatic_improvements_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_automatic_improvements({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_automatic_improvements name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_automatic_improvements({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_automatic_improvements_client_stub.call_rpc_count + end + end + + def test_update_automatic_improvements + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + automatic_improvements = {} + update_mask = {} + + update_automatic_improvements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_automatic_improvements, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements), request["automatic_improvements"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_automatic_improvements_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_automatic_improvements automatic_improvements: automatic_improvements, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, 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_automatic_improvements({ automatic_improvements: automatic_improvements, 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_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, 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_automatic_improvements_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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb new file mode 100644 index 000000000000..20f3daac2d1a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_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/shopping/merchant/accounts/v1beta/business_identity_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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_business_identity_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.business_identity_path account: "value0" + assert_equal "accounts/value0/businessIdentity", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb new file mode 100644 index 000000000000..885667cd5906 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_business_identity + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_business_identity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ServiceStub.stub :transcode_get_business_identity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_business_identity_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_business_identity({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_business_identity name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_business_identity({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_business_identity_client_stub.call_count + end + end + end + + def test_update_business_identity + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + business_identity = {} + update_mask = {} + + update_business_identity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ServiceStub.stub :transcode_update_business_identity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_business_identity_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_business_identity({ business_identity: business_identity, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_business_identity business_identity: business_identity, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_business_identity({ business_identity: business_identity, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_business_identity_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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb new file mode 100644 index 000000000000..d088ff822a0b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" +require "google/shopping/merchant/accounts/v1beta/business_identity_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_business_identity + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_business_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_business_identity, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_business_identity_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_business_identity({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_business_identity name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_business_identity({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_business_identity_client_stub.call_rpc_count + end + end + + def test_update_business_identity + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + business_identity = {} + update_mask = {} + + update_business_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_business_identity, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity), request["business_identity"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_business_identity_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_business_identity({ business_identity: business_identity, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_business_identity business_identity: business_identity, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, 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_business_identity({ business_identity: business_identity, 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_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, 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_business_identity_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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb new file mode 100644 index 000000000000..128cf717a145 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_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/shopping/merchant/accounts/v1beta/business_info_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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_business_info_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.business_info_path account: "value0" + assert_equal "accounts/value0/businessInfo", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb new file mode 100644 index 000000000000..e5dc46020947 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" +require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_business_info + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_business_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ServiceStub.stub :transcode_get_business_info_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_business_info_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_business_info({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_business_info name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_business_info ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_business_info({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_business_info(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_business_info_client_stub.call_count + end + end + end + + def test_update_business_info + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + business_info = {} + update_mask = {} + + update_business_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ServiceStub.stub :transcode_update_business_info_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_business_info_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_business_info({ business_info: business_info, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_business_info business_info: business_info, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_business_info ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_business_info({ business_info: business_info, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_business_info(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_business_info_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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb new file mode 100644 index 000000000000..0377d3eef173 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" +require "google/shopping/merchant/accounts/v1beta/business_info_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_business_info + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_business_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_business_info, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_business_info_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_business_info({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_business_info name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_business_info ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_business_info({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_business_info(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_business_info_client_stub.call_rpc_count + end + end + + def test_update_business_info + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + business_info = {} + update_mask = {} + + update_business_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_business_info, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo), request["business_info"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_business_info_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_business_info({ business_info: business_info, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_business_info business_info: business_info, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_business_info ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, 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_business_info({ business_info: business_info, 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_business_info(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, 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_business_info_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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb new file mode 100644 index 000000000000..4f838dc12447 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_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/shopping/merchant/accounts/v1beta/checkout_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_checkout_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.checkout_settings_path account: "value0", program: "value1" + assert_equal "accounts/value0/programs/value1/checkoutSettings", path + end + end + + def test_program_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.program_path account: "value0", program: "value1" + assert_equal "accounts/value0/programs/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb new file mode 100644 index 000000000000..829225a0067e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb @@ -0,0 +1,317 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_checkout_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_get_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_checkout_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_checkout_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_checkout_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_checkout_settings_client_stub.call_count + end + end + end + + def test_create_checkout_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + checkout_settings = {} + + create_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_create_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_checkout_settings_client_stub.call_count + end + end + end + + def test_update_checkout_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + checkout_settings = {} + update_mask = {} + + update_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_update_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_checkout_settings_client_stub.call_count + end + end + end + + def test_delete_checkout_settings + # 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_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_delete_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_checkout_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_checkout_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_checkout_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_checkout_settings_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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb new file mode 100644 index 000000000000..9b77929d554e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb @@ -0,0 +1,340 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_checkout_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_checkout_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_checkout_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_checkout_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_checkout_settings_client_stub.call_rpc_count + end + end + + def test_create_checkout_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + checkout_settings = {} + + create_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings), request["checkout_settings"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_checkout_settings_client_stub.call_rpc_count + end + end + + def test_update_checkout_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + checkout_settings = {} + update_mask = {} + + update_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings), request["checkout_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, 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_checkout_settings({ checkout_settings: checkout_settings, 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_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, 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_checkout_settings_client_stub.call_rpc_count + end + end + + def test_delete_checkout_settings + # 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_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_checkout_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_checkout_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_checkout_settings({ 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_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(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_checkout_settings_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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb new file mode 100644 index 000000000000..a4b6db6efe0f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_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/shopping/merchant/accounts/v1beta/email_preferences_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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_email_preferences_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.email_preferences_path account: "value0", email: "value1" + assert_equal "accounts/value0/users/value1/emailPreferences", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb new file mode 100644 index 000000000000..911fa879bed4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_email_preferences + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_email_preferences_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ServiceStub.stub :transcode_get_email_preferences_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_email_preferences_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_email_preferences({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_email_preferences name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_email_preferences({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_email_preferences_client_stub.call_count + end + end + end + + def test_update_email_preferences + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + email_preferences = {} + update_mask = {} + + update_email_preferences_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ServiceStub.stub :transcode_update_email_preferences_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_email_preferences_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_email_preferences email_preferences: email_preferences, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_email_preferences_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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb new file mode 100644 index 000000000000..4df3f2283c70 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_email_preferences + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_email_preferences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_email_preferences, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_email_preferences_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_email_preferences({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_email_preferences name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_email_preferences({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_email_preferences_client_stub.call_rpc_count + end + end + + def test_update_email_preferences + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + email_preferences = {} + update_mask = {} + + update_email_preferences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_email_preferences, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences), request["email_preferences"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_email_preferences_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_email_preferences email_preferences: email_preferences, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, 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_email_preferences({ email_preferences: email_preferences, 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_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, 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_email_preferences_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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb new file mode 100644 index 000000000000..28b36c651b32 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_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/shopping/merchant/accounts/v1beta/gbp_accounts_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb new file mode 100644 index 000000000000..78e00b374ffc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_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/shopping/merchant/accounts/v1beta/gbpaccounts_pb" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_gbp_accounts + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse.new + http_response = OpenStruct.new 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_gbp_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::ServiceStub.stub :transcode_list_gbp_accounts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_gbp_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_gbp_accounts({ 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_gbp_accounts 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_gbp_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.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_gbp_accounts({ 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_gbp_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.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_gbp_accounts_client_stub.call_count + end + end + end + + def test_link_gbp_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + gbp_email = "hello world" + + link_gbp_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::ServiceStub.stub :transcode_link_gbp_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, link_gbp_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.link_gbp_account({ parent: parent, gbp_email: gbp_email }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.link_gbp_account parent: parent, gbp_email: gbp_email do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.link_gbp_account ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.link_gbp_account({ parent: parent, gbp_email: gbp_email }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.link_gbp_account(::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, link_gbp_account_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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb new file mode 100644 index 000000000000..a0dae9ea0491 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb @@ -0,0 +1,231 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_gbp_accounts + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_gbp_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_gbp_accounts, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, 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_gbp_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_gbp_accounts({ 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_gbp_accounts 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_gbp_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.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_gbp_accounts({ 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_gbp_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.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_gbp_accounts_client_stub.call_rpc_count + end + end + + def test_link_gbp_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + gbp_email = "hello world" + + link_gbp_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :link_gbp_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["gbp_email"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, link_gbp_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.link_gbp_account({ parent: parent, gbp_email: gbp_email }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.link_gbp_account parent: parent, gbp_email: gbp_email do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.link_gbp_account ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.link_gbp_account({ parent: parent, gbp_email: gbp_email }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.link_gbp_account(::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, link_gbp_account_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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb new file mode 100644 index 000000000000..61d80f67f1a5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_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/shopping/merchant/accounts/v1beta/homepage_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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_homepage_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.homepage_path account: "value0" + assert_equal "accounts/value0/homepage", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb new file mode 100644 index 000000000000..3a76b1e7c8b3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_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/rest" +require "google/shopping/merchant/accounts/v1beta/homepage_pb" +require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_homepage + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_get_homepage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_homepage({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_homepage name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_homepage ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_homepage({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_homepage(::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_homepage_client_stub.call_count + end + end + end + + def test_update_homepage + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + homepage = {} + update_mask = {} + + update_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_update_homepage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_homepage({ homepage: homepage, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_homepage homepage: homepage, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_homepage({ homepage: homepage, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_homepage_client_stub.call_count + end + end + end + + def test_claim_homepage + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + claim_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_claim_homepage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, claim_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.claim_homepage({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.claim_homepage name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.claim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.claim_homepage({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.claim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, claim_homepage_client_stub.call_count + end + end + end + + def test_unclaim_homepage + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + unclaim_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_unclaim_homepage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, unclaim_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.unclaim_homepage({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.unclaim_homepage name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.unclaim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.unclaim_homepage({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.unclaim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, unclaim_homepage_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::Shopping::Merchant::Accounts::V1beta::HomepageService::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::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb new file mode 100644 index 000000000000..be982cef3397 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb @@ -0,0 +1,338 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/homepage_pb" +require "google/shopping/merchant/accounts/v1beta/homepage_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_homepage + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_homepage, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_homepage({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_homepage name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_homepage ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_homepage({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_homepage(::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_homepage_client_stub.call_rpc_count + end + end + + def test_update_homepage + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + homepage = {} + update_mask = {} + + update_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_homepage, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Homepage), request["homepage"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_homepage({ homepage: homepage, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_homepage homepage: homepage, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, 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_homepage({ homepage: homepage, 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_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, 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_homepage_client_stub.call_rpc_count + end + end + + def test_claim_homepage + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + claim_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :claim_homepage, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, claim_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.claim_homepage({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.claim_homepage name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.claim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.claim_homepage({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.claim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, claim_homepage_client_stub.call_rpc_count + end + end + + def test_unclaim_homepage + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + unclaim_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :unclaim_homepage, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, unclaim_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.unclaim_homepage({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.unclaim_homepage name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.unclaim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.unclaim_homepage({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.unclaim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, unclaim_homepage_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::Shopping::Merchant::Accounts::V1beta::HomepageService::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::Shopping::Merchant::Accounts::V1beta::HomepageService::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::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb new file mode 100644 index 000000000000..40c4e008e3f6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_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/shopping/merchant/accounts/v1beta/lfp_providers_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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_lfp_provider_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_provider_path account: "value0", omnichannel_setting: "value1", lfp_provider: "value2" + assert_equal "accounts/value0/omnichannelSettings/value1/lfpProviders/value2", path + end + end + + def test_omnichannel_setting_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.omnichannel_setting_path account: "value0", omnichannel_setting: "value1" + assert_equal "accounts/value0/omnichannelSettings/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb new file mode 100644 index 000000000000..20d70aaf205c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_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/shopping/merchant/accounts/v1beta/lfpproviders_pb" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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_find_lfp_providers + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + find_lfp_providers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::ServiceStub.stub :transcode_find_lfp_providers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, find_lfp_providers_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.find_lfp_providers({ 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.find_lfp_providers 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.find_lfp_providers ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.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.find_lfp_providers({ 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.find_lfp_providers(::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.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, find_lfp_providers_client_stub.call_count + end + end + end + + def test_link_lfp_provider + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + external_account_id = "hello world" + + link_lfp_provider_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::ServiceStub.stub :transcode_link_lfp_provider_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, link_lfp_provider_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.link_lfp_provider({ name: name, external_account_id: external_account_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.link_lfp_provider name: name, external_account_id: external_account_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.link_lfp_provider ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.link_lfp_provider({ name: name, external_account_id: external_account_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.link_lfp_provider(::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, link_lfp_provider_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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb new file mode 100644 index 000000000000..d9df0ee6704d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb @@ -0,0 +1,231 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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_find_lfp_providers + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + find_lfp_providers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :find_lfp_providers, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, 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, find_lfp_providers_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.find_lfp_providers({ 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.find_lfp_providers 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.find_lfp_providers ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.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.find_lfp_providers({ 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.find_lfp_providers(::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.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, find_lfp_providers_client_stub.call_rpc_count + end + end + + def test_link_lfp_provider + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + external_account_id = "hello world" + + link_lfp_provider_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :link_lfp_provider, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["external_account_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, link_lfp_provider_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.link_lfp_provider({ name: name, external_account_id: external_account_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.link_lfp_provider name: name, external_account_id: external_account_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.link_lfp_provider ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.link_lfp_provider({ name: name, external_account_id: external_account_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.link_lfp_provider(::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, link_lfp_provider_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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb new file mode 100644 index 000000000000..fda485c81acf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_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/shopping/merchant/accounts/v1beta/omnichannel_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_omnichannel_setting_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.omnichannel_setting_path account: "value0", omnichannel_setting: "value1" + assert_equal "accounts/value0/omnichannelSettings/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb new file mode 100644 index 000000000000..26e03b74b749 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_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/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_omnichannel_setting + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_get_omnichannel_setting_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_omnichannel_setting({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_omnichannel_setting name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_omnichannel_setting({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_omnichannel_setting_client_stub.call_count + end + end + end + + def test_list_omnichannel_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse.new + http_response = OpenStruct.new 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_omnichannel_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_list_omnichannel_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_omnichannel_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_omnichannel_settings({ 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_omnichannel_settings 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_omnichannel_settings ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.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_omnichannel_settings({ 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_omnichannel_settings(::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.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_omnichannel_settings_client_stub.call_count + end + end + end + + def test_create_omnichannel_setting + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + omnichannel_setting = {} + + create_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_create_omnichannel_setting_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_omnichannel_setting parent: parent, omnichannel_setting: omnichannel_setting do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_omnichannel_setting_client_stub.call_count + end + end + end + + def test_update_omnichannel_setting + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + omnichannel_setting = {} + update_mask = {} + + update_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_update_omnichannel_setting_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_omnichannel_setting omnichannel_setting: omnichannel_setting, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_omnichannel_setting_client_stub.call_count + end + end + end + + def test_request_inventory_verification + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + request_inventory_verification_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_request_inventory_verification_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, request_inventory_verification_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.request_inventory_verification({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.request_inventory_verification name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.request_inventory_verification ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.request_inventory_verification({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.request_inventory_verification(::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, request_inventory_verification_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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb new file mode 100644 index 000000000000..c2f371599259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_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/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_omnichannel_setting + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_omnichannel_setting, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_omnichannel_setting({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_omnichannel_setting name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_omnichannel_setting({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_omnichannel_setting_client_stub.call_rpc_count + end + end + + def test_list_omnichannel_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_omnichannel_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_omnichannel_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest, 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_omnichannel_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_omnichannel_settings({ 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_omnichannel_settings 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_omnichannel_settings ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.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_omnichannel_settings({ 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_omnichannel_settings(::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.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_omnichannel_settings_client_stub.call_rpc_count + end + end + + def test_create_omnichannel_setting + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + omnichannel_setting = {} + + create_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_omnichannel_setting, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting), request["omnichannel_setting"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_omnichannel_setting parent: parent, omnichannel_setting: omnichannel_setting do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_omnichannel_setting_client_stub.call_rpc_count + end + end + + def test_update_omnichannel_setting + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + omnichannel_setting = {} + update_mask = {} + + update_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_omnichannel_setting, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting), request["omnichannel_setting"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_omnichannel_setting omnichannel_setting: omnichannel_setting, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, 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_omnichannel_setting({ omnichannel_setting: omnichannel_setting, 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_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, 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_omnichannel_setting_client_stub.call_rpc_count + end + end + + def test_request_inventory_verification + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_inventory_verification_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :request_inventory_verification, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, request_inventory_verification_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.request_inventory_verification({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.request_inventory_verification name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.request_inventory_verification ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.request_inventory_verification({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.request_inventory_verification(::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, request_inventory_verification_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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb new file mode 100644 index 000000000000..c8399e11c1e1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_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/shopping/merchant/accounts/v1beta/online_return_policy_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_online_return_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.online_return_policy_path account: "value0", return_policy: "value1" + assert_equal "accounts/value0/onlineReturnPolicies/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb new file mode 100644 index 000000000000..ede70ccbb768 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_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/shopping/merchant/accounts/v1beta/online_return_policy_pb" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_online_return_policy + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_online_return_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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_get_online_return_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_online_return_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_online_return_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_online_return_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_online_return_policy_client_stub.call_count + end + end + end + + def test_list_online_return_policies + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse.new + http_response = OpenStruct.new 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_online_return_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_list_online_return_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_online_return_policies_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_online_return_policies({ 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_online_return_policies 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_online_return_policies ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.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_online_return_policies({ 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_online_return_policies(::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.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_online_return_policies_client_stub.call_count + end + end + end + + def test_create_online_return_policy + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + online_return_policy = {} + + create_online_return_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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_create_online_return_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_online_return_policy parent: parent, online_return_policy: online_return_policy do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_online_return_policy_client_stub.call_count + end + end + end + + def test_update_online_return_policy + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + online_return_policy = {} + update_mask = {} + + update_online_return_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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_update_online_return_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_online_return_policy online_return_policy: online_return_policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_online_return_policy_client_stub.call_count + end + end + end + + def test_delete_online_return_policy + # 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_online_return_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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_delete_online_return_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_online_return_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_online_return_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_online_return_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_online_return_policy_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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb new file mode 100644 index 000000000000..f054d7d1a895 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_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/shopping/merchant/accounts/v1beta/online_return_policy_pb" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_online_return_policy + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_online_return_policy, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_online_return_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_online_return_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_online_return_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_online_return_policy_client_stub.call_rpc_count + end + end + + def test_list_online_return_policies + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_online_return_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_online_return_policies, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, 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_online_return_policies_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_online_return_policies({ 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_online_return_policies 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_online_return_policies ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.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_online_return_policies({ 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_online_return_policies(::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.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_online_return_policies_client_stub.call_rpc_count + end + end + + def test_create_online_return_policy + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + online_return_policy = {} + + create_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_online_return_policy, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy), request["online_return_policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_online_return_policy parent: parent, online_return_policy: online_return_policy do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_online_return_policy_client_stub.call_rpc_count + end + end + + def test_update_online_return_policy + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + online_return_policy = {} + update_mask = {} + + update_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_online_return_policy, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy), request["online_return_policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_online_return_policy online_return_policy: online_return_policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_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.update_online_return_policy({ online_return_policy: online_return_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.update_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_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, update_online_return_policy_client_stub.call_rpc_count + end + end + + def test_delete_online_return_policy + # 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_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_online_return_policy, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_online_return_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_online_return_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_online_return_policy({ 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_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(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_online_return_policy_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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb new file mode 100644 index 000000000000..380202e72500 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_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/shopping/merchant/accounts/v1beta/programs_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_program_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.program_path account: "value0", program: "value1" + assert_equal "accounts/value0/programs/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb new file mode 100644 index 000000000000..8fa3f03539fd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb @@ -0,0 +1,317 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/programs_pb" +require "google/shopping/merchant/accounts/v1beta/programs_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_program + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_get_program_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_program({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_program name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_program ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_program({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_program(::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_program_client_stub.call_count + end + end + end + + def test_list_programs + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse.new + http_response = OpenStruct.new 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_programs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_list_programs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_programs_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_programs({ 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_programs 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_programs ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.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_programs({ 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_programs(::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.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_programs_client_stub.call_count + end + end + end + + def test_enable_program + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + enable_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_enable_program_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, enable_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.enable_program({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.enable_program name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.enable_program ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.enable_program({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.enable_program(::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, enable_program_client_stub.call_count + end + end + end + + def test_disable_program + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + disable_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_disable_program_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, disable_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.disable_program({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.disable_program name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.disable_program ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.disable_program({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.disable_program(::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, disable_program_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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb new file mode 100644 index 000000000000..55c85f6f4f8c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb @@ -0,0 +1,345 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/programs_pb" +require "google/shopping/merchant/accounts/v1beta/programs_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_program + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_program, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_program({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_program name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_program ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_program({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_program(::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_program_client_stub.call_rpc_count + end + end + + def test_list_programs + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_programs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_programs, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, 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_programs_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_programs({ 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_programs 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_programs ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.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_programs({ 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_programs(::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.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_programs_client_stub.call_rpc_count + end + end + + def test_enable_program + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + enable_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :enable_program, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, enable_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.enable_program({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.enable_program name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.enable_program ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.enable_program({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.enable_program(::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, enable_program_client_stub.call_rpc_count + end + end + + def test_disable_program + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + disable_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :disable_program, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, disable_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.disable_program({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.disable_program name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.disable_program ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.disable_program({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.disable_program(::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, disable_program_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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb new file mode 100644 index 000000000000..698e3d23528b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_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/shopping/merchant/accounts/v1beta/regions_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_region_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.region_path account: "value0", region: "value1" + assert_equal "accounts/value0/regions/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb new file mode 100644 index 000000000000..a723d17c1ef9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_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/shopping/merchant/accounts/v1beta/regions_pb" +require "google/shopping/merchant/accounts/v1beta/regions_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_region + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_get_region_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_region({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_region name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_region ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_region({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_region(::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_region_client_stub.call_count + end + end + end + + def test_create_region + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + region_id = "hello world" + region = {} + + create_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_create_region_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_region({ parent: parent, region_id: region_id, region: region }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_region parent: parent, region_id: region_id, region: region do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_region ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_region({ parent: parent, region_id: region_id, region: region }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_region(::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_region_client_stub.call_count + end + end + end + + def test_update_region + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + region = {} + update_mask = {} + + update_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_update_region_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_region({ region: region, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_region region: region, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_region ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_region({ region: region, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_region(::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_region_client_stub.call_count + end + end + end + + def test_delete_region + # 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_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_delete_region_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_region({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_region name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_region ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_region({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_region(::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_region_client_stub.call_count + end + end + end + + def test_list_regions + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse.new + http_response = OpenStruct.new 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_regions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_list_regions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_regions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_regions({ 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_regions 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_regions ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.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_regions({ 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_regions(::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.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_regions_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::Shopping::Merchant::Accounts::V1beta::RegionsService::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::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb new file mode 100644 index 000000000000..3de4bc7e5d6d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_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/shopping/merchant/accounts/v1beta/regions_pb" +require "google/shopping/merchant/accounts/v1beta/regions_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_region + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_region, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_region({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_region name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_region ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_region({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_region(::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_region_client_stub.call_rpc_count + end + end + + def test_create_region + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + region_id = "hello world" + region = {} + + create_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_region, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["region_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Region), request["region"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_region({ parent: parent, region_id: region_id, region: region }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_region parent: parent, region_id: region_id, region: region do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_region ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_region({ parent: parent, region_id: region_id, region: region }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_region(::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_region_client_stub.call_rpc_count + end + end + + def test_update_region + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + region = {} + update_mask = {} + + update_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_region, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Region), request["region"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_region({ region: region, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_region region: region, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_region ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, 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_region({ region: region, 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_region(::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, 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_region_client_stub.call_rpc_count + end + end + + def test_delete_region + # 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_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_region, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_region({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_region name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_region ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_region({ 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_region(::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(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_region_client_stub.call_rpc_count + end + end + + def test_list_regions + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_regions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_regions, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, 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_regions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_regions({ 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_regions 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_regions ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.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_regions({ 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_regions(::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.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_regions_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::Shopping::Merchant::Accounts::V1beta::RegionsService::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::Shopping::Merchant::Accounts::V1beta::RegionsService::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::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb new file mode 100644 index 000000000000..555555c1a601 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_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/shopping/merchant/accounts/v1beta/shipping_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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_shipping_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.shipping_settings_path account: "value0" + assert_equal "accounts/value0/shippingSettings", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb new file mode 100644 index 000000000000..77fe6e8fd271 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_shipping_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_shipping_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ServiceStub.stub :transcode_get_shipping_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_shipping_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_shipping_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_shipping_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_shipping_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_shipping_settings_client_stub.call_count + end + end + end + + def test_insert_shipping_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + shipping_setting = {} + + insert_shipping_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ServiceStub.stub :transcode_insert_shipping_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_shipping_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_shipping_settings parent: parent, shipping_setting: shipping_setting do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_shipping_settings_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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb new file mode 100644 index 000000000000..286e3664d046 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_shipping_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_shipping_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_shipping_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_shipping_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_shipping_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_shipping_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_shipping_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_shipping_settings_client_stub.call_rpc_count + end + end + + def test_insert_shipping_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + shipping_setting = {} + + insert_shipping_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_shipping_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings), request["shipping_setting"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_shipping_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_shipping_settings parent: parent, shipping_setting: shipping_setting do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_shipping_settings_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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb new file mode 100644 index 000000000000..eecca8da77a7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_terms_of_service_agreement_state_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.terms_of_service_agreement_state_path account: "value0", identifier: "value1" + assert_equal "accounts/value0/termsOfServiceAgreementStates/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb new file mode 100644 index 000000000000..dba090afafbc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb @@ -0,0 +1,207 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_terms_of_service_agreement_state + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_terms_of_service_agreement_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ServiceStub.stub :transcode_get_terms_of_service_agreement_state_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_terms_of_service_agreement_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_terms_of_service_agreement_state({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_terms_of_service_agreement_state name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_terms_of_service_agreement_state({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_terms_of_service_agreement_state_client_stub.call_count + end + end + end + + def test_retrieve_for_application_terms_of_service_agreement_state + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + retrieve_for_application_terms_of_service_agreement_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ServiceStub.stub :transcode_retrieve_for_application_terms_of_service_agreement_state_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, retrieve_for_application_terms_of_service_agreement_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.retrieve_for_application_terms_of_service_agreement_state parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.retrieve_for_application_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.retrieve_for_application_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, retrieve_for_application_terms_of_service_agreement_state_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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb new file mode 100644 index 000000000000..25e259c93e99 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb @@ -0,0 +1,220 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_terms_of_service_agreement_state + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_terms_of_service_agreement_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_terms_of_service_agreement_state, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_terms_of_service_agreement_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_terms_of_service_agreement_state({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_terms_of_service_agreement_state name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_terms_of_service_agreement_state({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_terms_of_service_agreement_state_client_stub.call_rpc_count + end + end + + def test_retrieve_for_application_terms_of_service_agreement_state + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + retrieve_for_application_terms_of_service_agreement_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :retrieve_for_application_terms_of_service_agreement_state, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, retrieve_for_application_terms_of_service_agreement_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.retrieve_for_application_terms_of_service_agreement_state parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.retrieve_for_application_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.retrieve_for_application_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, retrieve_for_application_terms_of_service_agreement_state_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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb new file mode 100644 index 000000000000..cecc22896b0b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_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/shopping/merchant/accounts/v1beta/terms_of_service_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_terms_of_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.terms_of_service_path version: "value0" + assert_equal "termsOfService/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb new file mode 100644 index 000000000000..f59573067f69 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_terms_of_service + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.stub :transcode_get_terms_of_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_terms_of_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_terms_of_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_terms_of_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_terms_of_service_client_stub.call_count + end + end + end + + def test_retrieve_latest_terms_of_service + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + region_code = "hello world" + kind = :TERMS_OF_SERVICE_KIND_UNSPECIFIED + + retrieve_latest_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.stub :transcode_retrieve_latest_terms_of_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, retrieve_latest_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.retrieve_latest_terms_of_service region_code: region_code, kind: kind do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.retrieve_latest_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.retrieve_latest_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, retrieve_latest_terms_of_service_client_stub.call_count + end + end + end + + def test_accept_terms_of_service + # 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" + account = "hello world" + region_code = "hello world" + + accept_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.stub :transcode_accept_terms_of_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, accept_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.accept_terms_of_service({ name: name, account: account, region_code: region_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.accept_terms_of_service name: name, account: account, region_code: region_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.accept_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.accept_terms_of_service({ name: name, account: account, region_code: region_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.accept_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, accept_terms_of_service_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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb new file mode 100644 index 000000000000..f27cd96690b9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb @@ -0,0 +1,284 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_terms_of_service + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_terms_of_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_terms_of_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_terms_of_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_terms_of_service({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_terms_of_service_client_stub.call_rpc_count + end + end + + def test_retrieve_latest_terms_of_service + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + region_code = "hello world" + kind = :TERMS_OF_SERVICE_KIND_UNSPECIFIED + + retrieve_latest_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :retrieve_latest_terms_of_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, request + assert_equal "hello world", request["region_code"] + assert_equal :TERMS_OF_SERVICE_KIND_UNSPECIFIED, request["kind"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, retrieve_latest_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.retrieve_latest_terms_of_service region_code: region_code, kind: kind do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.retrieve_latest_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.retrieve_latest_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, retrieve_latest_terms_of_service_client_stub.call_rpc_count + end + end + + def test_accept_terms_of_service + # 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" + account = "hello world" + region_code = "hello world" + + accept_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :accept_terms_of_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["account"] + assert_equal "hello world", request["region_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, accept_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.accept_terms_of_service({ name: name, account: account, region_code: region_code }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.accept_terms_of_service name: name, account: account, region_code: region_code do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.accept_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.accept_terms_of_service({ name: name, account: account, region_code: region_code }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.accept_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, accept_terms_of_service_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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb new file mode 100644 index 000000000000..e71cf60afd5d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/user_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_user_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.user_path account: "value0", email: "value1" + assert_equal "accounts/value0/users/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb new file mode 100644 index 000000000000..daa6c9cc28f4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/user_pb" +require "google/shopping/merchant/accounts/v1beta/user_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_user + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::User.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_get_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_user({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_user name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_user ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_user({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_user(::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_user_client_stub.call_count + end + end + end + + def test_create_user + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::User.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + user_id = "hello world" + user = {} + + create_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_create_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_user({ parent: parent, user_id: user_id, user: user }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_user parent: parent, user_id: user_id, user: user do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_user ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_user({ parent: parent, user_id: user_id, user: user }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_user(::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_user_client_stub.call_count + end + end + end + + def test_delete_user + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_delete_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_user({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_user name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_user ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_user({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_user(::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_user_client_stub.call_count + end + end + end + + def test_update_user + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::User.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + user = {} + update_mask = {} + + update_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_update_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_user({ user: user, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_user user: user, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_user ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_user({ user: user, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_user(::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_user_client_stub.call_count + end + end + end + + def test_list_users + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse.new + http_response = OpenStruct.new 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_users_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_list_users_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_users_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_users({ 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_users 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_users ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.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_users({ 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_users(::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.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_users_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::Shopping::Merchant::Accounts::V1beta::UserService::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::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb new file mode 100644 index 000000000000..b3a4ce248cd1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/user_pb" +require "google/shopping/merchant/accounts/v1beta/user_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::UserService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_user + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::User.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_user, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_user({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_user name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_user ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_user({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_user(::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_user_client_stub.call_rpc_count + end + end + + def test_create_user + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::User.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + user_id = "hello world" + user = {} + + create_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_user, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["user_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::User), request["user"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_user({ parent: parent, user_id: user_id, user: user }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_user parent: parent, user_id: user_id, user: user do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_user ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_user({ parent: parent, user_id: user_id, user: user }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_user(::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_user_client_stub.call_rpc_count + end + end + + def test_delete_user + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_user, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_user({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_user name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_user ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_user({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_user(::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_user_client_stub.call_rpc_count + end + end + + def test_update_user + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::User.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + user = {} + update_mask = {} + + update_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_user, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::User), request["user"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_user({ user: user, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_user user: user, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_user ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, 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_user({ user: user, 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_user(::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, 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_user_client_stub.call_rpc_count + end + end + + def test_list_users + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_users_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_users, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, 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_users_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_users({ 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_users 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_users ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.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_users({ 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_users(::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.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_users_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::Shopping::Merchant::Accounts::V1beta::UserService::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::Shopping::Merchant::Accounts::V1beta::UserService::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::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-conversions-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-conversions-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json new file mode 100644 index 000000000000..20ec393175c4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-conversions-v1", + "distribution_name": "google-shopping-merchant-conversions-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-conversions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml new file mode 100644 index 000000000000..dc26bdfd3a23 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-conversions-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant 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-shopping-merchant-conversions-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..6489474b1d66 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-conversions-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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1" + +client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/conversions/v1" + +::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/README.md new file mode 100644 index 000000000000..97b49a0c376c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-conversions](https://rubygems.org/gems/google-shopping-merchant-conversions). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-conversions-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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/conversions/v1" + +client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new +request = ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new # (request fields as keyword arguments...) +response = client.create_conversion_source request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-conversions-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/conversions/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-conversions-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-shopping-merchant-conversions`. +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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-conversions-v1/Rakefile new file mode 100644 index 000000000000..09036b63c7b4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1/conversion_sources_service/credentials" + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-conversions-v1" + header "google-shopping-merchant-conversions-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-conversions-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1/gapic_metadata.json new file mode 100644 index 000000000000..c91c1680b96f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/gapic_metadata.json @@ -0,0 +1,48 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.conversions.v1", + "libraryPackage": "::Google::Shopping::Merchant::Conversions::V1", + "services": { + "ConversionSourcesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client", + "rpcs": { + "CreateConversionSource": { + "methods": [ + "create_conversion_source" + ] + }, + "UpdateConversionSource": { + "methods": [ + "update_conversion_source" + ] + }, + "DeleteConversionSource": { + "methods": [ + "delete_conversion_source" + ] + }, + "UndeleteConversionSource": { + "methods": [ + "undelete_conversion_source" + ] + }, + "GetConversionSource": { + "methods": [ + "get_conversion_source" + ] + }, + "ListConversionSources": { + "methods": [ + "list_conversion_sources" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec b/owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec new file mode 100644 index 000000000000..10b07396a830 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/conversions/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-conversions-v1" + gem.version = Google::Shopping::Merchant::Conversions::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-conversions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb new file mode 100644 index 000000000000..2992146c576e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-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/shopping/merchant/conversions/v1" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb new file mode 100644 index 000000000000..d3e68a85ea00 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/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/shopping/merchant/conversions/v1/conversion_sources_service" +require "google/shopping/merchant/conversions/v1/version" + +module Google + module Shopping + module Merchant + module Conversions + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/conversions/v1" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/conversions/v1" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/conversions/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb new file mode 100644 index 000000000000..ec823442ad31 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/conversions/v1/version" + +require "google/shopping/merchant/conversions/v1/conversion_sources_service/credentials" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/paths" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/client" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" + +module Google + module Shopping + module Merchant + module Conversions + module V1 + ## + # Service for managing conversion sources for a merchant account. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/conversions/v1/conversion_sources_service" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + module ConversionSourcesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "conversion_sources_service", "helpers.rb" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb new file mode 100644 index 000000000000..722cc061f37f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb @@ -0,0 +1,973 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/conversions/v1/conversionsources_pb" + +module Google + module Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + ## + # Client for the ConversionSourcesService service. + # + # Service for managing conversion sources for a merchant account. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :conversion_sources_service_stub + + ## + # Configure the ConversionSourcesService Client class. + # + # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConversionSourcesService clients + # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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", "Shopping", "Merchant", "Conversions", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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 + @conversion_sources_service_stub.universe_domain + end + + ## + # Create a new ConversionSourcesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConversionSourcesService 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/shopping/merchant/conversions/v1/conversionsources_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 + + @conversion_sources_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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 + ) + + @conversion_sources_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 + @conversion_sources_service_stub.logger + end + + # Service calls + + ## + # Creates a new conversion source. + # + # @overload create_conversion_source(request, options = nil) + # Pass arguments to `create_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_conversion_source(parent: nil, conversion_source: nil) + # Pass arguments to `create_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account that will own the new conversion source. + # Format: `accounts/{account}` + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] + # Required. The conversion source description. A new ID will be automatically + # assigned to it upon creation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new + # + # # Call the create_conversion_source method. + # result = client.create_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def create_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest + + # Converts hash and nil to 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_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :create_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates information of an existing conversion source. Available only for + # Merchant Center Destination conversion sources. + # + # @overload update_conversion_source(request, options = nil) + # Pass arguments to `update_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_conversion_source(conversion_source: nil, update_mask: nil) + # Pass arguments to `update_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] + # Required. The new version of the conversion source data. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new + # + # # Call the update_conversion_source method. + # result = client.update_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def update_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest + + # Converts hash and nil to 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_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.conversion_source&.name + header_params["conversion_source.name"] = request.conversion_source.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :update_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Archives an existing conversion source. If the conversion source is a + # Merchant Center Destination, it will be recoverable for 30 days. If the + # conversion source is a Google Analytics Link, it will be deleted + # immediately and can be restored by creating a new one. + # + # @overload delete_conversion_source(request, options = nil) + # Pass arguments to `delete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_conversion_source(name: nil) + # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be deleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # + # @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/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new + # + # # Call the delete_conversion_source method. + # result = client.delete_conversion_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :delete_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Re-enables an archived conversion source. Only Available for Merchant + # Center Destination conversion sources. + # + # @overload undelete_conversion_source(request, options = nil) + # Pass arguments to `undelete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload undelete_conversion_source(name: nil) + # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be undeleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new + # + # # Call the undelete_conversion_source method. + # result = client.undelete_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def undelete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.undelete_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.undelete_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.undelete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :undelete_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches a conversion source. + # + # @overload get_conversion_source(request, options = nil) + # Pass arguments to `get_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_conversion_source(name: nil) + # Pass arguments to `get_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be fetched. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new + # + # # Call the get_conversion_source method. + # result = client.get_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def get_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :get_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the list of conversion sources the caller has access to. + # + # @overload list_conversion_sources(request, options = nil) + # Pass arguments to `list_conversion_sources` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) + # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the collection of conversion + # sources. Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of conversion sources to return in a page. + # If no `page_size` is specified, `100` is used as the default value. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # Regardless of pagination, at most `200` conversion sources are returned + # in total. + # @param page_token [::String] + # Optional. Page token. + # @param show_deleted [::Boolean] + # Optional. Show deleted (archived) conversion sources. By default, deleted + # conversion sources are not returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new + # + # # Call the list_conversion_sources method. + # result = client.list_conversion_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p item + # end + # + def list_conversion_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_conversion_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_conversion_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_conversion_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :list_conversion_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ConversionSourcesService API. + # + # This class represents the configuration for ConversionSourcesService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_conversion_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 ConversionSourcesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_conversion_source + ## + # RPC-specific configuration for `update_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_conversion_source + ## + # RPC-specific configuration for `delete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_conversion_source + ## + # RPC-specific configuration for `undelete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :undelete_conversion_source + ## + # RPC-specific configuration for `get_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_conversion_source + ## + # RPC-specific configuration for `list_conversion_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_conversion_sources + + # @private + def initialize parent_rpcs = nil + create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source + @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config + update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source + @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config + delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source + @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config + undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source + @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config + get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source + @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config + list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources + @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb new file mode 100644 index 000000000000..c408f4a3e17b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_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 Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + # Credentials for the ConversionSourcesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb new file mode 100644 index 000000000000..58f06044072d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_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 Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + # Path helper methods for the ConversionSourcesService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified ConversionSource resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/conversionSources/{conversion_source}` + # + # @param account [String] + # @param conversion_source [String] + # + # @return [::String] + def conversion_source_path account:, conversion_source: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/conversionSources/#{conversion_source}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb new file mode 100644 index 000000000000..c4ae00d76953 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_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/shopping/merchant/conversions/v1/version" + +require "google/shopping/merchant/conversions/v1/conversion_sources_service/credentials" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/paths" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client" + +module Google + module Shopping + module Merchant + module Conversions + module V1 + ## + # Service for managing conversion sources for a merchant account. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + module ConversionSourcesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb new file mode 100644 index 000000000000..14c77d5fe348 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb @@ -0,0 +1,888 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/conversions/v1/conversionsources_pb" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + module Rest + ## + # REST client for the ConversionSourcesService service. + # + # Service for managing conversion sources for a merchant account. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :conversion_sources_service_stub + + ## + # Configure the ConversionSourcesService Client class. + # + # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConversionSourcesService clients + # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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", "Shopping", "Merchant", "Conversions", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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 + @conversion_sources_service_stub.universe_domain + end + + ## + # Create a new ConversionSourcesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConversionSourcesService 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 + + @conversion_sources_service_stub = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @conversion_sources_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 + @conversion_sources_service_stub.logger + end + + # Service calls + + ## + # Creates a new conversion source. + # + # @overload create_conversion_source(request, options = nil) + # Pass arguments to `create_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_conversion_source(parent: nil, conversion_source: nil) + # Pass arguments to `create_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account that will own the new conversion source. + # Format: `accounts/{account}` + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] + # Required. The conversion source description. A new ID will be automatically + # assigned to it upon creation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new + # + # # Call the create_conversion_source method. + # result = client.create_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def create_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest + + # Converts hash and nil to an 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_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.create_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates information of an existing conversion source. Available only for + # Merchant Center Destination conversion sources. + # + # @overload update_conversion_source(request, options = nil) + # Pass arguments to `update_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_conversion_source(conversion_source: nil, update_mask: nil) + # Pass arguments to `update_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] + # Required. The new version of the conversion source data. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new + # + # # Call the update_conversion_source method. + # result = client.update_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def update_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest + + # Converts hash and nil to an 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_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.update_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Archives an existing conversion source. If the conversion source is a + # Merchant Center Destination, it will be recoverable for 30 days. If the + # conversion source is a Google Analytics Link, it will be deleted + # immediately and can be restored by creating a new one. + # + # @overload delete_conversion_source(request, options = nil) + # Pass arguments to `delete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_conversion_source(name: nil) + # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be deleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # @yield [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/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new + # + # # Call the delete_conversion_source method. + # result = client.delete_conversion_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.delete_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Re-enables an archived conversion source. Only Available for Merchant + # Center Destination conversion sources. + # + # @overload undelete_conversion_source(request, options = nil) + # Pass arguments to `undelete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload undelete_conversion_source(name: nil) + # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be undeleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new + # + # # Call the undelete_conversion_source method. + # result = client.undelete_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def undelete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.undelete_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.undelete_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.undelete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.undelete_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches a conversion source. + # + # @overload get_conversion_source(request, options = nil) + # Pass arguments to `get_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_conversion_source(name: nil) + # Pass arguments to `get_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be fetched. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new + # + # # Call the get_conversion_source method. + # result = client.get_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def get_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.get_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the list of conversion sources the caller has access to. + # + # @overload list_conversion_sources(request, options = nil) + # Pass arguments to `list_conversion_sources` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) + # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the collection of conversion + # sources. Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of conversion sources to return in a page. + # If no `page_size` is specified, `100` is used as the default value. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # Regardless of pagination, at most `200` conversion sources are returned + # in total. + # @param page_token [::String] + # Optional. Page token. + # @param show_deleted [::Boolean] + # Optional. Show deleted (archived) conversion sources. By default, deleted + # conversion sources are not returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new + # + # # Call the list_conversion_sources method. + # result = client.list_conversion_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p item + # end + # + def list_conversion_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_conversion_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_conversion_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_conversion_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.list_conversion_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, "conversion_sources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ConversionSourcesService REST API. + # + # This class represents the configuration for ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 ConversionSourcesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_conversion_source + ## + # RPC-specific configuration for `update_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_conversion_source + ## + # RPC-specific configuration for `delete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_conversion_source + ## + # RPC-specific configuration for `undelete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :undelete_conversion_source + ## + # RPC-specific configuration for `get_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_conversion_source + ## + # RPC-specific configuration for `list_conversion_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_conversion_sources + + # @private + def initialize parent_rpcs = nil + create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source + @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config + update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source + @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config + delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source + @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config + undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source + @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config + get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source + @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config + list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources + @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb new file mode 100644 index 000000000000..cba0818d9244 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb @@ -0,0 +1,452 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/conversions/v1/conversionsources_pb" + +module Google + module Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + module Rest + ## + # REST service stub for the ConversionSourcesService 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_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # A result object deserialized from the server's reply + def create_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.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_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # A result object deserialized from the server's reply + def update_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.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_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_conversion_source", + 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 undelete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # A result object deserialized from the server's reply + def undelete_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_undelete_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "undelete_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # A result object deserialized from the server's reply + def get_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.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_conversion_sources REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse] + # A result object deserialized from the server's reply + def list_conversion_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_conversion_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_conversion_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.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_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest] + # 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_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/conversions/v1/{parent}/conversionSources", + body: "conversion_source", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest] + # 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_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/conversions/v1/{conversion_source.name}", + body: "conversion_source", + matches: [ + ["conversion_source.name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/conversions/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the undelete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_undelete_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/conversions/v1/{name}:undelete", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/conversions/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_conversion_sources REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_conversion_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/conversions/v1/{parent}/conversionSources", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb new file mode 100644 index 000000000000..4a8730f21f3b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/conversions/v1/conversionsources.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n?google/shopping/merchant/conversions/v1/conversionsources.proto\x12\'google.shopping.merchant.conversions.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9a\x06\n\x10\x43onversionSource\x12\x62\n\x15google_analytics_link\x18\x03 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.GoogleAnalyticsLinkB\x03\xe0\x41\x05H\x00\x12i\n\x1bmerchant_center_destination\x18\x04 \x01(\x0b\x32\x42.google.shopping.merchant.conversions.v1.MerchantCenterDestinationH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12S\n\x05state\x18\x05 \x01(\x0e\x32?.google.shopping.merchant.conversions.v1.ConversionSource.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12]\n\ncontroller\x18\x07 \x01(\x0e\x32\x44.google.shopping.merchant.conversions.v1.ConversionSource.ControllerB\x03\xe0\x41\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x41RCHIVED\x10\x02\x12\x0b\n\x07PENDING\x10\x03\"N\n\nController\x12\x1a\n\x16\x43ONTROLLER_UNSPECIFIED\x10\x00\x12\x0c\n\x08MERCHANT\x10\x01\x12\x16\n\x12YOUTUBE_AFFILIATES\x10\x02:\x90\x01\xea\x41\x8c\x01\n+merchantapi.googleapis.com/ConversionSource\x12\x38\x61\x63\x63ounts/{account}/conversionSources/{conversion_source}*\x11\x63onversionSources2\x10\x63onversionSourceB\r\n\x0bsource_data\"\xe7\x04\n\x13\x41ttributionSettings\x12-\n attribution_lookback_window_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12m\n\x11\x61ttribution_model\x18\x02 \x01(\x0e\x32M.google.shopping.merchant.conversions.v1.AttributionSettings.AttributionModelB\x03\xe0\x41\x02\x12l\n\x0f\x63onversion_type\x18\x03 \x03(\x0b\x32K.google.shopping.merchant.conversions.v1.AttributionSettings.ConversionTypeB\x06\xe0\x41\x06\xe0\x41\x05\x1a\x38\n\x0e\x43onversionType\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06report\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\"\x89\x02\n\x10\x41ttributionModel\x12!\n\x1d\x41TTRIBUTION_MODEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x43ROSS_CHANNEL_LAST_CLICK\x10\x01\x12\x1c\n\x18\x41\x44S_PREFERRED_LAST_CLICK\x10\x02\x12\x1d\n\x19\x43ROSS_CHANNEL_DATA_DRIVEN\x10\x05\x12\x1d\n\x19\x43ROSS_CHANNEL_FIRST_CLICK\x10\x06\x12\x18\n\x14\x43ROSS_CHANNEL_LINEAR\x10\x07\x12 \n\x1c\x43ROSS_CHANNEL_POSITION_BASED\x10\x08\x12\x1c\n\x18\x43ROSS_CHANNEL_TIME_DECAY\x10\t\"\xaa\x01\n\x13GoogleAnalyticsLink\x12\x1b\n\x0bproperty_id\x18\x01 \x01(\x03\x42\x06\xe0\x41\x02\xe0\x41\x05\x12_\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.AttributionSettingsB\x03\xe0\x41\x03\x12\x15\n\x08property\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xcd\x01\n\x19MerchantCenterDestination\x12\x18\n\x0b\x64\x65stination\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12_\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.AttributionSettingsB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xbf\x01\n\x1d\x43reateConversionSourceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12Y\n\x11\x63onversion_source\x18\x02 \x01(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSourceB\x03\xe0\x41\x02\"\xb0\x01\n\x1dUpdateConversionSourceRequest\x12Y\n\x11\x63onversion_source\x18\x01 \x01(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSourceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"b\n\x1d\x44\x65leteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"d\n\x1fUndeleteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"_\n\x1aGetConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"\xaf\x01\n\x1cListConversionSourcesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12\x16\n\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\x19\n\x0cshow_deleted\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x8f\x01\n\x1dListConversionSourcesResponse\x12U\n\x12\x63onversion_sources\x18\x01 \x03(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x8e\x0c\n\x18\x43onversionSourcesService\x12\x88\x02\n\x16\x43reateConversionSource\x12\x46.google.shopping.merchant.conversions.v1.CreateConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"k\xda\x41\x18parent,conversion_source\x82\xd3\xe4\x93\x02J\"5/conversions/v1/{parent=accounts/*}/conversionSources:\x11\x63onversion_source\x12\xa0\x02\n\x16UpdateConversionSource\x12\x46.google.shopping.merchant.conversions.v1.UpdateConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"\x82\x01\xda\x41\x1d\x63onversion_source,update_mask\x82\xd3\xe4\x93\x02\\2G/conversions/v1/{conversion_source.name=accounts/*/conversionSources/*}:\x11\x63onversion_source\x12\xbe\x01\n\x16\x44\x65leteConversionSource\x12\x46.google.shopping.merchant.conversions.v1.DeleteConversionSourceRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/conversions/v1/{name=accounts/*/conversionSources/*}\x12\xea\x01\n\x18UndeleteConversionSource\x12H.google.shopping.merchant.conversions.v1.UndeleteConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"I\x82\xd3\xe4\x93\x02\x43\">/conversions/v1/{name=accounts/*/conversionSources/*}:undelete:\x01*\x12\xdb\x01\n\x13GetConversionSource\x12\x43.google.shopping.merchant.conversions.v1.GetConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/conversions/v1/{name=accounts/*/conversionSources/*}\x12\xee\x01\n\x15ListConversionSources\x12\x45.google.shopping.merchant.conversions.v1.ListConversionSourcesRequest\x1a\x46.google.shopping.merchant.conversions.v1.ListConversionSourcesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/conversions/v1/{parent=accounts/*}/conversionSources\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xd9\x02\n+com.google.shopping.merchant.conversions.v1B\x16\x43onversionSourcesProtoP\x01ZScloud.google.com/go/shopping/merchant/conversions/apiv1/conversionspb;conversionspb\xaa\x02\'Google.Shopping.Merchant.Conversions.V1\xca\x02\'Google\\Shopping\\Merchant\\Conversions\\V1\xea\x02+Google::Shopping::Merchant::Conversions::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Conversions + module V1 + ConversionSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource").msgclass + ConversionSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource.State").enummodule + ConversionSource::Controller = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource.Controller").enummodule + AttributionSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings").msgclass + AttributionSettings::ConversionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings.ConversionType").msgclass + AttributionSettings::AttributionModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings.AttributionModel").enummodule + GoogleAnalyticsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.GoogleAnalyticsLink").msgclass + MerchantCenterDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.MerchantCenterDestination").msgclass + CreateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.CreateConversionSourceRequest").msgclass + UpdateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.UpdateConversionSourceRequest").msgclass + DeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.DeleteConversionSourceRequest").msgclass + UndeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.UndeleteConversionSourceRequest").msgclass + GetConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.GetConversionSourceRequest").msgclass + ListConversionSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ListConversionSourcesRequest").msgclass + ListConversionSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ListConversionSourcesResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb new file mode 100644 index 000000000000..45549ad85a8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/conversions/v1/conversionsources.proto for package 'Google.Shopping.Merchant.Conversions.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/shopping/merchant/conversions/v1/conversionsources_pb' + +module Google + module Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + # Service for managing conversion sources for a merchant account. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.conversions.v1.ConversionSourcesService' + + # Creates a new conversion source. + rpc :CreateConversionSource, ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource + # Updates information of an existing conversion source. Available only for + # Merchant Center Destination conversion sources. + rpc :UpdateConversionSource, ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource + # Archives an existing conversion source. If the conversion source is a + # Merchant Center Destination, it will be recoverable for 30 days. If the + # conversion source is a Google Analytics Link, it will be deleted + # immediately and can be restored by creating a new one. + rpc :DeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::Google::Protobuf::Empty + # Re-enables an archived conversion source. Only Available for Merchant + # Center Destination conversion sources. + rpc :UndeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource + # Fetches a conversion source. + rpc :GetConversionSource, ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource + # Retrieves the list of conversion sources the caller has access to. + rpc :ListConversionSources, ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb new file mode 100644 index 000000000000..851e5c7243ac --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/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/shopping/merchant/conversions/v1/conversion_sources_service/rest" +require "google/shopping/merchant/conversions/v1/version" + +module Google + module Shopping + module Merchant + module Conversions + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/conversions/v1/rest" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb new file mode 100644 index 000000000000..09fb85215856 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/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 Shopping + module Merchant + module Conversions + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant 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-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb new file mode 100644 index 000000000000..f308c62c77bc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb @@ -0,0 +1,289 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Conversions + module V1 + # Represents a conversion source owned by a Merchant account. A merchant + # account can have up to 200 conversion sources. + # @!attribute [rw] google_analytics_link + # @return [::Google::Shopping::Merchant::Conversions::V1::GoogleAnalyticsLink] + # Immutable. Conversion Source of type "Link to Google Analytics Property". + # + # Note: The following fields are mutually exclusive: `google_analytics_link`, `merchant_center_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] merchant_center_destination + # @return [::Google::Shopping::Merchant::Conversions::V1::MerchantCenterDestination] + # Conversion Source of type "Merchant Center Tag Destination". + # + # Note: The following fields are mutually exclusive: `merchant_center_destination`, `google_analytics_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Generated by the Content API upon creation of a + # new `ConversionSource`. Format: `[a-z]{4}:.+` The four characters before + # the colon represent the type of conversion source. Content after the colon + # represents the ID of the conversion source within that type. The ID of two + # different conversion sources might be the same across different types. The + # following type prefixes are supported: + # * `galk`: For GoogleAnalyticsLink sources. + # * `mcdn`: For MerchantCenterDestination sources. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource::State] + # Output only. Current state of this conversion source. Can't be edited + # through the API. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when an archived conversion source becomes + # permanently deleted and is no longer available to undelete. + # @!attribute [r] controller + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource::Controller] + # Output only. Controller of the conversion source. + class ConversionSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the state of a conversion source. + module State + # Conversion source has unspecified state. + STATE_UNSPECIFIED = 0 + + # Conversion source is fully functional. + ACTIVE = 1 + + # Conversion source has been archived in the last 30 days and is currently + # not functional. Can be restored using the undelete method. + ARCHIVED = 2 + + # Conversion source creation has started but not fully finished yet. + PENDING = 3 + end + + # Entity controlling the conversion source. + module Controller + # Default value. This value is unused. + CONTROLLER_UNSPECIFIED = 0 + + # Controlled by the Merchant who owns the Conversion Source. + MERCHANT = 1 + + # Controlled by the Youtube Affiliates program. + YOUTUBE_AFFILIATES = 2 + end + end + + # Represents attribution settings for conversion sources receiving + # pre-attribution data. + # @!attribute [rw] attribution_lookback_window_days + # @return [::Integer] + # Required. Lookback window (in days) used for attribution in this source. + # Supported values are `7`, `30` & `40`. + # @!attribute [rw] attribution_model + # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings::AttributionModel] + # Required. Attribution model. + # @!attribute [rw] conversion_type + # @return [::Array<::Google::Shopping::Merchant::Conversions::V1::AttributionSettings::ConversionType>] + # Immutable. Unordered list. List of different conversion types a conversion + # event can be classified as. A standard "purchase" type will be + # automatically created if this list is empty at creation time. + class AttributionSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Message representing the type of a conversion event. + # @!attribute [r] name + # @return [::String] + # Output only. Conversion event name, as it'll be reported by the client. + # @!attribute [r] report + # @return [::Boolean] + # Output only. Option indicating if the type should be included in Merchant + # Center reporting. + class ConversionType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The attribution model used for this source. We support the same set of + # [models offered by Google Analytics + # 4](https://support.google.com/analytics/answer/10596866). + module AttributionModel + # Unspecified model. + ATTRIBUTION_MODEL_UNSPECIFIED = 0 + + # Cross-channel Last Click model. + CROSS_CHANNEL_LAST_CLICK = 1 + + # Ads-preferred Last Click model. + ADS_PREFERRED_LAST_CLICK = 2 + + # Cross-channel Data Driven model. + CROSS_CHANNEL_DATA_DRIVEN = 5 + + # Cross-channel First Click model. + CROSS_CHANNEL_FIRST_CLICK = 6 + + # Cross-channel Linear model. + CROSS_CHANNEL_LINEAR = 7 + + # Cross-channel Position Based model. + CROSS_CHANNEL_POSITION_BASED = 8 + + # Cross-channel Time Decay model. + CROSS_CHANNEL_TIME_DECAY = 9 + end + end + + # "Google Analytics Link" sources can be used to get conversion data from an + # existing Google Analytics property into the linked Merchant Center account. + # @!attribute [rw] property_id + # @return [::Integer] + # Required. Immutable. ID of the Google Analytics property the merchant is + # linked to. + # @!attribute [r] attribution_settings + # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings] + # Output only. Attribution settings for the linked Google Analytics property. + # @!attribute [r] property + # @return [::String] + # Output only. Name of the Google Analytics property the merchant is linked + # to. + class GoogleAnalyticsLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # "Merchant Center Destination" sources can be used to send conversion events + # from an online store using a Google tag directly to a Merchant Center account + # where the source is created. + # @!attribute [r] destination + # @return [::String] + # Output only. Merchant Center Destination ID. + # @!attribute [rw] attribution_settings + # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings] + # Required. Attribution settings used for the Merchant Center Destination. + # @!attribute [rw] display_name + # @return [::String] + # Required. Merchant-specified display name for the destination. This is the + # name that identifies the conversion source within the Merchant Center UI. + # The maximum length is 64 characters. + # @!attribute [rw] currency_code + # @return [::String] + # Required. Three-letter currency code (ISO 4217). The currency code defines + # in which currency the conversions sent to this destination will be reported + # in Merchant Center. + class MerchantCenterDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateConversionSource method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account that will own the new conversion source. + # Format: `accounts/{account}` + # @!attribute [rw] conversion_source + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # Required. The conversion source description. A new ID will be automatically + # assigned to it upon creation. + class CreateConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateConversionSource method. + # @!attribute [rw] conversion_source + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # Required. The new version of the conversion source data. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + class UpdateConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteConversionSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversion source to be deleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + class DeleteConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UndeleteConversionSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversion source to be undeleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + class UndeleteConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the GetConversionSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversion source to be fetched. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + class GetConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListConversionSources method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account who owns the collection of conversion + # sources. Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of conversion sources to return in a page. + # If no `page_size` is specified, `100` is used as the default value. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # Regardless of pagination, at most `200` conversion sources are returned + # in total. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token. + # @!attribute [rw] show_deleted + # @return [::Boolean] + # Optional. Show deleted (archived) conversion sources. By default, deleted + # conversion sources are not returned. + class ListConversionSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListConversionSources method. + # @!attribute [rw] conversion_sources + # @return [::Array<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] + # List of conversion sources. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to be used to fetch the next results page. + class ListConversionSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/Gemfile new file mode 100644 index 000000000000..f46fb0f94950 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1", path: "../" +else + gem "google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb new file mode 100644 index 000000000000..827b4a926e65 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the create_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source. +# +def create_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new + + # Call the create_conversion_source method. + result = client.create_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + p result +end +# [END merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb new file mode 100644 index 000000000000..ba6b1ac8bfc2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the delete_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source. +# +def delete_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new + + # Call the delete_conversion_source method. + result = client.delete_conversion_source request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb new file mode 100644 index 000000000000..d9f971d44b48 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the get_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source. +# +def get_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new + + # Call the get_conversion_source method. + result = client.get_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + p result +end +# [END merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb new file mode 100644 index 000000000000..658a5ab951e4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the list_conversion_sources call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources. +# +def list_conversion_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new + + # Call the list_conversion_sources method. + result = client.list_conversion_sources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Conversions::V1::ConversionSource. + p item + end +end +# [END merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb new file mode 100644 index 000000000000..22afe1c1ac8b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the undelete_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source. +# +def undelete_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new + + # Call the undelete_conversion_source method. + result = client.undelete_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + p result +end +# [END merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb new file mode 100644 index 000000000000..67c6808b8b3c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the update_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source. +# +def update_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new + + # Call the update_conversion_source method. + result = client.update_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + p result +end +# [END merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json new file mode 100644 index 000000000000..141ac1a9a2fb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-shopping-merchant-conversions-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.conversions.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync", + "title": "Snippet for the create_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source.", + "file": "conversion_sources_service/create_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "CreateConversionSource", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.CreateConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync", + "title": "Snippet for the update_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source.", + "file": "conversion_sources_service/update_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "UpdateConversionSource", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.UpdateConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync", + "title": "Snippet for the delete_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source.", + "file": "conversion_sources_service/delete_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "DeleteConversionSource", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.DeleteConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync", + "title": "Snippet for the undelete_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source.", + "file": "conversion_sources_service/undelete_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "undelete_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "UndeleteConversionSource", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.UndeleteConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync", + "title": "Snippet for the get_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source.", + "file": "conversion_sources_service/get_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "GetConversionSource", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.GetConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync", + "title": "Snippet for the list_conversion_sources call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources.", + "file": "conversion_sources_service/list_conversion_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_conversion_sources", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "ListConversionSources", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.ListConversionSources", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "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-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb new file mode 100644 index 000000000000..58ab80ed3978 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_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/shopping/merchant/conversions/v1/conversion_sources_service" + +class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_conversion_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.conversion_source_path account: "value0", conversion_source: "value1" + assert_equal "accounts/value0/conversionSources/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb new file mode 100644 index 000000000000..f64e2c038333 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb @@ -0,0 +1,428 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/conversions/v1/conversionsources_pb" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" + + +class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + conversion_source = {} + + create_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_create_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_conversion_source parent: parent, conversion_source: conversion_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_conversion_source({ parent: parent, conversion_source: conversion_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_conversion_source_client_stub.call_count + end + end + end + + def test_update_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + conversion_source = {} + update_mask = {} + + update_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_update_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_conversion_source_client_stub.call_count + end + end + end + + def test_delete_conversion_source + # 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_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_delete_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_conversion_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_conversion_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_conversion_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_conversion_source_client_stub.call_count + end + end + end + + def test_undelete_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undelete_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_undelete_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, undelete_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.undelete_conversion_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.undelete_conversion_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.undelete_conversion_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, undelete_conversion_source_client_stub.call_count + end + end + end + + def test_get_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_get_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_conversion_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_conversion_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_conversion_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_conversion_source_client_stub.call_count + end + end + end + + def test_list_conversion_sources + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + show_deleted = true + + list_conversion_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_list_conversion_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_conversion_sources_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_conversion_sources_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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb new file mode 100644 index 000000000000..c3f61e19bfbd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb @@ -0,0 +1,467 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/conversions/v1/conversionsources_pb" +require "google/shopping/merchant/conversions/v1/conversion_sources_service" + +class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + conversion_source = {} + + create_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1::ConversionSource), request["conversion_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_conversion_source parent: parent, conversion_source: conversion_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_conversion_source({ parent: parent, conversion_source: conversion_source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_conversion_source_client_stub.call_rpc_count + end + end + + def test_update_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + conversion_source = {} + update_mask = {} + + update_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1::ConversionSource), request["conversion_source"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, 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_conversion_source({ conversion_source: conversion_source, 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_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, 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_conversion_source_client_stub.call_rpc_count + end + end + + def test_delete_conversion_source + # 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_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_conversion_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_conversion_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_conversion_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(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_conversion_source_client_stub.call_rpc_count + end + end + + def test_undelete_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undelete_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :undelete_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, undelete_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.undelete_conversion_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.undelete_conversion_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.undelete_conversion_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, undelete_conversion_source_client_stub.call_rpc_count + end + end + + def test_get_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_conversion_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_conversion_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_conversion_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_conversion_source_client_stub.call_rpc_count + end + end + + def test_list_conversion_sources + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + show_deleted = true + + list_conversion_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_conversion_sources, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["show_deleted"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_conversion_sources_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_conversion_sources_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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.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-shopping-merchant-conversions-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..20e6dffcf926 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-conversions-v1beta", + "distribution_name": "google-shopping-merchant-conversions-v1beta", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1BETA API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-conversions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml new file mode 100644 index 000000000000..6d5086c6f1ab --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-conversions-v1beta.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-shopping-merchant-conversions-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.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-shopping-merchant-conversions-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1BETA 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-shopping-merchant-conversions-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..2159dc1507a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-conversions-v1beta 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-shopping-merchant-conversions-v1beta 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/shopping/merchant/conversions/v1beta" + +client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/conversions/v1beta" + +::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions-v1beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/conversions/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/README.md new file mode 100644 index 000000000000..5fb15095eb28 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Merchant V1BETA API + +Programmatically manage your Merchant Center accounts. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1BETA API. Most users should consider using +the main client gem, +[google-shopping-merchant-conversions](https://rubygems.org/gems/google-shopping-merchant-conversions). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-conversions-v1beta +``` + +## 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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/conversions/v1beta" + +client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new +request = ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new # (request fields as keyword arguments...) +response = client.create_conversion_source request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-conversions-v1beta) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/conversions/v1beta" +require "logger" + +client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-conversions-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-conversions`. +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-shopping-merchant-conversions-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Rakefile new file mode 100644 index 000000000000..df7ec62e5251 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta 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/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials" + ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions-v1beta 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-shopping-merchant-conversions-v1beta 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-shopping-merchant-conversions-v1beta 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-shopping-merchant-conversions-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-conversions-v1beta" + header "google-shopping-merchant-conversions-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-conversions-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-conversions-v1beta 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-shopping-merchant-conversions-v1beta 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-shopping-merchant-conversions-v1beta 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-shopping-merchant-conversions-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..cb28c69efe62 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/gapic_metadata.json @@ -0,0 +1,48 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.conversions.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::Conversions::V1beta", + "services": { + "ConversionSourcesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client", + "rpcs": { + "CreateConversionSource": { + "methods": [ + "create_conversion_source" + ] + }, + "UpdateConversionSource": { + "methods": [ + "update_conversion_source" + ] + }, + "DeleteConversionSource": { + "methods": [ + "delete_conversion_source" + ] + }, + "UndeleteConversionSource": { + "methods": [ + "undelete_conversion_source" + ] + }, + "GetConversionSource": { + "methods": [ + "get_conversion_source" + ] + }, + "ListConversionSources": { + "methods": [ + "list_conversion_sources" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec new file mode 100644 index 000000000000..1b1396a16746 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/conversions/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-conversions-v1beta" + gem.version = Google::Shopping::Merchant::Conversions::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-conversions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center accounts." + 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-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb new file mode 100644 index 000000000000..8aae5f49f6d7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.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/shopping/merchant/conversions/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb new file mode 100644 index 000000000000..efa027bc825f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service" +require "google/shopping/merchant/conversions/v1beta/version" + +module Google + module Shopping + module Merchant + module Conversions + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/conversions/v1beta" + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/conversions/v1beta" + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/conversions/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb new file mode 100644 index 000000000000..ec937b0d20dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/conversions/v1beta/version" + +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/client" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + ## + # Service for managing conversion sources for a merchant account. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/conversions/v1beta/conversion_sources_service" + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + module ConversionSourcesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "conversion_sources_service", "helpers.rb" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb new file mode 100644 index 000000000000..fcb74ba6a8f8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb @@ -0,0 +1,973 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/conversions/v1beta/conversionsources_pb" + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + module ConversionSourcesService + ## + # Client for the ConversionSourcesService service. + # + # Service for managing conversion sources for a merchant account. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :conversion_sources_service_stub + + ## + # Configure the ConversionSourcesService Client class. + # + # See {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConversionSourcesService clients + # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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", "Shopping", "Merchant", "Conversions", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConversionSourcesService 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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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 + @conversion_sources_service_stub.universe_domain + end + + ## + # Create a new ConversionSourcesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConversionSourcesService 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/shopping/merchant/conversions/v1beta/conversionsources_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 + + @conversion_sources_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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 + ) + + @conversion_sources_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 + @conversion_sources_service_stub.logger + end + + # Service calls + + ## + # Creates a new conversion source. + # + # @overload create_conversion_source(request, options = nil) + # Pass arguments to `create_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_conversion_source(parent: nil, conversion_source: nil) + # Pass arguments to `create_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account that will own the new conversion source. + # Format: accounts/\\{account} + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] + # Required. The conversion source description. A new ID will be automatically + # assigned to it upon creation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new + # + # # Call the create_conversion_source method. + # result = client.create_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p result + # + def create_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest + + # Converts hash and nil to 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_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :create_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates information of an existing conversion source. Available only for + # Merchant Center Destination conversion sources. + # + # @overload update_conversion_source(request, options = nil) + # Pass arguments to `update_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_conversion_source(conversion_source: nil, update_mask: nil) + # Pass arguments to `update_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] + # Required. The new version of the conversion source data. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new + # + # # Call the update_conversion_source method. + # result = client.update_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p result + # + def update_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest + + # Converts hash and nil to 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_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.conversion_source&.name + header_params["conversion_source.name"] = request.conversion_source.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :update_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Archives an existing conversion source. If the conversion source is a + # Merchant Center Destination, it will be recoverable for 30 days. If the + # conversion source is a Google Analytics Link, it will be deleted + # immediately and can be restored by creating a new one. + # + # @overload delete_conversion_source(request, options = nil) + # Pass arguments to `delete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_conversion_source(name: nil) + # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be deleted. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + # + # @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/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new + # + # # Call the delete_conversion_source method. + # result = client.delete_conversion_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :delete_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Re-enables an archived conversion source. Only Available for Merchant + # Center Destination conversion sources. + # + # @overload undelete_conversion_source(request, options = nil) + # Pass arguments to `undelete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload undelete_conversion_source(name: nil) + # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be undeleted. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new + # + # # Call the undelete_conversion_source method. + # result = client.undelete_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p result + # + def undelete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.undelete_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.undelete_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.undelete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :undelete_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches a conversion source. + # + # @overload get_conversion_source(request, options = nil) + # Pass arguments to `get_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_conversion_source(name: nil) + # Pass arguments to `get_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be fetched. + # Format: accounts/\\{account}/conversionsources/\\{conversion_source} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new + # + # # Call the get_conversion_source method. + # result = client.get_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p result + # + def get_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :get_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the list of conversion sources the caller has access to. + # + # @overload list_conversion_sources(request, options = nil) + # Pass arguments to `list_conversion_sources` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) + # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the collection of conversion + # sources. Format: accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of conversion sources to return in a page. + # If no `page_size` is specified, `100` is used as the default value. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # Regardless of pagination, at most `200` conversion sources are returned + # in total. + # @param page_token [::String] + # Optional. Page token. + # @param show_deleted [::Boolean] + # Optional. Show deleted (archived) option. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new + # + # # Call the list_conversion_sources method. + # result = client.list_conversion_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p item + # end + # + def list_conversion_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_conversion_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_conversion_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_conversion_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :list_conversion_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ConversionSourcesService API. + # + # This class represents the configuration for ConversionSourcesService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_conversion_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 ConversionSourcesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_conversion_source + ## + # RPC-specific configuration for `update_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_conversion_source + ## + # RPC-specific configuration for `delete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_conversion_source + ## + # RPC-specific configuration for `undelete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :undelete_conversion_source + ## + # RPC-specific configuration for `get_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_conversion_source + ## + # RPC-specific configuration for `list_conversion_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_conversion_sources + + # @private + def initialize parent_rpcs = nil + create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source + @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config + update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source + @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config + delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source + @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config + undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source + @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config + get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source + @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config + list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources + @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb new file mode 100644 index 000000000000..fc78775e84b1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_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 Shopping + module Merchant + module Conversions + module V1beta + module ConversionSourcesService + # Credentials for the ConversionSourcesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb new file mode 100644 index 000000000000..0957b8b6c5be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_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 Shopping + module Merchant + module Conversions + module V1beta + module ConversionSourcesService + # Path helper methods for the ConversionSourcesService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified ConversionSource resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/conversionSources/{conversion_source}` + # + # @param account [String] + # @param conversion_source [String] + # + # @return [::String] + def conversion_source_path account:, conversion_source: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/conversionSources/#{conversion_source}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb new file mode 100644 index 000000000000..050042f123cb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_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/shopping/merchant/conversions/v1beta/version" + +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client" + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + ## + # Service for managing conversion sources for a merchant account. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + module ConversionSourcesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb new file mode 100644 index 000000000000..957dd01d3a7f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb @@ -0,0 +1,888 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/conversions/v1beta/conversionsources_pb" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + module ConversionSourcesService + module Rest + ## + # REST client for the ConversionSourcesService service. + # + # Service for managing conversion sources for a merchant account. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :conversion_sources_service_stub + + ## + # Configure the ConversionSourcesService Client class. + # + # See {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConversionSourcesService clients + # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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", "Shopping", "Merchant", "Conversions", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConversionSourcesService 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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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 + @conversion_sources_service_stub.universe_domain + end + + ## + # Create a new ConversionSourcesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConversionSourcesService 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 + + @conversion_sources_service_stub = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @conversion_sources_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 + @conversion_sources_service_stub.logger + end + + # Service calls + + ## + # Creates a new conversion source. + # + # @overload create_conversion_source(request, options = nil) + # Pass arguments to `create_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_conversion_source(parent: nil, conversion_source: nil) + # Pass arguments to `create_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account that will own the new conversion source. + # Format: accounts/\\{account} + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] + # Required. The conversion source description. A new ID will be automatically + # assigned to it upon creation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new + # + # # Call the create_conversion_source method. + # result = client.create_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p result + # + def create_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest + + # Converts hash and nil to an 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_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.create_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates information of an existing conversion source. Available only for + # Merchant Center Destination conversion sources. + # + # @overload update_conversion_source(request, options = nil) + # Pass arguments to `update_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_conversion_source(conversion_source: nil, update_mask: nil) + # Pass arguments to `update_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] + # Required. The new version of the conversion source data. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new + # + # # Call the update_conversion_source method. + # result = client.update_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p result + # + def update_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest + + # Converts hash and nil to an 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_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.update_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Archives an existing conversion source. If the conversion source is a + # Merchant Center Destination, it will be recoverable for 30 days. If the + # conversion source is a Google Analytics Link, it will be deleted + # immediately and can be restored by creating a new one. + # + # @overload delete_conversion_source(request, options = nil) + # Pass arguments to `delete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_conversion_source(name: nil) + # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be deleted. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + # @yield [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/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new + # + # # Call the delete_conversion_source method. + # result = client.delete_conversion_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.delete_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Re-enables an archived conversion source. Only Available for Merchant + # Center Destination conversion sources. + # + # @overload undelete_conversion_source(request, options = nil) + # Pass arguments to `undelete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload undelete_conversion_source(name: nil) + # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be undeleted. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new + # + # # Call the undelete_conversion_source method. + # result = client.undelete_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p result + # + def undelete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.undelete_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.undelete_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.undelete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.undelete_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches a conversion source. + # + # @overload get_conversion_source(request, options = nil) + # Pass arguments to `get_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_conversion_source(name: nil) + # Pass arguments to `get_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be fetched. + # Format: accounts/\\{account}/conversionsources/\\{conversion_source} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new + # + # # Call the get_conversion_source method. + # result = client.get_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p result + # + def get_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.get_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the list of conversion sources the caller has access to. + # + # @overload list_conversion_sources(request, options = nil) + # Pass arguments to `list_conversion_sources` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) + # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the collection of conversion + # sources. Format: accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of conversion sources to return in a page. + # If no `page_size` is specified, `100` is used as the default value. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # Regardless of pagination, at most `200` conversion sources are returned + # in total. + # @param page_token [::String] + # Optional. Page token. + # @param show_deleted [::Boolean] + # Optional. Show deleted (archived) option. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new + # + # # Call the list_conversion_sources method. + # result = client.list_conversion_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p item + # end + # + def list_conversion_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_conversion_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_conversion_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_conversion_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.list_conversion_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, "conversion_sources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ConversionSourcesService REST API. + # + # This class represents the configuration for ConversionSourcesService 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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_conversion_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 ConversionSourcesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_conversion_source + ## + # RPC-specific configuration for `update_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_conversion_source + ## + # RPC-specific configuration for `delete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_conversion_source + ## + # RPC-specific configuration for `undelete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :undelete_conversion_source + ## + # RPC-specific configuration for `get_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_conversion_source + ## + # RPC-specific configuration for `list_conversion_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_conversion_sources + + # @private + def initialize parent_rpcs = nil + create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source + @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config + update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source + @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config + delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source + @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config + undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source + @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config + get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source + @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config + list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources + @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb new file mode 100644 index 000000000000..fe73baae518b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb @@ -0,0 +1,452 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + module ConversionSourcesService + module Rest + ## + # REST service stub for the ConversionSourcesService 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_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # A result object deserialized from the server's reply + def create_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.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_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # A result object deserialized from the server's reply + def update_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.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_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_conversion_source", + 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 undelete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # A result object deserialized from the server's reply + def undelete_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_undelete_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "undelete_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # A result object deserialized from the server's reply + def get_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.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_conversion_sources REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse] + # A result object deserialized from the server's reply + def list_conversion_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_conversion_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_conversion_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse.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_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest] + # 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_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/conversions/v1beta/{parent}/conversionSources", + body: "conversion_source", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest] + # 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_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/conversions/v1beta/{conversion_source.name}", + body: "conversion_source", + matches: [ + ["conversion_source.name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/conversions/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the undelete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_undelete_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/conversions/v1beta/{name}:undelete", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/conversions/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_conversion_sources REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_conversion_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/conversions/v1beta/{parent}/conversionSources", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb new file mode 100644 index 000000000000..e7ee072fd173 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/conversions/v1beta/conversionsources.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nCgoogle/shopping/merchant/conversions/v1beta/conversionsources.proto\x12+google.shopping.merchant.conversions.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaa\x06\n\x10\x43onversionSource\x12\x66\n\x15google_analytics_link\x18\x03 \x01(\x0b\x32@.google.shopping.merchant.conversions.v1beta.GoogleAnalyticsLinkB\x03\xe0\x41\x05H\x00\x12m\n\x1bmerchant_center_destination\x18\x04 \x01(\x0b\x32\x46.google.shopping.merchant.conversions.v1beta.MerchantCenterDestinationH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12W\n\x05state\x18\x05 \x01(\x0e\x32\x43.google.shopping.merchant.conversions.v1beta.ConversionSource.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x61\n\ncontroller\x18\x07 \x01(\x0e\x32H.google.shopping.merchant.conversions.v1beta.ConversionSource.ControllerB\x03\xe0\x41\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x41RCHIVED\x10\x02\x12\x0b\n\x07PENDING\x10\x03\"N\n\nController\x12\x1a\n\x16\x43ONTROLLER_UNSPECIFIED\x10\x00\x12\x0c\n\x08MERCHANT\x10\x01\x12\x16\n\x12YOUTUBE_AFFILIATES\x10\x02:\x90\x01\xea\x41\x8c\x01\n+merchantapi.googleapis.com/ConversionSource\x12\x38\x61\x63\x63ounts/{account}/conversionSources/{conversion_source}*\x11\x63onversionSources2\x10\x63onversionSourceB\r\n\x0bsource_data\"\xef\x04\n\x13\x41ttributionSettings\x12-\n attribution_lookback_window_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12q\n\x11\x61ttribution_model\x18\x02 \x01(\x0e\x32Q.google.shopping.merchant.conversions.v1beta.AttributionSettings.AttributionModelB\x03\xe0\x41\x02\x12p\n\x0f\x63onversion_type\x18\x03 \x03(\x0b\x32O.google.shopping.merchant.conversions.v1beta.AttributionSettings.ConversionTypeB\x06\xe0\x41\x06\xe0\x41\x05\x1a\x38\n\x0e\x43onversionType\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06report\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\"\x89\x02\n\x10\x41ttributionModel\x12!\n\x1d\x41TTRIBUTION_MODEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x43ROSS_CHANNEL_LAST_CLICK\x10\x01\x12\x1c\n\x18\x41\x44S_PREFERRED_LAST_CLICK\x10\x02\x12\x1d\n\x19\x43ROSS_CHANNEL_DATA_DRIVEN\x10\x05\x12\x1d\n\x19\x43ROSS_CHANNEL_FIRST_CLICK\x10\x06\x12\x18\n\x14\x43ROSS_CHANNEL_LINEAR\x10\x07\x12 \n\x1c\x43ROSS_CHANNEL_POSITION_BASED\x10\x08\x12\x1c\n\x18\x43ROSS_CHANNEL_TIME_DECAY\x10\t\"\xae\x01\n\x13GoogleAnalyticsLink\x12\x1b\n\x0bproperty_id\x18\x01 \x01(\x03\x42\x06\xe0\x41\x02\xe0\x41\x05\x12\x63\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.conversions.v1beta.AttributionSettingsB\x03\xe0\x41\x03\x12\x15\n\x08property\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xd1\x01\n\x19MerchantCenterDestination\x12\x18\n\x0b\x64\x65stination\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x63\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.conversions.v1beta.AttributionSettingsB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xc3\x01\n\x1d\x43reateConversionSourceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12]\n\x11\x63onversion_source\x18\x02 \x01(\x0b\x32=.google.shopping.merchant.conversions.v1beta.ConversionSourceB\x03\xe0\x41\x02\"\xb4\x01\n\x1dUpdateConversionSourceRequest\x12]\n\x11\x63onversion_source\x18\x01 \x01(\x0b\x32=.google.shopping.merchant.conversions.v1beta.ConversionSourceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"b\n\x1d\x44\x65leteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"d\n\x1fUndeleteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"_\n\x1aGetConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"\xaf\x01\n\x1cListConversionSourcesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12\x16\n\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\x19\n\x0cshow_deleted\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x93\x01\n\x1dListConversionSourcesResponse\x12Y\n\x12\x63onversion_sources\x18\x01 \x03(\x0b\x32=.google.shopping.merchant.conversions.v1beta.ConversionSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xd2\x0c\n\x18\x43onversionSourcesService\x12\x94\x02\n\x16\x43reateConversionSource\x12J.google.shopping.merchant.conversions.v1beta.CreateConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"o\xda\x41\x18parent,conversion_source\x82\xd3\xe4\x93\x02N\"9/conversions/v1beta/{parent=accounts/*}/conversionSources:\x11\x63onversion_source\x12\xac\x02\n\x16UpdateConversionSource\x12J.google.shopping.merchant.conversions.v1beta.UpdateConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"\x86\x01\xda\x41\x1d\x63onversion_source,update_mask\x82\xd3\xe4\x93\x02`2K/conversions/v1beta/{conversion_source.name=accounts/*/conversionSources/*}:\x11\x63onversion_source\x12\xc6\x01\n\x16\x44\x65leteConversionSource\x12J.google.shopping.merchant.conversions.v1beta.DeleteConversionSourceRequest\x1a\x16.google.protobuf.Empty\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/conversions/v1beta/{name=accounts/*/conversionSources/*}\x12\xf6\x01\n\x18UndeleteConversionSource\x12L.google.shopping.merchant.conversions.v1beta.UndeleteConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"M\x82\xd3\xe4\x93\x02G\"B/conversions/v1beta/{name=accounts/*/conversionSources/*}:undelete:\x01*\x12\xe7\x01\n\x13GetConversionSource\x12G.google.shopping.merchant.conversions.v1beta.GetConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/conversions/v1beta/{name=accounts/*/conversionSources/*}\x12\xfa\x01\n\x15ListConversionSources\x12I.google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest\x1aJ.google.shopping.merchant.conversions.v1beta.ListConversionSourcesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/conversions/v1beta/{parent=accounts/*}/conversionSources\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xdf\x01\n/com.google.shopping.merchant.conversions.v1betaB\x16\x43onversionSourcesProtoP\x01ZWcloud.google.com/go/shopping/merchant/conversions/apiv1beta/conversionspb;conversionspb\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + ConversionSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ConversionSource").msgclass + ConversionSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ConversionSource.State").enummodule + ConversionSource::Controller = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ConversionSource.Controller").enummodule + AttributionSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.AttributionSettings").msgclass + AttributionSettings::ConversionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.AttributionSettings.ConversionType").msgclass + AttributionSettings::AttributionModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.AttributionSettings.AttributionModel").enummodule + GoogleAnalyticsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.GoogleAnalyticsLink").msgclass + MerchantCenterDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.MerchantCenterDestination").msgclass + CreateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.CreateConversionSourceRequest").msgclass + UpdateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.UpdateConversionSourceRequest").msgclass + DeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.DeleteConversionSourceRequest").msgclass + UndeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.UndeleteConversionSourceRequest").msgclass + GetConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.GetConversionSourceRequest").msgclass + ListConversionSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest").msgclass + ListConversionSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ListConversionSourcesResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb new file mode 100644 index 000000000000..f25fc3f2e077 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/conversions/v1beta/conversionsources.proto for package 'google.shopping.merchant.conversions.v1beta' +# 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/shopping/merchant/conversions/v1beta/conversionsources_pb' + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + module ConversionSourcesService + # Service for managing conversion sources for a merchant account. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.conversions.v1beta.ConversionSourcesService' + + # Creates a new conversion source. + rpc :CreateConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource + # Updates information of an existing conversion source. Available only for + # Merchant Center Destination conversion sources. + rpc :UpdateConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource + # Archives an existing conversion source. If the conversion source is a + # Merchant Center Destination, it will be recoverable for 30 days. If the + # conversion source is a Google Analytics Link, it will be deleted + # immediately and can be restored by creating a new one. + rpc :DeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, ::Google::Protobuf::Empty + # Re-enables an archived conversion source. Only Available for Merchant + # Center Destination conversion sources. + rpc :UndeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource + # Fetches a conversion source. + rpc :GetConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource + # Retrieves the list of conversion sources the caller has access to. + rpc :ListConversionSources, ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb new file mode 100644 index 000000000000..9238cbdb5b76 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/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/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" +require "google/shopping/merchant/conversions/v1beta/version" + +module Google + module Shopping + module Merchant + module Conversions + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/conversions/v1beta/rest" + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb new file mode 100644 index 000000000000..6860c89e382f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/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 Shopping + module Merchant + module Conversions + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1BETA 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-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb new file mode 100644 index 000000000000..f44123837180 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb @@ -0,0 +1,290 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + # Represents a conversion source owned by a Merchant account. A merchant + # account can have up to 200 conversion sources. + # @!attribute [rw] google_analytics_link + # @return [::Google::Shopping::Merchant::Conversions::V1beta::GoogleAnalyticsLink] + # Immutable. Conversion Source of type "Link to Google Analytics Property". + # + # Note: The following fields are mutually exclusive: `google_analytics_link`, `merchant_center_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] merchant_center_destination + # @return [::Google::Shopping::Merchant::Conversions::V1beta::MerchantCenterDestination] + # Conversion Source of type "Merchant Center Tag Destination". + # + # Note: The following fields are mutually exclusive: `merchant_center_destination`, `google_analytics_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Generated by the Content API upon creation of a + # new `ConversionSource`. Format: [a-z]\\{4}:.+ The four characters before the + # colon represent the type of conversio source. Content after the colon + # represents the ID of the conversion source within that type. The ID of two + # different conversion sources might be the same across different types. The + # following type prefixes are supported: + # - galk: For GoogleAnalyticsLink sources. + # - mcdn: For MerchantCenterDestination sources. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource::State] + # Output only. Current state of this conversion source. Can't be edited + # through the API. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when an archived conversion source becomes + # permanently deleted and is no longer available to undelete. + # @!attribute [r] controller + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource::Controller] + # Output only. Controller of the conversion source. + class ConversionSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents state of the conversion source. + module State + # Conversion source has unspecified state. + STATE_UNSPECIFIED = 0 + + # Conversion source is fully functional. + ACTIVE = 1 + + # Conversion source has been archived in the last 30 days and not + # currently functional. Can be restored using the undelete method. + ARCHIVED = 2 + + # Conversion source creation has started but not fully finished yet. + PENDING = 3 + end + + # Entity controlling the conversion source. + module Controller + # Default value. This value is unused. + CONTROLLER_UNSPECIFIED = 0 + + # Controlled by the Merchant who owns the Conversion Source. + MERCHANT = 1 + + # Controlled by the YT Affiliates program. + YOUTUBE_AFFILIATES = 2 + end + end + + # Represents attribution settings for conversion sources receiving + # pre-attribution data. + # @!attribute [rw] attribution_lookback_window_days + # @return [::Integer] + # Required. Lookback windows (in days) used for attribution in this source. + # Supported values are 7, 30, 40. + # @!attribute [rw] attribution_model + # @return [::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings::AttributionModel] + # Required. Attribution model. + # @!attribute [rw] conversion_type + # @return [::Array<::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings::ConversionType>] + # Immutable. Unordered list. List of different conversion types a conversion + # event can be classified as. A standard "purchase" type will be + # automatically created if this list is empty at creation time. + class AttributionSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Message representing a types of conversion events + # @!attribute [r] name + # @return [::String] + # Output only. Conversion event name, as it'll be reported by the client. + # @!attribute [r] report + # @return [::Boolean] + # Output only. Option indicating if the type should be included in Merchant + # Center reporting. + class ConversionType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The attribution model used for this source. We support the same set of + # models offered by Google Analytics 4, as described in: + # https://support.google.com/analytics/answer/10596866. + module AttributionModel + # Unspecified model. + ATTRIBUTION_MODEL_UNSPECIFIED = 0 + + # Cross-channel Last Click model. + CROSS_CHANNEL_LAST_CLICK = 1 + + # Ads-preferred Last Click model. + ADS_PREFERRED_LAST_CLICK = 2 + + # Cross-channel Data Driven model. + CROSS_CHANNEL_DATA_DRIVEN = 5 + + # Cross-channel First Click model. + CROSS_CHANNEL_FIRST_CLICK = 6 + + # Cross-channel Linear model. + CROSS_CHANNEL_LINEAR = 7 + + # Cross-channel Position Based model. + CROSS_CHANNEL_POSITION_BASED = 8 + + # Cross-channel Time Decay model. + CROSS_CHANNEL_TIME_DECAY = 9 + end + end + + # "Google Analytics Link" sources can be used to get conversion data from an + # existing Google Analytics property into the linked Merchant Center account. + # @!attribute [rw] property_id + # @return [::Integer] + # Required. Immutable. ID of the Google Analytics property the merchant is + # linked to. + # @!attribute [r] attribution_settings + # @return [::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings] + # Output only. Attribution settings for the linked Google Analytics property. + # @!attribute [r] property + # @return [::String] + # Output only. Name of the Google Analytics property the merchant is linked + # to. + class GoogleAnalyticsLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # "Merchant Center Destination" sources can be used to send conversion events + # from an online store using a Google tag directly to a Merchant Center account + # where the source is created. + # @!attribute [r] destination + # @return [::String] + # Output only. Merchant Center Destination ID. + # @!attribute [rw] attribution_settings + # @return [::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings] + # Required. Attribution settings being used for the Merchant Center + # Destination. + # @!attribute [rw] display_name + # @return [::String] + # Required. Merchant-specified display name for the destination. This is the + # name that identifies the conversion source within the Merchant Center UI. + # Limited to 64 characters. + # @!attribute [rw] currency_code + # @return [::String] + # Required. Three-letter currency code (ISO 4217). The currency code defines + # in which currency the conversions sent to this destination will be reported + # in Merchant Center. + class MerchantCenterDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateConversionSource method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account that will own the new conversion source. + # Format: accounts/\\{account} + # @!attribute [rw] conversion_source + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # Required. The conversion source description. A new ID will be automatically + # assigned to it upon creation. + class CreateConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateConversionSource method. + # @!attribute [rw] conversion_source + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # Required. The new version of the conversion source data. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteConversionSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversion source to be deleted. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + class DeleteConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UndeleteConversionSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversion source to be undeleted. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + class UndeleteConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the GetConversionSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversion source to be fetched. + # Format: accounts/\\{account}/conversionsources/\\{conversion_source} + class GetConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListConversionSources method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account who owns the collection of conversion + # sources. Format: accounts/\\{account} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of conversion sources to return in a page. + # If no `page_size` is specified, `100` is used as the default value. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # Regardless of pagination, at most `200` conversion sources are returned + # in total. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token. + # @!attribute [rw] show_deleted + # @return [::Boolean] + # Optional. Show deleted (archived) option. + class ListConversionSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListConversionSources method. + # @!attribute [rw] conversion_sources + # @return [::Array<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] + # List of conversion sources. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to be used to fetch the next results page. + class ListConversionSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..6a2aef3b6555 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta", path: "../" +else + gem "google-shopping-merchant-conversions-v1beta" +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-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb new file mode 100644 index 000000000000..8081af021563 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ConversionSourcesService_CreateConversionSource_sync] +require "google/shopping/merchant/conversions/v1beta" + +## +# Snippet for the create_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#create_conversion_source. +# +def create_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new + + # Call the create_conversion_source method. + result = client.create_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + p result +end +# [END merchantapi_v1beta_generated_ConversionSourcesService_CreateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb new file mode 100644 index 000000000000..67d343214d62 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ConversionSourcesService_DeleteConversionSource_sync] +require "google/shopping/merchant/conversions/v1beta" + +## +# Snippet for the delete_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#delete_conversion_source. +# +def delete_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new + + # Call the delete_conversion_source method. + result = client.delete_conversion_source request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_ConversionSourcesService_DeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb new file mode 100644 index 000000000000..6c928140a9a8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ConversionSourcesService_GetConversionSource_sync] +require "google/shopping/merchant/conversions/v1beta" + +## +# Snippet for the get_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#get_conversion_source. +# +def get_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new + + # Call the get_conversion_source method. + result = client.get_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + p result +end +# [END merchantapi_v1beta_generated_ConversionSourcesService_GetConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb new file mode 100644 index 000000000000..45183543d605 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ConversionSourcesService_ListConversionSources_sync] +require "google/shopping/merchant/conversions/v1beta" + +## +# Snippet for the list_conversion_sources call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#list_conversion_sources. +# +def list_conversion_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new + + # Call the list_conversion_sources method. + result = client.list_conversion_sources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + p item + end +end +# [END merchantapi_v1beta_generated_ConversionSourcesService_ListConversionSources_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb new file mode 100644 index 000000000000..88a2acac8a2f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ConversionSourcesService_UndeleteConversionSource_sync] +require "google/shopping/merchant/conversions/v1beta" + +## +# Snippet for the undelete_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#undelete_conversion_source. +# +def undelete_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new + + # Call the undelete_conversion_source method. + result = client.undelete_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + p result +end +# [END merchantapi_v1beta_generated_ConversionSourcesService_UndeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb new file mode 100644 index 000000000000..e65690f44b15 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ConversionSourcesService_UpdateConversionSource_sync] +require "google/shopping/merchant/conversions/v1beta" + +## +# Snippet for the update_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#update_conversion_source. +# +def update_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new + + # Call the update_conversion_source method. + result = client.update_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + p result +end +# [END merchantapi_v1beta_generated_ConversionSourcesService_UpdateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json new file mode 100644 index 000000000000..6649119ca2d1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-shopping-merchant-conversions-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.conversions.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_CreateConversionSource_sync", + "title": "Snippet for the create_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#create_conversion_source.", + "file": "conversion_sources_service/create_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#create_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" + }, + "method": { + "short_name": "CreateConversionSource", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.CreateConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_UpdateConversionSource_sync", + "title": "Snippet for the update_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#update_conversion_source.", + "file": "conversion_sources_service/update_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#update_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" + }, + "method": { + "short_name": "UpdateConversionSource", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.UpdateConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_DeleteConversionSource_sync", + "title": "Snippet for the delete_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#delete_conversion_source.", + "file": "conversion_sources_service/delete_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#delete_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" + }, + "method": { + "short_name": "DeleteConversionSource", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.DeleteConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_UndeleteConversionSource_sync", + "title": "Snippet for the undelete_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#undelete_conversion_source.", + "file": "conversion_sources_service/undelete_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "undelete_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#undelete_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" + }, + "method": { + "short_name": "UndeleteConversionSource", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.UndeleteConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_GetConversionSource_sync", + "title": "Snippet for the get_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#get_conversion_source.", + "file": "conversion_sources_service/get_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#get_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" + }, + "method": { + "short_name": "GetConversionSource", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.GetConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_ListConversionSources_sync", + "title": "Snippet for the list_conversion_sources call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#list_conversion_sources.", + "file": "conversion_sources_service/list_conversion_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_conversion_sources", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#list_conversion_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" + }, + "method": { + "short_name": "ListConversionSources", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.ListConversionSources", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" + } + } + }, + "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-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb new file mode 100644 index 000000000000..ac9354d66391 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_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/shopping/merchant/conversions/v1beta/conversion_sources_service" + +class ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_conversion_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.conversion_source_path account: "value0", conversion_source: "value1" + assert_equal "accounts/value0/conversionSources/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb new file mode 100644 index 000000000000..aeab95d12b0f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb @@ -0,0 +1,428 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/conversions/v1beta/conversionsources_pb" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" + + +class ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + conversion_source = {} + + create_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_create_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_conversion_source parent: parent, conversion_source: conversion_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_conversion_source({ parent: parent, conversion_source: conversion_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_conversion_source_client_stub.call_count + end + end + end + + def test_update_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + conversion_source = {} + update_mask = {} + + update_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_update_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_conversion_source_client_stub.call_count + end + end + end + + def test_delete_conversion_source + # 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_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_delete_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_conversion_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_conversion_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_conversion_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_conversion_source_client_stub.call_count + end + end + end + + def test_undelete_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undelete_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_undelete_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, undelete_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.undelete_conversion_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.undelete_conversion_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.undelete_conversion_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, undelete_conversion_source_client_stub.call_count + end + end + end + + def test_get_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_get_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_conversion_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_conversion_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_conversion_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_conversion_source_client_stub.call_count + end + end + end + + def test_list_conversion_sources + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + show_deleted = true + + list_conversion_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_list_conversion_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_conversion_sources_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_conversion_sources_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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb new file mode 100644 index 000000000000..d71efad08cf4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb @@ -0,0 +1,467 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service" + +class ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + conversion_source = {} + + create_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource), request["conversion_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_conversion_source parent: parent, conversion_source: conversion_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_conversion_source({ parent: parent, conversion_source: conversion_source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_conversion_source_client_stub.call_rpc_count + end + end + + def test_update_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + conversion_source = {} + update_mask = {} + + update_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource), request["conversion_source"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, 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_conversion_source({ conversion_source: conversion_source, 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_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, 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_conversion_source_client_stub.call_rpc_count + end + end + + def test_delete_conversion_source + # 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_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_conversion_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_conversion_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_conversion_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(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_conversion_source_client_stub.call_rpc_count + end + end + + def test_undelete_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undelete_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :undelete_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, undelete_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.undelete_conversion_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.undelete_conversion_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.undelete_conversion_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, undelete_conversion_source_client_stub.call_rpc_count + end + end + + def test_get_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_conversion_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_conversion_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_conversion_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_conversion_source_client_stub.call_rpc_count + end + end + + def test_list_conversion_sources + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + show_deleted = true + + list_conversion_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_conversion_sources, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["show_deleted"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_conversion_sources_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_conversion_sources_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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-data_sources-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-data_sources-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-data_sources-v1/.repo-metadata.json new file mode 100644 index 000000000000..d59439bd54bd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-data_sources-v1", + "distribution_name": "google-shopping-merchant-data_sources-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-data_sources-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-data_sources instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-data_sources-v1/.rubocop.yml new file mode 100644 index 000000000000..d2d22e9da2f7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-data_sources-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant 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-shopping-merchant-data_sources-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..1030f16bbfcd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-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/shopping/merchant/data_sources/v1" + +client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/data_sources/v1" + +::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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-shopping-merchant-data_sources-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/shopping/merchant/data_sources/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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-shopping-merchant-data_sources-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-data_sources-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/README.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1/README.md new file mode 100644 index 000000000000..0bc83ddaedcb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-data_sources](https://rubygems.org/gems/google-shopping-merchant-data_sources). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-data_sources-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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/data_sources/v1" + +client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new +request = ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new # (request fields as keyword arguments...) +response = client.get_data_source request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-data_sources-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/data_sources/v1" +require "logger" + +client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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-shopping-merchant-data_sources`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-data_sources-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-shopping-merchant-data_sources`. +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-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-data_sources-v1/Rakefile new file mode 100644 index 000000000000..b605e6ea9d30 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-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/shopping/merchant/data_sources/v1/data_sources_service/credentials" + ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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-shopping-merchant-data_sources-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-shopping-merchant-data_sources-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-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-data_sources-v1" + header "google-shopping-merchant-data_sources-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-data_sources-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-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-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-data_sources-v1/gapic_metadata.json new file mode 100644 index 000000000000..b6de9c919344 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/gapic_metadata.json @@ -0,0 +1,62 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.datasources.v1", + "libraryPackage": "::Google::Shopping::Merchant::DataSources::V1", + "services": { + "DataSourcesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client", + "rpcs": { + "GetDataSource": { + "methods": [ + "get_data_source" + ] + }, + "ListDataSources": { + "methods": [ + "list_data_sources" + ] + }, + "CreateDataSource": { + "methods": [ + "create_data_source" + ] + }, + "UpdateDataSource": { + "methods": [ + "update_data_source" + ] + }, + "DeleteDataSource": { + "methods": [ + "delete_data_source" + ] + }, + "FetchDataSource": { + "methods": [ + "fetch_data_source" + ] + } + } + } + } + }, + "FileUploadsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client", + "rpcs": { + "GetFileUpload": { + "methods": [ + "get_file_upload" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/google-shopping-merchant-data_sources-v1.gemspec b/owl-bot-staging/google-shopping-merchant-data_sources-v1/google-shopping-merchant-data_sources-v1.gemspec new file mode 100644 index 000000000000..ec56bdb06b01 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/google-shopping-merchant-data_sources-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/data_sources/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-data_sources-v1" + gem.version = Google::Shopping::Merchant::DataSources::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-data_sources-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-data_sources instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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-shopping-type", "~> 1.0" +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google-shopping-merchant-data_sources-v1.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google-shopping-merchant-data_sources-v1.rb new file mode 100644 index 000000000000..281c18ad0917 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google-shopping-merchant-data_sources-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/shopping/merchant/data_sources/v1" diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1.rb new file mode 100644 index 000000000000..df3f2660862f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1.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 "google/shopping/merchant/data_sources/v1/data_sources_service" +require "google/shopping/merchant/data_sources/v1/file_uploads_service" +require "google/shopping/merchant/data_sources/v1/version" + +module Google + module Shopping + module Merchant + module DataSources + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/data_sources/v1" + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/data_sources/v1" + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/data_sources/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb new file mode 100644 index 000000000000..0b8d9020a0ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/data_sources/v1/version" + +require "google/shopping/merchant/data_sources/v1/data_sources_service/credentials" +require "google/shopping/merchant/data_sources/v1/data_sources_service/paths" +require "google/shopping/merchant/data_sources/v1/data_sources_service/client" +require "google/shopping/merchant/data_sources/v1/data_sources_service/rest" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + ## + # Service to manage primary, supplemental, inventory and other data sources. + # See more in the [Merchant + # Center](https://support.google.com/merchants/answer/7439058) help article. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/data_sources/v1/data_sources_service" + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/data_sources/v1/data_sources_service/rest" + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + module DataSourcesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_sources_service", "helpers.rb" +require "google/shopping/merchant/data_sources/v1/data_sources_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb new file mode 100644 index 000000000000..480722122434 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb @@ -0,0 +1,984 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/datasources/v1/datasources_pb" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module DataSourcesService + ## + # Client for the DataSourcesService service. + # + # Service to manage primary, supplemental, inventory and other data sources. + # See more in the [Merchant + # Center](https://support.google.com/merchants/answer/7439058) help article. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_sources_service_stub + + ## + # Configure the DataSourcesService Client class. + # + # See {::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataSourcesService clients + # ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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", "Shopping", "Merchant", "DataSources", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataSourcesService 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::Shopping::Merchant::DataSources::V1::DataSourcesService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_sources_service_stub.universe_domain + end + + ## + # Create a new DataSourcesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataSourcesService 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/shopping/merchant/datasources/v1/datasources_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 + + @data_sources_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @data_sources_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 + @data_sources_service_stub.logger + end + + # Service calls + + ## + # Retrieves the data source configuration for the given account. + # + # @overload get_data_source(request, options = nil) + # Pass arguments to `get_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_source(name: nil) + # Pass arguments to `get_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the data source to retrieve. + # Format: `accounts/{account}/dataSources/{datasource}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new + # + # # Call the get_data_source method. + # result = client.get_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + # p result + # + def get_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :get_data_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the configurations for data sources for the given account. + # + # @overload list_data_sources(request, options = nil) + # Pass arguments to `list_data_sources` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list data sources for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of data sources to return. The service may + # return fewer than this value. The maximum value is 1000; values above 1000 + # will be coerced to 1000. If unspecified, the maximum number of data sources + # will be returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataSources` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDataSources` + # must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1::DataSource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1::DataSource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.new + # + # # Call the list_data_sources method. + # result = client.list_data_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::DataSources::V1::DataSource. + # p item + # end + # + def list_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :list_data_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_sources_service_stub, :list_data_sources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates the new data source configuration for the given account. + # This method always creates a new data source. + # + # @overload create_data_source(request, options = nil) + # Pass arguments to `create_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_source(parent: nil, data_source: nil) + # Pass arguments to `create_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account where this data source will be created. + # Format: `accounts/{account}` + # @param data_source [::Google::Shopping::Merchant::DataSources::V1::DataSource, ::Hash] + # Required. The data source to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new + # + # # Call the create_data_source method. + # result = client.create_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + # p result + # + def create_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :create_data_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the existing data source configuration. The fields that are + # set in the update mask but not provided in the resource will be deleted. + # + # @overload update_data_source(request, options = nil) + # Pass arguments to `update_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_source(data_source: nil, update_mask: nil) + # Pass arguments to `update_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param data_source [::Google::Shopping::Merchant::DataSources::V1::DataSource, ::Hash] + # Required. The data source resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of data source fields to be updated. + # + # Fields specified in the update mask without a value specified in the + # body will be deleted from the data source. + # + # Providing special "*" value for full data source replacement is not + # supported. + # + # For example, If you insert `updateMask=displayName` in the request, it will + # only update the `displayName` leaving all other fields untouched. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new + # + # # Call the update_data_source method. + # result = client.update_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + # p result + # + def update_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_source&.name + header_params["data_source.name"] = request.data_source.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :update_data_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a data source from your Merchant Center account. + # + # @overload delete_data_source(request, options = nil) + # Pass arguments to `delete_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_data_source(name: nil) + # Pass arguments to `delete_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the data source to delete. + # Format: `accounts/{account}/dataSources/{datasource}` + # + # @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/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new + # + # # Call the delete_data_source method. + # result = client.delete_data_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :delete_data_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Performs the data fetch immediately (even outside fetch schedule) on a + # data source from your Merchant Center Account. If you need to call + # this method more than once per day, you should use the Products service to + # update your product data instead. + # This method only works on data sources with a file input set. + # + # @overload fetch_data_source(request, options = nil) + # Pass arguments to `fetch_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_data_source(name: nil) + # Pass arguments to `fetch_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the data source resource to fetch. + # Format: `accounts/{account}/dataSources/{datasource}` + # + # @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/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new + # + # # Call the fetch_data_source method. + # result = client.fetch_data_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def fetch_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :fetch_data_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataSourcesService API. + # + # This class represents the configuration for DataSourcesService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_data_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::DataSources::V1::DataSourcesService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 DataSourcesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source + ## + # RPC-specific configuration for `list_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_sources + ## + # RPC-specific configuration for `create_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_source + ## + # RPC-specific configuration for `update_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_source + ## + # RPC-specific configuration for `delete_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_source + ## + # RPC-specific configuration for `fetch_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_data_source + + # @private + def initialize parent_rpcs = nil + get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source + @get_data_source = ::Gapic::Config::Method.new get_data_source_config + list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources + @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config + create_data_source_config = parent_rpcs.create_data_source if parent_rpcs.respond_to? :create_data_source + @create_data_source = ::Gapic::Config::Method.new create_data_source_config + update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source + @update_data_source = ::Gapic::Config::Method.new update_data_source_config + delete_data_source_config = parent_rpcs.delete_data_source if parent_rpcs.respond_to? :delete_data_source + @delete_data_source = ::Gapic::Config::Method.new delete_data_source_config + fetch_data_source_config = parent_rpcs.fetch_data_source if parent_rpcs.respond_to? :fetch_data_source + @fetch_data_source = ::Gapic::Config::Method.new fetch_data_source_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb new file mode 100644 index 000000000000..b9274d26a836 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_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 Shopping + module Merchant + module DataSources + module V1 + module DataSourcesService + # Credentials for the DataSourcesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb new file mode 100644 index 000000000000..4e7d168d0d48 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_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 Shopping + module Merchant + module DataSources + module V1 + module DataSourcesService + # Path helper methods for the DataSourcesService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified DataSource resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/dataSources/{datasource}` + # + # @param account [String] + # @param datasource [String] + # + # @return [::String] + def data_source_path account:, datasource: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/dataSources/#{datasource}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb new file mode 100644 index 000000000000..1ecdae02e5ff --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/data_sources/v1/version" + +require "google/shopping/merchant/data_sources/v1/data_sources_service/credentials" +require "google/shopping/merchant/data_sources/v1/data_sources_service/paths" +require "google/shopping/merchant/data_sources/v1/data_sources_service/rest/client" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + ## + # Service to manage primary, supplemental, inventory and other data sources. + # See more in the [Merchant + # Center](https://support.google.com/merchants/answer/7439058) help article. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/data_sources/v1/data_sources_service/rest" + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + module DataSourcesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/data_sources/v1/data_sources_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb new file mode 100644 index 000000000000..1328c5b1cbfa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/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/shopping/merchant/datasources/v1/datasources_pb" +require "google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module DataSourcesService + module Rest + ## + # REST client for the DataSourcesService service. + # + # Service to manage primary, supplemental, inventory and other data sources. + # See more in the [Merchant + # Center](https://support.google.com/merchants/answer/7439058) help article. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_sources_service_stub + + ## + # Configure the DataSourcesService Client class. + # + # See {::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataSourcesService clients + # ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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", "Shopping", "Merchant", "DataSources", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataSourcesService 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::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_sources_service_stub.universe_domain + end + + ## + # Create a new DataSourcesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataSourcesService 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 + + @data_sources_service_stub = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @data_sources_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 + @data_sources_service_stub.logger + end + + # Service calls + + ## + # Retrieves the data source configuration for the given account. + # + # @overload get_data_source(request, options = nil) + # Pass arguments to `get_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_source(name: nil) + # Pass arguments to `get_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the data source to retrieve. + # Format: `accounts/{account}/dataSources/{datasource}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new + # + # # Call the get_data_source method. + # result = client.get_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + # p result + # + def get_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.get_data_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the configurations for data sources for the given account. + # + # @overload list_data_sources(request, options = nil) + # Pass arguments to `list_data_sources` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list data sources for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of data sources to return. The service may + # return fewer than this value. The maximum value is 1000; values above 1000 + # will be coerced to 1000. If unspecified, the maximum number of data sources + # will be returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataSources` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDataSources` + # must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1::DataSource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1::DataSource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.new + # + # # Call the list_data_sources method. + # result = client.list_data_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::DataSources::V1::DataSource. + # p item + # end + # + def list_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.list_data_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_sources_service_stub, :list_data_sources, "data_sources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates the new data source configuration for the given account. + # This method always creates a new data source. + # + # @overload create_data_source(request, options = nil) + # Pass arguments to `create_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_data_source(parent: nil, data_source: nil) + # Pass arguments to `create_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account where this data source will be created. + # Format: `accounts/{account}` + # @param data_source [::Google::Shopping::Merchant::DataSources::V1::DataSource, ::Hash] + # Required. The data source to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new + # + # # Call the create_data_source method. + # result = client.create_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + # p result + # + def create_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.create_data_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the existing data source configuration. The fields that are + # set in the update mask but not provided in the resource will be deleted. + # + # @overload update_data_source(request, options = nil) + # Pass arguments to `update_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_source(data_source: nil, update_mask: nil) + # Pass arguments to `update_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param data_source [::Google::Shopping::Merchant::DataSources::V1::DataSource, ::Hash] + # Required. The data source resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of data source fields to be updated. + # + # Fields specified in the update mask without a value specified in the + # body will be deleted from the data source. + # + # Providing special "*" value for full data source replacement is not + # supported. + # + # For example, If you insert `updateMask=displayName` in the request, it will + # only update the `displayName` leaving all other fields untouched. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new + # + # # Call the update_data_source method. + # result = client.update_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + # p result + # + def update_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.update_data_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a data source from your Merchant Center account. + # + # @overload delete_data_source(request, options = nil) + # Pass arguments to `delete_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_data_source(name: nil) + # Pass arguments to `delete_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the data source to delete. + # Format: `accounts/{account}/dataSources/{datasource}` + # @yield [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/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new + # + # # Call the delete_data_source method. + # result = client.delete_data_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.delete_data_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Performs the data fetch immediately (even outside fetch schedule) on a + # data source from your Merchant Center Account. If you need to call + # this method more than once per day, you should use the Products service to + # update your product data instead. + # This method only works on data sources with a file input set. + # + # @overload fetch_data_source(request, options = nil) + # Pass arguments to `fetch_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_data_source(name: nil) + # Pass arguments to `fetch_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the data source resource to fetch. + # Format: `accounts/{account}/dataSources/{datasource}` + # @yield [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/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new + # + # # Call the fetch_data_source method. + # result = client.fetch_data_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def fetch_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.fetch_data_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataSourcesService REST API. + # + # This class represents the configuration for DataSourcesService 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::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_data_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 DataSourcesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source + ## + # RPC-specific configuration for `list_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_sources + ## + # RPC-specific configuration for `create_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_source + ## + # RPC-specific configuration for `update_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_source + ## + # RPC-specific configuration for `delete_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_source + ## + # RPC-specific configuration for `fetch_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_data_source + + # @private + def initialize parent_rpcs = nil + get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source + @get_data_source = ::Gapic::Config::Method.new get_data_source_config + list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources + @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config + create_data_source_config = parent_rpcs.create_data_source if parent_rpcs.respond_to? :create_data_source + @create_data_source = ::Gapic::Config::Method.new create_data_source_config + update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source + @update_data_source = ::Gapic::Config::Method.new update_data_source_config + delete_data_source_config = parent_rpcs.delete_data_source if parent_rpcs.respond_to? :delete_data_source + @delete_data_source = ::Gapic::Config::Method.new delete_data_source_config + fetch_data_source_config = parent_rpcs.fetch_data_source if parent_rpcs.respond_to? :fetch_data_source + @fetch_data_source = ::Gapic::Config::Method.new fetch_data_source_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb new file mode 100644 index 000000000000..e14b0ec46c4b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb @@ -0,0 +1,452 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/datasources/v1/datasources_pb" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module DataSourcesService + module Rest + ## + # REST service stub for the DataSourcesService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # A result object deserialized from the server's reply + def get_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_data_sources REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse] + # A result object deserialized from the server's reply + def list_data_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_data_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # A result object deserialized from the server's reply + def create_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_data_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # A result object deserialized from the server's reply + def update_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_data_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_data_source", + 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 fetch_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 fetch_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_data_source", + 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 get_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/datasources/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_sources REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/datasources/v1/{parent}/dataSources", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/datasources/v1/{parent}/dataSources", + body: "data_source", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/datasources/v1/{data_source.name}", + body: "data_source", + matches: [ + ["data_source.name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/datasources/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/datasources/v1/{name}:fetch", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb new file mode 100644 index 000000000000..1928827ef5b7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/data_sources/v1/version" + +require "google/shopping/merchant/data_sources/v1/file_uploads_service/credentials" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/paths" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/client" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + ## + # Service to manage data source file uploads. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/data_sources/v1/file_uploads_service" + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest" + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new + # + module FileUploadsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "file_uploads_service", "helpers.rb" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb new file mode 100644 index 000000000000..6190838b633b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/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/shopping/merchant/datasources/v1/fileuploads_pb" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module FileUploadsService + ## + # Client for the FileUploadsService service. + # + # Service to manage data source file uploads. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :file_uploads_service_stub + + ## + # Configure the FileUploadsService Client class. + # + # See {::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all FileUploadsService clients + # ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::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", "Shopping", "Merchant", "DataSources", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the FileUploadsService 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::Shopping::Merchant::DataSources::V1::FileUploadsService::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 + @file_uploads_service_stub.universe_domain + end + + ## + # Create a new FileUploadsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the FileUploadsService 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/shopping/merchant/datasources/v1/fileuploads_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 + + @file_uploads_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::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 + ) + + @file_uploads_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 + @file_uploads_service_stub.logger + end + + # Service calls + + ## + # Gets the latest data source file upload. Only the `latest` alias is + # accepted for a file upload. + # + # @overload get_file_upload(request, options = nil) + # Pass arguments to `get_file_upload` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_file_upload(name: nil) + # Pass arguments to `get_file_upload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the data source file upload to retrieve. + # Format: + # `accounts/{account}/dataSources/{datasource}/fileUploads/latest` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1::FileUpload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::FileUpload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new + # + # # Call the get_file_upload method. + # result = client.get_file_upload request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::FileUpload. + # p result + # + def get_file_upload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_file_upload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_file_upload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_file_upload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @file_uploads_service_stub.call_rpc :get_file_upload, request, 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 FileUploadsService API. + # + # This class represents the configuration for FileUploadsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_file_upload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_file_upload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_file_upload.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::DataSources::V1::FileUploadsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 FileUploadsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_file_upload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_file_upload + + # @private + def initialize parent_rpcs = nil + get_file_upload_config = parent_rpcs.get_file_upload if parent_rpcs.respond_to? :get_file_upload + @get_file_upload = ::Gapic::Config::Method.new get_file_upload_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb new file mode 100644 index 000000000000..8a7915807f54 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_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 Shopping + module Merchant + module DataSources + module V1 + module FileUploadsService + # Credentials for the FileUploadsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb new file mode 100644 index 000000000000..0b1160372bb5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module FileUploadsService + # Path helper methods for the FileUploadsService API. + module Paths + ## + # Create a fully-qualified FileUpload resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/dataSources/{datasource}/fileUploads/{fileupload}` + # + # @param account [String] + # @param datasource [String] + # @param fileupload [String] + # + # @return [::String] + def file_upload_path account:, datasource:, fileupload: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "datasource cannot contain /" if datasource.to_s.include? "/" + + "accounts/#{account}/dataSources/#{datasource}/fileUploads/#{fileupload}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb new file mode 100644 index 000000000000..48ac5574f7f0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_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/shopping/merchant/data_sources/v1/version" + +require "google/shopping/merchant/data_sources/v1/file_uploads_service/credentials" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/paths" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + ## + # Service to manage data source file uploads. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest" + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new + # + module FileUploadsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb new file mode 100644 index 000000000000..020a2f4ee68d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb @@ -0,0 +1,434 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/datasources/v1/fileuploads_pb" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module FileUploadsService + module Rest + ## + # REST client for the FileUploadsService service. + # + # Service to manage data source file uploads. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :file_uploads_service_stub + + ## + # Configure the FileUploadsService Client class. + # + # See {::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all FileUploadsService clients + # ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::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", "Shopping", "Merchant", "DataSources", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the FileUploadsService 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::Shopping::Merchant::DataSources::V1::FileUploadsService::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 + @file_uploads_service_stub.universe_domain + end + + ## + # Create a new FileUploadsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the FileUploadsService 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 + + @file_uploads_service_stub = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @file_uploads_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 + @file_uploads_service_stub.logger + end + + # Service calls + + ## + # Gets the latest data source file upload. Only the `latest` alias is + # accepted for a file upload. + # + # @overload get_file_upload(request, options = nil) + # Pass arguments to `get_file_upload` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_file_upload(name: nil) + # Pass arguments to `get_file_upload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the data source file upload to retrieve. + # Format: + # `accounts/{account}/dataSources/{datasource}/fileUploads/latest` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::FileUpload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::FileUpload] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new + # + # # Call the get_file_upload method. + # result = client.get_file_upload request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::FileUpload. + # p result + # + def get_file_upload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_file_upload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_file_upload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_file_upload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @file_uploads_service_stub.get_file_upload request, 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 FileUploadsService REST API. + # + # This class represents the configuration for FileUploadsService 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::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_file_upload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_file_upload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_file_upload.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 FileUploadsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_file_upload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_file_upload + + # @private + def initialize parent_rpcs = nil + get_file_upload_config = parent_rpcs.get_file_upload if parent_rpcs.respond_to? :get_file_upload + @get_file_upload = ::Gapic::Config::Method.new get_file_upload_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb new file mode 100644 index 000000000000..28ebd9dab420 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.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! + +require "google/shopping/merchant/datasources/v1/fileuploads_pb" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module FileUploadsService + module Rest + ## + # REST service stub for the FileUploadsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_file_upload REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::FileUpload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::FileUpload] + # A result object deserialized from the server's reply + def get_file_upload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_file_upload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_file_upload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::DataSources::V1::FileUpload.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_file_upload REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_file_upload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/datasources/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/dataSources/[^/]+/fileUploads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/rest.rb new file mode 100644 index 000000000000..c2d680dfac34 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/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/shopping/merchant/data_sources/v1/data_sources_service/rest" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest" +require "google/shopping/merchant/data_sources/v1/version" + +module Google + module Shopping + module Merchant + module DataSources + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/data_sources/v1/rest" + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/version.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/version.rb new file mode 100644 index 000000000000..9d0ce57bb8b4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/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 Shopping + module Merchant + module DataSources + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_pb.rb new file mode 100644 index 000000000000..1df3dfee26d6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/datasources/v1/datasources.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/datasources/v1/datasourcetypes_pb' +require 'google/shopping/merchant/datasources/v1/fileinputs_pb' + + +descriptor_data = "\n9google/shopping/merchant/datasources/v1/datasources.proto\x12\'google.shopping.merchant.datasources.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a=google/shopping/merchant/datasources/v1/datasourcetypes.proto\x1a\x38google/shopping/merchant/datasources/v1/fileinputs.proto\"\xa2\t\n\nDataSource\x12h\n\x1bprimary_product_data_source\x18\x04 \x01(\x0b\x32\x41.google.shopping.merchant.datasources.v1.PrimaryProductDataSourceH\x00\x12r\n supplemental_product_data_source\x18\x05 \x01(\x0b\x32\x46.google.shopping.merchant.datasources.v1.SupplementalProductDataSourceH\x00\x12h\n\x1blocal_inventory_data_source\x18\x06 \x01(\x0b\x32\x41.google.shopping.merchant.datasources.v1.LocalInventoryDataSourceH\x00\x12n\n\x1eregional_inventory_data_source\x18\x07 \x01(\x0b\x32\x44.google.shopping.merchant.datasources.v1.RegionalInventoryDataSourceH\x00\x12]\n\x15promotion_data_source\x18\x08 \x01(\x0b\x32<.google.shopping.merchant.datasources.v1.PromotionDataSourceH\x00\x12\x66\n\x1aproduct_review_data_source\x18\t \x01(\x0b\x32@.google.shopping.merchant.datasources.v1.ProductReviewDataSourceH\x00\x12h\n\x1bmerchant_review_data_source\x18\x0c \x01(\x0b\x32\x41.google.shopping.merchant.datasources.v1.MerchantReviewDataSourceH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x1b\n\x0e\x64\x61ta_source_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12M\n\x05input\x18\n \x01(\x0e\x32\x39.google.shopping.merchant.datasources.v1.DataSource.InputB\x03\xe0\x41\x03\x12K\n\nfile_input\x18\x0b \x01(\x0b\x32\x32.google.shopping.merchant.datasources.v1.FileInputB\x03\xe0\x41\x01\"G\n\x05Input\x12\x15\n\x11INPUT_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41PI\x10\x01\x12\x08\n\x04\x46ILE\x10\x02\x12\x06\n\x02UI\x10\x03\x12\x0c\n\x08\x41UTOFEED\x10\x04:p\xea\x41m\n%merchantapi.googleapis.com/DataSource\x12+accounts/{account}/dataSources/{datasource}*\x0b\x64\x61taSources2\ndataSourceB\x06\n\x04Type\"S\n\x14GetDataSourceRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/DataSource\"\x88\x01\n\x16ListDataSourcesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%merchantapi.googleapis.com/DataSource\x12\x16\n\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\x17ListDataSourcesResponse\x12I\n\x0c\x64\x61ta_sources\x18\x01 \x03(\x0b\x32\x33.google.shopping.merchant.datasources.v1.DataSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa7\x01\n\x17\x43reateDataSourceRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%merchantapi.googleapis.com/DataSource\x12M\n\x0b\x64\x61ta_source\x18\x02 \x01(\x0b\x32\x33.google.shopping.merchant.datasources.v1.DataSourceB\x03\xe0\x41\x02\"\x9e\x01\n\x17UpdateDataSourceRequest\x12M\n\x0b\x64\x61ta_source\x18\x01 \x01(\x0b\x32\x33.google.shopping.merchant.datasources.v1.DataSourceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"U\n\x16\x46\x65tchDataSourceRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/DataSource\"V\n\x17\x44\x65leteDataSourceRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/DataSource2\xb9\n\n\x12\x44\x61taSourcesService\x12\xc3\x01\n\rGetDataSource\x12=.google.shopping.merchant.datasources.v1.GetDataSourceRequest\x1a\x33.google.shopping.merchant.datasources.v1.DataSource\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//datasources/v1/{name=accounts/*/dataSources/*}\x12\xd6\x01\n\x0fListDataSources\x12?.google.shopping.merchant.datasources.v1.ListDataSourcesRequest\x1a@.google.shopping.merchant.datasources.v1.ListDataSourcesResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//datasources/v1/{parent=accounts/*}/dataSources\x12\xe4\x01\n\x10\x43reateDataSource\x12@.google.shopping.merchant.datasources.v1.CreateDataSourceRequest\x1a\x33.google.shopping.merchant.datasources.v1.DataSource\"Y\xda\x41\x12parent,data_source\x82\xd3\xe4\x93\x02>\"//datasources/v1/{parent=accounts/*}/dataSources:\x0b\x64\x61ta_source\x12\xf5\x01\n\x10UpdateDataSource\x12@.google.shopping.merchant.datasources.v1.UpdateDataSourceRequest\x1a\x33.google.shopping.merchant.datasources.v1.DataSource\"j\xda\x41\x17\x64\x61ta_source,update_mask\x82\xd3\xe4\x93\x02J2;/datasources/v1/{data_source.name=accounts/*/dataSources/*}:\x0b\x64\x61ta_source\x12\xac\x01\n\x10\x44\x65leteDataSource\x12@.google.shopping.merchant.datasources.v1.DeleteDataSourceRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//datasources/v1/{name=accounts/*/dataSources/*}\x12\xac\x01\n\x0f\x46\x65tchDataSource\x12?.google.shopping.merchant.datasources.v1.FetchDataSourceRequest\x1a\x16.google.protobuf.Empty\"@\x82\xd3\xe4\x93\x02:\"5/datasources/v1/{name=accounts/*/dataSources/*}:fetch:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xaa\x03\n+com.google.shopping.merchant.datasources.v1B\x10\x44\x61taSourcesProtoP\x01ZScloud.google.com/go/shopping/merchant/datasources/apiv1/datasourcespb;datasourcespb\xaa\x02\'Google.Shopping.Merchant.DataSources.V1\xca\x02\'Google\\Shopping\\Merchant\\DataSources\\V1\xea\x02+Google::Shopping::Merchant::DataSources::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\xea\x41T\n%merchantapi.googleapis.com/Datasource\x12+accounts/{account}/dataSources/{datasource}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module DataSources + module V1 + DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.DataSource").msgclass + DataSource::Input = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.DataSource.Input").enummodule + GetDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.GetDataSourceRequest").msgclass + ListDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.ListDataSourcesRequest").msgclass + ListDataSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.ListDataSourcesResponse").msgclass + CreateDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.CreateDataSourceRequest").msgclass + UpdateDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.UpdateDataSourceRequest").msgclass + FetchDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FetchDataSourceRequest").msgclass + DeleteDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.DeleteDataSourceRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_services_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_services_pb.rb new file mode 100644 index 000000000000..4ba5ad987ed2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_services_pb.rb @@ -0,0 +1,65 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/datasources/v1/datasources.proto for package 'Google.Shopping.Merchant.DataSources.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/shopping/merchant/datasources/v1/datasources_pb' + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module DataSourcesService + # Service to manage primary, supplemental, inventory and other data sources. + # See more in the [Merchant + # Center](https://support.google.com/merchants/answer/7439058) help article. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.datasources.v1.DataSourcesService' + + # Retrieves the data source configuration for the given account. + rpc :GetDataSource, ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest, ::Google::Shopping::Merchant::DataSources::V1::DataSource + # Lists the configurations for data sources for the given account. + rpc :ListDataSources, ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest, ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse + # Creates the new data source configuration for the given account. + # This method always creates a new data source. + rpc :CreateDataSource, ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest, ::Google::Shopping::Merchant::DataSources::V1::DataSource + # Updates the existing data source configuration. The fields that are + # set in the update mask but not provided in the resource will be deleted. + rpc :UpdateDataSource, ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest, ::Google::Shopping::Merchant::DataSources::V1::DataSource + # Deletes a data source from your Merchant Center account. + rpc :DeleteDataSource, ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest, ::Google::Protobuf::Empty + # Performs the data fetch immediately (even outside fetch schedule) on a + # data source from your Merchant Center Account. If you need to call + # this method more than once per day, you should use the Products service to + # update your product data instead. + # This method only works on data sources with a file input set. + rpc :FetchDataSource, ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasourcetypes_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasourcetypes_pb.rb new file mode 100644 index 000000000000..d9f0c51fcd55 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasourcetypes_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/datasources/v1/datasourcetypes.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n=google/shopping/merchant/datasources/v1/datasourcetypes.proto\x12\'google.shopping.merchant.datasources.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a google/shopping/type/types.proto\"\xf9\x05\n\x18PrimaryProductDataSource\x12\x1c\n\x0clegacy_local\x18\x0b \x01(\x08\x42\x06\xe0\x41\x01\xe0\x41\x05\x12\x1f\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12%\n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x01\x88\x01\x01\x12\x16\n\tcountries\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12h\n\x0c\x64\x65\x66\x61ult_rule\x18\x07 \x01(\x0b\x32M.google.shopping.merchant.datasources.v1.PrimaryProductDataSource.DefaultRuleB\x03\xe0\x41\x01\x12h\n\x0c\x64\x65stinations\x18\n \x03(\x0b\x32M.google.shopping.merchant.datasources.v1.PrimaryProductDataSource.DestinationB\x03\xe0\x41\x01\x1ap\n\x0b\x44\x65\x66\x61ultRule\x12\x61\n\x16take_from_data_sources\x18\x01 \x03(\x0b\x32<.google.shopping.merchant.datasources.v1.DataSourceReferenceB\x03\xe0\x41\x02\x1a\xf4\x01\n\x0b\x44\x65stination\x12\x46\n\x0b\x64\x65stination\x18\x01 \x01(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnum\x12\x62\n\x05state\x18\x02 \x01(\x0e\x32S.google.shopping.merchant.datasources.v1.PrimaryProductDataSource.Destination.State\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x42\r\n\x0b_feed_labelB\x13\n\x11_content_language\"\xf8\x01\n\x1dSupplementalProductDataSource\x12\x1f\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12%\n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x01\x88\x01\x01\x12k\n referencing_primary_data_sources\x18\x07 \x03(\x0b\x32<.google.shopping.merchant.datasources.v1.DataSourceReferenceB\x03\xe0\x41\x03\x42\r\n\x0b_feed_labelB\x13\n\x11_content_language\"X\n\x18LocalInventoryDataSource\x12\x1a\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\"[\n\x1bRegionalInventoryDataSource\x12\x1a\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\"W\n\x13PromotionDataSource\x12\x1e\n\x0etarget_country\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\"\x19\n\x17ProductReviewDataSource\"\x1a\n\x18MerchantReviewDataSource\"\x8e\x01\n\x13\x44\x61taSourceReference\x12\x0e\n\x04self\x18\x01 \x01(\x08H\x00\x12\'\n\x18primary_data_source_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x12,\n\x1dsupplemental_data_source_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x42\x10\n\x0e\x64\x61ta_source_idB\x9c\x02\n+com.google.shopping.merchant.datasources.v1B\x14\x44\x61tasourcetypesProtoP\x01ZScloud.google.com/go/shopping/merchant/datasources/apiv1/datasourcespb;datasourcespb\xaa\x02\'Google.Shopping.Merchant.DataSources.V1\xca\x02\'Google\\Shopping\\Merchant\\DataSources\\V1\xea\x02+Google::Shopping::Merchant::DataSources::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module DataSources + module V1 + PrimaryProductDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.PrimaryProductDataSource").msgclass + PrimaryProductDataSource::DefaultRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.PrimaryProductDataSource.DefaultRule").msgclass + PrimaryProductDataSource::Destination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.PrimaryProductDataSource.Destination").msgclass + PrimaryProductDataSource::Destination::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.PrimaryProductDataSource.Destination.State").enummodule + SupplementalProductDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.SupplementalProductDataSource").msgclass + LocalInventoryDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.LocalInventoryDataSource").msgclass + RegionalInventoryDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.RegionalInventoryDataSource").msgclass + PromotionDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.PromotionDataSource").msgclass + ProductReviewDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.ProductReviewDataSource").msgclass + MerchantReviewDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.MerchantReviewDataSource").msgclass + DataSourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.DataSourceReference").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileinputs_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileinputs_pb.rb new file mode 100644 index 000000000000..538873b5c51e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileinputs_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/datasources/v1/fileinputs.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/type/dayofweek_pb' +require 'google/type/timeofday_pb' + + +descriptor_data = "\n8google/shopping/merchant/datasources/v1/fileinputs.proto\x12\'google.shopping.merchant.datasources.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"\x91\x06\n\tFileInput\x12]\n\x0e\x66\x65tch_settings\x18\x01 \x01(\x0b\x32@.google.shopping.merchant.datasources.v1.FileInput.FetchSettingsB\x03\xe0\x41\x01\x12\x16\n\tfile_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12^\n\x0f\x66ile_input_type\x18\x03 \x01(\x0e\x32@.google.shopping.merchant.datasources.v1.FileInput.FileInputTypeB\x03\xe0\x41\x03\x1a\xd0\x03\n\rFetchSettings\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0c\x64\x61y_of_month\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x30\n\x0btime_of_day\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x01\x12\x30\n\x0b\x64\x61y_of_week\x18\x04 \x01(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x62\n\tfrequency\x18\x06 \x01(\x0e\x32J.google.shopping.merchant.datasources.v1.FileInput.FetchSettings.FrequencyB\x03\xe0\x41\x02\x12\x16\n\tfetch_uri\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08username\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08password\x18\t \x01(\tB\x03\xe0\x41\x01\"h\n\tFrequency\x12\x19\n\x15\x46REQUENCY_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x46REQUENCY_DAILY\x10\x01\x12\x14\n\x10\x46REQUENCY_WEEKLY\x10\x02\x12\x15\n\x11\x46REQUENCY_MONTHLY\x10\x03\"Z\n\rFileInputType\x12\x1f\n\x1b\x46ILE_INPUT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06UPLOAD\x10\x01\x12\t\n\x05\x46\x45TCH\x10\x02\x12\x11\n\rGOOGLE_SHEETS\x10\x03\x42\x97\x02\n+com.google.shopping.merchant.datasources.v1B\x0f\x46ileInputsProtoP\x01ZScloud.google.com/go/shopping/merchant/datasources/apiv1/datasourcespb;datasourcespb\xaa\x02\'Google.Shopping.Merchant.DataSources.V1\xca\x02\'Google\\Shopping\\Merchant\\DataSources\\V1\xea\x02+Google::Shopping::Merchant::DataSources::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module DataSources + module V1 + FileInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileInput").msgclass + FileInput::FetchSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileInput.FetchSettings").msgclass + FileInput::FetchSettings::Frequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileInput.FetchSettings.Frequency").enummodule + FileInput::FileInputType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileInput.FileInputType").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_pb.rb new file mode 100644 index 000000000000..cb47c57577eb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/datasources/v1/fileuploads.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n9google/shopping/merchant/datasources/v1/fileuploads.proto\x12\'google.shopping.merchant.datasources.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x06\n\nFileUpload\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0e\x64\x61ta_source_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x62\n\x10processing_state\x18\x03 \x01(\x0e\x32\x43.google.shopping.merchant.datasources.v1.FileUpload.ProcessingStateB\x03\xe0\x41\x03\x12N\n\x06issues\x18\x04 \x03(\x0b\x32\x39.google.shopping.merchant.datasources.v1.FileUpload.IssueB\x03\xe0\x41\x03\x12\x18\n\x0bitems_total\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\ritems_created\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\ritems_updated\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0bupload_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x95\x02\n\x05Issue\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x63ode\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05\x63ount\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12Y\n\x08severity\x18\x05 \x01(\x0e\x32\x42.google.shopping.merchant.datasources.v1.FileUpload.Issue.SeverityB\x03\xe0\x41\x03\x12\x1e\n\x11\x64ocumentation_uri\x18\x06 \x01(\tB\x03\xe0\x41\x03\"<\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07WARNING\x10\x01\x12\t\n\x05\x45RROR\x10\x02\"_\n\x0fProcessingState\x12 \n\x1cPROCESSING_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\r\n\tSUCCEEDED\x10\x03:\x8a\x01\xea\x41\x86\x01\n%merchantapi.googleapis.com/FileUpload\x12\x44\x61\x63\x63ounts/{account}/dataSources/{datasource}/fileUploads/{fileupload}*\x0b\x66ileUploads2\nfileUpload\"S\n\x14GetFileUploadRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/FileUpload2\xb1\x02\n\x12\x46ileUploadsService\x12\xd1\x01\n\rGetFileUpload\x12=.google.shopping.merchant.datasources.v1.GetFileUploadRequest\x1a\x33.google.shopping.merchant.datasources.v1.FileUpload\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/datasources/v1/{name=accounts/*/dataSources/*/fileUploads/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x98\x02\n+com.google.shopping.merchant.datasources.v1B\x10\x46ileUploadsProtoP\x01ZScloud.google.com/go/shopping/merchant/datasources/apiv1/datasourcespb;datasourcespb\xaa\x02\'Google.Shopping.Merchant.DataSources.V1\xca\x02\'Google\\Shopping\\Merchant\\DataSources\\V1\xea\x02+Google::Shopping::Merchant::DataSources::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module DataSources + module V1 + FileUpload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileUpload").msgclass + FileUpload::Issue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileUpload.Issue").msgclass + FileUpload::Issue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileUpload.Issue.Severity").enummodule + FileUpload::ProcessingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileUpload.ProcessingState").enummodule + GetFileUploadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.GetFileUploadRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_services_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_services_pb.rb new file mode 100644 index 000000000000..57a070591799 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_services_pb.rb @@ -0,0 +1,48 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/datasources/v1/fileuploads.proto for package 'Google.Shopping.Merchant.DataSources.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/shopping/merchant/datasources/v1/fileuploads_pb' + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module FileUploadsService + # Service to manage data source file uploads. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.datasources.v1.FileUploadsService' + + # Gets the latest data source file upload. Only the `latest` alias is + # accepted for a file upload. + rpc :GetFileUpload, ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest, ::Google::Shopping::Merchant::DataSources::V1::FileUpload + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant 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-shopping-merchant-data_sources-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb new file mode 100644 index 000000000000..dab10c2325dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb @@ -0,0 +1,231 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module DataSources + module V1 + # The [data source](/merchant/api/guides/data-sources/overview) for + # the Merchant Center account. + # @!attribute [rw] primary_product_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::PrimaryProductDataSource] + # The [primary data + # source](https://support.google.com/merchants/answer/7439058) for local + # and online products. + # + # Note: The following fields are mutually exclusive: `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] supplemental_product_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::SupplementalProductDataSource] + # The [supplemental data + # source](https://support.google.com/merchants/answer/7439058) for local + # and online products. + # + # Note: The following fields are mutually exclusive: `supplemental_product_data_source`, `primary_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] local_inventory_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::LocalInventoryDataSource] + # The [local + # inventory](https://support.google.com/merchants/answer/7023001) data + # source. + # + # Note: The following fields are mutually exclusive: `local_inventory_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] regional_inventory_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::RegionalInventoryDataSource] + # The [regional + # inventory](https://support.google.com/merchants/answer/7439058) data + # source. + # + # Note: The following fields are mutually exclusive: `regional_inventory_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] promotion_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::PromotionDataSource] + # The [promotion](https://support.google.com/merchants/answer/2906014) + # data source. + # + # Note: The following fields are mutually exclusive: `promotion_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] product_review_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::ProductReviewDataSource] + # The [product + # review](https://support.google.com/merchants/answer/7045996) + # data source. + # + # Note: The following fields are mutually exclusive: `product_review_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] merchant_review_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::MerchantReviewDataSource] + # The [merchant + # review](https://support.google.com/merchants/answer/7045996) + # data source. + # + # Note: The following fields are mutually exclusive: `merchant_review_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Required. Identifier. The name of the data source. + # Format: + # `accounts/{account}/dataSources/{datasource}` + # @!attribute [r] data_source_id + # @return [::Integer] + # Output only. The data source id. + # @!attribute [rw] display_name + # @return [::String] + # Required. The displayed data source name in the Merchant Center UI. + # @!attribute [r] input + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource::Input] + # Output only. Determines the type of input to the data source. Based on the + # input some settings might not work. Only generic data sources can be + # created through the API. + # @!attribute [rw] file_input + # @return [::Google::Shopping::Merchant::DataSources::V1::FileInput] + # Optional. The field is used only when data is managed through a file. + class DataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Determines the type of input to the data source. Based on the input some + # settings might not be supported. + module Input + # Input unspecified. + INPUT_UNSPECIFIED = 0 + + # Represents data sources for which the data is primarily provided through + # the API. + API = 1 + + # Represents data sources for which the data is primarily provided through + # file input. Data can still be provided through the API. + FILE = 2 + + # The data source for products added directly in Merchant Center. + # + # This type of data source can not be created or updated through this API, + # only by Merchant Center UI. + # + # This type of data source is read only. + UI = 3 + + # This is also known as + # [Automated feeds](https://support.google.com/merchants/answer/12158480) + # used to automatically build your product data. This type of data source + # can be enabled or disabled through the Accounts sub-API. + AUTOFEED = 4 + end + end + + # Request message for the GetDataSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the data source to retrieve. + # Format: `accounts/{account}/dataSources/{datasource}` + class GetDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListDataSources method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list data sources for. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of data sources to return. The service may + # return fewer than this value. The maximum value is 1000; values above 1000 + # will be coerced to 1000. If unspecified, the maximum number of data sources + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDataSources` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDataSources` + # must match the call that provided the page token. + class ListDataSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListDataSources method. + # @!attribute [rw] data_sources + # @return [::Array<::Google::Shopping::Merchant::DataSources::V1::DataSource>] + # The data sources from the specified account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDataSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateDataSource method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account where this data source will be created. + # Format: `accounts/{account}` + # @!attribute [rw] data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # Required. The data source to create. + class CreateDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateDataSource method. + # @!attribute [rw] data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # Required. The data source resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of data source fields to be updated. + # + # Fields specified in the update mask without a value specified in the + # body will be deleted from the data source. + # + # Providing special "*" value for full data source replacement is not + # supported. + # + # For example, If you insert `updateMask=displayName` in the request, it will + # only update the `displayName` leaving all other fields untouched. + class UpdateDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the FetchDataSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the data source resource to fetch. + # Format: `accounts/{account}/dataSources/{datasource}` + class FetchDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteDataSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the data source to delete. + # Format: `accounts/{account}/dataSources/{datasource}` + class DeleteDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb new file mode 100644 index 000000000000..f3c8579d065b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb @@ -0,0 +1,293 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module DataSources + module V1 + # The primary data source for local and online products. + # @!attribute [rw] legacy_local + # @return [::Boolean] + # Optional. Immutable. Determines whether the products of this data source + # are **only** targeting local destinations. Legacy local products are + # prefixed with `local~` in the product resource ID. For example, + # `accounts/123/products/local~en~US~sku123`. + # @!attribute [rw] feed_label + # @return [::String] + # Optional. Immutable. The feed label that is specified on the data source + # level. + # + # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), + # and dashes (-). + # + # See also [migration to feed + # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). + # + # `feedLabel` and `contentLanguage` must be either both set or unset for data + # sources with product content type. + # They must be set for data sources with a file input. + # + # If set, the data source will only accept products matching this + # combination. If unset, the data source will accept products without that + # restriction. + # @!attribute [rw] content_language + # @return [::String] + # Optional. Immutable. The two-letter ISO 639-1 language of the items in the + # data source. + # + # `feedLabel` and `contentLanguage` must be either both set or unset. + # The fields can only be unset for data sources without file input. + # + # If set, the data source will only accept products matching this + # combination. If unset, the data source will accept products without that + # restriction. + # @!attribute [rw] countries + # @return [::Array<::String>] + # Optional. The countries where the items may be displayed. Represented as a + # [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). + # @!attribute [rw] default_rule + # @return [::Google::Shopping::Merchant::DataSources::V1::PrimaryProductDataSource::DefaultRule] + # Optional. Default rule management of the data source. If set, the linked + # data sources will be replaced. + # @!attribute [rw] destinations + # @return [::Array<::Google::Shopping::Merchant::DataSources::V1::PrimaryProductDataSource::Destination>] + # Optional. A list of destinations describing where products of the data + # source can be shown. + # + # When retrieving the data source, the list contains all the destinations + # that can be used for the data source, including the ones that are disabled + # for the data source but enabled for the account. + # + # Only destinations that are enabled on the account, for example through + # program participation, can be enabled on the data source. + # + # If unset, during creation, the destinations will be inherited based on the + # account level program participation. + # + # If set, during creation or update, the data source will be set only for the + # specified destinations. + # + # Updating this field requires at least one destination. + class PrimaryProductDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Default rule management of the data source. + # @!attribute [rw] take_from_data_sources + # @return [::Array<::Google::Shopping::Merchant::DataSources::V1::DataSourceReference>] + # Required. The list of data sources linked in the [default + # rule](https://support.google.com/merchants/answer/7450276). + # This list is ordered by the default rule priority of joining the data. + # It might include none or multiple references to `self` and supplemental + # data sources. + # + # The list must not be empty. + # + # To link the data source to the default rule, you need to add a + # new reference to this list (in sequential order). + # + # To unlink the data source from the default rule, you need to + # remove the given reference from this list. + # + # Changing the order of this list will result in changing the priority of + # data sources in the default rule. + # + # For example, providing the following list: [`1001`, `self`] will + # take attribute values from supplemental data source `1001`, and fallback + # to `self` if the attribute is not set in `1001`. + class DefaultRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations also known as [Marketing + # methods](https://support.google.com/merchants/answer/15130232) selections. + # @!attribute [rw] destination + # @return [::Google::Shopping::Type::Destination::DestinationEnum] + # [Marketing methods](https://support.google.com/merchants/answer/15130232) + # (also known as destination) selections. + # @!attribute [rw] state + # @return [::Google::Shopping::Merchant::DataSources::V1::PrimaryProductDataSource::Destination::State] + # The state of the destination. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the destination. + module State + # Not specified. + STATE_UNSPECIFIED = 0 + + # Indicates that the destination is enabled. + ENABLED = 1 + + # Indicates that the destination is disabled. + DISABLED = 2 + end + end + end + + # The supplemental data source for local and online products. After creation, + # you should make sure to link the supplemental product data source into one or + # more primary product data sources. + # @!attribute [rw] feed_label + # @return [::String] + # Optional. Immutable. The feed label that is specified on the data source + # level. + # + # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), + # and dashes (-). + # + # See also [migration to feed + # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). + # + # `feedLabel` and `contentLanguage` must be either both set or unset for data + # sources with product content type. + # + # They must be set for data sources with a [file + # input][google.shopping.merchant.datasources.v1.FileInput]. + # The fields must be unset for data sources without [file + # input][google.shopping.merchant.datasources.v1.FileInput]. + # + # If set, the data source will only accept products matching this + # combination. If unset, the data source will accept produts without that + # restriction. + # @!attribute [rw] content_language + # @return [::String] + # Optional. Immutable. The two-letter ISO 639-1 language of the items in the + # data source. + # + # `feedLabel` and `contentLanguage` must be either both set or unset. + # The fields can only be unset for data sources without file input. + # + # If set, the data source will only accept products matching this + # combination. If unset, the data source will accept produts without that + # restriction. + # @!attribute [r] referencing_primary_data_sources + # @return [::Array<::Google::Shopping::Merchant::DataSources::V1::DataSourceReference>] + # Output only. The (unordered and deduplicated) list of all primary data + # sources linked to this data source in either default or custom rules. + # Supplemental data source cannot be deleted before all links are removed. + class SupplementalProductDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The local inventory data source type is only available for file inputs and + # can't be used to create API local inventory data sources. + # @!attribute [rw] feed_label + # @return [::String] + # Required. Immutable. The feed label of the offers to which the local + # inventory is provided. + # + # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), + # and dashes (-). + # + # See also [migration to feed + # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). + # @!attribute [rw] content_language + # @return [::String] + # Required. Immutable. The two-letter ISO 639-1 language of the items to + # which the local inventory is provided. + class LocalInventoryDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] feed_label + # @return [::String] + # Required. Immutable. The feed label of the offers to which the regional + # inventory is provided. + # + # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), + # and dashes (-). + # + # See also [migration to feed + # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). + # @!attribute [rw] content_language + # @return [::String] + # Required. Immutable. The two-letter ISO 639-1 language of the items to + # which the regional inventory is provided. + class RegionalInventoryDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The promotion data source. + # @!attribute [rw] target_country + # @return [::String] + # Required. Immutable. The target country used as part of the unique + # identifier. Represented as a [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). + # + # Promotions are only available in selected + # [countries](https://support.google.com/merchants/answer/4588460). + # @!attribute [rw] content_language + # @return [::String] + # Required. Immutable. The two-letter ISO 639-1 language of the items in the + # data source. + class PromotionDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The product review data source. + class ProductReviewDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The merchant review data source. + class MerchantReviewDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Data source reference can be used to manage related data sources within the + # data source service. + # @!attribute [rw] self + # @return [::Boolean] + # Self should be used to reference the primary data source itself. + # + # Note: The following fields are mutually exclusive: `self`, `primary_data_source_name`, `supplemental_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] primary_data_source_name + # @return [::String] + # Optional. The name of the primary data source. + # Format: + # `accounts/{account}/dataSources/{datasource}` + # + # Note: The following fields are mutually exclusive: `primary_data_source_name`, `self`, `supplemental_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] supplemental_data_source_name + # @return [::String] + # Optional. The name of the supplemental data source. + # Format: + # `accounts/{account}/dataSources/{datasource}` + # + # Note: The following fields are mutually exclusive: `supplemental_data_source_name`, `self`, `primary_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DataSourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb new file mode 100644 index 000000000000..eda22f604341 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.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 Shopping + module Merchant + module DataSources + module V1 + # The data specific for file data sources. This field is empty for other + # data source inputs. + # @!attribute [rw] fetch_settings + # @return [::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings] + # Optional. Fetch details to deliver the data source. It contains settings + # for `FETCH` and `GOOGLE_SHEETS` file input types. The required fields vary + # based on the frequency of fetching. + # @!attribute [rw] file_name + # @return [::String] + # Optional. The file name of the data source. Required for `UPLOAD` file + # input type. + # @!attribute [r] file_input_type + # @return [::Google::Shopping::Merchant::DataSources::V1::FileInput::FileInputType] + # Output only. The type of file input. + class FileInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Fetch details to deliver the data source. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. Enables or pauses the fetch schedule. + # @!attribute [rw] day_of_month + # @return [::Integer] + # Optional. The day of the month when the data source file should be + # fetched (1-31). This field can only be set for monthly frequency. + # @!attribute [rw] time_of_day + # @return [::Google::Type::TimeOfDay] + # Optional. The hour of the day when the data source file should be + # fetched. Minutes and seconds are not supported and will be ignored. + # @!attribute [rw] day_of_week + # @return [::Google::Type::DayOfWeek] + # Optional. The day of the week when the data source file should be + # fetched. This field can only be set for weekly frequency. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. [Time zone](https://cldr.unicode.org) used for schedule. UTC by + # default. For example, "America/Los_Angeles". + # @!attribute [rw] frequency + # @return [::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings::Frequency] + # Required. The frequency describing fetch schedule. + # @!attribute [rw] fetch_uri + # @return [::String] + # Optional. The URL where the data source file can be fetched. Google + # Merchant Center supports automatic scheduled uploads using the HTTP, + # HTTPS or SFTP protocols, so the value will need to be a valid link using + # one of those three protocols. Immutable for Google Sheets files. + # @!attribute [rw] username + # @return [::String] + # Optional. An optional user name for + # {::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings#fetch_uri fetch_uri}. + # Used for [submitting data sources through + # SFTP](https://support.google.com/merchants/answer/13813117). + # @!attribute [rw] password + # @return [::String] + # Optional. An optional password for + # {::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings#fetch_uri fetch_uri}. + # Used for [submitting data sources through + # SFTP](https://support.google.com/merchants/answer/13813117). + class FetchSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The required fields vary based on the frequency of fetching. For a + # monthly fetch schedule, `day of month` and [hour of + # day](../Shared.Types/TimeOfDay) are required. For a weekly fetch + # schedule, [day of week](../Shared.Types/DayOfWeek) and [hour of + # day](../Shared.Types/TimeOfDay) are required. For a daily fetch schedule, + # only an [hour of day](../Shared.Types/TimeOfDay) is required. + module Frequency + # Frequency unspecified. + FREQUENCY_UNSPECIFIED = 0 + + # The fetch happens every day. + FREQUENCY_DAILY = 1 + + # The fetch happens every week. + FREQUENCY_WEEKLY = 2 + + # The fetch happens every month. + FREQUENCY_MONTHLY = 3 + end + end + + # The method of file delivery. + module FileInputType + # File input type unspecified. + FILE_INPUT_TYPE_UNSPECIFIED = 0 + + # The file is uploaded through SFTP, Google Cloud Storage or manually in + # the Merchant Center. + UPLOAD = 1 + + # The file is fetched from the configured + # {::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings#fetch_uri fetch_uri}. + FETCH = 2 + + # The file is fetched from Google Sheets specified in the + # {::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings#fetch_uri fetch_uri}. + # However, you can't set up `GOOGLE_SHEETS` as a data source through the + # API. To add `GOOGLE_SHEETS` as a data source through the Merchant Center, + # see [Add products to Merchant + # Center](https://support.google.com/merchants/answer/12158053). + GOOGLE_SHEETS = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb new file mode 100644 index 000000000000..1df1ee25c49a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb @@ -0,0 +1,131 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module DataSources + module V1 + # The file upload of a specific data source, that is, the result of the + # retrieval of the data source at a certain timestamp computed asynchronously + # when the data source processing is finished. Only applicable to file data + # sources. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the data source file upload. + # Format: + # `{datasource.name=accounts/{account}/dataSources/{datasource}/fileUploads/{fileupload}}` + # @!attribute [r] data_source_id + # @return [::Integer] + # Output only. The data source id. + # @!attribute [r] processing_state + # @return [::Google::Shopping::Merchant::DataSources::V1::FileUpload::ProcessingState] + # Output only. The processing state of the data source. + # @!attribute [r] issues + # @return [::Array<::Google::Shopping::Merchant::DataSources::V1::FileUpload::Issue>] + # Output only. The list of issues occurring in the data source. + # @!attribute [r] items_total + # @return [::Integer] + # Output only. The number of items in the data source that were processed. + # @!attribute [r] items_created + # @return [::Integer] + # Output only. The number of items in the data source that were created. + # @!attribute [r] items_updated + # @return [::Integer] + # Output only. The number of items in the data source that were updated. + # @!attribute [r] upload_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The date at which the file of the data source was uploaded. + class FileUpload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An error occurring in the data source, like "invalid price". + # @!attribute [r] title + # @return [::String] + # Output only. The title of the issue, for example, "Item too big". + # @!attribute [r] description + # @return [::String] + # Output only. The error description, for example, "Your data source + # contains items which have too many attributes, or are too big. These + # items will be dropped". + # @!attribute [r] code + # @return [::String] + # Output only. The code of the error, for example, + # "validation/invalid_value". Returns + # "?" if the code is unknown. + # @!attribute [r] count + # @return [::Integer] + # Output only. The number of occurrences of the error in the file upload. + # @!attribute [r] severity + # @return [::Google::Shopping::Merchant::DataSources::V1::FileUpload::Issue::Severity] + # Output only. The severity of the issue. + # @!attribute [r] documentation_uri + # @return [::String] + # Output only. Link to the documentation explaining the issue in more + # details, if available. + class Issue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The severity of the issue. + module Severity + # Severity unspecified. + SEVERITY_UNSPECIFIED = 0 + + # The issue is the warning. + WARNING = 1 + + # The issue is an error. + ERROR = 2 + end + end + + # The processing state of the data source. + module ProcessingState + # Processing state unspecified. + PROCESSING_STATE_UNSPECIFIED = 0 + + # The data source could not be processed or all the items had errors. + FAILED = 1 + + # The data source is being processed. + IN_PROGRESS = 2 + + # The data source was processed successfully, though some items might have + # had errors. + SUCCEEDED = 3 + end + end + + # Request message for the GetFileUploadRequest method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the data source file upload to retrieve. + # Format: + # `accounts/{account}/dataSources/{datasource}/fileUploads/latest` + class GetFileUploadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/type/types.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! + + +module Google + module Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + + # Youtube shopping checkout. + YOUTUBE_SHOPPING_CHECKOUT = 7 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 8 + + # [Free vehicle + # listings](https://support.google.com/merchants/answer/11189169). + FREE_VEHICLE_LISTINGS = 9 + + # [Vehicle ads](https://support.google.com/merchants/answer/11189169). + VEHICLE_ADS = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free product listings on UCP + # checkout](https://developers.google.com/merchant/ucp). + FREE_LISTINGS_UCP_CHECKOUT = 19 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 18 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + + # [Product + # Reviews](https://support.google.com/merchants/answer/14620732). + PRODUCT_REVIEWS = 15 + + # [Merchant + # Reviews](https://developers.google.com/merchant-review-feeds). + MERCHANT_REVIEWS = 16 + + # YouTube Checkout + # . + YOUTUBE_CHECKOUT = 17 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/dayofweek.rb new file mode 100644 index 000000000000..973211b9ffe7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/dayofweek.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a day of the week. + module DayOfWeek + # The day of the week is unspecified. + DAY_OF_WEEK_UNSPECIFIED = 0 + + # Monday + MONDAY = 1 + + # Tuesday + TUESDAY = 2 + + # Wednesday + WEDNESDAY = 3 + + # Thursday + THURSDAY = 4 + + # Friday + FRIDAY = 5 + + # Saturday + SATURDAY = 6 + + # Sunday + SUNDAY = 7 + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.rb new file mode 100644 index 000000000000..8372dad8beb8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a time of day. The date and time zone are either not significant + # or are specified elsewhere. An API may choose to allow leap seconds. Related + # types are [google.type.Date][google.type.Date] and + # `google.protobuf.Timestamp`. + # @!attribute [rw] hours + # @return [::Integer] + # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose + # to allow the value "24:00:00" for scenarios like business closing time. + # @!attribute [rw] minutes + # @return [::Integer] + # Minutes of hour of day. Must be from 0 to 59. + # @!attribute [rw] seconds + # @return [::Integer] + # Seconds of minutes of the time. Must normally be from 0 to 59. An API may + # allow the value 60 if it allows leap-seconds. + # @!attribute [rw] nanos + # @return [::Integer] + # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + class TimeOfDay + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/Gemfile new file mode 100644 index 000000000000..eb731687c175 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1", path: "../" +else + gem "google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/snippets/data_sources_service/create_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/create_data_source.rb new file mode 100644 index 000000000000..cdd60ea95da4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/create_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_DataSourcesService_CreateDataSource_sync] +require "google/shopping/merchant/data_sources/v1" + +## +# Snippet for the create_data_source call in the DataSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#create_data_source. +# +def create_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new + + # Call the create_data_source method. + result = client.create_data_source request + + # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + p result +end +# [END merchantapi_v1_generated_DataSourcesService_CreateDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/delete_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/delete_data_source.rb new file mode 100644 index 000000000000..4fde5b59b589 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/delete_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_DataSourcesService_DeleteDataSource_sync] +require "google/shopping/merchant/data_sources/v1" + +## +# Snippet for the delete_data_source call in the DataSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#delete_data_source. +# +def delete_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new + + # Call the delete_data_source method. + result = client.delete_data_source request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_DataSourcesService_DeleteDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/fetch_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/fetch_data_source.rb new file mode 100644 index 000000000000..f518b7b9fecf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/fetch_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_DataSourcesService_FetchDataSource_sync] +require "google/shopping/merchant/data_sources/v1" + +## +# Snippet for the fetch_data_source call in the DataSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#fetch_data_source. +# +def fetch_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new + + # Call the fetch_data_source method. + result = client.fetch_data_source request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_DataSourcesService_FetchDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/get_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/get_data_source.rb new file mode 100644 index 000000000000..af4e36c718df --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/get_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_DataSourcesService_GetDataSource_sync] +require "google/shopping/merchant/data_sources/v1" + +## +# Snippet for the get_data_source call in the DataSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#get_data_source. +# +def get_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new + + # Call the get_data_source method. + result = client.get_data_source request + + # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + p result +end +# [END merchantapi_v1_generated_DataSourcesService_GetDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/list_data_sources.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/list_data_sources.rb new file mode 100644 index 000000000000..c0d1b7947b3c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/list_data_sources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_DataSourcesService_ListDataSources_sync] +require "google/shopping/merchant/data_sources/v1" + +## +# Snippet for the list_data_sources call in the DataSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#list_data_sources. +# +def list_data_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.new + + # Call the list_data_sources method. + result = client.list_data_sources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::DataSources::V1::DataSource. + p item + end +end +# [END merchantapi_v1_generated_DataSourcesService_ListDataSources_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/update_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/update_data_source.rb new file mode 100644 index 000000000000..f35600e6bfe2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/update_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_DataSourcesService_UpdateDataSource_sync] +require "google/shopping/merchant/data_sources/v1" + +## +# Snippet for the update_data_source call in the DataSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#update_data_source. +# +def update_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new + + # Call the update_data_source method. + result = client.update_data_source request + + # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + p result +end +# [END merchantapi_v1_generated_DataSourcesService_UpdateDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/file_uploads_service/get_file_upload.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/file_uploads_service/get_file_upload.rb new file mode 100644 index 000000000000..d1e5ca1b0acb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/file_uploads_service/get_file_upload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_FileUploadsService_GetFileUpload_sync] +require "google/shopping/merchant/data_sources/v1" + +## +# Snippet for the get_file_upload call in the FileUploadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client#get_file_upload. +# +def get_file_upload + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new + + # Call the get_file_upload method. + result = client.get_file_upload request + + # The returned object is of type Google::Shopping::Merchant::DataSources::V1::FileUpload. + p result +end +# [END merchantapi_v1_generated_FileUploadsService_GetFileUpload_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json new file mode 100644 index 000000000000..18efc22a579b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json @@ -0,0 +1,295 @@ +{ + "client_library": { + "name": "google-shopping-merchant-data_sources-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.datasources.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_DataSourcesService_GetDataSource_sync", + "title": "Snippet for the get_data_source call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#get_data_source.", + "file": "data_sources_service/get_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_source", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#get_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::DataSources::V1::DataSource", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" + }, + "method": { + "short_name": "GetDataSource", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.GetDataSource", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DataSourcesService_ListDataSources_sync", + "title": "Snippet for the list_data_sources call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#list_data_sources.", + "file": "data_sources_service/list_data_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_sources", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#list_data_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" + }, + "method": { + "short_name": "ListDataSources", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.ListDataSources", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DataSourcesService_CreateDataSource_sync", + "title": "Snippet for the create_data_source call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#create_data_source.", + "file": "data_sources_service/create_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_source", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#create_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::DataSources::V1::DataSource", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" + }, + "method": { + "short_name": "CreateDataSource", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.CreateDataSource", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DataSourcesService_UpdateDataSource_sync", + "title": "Snippet for the update_data_source call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#update_data_source.", + "file": "data_sources_service/update_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_source", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#update_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::DataSources::V1::DataSource", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" + }, + "method": { + "short_name": "UpdateDataSource", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.UpdateDataSource", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DataSourcesService_DeleteDataSource_sync", + "title": "Snippet for the delete_data_source call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#delete_data_source.", + "file": "data_sources_service/delete_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_source", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#delete_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" + }, + "method": { + "short_name": "DeleteDataSource", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.DeleteDataSource", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DataSourcesService_FetchDataSource_sync", + "title": "Snippet for the fetch_data_source call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#fetch_data_source.", + "file": "data_sources_service/fetch_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_data_source", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#fetch_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" + }, + "method": { + "short_name": "FetchDataSource", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.FetchDataSource", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_FileUploadsService_GetFileUpload_sync", + "title": "Snippet for the get_file_upload call in the FileUploadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client#get_file_upload.", + "file": "file_uploads_service/get_file_upload.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_file_upload", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client#get_file_upload", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::DataSources::V1::FileUpload", + "client": { + "short_name": "FileUploadsService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client" + }, + "method": { + "short_name": "GetFileUpload", + "full_name": "google.shopping.merchant.datasources.v1.FileUploadsService.GetFileUpload", + "service": { + "short_name": "FileUploadsService", + "full_name": "google.shopping.merchant.datasources.v1.FileUploadsService" + } + } + }, + "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-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_paths_test.rb new file mode 100644 index 000000000000..ab362a729dbe --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_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/shopping/merchant/data_sources/v1/data_sources_service" + +class ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_data_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_source_path account: "value0", datasource: "value1" + assert_equal "accounts/value0/dataSources/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.rb new file mode 100644 index 000000000000..5e257130e855 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/datasources/v1/datasources_pb" +require "google/shopping/merchant/data_sources/v1/data_sources_service/rest" + + +class ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_data_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_get_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_source ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_source(::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_source_client_stub.call_count + end + end + end + + def test_list_data_sources + # Create test objects. + client_result = ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse.new + http_response = OpenStruct.new 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_data_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_list_data_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_sources_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_sources({ 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_data_sources 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_data_sources ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.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_data_sources({ 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_data_sources(::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.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_data_sources_client_stub.call_count + end + end + end + + def test_create_data_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_source = {} + + create_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_create_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_source({ parent: parent, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_source parent: parent, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_source ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new(parent: parent, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_source({ parent: parent, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_source(::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new(parent: parent, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_source_client_stub.call_count + end + end + end + + def test_update_data_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_source = {} + update_mask = {} + + update_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_update_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_source({ data_source: data_source, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_source data_source: data_source, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_source ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new(data_source: data_source, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_source({ data_source: data_source, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_source(::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new(data_source: data_source, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_source_client_stub.call_count + end + end + end + + def test_delete_data_source + # 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_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_delete_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_source ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_source(::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_source_client_stub.call_count + end + end + end + + def test_fetch_data_source + # 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" + + fetch_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_fetch_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_data_source ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_data_source(::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_data_source_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb new file mode 100644 index 000000000000..825e48a38ec1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb @@ -0,0 +1,465 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/datasources/v1/datasources_pb" +require "google/shopping/merchant/data_sources/v1/data_sources_service" + +class ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_data_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::DataSources::V1::DataSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_source, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_source ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_source(::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_source_client_stub.call_rpc_count + end + end + + def test_list_data_sources + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_sources, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest, 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_data_sources_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_sources({ 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_data_sources 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_data_sources ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.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_data_sources({ 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_data_sources(::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.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_data_sources_client_stub.call_rpc_count + end + end + + def test_create_data_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::DataSources::V1::DataSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_source = {} + + create_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_source, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::DataSources::V1::DataSource), request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_source({ parent: parent, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_source parent: parent, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_source ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new(parent: parent, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_source({ parent: parent, data_source: data_source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_source(::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new(parent: parent, data_source: data_source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_source_client_stub.call_rpc_count + end + end + + def test_update_data_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::DataSources::V1::DataSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + data_source = {} + update_mask = {} + + update_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_source, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::DataSources::V1::DataSource), request["data_source"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_source({ data_source: data_source, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_source data_source: data_source, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_source ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new(data_source: data_source, 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_data_source({ data_source: data_source, 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_data_source(::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new(data_source: data_source, 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_data_source_client_stub.call_rpc_count + end + end + + def test_delete_data_source + # 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_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_source, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_source ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_source(::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new(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_data_source_client_stub.call_rpc_count + end + end + + def test_fetch_data_source + # 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" + + fetch_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_data_source, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_data_source ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_data_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_data_source(::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_data_source_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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::Shopping::Merchant::DataSources::V1::DataSourcesService::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::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_paths_test.rb new file mode 100644 index 000000000000..2168dbc883e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_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/shopping/merchant/data_sources/v1/file_uploads_service" + +class ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::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_file_upload_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.file_upload_path account: "value0", datasource: "value1", fileupload: "value2" + assert_equal "accounts/value0/dataSources/value1/fileUploads/value2", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb new file mode 100644 index 000000000000..3ccf6921b1a3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb @@ -0,0 +1,153 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/datasources/v1/fileuploads_pb" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest" + + +class ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_file_upload + # Create test objects. + client_result = ::Google::Shopping::Merchant::DataSources::V1::FileUpload.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_file_upload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::ServiceStub.stub :transcode_get_file_upload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_file_upload_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_file_upload({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_file_upload name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_file_upload ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_file_upload({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_file_upload(::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_file_upload_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::Shopping::Merchant::DataSources::V1::FileUploadsService::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::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb new file mode 100644 index 000000000000..4fd1bf50da82 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb @@ -0,0 +1,162 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/datasources/v1/fileuploads_pb" +require "google/shopping/merchant/data_sources/v1/file_uploads_service" + +class ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_file_upload + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::DataSources::V1::FileUpload.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_file_upload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_file_upload, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_file_upload_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_file_upload({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_file_upload name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_file_upload ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_file_upload({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_file_upload(::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_file_upload_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::Shopping::Merchant::DataSources::V1::FileUploadsService::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::Shopping::Merchant::DataSources::V1::FileUploadsService::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::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.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-shopping-merchant-data_sources-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..f8d21b117450 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-data_sources-v1beta", + "distribution_name": "google-shopping-merchant-data_sources-v1beta", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1BETA API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-data_sources-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-data_sources instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.rubocop.yml new file mode 100644 index 000000000000..e414ca5fad83 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-data_sources-v1beta.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-shopping-merchant-data_sources-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.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-shopping-merchant-data_sources-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1BETA 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-shopping-merchant-data_sources-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..96d233d02efb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-data_sources-v1beta 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-shopping-merchant-data_sources-v1beta 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/shopping/merchant/data_sources/v1beta" + +client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/data_sources/v1beta" + +::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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-shopping-merchant-data_sources-v1beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/data_sources/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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-shopping-merchant-data_sources-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/README.md new file mode 100644 index 000000000000..077c253183b1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1BETA API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1BETA API. Most users should consider using +the main client gem, +[google-shopping-merchant-data_sources](https://rubygems.org/gems/google-shopping-merchant-data_sources). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-data_sources-v1beta +``` + +## 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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/data_sources/v1beta" + +client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new +request = ::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest.new # (request fields as keyword arguments...) +response = client.get_data_source request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-data_sources-v1beta) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/data_sources/v1beta" +require "logger" + +client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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-shopping-merchant-data_sources`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-data_sources-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-data_sources`. +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-shopping-merchant-data_sources-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/Rakefile new file mode 100644 index 000000000000..cba1bb4b2fa3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta 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/shopping/merchant/data_sources/v1beta/data_sources_service/credentials" + ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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-shopping-merchant-data_sources-v1beta 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-shopping-merchant-data_sources-v1beta 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-shopping-merchant-data_sources-v1beta 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-shopping-merchant-data_sources-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-data_sources-v1beta" + header "google-shopping-merchant-data_sources-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-data_sources-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-data_sources-v1beta 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-shopping-merchant-data_sources-v1beta 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-shopping-merchant-data_sources-v1beta 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-shopping-merchant-data_sources-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..d925fc1c73dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/gapic_metadata.json @@ -0,0 +1,62 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.datasources.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::DataSources::V1beta", + "services": { + "DataSourcesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client", + "rpcs": { + "GetDataSource": { + "methods": [ + "get_data_source" + ] + }, + "ListDataSources": { + "methods": [ + "list_data_sources" + ] + }, + "CreateDataSource": { + "methods": [ + "create_data_source" + ] + }, + "UpdateDataSource": { + "methods": [ + "update_data_source" + ] + }, + "DeleteDataSource": { + "methods": [ + "delete_data_source" + ] + }, + "FetchDataSource": { + "methods": [ + "fetch_data_source" + ] + } + } + } + } + }, + "FileUploadsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client", + "rpcs": { + "GetFileUpload": { + "methods": [ + "get_file_upload" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/google-shopping-merchant-data_sources-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/google-shopping-merchant-data_sources-v1beta.gemspec new file mode 100644 index 000000000000..d4b97dc2f87a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/google-shopping-merchant-data_sources-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/data_sources/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-data_sources-v1beta" + gem.version = Google::Shopping::Merchant::DataSources::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-data_sources-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-data_sources instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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-shopping-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google-shopping-merchant-data_sources-v1beta.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google-shopping-merchant-data_sources-v1beta.rb new file mode 100644 index 000000000000..a5a782e5cca9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google-shopping-merchant-data_sources-v1beta.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/shopping/merchant/data_sources/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta.rb new file mode 100644 index 000000000000..1a4e6e79724c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta.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 "google/shopping/merchant/data_sources/v1beta/data_sources_service" +require "google/shopping/merchant/data_sources/v1beta/file_uploads_service" +require "google/shopping/merchant/data_sources/v1beta/version" + +module Google + module Shopping + module Merchant + module DataSources + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/data_sources/v1beta" + # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/data_sources/v1beta" + # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/data_sources/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service.rb new file mode 100644 index 000000000000..f9f3402a3882 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/data_sources/v1beta/version" + +require "google/shopping/merchant/data_sources/v1beta/data_sources_service/credentials" +require "google/shopping/merchant/data_sources/v1beta/data_sources_service/paths" +require "google/shopping/merchant/data_sources/v1beta/data_sources_service/client" +require "google/shopping/merchant/data_sources/v1beta/data_sources_service/rest" + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + ## + # Service to manage primary, supplemental, inventory and other data sources. + # See more in the [Merchant + # Center](https://support.google.com/merchants/answer/7439058) help article. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/data_sources/v1beta/data_sources_service" + # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/data_sources/v1beta/data_sources_service/rest" + # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new + # + module DataSourcesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_sources_service", "helpers.rb" +require "google/shopping/merchant/data_sources/v1beta/data_sources_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/client.rb new file mode 100644 index 000000000000..a5f8ba8a0cc7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/client.rb @@ -0,0 +1,980 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/datasources/v1beta/datasources_pb" + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + module DataSourcesService + ## + # Client for the DataSourcesService service. + # + # Service to manage primary, supplemental, inventory and other data sources. + # See more in the [Merchant + # Center](https://support.google.com/merchants/answer/7439058) help article. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_sources_service_stub + + ## + # Configure the DataSourcesService Client class. + # + # See {::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataSourcesService clients + # ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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", "Shopping", "Merchant", "DataSources", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataSourcesService 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::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_sources_service_stub.universe_domain + end + + ## + # Create a new DataSourcesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataSourcesService 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/shopping/merchant/datasources/v1beta/datasources_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 + + @data_sources_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @data_sources_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 + @data_sources_service_stub.logger + end + + # Service calls + + ## + # Retrieves the data source configuration for the given account. + # + # @overload get_data_source(request, options = nil) + # Pass arguments to `get_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_source(name: nil) + # Pass arguments to `get_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the data source to retrieve. + # Format: `accounts/{account}/dataSources/{datasource}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest.new + # + # # Call the get_data_source method. + # result = client.get_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. + # p result + # + def get_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :get_data_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the configurations for data sources for the given account. + # + # @overload list_data_sources(request, options = nil) + # Pass arguments to `list_data_sources` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list data sources for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of data sources to return. The service may + # return fewer than this value. The maximum value is 1000; values above 1000 + # will be coerced to 1000. If unspecified, the maximum number of data sources + # will be returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataSources` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDataSources` + # must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1beta::DataSource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1beta::DataSource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest.new + # + # # Call the list_data_sources method. + # result = client.list_data_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::DataSources::V1beta::DataSource. + # p item + # end + # + def list_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :list_data_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_sources_service_stub, :list_data_sources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates the new data source configuration for the given account. + # + # @overload create_data_source(request, options = nil) + # Pass arguments to `create_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_source(parent: nil, data_source: nil) + # Pass arguments to `create_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account where this data source will be created. + # Format: `accounts/{account}` + # @param data_source [::Google::Shopping::Merchant::DataSources::V1beta::DataSource, ::Hash] + # Required. The data source to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest.new + # + # # Call the create_data_source method. + # result = client.create_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. + # p result + # + def create_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :create_data_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the existing data source configuration. The fields that are + # set in the update mask but not provided in the resource will be deleted. + # + # @overload update_data_source(request, options = nil) + # Pass arguments to `update_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_source(data_source: nil, update_mask: nil) + # Pass arguments to `update_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param data_source [::Google::Shopping::Merchant::DataSources::V1beta::DataSource, ::Hash] + # Required. The data source resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of data source fields to be updated. + # + # Fields specified in the update mask without a value specified in the + # body will be deleted from the data source. + # + # Providing special "*" value for full data source replacement is not + # supported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest.new + # + # # Call the update_data_source method. + # result = client.update_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. + # p result + # + def update_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_source&.name + header_params["data_source.name"] = request.data_source.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :update_data_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a data source from your Merchant Center account. + # + # @overload delete_data_source(request, options = nil) + # Pass arguments to `delete_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_data_source(name: nil) + # Pass arguments to `delete_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the data source to delete. + # Format: `accounts/{account}/dataSources/{datasource}` + # + # @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/shopping/merchant/data_sources/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest.new + # + # # Call the delete_data_source method. + # result = client.delete_data_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :delete_data_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Performs the data fetch immediately (even outside fetch schedule) on a + # data source from your Merchant Center Account. If you need to call + # this method more than once per day, you should use the Products service to + # update your product data instead. + # This method only works on data sources with a file input set. + # + # @overload fetch_data_source(request, options = nil) + # Pass arguments to `fetch_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_data_source(name: nil) + # Pass arguments to `fetch_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the data source resource to fetch. + # Format: `accounts/{account}/dataSources/{datasource}` + # + # @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/shopping/merchant/data_sources/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest.new + # + # # Call the fetch_data_source method. + # result = client.fetch_data_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def fetch_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :fetch_data_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataSourcesService API. + # + # This class represents the configuration for DataSourcesService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_data_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 DataSourcesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source + ## + # RPC-specific configuration for `list_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_sources + ## + # RPC-specific configuration for `create_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_source + ## + # RPC-specific configuration for `update_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_source + ## + # RPC-specific configuration for `delete_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_source + ## + # RPC-specific configuration for `fetch_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_data_source + + # @private + def initialize parent_rpcs = nil + get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source + @get_data_source = ::Gapic::Config::Method.new get_data_source_config + list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources + @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config + create_data_source_config = parent_rpcs.create_data_source if parent_rpcs.respond_to? :create_data_source + @create_data_source = ::Gapic::Config::Method.new create_data_source_config + update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source + @update_data_source = ::Gapic::Config::Method.new update_data_source_config + delete_data_source_config = parent_rpcs.delete_data_source if parent_rpcs.respond_to? :delete_data_source + @delete_data_source = ::Gapic::Config::Method.new delete_data_source_config + fetch_data_source_config = parent_rpcs.fetch_data_source if parent_rpcs.respond_to? :fetch_data_source + @fetch_data_source = ::Gapic::Config::Method.new fetch_data_source_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/credentials.rb new file mode 100644 index 000000000000..a3f80b7a6ecf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_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 Shopping + module Merchant + module DataSources + module V1beta + module DataSourcesService + # Credentials for the DataSourcesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/paths.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/paths.rb new file mode 100644 index 000000000000..3b874f91b873 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_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 Shopping + module Merchant + module DataSources + module V1beta + module DataSourcesService + # Path helper methods for the DataSourcesService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified DataSource resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/dataSources/{datasource}` + # + # @param account [String] + # @param datasource [String] + # + # @return [::String] + def data_source_path account:, datasource: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/dataSources/#{datasource}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest.rb new file mode 100644 index 000000000000..3178cf9ddfc2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/data_sources/v1beta/version" + +require "google/shopping/merchant/data_sources/v1beta/data_sources_service/credentials" +require "google/shopping/merchant/data_sources/v1beta/data_sources_service/paths" +require "google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/client" + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + ## + # Service to manage primary, supplemental, inventory and other data sources. + # See more in the [Merchant + # Center](https://support.google.com/merchants/answer/7439058) help article. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/data_sources/v1beta/data_sources_service/rest" + # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new + # + module DataSourcesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/client.rb new file mode 100644 index 000000000000..29caad459dcb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/client.rb @@ -0,0 +1,895 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/datasources/v1beta/datasources_pb" +require "google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + module DataSourcesService + module Rest + ## + # REST client for the DataSourcesService service. + # + # Service to manage primary, supplemental, inventory and other data sources. + # See more in the [Merchant + # Center](https://support.google.com/merchants/answer/7439058) help article. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_sources_service_stub + + ## + # Configure the DataSourcesService Client class. + # + # See {::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataSourcesService clients + # ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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", "Shopping", "Merchant", "DataSources", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataSourcesService 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::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_sources_service_stub.universe_domain + end + + ## + # Create a new DataSourcesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataSourcesService 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 + + @data_sources_service_stub = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @data_sources_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 + @data_sources_service_stub.logger + end + + # Service calls + + ## + # Retrieves the data source configuration for the given account. + # + # @overload get_data_source(request, options = nil) + # Pass arguments to `get_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_source(name: nil) + # Pass arguments to `get_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the data source to retrieve. + # Format: `accounts/{account}/dataSources/{datasource}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest.new + # + # # Call the get_data_source method. + # result = client.get_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. + # p result + # + def get_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.get_data_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the configurations for data sources for the given account. + # + # @overload list_data_sources(request, options = nil) + # Pass arguments to `list_data_sources` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list data sources for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of data sources to return. The service may + # return fewer than this value. The maximum value is 1000; values above 1000 + # will be coerced to 1000. If unspecified, the maximum number of data sources + # will be returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataSources` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDataSources` + # must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1beta::DataSource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1beta::DataSource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest.new + # + # # Call the list_data_sources method. + # result = client.list_data_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::DataSources::V1beta::DataSource. + # p item + # end + # + def list_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.list_data_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_sources_service_stub, :list_data_sources, "data_sources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates the new data source configuration for the given account. + # + # @overload create_data_source(request, options = nil) + # Pass arguments to `create_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_data_source(parent: nil, data_source: nil) + # Pass arguments to `create_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account where this data source will be created. + # Format: `accounts/{account}` + # @param data_source [::Google::Shopping::Merchant::DataSources::V1beta::DataSource, ::Hash] + # Required. The data source to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest.new + # + # # Call the create_data_source method. + # result = client.create_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. + # p result + # + def create_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.create_data_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the existing data source configuration. The fields that are + # set in the update mask but not provided in the resource will be deleted. + # + # @overload update_data_source(request, options = nil) + # Pass arguments to `update_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_source(data_source: nil, update_mask: nil) + # Pass arguments to `update_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param data_source [::Google::Shopping::Merchant::DataSources::V1beta::DataSource, ::Hash] + # Required. The data source resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of data source fields to be updated. + # + # Fields specified in the update mask without a value specified in the + # body will be deleted from the data source. + # + # Providing special "*" value for full data source replacement is not + # supported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest.new + # + # # Call the update_data_source method. + # result = client.update_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. + # p result + # + def update_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.update_data_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a data source from your Merchant Center account. + # + # @overload delete_data_source(request, options = nil) + # Pass arguments to `delete_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_data_source(name: nil) + # Pass arguments to `delete_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the data source to delete. + # Format: `accounts/{account}/dataSources/{datasource}` + # @yield [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/shopping/merchant/data_sources/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest.new + # + # # Call the delete_data_source method. + # result = client.delete_data_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.delete_data_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Performs the data fetch immediately (even outside fetch schedule) on a + # data source from your Merchant Center Account. If you need to call + # this method more than once per day, you should use the Products service to + # update your product data instead. + # This method only works on data sources with a file input set. + # + # @overload fetch_data_source(request, options = nil) + # Pass arguments to `fetch_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_data_source(name: nil) + # Pass arguments to `fetch_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the data source resource to fetch. + # Format: `accounts/{account}/dataSources/{datasource}` + # @yield [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/shopping/merchant/data_sources/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest.new + # + # # Call the fetch_data_source method. + # result = client.fetch_data_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def fetch_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.fetch_data_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataSourcesService REST API. + # + # This class represents the configuration for DataSourcesService 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::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_data_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 DataSourcesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source + ## + # RPC-specific configuration for `list_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_sources + ## + # RPC-specific configuration for `create_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_source + ## + # RPC-specific configuration for `update_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_source + ## + # RPC-specific configuration for `delete_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_source + ## + # RPC-specific configuration for `fetch_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_data_source + + # @private + def initialize parent_rpcs = nil + get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source + @get_data_source = ::Gapic::Config::Method.new get_data_source_config + list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources + @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config + create_data_source_config = parent_rpcs.create_data_source if parent_rpcs.respond_to? :create_data_source + @create_data_source = ::Gapic::Config::Method.new create_data_source_config + update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source + @update_data_source = ::Gapic::Config::Method.new update_data_source_config + delete_data_source_config = parent_rpcs.delete_data_source if parent_rpcs.respond_to? :delete_data_source + @delete_data_source = ::Gapic::Config::Method.new delete_data_source_config + fetch_data_source_config = parent_rpcs.fetch_data_source if parent_rpcs.respond_to? :fetch_data_source + @fetch_data_source = ::Gapic::Config::Method.new fetch_data_source_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/service_stub.rb new file mode 100644 index 000000000000..6c4c211a3fc7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/service_stub.rb @@ -0,0 +1,452 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/datasources/v1beta/datasources_pb" + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + module DataSourcesService + module Rest + ## + # REST service stub for the DataSourcesService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # A result object deserialized from the server's reply + def get_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_data_sources REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesResponse] + # A result object deserialized from the server's reply + def list_data_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_data_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # A result object deserialized from the server's reply + def create_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_data_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # A result object deserialized from the server's reply + def update_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_data_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_data_source", + 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 fetch_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 fetch_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_data_source", + 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 get_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/datasources/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_sources REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/datasources/v1beta/{parent}/dataSources", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/datasources/v1beta/{parent}/dataSources", + body: "data_source", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/datasources/v1beta/{data_source.name}", + body: "data_source", + matches: [ + ["data_source.name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/datasources/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/datasources/v1beta/{name}:fetch", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service.rb new file mode 100644 index 000000000000..a03d1d0e4565 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/data_sources/v1beta/version" + +require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/credentials" +require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths" +require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/client" +require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest" + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + ## + # Service to manage data source file uploads. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/data_sources/v1beta/file_uploads_service" + # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest" + # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new + # + module FileUploadsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "file_uploads_service", "helpers.rb" +require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/client.rb new file mode 100644 index 000000000000..58c88794d9b7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/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/shopping/merchant/datasources/v1beta/fileuploads_pb" + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + module FileUploadsService + ## + # Client for the FileUploadsService service. + # + # Service to manage data source file uploads. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :file_uploads_service_stub + + ## + # Configure the FileUploadsService Client class. + # + # See {::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all FileUploadsService clients + # ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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", "Shopping", "Merchant", "DataSources", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the FileUploadsService 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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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 + @file_uploads_service_stub.universe_domain + end + + ## + # Create a new FileUploadsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the FileUploadsService 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/shopping/merchant/datasources/v1beta/fileuploads_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 + + @file_uploads_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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 + ) + + @file_uploads_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 + @file_uploads_service_stub.logger + end + + # Service calls + + ## + # Gets the latest data source file upload. Only the `latest` alias is + # accepted for a file upload. + # + # @overload get_file_upload(request, options = nil) + # Pass arguments to `get_file_upload` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_file_upload(name: nil) + # Pass arguments to `get_file_upload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the data source file upload to retrieve. + # Format: + # `accounts/{account}/dataSources/{datasource}/fileUploads/latest` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest.new + # + # # Call the get_file_upload method. + # result = client.get_file_upload request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::FileUpload. + # p result + # + def get_file_upload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_file_upload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_file_upload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_file_upload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @file_uploads_service_stub.call_rpc :get_file_upload, request, 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 FileUploadsService API. + # + # This class represents the configuration for FileUploadsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_file_upload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_file_upload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_file_upload.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 FileUploadsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_file_upload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_file_upload + + # @private + def initialize parent_rpcs = nil + get_file_upload_config = parent_rpcs.get_file_upload if parent_rpcs.respond_to? :get_file_upload + @get_file_upload = ::Gapic::Config::Method.new get_file_upload_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/credentials.rb new file mode 100644 index 000000000000..6cc6fed4a3f0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_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 Shopping + module Merchant + module DataSources + module V1beta + module FileUploadsService + # Credentials for the FileUploadsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths.rb new file mode 100644 index 000000000000..dff7d56d950f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + module FileUploadsService + # Path helper methods for the FileUploadsService API. + module Paths + ## + # Create a fully-qualified FileUpload resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/dataSources/{datasource}/fileUploads/{fileupload}` + # + # @param account [String] + # @param datasource [String] + # @param fileupload [String] + # + # @return [::String] + def file_upload_path account:, datasource:, fileupload: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "datasource cannot contain /" if datasource.to_s.include? "/" + + "accounts/#{account}/dataSources/#{datasource}/fileUploads/#{fileupload}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest.rb new file mode 100644 index 000000000000..c79feb1cc2e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_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/shopping/merchant/data_sources/v1beta/version" + +require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/credentials" +require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths" +require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/client" + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + ## + # Service to manage data source file uploads. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest" + # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new + # + module FileUploadsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/client.rb new file mode 100644 index 000000000000..dbdaed2611ee --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/client.rb @@ -0,0 +1,434 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/datasources/v1beta/fileuploads_pb" +require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + module FileUploadsService + module Rest + ## + # REST client for the FileUploadsService service. + # + # Service to manage data source file uploads. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :file_uploads_service_stub + + ## + # Configure the FileUploadsService Client class. + # + # See {::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all FileUploadsService clients + # ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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", "Shopping", "Merchant", "DataSources", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the FileUploadsService 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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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 + @file_uploads_service_stub.universe_domain + end + + ## + # Create a new FileUploadsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the FileUploadsService 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 + + @file_uploads_service_stub = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @file_uploads_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 + @file_uploads_service_stub.logger + end + + # Service calls + + ## + # Gets the latest data source file upload. Only the `latest` alias is + # accepted for a file upload. + # + # @overload get_file_upload(request, options = nil) + # Pass arguments to `get_file_upload` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_file_upload(name: nil) + # Pass arguments to `get_file_upload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the data source file upload to retrieve. + # Format: + # `accounts/{account}/dataSources/{datasource}/fileUploads/latest` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest.new + # + # # Call the get_file_upload method. + # result = client.get_file_upload request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::FileUpload. + # p result + # + def get_file_upload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_file_upload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_file_upload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_file_upload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @file_uploads_service_stub.get_file_upload request, 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 FileUploadsService REST API. + # + # This class represents the configuration for FileUploadsService 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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_file_upload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_file_upload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_file_upload.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 FileUploadsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_file_upload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_file_upload + + # @private + def initialize parent_rpcs = nil + get_file_upload_config = parent_rpcs.get_file_upload if parent_rpcs.respond_to? :get_file_upload + @get_file_upload = ::Gapic::Config::Method.new get_file_upload_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/service_stub.rb new file mode 100644 index 000000000000..abad739c7f4e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/service_stub.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! + +require "google/shopping/merchant/datasources/v1beta/fileuploads_pb" + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + module FileUploadsService + module Rest + ## + # REST service stub for the FileUploadsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_file_upload REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload] + # A result object deserialized from the server's reply + def get_file_upload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_file_upload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_file_upload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::DataSources::V1beta::FileUpload.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_file_upload REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_file_upload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/datasources/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/dataSources/[^/]+/fileUploads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/rest.rb new file mode 100644 index 000000000000..42367eda5bd5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/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/shopping/merchant/data_sources/v1beta/data_sources_service/rest" +require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest" +require "google/shopping/merchant/data_sources/v1beta/version" + +module Google + module Shopping + module Merchant + module DataSources + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/data_sources/v1beta/rest" + # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/version.rb new file mode 100644 index 000000000000..13986b30a66f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/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 Shopping + module Merchant + module DataSources + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_pb.rb new file mode 100644 index 000000000000..0b963df73918 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/datasources/v1beta/datasources.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/datasources/v1beta/datasourcetypes_pb' +require 'google/shopping/merchant/datasources/v1beta/fileinputs_pb' + + +descriptor_data = "\n=google/shopping/merchant/datasources/v1beta/datasources.proto\x12+google.shopping.merchant.datasources.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x41google/shopping/merchant/datasources/v1beta/datasourcetypes.proto\x1a\"9/datasources/v1beta/{name=accounts/*/dataSources/*}:fetch:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xbe\x03\n/com.google.shopping.merchant.datasources.v1betaB\x10\x44\x61taSourcesProtoP\x01ZWcloud.google.com/go/shopping/merchant/datasources/apiv1beta/datasourcespb;datasourcespb\xaa\x02+Google.Shopping.Merchant.DataSources.V1Beta\xca\x02+Google\\Shopping\\Merchant\\DataSources\\V1beta\xea\x02/Google::Shopping::Merchant::DataSources::V1beta\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\xea\x41T\n%merchantapi.googleapis.com/Datasource\x12+accounts/{account}/dataSources/{datasource}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.DataSource").msgclass + DataSource::Input = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.DataSource.Input").enummodule + GetDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.GetDataSourceRequest").msgclass + ListDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.ListDataSourcesRequest").msgclass + ListDataSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.ListDataSourcesResponse").msgclass + CreateDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.CreateDataSourceRequest").msgclass + UpdateDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.UpdateDataSourceRequest").msgclass + FetchDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.FetchDataSourceRequest").msgclass + DeleteDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.DeleteDataSourceRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_services_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_services_pb.rb new file mode 100644 index 000000000000..be87934ee446 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_services_pb.rb @@ -0,0 +1,64 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/datasources/v1beta/datasources.proto for package 'Google.Shopping.Merchant.DataSources.V1beta' +# 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/shopping/merchant/datasources/v1beta/datasources_pb' + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + module DataSourcesService + # Service to manage primary, supplemental, inventory and other data sources. + # See more in the [Merchant + # Center](https://support.google.com/merchants/answer/7439058) help article. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.datasources.v1beta.DataSourcesService' + + # Retrieves the data source configuration for the given account. + rpc :GetDataSource, ::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest, ::Google::Shopping::Merchant::DataSources::V1beta::DataSource + # Lists the configurations for data sources for the given account. + rpc :ListDataSources, ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest, ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesResponse + # Creates the new data source configuration for the given account. + rpc :CreateDataSource, ::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest, ::Google::Shopping::Merchant::DataSources::V1beta::DataSource + # Updates the existing data source configuration. The fields that are + # set in the update mask but not provided in the resource will be deleted. + rpc :UpdateDataSource, ::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest, ::Google::Shopping::Merchant::DataSources::V1beta::DataSource + # Deletes a data source from your Merchant Center account. + rpc :DeleteDataSource, ::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest, ::Google::Protobuf::Empty + # Performs the data fetch immediately (even outside fetch schedule) on a + # data source from your Merchant Center Account. If you need to call + # this method more than once per day, you should use the Products service to + # update your product data instead. + # This method only works on data sources with a file input set. + rpc :FetchDataSource, ::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasourcetypes_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasourcetypes_pb.rb new file mode 100644 index 000000000000..ecb5d88830aa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasourcetypes_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/datasources/v1beta/datasourcetypes.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\nAgoogle/shopping/merchant/datasources/v1beta/datasourcetypes.proto\x12+google.shopping.merchant.datasources.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a google/shopping/type/types.proto\"\xae\x07\n\x18PrimaryProductDataSource\x12\x66\n\x07\x63hannel\x18\x03 \x01(\x0e\x32M.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.ChannelB\x06\xe0\x41\x01\xe0\x41\x05\x12\x1f\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12%\n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x01\x88\x01\x01\x12\x16\n\tcountries\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12l\n\x0c\x64\x65\x66\x61ult_rule\x18\x07 \x01(\x0b\x32Q.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.DefaultRuleB\x03\xe0\x41\x01\x12l\n\x0c\x64\x65stinations\x18\n \x03(\x0b\x32Q.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.DestinationB\x03\xe0\x41\x01\x1at\n\x0b\x44\x65\x66\x61ultRule\x12\x65\n\x16take_from_data_sources\x18\x01 \x03(\x0b\x32@.google.shopping.merchant.datasources.v1beta.DataSourceReferenceB\x03\xe0\x41\x02\x1a\xf8\x01\n\x0b\x44\x65stination\x12\x46\n\x0b\x64\x65stination\x18\x01 \x01(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnum\x12\x66\n\x05state\x18\x02 \x01(\x0e\x32W.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.State\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\"Y\n\x07\x43hannel\x12\x17\n\x13\x43HANNEL_UNSPECIFIED\x10\x00\x12\x13\n\x0fONLINE_PRODUCTS\x10\x01\x12\x12\n\x0eLOCAL_PRODUCTS\x10\x02\x12\x0c\n\x08PRODUCTS\x10\x03\x42\r\n\x0b_feed_labelB\x13\n\x11_content_language\"\xfc\x01\n\x1dSupplementalProductDataSource\x12\x1f\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12%\n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x01\x88\x01\x01\x12o\n referencing_primary_data_sources\x18\x07 \x03(\x0b\x32@.google.shopping.merchant.datasources.v1beta.DataSourceReferenceB\x03\xe0\x41\x03\x42\r\n\x0b_feed_labelB\x13\n\x11_content_language\"X\n\x18LocalInventoryDataSource\x12\x1a\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\"[\n\x1bRegionalInventoryDataSource\x12\x1a\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\"W\n\x13PromotionDataSource\x12\x1e\n\x0etarget_country\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\"\x19\n\x17ProductReviewDataSource\"\x1a\n\x18MerchantReviewDataSource\"\x8e\x01\n\x13\x44\x61taSourceReference\x12\x0e\n\x04self\x18\x01 \x01(\x08H\x00\x12\'\n\x18primary_data_source_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x12,\n\x1dsupplemental_data_source_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x42\x10\n\x0e\x64\x61ta_source_idB\xb0\x02\n/com.google.shopping.merchant.datasources.v1betaB\x14\x44\x61tasourcetypesProtoP\x01ZWcloud.google.com/go/shopping/merchant/datasources/apiv1beta/datasourcespb;datasourcespb\xaa\x02+Google.Shopping.Merchant.DataSources.V1Beta\xca\x02+Google\\Shopping\\Merchant\\DataSources\\V1beta\xea\x02/Google::Shopping::Merchant::DataSources::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + PrimaryProductDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource").msgclass + PrimaryProductDataSource::DefaultRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.DefaultRule").msgclass + PrimaryProductDataSource::Destination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination").msgclass + PrimaryProductDataSource::Destination::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.State").enummodule + PrimaryProductDataSource::Channel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Channel").enummodule + SupplementalProductDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.SupplementalProductDataSource").msgclass + LocalInventoryDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.LocalInventoryDataSource").msgclass + RegionalInventoryDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.RegionalInventoryDataSource").msgclass + PromotionDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.PromotionDataSource").msgclass + ProductReviewDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.ProductReviewDataSource").msgclass + MerchantReviewDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.MerchantReviewDataSource").msgclass + DataSourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.DataSourceReference").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/fileinputs_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/fileinputs_pb.rb new file mode 100644 index 000000000000..966fa837ca74 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/fileinputs_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/datasources/v1beta/fileinputs.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/type/dayofweek_pb' +require 'google/type/timeofday_pb' + + +descriptor_data = "\n] + # 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-shopping-merchant-data_sources-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasources.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasources.rb new file mode 100644 index 000000000000..b08737c6e77f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasources.rb @@ -0,0 +1,228 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + # The [data source](https://support.google.com/merchants/answer/7439058) for + # the Merchant Center account. + # @!attribute [rw] primary_product_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1beta::PrimaryProductDataSource] + # The [primary data + # source](https://support.google.com/merchants/answer/7439058) for local + # and online products. + # + # Note: The following fields are mutually exclusive: `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] supplemental_product_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1beta::SupplementalProductDataSource] + # The [supplemental data + # source](https://support.google.com/merchants/answer/7439058) for local + # and online products. + # + # Note: The following fields are mutually exclusive: `supplemental_product_data_source`, `primary_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] local_inventory_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1beta::LocalInventoryDataSource] + # The [local + # inventory](https://support.google.com/merchants/answer/7023001) data + # source. + # + # Note: The following fields are mutually exclusive: `local_inventory_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] regional_inventory_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1beta::RegionalInventoryDataSource] + # The [regional + # inventory](https://support.google.com/merchants/answer/7439058) data + # source. + # + # Note: The following fields are mutually exclusive: `regional_inventory_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] promotion_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1beta::PromotionDataSource] + # The [promotion](https://support.google.com/merchants/answer/2906014) + # data source. + # + # Note: The following fields are mutually exclusive: `promotion_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] product_review_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1beta::ProductReviewDataSource] + # The [product + # review](https://support.google.com/merchants/answer/7045996) + # data source. + # + # Note: The following fields are mutually exclusive: `product_review_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] merchant_review_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1beta::MerchantReviewDataSource] + # The [merchant + # review](https://support.google.com/merchants/answer/7045996) + # data source. + # + # Note: The following fields are mutually exclusive: `merchant_review_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the data source. + # Format: + # `{datasource.name=accounts/{account}/dataSources/{datasource}}` + # @!attribute [r] data_source_id + # @return [::Integer] + # Output only. The data source id. + # @!attribute [rw] display_name + # @return [::String] + # Required. The displayed data source name in the Merchant Center UI. + # @!attribute [r] input + # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource::Input] + # Output only. Determines the type of input to the data source. Based on the + # input some settings might not work. Only generic data sources can be + # created through the API. + # @!attribute [rw] file_input + # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileInput] + # Optional. The field is used only when data is managed through a file. + class DataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Determines the type of input to the data source. Based on the input some + # settings might not be supported. + module Input + # Input unspecified. + INPUT_UNSPECIFIED = 0 + + # Represents data sources for which the data is primarily provided through + # the API. + API = 1 + + # Represents data sources for which the data is primarily provided through + # file input. Data can still be provided through the API. + FILE = 2 + + # The data source for products added directly in Merchant Center. + # + # This type of data source can not be created or updated through this API, + # only by Merchant Center UI. + # + # This type of data source is read only. + UI = 3 + + # This is also known as + # [Automated feeds](https://support.google.com/merchants/answer/12158480) + # used to automatically build your product data. This type of data source + # can be enabled or disabled through the Accounts bundle. + AUTOFEED = 4 + end + end + + # Request message for the GetDataSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the data source to retrieve. + # Format: `accounts/{account}/dataSources/{datasource}` + class GetDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListDataSources method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list data sources for. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of data sources to return. The service may + # return fewer than this value. The maximum value is 1000; values above 1000 + # will be coerced to 1000. If unspecified, the maximum number of data sources + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDataSources` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDataSources` + # must match the call that provided the page token. + class ListDataSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListDataSources method. + # @!attribute [rw] data_sources + # @return [::Array<::Google::Shopping::Merchant::DataSources::V1beta::DataSource>] + # The data sources from the specified account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDataSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateDataSource method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account where this data source will be created. + # Format: `accounts/{account}` + # @!attribute [rw] data_source + # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # Required. The data source to create. + class CreateDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateDataSource method. + # @!attribute [rw] data_source + # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] + # Required. The data source resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of data source fields to be updated. + # + # Fields specified in the update mask without a value specified in the + # body will be deleted from the data source. + # + # Providing special "*" value for full data source replacement is not + # supported. + class UpdateDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the FetchDataSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the data source resource to fetch. + # Format: `accounts/{account}/dataSources/{datasource}` + class FetchDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteDataSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the data source to delete. + # Format: `accounts/{account}/dataSources/{datasource}` + class DeleteDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasourcetypes.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasourcetypes.rb new file mode 100644 index 000000000000..31429a27303e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasourcetypes.rb @@ -0,0 +1,310 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + # The primary data source for local and online products. + # @!attribute [rw] channel + # @return [::Google::Shopping::Merchant::DataSources::V1beta::PrimaryProductDataSource::Channel] + # Optional. Immutable. Specifies the type of data source channel. + # @!attribute [rw] feed_label + # @return [::String] + # Optional. Immutable. The feed label that is specified on the data source + # level. + # + # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), + # and dashes (-). + # + # See also [migration to feed + # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). + # + # `feedLabel` and `contentLanguage` must be either both set or unset for data + # sources with product content type. + # They must be set for data sources with a file input. + # + # If set, the data source will only accept products matching this + # combination. If unset, the data source will accept products without that + # restriction. + # @!attribute [rw] content_language + # @return [::String] + # Optional. Immutable. The two-letter ISO 639-1 language of the items in the + # data source. + # + # `feedLabel` and `contentLanguage` must be either both set or unset. + # The fields can only be unset for data sources without file input. + # + # If set, the data source will only accept products matching this + # combination. If unset, the data source will accept products without that + # restriction. + # @!attribute [rw] countries + # @return [::Array<::String>] + # Optional. The countries where the items may be displayed. Represented as a + # [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). + # @!attribute [rw] default_rule + # @return [::Google::Shopping::Merchant::DataSources::V1beta::PrimaryProductDataSource::DefaultRule] + # Optional. Default rule management of the data source. If set, the linked + # data sources will be replaced. + # @!attribute [rw] destinations + # @return [::Array<::Google::Shopping::Merchant::DataSources::V1beta::PrimaryProductDataSource::Destination>] + # Optional. A list of destinations describing where products of the data + # source can be shown. + # + # When retrieving the data source, the list contains all the destinations + # that can be used for the data source, including the ones that are disabled + # for the data source but enabled for the account. + # + # Only destinations that are enabled on the account, for example through + # program participation, can be enabled on the data source. + # + # If unset, during creation, the destinations will be inherited based on the + # account level program participation. + # + # If set, during creation or update, the data source will be set only for the + # specified destinations. + # + # Updating this field requires at least one destination. + class PrimaryProductDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Default rule management of the data source. + # @!attribute [rw] take_from_data_sources + # @return [::Array<::Google::Shopping::Merchant::DataSources::V1beta::DataSourceReference>] + # Required. The list of data sources linked in the [default + # rule](https://support.google.com/merchants/answer/7450276). + # This list is ordered by the default rule priority of joining the data. + # It might include none or multiple references to `self` and supplemental + # data sources. + # + # The list must not be empty. + # + # To link the data source to the default rule, you need to add a + # new reference to this list (in sequential order). + # + # To unlink the data source from the default rule, you need to + # remove the given reference from this list. + # + # Changing the order of this list will result in changing the priority of + # data sources in the default rule. + # + # For example, providing the following list: [`1001`, `self`] will + # take attribute values from supplemental data source `1001`, and fallback + # to `self` if the attribute is not set in `1001`. + class DefaultRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations also known as [Marketing + # methods](https://support.google.com/merchants/answer/15130232) selections. + # @!attribute [rw] destination + # @return [::Google::Shopping::Type::Destination::DestinationEnum] + # [Marketing methods](https://support.google.com/merchants/answer/15130232) + # (also known as destination) selections. + # @!attribute [rw] state + # @return [::Google::Shopping::Merchant::DataSources::V1beta::PrimaryProductDataSource::Destination::State] + # The state of the destination. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the destination. + module State + # Not specified. + STATE_UNSPECIFIED = 0 + + # Indicates that the destination is enabled. + ENABLED = 1 + + # Indicates that the destination is disabled. + DISABLED = 2 + end + end + + # Data Source Channel. + # + # Channel is used to distinguish between data sources for different product + # verticals. + module Channel + # Not specified. + CHANNEL_UNSPECIFIED = 0 + + # Online product. + ONLINE_PRODUCTS = 1 + + # Local product. + LOCAL_PRODUCTS = 2 + + # Unified data source for both local and online products. + # Note: Products management through the API is not possible for this + # channel. + PRODUCTS = 3 + end + end + + # The supplemental data source for local and online products. After creation, + # you should make sure to link the supplemental product data source into one or + # more primary product data sources. + # @!attribute [rw] feed_label + # @return [::String] + # Optional. Immutable. The feed label that is specified on the data source + # level. + # + # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), + # and dashes (-). + # + # See also [migration to feed + # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). + # + # `feedLabel` and `contentLanguage` must be either both set or unset for data + # sources with product content type. + # + # They must be set for data sources with a [file + # input][google.shopping.merchant.datasources.v1main.FileInput]. + # The fields must be unset for data sources without [file + # input][google.shopping.merchant.datasources.v1main.FileInput]. + # + # If set, the data source will only accept products matching this + # combination. If unset, the data source will accept produts without that + # restriction. + # @!attribute [rw] content_language + # @return [::String] + # Optional. Immutable. The two-letter ISO 639-1 language of the items in the + # data source. + # + # `feedLabel` and `contentLanguage` must be either both set or unset. + # The fields can only be unset for data sources without file input. + # + # If set, the data source will only accept products matching this + # combination. If unset, the data source will accept produts without that + # restriction. + # @!attribute [r] referencing_primary_data_sources + # @return [::Array<::Google::Shopping::Merchant::DataSources::V1beta::DataSourceReference>] + # Output only. The (unordered and deduplicated) list of all primary data + # sources linked to this data source in either default or custom rules. + # Supplemental data source cannot be deleted before all links are removed. + class SupplementalProductDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The local inventory data source. + # @!attribute [rw] feed_label + # @return [::String] + # Required. Immutable. The feed label of the offers to which the local + # inventory is provided. + # + # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), + # and dashes (-). + # + # See also [migration to feed + # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). + # @!attribute [rw] content_language + # @return [::String] + # Required. Immutable. The two-letter ISO 639-1 language of the items to + # which the local inventory is provided. + class LocalInventoryDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The regional inventory data source. + # @!attribute [rw] feed_label + # @return [::String] + # Required. Immutable. The feed label of the offers to which the regional + # inventory is provided. + # + # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), + # and dashes (-). + # + # See also [migration to feed + # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). + # @!attribute [rw] content_language + # @return [::String] + # Required. Immutable. The two-letter ISO 639-1 language of the items to + # which the regional inventory is provided. + class RegionalInventoryDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The promotion data source. + # @!attribute [rw] target_country + # @return [::String] + # Required. Immutable. The target country used as part of the unique + # identifier. Represented as a [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). + # + # Promotions are only available in selected + # [countries](https://support.google.com/merchants/answer/4588460). + # @!attribute [rw] content_language + # @return [::String] + # Required. Immutable. The two-letter ISO 639-1 language of the items in the + # data source. + class PromotionDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The product review data source. + class ProductReviewDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The merchant review data source. + class MerchantReviewDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Data source reference can be used to manage related data sources within the + # data source service. + # @!attribute [rw] self + # @return [::Boolean] + # Self should be used to reference the primary data source itself. + # + # Note: The following fields are mutually exclusive: `self`, `primary_data_source_name`, `supplemental_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] primary_data_source_name + # @return [::String] + # Optional. The name of the primary data source. + # Format: + # `accounts/{account}/dataSources/{datasource}` + # + # Note: The following fields are mutually exclusive: `primary_data_source_name`, `self`, `supplemental_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] supplemental_data_source_name + # @return [::String] + # Optional. The name of the supplemental data source. + # Format: + # `accounts/{account}/dataSources/{datasource}` + # + # Note: The following fields are mutually exclusive: `supplemental_data_source_name`, `self`, `primary_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DataSourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileinputs.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileinputs.rb new file mode 100644 index 000000000000..ed24e5e223d3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileinputs.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 Shopping + module Merchant + module DataSources + module V1beta + # The data specific for file data sources. This field is empty for other + # data source inputs. + # @!attribute [rw] fetch_settings + # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileInput::FetchSettings] + # Optional. Fetch details to deliver the data source. It contains settings + # for `FETCH` and `GOOGLE_SHEETS` file input types. The required fields vary + # based on the frequency of fetching. + # @!attribute [rw] file_name + # @return [::String] + # Optional. The file name of the data source. Required for `UPLOAD` file + # input type. + # @!attribute [r] file_input_type + # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileInput::FileInputType] + # Output only. The type of file input. + class FileInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Fetch details to deliver the data source. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. Enables or pauses the fetch schedule. + # @!attribute [rw] day_of_month + # @return [::Integer] + # Optional. The day of the month when the data source file should be + # fetched (1-31). This field can only be set for monthly frequency. + # @!attribute [rw] time_of_day + # @return [::Google::Type::TimeOfDay] + # Optional. The hour of the day when the data source file should be + # fetched. Minutes and seconds are not supported and will be ignored. + # @!attribute [rw] day_of_week + # @return [::Google::Type::DayOfWeek] + # Optional. The day of the week when the data source file should be + # fetched. This field can only be set for weekly frequency. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. [Time zone](https://cldr.unicode.org) used for schedule. UTC by + # default. For example, "America/Los_Angeles". + # @!attribute [rw] frequency + # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileInput::FetchSettings::Frequency] + # Required. The frequency describing fetch schedule. + # @!attribute [rw] fetch_uri + # @return [::String] + # Optional. The URL where the data source file can be fetched. Google + # Merchant Center supports automatic scheduled uploads using the HTTP, + # HTTPS or SFTP protocols, so the value will need to be a valid link using + # one of those three protocols. Immutable for Google Sheets files. + # @!attribute [rw] username + # @return [::String] + # Optional. An optional user name for + # {::Google::Shopping::Merchant::DataSources::V1beta::FileInput::FetchSettings#fetch_uri fetch_uri}. + # Used for [submitting data sources through + # SFTP](https://support.google.com/merchants/answer/13813117). + # @!attribute [rw] password + # @return [::String] + # Optional. An optional password for + # {::Google::Shopping::Merchant::DataSources::V1beta::FileInput::FetchSettings#fetch_uri fetch_uri}. + # Used for [submitting data sources through + # SFTP](https://support.google.com/merchants/answer/13813117). + class FetchSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The required fields vary based on the frequency of fetching. For a + # monthly + # fetch schedule, + # [day of + # month][google.shopping.content.bundles.DataSources.FileInput.FetchSchedule.day_of_month] + # and + # [hour of + # day][google.shopping.content.bundles.DataSources.FileInput.FetchSchedule.time_of_day] + # are required. For a weekly fetch schedule, + # [day of + # week][google.shopping.content.bundles.DataSources.FileInput.FetchSchedule.day_of_week] + # and [hour of + # day][google.shopping.content.bundles.DataSources.FileInput.FetchSchedule.time_of_day] + # are required. For a daily fetch schedule, only an [hour of + # day][google.shopping.content.bundles.DataSources.FileInput.FetchSchedule.time_of_day] + # is required. + module Frequency + # Frequency unspecified. + FREQUENCY_UNSPECIFIED = 0 + + # The fetch happens every day. + FREQUENCY_DAILY = 1 + + # The fetch happens every week. + FREQUENCY_WEEKLY = 2 + + # The fetch happens every month. + FREQUENCY_MONTHLY = 3 + end + end + + # The method of file delivery. + module FileInputType + # File input type unspecified. + FILE_INPUT_TYPE_UNSPECIFIED = 0 + + # The file is uploaded through SFTP, Google Cloud Storage or manually in + # the Merchant Center. + UPLOAD = 1 + + # The file is fetched from the configured + # {::Google::Shopping::Merchant::DataSources::V1beta::FileInput::FetchSettings#fetch_uri fetch_uri}. + FETCH = 2 + + # The file is fetched from Google Sheets specified in the + # {::Google::Shopping::Merchant::DataSources::V1beta::FileInput::FetchSettings#fetch_uri fetch_uri}. + GOOGLE_SHEETS = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileuploads.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileuploads.rb new file mode 100644 index 000000000000..c1ab990d6ff0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileuploads.rb @@ -0,0 +1,131 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module DataSources + module V1beta + # The file upload of a specific data source, that is, the result of the + # retrieval of the data source at a certain timestamp computed asynchronously + # when the data source processing is finished. Only applicable to file data + # sources. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the data source file upload. + # Format: + # `{datasource.name=accounts/{account}/dataSources/{datasource}/fileUploads/{fileupload}}` + # @!attribute [r] data_source_id + # @return [::Integer] + # Output only. The data source id. + # @!attribute [r] processing_state + # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload::ProcessingState] + # Output only. The processing state of the data source. + # @!attribute [r] issues + # @return [::Array<::Google::Shopping::Merchant::DataSources::V1beta::FileUpload::Issue>] + # Output only. The list of issues occurring in the data source. + # @!attribute [r] items_total + # @return [::Integer] + # Output only. The number of items in the data source that were processed. + # @!attribute [r] items_created + # @return [::Integer] + # Output only. The number of items in the data source that were created. + # @!attribute [r] items_updated + # @return [::Integer] + # Output only. The number of items in the data source that were updated. + # @!attribute [r] upload_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The date at which the file of the data source was uploaded. + class FileUpload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An error occurring in the data source, like "invalid price". + # @!attribute [r] title + # @return [::String] + # Output only. The title of the issue, for example, "Item too big". + # @!attribute [r] description + # @return [::String] + # Output only. The error description, for example, "Your data source + # contains items which have too many attributes, or are too big. These + # items will be dropped". + # @!attribute [r] code + # @return [::String] + # Output only. The code of the error, for example, + # "validation/invalid_value". Returns + # "?" if the code is unknown. + # @!attribute [r] count + # @return [::Integer] + # Output only. The number of occurrences of the error in the file upload. + # @!attribute [r] severity + # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload::Issue::Severity] + # Output only. The severity of the issue. + # @!attribute [r] documentation_uri + # @return [::String] + # Output only. Link to the documentation explaining the issue in more + # details, if available. + class Issue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The severity of the issue. + module Severity + # Severity unspecified. + SEVERITY_UNSPECIFIED = 0 + + # The issue is the warning. + WARNING = 1 + + # The issue is an error. + ERROR = 2 + end + end + + # The processing state of the data source. + module ProcessingState + # Processing state unspecified. + PROCESSING_STATE_UNSPECIFIED = 0 + + # The data source could not be processed or all the items had errors. + FAILED = 1 + + # The data source is being processed. + IN_PROGRESS = 2 + + # The data source was processed successfully, though some items might have + # had errors. + SUCCEEDED = 3 + end + end + + # Request message for the GetFileUploadRequest method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the data source file upload to retrieve. + # Format: + # `accounts/{account}/dataSources/{datasource}/fileUploads/latest` + class GetFileUploadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/type/types.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! + + +module Google + module Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + + # Youtube shopping checkout. + YOUTUBE_SHOPPING_CHECKOUT = 7 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 8 + + # [Free vehicle + # listings](https://support.google.com/merchants/answer/11189169). + FREE_VEHICLE_LISTINGS = 9 + + # [Vehicle ads](https://support.google.com/merchants/answer/11189169). + VEHICLE_ADS = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free product listings on UCP + # checkout](https://developers.google.com/merchant/ucp). + FREE_LISTINGS_UCP_CHECKOUT = 19 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 18 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + + # [Product + # Reviews](https://support.google.com/merchants/answer/14620732). + PRODUCT_REVIEWS = 15 + + # [Merchant + # Reviews](https://developers.google.com/merchant-review-feeds). + MERCHANT_REVIEWS = 16 + + # YouTube Checkout + # . + YOUTUBE_CHECKOUT = 17 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/dayofweek.rb new file mode 100644 index 000000000000..973211b9ffe7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/dayofweek.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a day of the week. + module DayOfWeek + # The day of the week is unspecified. + DAY_OF_WEEK_UNSPECIFIED = 0 + + # Monday + MONDAY = 1 + + # Tuesday + TUESDAY = 2 + + # Wednesday + WEDNESDAY = 3 + + # Thursday + THURSDAY = 4 + + # Friday + FRIDAY = 5 + + # Saturday + SATURDAY = 6 + + # Sunday + SUNDAY = 7 + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/timeofday.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/timeofday.rb new file mode 100644 index 000000000000..8372dad8beb8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..67b7de6a85fe --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta", path: "../" +else + gem "google-shopping-merchant-data_sources-v1beta" +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-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/create_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/create_data_source.rb new file mode 100644 index 000000000000..638728137703 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/create_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_DataSourcesService_CreateDataSource_sync] +require "google/shopping/merchant/data_sources/v1beta" + +## +# Snippet for the create_data_source call in the DataSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#create_data_source. +# +def create_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest.new + + # Call the create_data_source method. + result = client.create_data_source request + + # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. + p result +end +# [END merchantapi_v1beta_generated_DataSourcesService_CreateDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/delete_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/delete_data_source.rb new file mode 100644 index 000000000000..21641e2c7c19 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/delete_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_DataSourcesService_DeleteDataSource_sync] +require "google/shopping/merchant/data_sources/v1beta" + +## +# Snippet for the delete_data_source call in the DataSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#delete_data_source. +# +def delete_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest.new + + # Call the delete_data_source method. + result = client.delete_data_source request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_DataSourcesService_DeleteDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/fetch_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/fetch_data_source.rb new file mode 100644 index 000000000000..5dca028ea8b3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/fetch_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_DataSourcesService_FetchDataSource_sync] +require "google/shopping/merchant/data_sources/v1beta" + +## +# Snippet for the fetch_data_source call in the DataSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#fetch_data_source. +# +def fetch_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest.new + + # Call the fetch_data_source method. + result = client.fetch_data_source request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_DataSourcesService_FetchDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/get_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/get_data_source.rb new file mode 100644 index 000000000000..0ce0193472fb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/get_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_DataSourcesService_GetDataSource_sync] +require "google/shopping/merchant/data_sources/v1beta" + +## +# Snippet for the get_data_source call in the DataSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#get_data_source. +# +def get_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest.new + + # Call the get_data_source method. + result = client.get_data_source request + + # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. + p result +end +# [END merchantapi_v1beta_generated_DataSourcesService_GetDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/list_data_sources.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/list_data_sources.rb new file mode 100644 index 000000000000..ceaddc02229a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/list_data_sources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_DataSourcesService_ListDataSources_sync] +require "google/shopping/merchant/data_sources/v1beta" + +## +# Snippet for the list_data_sources call in the DataSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#list_data_sources. +# +def list_data_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest.new + + # Call the list_data_sources method. + result = client.list_data_sources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::DataSources::V1beta::DataSource. + p item + end +end +# [END merchantapi_v1beta_generated_DataSourcesService_ListDataSources_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/update_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/update_data_source.rb new file mode 100644 index 000000000000..f98d619b67a0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/update_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_DataSourcesService_UpdateDataSource_sync] +require "google/shopping/merchant/data_sources/v1beta" + +## +# Snippet for the update_data_source call in the DataSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#update_data_source. +# +def update_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest.new + + # Call the update_data_source method. + result = client.update_data_source request + + # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. + p result +end +# [END merchantapi_v1beta_generated_DataSourcesService_UpdateDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/file_uploads_service/get_file_upload.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/file_uploads_service/get_file_upload.rb new file mode 100644 index 000000000000..f56c3463591d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/file_uploads_service/get_file_upload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_FileUploadsService_GetFileUpload_sync] +require "google/shopping/merchant/data_sources/v1beta" + +## +# Snippet for the get_file_upload call in the FileUploadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client#get_file_upload. +# +def get_file_upload + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest.new + + # Call the get_file_upload method. + result = client.get_file_upload request + + # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::FileUpload. + p result +end +# [END merchantapi_v1beta_generated_FileUploadsService_GetFileUpload_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/snippet_metadata_google.shopping.merchant.datasources.v1beta.json b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/snippet_metadata_google.shopping.merchant.datasources.v1beta.json new file mode 100644 index 000000000000..fa5009cb9195 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/snippet_metadata_google.shopping.merchant.datasources.v1beta.json @@ -0,0 +1,295 @@ +{ + "client_library": { + "name": "google-shopping-merchant-data_sources-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.datasources.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_DataSourcesService_GetDataSource_sync", + "title": "Snippet for the get_data_source call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#get_data_source.", + "file": "data_sources_service/get_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_source", + "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#get_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::DataSources::V1beta::DataSource", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client" + }, + "method": { + "short_name": "GetDataSource", + "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService.GetDataSource", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_DataSourcesService_ListDataSources_sync", + "title": "Snippet for the list_data_sources call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#list_data_sources.", + "file": "data_sources_service/list_data_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_sources", + "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#list_data_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesResponse", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client" + }, + "method": { + "short_name": "ListDataSources", + "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService.ListDataSources", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_DataSourcesService_CreateDataSource_sync", + "title": "Snippet for the create_data_source call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#create_data_source.", + "file": "data_sources_service/create_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_source", + "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#create_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::DataSources::V1beta::DataSource", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client" + }, + "method": { + "short_name": "CreateDataSource", + "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService.CreateDataSource", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_DataSourcesService_UpdateDataSource_sync", + "title": "Snippet for the update_data_source call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#update_data_source.", + "file": "data_sources_service/update_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_source", + "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#update_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::DataSources::V1beta::DataSource", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client" + }, + "method": { + "short_name": "UpdateDataSource", + "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService.UpdateDataSource", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_DataSourcesService_DeleteDataSource_sync", + "title": "Snippet for the delete_data_source call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#delete_data_source.", + "file": "data_sources_service/delete_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_source", + "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#delete_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client" + }, + "method": { + "short_name": "DeleteDataSource", + "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService.DeleteDataSource", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_DataSourcesService_FetchDataSource_sync", + "title": "Snippet for the fetch_data_source call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#fetch_data_source.", + "file": "data_sources_service/fetch_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_data_source", + "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#fetch_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client" + }, + "method": { + "short_name": "FetchDataSource", + "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService.FetchDataSource", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_FileUploadsService_GetFileUpload_sync", + "title": "Snippet for the get_file_upload call in the FileUploadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client#get_file_upload.", + "file": "file_uploads_service/get_file_upload.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_file_upload", + "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client#get_file_upload", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::DataSources::V1beta::FileUpload", + "client": { + "short_name": "FileUploadsService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client" + }, + "method": { + "short_name": "GetFileUpload", + "full_name": "google.shopping.merchant.datasources.v1beta.FileUploadsService.GetFileUpload", + "service": { + "short_name": "FileUploadsService", + "full_name": "google.shopping.merchant.datasources.v1beta.FileUploadsService" + } + } + }, + "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-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_paths_test.rb new file mode 100644 index 000000000000..310fb0512324 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_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/shopping/merchant/data_sources/v1beta/data_sources_service" + +class ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_data_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_source_path account: "value0", datasource: "value1" + assert_equal "accounts/value0/dataSources/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_rest_test.rb new file mode 100644 index 000000000000..5602b972a3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/datasources/v1beta/datasources_pb" +require "google/shopping/merchant/data_sources/v1beta/data_sources_service/rest" + + +class ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_data_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::ServiceStub.stub :transcode_get_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_source ::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_source(::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_source_client_stub.call_count + end + end + end + + def test_list_data_sources + # Create test objects. + client_result = ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesResponse.new + http_response = OpenStruct.new 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_data_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::ServiceStub.stub :transcode_list_data_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_sources_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_sources({ 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_data_sources 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_data_sources ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest.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_data_sources({ 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_data_sources(::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest.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_data_sources_client_stub.call_count + end + end + end + + def test_create_data_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_source = {} + + create_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::ServiceStub.stub :transcode_create_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_source({ parent: parent, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_source parent: parent, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_source ::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest.new(parent: parent, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_source({ parent: parent, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_source(::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest.new(parent: parent, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_source_client_stub.call_count + end + end + end + + def test_update_data_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_source = {} + update_mask = {} + + update_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::ServiceStub.stub :transcode_update_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_source({ data_source: data_source, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_source data_source: data_source, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_source ::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest.new(data_source: data_source, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_source({ data_source: data_source, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_source(::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest.new(data_source: data_source, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_source_client_stub.call_count + end + end + end + + def test_delete_data_source + # 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_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::ServiceStub.stub :transcode_delete_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_source ::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_source(::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_source_client_stub.call_count + end + end + end + + def test_fetch_data_source + # 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" + + fetch_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::ServiceStub.stub :transcode_fetch_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_data_source ::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_data_source(::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_data_source_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_test.rb new file mode 100644 index 000000000000..6f5af2b5ce1a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_test.rb @@ -0,0 +1,465 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/datasources/v1beta/datasources_pb" +require "google/shopping/merchant/data_sources/v1beta/data_sources_service" + +class ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_data_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_source, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_source ::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_source(::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_source_client_stub.call_rpc_count + end + end + + def test_list_data_sources + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_sources, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest, 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_data_sources_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_sources({ 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_data_sources 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_data_sources ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest.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_data_sources({ 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_data_sources(::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest.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_data_sources_client_stub.call_rpc_count + end + end + + def test_create_data_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_source = {} + + create_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_source, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::DataSources::V1beta::DataSource), request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_source({ parent: parent, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_source parent: parent, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_source ::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest.new(parent: parent, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_source({ parent: parent, data_source: data_source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_source(::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest.new(parent: parent, data_source: data_source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_source_client_stub.call_rpc_count + end + end + + def test_update_data_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + data_source = {} + update_mask = {} + + update_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_source, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::DataSources::V1beta::DataSource), request["data_source"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_source({ data_source: data_source, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_source data_source: data_source, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_source ::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest.new(data_source: data_source, 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_data_source({ data_source: data_source, 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_data_source(::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest.new(data_source: data_source, 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_data_source_client_stub.call_rpc_count + end + end + + def test_delete_data_source + # 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_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_source, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_source ::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_source(::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest.new(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_data_source_client_stub.call_rpc_count + end + end + + def test_fetch_data_source + # 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" + + fetch_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_data_source, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_data_source ::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_data_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_data_source(::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_data_source_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_paths_test.rb new file mode 100644 index 000000000000..f6cbfaf0fd2e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_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/shopping/merchant/data_sources/v1beta/file_uploads_service" + +class ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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_file_upload_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.file_upload_path account: "value0", datasource: "value1", fileupload: "value2" + assert_equal "accounts/value0/dataSources/value1/fileUploads/value2", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_rest_test.rb new file mode 100644 index 000000000000..26120c190328 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_rest_test.rb @@ -0,0 +1,153 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/datasources/v1beta/fileuploads_pb" +require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest" + + +class ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_file_upload + # Create test objects. + client_result = ::Google::Shopping::Merchant::DataSources::V1beta::FileUpload.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_file_upload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::ServiceStub.stub :transcode_get_file_upload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_file_upload_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_file_upload({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_file_upload name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_file_upload ::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_file_upload({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_file_upload(::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_file_upload_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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_test.rb new file mode 100644 index 000000000000..9d6a1ec34dff --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_test.rb @@ -0,0 +1,162 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/datasources/v1beta/fileuploads_pb" +require "google/shopping/merchant/data_sources/v1beta/file_uploads_service" + +class ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_file_upload + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::DataSources::V1beta::FileUpload.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_file_upload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_file_upload, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_file_upload_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_file_upload({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_file_upload name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_file_upload ::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_file_upload({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_file_upload(::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_file_upload_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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-inventories-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-inventories-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-inventories-v1/.repo-metadata.json new file mode 100644 index 000000000000..e70b67d6c360 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-inventories-v1", + "distribution_name": "google-shopping-merchant-inventories-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-inventories-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-inventories instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-inventories-v1/.rubocop.yml new file mode 100644 index 000000000000..b0c70c43d864 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-inventories-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant 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-shopping-merchant-inventories-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-inventories-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..4f0423f13882 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-inventories-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-shopping-merchant-inventories-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/shopping/merchant/inventories/v1" + +client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/inventories/v1" + +::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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-shopping-merchant-inventories-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/shopping/merchant/inventories/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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-shopping-merchant-inventories-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-inventories-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-inventories-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-inventories-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/README.md b/owl-bot-staging/google-shopping-merchant-inventories-v1/README.md new file mode 100644 index 000000000000..f220a2581837 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-inventories](https://rubygems.org/gems/google-shopping-merchant-inventories). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-inventories-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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/inventories/v1" + +client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new +request = ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.new # (request fields as keyword arguments...) +response = client.list_local_inventories request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-inventories-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/inventories/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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-shopping-merchant-inventories`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-inventories-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-shopping-merchant-inventories`. +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-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-inventories-v1/Rakefile new file mode 100644 index 000000000000..77497d596c9a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-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/shopping/merchant/inventories/v1/local_inventory_service/credentials" + ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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-shopping-merchant-inventories-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-shopping-merchant-inventories-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-shopping-merchant-inventories-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-shopping-merchant-inventories-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-inventories-v1" + header "google-shopping-merchant-inventories-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-inventories-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-inventories-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-shopping-merchant-inventories-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-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-inventories-v1/gapic_metadata.json new file mode 100644 index 000000000000..30b7c2264d23 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/gapic_metadata.json @@ -0,0 +1,57 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.inventories.v1", + "libraryPackage": "::Google::Shopping::Merchant::Inventories::V1", + "services": { + "LocalInventoryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client", + "rpcs": { + "ListLocalInventories": { + "methods": [ + "list_local_inventories" + ] + }, + "InsertLocalInventory": { + "methods": [ + "insert_local_inventory" + ] + }, + "DeleteLocalInventory": { + "methods": [ + "delete_local_inventory" + ] + } + } + } + } + }, + "RegionalInventoryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client", + "rpcs": { + "ListRegionalInventories": { + "methods": [ + "list_regional_inventories" + ] + }, + "InsertRegionalInventory": { + "methods": [ + "insert_regional_inventory" + ] + }, + "DeleteRegionalInventory": { + "methods": [ + "delete_regional_inventory" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/google-shopping-merchant-inventories-v1.gemspec b/owl-bot-staging/google-shopping-merchant-inventories-v1/google-shopping-merchant-inventories-v1.gemspec new file mode 100644 index 000000000000..56f45d65035a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/google-shopping-merchant-inventories-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/inventories/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-inventories-v1" + gem.version = Google::Shopping::Merchant::Inventories::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-inventories-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-inventories instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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-shopping-type", "~> 1.0" +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google-shopping-merchant-inventories-v1.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google-shopping-merchant-inventories-v1.rb new file mode 100644 index 000000000000..db313242d13f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google-shopping-merchant-inventories-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/shopping/merchant/inventories/v1" diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1.rb new file mode 100644 index 000000000000..a5800c6000d3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1.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 "google/shopping/merchant/inventories/v1/local_inventory_service" +require "google/shopping/merchant/inventories/v1/regional_inventory_service" +require "google/shopping/merchant/inventories/v1/version" + +module Google + module Shopping + module Merchant + module Inventories + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/inventories/v1" + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/inventories/v1" + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/inventories/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/inventories_common_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/inventories_common_pb.rb new file mode 100644 index 000000000000..08f78d0ef884 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/inventories_common_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/inventories/v1/inventories_common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/shopping/type/types_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\n@google/shopping/merchant/inventories/v1/inventories_common.proto\x12\'google.shopping.merchant.inventories.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\xd2\x08\n\x18LocalInventoryAttributes\x12/\n\x05price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x34\n\nsale_price\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12=\n\x19sale_price_effective_date\x18\x03 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12i\n\x0c\x61vailability\x18\x04 \x01(\x0e\x32N.google.shopping.merchant.inventories.v1.LocalInventoryAttributes.AvailabilityH\x00\x88\x01\x01\x12\x1a\n\x08quantity\x18\x05 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12o\n\rpickup_method\x18\x06 \x01(\x0e\x32N.google.shopping.merchant.inventories.v1.LocalInventoryAttributes.PickupMethodB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12i\n\npickup_sla\x18\x07 \x01(\x0e\x32K.google.shopping.merchant.inventories.v1.LocalInventoryAttributes.PickupSlaB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12*\n\x18instore_product_location\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01\"\x8f\x01\n\x0c\x41vailability\x12,\n(LOCAL_INVENTORY_AVAILABILITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STOCK\x10\x01\x12\x18\n\x14LIMITED_AVAILABILITY\x10\x02\x12\x17\n\x13ON_DISPLAY_TO_ORDER\x10\x03\x12\x10\n\x0cOUT_OF_STOCK\x10\x04\"i\n\x0cPickupMethod\x12\x1d\n\x19PICKUP_METHOD_UNSPECIFIED\x10\x00\x12\x07\n\x03\x42UY\x10\x01\x12\x0b\n\x07RESERVE\x10\x02\x12\x11\n\rSHIP_TO_STORE\x10\x03\x12\x11\n\rNOT_SUPPORTED\x10\x04\"\xa7\x01\n\tPickupSla\x12\x1a\n\x16PICKUP_SLA_UNSPECIFIED\x10\x00\x12\x0c\n\x08SAME_DAY\x10\x01\x12\x0c\n\x08NEXT_DAY\x10\x02\x12\x0b\n\x07TWO_DAY\x10\x03\x12\r\n\tTHREE_DAY\x10\x04\x12\x0c\n\x08\x46OUR_DAY\x10\x05\x12\x0c\n\x08\x46IVE_DAY\x10\x06\x12\x0b\n\x07SIX_DAY\x10\x07\x12\r\n\tSEVEN_DAY\x10\x08\x12\x0e\n\nMULTI_WEEK\x10\tB\x0f\n\r_availabilityB\x0b\n\t_quantityB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\x1b\n\x19_instore_product_location\"\xa8\x03\n\x1bRegionalInventoryAttributes\x12/\n\x05price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x34\n\nsale_price\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12=\n\x19sale_price_effective_date\x18\x03 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12q\n\x0c\x61vailability\x18\x04 \x01(\x0e\x32Q.google.shopping.merchant.inventories.v1.RegionalInventoryAttributes.AvailabilityB\x03\xe0\x41\x01H\x00\x88\x01\x01\"_\n\x0c\x41vailability\x12/\n+REGIONAL_INVENTORY_AVAILABILITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STOCK\x10\x01\x12\x10\n\x0cOUT_OF_STOCK\x10\x02\x42\x0f\n\r_availabilityB\x9e\x02\n+com.google.shopping.merchant.inventories.v1B\x16InventoriesCommonProtoP\x01ZScloud.google.com/go/shopping/merchant/inventories/apiv1/inventoriespb;inventoriespb\xaa\x02\'Google.Shopping.Merchant.Inventories.V1\xca\x02\'Google\\Shopping\\Merchant\\Inventories\\V1\xea\x02+Google::Shopping::Merchant::Inventories::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Inventories + module V1 + LocalInventoryAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.LocalInventoryAttributes").msgclass + LocalInventoryAttributes::Availability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.LocalInventoryAttributes.Availability").enummodule + LocalInventoryAttributes::PickupMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.LocalInventoryAttributes.PickupMethod").enummodule + LocalInventoryAttributes::PickupSla = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.LocalInventoryAttributes.PickupSla").enummodule + RegionalInventoryAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.RegionalInventoryAttributes").msgclass + RegionalInventoryAttributes::Availability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.RegionalInventoryAttributes.Availability").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb new file mode 100644 index 000000000000..9da3c96daede --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/inventories/v1/version" + +require "google/shopping/merchant/inventories/v1/local_inventory_service/credentials" +require "google/shopping/merchant/inventories/v1/local_inventory_service/paths" +require "google/shopping/merchant/inventories/v1/local_inventory_service/client" +require "google/shopping/merchant/inventories/v1/local_inventory_service/rest" + +module Google + module Shopping + module Merchant + module Inventories + module V1 + ## + # Service to manage local inventory for products + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/inventories/v1/local_inventory_service" + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/inventories/v1/local_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new + # + module LocalInventoryService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "local_inventory_service", "helpers.rb" +require "google/shopping/merchant/inventories/v1/local_inventory_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb new file mode 100644 index 000000000000..b1eadc68aca1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb @@ -0,0 +1,711 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/inventories/v1/localinventory_pb" + +module Google + module Shopping + module Merchant + module Inventories + module V1 + module LocalInventoryService + ## + # Client for the LocalInventoryService service. + # + # Service to manage local inventory for products + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :local_inventory_service_stub + + ## + # Configure the LocalInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LocalInventoryService clients + # ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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", "Shopping", "Merchant", "Inventories", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LocalInventoryService 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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 + @local_inventory_service_stub.universe_domain + end + + ## + # Create a new LocalInventoryService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LocalInventoryService 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/shopping/merchant/inventories/v1/localinventory_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 + + @local_inventory_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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 + ) + + @local_inventory_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 + @local_inventory_service_stub.logger + end + + # Service calls + + ## + # Lists the `LocalInventory` resources for the given product in your merchant + # account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be used + # to obtain additional results. + # + # `LocalInventory` resources are listed per product for a given account. + # + # @overload list_local_inventories(request, options = nil) + # Pass arguments to `list_local_inventories` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_local_inventories(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_local_inventories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 parent product to list local inventories for. + # Format: + # `accounts/{account}/products/{product}` + # @param page_size [::Integer] + # The maximum number of `LocalInventory` resources for the given + # product to return. The service returns fewer than this value if the number + # of inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 25000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum + # @param page_token [::String] + # A page token, received from a previous `ListLocalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListLocalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::LocalInventory>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::LocalInventory>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.new + # + # # Call the list_local_inventories method. + # result = client.list_local_inventories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1::LocalInventory. + # p item + # end + # + def list_local_inventories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_local_inventories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_local_inventories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_local_inventories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.call_rpc :list_local_inventories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @local_inventory_service_stub, :list_local_inventories, 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 + + ## + # Inserts a `LocalInventory` resource to a product in your merchant + # account. + # + # Replaces the full `LocalInventory` resource if an entry with the same + # {::Google::Shopping::Merchant::Inventories::V1::LocalInventory#store_code `storeCode`} + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `LocalInventory` + # resource to appear in products. + # + # @overload insert_local_inventory(request, options = nil) + # Pass arguments to `insert_local_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_local_inventory(parent: nil, local_inventory: nil) + # Pass arguments to `insert_local_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @param local_inventory [::Google::Shopping::Merchant::Inventories::V1::LocalInventory, ::Hash] + # Required. Local inventory information of the product. If the product + # already has a `LocalInventory` resource for the same `storeCode`, full + # replacement of the `LocalInventory` resource is performed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new + # + # # Call the insert_local_inventory method. + # result = client.insert_local_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Inventories::V1::LocalInventory. + # p result + # + def insert_local_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_local_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_local_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_local_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.call_rpc :insert_local_inventory, request, 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 `LocalInventory` from the given product in your + # merchant account. It might take a up to an hour for the + # `LocalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + # + # @overload delete_local_inventory(request, options = nil) + # Pass arguments to `delete_local_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_local_inventory(name: nil) + # Pass arguments to `delete_local_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the local inventory for the given product to delete. + # Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # + # @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/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new + # + # # Call the delete_local_inventory method. + # result = client.delete_local_inventory request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_local_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_local_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_local_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_local_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.call_rpc :delete_local_inventory, request, 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 LocalInventoryService API. + # + # This class represents the configuration for LocalInventoryService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_local_inventories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_local_inventories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_local_inventories.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LocalInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_local_inventories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_local_inventories + ## + # RPC-specific configuration for `insert_local_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_local_inventory + ## + # RPC-specific configuration for `delete_local_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_local_inventory + + # @private + def initialize parent_rpcs = nil + list_local_inventories_config = parent_rpcs.list_local_inventories if parent_rpcs.respond_to? :list_local_inventories + @list_local_inventories = ::Gapic::Config::Method.new list_local_inventories_config + insert_local_inventory_config = parent_rpcs.insert_local_inventory if parent_rpcs.respond_to? :insert_local_inventory + @insert_local_inventory = ::Gapic::Config::Method.new insert_local_inventory_config + delete_local_inventory_config = parent_rpcs.delete_local_inventory if parent_rpcs.respond_to? :delete_local_inventory + @delete_local_inventory = ::Gapic::Config::Method.new delete_local_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/credentials.rb new file mode 100644 index 000000000000..c59df21e5b7f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_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 Shopping + module Merchant + module Inventories + module V1 + module LocalInventoryService + # Credentials for the LocalInventoryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb new file mode 100644 index 000000000000..a321f9b2e7ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.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 Shopping + module Merchant + module Inventories + module V1 + module LocalInventoryService + # Path helper methods for the LocalInventoryService API. + module Paths + ## + # Create a fully-qualified LocalInventory resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # + # @param account [String] + # @param product [String] + # @param store_code [String] + # + # @return [::String] + def local_inventory_path account:, product:, store_code: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" + + "accounts/#{account}/products/#{product}/localInventories/#{store_code}" + end + + ## + # Create a fully-qualified Product resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}` + # + # @param account [String] + # @param product [String] + # + # @return [::String] + def product_path account:, product: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/products/#{product}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest.rb new file mode 100644 index 000000000000..a6136640df65 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_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/shopping/merchant/inventories/v1/version" + +require "google/shopping/merchant/inventories/v1/local_inventory_service/credentials" +require "google/shopping/merchant/inventories/v1/local_inventory_service/paths" +require "google/shopping/merchant/inventories/v1/local_inventory_service/rest/client" + +module Google + module Shopping + module Merchant + module Inventories + module V1 + ## + # Service to manage local inventory for products + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/inventories/v1/local_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new + # + module LocalInventoryService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/inventories/v1/local_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb new file mode 100644 index 000000000000..5d8c4a44cb7f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb @@ -0,0 +1,647 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/inventories/v1/localinventory_pb" +require "google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Inventories + module V1 + module LocalInventoryService + module Rest + ## + # REST client for the LocalInventoryService service. + # + # Service to manage local inventory for products + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :local_inventory_service_stub + + ## + # Configure the LocalInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LocalInventoryService clients + # ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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", "Shopping", "Merchant", "Inventories", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LocalInventoryService 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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 + @local_inventory_service_stub.universe_domain + end + + ## + # Create a new LocalInventoryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LocalInventoryService 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 + + @local_inventory_service_stub = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @local_inventory_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 + @local_inventory_service_stub.logger + end + + # Service calls + + ## + # Lists the `LocalInventory` resources for the given product in your merchant + # account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be used + # to obtain additional results. + # + # `LocalInventory` resources are listed per product for a given account. + # + # @overload list_local_inventories(request, options = nil) + # Pass arguments to `list_local_inventories` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_local_inventories(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_local_inventories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 parent product to list local inventories for. + # Format: + # `accounts/{account}/products/{product}` + # @param page_size [::Integer] + # The maximum number of `LocalInventory` resources for the given + # product to return. The service returns fewer than this value if the number + # of inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 25000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum + # @param page_token [::String] + # A page token, received from a previous `ListLocalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListLocalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::LocalInventory>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::LocalInventory>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.new + # + # # Call the list_local_inventories method. + # result = client.list_local_inventories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1::LocalInventory. + # p item + # end + # + def list_local_inventories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_local_inventories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_local_inventories.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_local_inventories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.list_local_inventories request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @local_inventory_service_stub, :list_local_inventories, "local_inventories", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inserts a `LocalInventory` resource to a product in your merchant + # account. + # + # Replaces the full `LocalInventory` resource if an entry with the same + # {::Google::Shopping::Merchant::Inventories::V1::LocalInventory#store_code `storeCode`} + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `LocalInventory` + # resource to appear in products. + # + # @overload insert_local_inventory(request, options = nil) + # Pass arguments to `insert_local_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_local_inventory(parent: nil, local_inventory: nil) + # Pass arguments to `insert_local_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @param local_inventory [::Google::Shopping::Merchant::Inventories::V1::LocalInventory, ::Hash] + # Required. Local inventory information of the product. If the product + # already has a `LocalInventory` resource for the same `storeCode`, full + # replacement of the `LocalInventory` resource is performed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new + # + # # Call the insert_local_inventory method. + # result = client.insert_local_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Inventories::V1::LocalInventory. + # p result + # + def insert_local_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_local_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_local_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_local_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.insert_local_inventory request, 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 `LocalInventory` from the given product in your + # merchant account. It might take a up to an hour for the + # `LocalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + # + # @overload delete_local_inventory(request, options = nil) + # Pass arguments to `delete_local_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_local_inventory(name: nil) + # Pass arguments to `delete_local_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the local inventory for the given product to delete. + # Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # @yield [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/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new + # + # # Call the delete_local_inventory method. + # result = client.delete_local_inventory request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_local_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_local_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_local_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_local_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.delete_local_inventory request, 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 LocalInventoryService REST API. + # + # This class represents the configuration for LocalInventoryService 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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_local_inventories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_local_inventories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_local_inventories.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LocalInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_local_inventories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_local_inventories + ## + # RPC-specific configuration for `insert_local_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_local_inventory + ## + # RPC-specific configuration for `delete_local_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_local_inventory + + # @private + def initialize parent_rpcs = nil + list_local_inventories_config = parent_rpcs.list_local_inventories if parent_rpcs.respond_to? :list_local_inventories + @list_local_inventories = ::Gapic::Config::Method.new list_local_inventories_config + insert_local_inventory_config = parent_rpcs.insert_local_inventory if parent_rpcs.respond_to? :insert_local_inventory + @insert_local_inventory = ::Gapic::Config::Method.new insert_local_inventory_config + delete_local_inventory_config = parent_rpcs.delete_local_inventory if parent_rpcs.respond_to? :delete_local_inventory + @delete_local_inventory = ::Gapic::Config::Method.new delete_local_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb new file mode 100644 index 000000000000..f8eef4b1834e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb @@ -0,0 +1,267 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/inventories/v1/localinventory_pb" + +module Google + module Shopping + module Merchant + module Inventories + module V1 + module LocalInventoryService + module Rest + ## + # REST service stub for the LocalInventoryService 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_local_inventories REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse] + # A result object deserialized from the server's reply + def list_local_inventories request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_local_inventories_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_local_inventories", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the insert_local_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] + # A result object deserialized from the server's reply + def insert_local_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_local_inventory_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "insert_local_inventory", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Inventories::V1::LocalInventory.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_local_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_local_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_local_inventory_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_local_inventory", + 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_local_inventories REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_local_inventories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/inventories/v1/{parent}/localInventories", + matches: [ + ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_local_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_local_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/inventories/v1/{parent}/localInventories:insert", + body: "local_inventory", + matches: [ + ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_local_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_local_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/inventories/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/products/[^/]+/localInventories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_pb.rb new file mode 100644 index 000000000000..542cc92ecb83 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/inventories/v1/localinventory.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/shopping/merchant/inventories/v1/inventories_common_pb' + + +descriptor_data = "\n] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::RegionalInventory>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.new + # + # # Call the list_regional_inventories method. + # result = client.list_regional_inventories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory. + # p item + # end + # + def list_regional_inventories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_regional_inventories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_regional_inventories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_regional_inventories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.call_rpc :list_regional_inventories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @regional_inventory_service_stub, :list_regional_inventories, 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 + + ## + # Inserts a `RegionalInventory` to a given product in your + # merchant account. + # + # Replaces the full `RegionalInventory` resource if an entry with the same + # {::Google::Shopping::Merchant::Inventories::V1::RegionalInventory#region `region`} + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `RegionalInventory` + # resource to appear in products. + # + # @overload insert_regional_inventory(request, options = nil) + # Pass arguments to `insert_regional_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_regional_inventory(parent: nil, regional_inventory: nil) + # Pass arguments to `insert_regional_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @param regional_inventory [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory, ::Hash] + # Required. Regional inventory information to add to the product. If the + # product already has a `RegionalInventory` resource for the same `region`, + # full replacement of the `RegionalInventory` resource is performed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new + # + # # Call the insert_regional_inventory method. + # result = client.insert_regional_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Inventories::V1::RegionalInventory. + # p result + # + def insert_regional_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_regional_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_regional_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_regional_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.call_rpc :insert_regional_inventory, request, 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 `RegionalInventory` resource from the given product + # in your merchant account. It might take up to an hour for the + # `RegionalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + # + # @overload delete_regional_inventory(request, options = nil) + # Pass arguments to `delete_regional_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_regional_inventory(name: nil) + # Pass arguments to `delete_regional_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `RegionalInventory` resource to delete. + # Format: + # `accounts/{account}/products/{product}/regionalInventories/{region}` + # + # @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/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new + # + # # Call the delete_regional_inventory method. + # result = client.delete_regional_inventory request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_regional_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_regional_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_regional_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_regional_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.call_rpc :delete_regional_inventory, request, 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 RegionalInventoryService API. + # + # This class represents the configuration for RegionalInventoryService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_regional_inventories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_regional_inventories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_regional_inventories.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 RegionalInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_regional_inventories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_regional_inventories + ## + # RPC-specific configuration for `insert_regional_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_regional_inventory + ## + # RPC-specific configuration for `delete_regional_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_regional_inventory + + # @private + def initialize parent_rpcs = nil + list_regional_inventories_config = parent_rpcs.list_regional_inventories if parent_rpcs.respond_to? :list_regional_inventories + @list_regional_inventories = ::Gapic::Config::Method.new list_regional_inventories_config + insert_regional_inventory_config = parent_rpcs.insert_regional_inventory if parent_rpcs.respond_to? :insert_regional_inventory + @insert_regional_inventory = ::Gapic::Config::Method.new insert_regional_inventory_config + delete_regional_inventory_config = parent_rpcs.delete_regional_inventory if parent_rpcs.respond_to? :delete_regional_inventory + @delete_regional_inventory = ::Gapic::Config::Method.new delete_regional_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/credentials.rb new file mode 100644 index 000000000000..78c7f08de02e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_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 Shopping + module Merchant + module Inventories + module V1 + module RegionalInventoryService + # Credentials for the RegionalInventoryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.rb new file mode 100644 index 000000000000..0c526721b67d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.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 Shopping + module Merchant + module Inventories + module V1 + module RegionalInventoryService + # Path helper methods for the RegionalInventoryService API. + module Paths + ## + # Create a fully-qualified Product resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}` + # + # @param account [String] + # @param product [String] + # + # @return [::String] + def product_path account:, product: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/products/#{product}" + end + + ## + # Create a fully-qualified RegionalInventory resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}/regionalInventories/{region}` + # + # @param account [String] + # @param product [String] + # @param region [String] + # + # @return [::String] + def regional_inventory_path account:, product:, region: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" + + "accounts/#{account}/products/#{product}/regionalInventories/#{region}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest.rb new file mode 100644 index 000000000000..d9bce6c3c4e3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_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/shopping/merchant/inventories/v1/version" + +require "google/shopping/merchant/inventories/v1/regional_inventory_service/credentials" +require "google/shopping/merchant/inventories/v1/regional_inventory_service/paths" +require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client" + +module Google + module Shopping + module Merchant + module Inventories + module V1 + ## + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new + # + module RegionalInventoryService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb new file mode 100644 index 000000000000..2c2e5452c4df --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb @@ -0,0 +1,647 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/inventories/v1/regionalinventory_pb" +require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Inventories + module V1 + module RegionalInventoryService + module Rest + ## + # REST client for the RegionalInventoryService service. + # + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :regional_inventory_service_stub + + ## + # Configure the RegionalInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RegionalInventoryService clients + # ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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", "Shopping", "Merchant", "Inventories", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RegionalInventoryService 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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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 + @regional_inventory_service_stub.universe_domain + end + + ## + # Create a new RegionalInventoryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RegionalInventoryService 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 + + @regional_inventory_service_stub = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @regional_inventory_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 + @regional_inventory_service_stub.logger + end + + # Service calls + + ## + # Lists the `RegionalInventory` resources for the given product in your + # merchant account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be + # used to obtain additional results. + # + # `RegionalInventory` resources are listed per product for a given account. + # + # @overload list_regional_inventories(request, options = nil) + # Pass arguments to `list_regional_inventories` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_regional_inventories(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_regional_inventories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 parent product to list `RegionalInventory` + # resources for. Format: `accounts/{account}/products/{product}` + # @param page_size [::Integer] + # The maximum number of `RegionalInventory` resources for the given product + # to return. The service returns fewer than this value if the number of + # inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 100000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum. + # @param page_token [::String] + # A page token, received from a previous `ListRegionalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegionalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::RegionalInventory>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::RegionalInventory>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.new + # + # # Call the list_regional_inventories method. + # result = client.list_regional_inventories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory. + # p item + # end + # + def list_regional_inventories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_regional_inventories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_regional_inventories.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_regional_inventories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.list_regional_inventories request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @regional_inventory_service_stub, :list_regional_inventories, "regional_inventories", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inserts a `RegionalInventory` to a given product in your + # merchant account. + # + # Replaces the full `RegionalInventory` resource if an entry with the same + # {::Google::Shopping::Merchant::Inventories::V1::RegionalInventory#region `region`} + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `RegionalInventory` + # resource to appear in products. + # + # @overload insert_regional_inventory(request, options = nil) + # Pass arguments to `insert_regional_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_regional_inventory(parent: nil, regional_inventory: nil) + # Pass arguments to `insert_regional_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @param regional_inventory [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory, ::Hash] + # Required. Regional inventory information to add to the product. If the + # product already has a `RegionalInventory` resource for the same `region`, + # full replacement of the `RegionalInventory` resource is performed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new + # + # # Call the insert_regional_inventory method. + # result = client.insert_regional_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Inventories::V1::RegionalInventory. + # p result + # + def insert_regional_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_regional_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_regional_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_regional_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.insert_regional_inventory request, 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 `RegionalInventory` resource from the given product + # in your merchant account. It might take up to an hour for the + # `RegionalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + # + # @overload delete_regional_inventory(request, options = nil) + # Pass arguments to `delete_regional_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_regional_inventory(name: nil) + # Pass arguments to `delete_regional_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `RegionalInventory` resource to delete. + # Format: + # `accounts/{account}/products/{product}/regionalInventories/{region}` + # @yield [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/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new + # + # # Call the delete_regional_inventory method. + # result = client.delete_regional_inventory request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_regional_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_regional_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_regional_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_regional_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.delete_regional_inventory request, 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 RegionalInventoryService REST API. + # + # This class represents the configuration for RegionalInventoryService 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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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_regional_inventories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_regional_inventories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_regional_inventories.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 RegionalInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_regional_inventories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_regional_inventories + ## + # RPC-specific configuration for `insert_regional_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_regional_inventory + ## + # RPC-specific configuration for `delete_regional_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_regional_inventory + + # @private + def initialize parent_rpcs = nil + list_regional_inventories_config = parent_rpcs.list_regional_inventories if parent_rpcs.respond_to? :list_regional_inventories + @list_regional_inventories = ::Gapic::Config::Method.new list_regional_inventories_config + insert_regional_inventory_config = parent_rpcs.insert_regional_inventory if parent_rpcs.respond_to? :insert_regional_inventory + @insert_regional_inventory = ::Gapic::Config::Method.new insert_regional_inventory_config + delete_regional_inventory_config = parent_rpcs.delete_regional_inventory if parent_rpcs.respond_to? :delete_regional_inventory + @delete_regional_inventory = ::Gapic::Config::Method.new delete_regional_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb new file mode 100644 index 000000000000..aee6dfec776f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb @@ -0,0 +1,267 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/inventories/v1/regionalinventory_pb" + +module Google + module Shopping + module Merchant + module Inventories + module V1 + module RegionalInventoryService + module Rest + ## + # REST service stub for the RegionalInventoryService 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_regional_inventories REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse] + # A result object deserialized from the server's reply + def list_regional_inventories request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_regional_inventories_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_regional_inventories", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the insert_regional_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] + # A result object deserialized from the server's reply + def insert_regional_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_regional_inventory_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "insert_regional_inventory", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory.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_regional_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_regional_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_regional_inventory_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_regional_inventory", + 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_regional_inventories REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_regional_inventories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/inventories/v1/{parent}/regionalInventories", + matches: [ + ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_regional_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_regional_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/inventories/v1/{parent}/regionalInventories:insert", + body: "regional_inventory", + matches: [ + ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_regional_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_regional_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/inventories/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/products/[^/]+/regionalInventories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_pb.rb new file mode 100644 index 000000000000..2eb7c5010ec3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/inventories/v1/regionalinventory.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/shopping/merchant/inventories/v1/inventories_common_pb' + + +descriptor_data = "\n?google/shopping/merchant/inventories/v1/regionalinventory.proto\x12\'google.shopping.merchant.inventories.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a@google/shopping/merchant/inventories/v1/inventories_common.proto\"\xbd\x02\n\x11RegionalInventory\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\x06region\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12p\n\x1dregional_inventory_attributes\x18\t \x01(\x0b\x32\x44.google.shopping.merchant.inventories.v1.RegionalInventoryAttributesB\x03\xe0\x41\x01:u\xea\x41r\n,merchantapi.googleapis.com/RegionalInventory\x12\x42\x61\x63\x63ounts/{account}/products/{product}/regionalInventories/{region}\"\x8d\x01\n\x1eListRegionalInventoriesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,merchantapi.googleapis.com/RegionalInventory\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x94\x01\n\x1fListRegionalInventoriesResponse\x12X\n\x14regional_inventories\x18\x01 \x03(\x0b\x32:.google.shopping.merchant.inventories.v1.RegionalInventory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc3\x01\n\x1eInsertRegionalInventoryRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,merchantapi.googleapis.com/RegionalInventory\x12[\n\x12regional_inventory\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.inventories.v1.RegionalInventoryB\x03\xe0\x41\x02\"d\n\x1e\x44\x65leteRegionalInventoryRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,merchantapi.googleapis.com/RegionalInventory2\xbf\x06\n\x18RegionalInventoryService\x12\x81\x02\n\x17ListRegionalInventories\x12G.google.shopping.merchant.inventories.v1.ListRegionalInventoriesRequest\x1aH.google.shopping.merchant.inventories.v1.ListRegionalInventoriesResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/inventories/v1/{parent=accounts/*/products/*}/regionalInventories\x12\x85\x02\n\x17InsertRegionalInventory\x12G.google.shopping.merchant.inventories.v1.InsertRegionalInventoryRequest\x1a:.google.shopping.merchant.inventories.v1.RegionalInventory\"e\x82\xd3\xe4\x93\x02_\"I/inventories/v1/{parent=accounts/*/products/*}/regionalInventories:insert:\x12regional_inventory\x12\xcd\x01\n\x17\x44\x65leteRegionalInventory\x12G.google.shopping.merchant.inventories.v1.DeleteRegionalInventoryRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/inventories/v1/{name=accounts/*/products/*/regionalInventories/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x9e\x02\n+com.google.shopping.merchant.inventories.v1B\x16RegionalInventoryProtoP\x01ZScloud.google.com/go/shopping/merchant/inventories/apiv1/inventoriespb;inventoriespb\xaa\x02\'Google.Shopping.Merchant.Inventories.V1\xca\x02\'Google\\Shopping\\Merchant\\Inventories\\V1\xea\x02+Google::Shopping::Merchant::Inventories::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Inventories + module V1 + RegionalInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.RegionalInventory").msgclass + ListRegionalInventoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.ListRegionalInventoriesRequest").msgclass + ListRegionalInventoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.ListRegionalInventoriesResponse").msgclass + InsertRegionalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.InsertRegionalInventoryRequest").msgclass + DeleteRegionalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.DeleteRegionalInventoryRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb new file mode 100644 index 000000000000..603f08e381ba --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb @@ -0,0 +1,69 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/inventories/v1/regionalinventory.proto for package 'Google.Shopping.Merchant.Inventories.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/shopping/merchant/inventories/v1/regionalinventory_pb' + +module Google + module Shopping + module Merchant + module Inventories + module V1 + module RegionalInventoryService + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.inventories.v1.RegionalInventoryService' + + # Lists the `RegionalInventory` resources for the given product in your + # merchant account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be + # used to obtain additional results. + # + # `RegionalInventory` resources are listed per product for a given account. + rpc :ListRegionalInventories, ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest, ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse + # Inserts a `RegionalInventory` to a given product in your + # merchant account. + # + # Replaces the full `RegionalInventory` resource if an entry with the same + # [`region`][google.shopping.merchant.inventories.v1.RegionalInventory.region] + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `RegionalInventory` + # resource to appear in products. + rpc :InsertRegionalInventory, ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest, ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory + # Deletes the specified `RegionalInventory` resource from the given product + # in your merchant account. It might take up to an hour for the + # `RegionalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + rpc :DeleteRegionalInventory, ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/rest.rb new file mode 100644 index 000000000000..46780b0be3b6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/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/shopping/merchant/inventories/v1/local_inventory_service/rest" +require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest" +require "google/shopping/merchant/inventories/v1/version" + +module Google + module Shopping + module Merchant + module Inventories + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/inventories/v1/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/version.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/version.rb new file mode 100644 index 000000000000..2672356289da --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/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 Shopping + module Merchant + module Inventories + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant 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-shopping-merchant-inventories-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb new file mode 100644 index 000000000000..e5ce358bdb2e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb @@ -0,0 +1,182 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Inventories + module V1 + # Local inventory attributes. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Optional. Price of the product at this store. + # @!attribute [rw] sale_price + # @return [::Google::Shopping::Type::Price] + # Optional. Sale price of the product at this store. Mandatory if + # [`salePriceEffectiveDate`][LocalInventory.sale_price_effective_date] is + # defined. + # @!attribute [rw] sale_price_effective_date + # @return [::Google::Type::Interval] + # Optional. The `TimePeriod` of the + # sale at this store. + # @!attribute [rw] availability + # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventoryAttributes::Availability] + # [Availability](https://support.google.com/merchants/answer/3061342) of the + # product at this store. + # @!attribute [rw] quantity + # @return [::Integer] + # Optional. Quantity of the product available at this store. Must be greater + # than or equal to zero. + # @!attribute [rw] pickup_method + # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventoryAttributes::PickupMethod] + # Optional. Supported [pickup + # method](https://support.google.com/merchants/answer/3061342) for this + # product. Unless the value is `"not supported"`, this field must be + # submitted together with `pickupSla`. + # @!attribute [rw] pickup_sla + # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventoryAttributes::PickupSla] + # Optional. Relative time period from the order date for an order for this + # product, from this store, to be ready for pickup. Must be submitted with + # `pickupMethod`. See more details + # [here](https://support.google.com/merchants/answer/3061342). + # @!attribute [rw] instore_product_location + # @return [::String] + # Optional. Location of the product inside the store. Maximum length is 20 + # bytes. + class LocalInventoryAttributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # [Availability](https://support.google.com/merchants/answer/3061342) of the + # product at this store. + module Availability + # Indicates that the availability is unspecified. + LOCAL_INVENTORY_AVAILABILITY_UNSPECIFIED = 0 + + # Indicates that the product is in stock. + IN_STOCK = 1 + + # Indicates that the product is out of stock. + LIMITED_AVAILABILITY = 2 + + # Indicates that the product is on display to order. + ON_DISPLAY_TO_ORDER = 3 + + # Indicates that the product is out of stock. + OUT_OF_STOCK = 4 + end + + # Supported [pickup + # method](https://support.google.com/merchants/answer/3061342) for this + # product. Unless the value is `"not supported"`, this field must be + # submitted together with `pickupSla`. + module PickupMethod + # Indicates that the pickup method is unspecified. + PICKUP_METHOD_UNSPECIFIED = 0 + + # Indicates that the pickup method is Buy. + BUY = 1 + + # Indicates that the pickup method is Reserve. + RESERVE = 2 + + # Indicates that the pickup method is Ship to store. + SHIP_TO_STORE = 3 + + # Indicates that the pickup method is not supported. + NOT_SUPPORTED = 4 + end + + # Relative time period from the order date for an order for this product, + # from this store, to be ready for pickup. Must be submitted with + # `pickupMethod`. See more details + # [here](https://support.google.com/merchants/answer/3061342). + module PickupSla + # Indicates that the pickup SLA is unspecified. + PICKUP_SLA_UNSPECIFIED = 0 + + # Indicates that the pickup SLA is same day. + SAME_DAY = 1 + + # Indicates that the pickup SLA is next day. + NEXT_DAY = 2 + + # Indicates that the pickup SLA is two days. + TWO_DAY = 3 + + # Indicates that the pickup SLA is three days. + THREE_DAY = 4 + + # Indicates that the pickup SLA is four days. + FOUR_DAY = 5 + + # Indicates that the pickup SLA is five days. + FIVE_DAY = 6 + + # Indicates that the pickup SLA is six days. + SIX_DAY = 7 + + # Indicates that the pickup SLA is seven days. + SEVEN_DAY = 8 + + # Indicates that the pickup SLA is multi-week. + MULTI_WEEK = 9 + end + end + + # Regional inventory attributes. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Optional. Price of the product in this region. + # @!attribute [rw] sale_price + # @return [::Google::Shopping::Type::Price] + # Optional. Sale price of the product in this region. Mandatory if + # [`salePriceEffectiveDate`][RegionalInventory.sale_price_effective_date] is + # defined. + # @!attribute [rw] sale_price_effective_date + # @return [::Google::Type::Interval] + # Optional. The `TimePeriod` of the + # sale price in this region. + # @!attribute [rw] availability + # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryAttributes::Availability] + # Optional. + # [Availability](https://support.google.com/merchants/answer/14644124) of the + # product in this region. + class RegionalInventoryAttributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # [Availability](https://support.google.com/merchants/answer/14644124) of the + # product in this region. + module Availability + # Indicates that the availability is unspecified. + REGIONAL_INVENTORY_AVAILABILITY_UNSPECIFIED = 0 + + # Indicates that the product is in stock. + IN_STOCK = 1 + + # Indicates that the product is out of stock. + OUT_OF_STOCK = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb new file mode 100644 index 000000000000..3d9af5f61da3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb @@ -0,0 +1,124 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Inventories + module V1 + # Local inventory information for the product. Represents in-store information + # for a specific product at the store specified by + # {::Google::Shopping::Merchant::Inventories::V1::LocalInventory#store_code `storeCode`}. + # For a list of all accepted attribute values, see the [local product inventory + # data specification](https://support.google.com/merchants/answer/3061342). + # @!attribute [r] name + # @return [::String] + # Output only. The name of the `LocalInventory` resource. + # Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # @!attribute [r] account + # @return [::Integer] + # Output only. The account that owns the product. This field will be ignored + # if set by the client. + # @!attribute [rw] store_code + # @return [::String] + # Required. Immutable. Store code (the store ID from your Business Profile) + # of the physical store the product is sold in. See the [Local product + # inventory data + # specification](https://support.google.com/merchants/answer/3061342) for + # more information. + # @!attribute [rw] local_inventory_attributes + # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventoryAttributes] + # Optional. A list of local inventory attributes. + class LocalInventory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListLocalInventories` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The `name` of the parent product to list local inventories for. + # Format: + # `accounts/{account}/products/{product}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of `LocalInventory` resources for the given + # product to return. The service returns fewer than this value if the number + # of inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 25000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListLocalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListLocalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListLocalInventoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListLocalInventories` method. + # @!attribute [rw] local_inventories + # @return [::Array<::Google::Shopping::Merchant::Inventories::V1::LocalInventory>] + # The `LocalInventory` resources for the given product from the specified + # account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListLocalInventoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertLocalInventory` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @!attribute [rw] local_inventory + # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] + # Required. Local inventory information of the product. If the product + # already has a `LocalInventory` resource for the same `storeCode`, full + # replacement of the `LocalInventory` resource is performed. + class InsertLocalInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteLocalInventory` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the local inventory for the given product to delete. + # Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + class DeleteLocalInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb new file mode 100644 index 000000000000..be9e4cda170c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.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 Shopping + module Merchant + module Inventories + module V1 + # Regional inventory information for the product. Represents specific + # information like price and availability for a given product in a specific + # {::Google::Shopping::Merchant::Inventories::V1::RegionalInventory#region `region`}. + # For a list of all accepted attribute values, see the [regional product + # inventory data + # specification](https://support.google.com/merchants/answer/9698880). + # @!attribute [r] name + # @return [::String] + # Output only. The name of the `RegionalInventory` resource. + # Format: + # `{regional_inventory.name=accounts/{account}/products/{product}/regionalInventories/{region}` + # @!attribute [r] account + # @return [::Integer] + # Output only. The account that owns the product. This field will be ignored + # if set by the client. + # @!attribute [rw] region + # @return [::String] + # Required. Immutable. ID of the region for this + # `RegionalInventory` resource. See the [Regional availability and + # pricing](https://support.google.com/merchants/answer/9698880) for more + # details. + # @!attribute [rw] regional_inventory_attributes + # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryAttributes] + # Optional. A list of regional inventory attributes. + class RegionalInventory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListRegionalInventories` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The `name` of the parent product to list `RegionalInventory` + # resources for. Format: `accounts/{account}/products/{product}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of `RegionalInventory` resources for the given product + # to return. The service returns fewer than this value if the number of + # inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 100000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListRegionalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegionalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListRegionalInventoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListRegionalInventories` method. + # @!attribute [rw] regional_inventories + # @return [::Array<::Google::Shopping::Merchant::Inventories::V1::RegionalInventory>] + # The `RegionalInventory` resources for the given product from the specified + # account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRegionalInventoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertRegionalInventory` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @!attribute [rw] regional_inventory + # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] + # Required. Regional inventory information to add to the product. If the + # product already has a `RegionalInventory` resource for the same `region`, + # full replacement of the `RegionalInventory` resource is performed. + class InsertRegionalInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteRegionalInventory` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the `RegionalInventory` resource to delete. + # Format: + # `accounts/{account}/products/{product}/regionalInventories/{region}` + class DeleteRegionalInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/type/types.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! + + +module Google + module Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + + # Youtube shopping checkout. + YOUTUBE_SHOPPING_CHECKOUT = 7 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 8 + + # [Free vehicle + # listings](https://support.google.com/merchants/answer/11189169). + FREE_VEHICLE_LISTINGS = 9 + + # [Vehicle ads](https://support.google.com/merchants/answer/11189169). + VEHICLE_ADS = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free product listings on UCP + # checkout](https://developers.google.com/merchant/ucp). + FREE_LISTINGS_UCP_CHECKOUT = 19 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 18 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + + # [Product + # Reviews](https://support.google.com/merchants/answer/14620732). + PRODUCT_REVIEWS = 15 + + # [Merchant + # Reviews](https://developers.google.com/merchant-review-feeds). + MERCHANT_REVIEWS = 16 + + # YouTube Checkout + # . + YOUTUBE_CHECKOUT = 17 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..9350ca479005 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/type/interval.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a time interval, encoded as a Timestamp start (inclusive) and a + # Timestamp end (exclusive). + # + # The start must be less than or equal to the end. + # When the start equals the end, the interval is empty (matches no time). + # When both start and end are unspecified, the interval matches any time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Inclusive start of the interval. + # + # If specified, a Timestamp matching this interval will have to be the same + # or after the start. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Exclusive end of the interval. + # + # If specified, a Timestamp matching this interval will have to be before the + # end. + class Interval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/Gemfile new file mode 100644 index 000000000000..f6752c07deb1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1", path: "../" +else + gem "google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/snippets/local_inventory_service/delete_local_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/delete_local_inventory.rb new file mode 100644 index 000000000000..878f43c4da28 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/delete_local_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_LocalInventoryService_DeleteLocalInventory_sync] +require "google/shopping/merchant/inventories/v1" + +## +# Snippet for the delete_local_inventory call in the LocalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#delete_local_inventory. +# +def delete_local_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new + + # Call the delete_local_inventory method. + result = client.delete_local_inventory request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_LocalInventoryService_DeleteLocalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/insert_local_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/insert_local_inventory.rb new file mode 100644 index 000000000000..0a741637b8cf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/insert_local_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_LocalInventoryService_InsertLocalInventory_sync] +require "google/shopping/merchant/inventories/v1" + +## +# Snippet for the insert_local_inventory call in the LocalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#insert_local_inventory. +# +def insert_local_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new + + # Call the insert_local_inventory method. + result = client.insert_local_inventory request + + # The returned object is of type Google::Shopping::Merchant::Inventories::V1::LocalInventory. + p result +end +# [END merchantapi_v1_generated_LocalInventoryService_InsertLocalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/list_local_inventories.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/list_local_inventories.rb new file mode 100644 index 000000000000..fc17d965d45d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/list_local_inventories.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 merchantapi_v1_generated_LocalInventoryService_ListLocalInventories_sync] +require "google/shopping/merchant/inventories/v1" + +## +# Snippet for the list_local_inventories call in the LocalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#list_local_inventories. +# +def list_local_inventories + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.new + + # Call the list_local_inventories method. + result = client.list_local_inventories request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Inventories::V1::LocalInventory. + p item + end +end +# [END merchantapi_v1_generated_LocalInventoryService_ListLocalInventories_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/delete_regional_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/delete_regional_inventory.rb new file mode 100644 index 000000000000..e985025813a1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/delete_regional_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_RegionalInventoryService_DeleteRegionalInventory_sync] +require "google/shopping/merchant/inventories/v1" + +## +# Snippet for the delete_regional_inventory call in the RegionalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#delete_regional_inventory. +# +def delete_regional_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new + + # Call the delete_regional_inventory method. + result = client.delete_regional_inventory request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_RegionalInventoryService_DeleteRegionalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/insert_regional_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/insert_regional_inventory.rb new file mode 100644 index 000000000000..7f1d60cb06a7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/insert_regional_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_RegionalInventoryService_InsertRegionalInventory_sync] +require "google/shopping/merchant/inventories/v1" + +## +# Snippet for the insert_regional_inventory call in the RegionalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#insert_regional_inventory. +# +def insert_regional_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new + + # Call the insert_regional_inventory method. + result = client.insert_regional_inventory request + + # The returned object is of type Google::Shopping::Merchant::Inventories::V1::RegionalInventory. + p result +end +# [END merchantapi_v1_generated_RegionalInventoryService_InsertRegionalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/list_regional_inventories.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/list_regional_inventories.rb new file mode 100644 index 000000000000..2837c821cbf9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/list_regional_inventories.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 merchantapi_v1_generated_RegionalInventoryService_ListRegionalInventories_sync] +require "google/shopping/merchant/inventories/v1" + +## +# Snippet for the list_regional_inventories call in the RegionalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#list_regional_inventories. +# +def list_regional_inventories + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.new + + # Call the list_regional_inventories method. + result = client.list_regional_inventories request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory. + p item + end +end +# [END merchantapi_v1_generated_RegionalInventoryService_ListRegionalInventories_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json new file mode 100644 index 000000000000..5fbebd90967a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-shopping-merchant-inventories-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.inventories.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_LocalInventoryService_ListLocalInventories_sync", + "title": "Snippet for the list_local_inventories call in the LocalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#list_local_inventories.", + "file": "local_inventory_service/list_local_inventories.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_local_inventories", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#list_local_inventories", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse", + "client": { + "short_name": "LocalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client" + }, + "method": { + "short_name": "ListLocalInventories", + "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService.ListLocalInventories", + "service": { + "short_name": "LocalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LocalInventoryService_InsertLocalInventory_sync", + "title": "Snippet for the insert_local_inventory call in the LocalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#insert_local_inventory.", + "file": "local_inventory_service/insert_local_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_local_inventory", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#insert_local_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Inventories::V1::LocalInventory", + "client": { + "short_name": "LocalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client" + }, + "method": { + "short_name": "InsertLocalInventory", + "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService.InsertLocalInventory", + "service": { + "short_name": "LocalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LocalInventoryService_DeleteLocalInventory_sync", + "title": "Snippet for the delete_local_inventory call in the LocalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#delete_local_inventory.", + "file": "local_inventory_service/delete_local_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_local_inventory", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#delete_local_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "LocalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client" + }, + "method": { + "short_name": "DeleteLocalInventory", + "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService.DeleteLocalInventory", + "service": { + "short_name": "LocalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionalInventoryService_ListRegionalInventories_sync", + "title": "Snippet for the list_regional_inventories call in the RegionalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#list_regional_inventories.", + "file": "regional_inventory_service/list_regional_inventories.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_regional_inventories", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#list_regional_inventories", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse", + "client": { + "short_name": "RegionalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client" + }, + "method": { + "short_name": "ListRegionalInventories", + "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService.ListRegionalInventories", + "service": { + "short_name": "RegionalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionalInventoryService_InsertRegionalInventory_sync", + "title": "Snippet for the insert_regional_inventory call in the RegionalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#insert_regional_inventory.", + "file": "regional_inventory_service/insert_regional_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_regional_inventory", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#insert_regional_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventory", + "client": { + "short_name": "RegionalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client" + }, + "method": { + "short_name": "InsertRegionalInventory", + "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService.InsertRegionalInventory", + "service": { + "short_name": "RegionalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionalInventoryService_DeleteRegionalInventory_sync", + "title": "Snippet for the delete_regional_inventory call in the RegionalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#delete_regional_inventory.", + "file": "regional_inventory_service/delete_regional_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_regional_inventory", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#delete_regional_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RegionalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client" + }, + "method": { + "short_name": "DeleteRegionalInventory", + "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService.DeleteRegionalInventory", + "service": { + "short_name": "RegionalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService" + } + } + }, + "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-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_paths_test.rb new file mode 100644 index 000000000000..b6f1437a06ed --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_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/shopping/merchant/inventories/v1/local_inventory_service" + +class ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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_local_inventory_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.local_inventory_path account: "value0", product: "value1", store_code: "value2" + assert_equal "accounts/value0/products/value1/localInventories/value2", 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_path account: "value0", product: "value1" + assert_equal "accounts/value0/products/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb new file mode 100644 index 000000000000..d275cbb190b3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/inventories/v1/localinventory_pb" +require "google/shopping/merchant/inventories/v1/local_inventory_service/rest" + + +class ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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_local_inventories + # Create test objects. + client_result = ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse.new + http_response = OpenStruct.new 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_local_inventories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::ServiceStub.stub :transcode_list_local_inventories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_local_inventories_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_local_inventories({ 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_local_inventories 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_local_inventories ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.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_local_inventories({ 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_local_inventories(::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.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_local_inventories_client_stub.call_count + end + end + end + + def test_insert_local_inventory + # Create test objects. + client_result = ::Google::Shopping::Merchant::Inventories::V1::LocalInventory.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + local_inventory = {} + + insert_local_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::ServiceStub.stub :transcode_insert_local_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_local_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_local_inventory parent: parent, local_inventory: local_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_local_inventory ::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_local_inventory(::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_local_inventory_client_stub.call_count + end + end + end + + def test_delete_local_inventory + # 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_local_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::ServiceStub.stub :transcode_delete_local_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_local_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_local_inventory({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_local_inventory name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_local_inventory ::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_local_inventory({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_local_inventory(::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_local_inventory_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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb new file mode 100644 index 000000000000..4ba1531cdec9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb @@ -0,0 +1,289 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/inventories/v1/localinventory_pb" +require "google/shopping/merchant/inventories/v1/local_inventory_service" + +class ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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_local_inventories + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_local_inventories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_local_inventories, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest, 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_local_inventories_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_local_inventories({ 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_local_inventories 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_local_inventories ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.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_local_inventories({ 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_local_inventories(::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.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_local_inventories_client_stub.call_rpc_count + end + end + + def test_insert_local_inventory + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Inventories::V1::LocalInventory.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + local_inventory = {} + + insert_local_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_local_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Inventories::V1::LocalInventory), request["local_inventory"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_local_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_local_inventory parent: parent, local_inventory: local_inventory do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_local_inventory ::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_local_inventory(::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_local_inventory_client_stub.call_rpc_count + end + end + + def test_delete_local_inventory + # 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_local_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_local_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_local_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_local_inventory({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_local_inventory name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_local_inventory ::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_local_inventory({ 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_local_inventory(::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new(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_local_inventory_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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_paths_test.rb new file mode 100644 index 000000000000..460a426e97e6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_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/shopping/merchant/inventories/v1/regional_inventory_service" + +class ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_path account: "value0", product: "value1" + assert_equal "accounts/value0/products/value1", path + end + end + + def test_regional_inventory_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.regional_inventory_path account: "value0", product: "value1", region: "value2" + assert_equal "accounts/value0/products/value1/regionalInventories/value2", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb new file mode 100644 index 000000000000..45afecc76a74 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/inventories/v1/regionalinventory_pb" +require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest" + + +class ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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_regional_inventories + # Create test objects. + client_result = ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse.new + http_response = OpenStruct.new 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_regional_inventories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::ServiceStub.stub :transcode_list_regional_inventories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_regional_inventories_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_regional_inventories({ 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_regional_inventories 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_regional_inventories ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.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_regional_inventories({ 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_regional_inventories(::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.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_regional_inventories_client_stub.call_count + end + end + end + + def test_insert_regional_inventory + # Create test objects. + client_result = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + regional_inventory = {} + + insert_regional_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::ServiceStub.stub :transcode_insert_regional_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_regional_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_regional_inventory ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_regional_inventory(::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_regional_inventory_client_stub.call_count + end + end + end + + def test_delete_regional_inventory + # 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_regional_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::ServiceStub.stub :transcode_delete_regional_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_regional_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_regional_inventory({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_regional_inventory name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_regional_inventory ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_regional_inventory({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_regional_inventory(::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_regional_inventory_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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb new file mode 100644 index 000000000000..f54b95d7c5fa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb @@ -0,0 +1,289 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/inventories/v1/regionalinventory_pb" +require "google/shopping/merchant/inventories/v1/regional_inventory_service" + +class ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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_regional_inventories + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_regional_inventories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_regional_inventories, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest, 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_regional_inventories_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_regional_inventories({ 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_regional_inventories 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_regional_inventories ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.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_regional_inventories({ 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_regional_inventories(::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.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_regional_inventories_client_stub.call_rpc_count + end + end + + def test_insert_regional_inventory + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + regional_inventory = {} + + insert_regional_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_regional_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory), request["regional_inventory"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_regional_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_regional_inventory ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_regional_inventory(::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_regional_inventory_client_stub.call_rpc_count + end + end + + def test_delete_regional_inventory + # 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_regional_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_regional_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_regional_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_regional_inventory({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_regional_inventory name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_regional_inventory ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_regional_inventory({ 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_regional_inventory(::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new(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_regional_inventory_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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.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-shopping-merchant-inventories-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..e750ced8add4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-inventories-v1beta", + "distribution_name": "google-shopping-merchant-inventories-v1beta", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1BETA API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-inventories-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-inventories instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.rubocop.yml new file mode 100644 index 000000000000..e4469fb37867 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-inventories-v1beta.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-shopping-merchant-inventories-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.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-shopping-merchant-inventories-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1BETA 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-shopping-merchant-inventories-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..3500f6dddbe8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-inventories-v1beta 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-shopping-merchant-inventories-v1beta 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/shopping/merchant/inventories/v1beta" + +client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/inventories/v1beta" + +::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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-shopping-merchant-inventories-v1beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/inventories/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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-shopping-merchant-inventories-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/README.md new file mode 100644 index 000000000000..7bac7e30b686 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Merchant V1BETA API + +Programmatically manage your Merchant Center accounts. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1BETA API. Most users should consider using +the main client gem, +[google-shopping-merchant-inventories](https://rubygems.org/gems/google-shopping-merchant-inventories). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-inventories-v1beta +``` + +## 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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/inventories/v1beta" + +client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new +request = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new # (request fields as keyword arguments...) +response = client.list_local_inventories request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-inventories-v1beta) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/inventories/v1beta" +require "logger" + +client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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-shopping-merchant-inventories`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-inventories-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-inventories`. +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-shopping-merchant-inventories-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Rakefile new file mode 100644 index 000000000000..ff2d3cc4b129 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta 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/shopping/merchant/inventories/v1beta/local_inventory_service/credentials" + ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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-shopping-merchant-inventories-v1beta 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-shopping-merchant-inventories-v1beta 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-shopping-merchant-inventories-v1beta 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-shopping-merchant-inventories-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-inventories-v1beta" + header "google-shopping-merchant-inventories-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-inventories-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-inventories-v1beta 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-shopping-merchant-inventories-v1beta 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-shopping-merchant-inventories-v1beta 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-shopping-merchant-inventories-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..dd89d64ee89b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/gapic_metadata.json @@ -0,0 +1,57 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.inventories.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::Inventories::V1beta", + "services": { + "LocalInventoryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client", + "rpcs": { + "ListLocalInventories": { + "methods": [ + "list_local_inventories" + ] + }, + "InsertLocalInventory": { + "methods": [ + "insert_local_inventory" + ] + }, + "DeleteLocalInventory": { + "methods": [ + "delete_local_inventory" + ] + } + } + } + } + }, + "RegionalInventoryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client", + "rpcs": { + "ListRegionalInventories": { + "methods": [ + "list_regional_inventories" + ] + }, + "InsertRegionalInventory": { + "methods": [ + "insert_regional_inventory" + ] + }, + "DeleteRegionalInventory": { + "methods": [ + "delete_regional_inventory" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec new file mode 100644 index 000000000000..e58c50914813 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/inventories/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-inventories-v1beta" + gem.version = Google::Shopping::Merchant::Inventories::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-inventories-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-inventories instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center accounts." + 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-shopping-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb new file mode 100644 index 000000000000..a4315e427d7b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.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/shopping/merchant/inventories/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb new file mode 100644 index 000000000000..acf7855533df --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.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 "google/shopping/merchant/inventories/v1beta/local_inventory_service" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service" +require "google/shopping/merchant/inventories/v1beta/version" + +module Google + module Shopping + module Merchant + module Inventories + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/inventories/v1beta" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/inventories/v1beta" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/inventories/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb new file mode 100644 index 000000000000..c7d1c0af2e04 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/inventories/v1beta/version" + +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/paths" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/client" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + ## + # Service to manage local inventory for products + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/inventories/v1beta/local_inventory_service" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new + # + module LocalInventoryService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "local_inventory_service", "helpers.rb" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb new file mode 100644 index 000000000000..53cdca3d81e9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb @@ -0,0 +1,711 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/inventories/v1beta/localinventory_pb" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module LocalInventoryService + ## + # Client for the LocalInventoryService service. + # + # Service to manage local inventory for products + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :local_inventory_service_stub + + ## + # Configure the LocalInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LocalInventoryService clients + # ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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", "Shopping", "Merchant", "Inventories", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LocalInventoryService 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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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 + @local_inventory_service_stub.universe_domain + end + + ## + # Create a new LocalInventoryService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LocalInventoryService 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/shopping/merchant/inventories/v1beta/localinventory_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 + + @local_inventory_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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 + ) + + @local_inventory_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 + @local_inventory_service_stub.logger + end + + # Service calls + + ## + # Lists the `LocalInventory` resources for the given product in your merchant + # account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be used + # to obtain additional results. + # + # `LocalInventory` resources are listed per product for a given account. + # + # @overload list_local_inventories(request, options = nil) + # Pass arguments to `list_local_inventories` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_local_inventories(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_local_inventories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 parent product to list local inventories for. + # Format: + # `accounts/{account}/products/{product}` + # @param page_size [::Integer] + # The maximum number of `LocalInventory` resources for the given + # product to return. The service returns fewer than this value if the number + # of inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 25000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum + # @param page_token [::String] + # A page token, received from a previous `ListLocalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListLocalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new + # + # # Call the list_local_inventories method. + # result = client.list_local_inventories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. + # p item + # end + # + def list_local_inventories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_local_inventories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_local_inventories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_local_inventories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.call_rpc :list_local_inventories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @local_inventory_service_stub, :list_local_inventories, 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 + + ## + # Inserts a `LocalInventory` resource to a product in your merchant + # account. + # + # Replaces the full `LocalInventory` resource if an entry with the same + # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory#store_code `storeCode`} + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `LocalInventory` + # resource to appear in products. + # + # @overload insert_local_inventory(request, options = nil) + # Pass arguments to `insert_local_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_local_inventory(parent: nil, local_inventory: nil) + # Pass arguments to `insert_local_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @param local_inventory [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory, ::Hash] + # Required. Local inventory information of the product. If the product + # already has a `LocalInventory` resource for the same `storeCode`, full + # replacement of the `LocalInventory` resource is performed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new + # + # # Call the insert_local_inventory method. + # result = client.insert_local_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. + # p result + # + def insert_local_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_local_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_local_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_local_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.call_rpc :insert_local_inventory, request, 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 `LocalInventory` from the given product in your + # merchant account. It might take a up to an hour for the + # `LocalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + # + # @overload delete_local_inventory(request, options = nil) + # Pass arguments to `delete_local_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_local_inventory(name: nil) + # Pass arguments to `delete_local_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the local inventory for the given product to delete. + # Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # + # @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/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new + # + # # Call the delete_local_inventory method. + # result = client.delete_local_inventory request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_local_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_local_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_local_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_local_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.call_rpc :delete_local_inventory, request, 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 LocalInventoryService API. + # + # This class represents the configuration for LocalInventoryService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_local_inventories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_local_inventories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_local_inventories.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LocalInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_local_inventories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_local_inventories + ## + # RPC-specific configuration for `insert_local_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_local_inventory + ## + # RPC-specific configuration for `delete_local_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_local_inventory + + # @private + def initialize parent_rpcs = nil + list_local_inventories_config = parent_rpcs.list_local_inventories if parent_rpcs.respond_to? :list_local_inventories + @list_local_inventories = ::Gapic::Config::Method.new list_local_inventories_config + insert_local_inventory_config = parent_rpcs.insert_local_inventory if parent_rpcs.respond_to? :insert_local_inventory + @insert_local_inventory = ::Gapic::Config::Method.new insert_local_inventory_config + delete_local_inventory_config = parent_rpcs.delete_local_inventory if parent_rpcs.respond_to? :delete_local_inventory + @delete_local_inventory = ::Gapic::Config::Method.new delete_local_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb new file mode 100644 index 000000000000..1f667b3a267c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_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 Shopping + module Merchant + module Inventories + module V1beta + module LocalInventoryService + # Credentials for the LocalInventoryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb new file mode 100644 index 000000000000..23b3173b789e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.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 Shopping + module Merchant + module Inventories + module V1beta + module LocalInventoryService + # Path helper methods for the LocalInventoryService API. + module Paths + ## + # Create a fully-qualified LocalInventory resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # + # @param account [String] + # @param product [String] + # @param store_code [String] + # + # @return [::String] + def local_inventory_path account:, product:, store_code: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" + + "accounts/#{account}/products/#{product}/localInventories/#{store_code}" + end + + ## + # Create a fully-qualified Product resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}` + # + # @param account [String] + # @param product [String] + # + # @return [::String] + def product_path account:, product: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/products/#{product}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb new file mode 100644 index 000000000000..c6f5cb4cb26f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_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/shopping/merchant/inventories/v1beta/version" + +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/paths" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + ## + # Service to manage local inventory for products + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new + # + module LocalInventoryService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb new file mode 100644 index 000000000000..e2bb2a035be0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb @@ -0,0 +1,647 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/inventories/v1beta/localinventory_pb" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module LocalInventoryService + module Rest + ## + # REST client for the LocalInventoryService service. + # + # Service to manage local inventory for products + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :local_inventory_service_stub + + ## + # Configure the LocalInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LocalInventoryService clients + # ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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", "Shopping", "Merchant", "Inventories", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LocalInventoryService 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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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 + @local_inventory_service_stub.universe_domain + end + + ## + # Create a new LocalInventoryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LocalInventoryService 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 + + @local_inventory_service_stub = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @local_inventory_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 + @local_inventory_service_stub.logger + end + + # Service calls + + ## + # Lists the `LocalInventory` resources for the given product in your merchant + # account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be used + # to obtain additional results. + # + # `LocalInventory` resources are listed per product for a given account. + # + # @overload list_local_inventories(request, options = nil) + # Pass arguments to `list_local_inventories` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_local_inventories(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_local_inventories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 parent product to list local inventories for. + # Format: + # `accounts/{account}/products/{product}` + # @param page_size [::Integer] + # The maximum number of `LocalInventory` resources for the given + # product to return. The service returns fewer than this value if the number + # of inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 25000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum + # @param page_token [::String] + # A page token, received from a previous `ListLocalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListLocalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new + # + # # Call the list_local_inventories method. + # result = client.list_local_inventories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. + # p item + # end + # + def list_local_inventories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_local_inventories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_local_inventories.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_local_inventories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.list_local_inventories request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @local_inventory_service_stub, :list_local_inventories, "local_inventories", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inserts a `LocalInventory` resource to a product in your merchant + # account. + # + # Replaces the full `LocalInventory` resource if an entry with the same + # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory#store_code `storeCode`} + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `LocalInventory` + # resource to appear in products. + # + # @overload insert_local_inventory(request, options = nil) + # Pass arguments to `insert_local_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_local_inventory(parent: nil, local_inventory: nil) + # Pass arguments to `insert_local_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @param local_inventory [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory, ::Hash] + # Required. Local inventory information of the product. If the product + # already has a `LocalInventory` resource for the same `storeCode`, full + # replacement of the `LocalInventory` resource is performed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new + # + # # Call the insert_local_inventory method. + # result = client.insert_local_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. + # p result + # + def insert_local_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_local_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_local_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_local_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.insert_local_inventory request, 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 `LocalInventory` from the given product in your + # merchant account. It might take a up to an hour for the + # `LocalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + # + # @overload delete_local_inventory(request, options = nil) + # Pass arguments to `delete_local_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_local_inventory(name: nil) + # Pass arguments to `delete_local_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the local inventory for the given product to delete. + # Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # @yield [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/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new + # + # # Call the delete_local_inventory method. + # result = client.delete_local_inventory request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_local_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_local_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_local_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_local_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.delete_local_inventory request, 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 LocalInventoryService REST API. + # + # This class represents the configuration for LocalInventoryService 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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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_local_inventories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_local_inventories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_local_inventories.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LocalInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_local_inventories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_local_inventories + ## + # RPC-specific configuration for `insert_local_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_local_inventory + ## + # RPC-specific configuration for `delete_local_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_local_inventory + + # @private + def initialize parent_rpcs = nil + list_local_inventories_config = parent_rpcs.list_local_inventories if parent_rpcs.respond_to? :list_local_inventories + @list_local_inventories = ::Gapic::Config::Method.new list_local_inventories_config + insert_local_inventory_config = parent_rpcs.insert_local_inventory if parent_rpcs.respond_to? :insert_local_inventory + @insert_local_inventory = ::Gapic::Config::Method.new insert_local_inventory_config + delete_local_inventory_config = parent_rpcs.delete_local_inventory if parent_rpcs.respond_to? :delete_local_inventory + @delete_local_inventory = ::Gapic::Config::Method.new delete_local_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb new file mode 100644 index 000000000000..3f797cae4f4b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb @@ -0,0 +1,267 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/inventories/v1beta/localinventory_pb" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module LocalInventoryService + module Rest + ## + # REST service stub for the LocalInventoryService 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_local_inventories REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse] + # A result object deserialized from the server's reply + def list_local_inventories request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_local_inventories_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_local_inventories", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the insert_local_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] + # A result object deserialized from the server's reply + def insert_local_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_local_inventory_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "insert_local_inventory", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory.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_local_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_local_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_local_inventory_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_local_inventory", + 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_local_inventories REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_local_inventories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/inventories/v1beta/{parent}/localInventories", + matches: [ + ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_local_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_local_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/inventories/v1beta/{parent}/localInventories:insert", + body: "local_inventory", + matches: [ + ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_local_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_local_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/inventories/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/products/[^/]+/localInventories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb new file mode 100644 index 000000000000..b410b7ef3d32 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/inventories/v1beta/localinventory.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/shopping/type/types_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\n@google/shopping/merchant/inventories/v1beta/localinventory.proto\x12+google.shopping.merchant.inventories.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\x8d\x05\n\x0eLocalInventory\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\nstore_code\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12*\n\x05price\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12/\n\nsale_price\x18\x05 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x38\n\x19sale_price_effective_date\x18\x06 \x01(\x0b\x32\x15.google.type.Interval\x12\x19\n\x0c\x61vailability\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08quantity\x18\x08 \x01(\x03H\x01\x88\x01\x01\x12\x1a\n\rpickup_method\x18\t \x01(\tH\x02\x88\x01\x01\x12\x17\n\npickup_sla\x18\n \x01(\tH\x03\x88\x01\x01\x12%\n\x18instore_product_location\x18\x0b \x01(\tH\x04\x88\x01\x01\x12@\n\x11\x63ustom_attributes\x18\x0c \x03(\x0b\x32%.google.shopping.type.CustomAttribute:s\xea\x41p\n)merchantapi.googleapis.com/LocalInventory\x12\x43\x61\x63\x63ounts/{account}/products/{product}/localInventories/{store_code}B\x0f\n\r_availabilityB\x0b\n\t_quantityB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\x1b\n\x19_instore_product_location\"\x87\x01\n\x1bListLocalInventoriesRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/LocalInventory\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8f\x01\n\x1cListLocalInventoriesResponse\x12V\n\x11local_inventories\x18\x01 \x03(\x0b\x32;.google.shopping.merchant.inventories.v1beta.LocalInventory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbb\x01\n\x1bInsertLocalInventoryRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/LocalInventory\x12Y\n\x0flocal_inventory\x18\x02 \x01(\x0b\x32;.google.shopping.merchant.inventories.v1beta.LocalInventoryB\x03\xe0\x41\x02\"^\n\x1b\x44\x65leteLocalInventoryRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/LocalInventory2\xb8\x06\n\x15LocalInventoryService\x12\x81\x02\n\x14ListLocalInventories\x12H.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest\x1aI.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/inventories/v1beta/{parent=accounts/*/products/*}/localInventories\x12\x82\x02\n\x14InsertLocalInventory\x12H.google.shopping.merchant.inventories.v1beta.InsertLocalInventoryRequest\x1a;.google.shopping.merchant.inventories.v1beta.LocalInventory\"c\x82\xd3\xe4\x93\x02]\"J/inventories/v1beta/{parent=accounts/*/products/*}/localInventories:insert:\x0flocal_inventory\x12\xcc\x01\n\x14\x44\x65leteLocalInventory\x12H.google.shopping.merchant.inventories.v1beta.DeleteLocalInventoryRequest\x1a\x16.google.protobuf.Empty\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45*C/inventories/v1beta/{name=accounts/*/products/*/localInventories/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xef\x01\n/com.google.shopping.merchant.inventories.v1betaB\x13LocalInventoryProtoP\x01ZWcloud.google.com/go/shopping/merchant/inventories/apiv1beta/inventoriespb;inventoriespb\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + LocalInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.LocalInventory").msgclass + ListLocalInventoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest").msgclass + ListLocalInventoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListLocalInventoriesResponse").msgclass + InsertLocalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.InsertLocalInventoryRequest").msgclass + DeleteLocalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.DeleteLocalInventoryRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb new file mode 100644 index 000000000000..03e3fbf6b7eb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb @@ -0,0 +1,68 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/inventories/v1beta/localinventory.proto for package 'google.shopping.merchant.inventories.v1beta' +# 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/shopping/merchant/inventories/v1beta/localinventory_pb' + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module LocalInventoryService + # Service to manage local inventory for products + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.inventories.v1beta.LocalInventoryService' + + # Lists the `LocalInventory` resources for the given product in your merchant + # account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be used + # to obtain additional results. + # + # `LocalInventory` resources are listed per product for a given account. + rpc :ListLocalInventories, ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest, ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse + # Inserts a `LocalInventory` resource to a product in your merchant + # account. + # + # Replaces the full `LocalInventory` resource if an entry with the same + # [`storeCode`][google.shopping.merchant.inventories.v1beta.LocalInventory.store_code] + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `LocalInventory` + # resource to appear in products. + rpc :InsertLocalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest, ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory + # Deletes the specified `LocalInventory` from the given product in your + # merchant account. It might take a up to an hour for the + # `LocalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + rpc :DeleteLocalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb new file mode 100644 index 000000000000..60e52ac9c336 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_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/shopping/merchant/inventories/v1beta/version" + +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/client" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + ## + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/inventories/v1beta/regional_inventory_service" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new + # + module RegionalInventoryService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "regional_inventory_service", "helpers.rb" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb new file mode 100644 index 000000000000..e5bcee5cc83f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb @@ -0,0 +1,711 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/inventories/v1beta/regionalinventory_pb" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module RegionalInventoryService + ## + # Client for the RegionalInventoryService service. + # + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :regional_inventory_service_stub + + ## + # Configure the RegionalInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RegionalInventoryService clients + # ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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", "Shopping", "Merchant", "Inventories", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RegionalInventoryService 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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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 + @regional_inventory_service_stub.universe_domain + end + + ## + # Create a new RegionalInventoryService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RegionalInventoryService 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/shopping/merchant/inventories/v1beta/regionalinventory_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 + + @regional_inventory_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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 + ) + + @regional_inventory_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 + @regional_inventory_service_stub.logger + end + + # Service calls + + ## + # Lists the `RegionalInventory` resources for the given product in your + # merchant account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be + # used to obtain additional results. + # + # `RegionalInventory` resources are listed per product for a given account. + # + # @overload list_regional_inventories(request, options = nil) + # Pass arguments to `list_regional_inventories` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_regional_inventories(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_regional_inventories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 parent product to list `RegionalInventory` + # resources for. Format: `accounts/{account}/products/{product}` + # @param page_size [::Integer] + # The maximum number of `RegionalInventory` resources for the given product + # to return. The service returns fewer than this value if the number of + # inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 100000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum. + # @param page_token [::String] + # A page token, received from a previous `ListRegionalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegionalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new + # + # # Call the list_regional_inventories method. + # result = client.list_regional_inventories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. + # p item + # end + # + def list_regional_inventories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_regional_inventories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_regional_inventories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_regional_inventories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.call_rpc :list_regional_inventories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @regional_inventory_service_stub, :list_regional_inventories, 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 + + ## + # Inserts a `RegionalInventory` to a given product in your + # merchant account. + # + # Replaces the full `RegionalInventory` resource if an entry with the same + # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory#region `region`} + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `RegionalInventory` + # resource to appear in products. + # + # @overload insert_regional_inventory(request, options = nil) + # Pass arguments to `insert_regional_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_regional_inventory(parent: nil, regional_inventory: nil) + # Pass arguments to `insert_regional_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @param regional_inventory [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory, ::Hash] + # Required. Regional inventory information to add to the product. If the + # product already has a `RegionalInventory` resource for the same `region`, + # full replacement of the `RegionalInventory` resource is performed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new + # + # # Call the insert_regional_inventory method. + # result = client.insert_regional_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. + # p result + # + def insert_regional_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_regional_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_regional_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_regional_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.call_rpc :insert_regional_inventory, request, 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 `RegionalInventory` resource from the given product + # in your merchant account. It might take up to an hour for the + # `RegionalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + # + # @overload delete_regional_inventory(request, options = nil) + # Pass arguments to `delete_regional_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_regional_inventory(name: nil) + # Pass arguments to `delete_regional_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `RegionalInventory` resource to delete. + # Format: + # `accounts/{account}/products/{product}/regionalInventories/{region}` + # + # @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/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new + # + # # Call the delete_regional_inventory method. + # result = client.delete_regional_inventory request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_regional_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_regional_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_regional_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_regional_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.call_rpc :delete_regional_inventory, request, 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 RegionalInventoryService API. + # + # This class represents the configuration for RegionalInventoryService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_regional_inventories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_regional_inventories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_regional_inventories.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 RegionalInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_regional_inventories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_regional_inventories + ## + # RPC-specific configuration for `insert_regional_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_regional_inventory + ## + # RPC-specific configuration for `delete_regional_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_regional_inventory + + # @private + def initialize parent_rpcs = nil + list_regional_inventories_config = parent_rpcs.list_regional_inventories if parent_rpcs.respond_to? :list_regional_inventories + @list_regional_inventories = ::Gapic::Config::Method.new list_regional_inventories_config + insert_regional_inventory_config = parent_rpcs.insert_regional_inventory if parent_rpcs.respond_to? :insert_regional_inventory + @insert_regional_inventory = ::Gapic::Config::Method.new insert_regional_inventory_config + delete_regional_inventory_config = parent_rpcs.delete_regional_inventory if parent_rpcs.respond_to? :delete_regional_inventory + @delete_regional_inventory = ::Gapic::Config::Method.new delete_regional_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb new file mode 100644 index 000000000000..6b325f84dd88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_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 Shopping + module Merchant + module Inventories + module V1beta + module RegionalInventoryService + # Credentials for the RegionalInventoryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb new file mode 100644 index 000000000000..7bf0b753a5f1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.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 Shopping + module Merchant + module Inventories + module V1beta + module RegionalInventoryService + # Path helper methods for the RegionalInventoryService API. + module Paths + ## + # Create a fully-qualified Product resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}` + # + # @param account [String] + # @param product [String] + # + # @return [::String] + def product_path account:, product: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/products/#{product}" + end + + ## + # Create a fully-qualified RegionalInventory resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}/regionalInventories/{region}` + # + # @param account [String] + # @param product [String] + # @param region [String] + # + # @return [::String] + def regional_inventory_path account:, product:, region: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" + + "accounts/#{account}/products/#{product}/regionalInventories/#{region}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb new file mode 100644 index 000000000000..d5a20afca8a0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_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/shopping/merchant/inventories/v1beta/version" + +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + ## + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new + # + module RegionalInventoryService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb new file mode 100644 index 000000000000..28671ee52fb4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb @@ -0,0 +1,647 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/inventories/v1beta/regionalinventory_pb" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module RegionalInventoryService + module Rest + ## + # REST client for the RegionalInventoryService service. + # + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :regional_inventory_service_stub + + ## + # Configure the RegionalInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RegionalInventoryService clients + # ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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", "Shopping", "Merchant", "Inventories", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RegionalInventoryService 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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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 + @regional_inventory_service_stub.universe_domain + end + + ## + # Create a new RegionalInventoryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RegionalInventoryService 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 + + @regional_inventory_service_stub = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @regional_inventory_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 + @regional_inventory_service_stub.logger + end + + # Service calls + + ## + # Lists the `RegionalInventory` resources for the given product in your + # merchant account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be + # used to obtain additional results. + # + # `RegionalInventory` resources are listed per product for a given account. + # + # @overload list_regional_inventories(request, options = nil) + # Pass arguments to `list_regional_inventories` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_regional_inventories(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_regional_inventories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 parent product to list `RegionalInventory` + # resources for. Format: `accounts/{account}/products/{product}` + # @param page_size [::Integer] + # The maximum number of `RegionalInventory` resources for the given product + # to return. The service returns fewer than this value if the number of + # inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 100000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum. + # @param page_token [::String] + # A page token, received from a previous `ListRegionalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegionalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new + # + # # Call the list_regional_inventories method. + # result = client.list_regional_inventories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. + # p item + # end + # + def list_regional_inventories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_regional_inventories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_regional_inventories.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_regional_inventories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.list_regional_inventories request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @regional_inventory_service_stub, :list_regional_inventories, "regional_inventories", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inserts a `RegionalInventory` to a given product in your + # merchant account. + # + # Replaces the full `RegionalInventory` resource if an entry with the same + # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory#region `region`} + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `RegionalInventory` + # resource to appear in products. + # + # @overload insert_regional_inventory(request, options = nil) + # Pass arguments to `insert_regional_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_regional_inventory(parent: nil, regional_inventory: nil) + # Pass arguments to `insert_regional_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @param regional_inventory [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory, ::Hash] + # Required. Regional inventory information to add to the product. If the + # product already has a `RegionalInventory` resource for the same `region`, + # full replacement of the `RegionalInventory` resource is performed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new + # + # # Call the insert_regional_inventory method. + # result = client.insert_regional_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. + # p result + # + def insert_regional_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_regional_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_regional_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_regional_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.insert_regional_inventory request, 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 `RegionalInventory` resource from the given product + # in your merchant account. It might take up to an hour for the + # `RegionalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + # + # @overload delete_regional_inventory(request, options = nil) + # Pass arguments to `delete_regional_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_regional_inventory(name: nil) + # Pass arguments to `delete_regional_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `RegionalInventory` resource to delete. + # Format: + # `accounts/{account}/products/{product}/regionalInventories/{region}` + # @yield [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/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new + # + # # Call the delete_regional_inventory method. + # result = client.delete_regional_inventory request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_regional_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_regional_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_regional_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_regional_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.delete_regional_inventory request, 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 RegionalInventoryService REST API. + # + # This class represents the configuration for RegionalInventoryService 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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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_regional_inventories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_regional_inventories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_regional_inventories.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 RegionalInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_regional_inventories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_regional_inventories + ## + # RPC-specific configuration for `insert_regional_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_regional_inventory + ## + # RPC-specific configuration for `delete_regional_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_regional_inventory + + # @private + def initialize parent_rpcs = nil + list_regional_inventories_config = parent_rpcs.list_regional_inventories if parent_rpcs.respond_to? :list_regional_inventories + @list_regional_inventories = ::Gapic::Config::Method.new list_regional_inventories_config + insert_regional_inventory_config = parent_rpcs.insert_regional_inventory if parent_rpcs.respond_to? :insert_regional_inventory + @insert_regional_inventory = ::Gapic::Config::Method.new insert_regional_inventory_config + delete_regional_inventory_config = parent_rpcs.delete_regional_inventory if parent_rpcs.respond_to? :delete_regional_inventory + @delete_regional_inventory = ::Gapic::Config::Method.new delete_regional_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb new file mode 100644 index 000000000000..937cc49a5f70 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb @@ -0,0 +1,267 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module RegionalInventoryService + module Rest + ## + # REST service stub for the RegionalInventoryService 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_regional_inventories REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse] + # A result object deserialized from the server's reply + def list_regional_inventories request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_regional_inventories_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_regional_inventories", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the insert_regional_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] + # A result object deserialized from the server's reply + def insert_regional_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_regional_inventory_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "insert_regional_inventory", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory.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_regional_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_regional_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_regional_inventory_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_regional_inventory", + 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_regional_inventories REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_regional_inventories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/inventories/v1beta/{parent}/regionalInventories", + matches: [ + ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_regional_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_regional_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/inventories/v1beta/{parent}/regionalInventories:insert", + body: "regional_inventory", + matches: [ + ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_regional_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_regional_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/inventories/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/products/[^/]+/regionalInventories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb new file mode 100644 index 000000000000..a1648d390335 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/inventories/v1beta/regionalinventory.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/shopping/type/types_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\nCgoogle/shopping/merchant/inventories/v1beta/regionalinventory.proto\x12+google.shopping.merchant.inventories.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\xd0\x03\n\x11RegionalInventory\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\x06region\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12*\n\x05price\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12/\n\nsale_price\x18\x05 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x38\n\x19sale_price_effective_date\x18\x06 \x01(\x0b\x32\x15.google.type.Interval\x12\x19\n\x0c\x61vailability\x18\x07 \x01(\tH\x00\x88\x01\x01\x12@\n\x11\x63ustom_attributes\x18\x08 \x03(\x0b\x32%.google.shopping.type.CustomAttribute:u\xea\x41r\n,merchantapi.googleapis.com/RegionalInventory\x12\x42\x61\x63\x63ounts/{account}/products/{product}/regionalInventories/{region}B\x0f\n\r_availability\"\x8d\x01\n\x1eListRegionalInventoriesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,merchantapi.googleapis.com/RegionalInventory\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x98\x01\n\x1fListRegionalInventoriesResponse\x12\\\n\x14regional_inventories\x18\x01 \x03(\x0b\x32>.google.shopping.merchant.inventories.v1beta.RegionalInventory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc7\x01\n\x1eInsertRegionalInventoryRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,merchantapi.googleapis.com/RegionalInventory\x12_\n\x12regional_inventory\x18\x02 \x01(\x0b\x32>.google.shopping.merchant.inventories.v1beta.RegionalInventoryB\x03\xe0\x41\x02\"d\n\x1e\x44\x65leteRegionalInventoryRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,merchantapi.googleapis.com/RegionalInventory2\xdf\x06\n\x18RegionalInventoryService\x12\x8d\x02\n\x17ListRegionalInventories\x12K.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest\x1aL.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/inventories/v1beta/{parent=accounts/*/products/*}/regionalInventories\x12\x91\x02\n\x17InsertRegionalInventory\x12K.google.shopping.merchant.inventories.v1beta.InsertRegionalInventoryRequest\x1a>.google.shopping.merchant.inventories.v1beta.RegionalInventory\"i\x82\xd3\xe4\x93\x02\x63\"M/inventories/v1beta/{parent=accounts/*/products/*}/regionalInventories:insert:\x12regional_inventory\x12\xd5\x01\n\x17\x44\x65leteRegionalInventory\x12K.google.shopping.merchant.inventories.v1beta.DeleteRegionalInventoryRequest\x1a\x16.google.protobuf.Empty\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/inventories/v1beta/{name=accounts/*/products/*/regionalInventories/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xa4\x01\n/com.google.shopping.merchant.inventories.v1betaB\x16RegionalInventoryProtoP\x01ZWcloud.google.com/go/shopping/merchant/inventories/apiv1beta/inventoriespb;inventoriespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + RegionalInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.RegionalInventory").msgclass + ListRegionalInventoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest").msgclass + ListRegionalInventoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesResponse").msgclass + InsertRegionalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.InsertRegionalInventoryRequest").msgclass + DeleteRegionalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.DeleteRegionalInventoryRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb new file mode 100644 index 000000000000..5dc2aa0b399f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb @@ -0,0 +1,69 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/inventories/v1beta/regionalinventory.proto for package 'google.shopping.merchant.inventories.v1beta' +# 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/shopping/merchant/inventories/v1beta/regionalinventory_pb' + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module RegionalInventoryService + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.inventories.v1beta.RegionalInventoryService' + + # Lists the `RegionalInventory` resources for the given product in your + # merchant account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be + # used to obtain additional results. + # + # `RegionalInventory` resources are listed per product for a given account. + rpc :ListRegionalInventories, ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse + # Inserts a `RegionalInventory` to a given product in your + # merchant account. + # + # Replaces the full `RegionalInventory` resource if an entry with the same + # [`region`][google.shopping.merchant.inventories.v1beta.RegionalInventory.region] + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `RegionalInventory` + # resource to appear in products. + rpc :InsertRegionalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory + # Deletes the specified `RegionalInventory` resource from the given product + # in your merchant account. It might take up to an hour for the + # `RegionalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + rpc :DeleteRegionalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb new file mode 100644 index 000000000000..20bc16586f0d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/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/shopping/merchant/inventories/v1beta/local_inventory_service/rest" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" +require "google/shopping/merchant/inventories/v1beta/version" + +module Google + module Shopping + module Merchant + module Inventories + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/inventories/v1beta/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/version.rb new file mode 100644 index 000000000000..8a8c30474f3c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/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 Shopping + module Merchant + module Inventories + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1BETA 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-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb new file mode 100644 index 000000000000..3b0e147672b0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.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! + + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + # Local inventory information for the product. Represents in-store information + # for a specific product at the store specified by + # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory#store_code `storeCode`}. + # For a list of all accepted attribute values, see the [local product inventory + # data specification](https://support.google.com/merchants/answer/3061342). + # @!attribute [r] name + # @return [::String] + # Output only. The name of the `LocalInventory` resource. + # Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # @!attribute [r] account + # @return [::Integer] + # Output only. The account that owns the product. This field will be ignored + # if set by the client. + # @!attribute [rw] store_code + # @return [::String] + # Required. Immutable. Store code (the store ID from your Business Profile) + # of the physical store the product is sold in. See the [Local product + # inventory data + # specification](https://support.google.com/merchants/answer/3061342) for + # more information. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Price of the product at this store. + # @!attribute [rw] sale_price + # @return [::Google::Shopping::Type::Price] + # Sale price of the product at this store. Mandatory if + # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory#sale_price_effective_date `salePriceEffectiveDate`} + # is defined. + # @!attribute [rw] sale_price_effective_date + # @return [::Google::Type::Interval] + # The `TimePeriod` of the + # sale at this store. + # @!attribute [rw] availability + # @return [::String] + # Availability of the product at this store. + # For accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342) + # @!attribute [rw] quantity + # @return [::Integer] + # Quantity of the product available at this store. Must be greater than or + # equal to zero. + # @!attribute [rw] pickup_method + # @return [::String] + # Supported pickup method for this product. Unless the value is `"not + # supported"`, this field must be submitted together with + # `pickupSla`. + # For accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342) + # @!attribute [rw] pickup_sla + # @return [::String] + # Relative time period from the order date for an order for this product, + # from this store, to be ready for pickup. Must be submitted with + # `pickupMethod`. + # For accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342) + # @!attribute [rw] instore_product_location + # @return [::String] + # Location of the product inside the store. Maximum length is 20 bytes. + # @!attribute [rw] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # A list of custom (merchant-provided) attributes. You can also use + # `CustomAttribute` to submit any attribute of the data specification in its + # generic form. + class LocalInventory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListLocalInventories` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The `name` of the parent product to list local inventories for. + # Format: + # `accounts/{account}/products/{product}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of `LocalInventory` resources for the given + # product to return. The service returns fewer than this value if the number + # of inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 25000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListLocalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListLocalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListLocalInventoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListLocalInventories` method. + # @!attribute [rw] local_inventories + # @return [::Array<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] + # The `LocalInventory` resources for the given product from the specified + # account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListLocalInventoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertLocalInventory` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @!attribute [rw] local_inventory + # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] + # Required. Local inventory information of the product. If the product + # already has a `LocalInventory` resource for the same `storeCode`, full + # replacement of the `LocalInventory` resource is performed. + class InsertLocalInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteLocalInventory` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the local inventory for the given product to delete. + # Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + class DeleteLocalInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb new file mode 100644 index 000000000000..2805f45ead59 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + # Regional inventory information for the product. Represents specific + # information like price and availability for a given product in a specific + # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory#region `region`}. + # For a list of all accepted attribute values, see the [regional product + # inventory data + # specification](https://support.google.com/merchants/answer/9698880). + # @!attribute [r] name + # @return [::String] + # Output only. The name of the `RegionalInventory` resource. + # Format: + # `{regional_inventory.name=accounts/{account}/products/{product}/regionalInventories/{region}` + # @!attribute [r] account + # @return [::Integer] + # Output only. The account that owns the product. This field will be ignored + # if set by the client. + # @!attribute [rw] region + # @return [::String] + # Required. Immutable. ID of the region for this + # `RegionalInventory` resource. See the [Regional availability and + # pricing](https://support.google.com/merchants/answer/9698880) for more + # details. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Price of the product in this region. + # @!attribute [rw] sale_price + # @return [::Google::Shopping::Type::Price] + # Sale price of the product in this region. Mandatory if + # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory#sale_price_effective_date `salePriceEffectiveDate`} + # is defined. + # @!attribute [rw] sale_price_effective_date + # @return [::Google::Type::Interval] + # The `TimePeriod` of the + # sale price in this region. + # @!attribute [rw] availability + # @return [::String] + # Availability of the product in this region. + # For accepted attribute values, see the [regional product inventory data + # specification](https://support.google.com/merchants/answer/3061342) + # @!attribute [rw] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # A list of custom (merchant-provided) attributes. You can also use + # `CustomAttribute` to submit any attribute of the data specification in its + # generic form. + class RegionalInventory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListRegionalInventories` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The `name` of the parent product to list `RegionalInventory` + # resources for. Format: `accounts/{account}/products/{product}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of `RegionalInventory` resources for the given product + # to return. The service returns fewer than this value if the number of + # inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 100000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListRegionalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegionalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListRegionalInventoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListRegionalInventories` method. + # @!attribute [rw] regional_inventories + # @return [::Array<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] + # The `RegionalInventory` resources for the given product from the specified + # account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRegionalInventoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertRegionalInventory` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @!attribute [rw] regional_inventory + # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] + # Required. Regional inventory information to add to the product. If the + # product already has a `RegionalInventory` resource for the same `region`, + # full replacement of the `RegionalInventory` resource is performed. + class InsertRegionalInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteRegionalInventory` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the `RegionalInventory` resource to delete. + # Format: + # `accounts/{account}/products/{product}/regionalInventories/{region}` + class DeleteRegionalInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.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! + + +module Google + module Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + + # Youtube shopping checkout. + YOUTUBE_SHOPPING_CHECKOUT = 7 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 8 + + # [Free vehicle + # listings](https://support.google.com/merchants/answer/11189169). + FREE_VEHICLE_LISTINGS = 9 + + # [Vehicle ads](https://support.google.com/merchants/answer/11189169). + VEHICLE_ADS = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free product listings on UCP + # checkout](https://developers.google.com/merchant/ucp). + FREE_LISTINGS_UCP_CHECKOUT = 19 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 18 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + + # [Product + # Reviews](https://support.google.com/merchants/answer/14620732). + PRODUCT_REVIEWS = 15 + + # [Merchant + # Reviews](https://developers.google.com/merchant-review-feeds). + MERCHANT_REVIEWS = 16 + + # YouTube Checkout + # . + YOUTUBE_CHECKOUT = 17 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..9350ca479005 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a time interval, encoded as a Timestamp start (inclusive) and a + # Timestamp end (exclusive). + # + # The start must be less than or equal to the end. + # When the start equals the end, the interval is empty (matches no time). + # When both start and end are unspecified, the interval matches any time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Inclusive start of the interval. + # + # If specified, a Timestamp matching this interval will have to be the same + # or after the start. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Exclusive end of the interval. + # + # If specified, a Timestamp matching this interval will have to be before the + # end. + class Interval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..9ce4a0148204 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta", path: "../" +else + gem "google-shopping-merchant-inventories-v1beta" +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-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb new file mode 100644 index 000000000000..e7b122806611 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LocalInventoryService_DeleteLocalInventory_sync] +require "google/shopping/merchant/inventories/v1beta" + +## +# Snippet for the delete_local_inventory call in the LocalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#delete_local_inventory. +# +def delete_local_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new + + # Call the delete_local_inventory method. + result = client.delete_local_inventory request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_LocalInventoryService_DeleteLocalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb new file mode 100644 index 000000000000..3a5429e00076 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LocalInventoryService_InsertLocalInventory_sync] +require "google/shopping/merchant/inventories/v1beta" + +## +# Snippet for the insert_local_inventory call in the LocalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#insert_local_inventory. +# +def insert_local_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new + + # Call the insert_local_inventory method. + result = client.insert_local_inventory request + + # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. + p result +end +# [END merchantapi_v1beta_generated_LocalInventoryService_InsertLocalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb new file mode 100644 index 000000000000..9601f90a357d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.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 merchantapi_v1beta_generated_LocalInventoryService_ListLocalInventories_sync] +require "google/shopping/merchant/inventories/v1beta" + +## +# Snippet for the list_local_inventories call in the LocalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#list_local_inventories. +# +def list_local_inventories + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new + + # Call the list_local_inventories method. + result = client.list_local_inventories request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. + p item + end +end +# [END merchantapi_v1beta_generated_LocalInventoryService_ListLocalInventories_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb new file mode 100644 index 000000000000..32b256d4226d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_RegionalInventoryService_DeleteRegionalInventory_sync] +require "google/shopping/merchant/inventories/v1beta" + +## +# Snippet for the delete_regional_inventory call in the RegionalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#delete_regional_inventory. +# +def delete_regional_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new + + # Call the delete_regional_inventory method. + result = client.delete_regional_inventory request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_RegionalInventoryService_DeleteRegionalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb new file mode 100644 index 000000000000..4b16a1a36f11 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_RegionalInventoryService_InsertRegionalInventory_sync] +require "google/shopping/merchant/inventories/v1beta" + +## +# Snippet for the insert_regional_inventory call in the RegionalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#insert_regional_inventory. +# +def insert_regional_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new + + # Call the insert_regional_inventory method. + result = client.insert_regional_inventory request + + # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. + p result +end +# [END merchantapi_v1beta_generated_RegionalInventoryService_InsertRegionalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb new file mode 100644 index 000000000000..3dee934a1f78 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.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 merchantapi_v1beta_generated_RegionalInventoryService_ListRegionalInventories_sync] +require "google/shopping/merchant/inventories/v1beta" + +## +# Snippet for the list_regional_inventories call in the RegionalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#list_regional_inventories. +# +def list_regional_inventories + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new + + # Call the list_regional_inventories method. + result = client.list_regional_inventories request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. + p item + end +end +# [END merchantapi_v1beta_generated_RegionalInventoryService_ListRegionalInventories_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/snippet_metadata_google.shopping.merchant.inventories.v1beta.json b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/snippet_metadata_google.shopping.merchant.inventories.v1beta.json new file mode 100644 index 000000000000..01d13ac306c5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/snippet_metadata_google.shopping.merchant.inventories.v1beta.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-shopping-merchant-inventories-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.inventories.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_LocalInventoryService_ListLocalInventories_sync", + "title": "Snippet for the list_local_inventories call in the LocalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#list_local_inventories.", + "file": "local_inventory_service/list_local_inventories.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_local_inventories", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#list_local_inventories", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse", + "client": { + "short_name": "LocalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client" + }, + "method": { + "short_name": "ListLocalInventories", + "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService.ListLocalInventories", + "service": { + "short_name": "LocalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LocalInventoryService_InsertLocalInventory_sync", + "title": "Snippet for the insert_local_inventory call in the LocalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#insert_local_inventory.", + "file": "local_inventory_service/insert_local_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_local_inventory", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#insert_local_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory", + "client": { + "short_name": "LocalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client" + }, + "method": { + "short_name": "InsertLocalInventory", + "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService.InsertLocalInventory", + "service": { + "short_name": "LocalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LocalInventoryService_DeleteLocalInventory_sync", + "title": "Snippet for the delete_local_inventory call in the LocalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#delete_local_inventory.", + "file": "local_inventory_service/delete_local_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_local_inventory", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#delete_local_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "LocalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client" + }, + "method": { + "short_name": "DeleteLocalInventory", + "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService.DeleteLocalInventory", + "service": { + "short_name": "LocalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_RegionalInventoryService_ListRegionalInventories_sync", + "title": "Snippet for the list_regional_inventories call in the RegionalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#list_regional_inventories.", + "file": "regional_inventory_service/list_regional_inventories.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_regional_inventories", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#list_regional_inventories", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse", + "client": { + "short_name": "RegionalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client" + }, + "method": { + "short_name": "ListRegionalInventories", + "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService.ListRegionalInventories", + "service": { + "short_name": "RegionalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_RegionalInventoryService_InsertRegionalInventory_sync", + "title": "Snippet for the insert_regional_inventory call in the RegionalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#insert_regional_inventory.", + "file": "regional_inventory_service/insert_regional_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_regional_inventory", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#insert_regional_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory", + "client": { + "short_name": "RegionalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client" + }, + "method": { + "short_name": "InsertRegionalInventory", + "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService.InsertRegionalInventory", + "service": { + "short_name": "RegionalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_RegionalInventoryService_DeleteRegionalInventory_sync", + "title": "Snippet for the delete_regional_inventory call in the RegionalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#delete_regional_inventory.", + "file": "regional_inventory_service/delete_regional_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_regional_inventory", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#delete_regional_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RegionalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client" + }, + "method": { + "short_name": "DeleteRegionalInventory", + "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService.DeleteRegionalInventory", + "service": { + "short_name": "RegionalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService" + } + } + }, + "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-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb new file mode 100644 index 000000000000..3f4c12db7010 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_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/shopping/merchant/inventories/v1beta/local_inventory_service" + +class ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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_local_inventory_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.local_inventory_path account: "value0", product: "value1", store_code: "value2" + assert_equal "accounts/value0/products/value1/localInventories/value2", 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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_path account: "value0", product: "value1" + assert_equal "accounts/value0/products/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb new file mode 100644 index 000000000000..0639195f339f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/inventories/v1beta/localinventory_pb" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" + + +class ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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_local_inventories + # Create test objects. + client_result = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse.new + http_response = OpenStruct.new 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_local_inventories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ServiceStub.stub :transcode_list_local_inventories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_local_inventories_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_local_inventories({ 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_local_inventories 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_local_inventories ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.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_local_inventories({ 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_local_inventories(::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.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_local_inventories_client_stub.call_count + end + end + end + + def test_insert_local_inventory + # Create test objects. + client_result = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + local_inventory = {} + + insert_local_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ServiceStub.stub :transcode_insert_local_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_local_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_local_inventory parent: parent, local_inventory: local_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_local_inventory ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_local_inventory(::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_local_inventory_client_stub.call_count + end + end + end + + def test_delete_local_inventory + # 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_local_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ServiceStub.stub :transcode_delete_local_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_local_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_local_inventory({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_local_inventory name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_local_inventory ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_local_inventory({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_local_inventory(::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_local_inventory_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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb new file mode 100644 index 000000000000..72d4dfaebd38 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb @@ -0,0 +1,289 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/inventories/v1beta/localinventory_pb" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service" + +class ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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_local_inventories + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_local_inventories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_local_inventories, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest, 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_local_inventories_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_local_inventories({ 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_local_inventories 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_local_inventories ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.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_local_inventories({ 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_local_inventories(::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.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_local_inventories_client_stub.call_rpc_count + end + end + + def test_insert_local_inventory + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + local_inventory = {} + + insert_local_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_local_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory), request["local_inventory"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_local_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_local_inventory parent: parent, local_inventory: local_inventory do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_local_inventory ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_local_inventory(::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_local_inventory_client_stub.call_rpc_count + end + end + + def test_delete_local_inventory + # 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_local_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_local_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_local_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_local_inventory({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_local_inventory name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_local_inventory ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_local_inventory({ 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_local_inventory(::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new(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_local_inventory_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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb new file mode 100644 index 000000000000..61b5b82c9f55 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_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/shopping/merchant/inventories/v1beta/regional_inventory_service" + +class ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_path account: "value0", product: "value1" + assert_equal "accounts/value0/products/value1", path + end + end + + def test_regional_inventory_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.regional_inventory_path account: "value0", product: "value1", region: "value2" + assert_equal "accounts/value0/products/value1/regionalInventories/value2", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb new file mode 100644 index 000000000000..c2134ab529a9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" + + +class ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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_regional_inventories + # Create test objects. + client_result = ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse.new + http_response = OpenStruct.new 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_regional_inventories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ServiceStub.stub :transcode_list_regional_inventories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_regional_inventories_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_regional_inventories({ 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_regional_inventories 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_regional_inventories ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.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_regional_inventories({ 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_regional_inventories(::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.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_regional_inventories_client_stub.call_count + end + end + end + + def test_insert_regional_inventory + # Create test objects. + client_result = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + regional_inventory = {} + + insert_regional_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ServiceStub.stub :transcode_insert_regional_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_regional_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_regional_inventory ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_regional_inventory(::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_regional_inventory_client_stub.call_count + end + end + end + + def test_delete_regional_inventory + # 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_regional_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ServiceStub.stub :transcode_delete_regional_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_regional_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_regional_inventory({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_regional_inventory name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_regional_inventory ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_regional_inventory({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_regional_inventory(::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_regional_inventory_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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb new file mode 100644 index 000000000000..45daeee675cf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb @@ -0,0 +1,289 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service" + +class ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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_regional_inventories + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_regional_inventories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_regional_inventories, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, 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_regional_inventories_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_regional_inventories({ 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_regional_inventories 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_regional_inventories ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.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_regional_inventories({ 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_regional_inventories(::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.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_regional_inventories_client_stub.call_rpc_count + end + end + + def test_insert_regional_inventory + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + regional_inventory = {} + + insert_regional_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_regional_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory), request["regional_inventory"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_regional_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_regional_inventory ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_regional_inventory(::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_regional_inventory_client_stub.call_rpc_count + end + end + + def test_delete_regional_inventory + # 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_regional_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_regional_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_regional_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_regional_inventory({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_regional_inventory name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_regional_inventory ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_regional_inventory({ 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_regional_inventory(::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new(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_regional_inventory_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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-issue_resolution-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.repo-metadata.json new file mode 100644 index 000000000000..da9940c8e517 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1", + "distribution_name": "google-shopping-merchant-issue_resolution-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-issue_resolution-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-issue_resolution instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.rubocop.yml new file mode 100644 index 000000000000..a2db5e5debad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant 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-shopping-merchant-issue_resolution-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..749157ece9a1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-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/shopping/merchant/issue_resolution/v1" + +client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/issue_resolution/v1" + +::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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-shopping-merchant-issue_resolution-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/shopping/merchant/issue_resolution/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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-shopping-merchant-issue_resolution-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/README.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/README.md new file mode 100644 index 000000000000..5bd7d1dc69b9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-issue_resolution](https://rubygems.org/gems/google-shopping-merchant-issue_resolution). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-issue_resolution-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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/issue_resolution/v1" + +client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new +request = ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new # (request fields as keyword arguments...) +response = client.list_aggregate_product_statuses request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/issue_resolution/v1" +require "logger" + +client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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-shopping-merchant-issue_resolution`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution`. +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-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/Rakefile new file mode 100644 index 000000000000..c643d0d27ffe --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-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/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials" + ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-issue_resolution-v1" + header "google-shopping-merchant-issue_resolution-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-issue_resolution-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/gapic_metadata.json new file mode 100644 index 000000000000..8437b573864b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-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.shopping.merchant.issueresolution.v1", + "libraryPackage": "::Google::Shopping::Merchant::IssueResolution::V1", + "services": { + "AggregateProductStatusesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client", + "rpcs": { + "ListAggregateProductStatuses": { + "methods": [ + "list_aggregate_product_statuses" + ] + } + } + } + } + }, + "IssueResolutionService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client", + "rpcs": { + "RenderAccountIssues": { + "methods": [ + "render_account_issues" + ] + }, + "RenderProductIssues": { + "methods": [ + "render_product_issues" + ] + }, + "TriggerAction": { + "methods": [ + "trigger_action" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/google-shopping-merchant-issue_resolution-v1.gemspec b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/google-shopping-merchant-issue_resolution-v1.gemspec new file mode 100644 index 000000000000..e0a1b2a64d82 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/google-shopping-merchant-issue_resolution-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/issue_resolution/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-issue_resolution-v1" + gem.version = Google::Shopping::Merchant::IssueResolution::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-issue_resolution-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-issue_resolution instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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-shopping-type", "~> 1.0" +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google-shopping-merchant-issue_resolution-v1.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google-shopping-merchant-issue_resolution-v1.rb new file mode 100644 index 000000000000..6e64c6764bf8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google-shopping-merchant-issue_resolution-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/shopping/merchant/issue_resolution/v1" diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1.rb new file mode 100644 index 000000000000..1171cdfc1154 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1.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 "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service" +require "google/shopping/merchant/issue_resolution/v1/version" + +module Google + module Shopping + module Merchant + module IssueResolution + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/issue_resolution/v1" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/issue_resolution/v1" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/issue_resolution/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service.rb new file mode 100644 index 000000000000..4d09bb58c2b1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/issue_resolution/v1/version" + +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/client" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + ## + # Service to manage aggregate product statuses. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new + # + module AggregateProductStatusesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "aggregate_product_statuses_service", "helpers.rb" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/client.rb new file mode 100644 index 000000000000..1f8fcff62871 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/client.rb @@ -0,0 +1,508 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + module AggregateProductStatusesService + ## + # Client for the AggregateProductStatusesService service. + # + # Service to manage aggregate product statuses. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :aggregate_product_statuses_service_stub + + ## + # Configure the AggregateProductStatusesService Client class. + # + # See {::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AggregateProductStatusesService clients + # ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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", "Shopping", "Merchant", "IssueResolution", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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 + @aggregate_product_statuses_service_stub.universe_domain + end + + ## + # Create a new AggregateProductStatusesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AggregateProductStatusesService 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/shopping/merchant/issueresolution/v1/aggregateproductstatuses_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 + + @aggregate_product_statuses_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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 + ) + + @aggregate_product_statuses_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 + @aggregate_product_statuses_service_stub.logger + end + + # Service calls + + ## + # Lists the `AggregateProductStatuses` resources for your merchant account. + # The response might contain fewer items than specified by `pageSize`. + # If `pageToken` was returned in previous request, it can be used to obtain + # additional results. + # + # @overload list_aggregate_product_statuses(request, options = nil) + # Pass arguments to `list_aggregate_product_statuses` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_aggregate_product_statuses(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_aggregate_product_statuses` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list aggregate product statuses for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of aggregate product statuses to return. The + # service may return fewer than this value. If unspecified, at most 25 + # aggregate product statuses are returned. The maximum value is 250; values + # above 250 are coerced to 250. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListAggregateProductStatuses` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAggregateProductStatuses` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. A filter expression that filters the aggregate product statuses. + # Filtering is only supported by the `reporting_context` and `country` field. + # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new + # + # # Call the list_aggregate_product_statuses method. + # result = client.list_aggregate_product_statuses request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus. + # p item + # end + # + def list_aggregate_product_statuses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_aggregate_product_statuses.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_aggregate_product_statuses.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_aggregate_product_statuses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aggregate_product_statuses_service_stub.call_rpc :list_aggregate_product_statuses, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @aggregate_product_statuses_service_stub, :list_aggregate_product_statuses, 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 AggregateProductStatusesService API. + # + # This class represents the configuration for AggregateProductStatusesService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_aggregate_product_statuses to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AggregateProductStatusesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_aggregate_product_statuses` + # @return [::Gapic::Config::Method] + # + attr_reader :list_aggregate_product_statuses + + # @private + def initialize parent_rpcs = nil + list_aggregate_product_statuses_config = parent_rpcs.list_aggregate_product_statuses if parent_rpcs.respond_to? :list_aggregate_product_statuses + @list_aggregate_product_statuses = ::Gapic::Config::Method.new list_aggregate_product_statuses_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials.rb new file mode 100644 index 000000000000..72927c4b88ee --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_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 Shopping + module Merchant + module IssueResolution + module V1 + module AggregateProductStatusesService + # Credentials for the AggregateProductStatusesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths.rb new file mode 100644 index 000000000000..7840573c7d65 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths.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 Shopping + module Merchant + module IssueResolution + module V1 + module AggregateProductStatusesService + # Path helper methods for the AggregateProductStatusesService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest.rb new file mode 100644 index 000000000000..f9859d78a59f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_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/shopping/merchant/issue_resolution/v1/version" + +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + ## + # Service to manage aggregate product statuses. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new + # + module AggregateProductStatusesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client.rb new file mode 100644 index 000000000000..935c498c540d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client.rb @@ -0,0 +1,458 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + module AggregateProductStatusesService + module Rest + ## + # REST client for the AggregateProductStatusesService service. + # + # Service to manage aggregate product statuses. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :aggregate_product_statuses_service_stub + + ## + # Configure the AggregateProductStatusesService Client class. + # + # See {::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AggregateProductStatusesService clients + # ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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", "Shopping", "Merchant", "IssueResolution", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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 + @aggregate_product_statuses_service_stub.universe_domain + end + + ## + # Create a new AggregateProductStatusesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AggregateProductStatusesService 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 + + @aggregate_product_statuses_service_stub = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @aggregate_product_statuses_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 + @aggregate_product_statuses_service_stub.logger + end + + # Service calls + + ## + # Lists the `AggregateProductStatuses` resources for your merchant account. + # The response might contain fewer items than specified by `pageSize`. + # If `pageToken` was returned in previous request, it can be used to obtain + # additional results. + # + # @overload list_aggregate_product_statuses(request, options = nil) + # Pass arguments to `list_aggregate_product_statuses` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_aggregate_product_statuses(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_aggregate_product_statuses` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list aggregate product statuses for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of aggregate product statuses to return. The + # service may return fewer than this value. If unspecified, at most 25 + # aggregate product statuses are returned. The maximum value is 250; values + # above 250 are coerced to 250. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListAggregateProductStatuses` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAggregateProductStatuses` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. A filter expression that filters the aggregate product statuses. + # Filtering is only supported by the `reporting_context` and `country` field. + # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new + # + # # Call the list_aggregate_product_statuses method. + # result = client.list_aggregate_product_statuses request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus. + # p item + # end + # + def list_aggregate_product_statuses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_aggregate_product_statuses.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_aggregate_product_statuses.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_aggregate_product_statuses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aggregate_product_statuses_service_stub.list_aggregate_product_statuses request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @aggregate_product_statuses_service_stub, :list_aggregate_product_statuses, "aggregate_product_statuses", request, result, 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 AggregateProductStatusesService REST API. + # + # This class represents the configuration for AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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_aggregate_product_statuses to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AggregateProductStatusesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_aggregate_product_statuses` + # @return [::Gapic::Config::Method] + # + attr_reader :list_aggregate_product_statuses + + # @private + def initialize parent_rpcs = nil + list_aggregate_product_statuses_config = parent_rpcs.list_aggregate_product_statuses if parent_rpcs.respond_to? :list_aggregate_product_statuses + @list_aggregate_product_statuses = ::Gapic::Config::Method.new list_aggregate_product_statuses_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub.rb new file mode 100644 index 000000000000..ea1f2e7ec08d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub.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! + +require "google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + module AggregateProductStatusesService + module Rest + ## + # REST service stub for the AggregateProductStatusesService 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_aggregate_product_statuses REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse] + # A result object deserialized from the server's reply + def list_aggregate_product_statuses request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_aggregate_product_statuses_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_aggregate_product_statuses", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse.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_aggregate_product_statuses REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_aggregate_product_statuses_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/issueresolution/v1/{parent}/aggregateProductStatuses", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service.rb new file mode 100644 index 000000000000..6436c50a147c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_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/shopping/merchant/issue_resolution/v1/version" + +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + ## + # Service to provide an issue resolution content for account issues and product + # issues. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new + # + module IssueResolutionService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "issue_resolution_service", "helpers.rb" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client.rb new file mode 100644 index 000000000000..685bc2aaff8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client.rb @@ -0,0 +1,709 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/issueresolution/v1/issueresolution_pb" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + module IssueResolutionService + ## + # Client for the IssueResolutionService service. + # + # Service to provide an issue resolution content for account issues and product + # issues. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :issue_resolution_service_stub + + ## + # Configure the IssueResolutionService Client class. + # + # See {::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IssueResolutionService clients + # ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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", "Shopping", "Merchant", "IssueResolution", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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 + @issue_resolution_service_stub.universe_domain + end + + ## + # Create a new IssueResolutionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IssueResolutionService 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/shopping/merchant/issueresolution/v1/issueresolution_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 + + @issue_resolution_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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 + ) + + @issue_resolution_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 + @issue_resolution_service_stub.logger + end + + # Service calls + + ## + # Provide a list of business's account issues with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + # + # @overload render_account_issues(request, options = nil) + # Pass arguments to `render_account_issues` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload render_account_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) + # Pass arguments to `render_account_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The account to fetch issues for. + # Format: `accounts/{account}` + # @param language_code [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize issue resolution content. If not set, the result will + # be in default language `en-US`. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload, ::Hash] + # Optional. The payload for configuring how the content should be rendered. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new + # + # # Call the render_account_issues method. + # result = client.render_account_issues request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse. + # p result + # + def render_account_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.render_account_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.render_account_issues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.render_account_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.call_rpc :render_account_issues, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Provide a list of issues for business's product with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + # + # @overload render_product_issues(request, options = nil) + # Pass arguments to `render_product_issues` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload render_product_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) + # Pass arguments to `render_product_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the product to fetch issues for. + # Format: `accounts/{account}/products/{product}` + # @param language_code [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize an issue resolution content. If not set, the result + # will be in default language `en-US`. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload, ::Hash] + # Optional. The payload for configuring how the content should be rendered. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new + # + # # Call the render_product_issues method. + # result = client.render_product_issues request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse. + # p result + # + def render_product_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.render_product_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.render_product_issues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.render_product_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.call_rpc :render_product_issues, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Start an action. The action can be requested by a business in + # third-party application. Before the business can request the action, the + # third-party application needs to show them action specific content and + # display a user input form. + # + # The action can be successfully started only once all `required` inputs are + # provided. If any `required` input is missing, or invalid value was + # provided, the service will return 400 error. Validation errors will contain + # {::Google::Shopping::Merchant::IssueResolution::V1::InputField#id Ids} for all + # problematic field together with translated, human readable error messages + # that can be shown to the user. + # + # @overload trigger_action(request, options = nil) + # Pass arguments to `trigger_action` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload trigger_action(name: nil, payload: nil, language_code: nil) + # Pass arguments to `trigger_action` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The business's account that is triggering the action. + # Format: `accounts/{account}` + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionPayload, ::Hash] + # Required. The payload for the triggered action. + # @param language_code [::String] + # Optional. Language code [IETF BCP 47 + # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. + # If not set, the result will be in default language `en-US`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new + # + # # Call the trigger_action method. + # result = client.trigger_action request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse. + # p result + # + def trigger_action request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.trigger_action.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.trigger_action.timeout, + metadata: metadata, + retry_policy: @config.rpcs.trigger_action.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.call_rpc :trigger_action, request, 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 IssueResolutionService API. + # + # This class represents the configuration for IssueResolutionService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # render_account_issues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.render_account_issues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.render_account_issues.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 IssueResolutionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `render_account_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :render_account_issues + ## + # RPC-specific configuration for `render_product_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :render_product_issues + ## + # RPC-specific configuration for `trigger_action` + # @return [::Gapic::Config::Method] + # + attr_reader :trigger_action + + # @private + def initialize parent_rpcs = nil + render_account_issues_config = parent_rpcs.render_account_issues if parent_rpcs.respond_to? :render_account_issues + @render_account_issues = ::Gapic::Config::Method.new render_account_issues_config + render_product_issues_config = parent_rpcs.render_product_issues if parent_rpcs.respond_to? :render_product_issues + @render_product_issues = ::Gapic::Config::Method.new render_product_issues_config + trigger_action_config = parent_rpcs.trigger_action if parent_rpcs.respond_to? :trigger_action + @trigger_action = ::Gapic::Config::Method.new trigger_action_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials.rb new file mode 100644 index 000000000000..00199565274d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_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 Shopping + module Merchant + module IssueResolution + module V1 + module IssueResolutionService + # Credentials for the IssueResolutionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths.rb new file mode 100644 index 000000000000..462d12b4c502 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_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 Shopping + module Merchant + module IssueResolution + module V1 + module IssueResolutionService + # Path helper methods for the IssueResolutionService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified Product resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}` + # + # @param account [String] + # @param product [String] + # + # @return [::String] + def product_path account:, product: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/products/#{product}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest.rb new file mode 100644 index 000000000000..ba565d275821 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_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/shopping/merchant/issue_resolution/v1/version" + +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + ## + # Service to provide an issue resolution content for account issues and product + # issues. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new + # + module IssueResolutionService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client.rb new file mode 100644 index 000000000000..ef2e4a8a47de --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client.rb @@ -0,0 +1,645 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/issueresolution/v1/issueresolution_pb" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + module IssueResolutionService + module Rest + ## + # REST client for the IssueResolutionService service. + # + # Service to provide an issue resolution content for account issues and product + # issues. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :issue_resolution_service_stub + + ## + # Configure the IssueResolutionService Client class. + # + # See {::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IssueResolutionService clients + # ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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", "Shopping", "Merchant", "IssueResolution", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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 + @issue_resolution_service_stub.universe_domain + end + + ## + # Create a new IssueResolutionService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IssueResolutionService 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 + + @issue_resolution_service_stub = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @issue_resolution_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 + @issue_resolution_service_stub.logger + end + + # Service calls + + ## + # Provide a list of business's account issues with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + # + # @overload render_account_issues(request, options = nil) + # Pass arguments to `render_account_issues` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload render_account_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) + # Pass arguments to `render_account_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The account to fetch issues for. + # Format: `accounts/{account}` + # @param language_code [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize issue resolution content. If not set, the result will + # be in default language `en-US`. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload, ::Hash] + # Optional. The payload for configuring how the content should be rendered. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new + # + # # Call the render_account_issues method. + # result = client.render_account_issues request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse. + # p result + # + def render_account_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.render_account_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.render_account_issues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.render_account_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.render_account_issues request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Provide a list of issues for business's product with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + # + # @overload render_product_issues(request, options = nil) + # Pass arguments to `render_product_issues` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload render_product_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) + # Pass arguments to `render_product_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the product to fetch issues for. + # Format: `accounts/{account}/products/{product}` + # @param language_code [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize an issue resolution content. If not set, the result + # will be in default language `en-US`. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload, ::Hash] + # Optional. The payload for configuring how the content should be rendered. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new + # + # # Call the render_product_issues method. + # result = client.render_product_issues request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse. + # p result + # + def render_product_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.render_product_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.render_product_issues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.render_product_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.render_product_issues request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Start an action. The action can be requested by a business in + # third-party application. Before the business can request the action, the + # third-party application needs to show them action specific content and + # display a user input form. + # + # The action can be successfully started only once all `required` inputs are + # provided. If any `required` input is missing, or invalid value was + # provided, the service will return 400 error. Validation errors will contain + # {::Google::Shopping::Merchant::IssueResolution::V1::InputField#id Ids} for all + # problematic field together with translated, human readable error messages + # that can be shown to the user. + # + # @overload trigger_action(request, options = nil) + # Pass arguments to `trigger_action` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload trigger_action(name: nil, payload: nil, language_code: nil) + # Pass arguments to `trigger_action` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The business's account that is triggering the action. + # Format: `accounts/{account}` + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionPayload, ::Hash] + # Required. The payload for the triggered action. + # @param language_code [::String] + # Optional. Language code [IETF BCP 47 + # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. + # If not set, the result will be in default language `en-US`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new + # + # # Call the trigger_action method. + # result = client.trigger_action request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse. + # p result + # + def trigger_action request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.trigger_action.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.trigger_action.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.trigger_action.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.trigger_action request, 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 IssueResolutionService REST API. + # + # This class represents the configuration for IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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 + # # render_account_issues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.render_account_issues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.render_account_issues.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 IssueResolutionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `render_account_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :render_account_issues + ## + # RPC-specific configuration for `render_product_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :render_product_issues + ## + # RPC-specific configuration for `trigger_action` + # @return [::Gapic::Config::Method] + # + attr_reader :trigger_action + + # @private + def initialize parent_rpcs = nil + render_account_issues_config = parent_rpcs.render_account_issues if parent_rpcs.respond_to? :render_account_issues + @render_account_issues = ::Gapic::Config::Method.new render_account_issues_config + render_product_issues_config = parent_rpcs.render_product_issues if parent_rpcs.respond_to? :render_product_issues + @render_product_issues = ::Gapic::Config::Method.new render_product_issues_config + trigger_action_config = parent_rpcs.trigger_action if parent_rpcs.respond_to? :trigger_action + @trigger_action = ::Gapic::Config::Method.new trigger_action_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub.rb new file mode 100644 index 000000000000..ddb124d72813 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub.rb @@ -0,0 +1,269 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/issueresolution/v1/issueresolution_pb" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + module IssueResolutionService + module Rest + ## + # REST service stub for the IssueResolutionService 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 render_account_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] + # A result object deserialized from the server's reply + def render_account_issues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_render_account_issues_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "render_account_issues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the render_product_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] + # A result object deserialized from the server's reply + def render_product_issues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_render_product_issues_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "render_product_issues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the trigger_action REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] + # A result object deserialized from the server's reply + def trigger_action request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_trigger_action_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "trigger_action", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse.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 render_account_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_render_account_issues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/issueresolution/v1/{name}:renderaccountissues", + body: "payload", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the render_product_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_render_product_issues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/issueresolution/v1/{name}:renderproductissues", + body: "payload", + matches: [ + ["name", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the trigger_action REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_trigger_action_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/issueresolution/v1/{name}:triggeraction", + body: "payload", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/rest.rb new file mode 100644 index 000000000000..32a1931d6ce3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/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/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest" +require "google/shopping/merchant/issue_resolution/v1/version" + +module Google + module Shopping + module Merchant + module IssueResolution + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/issue_resolution/v1/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb new file mode 100644 index 000000000000..f11a90c2d7fd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/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 Shopping + module Merchant + module IssueResolution + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb.rb new file mode 100644 index 000000000000..7ab0fb134ea5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.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/shopping/type/types_pb' + + +descriptor_data = "\nJgoogle/shopping/merchant/issueresolution/v1/aggregateproductstatuses.proto\x12+google.shopping.merchant.issueresolution.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xb6\x01\n#ListAggregateProductStatusesRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31merchantapi.googleapis.com/AggregateProductStatus\x12\x16\n\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\"\xa8\x01\n$ListAggregateProductStatusesResponse\x12g\n\x1a\x61ggregate_product_statuses\x18\x01 \x03(\x0b\x32\x43.google.shopping.merchant.issueresolution.v1.AggregateProductStatus\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x94\t\n\x16\x41ggregateProductStatus\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12V\n\x11reporting_context\x18\x03 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\x12\x0f\n\x07\x63ountry\x18\x04 \x01(\t\x12X\n\x05stats\x18\x05 \x01(\x0b\x32I.google.shopping.merchant.issueresolution.v1.AggregateProductStatus.Stats\x12m\n\x11item_level_issues\x18\x06 \x03(\x0b\x32R.google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue\x1ag\n\x05Stats\x12\x14\n\x0c\x61\x63tive_count\x18\x01 \x01(\x03\x12\x15\n\rpending_count\x18\x02 \x01(\x03\x12\x19\n\x11\x64isapproved_count\x18\x03 \x01(\x03\x12\x16\n\x0e\x65xpiring_count\x18\x04 \x01(\x03\x1a\x97\x04\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12m\n\x08severity\x18\x02 \x01(\x0e\x32[.google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue.Severity\x12q\n\nresolution\x18\x03 \x01(\x0e\x32].google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue.Resolution\x12\x11\n\tattribute\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x07 \x01(\t\x12\x19\n\x11\x64ocumentation_uri\x18\x08 \x01(\t\x12\x15\n\rproduct_count\x18\t \x01(\x03\"T\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0b\n\x07\x44\x45MOTED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03\"U\n\nResolution\x12\x1a\n\x16RESOLUTION_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_ACTION\x10\x01\x12\x16\n\x12PENDING_PROCESSING\x10\x02:\xb1\x01\xea\x41\xad\x01\n1merchantapi.googleapis.com/AggregateProductStatus\x12\x46\x61\x63\x63ounts/{account}/aggregateProductStatuses/{aggregate_product_status}*\x18\x61ggregateProductStatuses2\x16\x61ggregateProductStatus2\x83\x03\n\x1f\x41ggregateProductStatusesService\x12\x96\x02\n\x1cListAggregateProductStatuses\x12P.google.shopping.merchant.issueresolution.v1.ListAggregateProductStatusesRequest\x1aQ.google.shopping.merchant.issueresolution.v1.ListAggregateProductStatusesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/issueresolution/v1/{parent=accounts/*}/aggregateProductStatuses\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xc1\x02\n/com.google.shopping.merchant.issueresolution.v1B\x1d\x41ggregateProductStatusesProtoP\x01Z_cloud.google.com/go/shopping/merchant/issueresolution/apiv1/issueresolutionpb;issueresolutionpb\xaa\x02+Google.Shopping.Merchant.IssueResolution.V1\xca\x02+Google\\Shopping\\Merchant\\IssueResolution\\V1\xea\x02/Google::Shopping::Merchant::IssueResolution::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + ListAggregateProductStatusesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ListAggregateProductStatusesRequest").msgclass + ListAggregateProductStatusesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ListAggregateProductStatusesResponse").msgclass + AggregateProductStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.AggregateProductStatus").msgclass + AggregateProductStatus::Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.AggregateProductStatus.Stats").msgclass + AggregateProductStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue").msgclass + AggregateProductStatus::ItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue.Severity").enummodule + AggregateProductStatus::ItemLevelIssue::Resolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue.Resolution").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_services_pb.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_services_pb.rb new file mode 100644 index 000000000000..8f9d9d4b5389 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.proto for package 'Google.Shopping.Merchant.IssueResolution.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/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb' + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + module AggregateProductStatusesService + # Service to manage aggregate product statuses. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.issueresolution.v1.AggregateProductStatusesService' + + # Lists the `AggregateProductStatuses` resources for your merchant account. + # The response might contain fewer items than specified by `pageSize`. + # If `pageToken` was returned in previous request, it can be used to obtain + # additional results. + rpc :ListAggregateProductStatuses, ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest, ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_pb.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_pb.rb new file mode 100644 index 000000000000..f476fb325571 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_pb.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/issueresolution/v1/issueresolution.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 = "\nAgoogle/shopping/merchant/issueresolution/v1/issueresolution.proto\x12+google.shopping.merchant.issueresolution.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"r\n\x1bRenderAccountIssuesResponse\x12S\n\x0frendered_issues\x18\x01 \x03(\x0b\x32:.google.shopping.merchant.issueresolution.v1.RenderedIssue\"\xe9\x01\n\x1aRenderAccountIssuesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12]\n\x07payload\x18\x04 \x01(\x0b\x32G.google.shopping.merchant.issueresolution.v1.RenderIssuesRequestPayloadB\x03\xe0\x41\x01\"\xa3\x02\n\x1aRenderIssuesRequestPayload\x12\\\n\x0e\x63ontent_option\x18\x01 \x01(\x0e\x32:.google.shopping.merchant.issueresolution.v1.ContentOptionB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12w\n\x18user_input_action_option\x18\x02 \x01(\x0e\x32K.google.shopping.merchant.issueresolution.v1.UserInputActionRenderingOptionB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x11\n\x0f_content_optionB\x1b\n\x19_user_input_action_option\"r\n\x1bRenderProductIssuesResponse\x12S\n\x0frendered_issues\x18\x01 \x03(\x0b\x32:.google.shopping.merchant.issueresolution.v1.RenderedIssue\"\xe9\x01\n\x1aRenderProductIssuesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Product\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12]\n\x07payload\x18\x04 \x01(\x0b\x32G.google.shopping.merchant.issueresolution.v1.RenderIssuesRequestPayloadB\x03\xe0\x41\x01\"\xad\x02\n\rRenderedIssue\x12\x1d\n\x13prerendered_content\x18\x03 \x01(\tH\x00\x12\x35\n+prerendered_out_of_court_dispute_settlement\x18\x05 \x01(\tH\x01\x12\r\n\x05title\x18\x01 \x01(\t\x12\x43\n\x06impact\x18\x02 \x01(\x0b\x32\x33.google.shopping.merchant.issueresolution.v1.Impact\x12\x44\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x33.google.shopping.merchant.issueresolution.v1.ActionB\t\n\x07\x63ontentB!\n\x1fout_of_court_dispute_settlement\"\xb3\x01\n\x06Impact\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12G\n\x08severity\x18\x02 \x01(\x0e\x32\x35.google.shopping.merchant.issueresolution.v1.Severity\x12J\n\nbreakdowns\x18\x03 \x03(\x0b\x32\x36.google.shopping.merchant.issueresolution.v1.Breakdown\"\x92\x01\n\tBreakdown\x12N\n\x07regions\x18\x01 \x03(\x0b\x32=.google.shopping.merchant.issueresolution.v1.Breakdown.Region\x12\x0f\n\x07\x64\x65tails\x18\x04 \x03(\t\x1a$\n\x06Region\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\xc6\x04\n\x06\x41\x63tion\x12\x61\n\x15\x62uiltin_simple_action\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1.BuiltInSimpleActionH\x00\x12V\n\x0f\x65xternal_action\x18\x03 \x01(\x0b\x32;.google.shopping.merchant.issueresolution.v1.ExternalActionH\x00\x12h\n\x19\x62uiltin_user_input_action\x18\x07 \x01(\x0b\x32\x43.google.shopping.merchant.issueresolution.v1.BuiltInUserInputActionH\x00\x12\x14\n\x0c\x62utton_label\x18\x04 \x01(\t\x12\x14\n\x0cis_available\x18\x05 \x01(\x08\x12K\n\x07reasons\x18\x06 \x03(\x0b\x32:.google.shopping.merchant.issueresolution.v1.Action.Reason\x1a\x93\x01\n\x06Reason\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x13\n\x06\x64\x65tail\x18\x02 \x01(\tH\x00\x88\x01\x01\x12M\n\x06\x61\x63tion\x18\x03 \x01(\x0b\x32\x33.google.shopping.merchant.issueresolution.v1.ActionB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\t\n\x07_detailB\t\n\x07_actionB\x08\n\x06\x61\x63tion\"\x90\x05\n\x13\x42uiltInSimpleAction\x12\x66\n\x04type\x18\x01 \x01(\x0e\x32X.google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction.BuiltInSimpleActionType\x12\x1b\n\x0e\x61ttribute_code\x18\x02 \x01(\tH\x00\x88\x01\x01\x12s\n\x12\x61\x64\x64itional_content\x18\x03 \x01(\x0b\x32R.google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction.AdditionalContentH\x01\x88\x01\x01\x1a\x36\n\x11\x41\x64\x64itionalContent\x12\r\n\x05title\x18\x01 \x01(\t\x12\x12\n\nparagraphs\x18\x02 \x03(\t\"\x9c\x02\n\x17\x42uiltInSimpleActionType\x12+\n\'BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cVERIFY_PHONE\x10\x01\x12\x11\n\rCLAIM_WEBSITE\x10\x02\x12\x10\n\x0c\x41\x44\x44_PRODUCTS\x10\x03\x12\x14\n\x10\x41\x44\x44_CONTACT_INFO\x10\x04\x12\x14\n\x10LINK_ADS_ACCOUNT\x10\x05\x12$\n ADD_BUSINESS_REGISTRATION_NUMBER\x10\x06\x12\x17\n\x13\x45\x44IT_ITEM_ATTRIBUTE\x10\x07\x12\x15\n\x11\x46IX_ACCOUNT_ISSUE\x10\x08\x12\x1b\n\x17SHOW_ADDITIONAL_CONTENT\x10\tB\x11\n\x0f_attribute_codeB\x15\n\x13_additional_content\"x\n\x16\x42uiltInUserInputAction\x12\x16\n\x0e\x61\x63tion_context\x18\x01 \x01(\t\x12\x46\n\x05\x66lows\x18\x03 \x03(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1.ActionFlow\"\xf7\x02\n\nActionFlow\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12G\n\x06inputs\x18\x03 \x03(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1.InputField\x12\x14\n\x0c\x64ialog_title\x18\x04 \x01(\t\x12Y\n\x0e\x64ialog_message\x18\x07 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1.TextWithTooltipH\x00\x88\x01\x01\x12Q\n\x0e\x64ialog_callout\x18\x08 \x01(\x0b\x32\x34.google.shopping.merchant.issueresolution.v1.CalloutH\x01\x88\x01\x01\x12\x1b\n\x13\x64ialog_button_label\x18\t \x01(\tB\x11\n\x0f_dialog_messageB\x11\n\x0f_dialog_callout\"\x92\t\n\nInputField\x12W\n\ntext_input\x18\x04 \x01(\x0b\x32\x41.google.shopping.merchant.issueresolution.v1.InputField.TextInputH\x00\x12[\n\x0c\x63hoice_input\x18\x05 \x01(\x0b\x32\x43.google.shopping.merchant.issueresolution.v1.InputField.ChoiceInputH\x00\x12_\n\x0e\x63heckbox_input\x18\x06 \x01(\x0b\x32\x45.google.shopping.merchant.issueresolution.v1.InputField.CheckboxInputH\x00\x12\n\n\x02id\x18\x01 \x01(\t\x12K\n\x05label\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1.TextWithTooltip\x12\x10\n\x08required\x18\x03 \x01(\x08\x1a\x8d\x03\n\tTextInput\x12]\n\x04type\x18\x01 \x01(\x0e\x32O.google.shopping.merchant.issueresolution.v1.InputField.TextInput.TextInputType\x12Z\n\x0f\x61\x64\x64itional_info\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1.TextWithTooltipH\x00\x88\x01\x01\x12\x18\n\x0b\x66ormat_info\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x17\n\naria_label\x18\x04 \x01(\tH\x02\x88\x01\x01\"_\n\rTextInputType\x12\x1f\n\x1bTEXT_INPUT_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12GENERIC_SHORT_TEXT\x10\x01\x12\x15\n\x11GENERIC_LONG_TEXT\x10\x02\x42\x12\n\x10_additional_infoB\x0e\n\x0c_format_infoB\r\n\x0b_aria_label\x1a\xd1\x02\n\x0b\x43hoiceInput\x12\x66\n\x07options\x18\x01 \x03(\x0b\x32U.google.shopping.merchant.issueresolution.v1.InputField.ChoiceInput.ChoiceInputOption\x1a\xd9\x01\n\x11\x43hoiceInputOption\x12\n\n\x02id\x18\x01 \x01(\t\x12K\n\x05label\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1.TextWithTooltip\x12V\n\x10\x61\x64\x64itional_input\x18\x03 \x01(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1.InputFieldH\x00\x88\x01\x01\x42\x13\n\x11_additional_input\x1a\x0f\n\rCheckboxInputB\r\n\x0bvalue_input\"\x9e\x02\n\x0fTextWithTooltip\x12\x16\n\x0csimple_value\x18\x01 \x01(\tH\x00\x12\x1e\n\x14simple_tooltip_value\x18\x02 \x01(\tH\x01\x12i\n\x12tooltip_icon_style\x18\x03 \x01(\x0e\x32M.google.shopping.merchant.issueresolution.v1.TextWithTooltip.TooltipIconStyle\"N\n\x10TooltipIconStyle\x12\"\n\x1eTOOLTIP_ICON_STYLE_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0c\n\x08QUESTION\x10\x02\x42\x07\n\x05valueB\x0f\n\rtooltip_value\"\x92\x02\n\x07\x43\x61llout\x12Y\n\nstyle_hint\x18\x01 \x01(\x0e\x32\x45.google.shopping.merchant.issueresolution.v1.Callout.CalloutStyleHint\x12R\n\x0c\x66ull_message\x18\x03 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1.TextWithTooltip\"X\n\x10\x43\x61lloutStyleHint\x12\"\n\x1e\x43\x41LLOUT_STYLE_HINT_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\x08\n\x04INFO\x10\x03\"\xdb\x02\n\x0e\x45xternalAction\x12\\\n\x04type\x18\x01 \x01(\x0e\x32N.google.shopping.merchant.issueresolution.v1.ExternalAction.ExternalActionType\x12\x0b\n\x03uri\x18\x02 \x01(\t\"\xdd\x01\n\x12\x45xternalActionType\x12$\n EXTERNAL_ACTION_TYPE_UNSPECIFIED\x10\x00\x12+\n\'REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER\x10\x01\x12+\n\'REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER\x10\x02\x12\x1f\n\x1bLEGAL_APPEAL_IN_HELP_CENTER\x10\x03\x12&\n\"VERIFY_IDENTITY_IN_MERCHANT_CENTER\x10\x04\"\xc5\x01\n\x14TriggerActionRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12W\n\x07payload\x18\x02 \x01(\x0b\x32\x41.google.shopping.merchant.issueresolution.v1.TriggerActionPayloadB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x88\x01\n\x14TriggerActionPayload\x12\x1b\n\x0e\x61\x63tion_context\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12S\n\x0c\x61\x63tion_input\x18\x02 \x01(\x0b\x32\x38.google.shopping.merchant.issueresolution.v1.ActionInputB\x03\xe0\x41\x02\"(\n\x15TriggerActionResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\"~\n\x0b\x41\x63tionInput\x12\x1b\n\x0e\x61\x63tion_flow_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x0cinput_values\x18\x02 \x03(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1.InputValueB\x03\xe0\x41\x02\"\xf3\x03\n\nInputValue\x12\x62\n\x10text_input_value\x18\x02 \x01(\x0b\x32\x46.google.shopping.merchant.issueresolution.v1.InputValue.TextInputValueH\x00\x12\x66\n\x12\x63hoice_input_value\x18\x03 \x01(\x0b\x32H.google.shopping.merchant.issueresolution.v1.InputValue.ChoiceInputValueH\x00\x12j\n\x14\x63heckbox_input_value\x18\x04 \x01(\x0b\x32J.google.shopping.merchant.issueresolution.v1.InputValue.CheckboxInputValueH\x00\x12\x1b\n\x0einput_field_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a$\n\x0eTextInputValue\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\x37\n\x10\x43hoiceInputValue\x12#\n\x16\x63hoice_input_option_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a(\n\x12\x43heckboxInputValue\x12\x12\n\x05value\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x42\x07\n\x05value*F\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\x08\n\x04INFO\x10\x03*F\n\rContentOption\x12\x1e\n\x1a\x43ONTENT_OPTION_UNSPECIFIED\x10\x00\x12\x15\n\x11PRE_RENDERED_HTML\x10\x01*\x96\x01\n\x1eUserInputActionRenderingOption\x12\x32\n.USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED\x10\x00\x12\x1f\n\x1bREDIRECT_TO_MERCHANT_CENTER\x10\x01\x12\x1f\n\x1b\x42UILT_IN_USER_INPUT_ACTIONS\x10\x02\x32\xce\x06\n\x16IssueResolutionService\x12\xfb\x01\n\x13RenderAccountIssues\x12G.google.shopping.merchant.issueresolution.v1.RenderAccountIssuesRequest\x1aH.google.shopping.merchant.issueresolution.v1.RenderAccountIssuesResponse\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\"9/issueresolution/v1/{name=accounts/*}:renderaccountissues:\x07payload\x12\x86\x02\n\x13RenderProductIssues\x12G.google.shopping.merchant.issueresolution.v1.RenderProductIssuesRequest\x1aH.google.shopping.merchant.issueresolution.v1.RenderProductIssuesResponse\"\\\xda\x41\x04name\x82\xd3\xe4\x93\x02O\"D/issueresolution/v1/{name=accounts/*/products/*}:renderproductissues:\x07payload\x12\xe3\x01\n\rTriggerAction\x12\x41.google.shopping.merchant.issueresolution.v1.TriggerActionRequest\x1a\x42.google.shopping.merchant.issueresolution.v1.TriggerActionResponse\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\"3/issueresolution/v1/{name=accounts/*}:triggeraction:\x07payload\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xc1\x03\n/com.google.shopping.merchant.issueresolution.v1B\x14IssueResolutionProtoP\x01Z_cloud.google.com/go/shopping/merchant/issueresolution/apiv1/issueresolutionpb;issueresolutionpb\xaa\x02+Google.Shopping.Merchant.IssueResolution.V1\xca\x02+Google\\Shopping\\Merchant\\IssueResolution\\V1\xea\x02/Google::Shopping::Merchant::IssueResolution::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + RenderAccountIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderAccountIssuesResponse").msgclass + RenderAccountIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderAccountIssuesRequest").msgclass + RenderIssuesRequestPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderIssuesRequestPayload").msgclass + RenderProductIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderProductIssuesResponse").msgclass + RenderProductIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderProductIssuesRequest").msgclass + RenderedIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderedIssue").msgclass + Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Impact").msgclass + Breakdown = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Breakdown").msgclass + Breakdown::Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Breakdown.Region").msgclass + Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Action").msgclass + Action::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Action.Reason").msgclass + BuiltInSimpleAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction").msgclass + BuiltInSimpleAction::AdditionalContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction.AdditionalContent").msgclass + BuiltInSimpleAction::BuiltInSimpleActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction.BuiltInSimpleActionType").enummodule + BuiltInUserInputAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.BuiltInUserInputAction").msgclass + ActionFlow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ActionFlow").msgclass + InputField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField").msgclass + InputField::TextInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField.TextInput").msgclass + InputField::TextInput::TextInputType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField.TextInput.TextInputType").enummodule + InputField::ChoiceInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField.ChoiceInput").msgclass + InputField::ChoiceInput::ChoiceInputOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField.ChoiceInput.ChoiceInputOption").msgclass + InputField::CheckboxInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField.CheckboxInput").msgclass + TextWithTooltip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.TextWithTooltip").msgclass + TextWithTooltip::TooltipIconStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.TextWithTooltip.TooltipIconStyle").enummodule + Callout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Callout").msgclass + Callout::CalloutStyleHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Callout.CalloutStyleHint").enummodule + ExternalAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ExternalAction").msgclass + ExternalAction::ExternalActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ExternalAction.ExternalActionType").enummodule + TriggerActionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.TriggerActionRequest").msgclass + TriggerActionPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.TriggerActionPayload").msgclass + TriggerActionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.TriggerActionResponse").msgclass + ActionInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ActionInput").msgclass + InputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputValue").msgclass + InputValue::TextInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputValue.TextInputValue").msgclass + InputValue::ChoiceInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputValue.ChoiceInputValue").msgclass + InputValue::CheckboxInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputValue.CheckboxInputValue").msgclass + Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Severity").enummodule + ContentOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ContentOption").enummodule + UserInputActionRenderingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.UserInputActionRenderingOption").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_services_pb.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_services_pb.rb new file mode 100644 index 000000000000..7daf1f8def84 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/issueresolution/v1/issueresolution.proto for package 'Google.Shopping.Merchant.IssueResolution.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/shopping/merchant/issueresolution/v1/issueresolution_pb' + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + module IssueResolutionService + # Service to provide an issue resolution content for account issues and product + # issues. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.issueresolution.v1.IssueResolutionService' + + # Provide a list of business's account issues with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + rpc :RenderAccountIssues, ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest, ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse + # Provide a list of issues for business's product with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + rpc :RenderProductIssues, ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest, ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse + # Start an action. The action can be requested by a business in + # third-party application. Before the business can request the action, the + # third-party application needs to show them action specific content and + # display a user input form. + # + # The action can be successfully started only once all `required` inputs are + # provided. If any `required` input is missing, or invalid value was + # provided, the service will return 400 error. Validation errors will contain + # [Ids][google.shopping.merchant.issueresolution.v1.InputField.id] for all + # problematic field together with translated, human readable error messages + # that can be shown to the user. + rpc :TriggerAction, ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest, ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant 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-shopping-merchant-issue_resolution-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.rb new file mode 100644 index 000000000000..40faf58eaeb8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.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 Shopping + module Merchant + module IssueResolution + module V1 + # Request message for the `ListAggregateProductStatuses` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list aggregate product statuses for. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of aggregate product statuses to return. The + # service may return fewer than this value. If unspecified, at most 25 + # aggregate product statuses are returned. The maximum value is 250; values + # above 250 are coerced to 250. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListAggregateProductStatuses` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAggregateProductStatuses` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the aggregate product statuses. + # Filtering is only supported by the `reporting_context` and `country` field. + # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. + class ListAggregateProductStatusesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListAggregateProductStatuses` method. + # @!attribute [rw] aggregate_product_statuses + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>] + # The `AggregateProductStatuses` resources for the given account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListAggregateProductStatusesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Aggregate product statuses for a given reporting context and country. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the `AggregateProductStatuses` resource. + # Format: + # `accounts/{account}/aggregateProductStatuses/{aggregateProductStatuses}` + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # The reporting context of the aggregate product statuses. + # @!attribute [rw] country + # @return [::String] + # The country of the aggregate product statuses. Represented as a + # [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). + # @!attribute [rw] stats + # @return [::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus::Stats] + # Products statistics for the given reporting context and country. + # @!attribute [rw] item_level_issues + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus::ItemLevelIssue>] + # The product issues that affect the given reporting context and country. + class AggregateProductStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Products statistics. + # @!attribute [rw] active_count + # @return [::Integer] + # The number of products that are active. + # @!attribute [rw] pending_count + # @return [::Integer] + # The number of products that are pending. + # @!attribute [rw] disapproved_count + # @return [::Integer] + # The number of products that are disapproved. + # @!attribute [rw] expiring_count + # @return [::Integer] + # The number of products that are expiring. + class Stats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ItemLevelIssue of the product status. + # @!attribute [rw] code + # @return [::String] + # The error code of the issue. + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus::ItemLevelIssue::Severity] + # How this issue affects serving of the offer. + # @!attribute [rw] resolution + # @return [::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus::ItemLevelIssue::Resolution] + # Whether the issue can be resolved by the merchant. + # @!attribute [rw] attribute + # @return [::String] + # The attribute's name, if the issue is caused by a single attribute. + # @!attribute [rw] description + # @return [::String] + # A short issue description in English. + # @!attribute [rw] detail + # @return [::String] + # A detailed issue description in English. + # @!attribute [rw] documentation_uri + # @return [::String] + # The URL of a web page to help with resolving this issue. + # @!attribute [rw] product_count + # @return [::Integer] + # The number of products affected by this issue. + class ItemLevelIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # How the issue affects the serving of the product. + module Severity + # Not specified. + SEVERITY_UNSPECIFIED = 0 + + # This issue represents a warning and does not have a direct affect + # on the product. + NOT_IMPACTED = 1 + + # The product is demoted and most likely have limited performance + # in search results + DEMOTED = 2 + + # Issue disapproves the product. + DISAPPROVED = 3 + end + + # How the issue can be resolved. + module Resolution + # Not specified. + RESOLUTION_UNSPECIFIED = 0 + + # The issue can be resolved by the merchant. + MERCHANT_ACTION = 1 + + # The issue will be resolved auomatically. + PENDING_PROCESSING = 2 + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb new file mode 100644 index 000000000000..6aac18092bd0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb @@ -0,0 +1,952 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + # Response containing an issue resolution content and actions for listed + # account issues. + # @!attribute [rw] rendered_issues + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue>] + # List of account issues for a given account. + # + # This list can be shown with compressed, expandable items. In the compressed + # form, the title and impact should be shown for each issue. Once the issue + # is expanded, the detailed + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#prerendered_content content} + # and available + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#actions actions} + # should be rendered. + class RenderAccountIssuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to provide issue resolution content and actions for business's + # account issues. + # @!attribute [rw] name + # @return [::String] + # Required. The account to fetch issues for. + # Format: `accounts/{account}` + # @!attribute [rw] language_code + # @return [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize issue resolution content. If not set, the result will + # be in default language `en-US`. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @!attribute [rw] payload + # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload] + # Optional. The payload for configuring how the content should be rendered. + class RenderAccountIssuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The payload for configuring how the content should be rendered. + # @!attribute [rw] content_option + # @return [::Google::Shopping::Merchant::IssueResolution::V1::ContentOption] + # Optional. How the detailed content should be returned. Default option is to + # return the content as a pre-rendered HTML text. + # @!attribute [rw] user_input_action_option + # @return [::Google::Shopping::Merchant::IssueResolution::V1::UserInputActionRenderingOption] + # Optional. How actions with user input form should be handled. If not + # provided, actions will be returned as links that points the business to + # Merchant Center where they can request the action. + class RenderIssuesRequestPayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response containing an issue resolution content and actions for listed + # product issues. + # @!attribute [rw] rendered_issues + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue>] + # List of issues for a given product. + # + # This list can be shown with compressed, expandable items. In the compressed + # form, the + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#title title} + # and + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#impact impact} + # should be shown for each issue. Once the issue is expanded, the detailed + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#prerendered_content content} + # and available + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#actions actions} + # should be rendered. + class RenderProductIssuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to provide an issue resolution content and actions for product issues + # of business's product. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the product to fetch issues for. + # Format: `accounts/{account}/products/{product}` + # @!attribute [rw] language_code + # @return [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize an issue resolution content. If not set, the result + # will be in default language `en-US`. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @!attribute [rw] payload + # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload] + # Optional. The payload for configuring how the content should be rendered. + class RenderProductIssuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An issue affecting specific business or their product. + # @!attribute [rw] prerendered_content + # @return [::String] + # Details of the issue as a pre-rendered HTML. HTML elements contain CSS + # classes that can be used to customize the style of the content. + # + # Always sanitize the HTML before embedding it directly to your + # application. The sanitizer needs to allow basic HTML tags, such as: + # `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, + # you can use [DOMPurify](https://www.npmjs.com/package/dompurify). + # + # CSS classes: + # + # * `issue-detail` - top level container for the detail of the issue + # * `callout-banners` - section of the `issue-detail` with callout banners + # * `callout-banner` - single callout banner, inside `callout-banners` + # * `callout-banner-info` - callout with important information (default) + # * `callout-banner-warning` - callout with a warning + # * `callout-banner-error` - callout informing about an error (most severe) + # * `issue-content` - section of the `issue-detail`, contains multiple + # `content-element` + # * `content-element` - content element such as a list, link or paragraph, + # inside `issue-content` + # * `root-causes` - unordered list with items describing root causes of the + # issue, inside `issue-content` + # * `root-causes-intro` - intro text before the `root-causes` list, inside + # `issue-content` + # * `segment` - section of the text, `span` inside paragraph + # * `segment-attribute` - section of the text that represents a product + # attribute, for example 'image\_link' + # * `segment-literal` - section of the text that contains a special value, + # for example '0-1000 kg' + # * `segment-bold` - section of the text that should be rendered as bold + # * `segment-italic` - section of the text that should be rendered as + # italic + # * `tooltip` - used on paragraphs that should be rendered with a tooltip. + # A section of the text in such a paragraph will have a class + # `tooltip-text` and is intended to be shown in a mouse over dialog. If the + # style is not used, the `tooltip-text` section would be shown on a new + # line, after the main part of the text. + # * `tooltip-text` - marks a section of the text within a `tooltip`, that + # is intended to be shown in a mouse over dialog. + # * `tooltip-icon` - marks a section of the text within a `tooltip`, that + # can be replaced with a tooltip icon, for example '?' or 'i'. By default, + # this section contains a `br` tag, that is separating the main text and + # the tooltip text when the style is not used. + # * `tooltip-style-question` - the tooltip shows helpful information, + # can use the '?' as an icon. + # * `tooltip-style-info` - the tooltip adds additional information fitting + # to the context, can use the 'i' as an icon. + # * `content-moderation` - marks the paragraph that explains how the issue + # was identified. + # * `new-element` - Present for new elements added to the pre-rendered + # content in the future. To make sure that a new content element does not + # break your style, you can hide everything with this class. + # @!attribute [rw] prerendered_out_of_court_dispute_settlement + # @return [::String] + # Pre-rendered HTML that contains a link to the external location where the + # ODS can be requested and instructions for how to request it. HTML + # elements contain CSS classes that can be used to customize the style of + # this snippet. + # + # Always sanitize the HTML before embedding it directly to your + # application. The sanitizer needs to allow basic HTML tags, such as: + # `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, + # you can use [DOMPurify](https://www.npmjs.com/package/dompurify). + # + # CSS classes: + # + # * `ods-section`* - wrapper around the out-of-court dispute resolution + # section + # * `ods-description`* - intro text for the out-of-court dispute + # resolution. It may contain multiple segments and a link. + # * `ods-param`* - wrapper around the header-value pair for parameters that + # the business may need to provide during the ODS process. + # * `ods-routing-id`* - ods param for the Routing ID. + # * `ods-reference-id`* - ods param for the Routing ID. + # * `ods-param-header`* - header for the ODS parameter + # * `ods-param-value`* - value of the ODS parameter. This value should be + # rendered in a way that it is easy for the user to identify and copy. + # * `segment` - section of the text, `span` inside paragraph + # * `segment-attribute` - section of the text that represents a product + # attribute, for example 'image\_link' + # * `segment-literal` - section of the text that contains a special value, + # for example '0-1000 kg' + # * `segment-bold` - section of the text that should be rendered as bold + # * `segment-italic` - section of the text that should be rendered as + # italic + # * `tooltip` - used on paragraphs that should be rendered with a tooltip. + # A section of the text in such a paragraph will have a class + # `tooltip-text` and is intended to be shown in a mouse over dialog. If the + # style is not used, the `tooltip-text` section would be shown on a new + # line, after the main part of the text. + # * `tooltip-text` - marks a section of the text within a `tooltip`, that + # is intended to be shown in a mouse over dialog. + # * `tooltip-icon` - marks a section of the text within a `tooltip`, that + # can be replaced with a tooltip icon, for example '?' or 'i'. By default, + # this section contains a `br` tag, that is separating the main text and + # the tooltip text when the style is not used. + # * `tooltip-style-question` - the tooltip shows helpful information, + # can use the '?' as an icon. + # * `tooltip-style-info` - the tooltip adds additional information fitting + # to the context, can use the 'i' as an icon. + # @!attribute [rw] title + # @return [::String] + # Title of the issue. + # @!attribute [rw] impact + # @return [::Google::Shopping::Merchant::IssueResolution::V1::Impact] + # Clarifies the severity of the issue. + # + # The [summarizing + # message][google.shopping.merchant.issueresolution.v1.Impact.message], if + # present, should be shown right under the title for each issue. It helps + # business to quickly understand the impact of the issue. + # + # The detailed + # {::Google::Shopping::Merchant::IssueResolution::V1::Impact#breakdowns breakdown} + # helps the business to fully understand the impact of the issue. It can be + # rendered as dialog that opens when the business mouse over the summarized + # impact statement. + # + # Issues with different + # {::Google::Shopping::Merchant::IssueResolution::V1::Impact#severity severity} can + # be styled differently. They may use a different color or icon to signal the + # difference between `ERROR`, `WARNING` and `INFO`. + # @!attribute [rw] actions + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::Action>] + # A list of actionable steps that can be executed to solve the issue. An + # example is requesting a re-review or providing arguments when business + # disagrees with the issue. + # + # Actions that are supported in (your) third-party application can be + # rendered as buttons and should be available to the business when they + # expand the issue. + class RenderedIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Overall impact of the issue. + # @!attribute [rw] message + # @return [::String] + # Optional. Message summarizing the overall impact of the issue. If present, + # it should be rendered to the business. For example: "Disapproves 90k offers + # in 25 countries" + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::IssueResolution::V1::Severity] + # The severity of the issue. + # @!attribute [rw] breakdowns + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::Breakdown>] + # Detailed impact breakdown. Explains the types of restriction the issue has + # in different shopping destinations and territory. If present, it should be + # rendered to the business. Can be shown as a mouse over dropdown or a + # dialog. Each breakdown item represents a group of regions with the same + # impact details. + class Impact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A detailed impact breakdown for a group of regions where the impact of the + # issue on different shopping destinations is the same. + # @!attribute [rw] regions + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::Breakdown::Region>] + # Lists of regions. Should be rendered as a title for this group of details. + # The full list should be shown to the business. If the list is too long, it + # is recommended to make it expandable. + # @!attribute [rw] details + # @return [::Array<::String>] + # Human readable, localized description of issue's effect on different + # targets. Should be rendered as a list. + # + # For example: + # + # * "Products not showing in ads" + # * "Products not showing organically" + class Breakdown + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Region with code and localized name. + # @!attribute [rw] code + # @return [::String] + # The [CLDR territory code] + # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # @!attribute [rw] name + # @return [::String] + # The localized name of the region. + # For region with code='001' the value is 'All countries' or the equivalent + # in other languages. + class Region + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An actionable step that can be executed to solve the issue. + # @!attribute [rw] builtin_simple_action + # @return [::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction] + # Action implemented and performed in (your) third-party application. The + # application should point the business to the place, where they can access + # the corresponding functionality or provide instructions, if the specific + # functionality is not available. + # + # Note: The following fields are mutually exclusive: `builtin_simple_action`, `external_action`, `builtin_user_input_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] external_action + # @return [::Google::Shopping::Merchant::IssueResolution::V1::ExternalAction] + # Action that is implemented and performed outside of (your) third-party + # application. The application needs to redirect the business to the + # external location where they can perform the action. + # + # Note: The following fields are mutually exclusive: `external_action`, `builtin_simple_action`, `builtin_user_input_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] builtin_user_input_action + # @return [::Google::Shopping::Merchant::IssueResolution::V1::BuiltInUserInputAction] + # Action implemented and performed in (your) third-party application. + # The application needs to show an additional content and input form to the + # business as specified for given action. They can trigger the action only + # when they provided all required inputs. + # + # Note: The following fields are mutually exclusive: `builtin_user_input_action`, `builtin_simple_action`, `external_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] button_label + # @return [::String] + # Label of the action button. + # @!attribute [rw] is_available + # @return [::Boolean] + # Controlling whether the button is active or disabled. The value is 'false' + # when the action was already requested or is not available. If the action is + # not available then a + # {::Google::Shopping::Merchant::IssueResolution::V1::Action#reasons reason} will + # be present. If (your) third-party application shows a disabled button for + # action that is not available, then it should also show reasons. + # @!attribute [rw] reasons + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::Action::Reason>] + # List of reasons why the action is not available. The list of reasons is + # empty if the action is available. If there is only one reason, it can be + # displayed next to the disabled button. If there are more reasons, all of + # them should be displayed, for example in a pop-up dialog. + class Action + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A single reason why the action is not available. + # @!attribute [rw] message + # @return [::String] + # Messages summarizing the reason, why the action is not available. + # For example: "Review requested on Jan 03. Review requests can take a few + # days to complete." + # @!attribute [rw] detail + # @return [::String] + # Detailed explanation of the reason. Should be displayed as a hint if + # present. + # @!attribute [rw] action + # @return [::Google::Shopping::Merchant::IssueResolution::V1::Action] + # Optional. An action that needs to be performed to solve the problem + # represented by this reason. This action will always be available. Should + # be rendered as a link or button next to the summarizing message. + # + # For example, the review may be available only once the business configure + # all required attributes. In such a situation this action can be a link to + # the form, where they can fill the missing attribute to unblock the main + # action. + class Reason + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Action that is implemented and performed in (your) third-party application. + # Represents various functionality that is expected to be available to business + # and will help them with resolving the issue. The application should point the + # business to the place, where they can access the corresponding functionality. + # If the functionality is not supported, it is recommended to explain the + # situation to the business and provide them with instructions how to solve the + # issue. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction::BuiltInSimpleActionType] + # The type of action that represents a functionality that is expected to be + # available in third-party application. + # @!attribute [rw] attribute_code + # @return [::String] + # The attribute that needs to be updated. Present when the + # {::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction#type type} + # is `EDIT_ITEM_ATTRIBUTE`. + # + # This field contains a code for attribute, represented in snake_case. You + # can find a list of product's attributes, with their codes + # [here](https://support.google.com/merchants/answer/7052112). + # @!attribute [rw] additional_content + # @return [::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction::AdditionalContent] + # Long text from an external source that should be available to the business. + # Present when the + # {::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction#type type} + # is `SHOW_ADDITIONAL_CONTENT`. + class BuiltInSimpleAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Long text from external source. + # @!attribute [rw] title + # @return [::String] + # Title of the additional content; + # @!attribute [rw] paragraphs + # @return [::Array<::String>] + # Long text organized into paragraphs. + class AdditionalContent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enum specifying the type of action in third-party application. + module BuiltInSimpleActionType + # Default value. Will never be provided by the API. + BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED = 0 + + # Redirect the business to the part of your application where they can + # verify their phone. + VERIFY_PHONE = 1 + + # Redirect the business to the part of your application where they can + # claim their website. + CLAIM_WEBSITE = 2 + + # Redirect the business to the part of your application where they can add + # products. + ADD_PRODUCTS = 3 + + # Open a form where the business can edit their contact information. + ADD_CONTACT_INFO = 4 + + # Redirect the business to the part of your application where they can link + # ads account. + LINK_ADS_ACCOUNT = 5 + + # Open a form where the business can add their business registration + # number. + ADD_BUSINESS_REGISTRATION_NUMBER = 6 + + # Open a form where the business can edit an attribute. The attribute that + # needs to be updated is specified in + # {::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction#attribute_code attribute_code} + # field of the action. + EDIT_ITEM_ATTRIBUTE = 7 + + # Redirect the business from the product issues to the diagnostic page with + # their account issues in your application. + # + # This action will be returned only for product issues that are caused by + # an account issue and thus the business should resolve the problem on the + # account level. + FIX_ACCOUNT_ISSUE = 8 + + # Show [additional + # content][google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction.additional_content] + # to the business. + # + # This action will be used for example to deliver a justification from + # national authority. + SHOW_ADDITIONAL_CONTENT = 9 + end + end + + # Action that is implemented and performed in (your) third-party application. + # The application needs to show an additional content and input form to the + # business. They can start the action only when they provided all required + # inputs. The application will request processing of the action by calling the + # [triggeraction + # method](https://developers.google.com/merchant/api/reference/rest/issueresolution_v1/issueresolution/triggeraction). + # @!attribute [rw] action_context + # @return [::String] + # Contains the action's context that must be included as part of the + # {::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionPayload#action_context TriggerActionPayload.action_context} + # in + # {::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest#payload TriggerActionRequest.payload} + # to call the `triggeraction` method. The content should be treated as opaque + # and must not be modified. + # @!attribute [rw] flows + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::ActionFlow>] + # Actions may provide multiple different flows. Business selects one that + # fits best to their intent. Selecting the flow is the first step in user's + # interaction with the action. It affects what input fields will be available + # and required and also how the request will be processed. + class BuiltInUserInputAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Flow that can be selected for an action. When a business selects a flow, + # application should open a dialog with more information and input form. + # @!attribute [rw] id + # @return [::String] + # Not for display but need to be sent back for the selected action flow. + # @!attribute [rw] label + # @return [::String] + # Text value describing the intent for the action flow. It can be used as an + # input label if business needs to pick one of multiple flows. For example: + # "I disagree with the issue" + # @!attribute [rw] inputs + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::InputField>] + # A list of input fields. + # @!attribute [rw] dialog_title + # @return [::String] + # Title of the request dialog. For example: "Before you request a review" + # @!attribute [rw] dialog_message + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip] + # Message displayed in the request dialog. For example: "Make sure you've + # fixed all your country-specific issues. If not, you may have to wait 7 days + # to request another review". There may be an more information to be shown in + # a tooltip. + # @!attribute [rw] dialog_callout + # @return [::Google::Shopping::Merchant::IssueResolution::V1::Callout] + # Important message to be highlighted in the request dialog. For example: + # "You can only request a review for disagreeing with this issue once. If + # it's not approved, you'll need to fix the issue and wait a few days before + # you can request another review." + # @!attribute [rw] dialog_button_label + # @return [::String] + # Label for the button to trigger the action from the action dialog. For + # example: "Request review" + class ActionFlow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input field that needs to be available to the business. If the field is + # marked as required, then a value needs to be provided for a successful + # processing of the request. + # @!attribute [rw] text_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputField::TextInput] + # Input field to provide text information. + # Corresponds to the [html input + # type=text](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text) + # or [html + # textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). + # + # Note: The following fields are mutually exclusive: `text_input`, `choice_input`, `checkbox_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] choice_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputField::ChoiceInput] + # Input field to select one of the offered choices. + # Corresponds to the [html input + # type=radio](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.radio.html#input.radio). + # + # Note: The following fields are mutually exclusive: `choice_input`, `text_input`, `checkbox_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] checkbox_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputField::CheckboxInput] + # Input field to provide a boolean value. + # Corresponds to the [html input + # type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). + # + # Note: The following fields are mutually exclusive: `checkbox_input`, `text_input`, `choice_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] id + # @return [::String] + # Not for display but need to be sent back for the given input field. + # @!attribute [rw] label + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip] + # Input field label. There may be more information to be shown in a tooltip. + # @!attribute [rw] required + # @return [::Boolean] + # Whether the field is required. The action button needs to stay disabled + # till values for all required fields are provided. + class InputField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Text input allows the business to provide a text value. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputField::TextInput::TextInputType] + # Type of the text input + # @!attribute [rw] additional_info + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip] + # Additional info regarding the field to be displayed to the business. For + # example, warning to not include personal identifiable information. There + # may be more information to be shown in a tooltip. + # @!attribute [rw] format_info + # @return [::String] + # Information about the required format. If present, it should be shown + # close to the input field to help the business to provide a correct value. + # For example: "VAT numbers should be in a format similar to SK9999999999" + # @!attribute [rw] aria_label + # @return [::String] + # Text to be used as the + # [aria-label](https://www.w3.org/TR/WCAG20-TECHS/ARIA14.html) for the + # input. + class TextInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum specifying the type of the text input and how it should be rendered. + module TextInputType + # Default value. Will never be provided by the API. + TEXT_INPUT_TYPE_UNSPECIFIED = 0 + + # Used when a short text is expected. The field can be rendered as a + # [text + # field](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text). + GENERIC_SHORT_TEXT = 1 + + # Used when a longer text is expected. The field should be rendered as a + # [textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). + GENERIC_LONG_TEXT = 2 + end + end + + # Choice input allows the business to select one of the offered choices. Some + # choices may be linked to additional input fields that should be displayed + # under or next to the choice option. The value for the additional input + # field needs to be provided only when the specific choice is selected by the + # the business. For example, additional input field can be hidden or disabled + # until the business selects the specific choice. + # @!attribute [rw] options + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::InputField::ChoiceInput::ChoiceInputOption>] + # A list of choices. Only one option can be selected. + class ChoiceInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A choice that the business can select. + # @!attribute [rw] id + # @return [::String] + # Not for display but need to be sent back for the selected choice + # option. + # @!attribute [rw] label + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip] + # Short description of the choice option. There may be more information + # to be shown as a tooltip. + # @!attribute [rw] additional_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputField] + # Input that should be displayed when this option is selected. + # The additional input will not contain a `ChoiceInput`. + class ChoiceInputOption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Checkbox input allows the business to provide a boolean value. Corresponds + # to the [html input + # type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). + # + # If the business checks the box, the input value for the field is `true`, + # otherwise it is `false`. + # + # This type of input is often used as a confirmation that the business + # completed required steps before they are allowed to start the action. In + # such a case, the input field is marked as + # {::Google::Shopping::Merchant::IssueResolution::V1::InputField#required required} + # and the button to trigger the action should stay disabled until the + # business checks the box. + class CheckboxInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Block of text that may contain a tooltip with more information. + # @!attribute [rw] simple_value + # @return [::String] + # Value of the message as a simple text. + # @!attribute [rw] simple_tooltip_value + # @return [::String] + # Value of the tooltip as a simple text. + # @!attribute [rw] tooltip_icon_style + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip::TooltipIconStyle] + # The suggested type of an icon for tooltip, if a tooltip is present. + class TextWithTooltip + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum specifying the type of an icon that is being used to display a + # corresponding tooltip in the Merchant Center. + module TooltipIconStyle + # Default value. Will never be provided by the API. + TOOLTIP_ICON_STYLE_UNSPECIFIED = 0 + + # Used when the tooltip adds additional information to the context, + # the 'i' can be used as an icon. + INFO = 1 + + # Used when the tooltip shows helpful information, the '?' can be used as + # an icon. + QUESTION = 2 + end + end + + # An important message that should be highlighted. Usually displayed as a + # banner. + # @!attribute [rw] style_hint + # @return [::Google::Shopping::Merchant::IssueResolution::V1::Callout::CalloutStyleHint] + # Can be used to render messages with different severity in different styles. + # Snippets off all types contain important information that should be + # displayed to the business. + # @!attribute [rw] full_message + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip] + # A full message that needs to be shown to the business. + class Callout + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum specifying the suggested style, how the message should be rendered. + module CalloutStyleHint + # Default value. Will never be provided by the API. + CALLOUT_STYLE_HINT_UNSPECIFIED = 0 + + # The most important type of information highlighting problems, like an + # unsuccessful outcome of previously requested actions. + ERROR = 1 + + # Information warning about pending problems, risks or deadlines. + WARNING = 2 + + # Default severity for important information like pending status of + # previously requested action or cooldown for re-review. + INFO = 3 + end + end + + # Action that is implemented and performed outside of the third-party + # application. It should redirect the business to the provided URL of an + # external system where they can perform the action. For example to request a + # review in the Merchant Center. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::IssueResolution::V1::ExternalAction::ExternalActionType] + # The type of external action. + # @!attribute [rw] uri + # @return [::String] + # URL to external system, for example Merchant Center, where the business can + # perform the action. + class ExternalAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum specifying the type of action that requires to redirect the business + # to an external location. + module ExternalActionType + # Default value. Will never be provided by the API. + EXTERNAL_ACTION_TYPE_UNSPECIFIED = 0 + + # Redirect to Merchant Center where the business can request a review for + # issue related to their product. + REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER = 1 + + # Redirect to Merchant Center where the business can request a review for + # issue related to their account. + REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER = 2 + + # Redirect to the form in Help Center where the business can request a + # legal appeal for the issue. + LEGAL_APPEAL_IN_HELP_CENTER = 3 + + # Redirect to Merchant Center where the business can perform identity + # verification. + VERIFY_IDENTITY_IN_MERCHANT_CENTER = 4 + end + end + + # Request to start the selected action + # @!attribute [rw] name + # @return [::String] + # Required. The business's account that is triggering the action. + # Format: `accounts/{account}` + # @!attribute [rw] payload + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionPayload] + # Required. The payload for the triggered action. + # @!attribute [rw] language_code + # @return [::String] + # Optional. Language code [IETF BCP 47 + # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. + # If not set, the result will be in default language `en-US`. + class TriggerActionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The payload for the triggered action. + # @!attribute [rw] action_context + # @return [::String] + # Required. The + # {::Google::Shopping::Merchant::IssueResolution::V1::BuiltInUserInputAction#action_context context} + # from the selected action. The value is obtained from rendered issues and + # needs to be sent back to identify the + # {::Google::Shopping::Merchant::IssueResolution::V1::Action#builtin_user_input_action action} + # that is being triggered. + # @!attribute [rw] action_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1::ActionInput] + # Required. Input provided by the business. + class TriggerActionPayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response informing about the started action. + # @!attribute [rw] message + # @return [::String] + # The message for the business. + class TriggerActionResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input provided by the business. + # @!attribute [rw] action_flow_id + # @return [::String] + # Required. {::Google::Shopping::Merchant::IssueResolution::V1::ActionFlow#id Id} + # of the selected action flow. + # @!attribute [rw] input_values + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::InputValue>] + # Required. Values for input fields. + class ActionInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input provided by the business for input field. + # @!attribute [rw] text_input_value + # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputValue::TextInputValue] + # Value for [text + # input][google.shopping.merchant.issueresolution.v1.InputField.TextInput] + # field. + # + # Note: The following fields are mutually exclusive: `text_input_value`, `choice_input_value`, `checkbox_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] choice_input_value + # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputValue::ChoiceInputValue] + # Value for [choice + # input][google.shopping.merchant.issueresolution.v1.InputField.ChoiceInput] + # field. + # + # Note: The following fields are mutually exclusive: `choice_input_value`, `text_input_value`, `checkbox_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] checkbox_input_value + # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputValue::CheckboxInputValue] + # Value for [checkbox + # input][google.shopping.merchant.issueresolution.v1.InputField.CheckboxInput] + # field. + # + # Note: The following fields are mutually exclusive: `checkbox_input_value`, `text_input_value`, `choice_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] input_field_id + # @return [::String] + # Required. {::Google::Shopping::Merchant::IssueResolution::V1::InputField#id Id} + # of the corresponding input field. + class InputValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Value for [text + # input][google.shopping.merchant.issueresolution.v1.InputField.TextInput] + # field. + # @!attribute [rw] value + # @return [::String] + # Required. Text provided by the business. + class TextInputValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Value for [choice + # input][google.shopping.merchant.issueresolution.v1.InputField.ChoiceInput] + # field. + # @!attribute [rw] choice_input_option_id + # @return [::String] + # Required. [Id][InputField.ChoiceInput.id] of the option that was selected + # by the business. + class ChoiceInputValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Value for [checkbox + # input][google.shopping.merchant.issueresolution.v1.InputField.CheckboxInput] + # field. + # @!attribute [rw] value + # @return [::Boolean] + # Required. True if the business checked the box field. False otherwise. + class CheckboxInputValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Enum specifying the severity of the issue. + module Severity + # Default value. Will never be provided by the API. + SEVERITY_UNSPECIFIED = 0 + + # Causes either an account suspension or an item disapproval. Errors should + # be resolved as soon as possible to ensure items are eligible to appear in + # results again. + ERROR = 1 + + # Warnings can negatively impact the performance of ads and can lead to item + # or account suspensions in the future unless the issue is resolved. + WARNING = 2 + + # Infos are suggested optimizations to increase data quality. Resolving these + # issues is recommended, but not required. + INFO = 3 + end + + # Enum specifying how is the content returned. + module ContentOption + # Default value. Will never be provided by the API. + CONTENT_OPTION_UNSPECIFIED = 0 + + # Returns the detail of the issue as a pre-rendered HTML text. + PRE_RENDERED_HTML = 1 + end + + # Enum specifying how actions with user input forms, such as requesting + # re-review, are handled. + module UserInputActionRenderingOption + # Default value. Will never be provided by the API. + USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED = 0 + + # Actions that require user input are represented only as links that points + # the business to Merchant Center where they can request the action. Provides + # easier to implement alternative to `BUILT_IN_USER_INPUT_ACTIONS`. + REDIRECT_TO_MERCHANT_CENTER = 1 + + # Returns content and input form definition for each complex action. Your + # application needs to display this content and input form to the business + # before they can request processing of the action. To start the action, your + # application needs to call the `triggeraction` method. + BUILT_IN_USER_INPUT_ACTIONS = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/type/types.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! + + +module Google + module Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + + # Youtube shopping checkout. + YOUTUBE_SHOPPING_CHECKOUT = 7 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 8 + + # [Free vehicle + # listings](https://support.google.com/merchants/answer/11189169). + FREE_VEHICLE_LISTINGS = 9 + + # [Vehicle ads](https://support.google.com/merchants/answer/11189169). + VEHICLE_ADS = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free product listings on UCP + # checkout](https://developers.google.com/merchant/ucp). + FREE_LISTINGS_UCP_CHECKOUT = 19 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 18 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + + # [Product + # Reviews](https://support.google.com/merchants/answer/14620732). + PRODUCT_REVIEWS = 15 + + # [Merchant + # Reviews](https://developers.google.com/merchant-review-feeds). + MERCHANT_REVIEWS = 16 + + # YouTube Checkout + # . + YOUTUBE_CHECKOUT = 17 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/Gemfile new file mode 100644 index 000000000000..6f7c12b08868 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1", path: "../" +else + gem "google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb new file mode 100644 index 000000000000..b316457043a2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.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 merchantapi_v1_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync] +require "google/shopping/merchant/issue_resolution/v1" + +## +# Snippet for the list_aggregate_product_statuses call in the AggregateProductStatusesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client#list_aggregate_product_statuses. +# +def list_aggregate_product_statuses + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new + + # Call the list_aggregate_product_statuses method. + result = client.list_aggregate_product_statuses request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus. + p item + end +end +# [END merchantapi_v1_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync] diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_account_issues.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_account_issues.rb new file mode 100644 index 000000000000..6b8413954d39 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_account_issues.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_IssueResolutionService_RenderAccountIssues_sync] +require "google/shopping/merchant/issue_resolution/v1" + +## +# Snippet for the render_account_issues call in the IssueResolutionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_account_issues. +# +def render_account_issues + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new + + # Call the render_account_issues method. + result = client.render_account_issues request + + # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse. + p result +end +# [END merchantapi_v1_generated_IssueResolutionService_RenderAccountIssues_sync] diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_product_issues.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_product_issues.rb new file mode 100644 index 000000000000..8c5a2a43aeaf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_product_issues.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_IssueResolutionService_RenderProductIssues_sync] +require "google/shopping/merchant/issue_resolution/v1" + +## +# Snippet for the render_product_issues call in the IssueResolutionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_product_issues. +# +def render_product_issues + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new + + # Call the render_product_issues method. + result = client.render_product_issues request + + # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse. + p result +end +# [END merchantapi_v1_generated_IssueResolutionService_RenderProductIssues_sync] diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/trigger_action.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/trigger_action.rb new file mode 100644 index 000000000000..dbedd51f6b27 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/trigger_action.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_IssueResolutionService_TriggerAction_sync] +require "google/shopping/merchant/issue_resolution/v1" + +## +# Snippet for the trigger_action call in the IssueResolutionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#trigger_action. +# +def trigger_action + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new + + # Call the trigger_action method. + result = client.trigger_action request + + # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse. + p result +end +# [END merchantapi_v1_generated_IssueResolutionService_TriggerAction_sync] diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json new file mode 100644 index 000000000000..6a707c6d46ec --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json @@ -0,0 +1,175 @@ +{ + "client_library": { + "name": "google-shopping-merchant-issue_resolution-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.issueresolution.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync", + "title": "Snippet for the list_aggregate_product_statuses call in the AggregateProductStatusesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client#list_aggregate_product_statuses.", + "file": "aggregate_product_statuses_service/list_aggregate_product_statuses.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_aggregate_product_statuses", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client#list_aggregate_product_statuses", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse", + "client": { + "short_name": "AggregateProductStatusesService::Client", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client" + }, + "method": { + "short_name": "ListAggregateProductStatuses", + "full_name": "google.shopping.merchant.issueresolution.v1.AggregateProductStatusesService.ListAggregateProductStatuses", + "service": { + "short_name": "AggregateProductStatusesService", + "full_name": "google.shopping.merchant.issueresolution.v1.AggregateProductStatusesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_IssueResolutionService_RenderAccountIssues_sync", + "title": "Snippet for the render_account_issues call in the IssueResolutionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_account_issues.", + "file": "issue_resolution_service/render_account_issues.rb", + "language": "RUBY", + "client_method": { + "short_name": "render_account_issues", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_account_issues", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse", + "client": { + "short_name": "IssueResolutionService::Client", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client" + }, + "method": { + "short_name": "RenderAccountIssues", + "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService.RenderAccountIssues", + "service": { + "short_name": "IssueResolutionService", + "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_IssueResolutionService_RenderProductIssues_sync", + "title": "Snippet for the render_product_issues call in the IssueResolutionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_product_issues.", + "file": "issue_resolution_service/render_product_issues.rb", + "language": "RUBY", + "client_method": { + "short_name": "render_product_issues", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_product_issues", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse", + "client": { + "short_name": "IssueResolutionService::Client", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client" + }, + "method": { + "short_name": "RenderProductIssues", + "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService.RenderProductIssues", + "service": { + "short_name": "IssueResolutionService", + "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_IssueResolutionService_TriggerAction_sync", + "title": "Snippet for the trigger_action call in the IssueResolutionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#trigger_action.", + "file": "issue_resolution_service/trigger_action.rb", + "language": "RUBY", + "client_method": { + "short_name": "trigger_action", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#trigger_action", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse", + "client": { + "short_name": "IssueResolutionService::Client", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client" + }, + "method": { + "short_name": "TriggerAction", + "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService.TriggerAction", + "service": { + "short_name": "IssueResolutionService", + "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService" + } + } + }, + "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-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_paths_test.rb new file mode 100644 index 000000000000..1abada010c8f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_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/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service" + +class ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_rest_test.rb new file mode 100644 index 000000000000..83f7cf4eae3e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_rest_test.rb @@ -0,0 +1,156 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest" + + +class ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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_aggregate_product_statuses + # Create test objects. + client_result = ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse.new + http_response = OpenStruct.new 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_aggregate_product_statuses_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::ServiceStub.stub :transcode_list_aggregate_product_statuses_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_aggregate_product_statuses_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_aggregate_product_statuses({ 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_aggregate_product_statuses 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_aggregate_product_statuses ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.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_aggregate_product_statuses({ 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_aggregate_product_statuses(::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.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_aggregate_product_statuses_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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.rb new file mode 100644 index 000000000000..2eaf49ffd4ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service" + +class ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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_aggregate_product_statuses + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_aggregate_product_statuses_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_aggregate_product_statuses, name + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest, 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_aggregate_product_statuses_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_aggregate_product_statuses({ 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_aggregate_product_statuses 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_aggregate_product_statuses ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.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_aggregate_product_statuses({ 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_aggregate_product_statuses(::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.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_aggregate_product_statuses_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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_paths_test.rb new file mode 100644 index 000000000000..770b546a8c38 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_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/shopping/merchant/issue_resolution/v1/issue_resolution_service" + +class ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_path account: "value0", product: "value1" + assert_equal "accounts/value0/products/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_rest_test.rb new file mode 100644 index 000000000000..1224ce7d284b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_rest_test.rb @@ -0,0 +1,269 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/issueresolution/v1/issueresolution_pb" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest" + + +class ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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_render_account_issues + # Create test objects. + client_result = ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + language_code = "hello world" + time_zone = "hello world" + payload = {} + + render_account_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::ServiceStub.stub :transcode_render_account_issues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, render_account_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.render_account_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.render_account_issues ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.render_account_issues(::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, render_account_issues_client_stub.call_count + end + end + end + + def test_render_product_issues + # Create test objects. + client_result = ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + language_code = "hello world" + time_zone = "hello world" + payload = {} + + render_product_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::ServiceStub.stub :transcode_render_product_issues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, render_product_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.render_product_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.render_product_issues ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.render_product_issues(::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, render_product_issues_client_stub.call_count + end + end + end + + def test_trigger_action + # Create test objects. + client_result = ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + payload = {} + language_code = "hello world" + + trigger_action_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::ServiceStub.stub :transcode_trigger_action_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, trigger_action_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.trigger_action({ name: name, payload: payload, language_code: language_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.trigger_action name: name, payload: payload, language_code: language_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.trigger_action ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.trigger_action({ name: name, payload: payload, language_code: language_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.trigger_action(::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, trigger_action_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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb new file mode 100644 index 000000000000..4ee039931c15 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb @@ -0,0 +1,294 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/issueresolution/v1/issueresolution_pb" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service" + +class ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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_render_account_issues + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + language_code = "hello world" + time_zone = "hello world" + payload = {} + + render_account_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :render_account_issues, name + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["language_code"] + assert_equal "hello world", request["time_zone"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload), request["payload"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, render_account_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.render_account_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.render_account_issues ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.render_account_issues(::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, render_account_issues_client_stub.call_rpc_count + end + end + + def test_render_product_issues + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + language_code = "hello world" + time_zone = "hello world" + payload = {} + + render_product_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :render_product_issues, name + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["language_code"] + assert_equal "hello world", request["time_zone"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload), request["payload"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, render_product_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.render_product_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.render_product_issues ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.render_product_issues(::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, render_product_issues_client_stub.call_rpc_count + end + end + + def test_trigger_action + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + payload = {} + language_code = "hello world" + + trigger_action_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :trigger_action, name + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionPayload), request["payload"] + assert_equal "hello world", request["language_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, trigger_action_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.trigger_action({ name: name, payload: payload, language_code: language_code }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.trigger_action name: name, payload: payload, language_code: language_code do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.trigger_action ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.trigger_action({ name: name, payload: payload, 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.trigger_action(::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new(name: name, payload: payload, 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, trigger_action_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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.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-shopping-merchant-issue_resolution-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..b3093d31ccee --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1beta", + "distribution_name": "google-shopping-merchant-issue_resolution-v1beta", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1BETA API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-issue_resolution-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-issue_resolution instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.rubocop.yml new file mode 100644 index 000000000000..b16689bf7e9e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-issue_resolution-v1beta.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-shopping-merchant-issue_resolution-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.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-shopping-merchant-issue_resolution-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1BETA 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-shopping-merchant-issue_resolution-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..76c2794553f5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta 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/shopping/merchant/issue_resolution/v1beta" + +client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/issue_resolution/v1beta" + +::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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-shopping-merchant-issue_resolution-v1beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/issue_resolution/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/README.md new file mode 100644 index 000000000000..433fb3188a1d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1BETA API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1BETA API. Most users should consider using +the main client gem, +[google-shopping-merchant-issue_resolution](https://rubygems.org/gems/google-shopping-merchant-issue_resolution). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-issue_resolution-v1beta +``` + +## 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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/issue_resolution/v1beta" + +client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new +request = ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.new # (request fields as keyword arguments...) +response = client.list_aggregate_product_statuses request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1beta) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/issue_resolution/v1beta" +require "logger" + +client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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-shopping-merchant-issue_resolution`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-issue_resolution-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-issue_resolution`. +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-shopping-merchant-issue_resolution-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/Rakefile new file mode 100644 index 000000000000..e2ee4797db27 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta 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/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials" + ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-issue_resolution-v1beta" + header "google-shopping-merchant-issue_resolution-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-issue_resolution-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..1ffcf21af1a9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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.shopping.merchant.issueresolution.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::IssueResolution::V1beta", + "services": { + "AggregateProductStatusesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client", + "rpcs": { + "ListAggregateProductStatuses": { + "methods": [ + "list_aggregate_product_statuses" + ] + } + } + } + } + }, + "IssueResolutionService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client", + "rpcs": { + "RenderAccountIssues": { + "methods": [ + "render_account_issues" + ] + }, + "RenderProductIssues": { + "methods": [ + "render_product_issues" + ] + }, + "TriggerAction": { + "methods": [ + "trigger_action" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec new file mode 100644 index 000000000000..0bc07031b4df --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/issue_resolution/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-issue_resolution-v1beta" + gem.version = Google::Shopping::Merchant::IssueResolution::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-issue_resolution-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-issue_resolution instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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-shopping-type", "~> 1.0" +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google-shopping-merchant-issue_resolution-v1beta.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google-shopping-merchant-issue_resolution-v1beta.rb new file mode 100644 index 000000000000..72022ec743f3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google-shopping-merchant-issue_resolution-v1beta.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/shopping/merchant/issue_resolution/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb new file mode 100644 index 000000000000..8fda20606fab --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.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 "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" +require "google/shopping/merchant/issue_resolution/v1beta/version" + +module Google + module Shopping + module Merchant + module IssueResolution + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/issue_resolution/v1beta" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/issue_resolution/v1beta" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/issue_resolution/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service.rb new file mode 100644 index 000000000000..489d7d56aa33 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/issue_resolution/v1beta/version" + +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/client" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + ## + # Service to manage aggregate product statuses. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new + # + module AggregateProductStatusesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "aggregate_product_statuses_service", "helpers.rb" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/client.rb new file mode 100644 index 000000000000..444ca6b6331a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/client.rb @@ -0,0 +1,508 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + module AggregateProductStatusesService + ## + # Client for the AggregateProductStatusesService service. + # + # Service to manage aggregate product statuses. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :aggregate_product_statuses_service_stub + + ## + # Configure the AggregateProductStatusesService Client class. + # + # See {::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AggregateProductStatusesService clients + # ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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", "Shopping", "Merchant", "IssueResolution", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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 + @aggregate_product_statuses_service_stub.universe_domain + end + + ## + # Create a new AggregateProductStatusesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AggregateProductStatusesService 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/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_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 + + @aggregate_product_statuses_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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 + ) + + @aggregate_product_statuses_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 + @aggregate_product_statuses_service_stub.logger + end + + # Service calls + + ## + # Lists the `AggregateProductStatuses` resources for your merchant account. + # The response might contain fewer items than specified by `pageSize`. + # If `pageToken` was returned in previous request, it can be used to obtain + # additional results. + # + # @overload list_aggregate_product_statuses(request, options = nil) + # Pass arguments to `list_aggregate_product_statuses` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_aggregate_product_statuses(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_aggregate_product_statuses` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list aggregate product statuses for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of aggregate product statuses to return. The + # service may return fewer than this value. If unspecified, at most 25 + # aggregate product statuses are returned. The maximum value is 250; values + # above 250 are coerced to 250. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListAggregateProductStatuses` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAggregateProductStatuses` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. A filter expression that filters the aggregate product statuses. + # Filtering is only supported by the `reporting_context` and `country` field. + # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.new + # + # # Call the list_aggregate_product_statuses method. + # result = client.list_aggregate_product_statuses request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus. + # p item + # end + # + def list_aggregate_product_statuses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_aggregate_product_statuses.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_aggregate_product_statuses.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_aggregate_product_statuses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aggregate_product_statuses_service_stub.call_rpc :list_aggregate_product_statuses, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @aggregate_product_statuses_service_stub, :list_aggregate_product_statuses, 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 AggregateProductStatusesService API. + # + # This class represents the configuration for AggregateProductStatusesService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_aggregate_product_statuses to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AggregateProductStatusesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_aggregate_product_statuses` + # @return [::Gapic::Config::Method] + # + attr_reader :list_aggregate_product_statuses + + # @private + def initialize parent_rpcs = nil + list_aggregate_product_statuses_config = parent_rpcs.list_aggregate_product_statuses if parent_rpcs.respond_to? :list_aggregate_product_statuses + @list_aggregate_product_statuses = ::Gapic::Config::Method.new list_aggregate_product_statuses_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials.rb new file mode 100644 index 000000000000..c58cab29d191 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_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 Shopping + module Merchant + module IssueResolution + module V1beta + module AggregateProductStatusesService + # Credentials for the AggregateProductStatusesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths.rb new file mode 100644 index 000000000000..741d232919af --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths.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 Shopping + module Merchant + module IssueResolution + module V1beta + module AggregateProductStatusesService + # Path helper methods for the AggregateProductStatusesService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest.rb new file mode 100644 index 000000000000..3b47bb28fc7e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_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/shopping/merchant/issue_resolution/v1beta/version" + +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/client" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + ## + # Service to manage aggregate product statuses. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new + # + module AggregateProductStatusesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/client.rb new file mode 100644 index 000000000000..68fa3b664182 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/client.rb @@ -0,0 +1,458 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + module AggregateProductStatusesService + module Rest + ## + # REST client for the AggregateProductStatusesService service. + # + # Service to manage aggregate product statuses. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :aggregate_product_statuses_service_stub + + ## + # Configure the AggregateProductStatusesService Client class. + # + # See {::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AggregateProductStatusesService clients + # ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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", "Shopping", "Merchant", "IssueResolution", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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 + @aggregate_product_statuses_service_stub.universe_domain + end + + ## + # Create a new AggregateProductStatusesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AggregateProductStatusesService 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 + + @aggregate_product_statuses_service_stub = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @aggregate_product_statuses_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 + @aggregate_product_statuses_service_stub.logger + end + + # Service calls + + ## + # Lists the `AggregateProductStatuses` resources for your merchant account. + # The response might contain fewer items than specified by `pageSize`. + # If `pageToken` was returned in previous request, it can be used to obtain + # additional results. + # + # @overload list_aggregate_product_statuses(request, options = nil) + # Pass arguments to `list_aggregate_product_statuses` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_aggregate_product_statuses(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_aggregate_product_statuses` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list aggregate product statuses for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of aggregate product statuses to return. The + # service may return fewer than this value. If unspecified, at most 25 + # aggregate product statuses are returned. The maximum value is 250; values + # above 250 are coerced to 250. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListAggregateProductStatuses` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAggregateProductStatuses` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. A filter expression that filters the aggregate product statuses. + # Filtering is only supported by the `reporting_context` and `country` field. + # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.new + # + # # Call the list_aggregate_product_statuses method. + # result = client.list_aggregate_product_statuses request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus. + # p item + # end + # + def list_aggregate_product_statuses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_aggregate_product_statuses.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_aggregate_product_statuses.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_aggregate_product_statuses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aggregate_product_statuses_service_stub.list_aggregate_product_statuses request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @aggregate_product_statuses_service_stub, :list_aggregate_product_statuses, "aggregate_product_statuses", request, result, 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 AggregateProductStatusesService REST API. + # + # This class represents the configuration for AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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_aggregate_product_statuses to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AggregateProductStatusesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_aggregate_product_statuses` + # @return [::Gapic::Config::Method] + # + attr_reader :list_aggregate_product_statuses + + # @private + def initialize parent_rpcs = nil + list_aggregate_product_statuses_config = parent_rpcs.list_aggregate_product_statuses if parent_rpcs.respond_to? :list_aggregate_product_statuses + @list_aggregate_product_statuses = ::Gapic::Config::Method.new list_aggregate_product_statuses_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/service_stub.rb new file mode 100644 index 000000000000..ff6086c473ef --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/service_stub.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! + +require "google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + module AggregateProductStatusesService + module Rest + ## + # REST service stub for the AggregateProductStatusesService 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_aggregate_product_statuses REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse] + # A result object deserialized from the server's reply + def list_aggregate_product_statuses request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_aggregate_product_statuses_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_aggregate_product_statuses", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse.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_aggregate_product_statuses REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_aggregate_product_statuses_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/issueresolution/v1beta/{parent}/aggregateProductStatuses", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb new file mode 100644 index 000000000000..1b9082b49dac --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_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/shopping/merchant/issue_resolution/v1beta/version" + +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + ## + # Service to provide an issue resolution content for account issues and product + # issues. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new + # + module IssueResolutionService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "issue_resolution_service", "helpers.rb" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb new file mode 100644 index 000000000000..990770c9374b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb @@ -0,0 +1,709 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + module IssueResolutionService + ## + # Client for the IssueResolutionService service. + # + # Service to provide an issue resolution content for account issues and product + # issues. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :issue_resolution_service_stub + + ## + # Configure the IssueResolutionService Client class. + # + # See {::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IssueResolutionService clients + # ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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", "Shopping", "Merchant", "IssueResolution", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 + @issue_resolution_service_stub.universe_domain + end + + ## + # Create a new IssueResolutionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IssueResolutionService 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/shopping/merchant/issueresolution/v1beta/issueresolution_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 + + @issue_resolution_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 + ) + + @issue_resolution_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 + @issue_resolution_service_stub.logger + end + + # Service calls + + ## + # Provide a list of business's account issues with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + # + # @overload render_account_issues(request, options = nil) + # Pass arguments to `render_account_issues` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload render_account_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) + # Pass arguments to `render_account_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The account to fetch issues for. + # Format: `accounts/{account}` + # @param language_code [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize issue resolution content. If not set, the result will + # be in default language `en-US`. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload, ::Hash] + # Optional. The payload for configuring how the content should be rendered. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new + # + # # Call the render_account_issues method. + # result = client.render_account_issues request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse. + # p result + # + def render_account_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.render_account_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.render_account_issues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.render_account_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.call_rpc :render_account_issues, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Provide a list of issues for business's product with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + # + # @overload render_product_issues(request, options = nil) + # Pass arguments to `render_product_issues` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload render_product_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) + # Pass arguments to `render_product_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the product to fetch issues for. + # Format: `accounts/{account}/products/{product}` + # @param language_code [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize an issue resolution content. If not set, the result + # will be in default language `en-US`. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload, ::Hash] + # Optional. The payload for configuring how the content should be rendered. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new + # + # # Call the render_product_issues method. + # result = client.render_product_issues request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse. + # p result + # + def render_product_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.render_product_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.render_product_issues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.render_product_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.call_rpc :render_product_issues, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Start an action. The action can be requested by a business in + # third-party application. Before the business can request the action, the + # third-party application needs to show them action specific content and + # display a user input form. + # + # The action can be successfully started only once all `required` inputs are + # provided. If any `required` input is missing, or invalid value was + # provided, the service will return 400 error. Validation errors will contain + # {::Google::Shopping::Merchant::IssueResolution::V1beta::InputField#id Ids} for + # all problematic field together with translated, human readable error + # messages that can be shown to the user. + # + # @overload trigger_action(request, options = nil) + # Pass arguments to `trigger_action` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload trigger_action(name: nil, payload: nil, language_code: nil) + # Pass arguments to `trigger_action` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The business's account that is triggering the action. + # Format: `accounts/{account}` + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload, ::Hash] + # Required. The payload for the triggered action. + # @param language_code [::String] + # Optional. Language code [IETF BCP 47 + # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. + # If not set, the result will be in default language `en-US`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new + # + # # Call the trigger_action method. + # result = client.trigger_action request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse. + # p result + # + def trigger_action request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.trigger_action.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.trigger_action.timeout, + metadata: metadata, + retry_policy: @config.rpcs.trigger_action.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.call_rpc :trigger_action, request, 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 IssueResolutionService API. + # + # This class represents the configuration for IssueResolutionService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # render_account_issues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.render_account_issues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.render_account_issues.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 IssueResolutionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `render_account_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :render_account_issues + ## + # RPC-specific configuration for `render_product_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :render_product_issues + ## + # RPC-specific configuration for `trigger_action` + # @return [::Gapic::Config::Method] + # + attr_reader :trigger_action + + # @private + def initialize parent_rpcs = nil + render_account_issues_config = parent_rpcs.render_account_issues if parent_rpcs.respond_to? :render_account_issues + @render_account_issues = ::Gapic::Config::Method.new render_account_issues_config + render_product_issues_config = parent_rpcs.render_product_issues if parent_rpcs.respond_to? :render_product_issues + @render_product_issues = ::Gapic::Config::Method.new render_product_issues_config + trigger_action_config = parent_rpcs.trigger_action if parent_rpcs.respond_to? :trigger_action + @trigger_action = ::Gapic::Config::Method.new trigger_action_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb new file mode 100644 index 000000000000..eccf576084f2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_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 Shopping + module Merchant + module IssueResolution + module V1beta + module IssueResolutionService + # Credentials for the IssueResolutionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths.rb new file mode 100644 index 000000000000..f14b1990aa3c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_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 Shopping + module Merchant + module IssueResolution + module V1beta + module IssueResolutionService + # Path helper methods for the IssueResolutionService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified Product resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}` + # + # @param account [String] + # @param product [String] + # + # @return [::String] + def product_path account:, product: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/products/#{product}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest.rb new file mode 100644 index 000000000000..72b6ca65e326 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_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/shopping/merchant/issue_resolution/v1beta/version" + +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + ## + # Service to provide an issue resolution content for account issues and product + # issues. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new + # + module IssueResolutionService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb new file mode 100644 index 000000000000..e4eaf91a4c59 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb @@ -0,0 +1,645 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + module IssueResolutionService + module Rest + ## + # REST client for the IssueResolutionService service. + # + # Service to provide an issue resolution content for account issues and product + # issues. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :issue_resolution_service_stub + + ## + # Configure the IssueResolutionService Client class. + # + # See {::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IssueResolutionService clients + # ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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", "Shopping", "Merchant", "IssueResolution", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 + @issue_resolution_service_stub.universe_domain + end + + ## + # Create a new IssueResolutionService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IssueResolutionService 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 + + @issue_resolution_service_stub = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @issue_resolution_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 + @issue_resolution_service_stub.logger + end + + # Service calls + + ## + # Provide a list of business's account issues with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + # + # @overload render_account_issues(request, options = nil) + # Pass arguments to `render_account_issues` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload render_account_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) + # Pass arguments to `render_account_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The account to fetch issues for. + # Format: `accounts/{account}` + # @param language_code [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize issue resolution content. If not set, the result will + # be in default language `en-US`. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload, ::Hash] + # Optional. The payload for configuring how the content should be rendered. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new + # + # # Call the render_account_issues method. + # result = client.render_account_issues request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse. + # p result + # + def render_account_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.render_account_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.render_account_issues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.render_account_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.render_account_issues request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Provide a list of issues for business's product with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + # + # @overload render_product_issues(request, options = nil) + # Pass arguments to `render_product_issues` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload render_product_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) + # Pass arguments to `render_product_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the product to fetch issues for. + # Format: `accounts/{account}/products/{product}` + # @param language_code [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize an issue resolution content. If not set, the result + # will be in default language `en-US`. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload, ::Hash] + # Optional. The payload for configuring how the content should be rendered. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new + # + # # Call the render_product_issues method. + # result = client.render_product_issues request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse. + # p result + # + def render_product_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.render_product_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.render_product_issues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.render_product_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.render_product_issues request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Start an action. The action can be requested by a business in + # third-party application. Before the business can request the action, the + # third-party application needs to show them action specific content and + # display a user input form. + # + # The action can be successfully started only once all `required` inputs are + # provided. If any `required` input is missing, or invalid value was + # provided, the service will return 400 error. Validation errors will contain + # {::Google::Shopping::Merchant::IssueResolution::V1beta::InputField#id Ids} for + # all problematic field together with translated, human readable error + # messages that can be shown to the user. + # + # @overload trigger_action(request, options = nil) + # Pass arguments to `trigger_action` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload trigger_action(name: nil, payload: nil, language_code: nil) + # Pass arguments to `trigger_action` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The business's account that is triggering the action. + # Format: `accounts/{account}` + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload, ::Hash] + # Required. The payload for the triggered action. + # @param language_code [::String] + # Optional. Language code [IETF BCP 47 + # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. + # If not set, the result will be in default language `en-US`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new + # + # # Call the trigger_action method. + # result = client.trigger_action request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse. + # p result + # + def trigger_action request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.trigger_action.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.trigger_action.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.trigger_action.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.trigger_action request, 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 IssueResolutionService REST API. + # + # This class represents the configuration for IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 + # # render_account_issues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.render_account_issues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.render_account_issues.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 IssueResolutionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `render_account_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :render_account_issues + ## + # RPC-specific configuration for `render_product_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :render_product_issues + ## + # RPC-specific configuration for `trigger_action` + # @return [::Gapic::Config::Method] + # + attr_reader :trigger_action + + # @private + def initialize parent_rpcs = nil + render_account_issues_config = parent_rpcs.render_account_issues if parent_rpcs.respond_to? :render_account_issues + @render_account_issues = ::Gapic::Config::Method.new render_account_issues_config + render_product_issues_config = parent_rpcs.render_product_issues if parent_rpcs.respond_to? :render_product_issues + @render_product_issues = ::Gapic::Config::Method.new render_product_issues_config + trigger_action_config = parent_rpcs.trigger_action if parent_rpcs.respond_to? :trigger_action + @trigger_action = ::Gapic::Config::Method.new trigger_action_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb new file mode 100644 index 000000000000..da239060f51e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb @@ -0,0 +1,269 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/issueresolution/v1beta/issueresolution_pb" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + module IssueResolutionService + module Rest + ## + # REST service stub for the IssueResolutionService 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 render_account_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] + # A result object deserialized from the server's reply + def render_account_issues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_render_account_issues_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "render_account_issues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the render_product_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] + # A result object deserialized from the server's reply + def render_product_issues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_render_product_issues_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "render_product_issues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the trigger_action REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] + # A result object deserialized from the server's reply + def trigger_action request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_trigger_action_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "trigger_action", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse.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 render_account_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_render_account_issues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/issueresolution/v1beta/{name}:renderaccountissues", + body: "payload", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the render_product_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_render_product_issues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/issueresolution/v1beta/{name}:renderproductissues", + body: "payload", + matches: [ + ["name", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the trigger_action REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_trigger_action_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/issueresolution/v1beta/{name}:triggeraction", + body: "payload", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb new file mode 100644 index 000000000000..1c59e12954b2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/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/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" +require "google/shopping/merchant/issue_resolution/v1beta/version" + +module Google + module Shopping + module Merchant + module IssueResolution + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/issue_resolution/v1beta/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb new file mode 100644 index 000000000000..922af54d10ff --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/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 Shopping + module Merchant + module IssueResolution + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb.rb new file mode 100644 index 000000000000..85bcd8b3f4d4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.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/shopping/type/types_pb' + + +descriptor_data = "\nNgoogle/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.proto\x12/google.shopping.merchant.issueresolution.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xb6\x01\n#ListAggregateProductStatusesRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31merchantapi.googleapis.com/AggregateProductStatus\x12\x16\n\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\"\xac\x01\n$ListAggregateProductStatusesResponse\x12k\n\x1a\x61ggregate_product_statuses\x18\x01 \x03(\x0b\x32G.google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa4\t\n\x16\x41ggregateProductStatus\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12V\n\x11reporting_context\x18\x03 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\x12\x0f\n\x07\x63ountry\x18\x04 \x01(\t\x12\\\n\x05stats\x18\x05 \x01(\x0b\x32M.google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.Stats\x12q\n\x11item_level_issues\x18\x06 \x03(\x0b\x32V.google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue\x1ag\n\x05Stats\x12\x14\n\x0c\x61\x63tive_count\x18\x01 \x01(\x03\x12\x15\n\rpending_count\x18\x02 \x01(\x03\x12\x19\n\x11\x64isapproved_count\x18\x03 \x01(\x03\x12\x16\n\x0e\x65xpiring_count\x18\x04 \x01(\x03\x1a\x9f\x04\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12q\n\x08severity\x18\x02 \x01(\x0e\x32_.google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue.Severity\x12u\n\nresolution\x18\x03 \x01(\x0e\x32\x61.google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue.Resolution\x12\x11\n\tattribute\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x07 \x01(\t\x12\x19\n\x11\x64ocumentation_uri\x18\x08 \x01(\t\x12\x15\n\rproduct_count\x18\t \x01(\x03\"T\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0b\n\x07\x44\x45MOTED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03\"U\n\nResolution\x12\x1a\n\x16RESOLUTION_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_ACTION\x10\x01\x12\x16\n\x12PENDING_PROCESSING\x10\x02:\xb1\x01\xea\x41\xad\x01\n1merchantapi.googleapis.com/AggregateProductStatus\x12\x46\x61\x63\x63ounts/{account}/aggregateProductStatuses/{aggregate_product_status}*\x18\x61ggregateProductStatuses2\x16\x61ggregateProductStatus2\x8f\x03\n\x1f\x41ggregateProductStatusesService\x12\xa2\x02\n\x1cListAggregateProductStatuses\x12T.google.shopping.merchant.issueresolution.v1beta.ListAggregateProductStatusesRequest\x1aU.google.shopping.merchant.issueresolution.v1beta.ListAggregateProductStatusesResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/issueresolution/v1beta/{parent=accounts/*}/aggregateProductStatuses\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xd5\x02\n3com.google.shopping.merchant.issueresolution.v1betaB\x1d\x41ggregateProductStatusesProtoP\x01Zccloud.google.com/go/shopping/merchant/issueresolution/apiv1beta/issueresolutionpb;issueresolutionpb\xaa\x02/Google.Shopping.Merchant.IssueResolution.V1Beta\xca\x02/Google\\Shopping\\Merchant\\IssueResolution\\V1beta\xea\x02\x33Google::Shopping::Merchant::IssueResolution::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + ListAggregateProductStatusesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ListAggregateProductStatusesRequest").msgclass + ListAggregateProductStatusesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ListAggregateProductStatusesResponse").msgclass + AggregateProductStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus").msgclass + AggregateProductStatus::Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.Stats").msgclass + AggregateProductStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue").msgclass + AggregateProductStatus::ItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue.Severity").enummodule + AggregateProductStatus::ItemLevelIssue::Resolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue.Resolution").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_services_pb.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_services_pb.rb new file mode 100644 index 000000000000..1b071933d7bf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.proto for package 'Google.Shopping.Merchant.IssueResolution.V1beta' +# 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/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb' + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + module AggregateProductStatusesService + # Service to manage aggregate product statuses. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.issueresolution.v1beta.AggregateProductStatusesService' + + # Lists the `AggregateProductStatuses` resources for your merchant account. + # The response might contain fewer items than specified by `pageSize`. + # If `pageToken` was returned in previous request, it can be used to obtain + # additional results. + rpc :ListAggregateProductStatuses, ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest, ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb new file mode 100644 index 000000000000..bbfba5124255 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/issueresolution/v1beta/issueresolution.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 = "\nEgoogle/shopping/merchant/issueresolution/v1beta/issueresolution.proto\x12/google.shopping.merchant.issueresolution.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"v\n\x1bRenderAccountIssuesResponse\x12W\n\x0frendered_issues\x18\x01 \x03(\x0b\x32>.google.shopping.merchant.issueresolution.v1beta.RenderedIssue\"\xed\x01\n\x1aRenderAccountIssuesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x07payload\x18\x04 \x01(\x0b\x32K.google.shopping.merchant.issueresolution.v1beta.RenderIssuesRequestPayloadB\x03\xe0\x41\x01\"\xab\x02\n\x1aRenderIssuesRequestPayload\x12`\n\x0e\x63ontent_option\x18\x01 \x01(\x0e\x32>.google.shopping.merchant.issueresolution.v1beta.ContentOptionB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12{\n\x18user_input_action_option\x18\x02 \x01(\x0e\x32O.google.shopping.merchant.issueresolution.v1beta.UserInputActionRenderingOptionB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x11\n\x0f_content_optionB\x1b\n\x19_user_input_action_option\"v\n\x1bRenderProductIssuesResponse\x12W\n\x0frendered_issues\x18\x01 \x03(\x0b\x32>.google.shopping.merchant.issueresolution.v1beta.RenderedIssue\"\xed\x01\n\x1aRenderProductIssuesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Product\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x07payload\x18\x04 \x01(\x0b\x32K.google.shopping.merchant.issueresolution.v1beta.RenderIssuesRequestPayloadB\x03\xe0\x41\x01\"\xb5\x02\n\rRenderedIssue\x12\x1d\n\x13prerendered_content\x18\x03 \x01(\tH\x00\x12\x35\n+prerendered_out_of_court_dispute_settlement\x18\x05 \x01(\tH\x01\x12\r\n\x05title\x18\x01 \x01(\t\x12G\n\x06impact\x18\x02 \x01(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1beta.Impact\x12H\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1beta.ActionB\t\n\x07\x63ontentB!\n\x1fout_of_court_dispute_settlement\"\xbb\x01\n\x06Impact\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12K\n\x08severity\x18\x02 \x01(\x0e\x32\x39.google.shopping.merchant.issueresolution.v1beta.Severity\x12N\n\nbreakdowns\x18\x03 \x03(\x0b\x32:.google.shopping.merchant.issueresolution.v1beta.Breakdown\"\x96\x01\n\tBreakdown\x12R\n\x07regions\x18\x01 \x03(\x0b\x32\x41.google.shopping.merchant.issueresolution.v1beta.Breakdown.Region\x12\x0f\n\x07\x64\x65tails\x18\x04 \x03(\t\x1a$\n\x06Region\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\xda\x04\n\x06\x41\x63tion\x12\x65\n\x15\x62uiltin_simple_action\x18\x02 \x01(\x0b\x32\x44.google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleActionH\x00\x12Z\n\x0f\x65xternal_action\x18\x03 \x01(\x0b\x32?.google.shopping.merchant.issueresolution.v1beta.ExternalActionH\x00\x12l\n\x19\x62uiltin_user_input_action\x18\x07 \x01(\x0b\x32G.google.shopping.merchant.issueresolution.v1beta.BuiltInUserInputActionH\x00\x12\x14\n\x0c\x62utton_label\x18\x04 \x01(\t\x12\x14\n\x0cis_available\x18\x05 \x01(\x08\x12O\n\x07reasons\x18\x06 \x03(\x0b\x32>.google.shopping.merchant.issueresolution.v1beta.Action.Reason\x1a\x97\x01\n\x06Reason\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x13\n\x06\x64\x65tail\x18\x02 \x01(\tH\x00\x88\x01\x01\x12Q\n\x06\x61\x63tion\x18\x03 \x01(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1beta.ActionB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\t\n\x07_detailB\t\n\x07_actionB\x08\n\x06\x61\x63tion\"\x98\x05\n\x13\x42uiltInSimpleAction\x12j\n\x04type\x18\x01 \x01(\x0e\x32\\.google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.BuiltInSimpleActionType\x12\x1b\n\x0e\x61ttribute_code\x18\x02 \x01(\tH\x00\x88\x01\x01\x12w\n\x12\x61\x64\x64itional_content\x18\x03 \x01(\x0b\x32V.google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.AdditionalContentH\x01\x88\x01\x01\x1a\x36\n\x11\x41\x64\x64itionalContent\x12\r\n\x05title\x18\x01 \x01(\t\x12\x12\n\nparagraphs\x18\x02 \x03(\t\"\x9c\x02\n\x17\x42uiltInSimpleActionType\x12+\n\'BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cVERIFY_PHONE\x10\x01\x12\x11\n\rCLAIM_WEBSITE\x10\x02\x12\x10\n\x0c\x41\x44\x44_PRODUCTS\x10\x03\x12\x14\n\x10\x41\x44\x44_CONTACT_INFO\x10\x04\x12\x14\n\x10LINK_ADS_ACCOUNT\x10\x05\x12$\n ADD_BUSINESS_REGISTRATION_NUMBER\x10\x06\x12\x17\n\x13\x45\x44IT_ITEM_ATTRIBUTE\x10\x07\x12\x15\n\x11\x46IX_ACCOUNT_ISSUE\x10\x08\x12\x1b\n\x17SHOW_ADDITIONAL_CONTENT\x10\tB\x11\n\x0f_attribute_codeB\x15\n\x13_additional_content\"|\n\x16\x42uiltInUserInputAction\x12\x16\n\x0e\x61\x63tion_context\x18\x01 \x01(\t\x12J\n\x05\x66lows\x18\x03 \x03(\x0b\x32;.google.shopping.merchant.issueresolution.v1beta.ActionFlow\"\x83\x03\n\nActionFlow\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12K\n\x06inputs\x18\x03 \x03(\x0b\x32;.google.shopping.merchant.issueresolution.v1beta.InputField\x12\x14\n\x0c\x64ialog_title\x18\x04 \x01(\t\x12]\n\x0e\x64ialog_message\x18\x07 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltipH\x00\x88\x01\x01\x12U\n\x0e\x64ialog_callout\x18\x08 \x01(\x0b\x32\x38.google.shopping.merchant.issueresolution.v1beta.CalloutH\x01\x88\x01\x01\x12\x1b\n\x13\x64ialog_button_label\x18\t \x01(\tB\x11\n\x0f_dialog_messageB\x11\n\x0f_dialog_callout\"\xb6\t\n\nInputField\x12[\n\ntext_input\x18\x04 \x01(\x0b\x32\x45.google.shopping.merchant.issueresolution.v1beta.InputField.TextInputH\x00\x12_\n\x0c\x63hoice_input\x18\x05 \x01(\x0b\x32G.google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInputH\x00\x12\x63\n\x0e\x63heckbox_input\x18\x06 \x01(\x0b\x32I.google.shopping.merchant.issueresolution.v1beta.InputField.CheckboxInputH\x00\x12\n\n\x02id\x18\x01 \x01(\t\x12O\n\x05label\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltip\x12\x10\n\x08required\x18\x03 \x01(\x08\x1a\x95\x03\n\tTextInput\x12\x61\n\x04type\x18\x01 \x01(\x0e\x32S.google.shopping.merchant.issueresolution.v1beta.InputField.TextInput.TextInputType\x12^\n\x0f\x61\x64\x64itional_info\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltipH\x00\x88\x01\x01\x12\x18\n\x0b\x66ormat_info\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x17\n\naria_label\x18\x04 \x01(\tH\x02\x88\x01\x01\"_\n\rTextInputType\x12\x1f\n\x1bTEXT_INPUT_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12GENERIC_SHORT_TEXT\x10\x01\x12\x15\n\x11GENERIC_LONG_TEXT\x10\x02\x42\x12\n\x10_additional_infoB\x0e\n\x0c_format_infoB\r\n\x0b_aria_label\x1a\xdd\x02\n\x0b\x43hoiceInput\x12j\n\x07options\x18\x01 \x03(\x0b\x32Y.google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput.ChoiceInputOption\x1a\xe1\x01\n\x11\x43hoiceInputOption\x12\n\n\x02id\x18\x01 \x01(\t\x12O\n\x05label\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltip\x12Z\n\x10\x61\x64\x64itional_input\x18\x03 \x01(\x0b\x32;.google.shopping.merchant.issueresolution.v1beta.InputFieldH\x00\x88\x01\x01\x42\x13\n\x11_additional_input\x1a\x0f\n\rCheckboxInputB\r\n\x0bvalue_input\"\xa2\x02\n\x0fTextWithTooltip\x12\x16\n\x0csimple_value\x18\x01 \x01(\tH\x00\x12\x1e\n\x14simple_tooltip_value\x18\x02 \x01(\tH\x01\x12m\n\x12tooltip_icon_style\x18\x03 \x01(\x0e\x32Q.google.shopping.merchant.issueresolution.v1beta.TextWithTooltip.TooltipIconStyle\"N\n\x10TooltipIconStyle\x12\"\n\x1eTOOLTIP_ICON_STYLE_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0c\n\x08QUESTION\x10\x02\x42\x07\n\x05valueB\x0f\n\rtooltip_value\"\x9a\x02\n\x07\x43\x61llout\x12]\n\nstyle_hint\x18\x01 \x01(\x0e\x32I.google.shopping.merchant.issueresolution.v1beta.Callout.CalloutStyleHint\x12V\n\x0c\x66ull_message\x18\x03 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltip\"X\n\x10\x43\x61lloutStyleHint\x12\"\n\x1e\x43\x41LLOUT_STYLE_HINT_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\x08\n\x04INFO\x10\x03\"\xdf\x02\n\x0e\x45xternalAction\x12`\n\x04type\x18\x01 \x01(\x0e\x32R.google.shopping.merchant.issueresolution.v1beta.ExternalAction.ExternalActionType\x12\x0b\n\x03uri\x18\x02 \x01(\t\"\xdd\x01\n\x12\x45xternalActionType\x12$\n EXTERNAL_ACTION_TYPE_UNSPECIFIED\x10\x00\x12+\n\'REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER\x10\x01\x12+\n\'REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER\x10\x02\x12\x1f\n\x1bLEGAL_APPEAL_IN_HELP_CENTER\x10\x03\x12&\n\"VERIFY_IDENTITY_IN_MERCHANT_CENTER\x10\x04\"\xc9\x01\n\x14TriggerActionRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12[\n\x07payload\x18\x02 \x01(\x0b\x32\x45.google.shopping.merchant.issueresolution.v1beta.TriggerActionPayloadB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x8c\x01\n\x14TriggerActionPayload\x12\x1b\n\x0e\x61\x63tion_context\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12W\n\x0c\x61\x63tion_input\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1beta.ActionInputB\x03\xe0\x41\x02\"(\n\x15TriggerActionResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\"\x82\x01\n\x0b\x41\x63tionInput\x12\x1b\n\x0e\x61\x63tion_flow_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12V\n\x0cinput_values\x18\x02 \x03(\x0b\x32;.google.shopping.merchant.issueresolution.v1beta.InputValueB\x03\xe0\x41\x02\"\xff\x03\n\nInputValue\x12\x66\n\x10text_input_value\x18\x02 \x01(\x0b\x32J.google.shopping.merchant.issueresolution.v1beta.InputValue.TextInputValueH\x00\x12j\n\x12\x63hoice_input_value\x18\x03 \x01(\x0b\x32L.google.shopping.merchant.issueresolution.v1beta.InputValue.ChoiceInputValueH\x00\x12n\n\x14\x63heckbox_input_value\x18\x04 \x01(\x0b\x32N.google.shopping.merchant.issueresolution.v1beta.InputValue.CheckboxInputValueH\x00\x12\x1b\n\x0einput_field_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a$\n\x0eTextInputValue\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\x37\n\x10\x43hoiceInputValue\x12#\n\x16\x63hoice_input_option_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a(\n\x12\x43heckboxInputValue\x12\x12\n\x05value\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x42\x07\n\x05value*F\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\x08\n\x04INFO\x10\x03*F\n\rContentOption\x12\x1e\n\x1a\x43ONTENT_OPTION_UNSPECIFIED\x10\x00\x12\x15\n\x11PRE_RENDERED_HTML\x10\x01*\x96\x01\n\x1eUserInputActionRenderingOption\x12\x32\n.USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED\x10\x00\x12\x1f\n\x1bREDIRECT_TO_MERCHANT_CENTER\x10\x01\x12\x1f\n\x1b\x42UILT_IN_USER_INPUT_ACTIONS\x10\x02\x32\xf2\x06\n\x16IssueResolutionService\x12\x87\x02\n\x13RenderAccountIssues\x12K.google.shopping.merchant.issueresolution.v1beta.RenderAccountIssuesRequest\x1aL.google.shopping.merchant.issueresolution.v1beta.RenderAccountIssuesResponse\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\"=/issueresolution/v1beta/{name=accounts/*}:renderaccountissues:\x07payload\x12\x92\x02\n\x13RenderProductIssues\x12K.google.shopping.merchant.issueresolution.v1beta.RenderProductIssuesRequest\x1aL.google.shopping.merchant.issueresolution.v1beta.RenderProductIssuesResponse\"`\xda\x41\x04name\x82\xd3\xe4\x93\x02S\"H/issueresolution/v1beta/{name=accounts/*/products/*}:renderproductissues:\x07payload\x12\xef\x01\n\rTriggerAction\x12\x45.google.shopping.merchant.issueresolution.v1beta.TriggerActionRequest\x1a\x46.google.shopping.merchant.issueresolution.v1beta.TriggerActionResponse\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\"7/issueresolution/v1beta/{name=accounts/*}:triggeraction:\x07payload\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xd5\x03\n3com.google.shopping.merchant.issueresolution.v1betaB\x14IssueResolutionProtoP\x01Zccloud.google.com/go/shopping/merchant/issueresolution/apiv1beta/issueresolutionpb;issueresolutionpb\xaa\x02/Google.Shopping.Merchant.IssueResolution.V1Beta\xca\x02/Google\\Shopping\\Merchant\\IssueResolution\\V1beta\xea\x02\x33Google::Shopping::Merchant::IssueResolution::V1beta\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + RenderAccountIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderAccountIssuesResponse").msgclass + RenderAccountIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderAccountIssuesRequest").msgclass + RenderIssuesRequestPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderIssuesRequestPayload").msgclass + RenderProductIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderProductIssuesResponse").msgclass + RenderProductIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderProductIssuesRequest").msgclass + RenderedIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderedIssue").msgclass + Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Impact").msgclass + Breakdown = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Breakdown").msgclass + Breakdown::Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Breakdown.Region").msgclass + Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Action").msgclass + Action::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Action.Reason").msgclass + BuiltInSimpleAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction").msgclass + BuiltInSimpleAction::AdditionalContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.AdditionalContent").msgclass + BuiltInSimpleAction::BuiltInSimpleActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.BuiltInSimpleActionType").enummodule + BuiltInUserInputAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.BuiltInUserInputAction").msgclass + ActionFlow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ActionFlow").msgclass + InputField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField").msgclass + InputField::TextInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.TextInput").msgclass + InputField::TextInput::TextInputType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.TextInput.TextInputType").enummodule + InputField::ChoiceInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput").msgclass + InputField::ChoiceInput::ChoiceInputOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput.ChoiceInputOption").msgclass + InputField::CheckboxInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.CheckboxInput").msgclass + TextWithTooltip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TextWithTooltip").msgclass + TextWithTooltip::TooltipIconStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TextWithTooltip.TooltipIconStyle").enummodule + Callout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Callout").msgclass + Callout::CalloutStyleHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Callout.CalloutStyleHint").enummodule + ExternalAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ExternalAction").msgclass + ExternalAction::ExternalActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ExternalAction.ExternalActionType").enummodule + TriggerActionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TriggerActionRequest").msgclass + TriggerActionPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TriggerActionPayload").msgclass + TriggerActionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TriggerActionResponse").msgclass + ActionInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ActionInput").msgclass + InputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputValue").msgclass + InputValue::TextInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputValue.TextInputValue").msgclass + InputValue::ChoiceInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputValue.ChoiceInputValue").msgclass + InputValue::CheckboxInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputValue.CheckboxInputValue").msgclass + Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Severity").enummodule + ContentOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ContentOption").enummodule + UserInputActionRenderingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.UserInputActionRenderingOption").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb new file mode 100644 index 000000000000..485d5f24b813 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/issueresolution/v1beta/issueresolution.proto for package 'Google.Shopping.Merchant.IssueResolution.V1beta' +# 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb' + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + module IssueResolutionService + # Service to provide an issue resolution content for account issues and product + # issues. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.issueresolution.v1beta.IssueResolutionService' + + # Provide a list of business's account issues with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + rpc :RenderAccountIssues, ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest, ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse + # Provide a list of issues for business's product with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + rpc :RenderProductIssues, ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest, ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse + # Start an action. The action can be requested by a business in + # third-party application. Before the business can request the action, the + # third-party application needs to show them action specific content and + # display a user input form. + # + # The action can be successfully started only once all `required` inputs are + # provided. If any `required` input is missing, or invalid value was + # provided, the service will return 400 error. Validation errors will contain + # [Ids][google.shopping.merchant.issueresolution.v1beta.InputField.id] for + # all problematic field together with translated, human readable error + # messages that can be shown to the user. + rpc :TriggerAction, ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest, ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1BETA 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-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.rb new file mode 100644 index 000000000000..5bde22009eec --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.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 Shopping + module Merchant + module IssueResolution + module V1beta + # Request message for the `ListAggregateProductStatuses` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list aggregate product statuses for. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of aggregate product statuses to return. The + # service may return fewer than this value. If unspecified, at most 25 + # aggregate product statuses are returned. The maximum value is 250; values + # above 250 are coerced to 250. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListAggregateProductStatuses` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAggregateProductStatuses` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the aggregate product statuses. + # Filtering is only supported by the `reporting_context` and `country` field. + # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. + class ListAggregateProductStatusesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListAggregateProductStatuses` method. + # @!attribute [rw] aggregate_product_statuses + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus>] + # The `AggregateProductStatuses` resources for the given account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListAggregateProductStatusesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Aggregate product statuses for a given reporting context and country. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the `AggregateProductStatuses` resource. + # Format: + # `accounts/{account}/aggregateProductStatuses/{aggregateProductStatuses}` + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # The reporting context of the aggregate product statuses. + # @!attribute [rw] country + # @return [::String] + # The country of the aggregate product statuses. Represented as a + # [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). + # @!attribute [rw] stats + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus::Stats] + # Products statistics for the given reporting context and country. + # @!attribute [rw] item_level_issues + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus::ItemLevelIssue>] + # The product issues that affect the given reporting context and country. + class AggregateProductStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Products statistics. + # @!attribute [rw] active_count + # @return [::Integer] + # The number of products that are active. + # @!attribute [rw] pending_count + # @return [::Integer] + # The number of products that are pending. + # @!attribute [rw] disapproved_count + # @return [::Integer] + # The number of products that are disapproved. + # @!attribute [rw] expiring_count + # @return [::Integer] + # The number of products that are expiring. + class Stats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ItemLevelIssue of the product status. + # @!attribute [rw] code + # @return [::String] + # The error code of the issue. + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus::ItemLevelIssue::Severity] + # How this issue affects serving of the offer. + # @!attribute [rw] resolution + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus::ItemLevelIssue::Resolution] + # Whether the issue can be resolved by the merchant. + # @!attribute [rw] attribute + # @return [::String] + # The attribute's name, if the issue is caused by a single attribute. + # @!attribute [rw] description + # @return [::String] + # A short issue description in English. + # @!attribute [rw] detail + # @return [::String] + # A detailed issue description in English. + # @!attribute [rw] documentation_uri + # @return [::String] + # The URL of a web page to help with resolving this issue. + # @!attribute [rw] product_count + # @return [::Integer] + # The number of products affected by this issue. + class ItemLevelIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # How the issue affects the serving of the product. + module Severity + # Not specified. + SEVERITY_UNSPECIFIED = 0 + + # This issue represents a warning and does not have a direct affect + # on the product. + NOT_IMPACTED = 1 + + # The product is demoted and most likely have limited performance + # in search results + DEMOTED = 2 + + # Issue disapproves the product. + DISAPPROVED = 3 + end + + # How the issue can be resolved. + module Resolution + # Not specified. + RESOLUTION_UNSPECIFIED = 0 + + # The issue can be resolved by the merchant. + MERCHANT_ACTION = 1 + + # The issue will be resolved auomatically. + PENDING_PROCESSING = 2 + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb new file mode 100644 index 000000000000..0666344d3cdd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb @@ -0,0 +1,954 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + # Response containing an issue resolution content and actions for listed + # account issues. + # @!attribute [rw] rendered_issues + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue>] + # List of account issues for a given account. + # + # This list can be shown with compressed, expandable items. In the compressed + # form, the title and impact should be shown for each issue. Once the issue + # is expanded, the detailed + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#prerendered_content content} + # and available + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#actions actions} + # should be rendered. + class RenderAccountIssuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to provide issue resolution content and actions for business's + # account issues. + # @!attribute [rw] name + # @return [::String] + # Required. The account to fetch issues for. + # Format: `accounts/{account}` + # @!attribute [rw] language_code + # @return [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize issue resolution content. If not set, the result will + # be in default language `en-US`. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @!attribute [rw] payload + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload] + # Optional. The payload for configuring how the content should be rendered. + class RenderAccountIssuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The payload for configuring how the content should be rendered. + # @!attribute [rw] content_option + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ContentOption] + # Optional. How the detailed content should be returned. Default option is to + # return the content as a pre-rendered HTML text. + # @!attribute [rw] user_input_action_option + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::UserInputActionRenderingOption] + # Optional. How actions with user input form should be handled. If not + # provided, actions will be returned as links that points the business to + # Merchant Center where they can request the action. + class RenderIssuesRequestPayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response containing an issue resolution content and actions for listed + # product issues. + # @!attribute [rw] rendered_issues + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue>] + # List of issues for a given product. + # + # This list can be shown with compressed, expandable items. In the compressed + # form, the + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#title title} + # and + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#impact impact} + # should be shown for each issue. Once the issue is expanded, the detailed + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#prerendered_content content} + # and available + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#actions actions} + # should be rendered. + class RenderProductIssuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to provide an issue resolution content and actions for product issues + # of business's product. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the product to fetch issues for. + # Format: `accounts/{account}/products/{product}` + # @!attribute [rw] language_code + # @return [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize an issue resolution content. If not set, the result + # will be in default language `en-US`. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @!attribute [rw] payload + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload] + # Optional. The payload for configuring how the content should be rendered. + class RenderProductIssuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An issue affecting specific business or their product. + # @!attribute [rw] prerendered_content + # @return [::String] + # Details of the issue as a pre-rendered HTML. HTML elements contain CSS + # classes that can be used to customize the style of the content. + # + # Always sanitize the HTML before embedding it directly to your + # application. The sanitizer needs to allow basic HTML tags, such as: + # `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, + # you can use [DOMPurify](https://www.npmjs.com/package/dompurify). + # + # CSS classes: + # + # * `issue-detail` - top level container for the detail of the issue + # * `callout-banners` - section of the `issue-detail` with callout banners + # * `callout-banner` - single callout banner, inside `callout-banners` + # * `callout-banner-info` - callout with important information (default) + # * `callout-banner-warning` - callout with a warning + # * `callout-banner-error` - callout informing about an error (most severe) + # * `issue-content` - section of the `issue-detail`, contains multiple + # `content-element` + # * `content-element` - content element such as a list, link or paragraph, + # inside `issue-content` + # * `root-causes` - unordered list with items describing root causes of the + # issue, inside `issue-content` + # * `root-causes-intro` - intro text before the `root-causes` list, inside + # `issue-content` + # * `segment` - section of the text, `span` inside paragraph + # * `segment-attribute` - section of the text that represents a product + # attribute, for example 'image\_link' + # * `segment-literal` - section of the text that contains a special value, + # for example '0-1000 kg' + # * `segment-bold` - section of the text that should be rendered as bold + # * `segment-italic` - section of the text that should be rendered as + # italic + # * `tooltip` - used on paragraphs that should be rendered with a tooltip. + # A section of the text in such a paragraph will have a class + # `tooltip-text` and is intended to be shown in a mouse over dialog. If the + # style is not used, the `tooltip-text` section would be shown on a new + # line, after the main part of the text. + # * `tooltip-text` - marks a section of the text within a `tooltip`, that + # is intended to be shown in a mouse over dialog. + # * `tooltip-icon` - marks a section of the text within a `tooltip`, that + # can be replaced with a tooltip icon, for example '?' or 'i'. By default, + # this section contains a `br` tag, that is separating the main text and + # the tooltip text when the style is not used. + # * `tooltip-style-question` - the tooltip shows helpful information, + # can use the '?' as an icon. + # * `tooltip-style-info` - the tooltip adds additional information fitting + # to the context, can use the 'i' as an icon. + # * `content-moderation` - marks the paragraph that explains how the issue + # was identified. + # * `new-element` - Present for new elements added to the pre-rendered + # content in the future. To make sure that a new content element does not + # break your style, you can hide everything with this class. + # @!attribute [rw] prerendered_out_of_court_dispute_settlement + # @return [::String] + # Pre-rendered HTML that contains a link to the external location where the + # ODS can be requested and instructions for how to request it. HTML + # elements contain CSS classes that can be used to customize the style of + # this snippet. + # + # Always sanitize the HTML before embedding it directly to your + # application. The sanitizer needs to allow basic HTML tags, such as: + # `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, + # you can use [DOMPurify](https://www.npmjs.com/package/dompurify). + # + # CSS classes: + # + # * `ods-section`* - wrapper around the out-of-court dispute resolution + # section + # * `ods-description`* - intro text for the out-of-court dispute + # resolution. It may contain multiple segments and a link. + # * `ods-param`* - wrapper around the header-value pair for parameters that + # the business may need to provide during the ODS process. + # * `ods-routing-id`* - ods param for the Routing ID. + # * `ods-reference-id`* - ods param for the Routing ID. + # * `ods-param-header`* - header for the ODS parameter + # * `ods-param-value`* - value of the ODS parameter. This value should be + # rendered in a way that it is easy for the user to identify and copy. + # * `segment` - section of the text, `span` inside paragraph + # * `segment-attribute` - section of the text that represents a product + # attribute, for example 'image\_link' + # * `segment-literal` - section of the text that contains a special value, + # for example '0-1000 kg' + # * `segment-bold` - section of the text that should be rendered as bold + # * `segment-italic` - section of the text that should be rendered as + # italic + # * `tooltip` - used on paragraphs that should be rendered with a tooltip. + # A section of the text in such a paragraph will have a class + # `tooltip-text` and is intended to be shown in a mouse over dialog. If the + # style is not used, the `tooltip-text` section would be shown on a new + # line, after the main part of the text. + # * `tooltip-text` - marks a section of the text within a `tooltip`, that + # is intended to be shown in a mouse over dialog. + # * `tooltip-icon` - marks a section of the text within a `tooltip`, that + # can be replaced with a tooltip icon, for example '?' or 'i'. By default, + # this section contains a `br` tag, that is separating the main text and + # the tooltip text when the style is not used. + # * `tooltip-style-question` - the tooltip shows helpful information, + # can use the '?' as an icon. + # * `tooltip-style-info` - the tooltip adds additional information fitting + # to the context, can use the 'i' as an icon. + # @!attribute [rw] title + # @return [::String] + # Title of the issue. + # @!attribute [rw] impact + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Impact] + # Clarifies the severity of the issue. + # + # The [summarizing + # message][google.shopping.merchant.issueresolution.v1beta.Impact.message], + # if present, should be shown right under the title for each issue. It helps + # business to quickly understand the impact of the issue. + # + # The detailed + # {::Google::Shopping::Merchant::IssueResolution::V1beta::Impact#breakdowns breakdown} + # helps the business to fully understand the impact of the issue. It can be + # rendered as dialog that opens when the business mouse over the summarized + # impact statement. + # + # Issues with different + # {::Google::Shopping::Merchant::IssueResolution::V1beta::Impact#severity severity} + # can be styled differently. They may use a different color or icon to signal + # the difference between `ERROR`, `WARNING` and `INFO`. + # @!attribute [rw] actions + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::Action>] + # A list of actionable steps that can be executed to solve the issue. An + # example is requesting a re-review or providing arguments when business + # disagrees with the issue. + # + # Actions that are supported in (your) third-party application can be + # rendered as buttons and should be available to the business when they + # expand the issue. + class RenderedIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Overall impact of the issue. + # @!attribute [rw] message + # @return [::String] + # Optional. Message summarizing the overall impact of the issue. If present, + # it should be rendered to the business. For example: "Disapproves 90k offers + # in 25 countries" + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Severity] + # The severity of the issue. + # @!attribute [rw] breakdowns + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::Breakdown>] + # Detailed impact breakdown. Explains the types of restriction the issue has + # in different shopping destinations and territory. If present, it should be + # rendered to the business. Can be shown as a mouse over dropdown or a + # dialog. Each breakdown item represents a group of regions with the same + # impact details. + class Impact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A detailed impact breakdown for a group of regions where the impact of the + # issue on different shopping destinations is the same. + # @!attribute [rw] regions + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::Breakdown::Region>] + # Lists of regions. Should be rendered as a title for this group of details. + # The full list should be shown to the business. If the list is too long, it + # is recommended to make it expandable. + # @!attribute [rw] details + # @return [::Array<::String>] + # Human readable, localized description of issue's effect on different + # targets. Should be rendered as a list. + # + # For example: + # + # * "Products not showing in ads" + # * "Products not showing organically" + class Breakdown + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Region with code and localized name. + # @!attribute [rw] code + # @return [::String] + # The [CLDR territory code] + # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # @!attribute [rw] name + # @return [::String] + # The localized name of the region. + # For region with code='001' the value is 'All countries' or the equivalent + # in other languages. + class Region + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An actionable step that can be executed to solve the issue. + # @!attribute [rw] builtin_simple_action + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction] + # Action implemented and performed in (your) third-party application. The + # application should point the business to the place, where they can access + # the corresponding functionality or provide instructions, if the specific + # functionality is not available. + # + # Note: The following fields are mutually exclusive: `builtin_simple_action`, `external_action`, `builtin_user_input_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] external_action + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ExternalAction] + # Action that is implemented and performed outside of (your) third-party + # application. The application needs to redirect the business to the + # external location where they can perform the action. + # + # Note: The following fields are mutually exclusive: `external_action`, `builtin_simple_action`, `builtin_user_input_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] builtin_user_input_action + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInUserInputAction] + # Action implemented and performed in (your) third-party application. + # The application needs to show an additional content and input form to the + # business as specified for given action. They can trigger the action only + # when they provided all required inputs. + # + # Note: The following fields are mutually exclusive: `builtin_user_input_action`, `builtin_simple_action`, `external_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] button_label + # @return [::String] + # Label of the action button. + # @!attribute [rw] is_available + # @return [::Boolean] + # Controlling whether the button is active or disabled. The value is 'false' + # when the action was already requested or is not available. If the action is + # not available then a + # {::Google::Shopping::Merchant::IssueResolution::V1beta::Action#reasons reason} + # will be present. If (your) third-party application shows a disabled button + # for action that is not available, then it should also show reasons. + # @!attribute [rw] reasons + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::Action::Reason>] + # List of reasons why the action is not available. The list of reasons is + # empty if the action is available. If there is only one reason, it can be + # displayed next to the disabled button. If there are more reasons, all of + # them should be displayed, for example in a pop-up dialog. + class Action + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A single reason why the action is not available. + # @!attribute [rw] message + # @return [::String] + # Messages summarizing the reason, why the action is not available. + # For example: "Review requested on Jan 03. Review requests can take a few + # days to complete." + # @!attribute [rw] detail + # @return [::String] + # Detailed explanation of the reason. Should be displayed as a hint if + # present. + # @!attribute [rw] action + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Action] + # Optional. An action that needs to be performed to solve the problem + # represented by this reason. This action will always be available. Should + # be rendered as a link or button next to the summarizing message. + # + # For example, the review may be available only once the business configure + # all required attributes. In such a situation this action can be a link to + # the form, where they can fill the missing attribute to unblock the main + # action. + class Reason + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Action that is implemented and performed in (your) third-party application. + # Represents various functionality that is expected to be available to business + # and will help them with resolving the issue. The application should point the + # business to the place, where they can access the corresponding functionality. + # If the functionality is not supported, it is recommended to explain the + # situation to the business and provide them with instructions how to solve the + # issue. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction::BuiltInSimpleActionType] + # The type of action that represents a functionality that is expected to be + # available in third-party application. + # @!attribute [rw] attribute_code + # @return [::String] + # The attribute that needs to be updated. Present when the + # {::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction#type type} + # is `EDIT_ITEM_ATTRIBUTE`. + # + # This field contains a code for attribute, represented in snake_case. You + # can find a list of product's attributes, with their codes + # [here](https://support.google.com/merchants/answer/7052112). + # @!attribute [rw] additional_content + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction::AdditionalContent] + # Long text from an external source that should be available to the business. + # Present when the + # {::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction#type type} + # is `SHOW_ADDITIONAL_CONTENT`. + class BuiltInSimpleAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Long text from external source. + # @!attribute [rw] title + # @return [::String] + # Title of the additional content; + # @!attribute [rw] paragraphs + # @return [::Array<::String>] + # Long text organized into paragraphs. + class AdditionalContent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enum specifying the type of action in third-party application. + module BuiltInSimpleActionType + # Default value. Will never be provided by the API. + BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED = 0 + + # Redirect the business to the part of your application where they can + # verify their phone. + VERIFY_PHONE = 1 + + # Redirect the business to the part of your application where they can + # claim their website. + CLAIM_WEBSITE = 2 + + # Redirect the business to the part of your application where they can add + # products. + ADD_PRODUCTS = 3 + + # Open a form where the business can edit their contact information. + ADD_CONTACT_INFO = 4 + + # Redirect the business to the part of your application where they can link + # ads account. + LINK_ADS_ACCOUNT = 5 + + # Open a form where the business can add their business registration + # number. + ADD_BUSINESS_REGISTRATION_NUMBER = 6 + + # Open a form where the business can edit an attribute. The attribute that + # needs to be updated is specified in + # {::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction#attribute_code attribute_code} + # field of the action. + EDIT_ITEM_ATTRIBUTE = 7 + + # Redirect the business from the product issues to the diagnostic page with + # their account issues in your application. + # + # This action will be returned only for product issues that are caused by + # an account issue and thus the business should resolve the problem on the + # account level. + FIX_ACCOUNT_ISSUE = 8 + + # Show [additional + # content][google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.additional_content] + # to the business. + # + # This action will be used for example to deliver a justification from + # national authority. + SHOW_ADDITIONAL_CONTENT = 9 + end + end + + # Action that is implemented and performed in (your) third-party application. + # The application needs to show an additional content and input form to the + # business. They can start the action only when they provided all required + # inputs. The application will request processing of the action by calling the + # [triggeraction + # method](https://developers.google.com/merchant/api/reference/rest/issueresolution_v1beta/issueresolution/triggeraction). + # @!attribute [rw] action_context + # @return [::String] + # Contains the action's context that must be included as part of the + # {::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload#action_context TriggerActionPayload.action_context} + # in + # {::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest#payload TriggerActionRequest.payload} + # to call the `triggeraction` method. The content should be treated as opaque + # and must not be modified. + # @!attribute [rw] flows + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::ActionFlow>] + # Actions may provide multiple different flows. Business selects one that + # fits best to their intent. Selecting the flow is the first step in user's + # interaction with the action. It affects what input fields will be available + # and required and also how the request will be processed. + class BuiltInUserInputAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Flow that can be selected for an action. When a business selects a flow, + # application should open a dialog with more information and input form. + # @!attribute [rw] id + # @return [::String] + # Not for display but need to be sent back for the selected action flow. + # @!attribute [rw] label + # @return [::String] + # Text value describing the intent for the action flow. It can be used as an + # input label if business needs to pick one of multiple flows. For example: + # "I disagree with the issue" + # @!attribute [rw] inputs + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::InputField>] + # A list of input fields. + # @!attribute [rw] dialog_title + # @return [::String] + # Title of the request dialog. For example: "Before you request a review" + # @!attribute [rw] dialog_message + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] + # Message displayed in the request dialog. For example: "Make sure you've + # fixed all your country-specific issues. If not, you may have to wait 7 days + # to request another review". There may be an more information to be shown in + # a tooltip. + # @!attribute [rw] dialog_callout + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Callout] + # Important message to be highlighted in the request dialog. For example: + # "You can only request a review for disagreeing with this issue once. If + # it's not approved, you'll need to fix the issue and wait a few days before + # you can request another review." + # @!attribute [rw] dialog_button_label + # @return [::String] + # Label for the button to trigger the action from the action dialog. For + # example: "Request review" + class ActionFlow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input field that needs to be available to the business. If the field is + # marked as required, then a value needs to be provided for a successful + # processing of the request. + # @!attribute [rw] text_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::TextInput] + # Input field to provide text information. + # Corresponds to the [html input + # type=text](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text) + # or [html + # textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). + # + # Note: The following fields are mutually exclusive: `text_input`, `choice_input`, `checkbox_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] choice_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::ChoiceInput] + # Input field to select one of the offered choices. + # Corresponds to the [html input + # type=radio](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.radio.html#input.radio). + # + # Note: The following fields are mutually exclusive: `choice_input`, `text_input`, `checkbox_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] checkbox_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::CheckboxInput] + # Input field to provide a boolean value. + # Corresponds to the [html input + # type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). + # + # Note: The following fields are mutually exclusive: `checkbox_input`, `text_input`, `choice_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] id + # @return [::String] + # Not for display but need to be sent back for the given input field. + # @!attribute [rw] label + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] + # Input field label. There may be more information to be shown in a tooltip. + # @!attribute [rw] required + # @return [::Boolean] + # Whether the field is required. The action button needs to stay disabled + # till values for all required fields are provided. + class InputField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Text input allows the business to provide a text value. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::TextInput::TextInputType] + # Type of the text input + # @!attribute [rw] additional_info + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] + # Additional info regarding the field to be displayed to the business. For + # example, warning to not include personal identifiable information. There + # may be more information to be shown in a tooltip. + # @!attribute [rw] format_info + # @return [::String] + # Information about the required format. If present, it should be shown + # close to the input field to help the business to provide a correct value. + # For example: "VAT numbers should be in a format similar to SK9999999999" + # @!attribute [rw] aria_label + # @return [::String] + # Text to be used as the + # [aria-label](https://www.w3.org/TR/WCAG20-TECHS/ARIA14.html) for the + # input. + class TextInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum specifying the type of the text input and how it should be rendered. + module TextInputType + # Default value. Will never be provided by the API. + TEXT_INPUT_TYPE_UNSPECIFIED = 0 + + # Used when a short text is expected. The field can be rendered as a + # [text + # field](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text). + GENERIC_SHORT_TEXT = 1 + + # Used when a longer text is expected. The field should be rendered as a + # [textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). + GENERIC_LONG_TEXT = 2 + end + end + + # Choice input allows the business to select one of the offered choices. Some + # choices may be linked to additional input fields that should be displayed + # under or next to the choice option. The value for the additional input + # field needs to be provided only when the specific choice is selected by the + # the business. For example, additional input field can be hidden or disabled + # until the business selects the specific choice. + # @!attribute [rw] options + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::ChoiceInput::ChoiceInputOption>] + # A list of choices. Only one option can be selected. + class ChoiceInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A choice that the business can select. + # @!attribute [rw] id + # @return [::String] + # Not for display but need to be sent back for the selected choice + # option. + # @!attribute [rw] label + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] + # Short description of the choice option. There may be more information + # to be shown as a tooltip. + # @!attribute [rw] additional_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField] + # Input that should be displayed when this option is selected. + # The additional input will not contain a `ChoiceInput`. + class ChoiceInputOption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Checkbox input allows the business to provide a boolean value. Corresponds + # to the [html input + # type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). + # + # If the business checks the box, the input value for the field is `true`, + # otherwise it is `false`. + # + # This type of input is often used as a confirmation that the business + # completed required steps before they are allowed to start the action. In + # such a case, the input field is marked as + # {::Google::Shopping::Merchant::IssueResolution::V1beta::InputField#required required} + # and the button to trigger the action should stay disabled until the + # business checks the box. + class CheckboxInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Block of text that may contain a tooltip with more information. + # @!attribute [rw] simple_value + # @return [::String] + # Value of the message as a simple text. + # @!attribute [rw] simple_tooltip_value + # @return [::String] + # Value of the tooltip as a simple text. + # @!attribute [rw] tooltip_icon_style + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip::TooltipIconStyle] + # The suggested type of an icon for tooltip, if a tooltip is present. + class TextWithTooltip + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum specifying the type of an icon that is being used to display a + # corresponding tooltip in the Merchant Center. + module TooltipIconStyle + # Default value. Will never be provided by the API. + TOOLTIP_ICON_STYLE_UNSPECIFIED = 0 + + # Used when the tooltip adds additional information to the context, + # the 'i' can be used as an icon. + INFO = 1 + + # Used when the tooltip shows helpful information, the '?' can be used as + # an icon. + QUESTION = 2 + end + end + + # An important message that should be highlighted. Usually displayed as a + # banner. + # @!attribute [rw] style_hint + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Callout::CalloutStyleHint] + # Can be used to render messages with different severity in different styles. + # Snippets off all types contain important information that should be + # displayed to the business. + # @!attribute [rw] full_message + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] + # A full message that needs to be shown to the business. + class Callout + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum specifying the suggested style, how the message should be rendered. + module CalloutStyleHint + # Default value. Will never be provided by the API. + CALLOUT_STYLE_HINT_UNSPECIFIED = 0 + + # The most important type of information highlighting problems, like an + # unsuccessful outcome of previously requested actions. + ERROR = 1 + + # Information warning about pending problems, risks or deadlines. + WARNING = 2 + + # Default severity for important information like pending status of + # previously requested action or cooldown for re-review. + INFO = 3 + end + end + + # Action that is implemented and performed outside of the third-party + # application. It should redirect the business to the provided URL of an + # external system where they can perform the action. For example to request a + # review in the Merchant Center. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ExternalAction::ExternalActionType] + # The type of external action. + # @!attribute [rw] uri + # @return [::String] + # URL to external system, for example Merchant Center, where the business can + # perform the action. + class ExternalAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum specifying the type of action that requires to redirect the business + # to an external location. + module ExternalActionType + # Default value. Will never be provided by the API. + EXTERNAL_ACTION_TYPE_UNSPECIFIED = 0 + + # Redirect to Merchant Center where the business can request a review for + # issue related to their product. + REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER = 1 + + # Redirect to Merchant Center where the business can request a review for + # issue related to their account. + REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER = 2 + + # Redirect to the form in Help Center where the business can request a + # legal appeal for the issue. + LEGAL_APPEAL_IN_HELP_CENTER = 3 + + # Redirect to Merchant Center where the business can perform identity + # verification. + VERIFY_IDENTITY_IN_MERCHANT_CENTER = 4 + end + end + + # Request to start the selected action + # @!attribute [rw] name + # @return [::String] + # Required. The business's account that is triggering the action. + # Format: `accounts/{account}` + # @!attribute [rw] payload + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload] + # Required. The payload for the triggered action. + # @!attribute [rw] language_code + # @return [::String] + # Optional. Language code [IETF BCP 47 + # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. + # If not set, the result will be in default language `en-US`. + class TriggerActionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The payload for the triggered action. + # @!attribute [rw] action_context + # @return [::String] + # Required. The + # {::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInUserInputAction#action_context context} + # from the selected action. The value is obtained from rendered issues and + # needs to be sent back to identify the + # {::Google::Shopping::Merchant::IssueResolution::V1beta::Action#builtin_user_input_action action} + # that is being triggered. + # @!attribute [rw] action_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ActionInput] + # Required. Input provided by the business. + class TriggerActionPayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response informing about the started action. + # @!attribute [rw] message + # @return [::String] + # The message for the business. + class TriggerActionResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input provided by the business. + # @!attribute [rw] action_flow_id + # @return [::String] + # Required. + # {::Google::Shopping::Merchant::IssueResolution::V1beta::ActionFlow#id Id} of the + # selected action flow. + # @!attribute [rw] input_values + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::InputValue>] + # Required. Values for input fields. + class ActionInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input provided by the business for input field. + # @!attribute [rw] text_input_value + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputValue::TextInputValue] + # Value for [text + # input][google.shopping.merchant.issueresolution.v1beta.InputField.TextInput] + # field. + # + # Note: The following fields are mutually exclusive: `text_input_value`, `choice_input_value`, `checkbox_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] choice_input_value + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputValue::ChoiceInputValue] + # Value for [choice + # input][google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput] + # field. + # + # Note: The following fields are mutually exclusive: `choice_input_value`, `text_input_value`, `checkbox_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] checkbox_input_value + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputValue::CheckboxInputValue] + # Value for [checkbox + # input][google.shopping.merchant.issueresolution.v1beta.InputField.CheckboxInput] + # field. + # + # Note: The following fields are mutually exclusive: `checkbox_input_value`, `text_input_value`, `choice_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] input_field_id + # @return [::String] + # Required. + # {::Google::Shopping::Merchant::IssueResolution::V1beta::InputField#id Id} of the + # corresponding input field. + class InputValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Value for [text + # input][google.shopping.merchant.issueresolution.v1beta.InputField.TextInput] + # field. + # @!attribute [rw] value + # @return [::String] + # Required. Text provided by the business. + class TextInputValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Value for [choice + # input][google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput] + # field. + # @!attribute [rw] choice_input_option_id + # @return [::String] + # Required. [Id][InputField.ChoiceInput.id] of the option that was selected + # by the business. + class ChoiceInputValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Value for [checkbox + # input][google.shopping.merchant.issueresolution.v1beta.InputField.CheckboxInput] + # field. + # @!attribute [rw] value + # @return [::Boolean] + # Required. True if the business checked the box field. False otherwise. + class CheckboxInputValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Enum specifying the severity of the issue. + module Severity + # Default value. Will never be provided by the API. + SEVERITY_UNSPECIFIED = 0 + + # Causes either an account suspension or an item disapproval. Errors should + # be resolved as soon as possible to ensure items are eligible to appear in + # results again. + ERROR = 1 + + # Warnings can negatively impact the performance of ads and can lead to item + # or account suspensions in the future unless the issue is resolved. + WARNING = 2 + + # Infos are suggested optimizations to increase data quality. Resolving these + # issues is recommended, but not required. + INFO = 3 + end + + # Enum specifying how is the content returned. + module ContentOption + # Default value. Will never be provided by the API. + CONTENT_OPTION_UNSPECIFIED = 0 + + # Returns the detail of the issue as a pre-rendered HTML text. + PRE_RENDERED_HTML = 1 + end + + # Enum specifying how actions with user input forms, such as requesting + # re-review, are handled. + module UserInputActionRenderingOption + # Default value. Will never be provided by the API. + USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED = 0 + + # Actions that require user input are represented only as links that points + # the business to Merchant Center where they can request the action. Provides + # easier to implement alternative to `BUILT_IN_USER_INPUT_ACTIONS`. + REDIRECT_TO_MERCHANT_CENTER = 1 + + # Returns content and input form definition for each complex action. Your + # application needs to display this content and input form to the business + # before they can request processing of the action. To start the action, your + # application needs to call the `triggeraction` method. + BUILT_IN_USER_INPUT_ACTIONS = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/type/types.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! + + +module Google + module Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + + # Youtube shopping checkout. + YOUTUBE_SHOPPING_CHECKOUT = 7 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 8 + + # [Free vehicle + # listings](https://support.google.com/merchants/answer/11189169). + FREE_VEHICLE_LISTINGS = 9 + + # [Vehicle ads](https://support.google.com/merchants/answer/11189169). + VEHICLE_ADS = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free product listings on UCP + # checkout](https://developers.google.com/merchant/ucp). + FREE_LISTINGS_UCP_CHECKOUT = 19 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 18 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + + # [Product + # Reviews](https://support.google.com/merchants/answer/14620732). + PRODUCT_REVIEWS = 15 + + # [Merchant + # Reviews](https://developers.google.com/merchant-review-feeds). + MERCHANT_REVIEWS = 16 + + # YouTube Checkout + # . + YOUTUBE_CHECKOUT = 17 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..fd343aebe259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta", path: "../" +else + gem "google-shopping-merchant-issue_resolution-v1beta" +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-shopping-merchant-issue_resolution-v1beta/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb new file mode 100644 index 000000000000..66b3fcc95753 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.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 merchantapi_v1beta_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync] +require "google/shopping/merchant/issue_resolution/v1beta" + +## +# Snippet for the list_aggregate_product_statuses call in the AggregateProductStatusesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client#list_aggregate_product_statuses. +# +def list_aggregate_product_statuses + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.new + + # Call the list_aggregate_product_statuses method. + result = client.list_aggregate_product_statuses request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus. + p item + end +end +# [END merchantapi_v1beta_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync] diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_account_issues.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_account_issues.rb new file mode 100644 index 000000000000..ece77b5b39bc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_account_issues.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_IssueResolutionService_RenderAccountIssues_sync] +require "google/shopping/merchant/issue_resolution/v1beta" + +## +# Snippet for the render_account_issues call in the IssueResolutionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_account_issues. +# +def render_account_issues + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new + + # Call the render_account_issues method. + result = client.render_account_issues request + + # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse. + p result +end +# [END merchantapi_v1beta_generated_IssueResolutionService_RenderAccountIssues_sync] diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_product_issues.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_product_issues.rb new file mode 100644 index 000000000000..9cd9f4023221 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_product_issues.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_IssueResolutionService_RenderProductIssues_sync] +require "google/shopping/merchant/issue_resolution/v1beta" + +## +# Snippet for the render_product_issues call in the IssueResolutionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_product_issues. +# +def render_product_issues + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new + + # Call the render_product_issues method. + result = client.render_product_issues request + + # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse. + p result +end +# [END merchantapi_v1beta_generated_IssueResolutionService_RenderProductIssues_sync] diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/trigger_action.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/trigger_action.rb new file mode 100644 index 000000000000..e411fd7c8b1e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/trigger_action.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_IssueResolutionService_TriggerAction_sync] +require "google/shopping/merchant/issue_resolution/v1beta" + +## +# Snippet for the trigger_action call in the IssueResolutionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#trigger_action. +# +def trigger_action + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new + + # Call the trigger_action method. + result = client.trigger_action request + + # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse. + p result +end +# [END merchantapi_v1beta_generated_IssueResolutionService_TriggerAction_sync] diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json new file mode 100644 index 000000000000..bc030aa28df3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json @@ -0,0 +1,175 @@ +{ + "client_library": { + "name": "google-shopping-merchant-issue_resolution-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.issueresolution.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync", + "title": "Snippet for the list_aggregate_product_statuses call in the AggregateProductStatusesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client#list_aggregate_product_statuses.", + "file": "aggregate_product_statuses_service/list_aggregate_product_statuses.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_aggregate_product_statuses", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client#list_aggregate_product_statuses", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse", + "client": { + "short_name": "AggregateProductStatusesService::Client", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client" + }, + "method": { + "short_name": "ListAggregateProductStatuses", + "full_name": "google.shopping.merchant.issueresolution.v1beta.AggregateProductStatusesService.ListAggregateProductStatuses", + "service": { + "short_name": "AggregateProductStatusesService", + "full_name": "google.shopping.merchant.issueresolution.v1beta.AggregateProductStatusesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_IssueResolutionService_RenderAccountIssues_sync", + "title": "Snippet for the render_account_issues call in the IssueResolutionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_account_issues.", + "file": "issue_resolution_service/render_account_issues.rb", + "language": "RUBY", + "client_method": { + "short_name": "render_account_issues", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_account_issues", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse", + "client": { + "short_name": "IssueResolutionService::Client", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client" + }, + "method": { + "short_name": "RenderAccountIssues", + "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService.RenderAccountIssues", + "service": { + "short_name": "IssueResolutionService", + "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_IssueResolutionService_RenderProductIssues_sync", + "title": "Snippet for the render_product_issues call in the IssueResolutionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_product_issues.", + "file": "issue_resolution_service/render_product_issues.rb", + "language": "RUBY", + "client_method": { + "short_name": "render_product_issues", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_product_issues", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse", + "client": { + "short_name": "IssueResolutionService::Client", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client" + }, + "method": { + "short_name": "RenderProductIssues", + "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService.RenderProductIssues", + "service": { + "short_name": "IssueResolutionService", + "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_IssueResolutionService_TriggerAction_sync", + "title": "Snippet for the trigger_action call in the IssueResolutionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#trigger_action.", + "file": "issue_resolution_service/trigger_action.rb", + "language": "RUBY", + "client_method": { + "short_name": "trigger_action", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#trigger_action", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse", + "client": { + "short_name": "IssueResolutionService::Client", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client" + }, + "method": { + "short_name": "TriggerAction", + "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService.TriggerAction", + "service": { + "short_name": "IssueResolutionService", + "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService" + } + } + }, + "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-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_paths_test.rb new file mode 100644 index 000000000000..cdbdd40af3ab --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_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/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service" + +class ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_rest_test.rb new file mode 100644 index 000000000000..1918c6248f20 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_rest_test.rb @@ -0,0 +1,156 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest" + + +class ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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_aggregate_product_statuses + # Create test objects. + client_result = ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse.new + http_response = OpenStruct.new 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_aggregate_product_statuses_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::ServiceStub.stub :transcode_list_aggregate_product_statuses_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_aggregate_product_statuses_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_aggregate_product_statuses({ 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_aggregate_product_statuses 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_aggregate_product_statuses ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.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_aggregate_product_statuses({ 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_aggregate_product_statuses(::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.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_aggregate_product_statuses_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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.rb new file mode 100644 index 000000000000..4054d8c0585f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service" + +class ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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_aggregate_product_statuses + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_aggregate_product_statuses_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_aggregate_product_statuses, name + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest, 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_aggregate_product_statuses_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_aggregate_product_statuses({ 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_aggregate_product_statuses 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_aggregate_product_statuses ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.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_aggregate_product_statuses({ 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_aggregate_product_statuses(::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.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_aggregate_product_statuses_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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb new file mode 100644 index 000000000000..f48dac30c278 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_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/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" + +class ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_path account: "value0", product: "value1" + assert_equal "accounts/value0/products/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb new file mode 100644 index 000000000000..8d0c4caf2c8c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb @@ -0,0 +1,269 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/issueresolution/v1beta/issueresolution_pb" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" + + +class ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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_render_account_issues + # Create test objects. + client_result = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + language_code = "hello world" + time_zone = "hello world" + payload = {} + + render_account_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::ServiceStub.stub :transcode_render_account_issues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, render_account_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.render_account_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.render_account_issues ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.render_account_issues(::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, render_account_issues_client_stub.call_count + end + end + end + + def test_render_product_issues + # Create test objects. + client_result = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + language_code = "hello world" + time_zone = "hello world" + payload = {} + + render_product_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::ServiceStub.stub :transcode_render_product_issues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, render_product_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.render_product_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.render_product_issues ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.render_product_issues(::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, render_product_issues_client_stub.call_count + end + end + end + + def test_trigger_action + # Create test objects. + client_result = ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + payload = {} + language_code = "hello world" + + trigger_action_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::ServiceStub.stub :transcode_trigger_action_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, trigger_action_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.trigger_action({ name: name, payload: payload, language_code: language_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.trigger_action name: name, payload: payload, language_code: language_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.trigger_action ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.trigger_action({ name: name, payload: payload, language_code: language_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.trigger_action(::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, trigger_action_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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb new file mode 100644 index 000000000000..301f8e6a97d4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb @@ -0,0 +1,294 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/issueresolution/v1beta/issueresolution_pb" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" + +class ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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_render_account_issues + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + language_code = "hello world" + time_zone = "hello world" + payload = {} + + render_account_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :render_account_issues, name + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["language_code"] + assert_equal "hello world", request["time_zone"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload), request["payload"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, render_account_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.render_account_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.render_account_issues ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.render_account_issues(::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, render_account_issues_client_stub.call_rpc_count + end + end + + def test_render_product_issues + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + language_code = "hello world" + time_zone = "hello world" + payload = {} + + render_product_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :render_product_issues, name + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["language_code"] + assert_equal "hello world", request["time_zone"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload), request["payload"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, render_product_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.render_product_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.render_product_issues ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.render_product_issues(::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, render_product_issues_client_stub.call_rpc_count + end + end + + def test_trigger_action + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + payload = {} + language_code = "hello world" + + trigger_action_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :trigger_action, name + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload), request["payload"] + assert_equal "hello world", request["language_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, trigger_action_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.trigger_action({ name: name, payload: payload, language_code: language_code }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.trigger_action name: name, payload: payload, language_code: language_code do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.trigger_action ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.trigger_action({ name: name, payload: payload, 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.trigger_action(::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new(name: name, payload: payload, 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, trigger_action_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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-lfp-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-lfp-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-lfp-v1/.repo-metadata.json new file mode 100644 index 000000000000..36b9e7c839c5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-lfp-v1", + "distribution_name": "google-shopping-merchant-lfp-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-lfp-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-lfp instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-lfp-v1/.rubocop.yml new file mode 100644 index 000000000000..c02800f14e06 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-lfp-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant 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-shopping-merchant-lfp-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-lfp-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..9b4d87b388cb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-lfp-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-shopping-merchant-lfp-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/shopping/merchant/lfp/v1" + +client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/lfp/v1" + +::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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-shopping-merchant-lfp-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/shopping/merchant/lfp/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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-shopping-merchant-lfp-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-lfp-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-lfp-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-lfp-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/README.md b/owl-bot-staging/google-shopping-merchant-lfp-v1/README.md new file mode 100644 index 000000000000..b1079018d953 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-lfp](https://rubygems.org/gems/google-shopping-merchant-lfp). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-lfp-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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/lfp/v1" + +client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new +request = ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new # (request fields as keyword arguments...) +response = client.insert_lfp_inventory request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/lfp/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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-shopping-merchant-lfp`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-lfp-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-shopping-merchant-lfp`. +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-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-lfp-v1/Rakefile new file mode 100644 index 000000000000..728de334377e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-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/shopping/merchant/lfp/v1/lfp_inventory_service/credentials" + ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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-shopping-merchant-lfp-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-shopping-merchant-lfp-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-shopping-merchant-lfp-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-shopping-merchant-lfp-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-lfp-v1" + header "google-shopping-merchant-lfp-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-lfp-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-lfp-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-shopping-merchant-lfp-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-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-lfp-v1/gapic_metadata.json new file mode 100644 index 000000000000..302bd89785a3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/gapic_metadata.json @@ -0,0 +1,80 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.lfp.v1", + "libraryPackage": "::Google::Shopping::Merchant::Lfp::V1", + "services": { + "LfpInventoryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client", + "rpcs": { + "InsertLfpInventory": { + "methods": [ + "insert_lfp_inventory" + ] + } + } + } + } + }, + "LfpMerchantStateService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client", + "rpcs": { + "GetLfpMerchantState": { + "methods": [ + "get_lfp_merchant_state" + ] + } + } + } + } + }, + "LfpSaleService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client", + "rpcs": { + "InsertLfpSale": { + "methods": [ + "insert_lfp_sale" + ] + } + } + } + } + }, + "LfpStoreService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client", + "rpcs": { + "GetLfpStore": { + "methods": [ + "get_lfp_store" + ] + }, + "InsertLfpStore": { + "methods": [ + "insert_lfp_store" + ] + }, + "DeleteLfpStore": { + "methods": [ + "delete_lfp_store" + ] + }, + "ListLfpStores": { + "methods": [ + "list_lfp_stores" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/google-shopping-merchant-lfp-v1.gemspec b/owl-bot-staging/google-shopping-merchant-lfp-v1/google-shopping-merchant-lfp-v1.gemspec new file mode 100644 index 000000000000..49f175bcb8e8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/google-shopping-merchant-lfp-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/lfp/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-lfp-v1" + gem.version = Google::Shopping::Merchant::Lfp::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-lfp-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-lfp instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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-shopping-type", "~> 1.0" +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google-shopping-merchant-lfp-v1.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google-shopping-merchant-lfp-v1.rb new file mode 100644 index 000000000000..50973a650857 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google-shopping-merchant-lfp-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/shopping/merchant/lfp/v1" diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1.rb new file mode 100644 index 000000000000..110574e549d6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/lfp/v1/lfp_inventory_service" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service" +require "google/shopping/merchant/lfp/v1/lfp_sale_service" +require "google/shopping/merchant/lfp/v1/lfp_store_service" +require "google/shopping/merchant/lfp/v1/version" + +module Google + module Shopping + module Merchant + module Lfp + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/lfp/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb new file mode 100644 index 000000000000..fc006da4801b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1/version" + +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/paths" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/client" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1/lfp_inventory_service" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new + # + module LfpInventoryService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_inventory_service", "helpers.rb" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb new file mode 100644 index 000000000000..99267d24850f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb @@ -0,0 +1,488 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/lfp/v1/lfpinventory_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpInventoryService + ## + # Client for the LfpInventoryService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_inventory_service_stub + + ## + # Configure the LfpInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpInventoryService clients + # ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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", "Shopping", "Merchant", "Lfp", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpInventoryService 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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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 + @lfp_inventory_service_stub.universe_domain + end + + ## + # Create a new LfpInventoryService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpInventoryService 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/shopping/merchant/lfp/v1/lfpinventory_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 + + @lfp_inventory_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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 + ) + + @lfp_inventory_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 + @lfp_inventory_service_stub.logger + end + + # Service calls + + ## + # Inserts a `LfpInventory` resource for the given target merchant account. If + # the resource already exists, it will be replaced. The inventory + # automatically expires after 30 days. + # + # @overload insert_lfp_inventory(request, options = nil) + # Pass arguments to `insert_lfp_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_lfp_inventory(parent: nil, lfp_inventory: nil) + # Pass arguments to `insert_lfp_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account. + # Format: `accounts/{account}` + # @param lfp_inventory [::Google::Shopping::Merchant::Lfp::V1::LfpInventory, ::Hash] + # Required. The inventory to insert. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new + # + # # Call the insert_lfp_inventory method. + # result = client.insert_lfp_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpInventory. + # p result + # + def insert_lfp_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_lfp_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_lfp_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_lfp_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_inventory_service_stub.call_rpc :insert_lfp_inventory, request, 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 LfpInventoryService API. + # + # This class represents the configuration for LfpInventoryService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # insert_lfp_inventory to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_inventory.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_inventory.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `insert_lfp_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_inventory + + # @private + def initialize parent_rpcs = nil + insert_lfp_inventory_config = parent_rpcs.insert_lfp_inventory if parent_rpcs.respond_to? :insert_lfp_inventory + @insert_lfp_inventory = ::Gapic::Config::Method.new insert_lfp_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb new file mode 100644 index 000000000000..49a7ffb7e0db --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_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 Shopping + module Merchant + module Lfp + module V1 + module LfpInventoryService + # Credentials for the LfpInventoryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb new file mode 100644 index 000000000000..b96335aebdf0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpInventoryService + # Path helper methods for the LfpInventoryService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified LfpInventory resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}` + # + # @param account [String] + # @param target_merchant [String] + # @param store_code [String] + # @param offer [String] + # + # @return [::String] + def lfp_inventory_path account:, target_merchant:, store_code:, offer: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "target_merchant cannot contain /" if target_merchant.to_s.include? "/" + raise ::ArgumentError, "store_code cannot contain /" if store_code.to_s.include? "/" + + "accounts/#{account}/lfpInventories/#{target_merchant}~#{store_code}~#{offer}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb new file mode 100644 index 000000000000..0020d2acf6f6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1/version" + +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/paths" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new + # + module LfpInventoryService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb new file mode 100644 index 000000000000..172839a0ea6f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb @@ -0,0 +1,438 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/lfp/v1/lfpinventory_pb" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpInventoryService + module Rest + ## + # REST client for the LfpInventoryService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_inventory_service_stub + + ## + # Configure the LfpInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpInventoryService clients + # ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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", "Shopping", "Merchant", "Lfp", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpInventoryService 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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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 + @lfp_inventory_service_stub.universe_domain + end + + ## + # Create a new LfpInventoryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpInventoryService 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 + + @lfp_inventory_service_stub = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lfp_inventory_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 + @lfp_inventory_service_stub.logger + end + + # Service calls + + ## + # Inserts a `LfpInventory` resource for the given target merchant account. If + # the resource already exists, it will be replaced. The inventory + # automatically expires after 30 days. + # + # @overload insert_lfp_inventory(request, options = nil) + # Pass arguments to `insert_lfp_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_lfp_inventory(parent: nil, lfp_inventory: nil) + # Pass arguments to `insert_lfp_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account. + # Format: `accounts/{account}` + # @param lfp_inventory [::Google::Shopping::Merchant::Lfp::V1::LfpInventory, ::Hash] + # Required. The inventory to insert. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new + # + # # Call the insert_lfp_inventory method. + # result = client.insert_lfp_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpInventory. + # p result + # + def insert_lfp_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_lfp_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_lfp_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_lfp_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_inventory_service_stub.insert_lfp_inventory request, 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 LfpInventoryService REST API. + # + # This class represents the configuration for LfpInventoryService 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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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 + # # insert_lfp_inventory to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_inventory.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_inventory.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `insert_lfp_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_inventory + + # @private + def initialize parent_rpcs = nil + insert_lfp_inventory_config = parent_rpcs.insert_lfp_inventory if parent_rpcs.respond_to? :insert_lfp_inventory + @insert_lfp_inventory = ::Gapic::Config::Method.new insert_lfp_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb new file mode 100644 index 000000000000..659e524ce08f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.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! + +require "google/shopping/merchant/lfp/v1/lfpinventory_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpInventoryService + module Rest + ## + # REST service stub for the LfpInventoryService 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 insert_lfp_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] + # A result object deserialized from the server's reply + def insert_lfp_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_inventory_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "insert_lfp_inventory", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1::LfpInventory.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 insert_lfp_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_lfp_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/lfp/v1/{parent}/lfpInventories:insert", + body: "lfp_inventory", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb new file mode 100644 index 000000000000..d1805e8a2ee9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_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/shopping/merchant/lfp/v1/version" + +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to get the + # state of a merchant. + # + # For information about onboarding a retailer, see [How to onboard a + # retailer](https://support.google.com/merchants/answer/15243706). + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new + # + module LfpMerchantStateService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_merchant_state_service", "helpers.rb" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb new file mode 100644 index 000000000000..f49fdf6cd275 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb @@ -0,0 +1,488 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/lfp/v1/lfpmerchantstate_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpMerchantStateService + ## + # Client for the LfpMerchantStateService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to get the + # state of a merchant. + # + # For information about onboarding a retailer, see [How to onboard a + # retailer](https://support.google.com/merchants/answer/15243706). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_merchant_state_service_stub + + ## + # Configure the LfpMerchantStateService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpMerchantStateService clients + # ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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", "Shopping", "Merchant", "Lfp", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpMerchantStateService 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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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 + @lfp_merchant_state_service_stub.universe_domain + end + + ## + # Create a new LfpMerchantStateService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpMerchantStateService 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/shopping/merchant/lfp/v1/lfpmerchantstate_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 + + @lfp_merchant_state_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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 + ) + + @lfp_merchant_state_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 + @lfp_merchant_state_service_stub.logger + end + + # Service calls + + ## + # Gets the LFP state of a merchant + # + # @overload get_lfp_merchant_state(request, options = nil) + # Pass arguments to `get_lfp_merchant_state` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_lfp_merchant_state(name: nil) + # Pass arguments to `get_lfp_merchant_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the state to retrieve. + # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}`. For + # example, `accounts/123456/lfpMerchantStates/567890`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new + # + # # Call the get_lfp_merchant_state method. + # result = client.get_lfp_merchant_state request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpMerchantState. + # p result + # + def get_lfp_merchant_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_lfp_merchant_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_lfp_merchant_state.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_lfp_merchant_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_merchant_state_service_stub.call_rpc :get_lfp_merchant_state, request, 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 LfpMerchantStateService API. + # + # This class represents the configuration for LfpMerchantStateService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_lfp_merchant_state to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_merchant_state.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_merchant_state.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpMerchantStateService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_lfp_merchant_state` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lfp_merchant_state + + # @private + def initialize parent_rpcs = nil + get_lfp_merchant_state_config = parent_rpcs.get_lfp_merchant_state if parent_rpcs.respond_to? :get_lfp_merchant_state + @get_lfp_merchant_state = ::Gapic::Config::Method.new get_lfp_merchant_state_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb new file mode 100644 index 000000000000..135a12914c76 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_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 Shopping + module Merchant + module Lfp + module V1 + module LfpMerchantStateService + # Credentials for the LfpMerchantStateService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb new file mode 100644 index 000000000000..c635fc723f12 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/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 Shopping + module Merchant + module Lfp + module V1 + module LfpMerchantStateService + # Path helper methods for the LfpMerchantStateService API. + module Paths + ## + # Create a fully-qualified LfpMerchantState resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/lfpMerchantStates/{lfp_merchant_state}` + # + # @param account [String] + # @param lfp_merchant_state [String] + # + # @return [::String] + def lfp_merchant_state_path account:, lfp_merchant_state: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/lfpMerchantStates/#{lfp_merchant_state}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb new file mode 100644 index 000000000000..97650d8d3130 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_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/shopping/merchant/lfp/v1/version" + +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to get the + # state of a merchant. + # + # For information about onboarding a retailer, see [How to onboard a + # retailer](https://support.google.com/merchants/answer/15243706). + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new + # + module LfpMerchantStateService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb new file mode 100644 index 000000000000..001434a0884a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb @@ -0,0 +1,438 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/lfp/v1/lfpmerchantstate_pb" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpMerchantStateService + module Rest + ## + # REST client for the LfpMerchantStateService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to get the + # state of a merchant. + # + # For information about onboarding a retailer, see [How to onboard a + # retailer](https://support.google.com/merchants/answer/15243706). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_merchant_state_service_stub + + ## + # Configure the LfpMerchantStateService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpMerchantStateService clients + # ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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", "Shopping", "Merchant", "Lfp", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpMerchantStateService 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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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 + @lfp_merchant_state_service_stub.universe_domain + end + + ## + # Create a new LfpMerchantStateService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpMerchantStateService 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 + + @lfp_merchant_state_service_stub = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lfp_merchant_state_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 + @lfp_merchant_state_service_stub.logger + end + + # Service calls + + ## + # Gets the LFP state of a merchant + # + # @overload get_lfp_merchant_state(request, options = nil) + # Pass arguments to `get_lfp_merchant_state` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_lfp_merchant_state(name: nil) + # Pass arguments to `get_lfp_merchant_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the state to retrieve. + # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}`. For + # example, `accounts/123456/lfpMerchantStates/567890`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new + # + # # Call the get_lfp_merchant_state method. + # result = client.get_lfp_merchant_state request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpMerchantState. + # p result + # + def get_lfp_merchant_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_lfp_merchant_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_lfp_merchant_state.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_lfp_merchant_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_merchant_state_service_stub.get_lfp_merchant_state request, 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 LfpMerchantStateService REST API. + # + # This class represents the configuration for LfpMerchantStateService 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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_lfp_merchant_state to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_merchant_state.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_merchant_state.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpMerchantStateService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_lfp_merchant_state` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lfp_merchant_state + + # @private + def initialize parent_rpcs = nil + get_lfp_merchant_state_config = parent_rpcs.get_lfp_merchant_state if parent_rpcs.respond_to? :get_lfp_merchant_state + @get_lfp_merchant_state = ::Gapic::Config::Method.new get_lfp_merchant_state_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb new file mode 100644 index 000000000000..e5e64946788a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.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! + +require "google/shopping/merchant/lfp/v1/lfpmerchantstate_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpMerchantStateService + module Rest + ## + # REST service stub for the LfpMerchantStateService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_lfp_merchant_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] + # A result object deserialized from the server's reply + def get_lfp_merchant_state request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_lfp_merchant_state_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_lfp_merchant_state", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_lfp_merchant_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_lfp_merchant_state_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/lfp/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/lfpMerchantStates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb new file mode 100644 index 000000000000..799df55707ea --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1/version" + +require "google/shopping/merchant/lfp/v1/lfp_sale_service/credentials" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/paths" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/client" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1/lfp_sale_service" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new + # + module LfpSaleService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_sale_service", "helpers.rb" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb new file mode 100644 index 000000000000..2fd66f9ca7db --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb @@ -0,0 +1,486 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/lfp/v1/lfpsale_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpSaleService + ## + # Client for the LfpSaleService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_sale_service_stub + + ## + # Configure the LfpSaleService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpSaleService clients + # ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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", "Shopping", "Merchant", "Lfp", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpSaleService 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::Shopping::Merchant::Lfp::V1::LfpSaleService::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 + @lfp_sale_service_stub.universe_domain + end + + ## + # Create a new LfpSaleService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpSaleService 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/shopping/merchant/lfp/v1/lfpsale_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 + + @lfp_sale_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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 + ) + + @lfp_sale_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 + @lfp_sale_service_stub.logger + end + + # Service calls + + ## + # Inserts a `LfpSale` for the given merchant. + # + # @overload insert_lfp_sale(request, options = nil) + # Pass arguments to `insert_lfp_sale` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_lfp_sale(parent: nil, lfp_sale: nil) + # Pass arguments to `insert_lfp_sale` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account. + # Format: `accounts/{lfp_partner}` + # @param lfp_sale [::Google::Shopping::Merchant::Lfp::V1::LfpSale, ::Hash] + # Required. The sale to insert. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpSale] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpSale] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new + # + # # Call the insert_lfp_sale method. + # result = client.insert_lfp_sale request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpSale. + # p result + # + def insert_lfp_sale request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_lfp_sale.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_lfp_sale.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_lfp_sale.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_sale_service_stub.call_rpc :insert_lfp_sale, request, 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 LfpSaleService API. + # + # This class represents the configuration for LfpSaleService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # insert_lfp_sale to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_sale.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_sale.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Lfp::V1::LfpSaleService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpSaleService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `insert_lfp_sale` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_sale + + # @private + def initialize parent_rpcs = nil + insert_lfp_sale_config = parent_rpcs.insert_lfp_sale if parent_rpcs.respond_to? :insert_lfp_sale + @insert_lfp_sale = ::Gapic::Config::Method.new insert_lfp_sale_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb new file mode 100644 index 000000000000..0243ce4673d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_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 Shopping + module Merchant + module Lfp + module V1 + module LfpSaleService + # Credentials for the LfpSaleService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb new file mode 100644 index 000000000000..e561a91d26ac --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/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 Shopping + module Merchant + module Lfp + module V1 + module LfpSaleService + # Path helper methods for the LfpSaleService API. + module Paths + ## + # Create a fully-qualified LfpSale resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/lfpSales/{sale}` + # + # @param account [String] + # @param sale [String] + # + # @return [::String] + def lfp_sale_path account:, sale: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/lfpSales/#{sale}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb new file mode 100644 index 000000000000..f7a4aac73a76 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1/version" + +require "google/shopping/merchant/lfp/v1/lfp_sale_service/credentials" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/paths" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new + # + module LfpSaleService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb new file mode 100644 index 000000000000..401c7bff4d4f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb @@ -0,0 +1,436 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/lfp/v1/lfpsale_pb" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpSaleService + module Rest + ## + # REST client for the LfpSaleService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_sale_service_stub + + ## + # Configure the LfpSaleService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpSaleService clients + # ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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", "Shopping", "Merchant", "Lfp", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpSaleService 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::Shopping::Merchant::Lfp::V1::LfpSaleService::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 + @lfp_sale_service_stub.universe_domain + end + + ## + # Create a new LfpSaleService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpSaleService 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 + + @lfp_sale_service_stub = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lfp_sale_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 + @lfp_sale_service_stub.logger + end + + # Service calls + + ## + # Inserts a `LfpSale` for the given merchant. + # + # @overload insert_lfp_sale(request, options = nil) + # Pass arguments to `insert_lfp_sale` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_lfp_sale(parent: nil, lfp_sale: nil) + # Pass arguments to `insert_lfp_sale` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account. + # Format: `accounts/{lfp_partner}` + # @param lfp_sale [::Google::Shopping::Merchant::Lfp::V1::LfpSale, ::Hash] + # Required. The sale to insert. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpSale] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpSale] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new + # + # # Call the insert_lfp_sale method. + # result = client.insert_lfp_sale request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpSale. + # p result + # + def insert_lfp_sale request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_lfp_sale.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_lfp_sale.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_lfp_sale.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_sale_service_stub.insert_lfp_sale request, 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 LfpSaleService REST API. + # + # This class represents the configuration for LfpSaleService 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::Shopping::Merchant::Lfp::V1::LfpSaleService::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 + # # insert_lfp_sale to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_sale.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_sale.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpSaleService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `insert_lfp_sale` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_sale + + # @private + def initialize parent_rpcs = nil + insert_lfp_sale_config = parent_rpcs.insert_lfp_sale if parent_rpcs.respond_to? :insert_lfp_sale + @insert_lfp_sale = ::Gapic::Config::Method.new insert_lfp_sale_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb new file mode 100644 index 000000000000..4c4a42259017 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.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! + +require "google/shopping/merchant/lfp/v1/lfpsale_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpSaleService + module Rest + ## + # REST service stub for the LfpSaleService 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 insert_lfp_sale REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpSale] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpSale] + # A result object deserialized from the server's reply + def insert_lfp_sale request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_sale_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "insert_lfp_sale", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1::LfpSale.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 insert_lfp_sale REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_lfp_sale_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/lfp/v1/{parent}/lfpSales:insert", + body: "lfp_sale", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb new file mode 100644 index 000000000000..65dc5989d237 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1/version" + +require "google/shopping/merchant/lfp/v1/lfp_store_service/credentials" +require "google/shopping/merchant/lfp/v1/lfp_store_service/paths" +require "google/shopping/merchant/lfp/v1/lfp_store_service/client" +require "google/shopping/merchant/lfp/v1/lfp_store_service/rest" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1/lfp_store_service" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1/lfp_store_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new + # + module LfpStoreService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_store_service", "helpers.rb" +require "google/shopping/merchant/lfp/v1/lfp_store_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb new file mode 100644 index 000000000000..3a99e0f1dab4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.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! + +require "google/cloud/errors" +require "google/shopping/merchant/lfp/v1/lfpstore_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpStoreService + ## + # Client for the LfpStoreService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_store_service_stub + + ## + # Configure the LfpStoreService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpStoreService clients + # ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::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", "Shopping", "Merchant", "Lfp", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpStoreService 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::Shopping::Merchant::Lfp::V1::LfpStoreService::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 + @lfp_store_service_stub.universe_domain + end + + ## + # Create a new LfpStoreService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpStoreService 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/shopping/merchant/lfp/v1/lfpstore_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 + + @lfp_store_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::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 + ) + + @lfp_store_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 + @lfp_store_service_stub.logger + end + + # Service calls + + ## + # Retrieves information about a store. + # + # @overload get_lfp_store(request, options = nil) + # Pass arguments to `get_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_lfp_store(name: nil) + # Pass arguments to `get_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the store to retrieve. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new + # + # # Call the get_lfp_store method. + # result = client.get_lfp_store request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. + # p result + # + def get_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_lfp_store.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.call_rpc :get_lfp_store, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inserts a store for the target merchant. If the store with the same store + # code already exists, it will be replaced. + # + # @overload insert_lfp_store(request, options = nil) + # Pass arguments to `insert_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_lfp_store(parent: nil, lfp_store: nil) + # Pass arguments to `insert_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account + # Format: `accounts/{account}` + # @param lfp_store [::Google::Shopping::Merchant::Lfp::V1::LfpStore, ::Hash] + # Required. The store to insert. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new + # + # # Call the insert_lfp_store method. + # result = client.insert_lfp_store request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. + # p result + # + def insert_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_lfp_store.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.call_rpc :insert_lfp_store, request, 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 store for a target merchant. + # + # @overload delete_lfp_store(request, options = nil) + # Pass arguments to `delete_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_lfp_store(name: nil) + # Pass arguments to `delete_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the store to delete for the target merchant account. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # + # @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/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new + # + # # Call the delete_lfp_store method. + # result = client.delete_lfp_store request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_lfp_store.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.call_rpc :delete_lfp_store, request, 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 stores of the target merchant, specified by the filter in + # `ListLfpStoresRequest`. + # + # @overload list_lfp_stores(request, options = nil) + # Pass arguments to `list_lfp_stores` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_lfp_stores(parent: nil, target_account: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_lfp_stores` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP partner. + # Format: `accounts/{account}` + # @param target_account [::Integer] + # Required. The Merchant Center id of the merchant to list stores for. + # @param page_size [::Integer] + # Optional. The maximum number of `LfpStore` resources for the given account + # to return. The service returns fewer than this value if the number of + # stores for the given account is less than the `pageSize`. The default value + # is 250. The maximum value is 1000; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListLfpStoresRequest` + # call. Provide the page token to retrieve the subsequent page. When + # paginating, all other parameters provided to `ListLfpStoresRequest` must + # match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse#next_page_token nextPageToken} + # in the response to the previous request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1::LfpStore>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1::LfpStore>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new + # + # # Call the list_lfp_stores method. + # result = client.list_lfp_stores request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Lfp::V1::LfpStore. + # p item + # end + # + def list_lfp_stores request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_lfp_stores.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_lfp_stores.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_lfp_stores.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.call_rpc :list_lfp_stores, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @lfp_store_service_stub, :list_lfp_stores, 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 LfpStoreService API. + # + # This class represents the configuration for LfpStoreService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_lfp_store to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_store.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_store.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Lfp::V1::LfpStoreService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpStoreService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lfp_store + ## + # RPC-specific configuration for `insert_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_store + ## + # RPC-specific configuration for `delete_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lfp_store + ## + # RPC-specific configuration for `list_lfp_stores` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lfp_stores + + # @private + def initialize parent_rpcs = nil + get_lfp_store_config = parent_rpcs.get_lfp_store if parent_rpcs.respond_to? :get_lfp_store + @get_lfp_store = ::Gapic::Config::Method.new get_lfp_store_config + insert_lfp_store_config = parent_rpcs.insert_lfp_store if parent_rpcs.respond_to? :insert_lfp_store + @insert_lfp_store = ::Gapic::Config::Method.new insert_lfp_store_config + delete_lfp_store_config = parent_rpcs.delete_lfp_store if parent_rpcs.respond_to? :delete_lfp_store + @delete_lfp_store = ::Gapic::Config::Method.new delete_lfp_store_config + list_lfp_stores_config = parent_rpcs.list_lfp_stores if parent_rpcs.respond_to? :list_lfp_stores + @list_lfp_stores = ::Gapic::Config::Method.new list_lfp_stores_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb new file mode 100644 index 000000000000..50e7f7a7dd9c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_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 Shopping + module Merchant + module Lfp + module V1 + module LfpStoreService + # Credentials for the LfpStoreService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb new file mode 100644 index 000000000000..dba6371bbd99 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpStoreService + # Path helper methods for the LfpStoreService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified LfpStore resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # + # @param account [String] + # @param target_merchant [String] + # @param store_code [String] + # + # @return [::String] + def lfp_store_path account:, target_merchant:, store_code: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "target_merchant cannot contain /" if target_merchant.to_s.include? "/" + + "accounts/#{account}/lfpStores/#{target_merchant}~#{store_code}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb new file mode 100644 index 000000000000..c3fc803a7e1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1/version" + +require "google/shopping/merchant/lfp/v1/lfp_store_service/credentials" +require "google/shopping/merchant/lfp/v1/lfp_store_service/paths" +require "google/shopping/merchant/lfp/v1/lfp_store_service/rest/client" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/lfp/v1/lfp_store_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new + # + module LfpStoreService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/lfp/v1/lfp_store_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb new file mode 100644 index 000000000000..bc188e1e485b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb @@ -0,0 +1,717 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/lfp/v1/lfpstore_pb" +require "google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpStoreService + module Rest + ## + # REST client for the LfpStoreService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_store_service_stub + + ## + # Configure the LfpStoreService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpStoreService clients + # ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::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", "Shopping", "Merchant", "Lfp", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpStoreService 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::Shopping::Merchant::Lfp::V1::LfpStoreService::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 + @lfp_store_service_stub.universe_domain + end + + ## + # Create a new LfpStoreService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpStoreService 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 + + @lfp_store_service_stub = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lfp_store_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 + @lfp_store_service_stub.logger + end + + # Service calls + + ## + # Retrieves information about a store. + # + # @overload get_lfp_store(request, options = nil) + # Pass arguments to `get_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_lfp_store(name: nil) + # Pass arguments to `get_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the store to retrieve. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new + # + # # Call the get_lfp_store method. + # result = client.get_lfp_store request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. + # p result + # + def get_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_lfp_store.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.get_lfp_store request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inserts a store for the target merchant. If the store with the same store + # code already exists, it will be replaced. + # + # @overload insert_lfp_store(request, options = nil) + # Pass arguments to `insert_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_lfp_store(parent: nil, lfp_store: nil) + # Pass arguments to `insert_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account + # Format: `accounts/{account}` + # @param lfp_store [::Google::Shopping::Merchant::Lfp::V1::LfpStore, ::Hash] + # Required. The store to insert. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new + # + # # Call the insert_lfp_store method. + # result = client.insert_lfp_store request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. + # p result + # + def insert_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_lfp_store.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.insert_lfp_store request, 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 store for a target merchant. + # + # @overload delete_lfp_store(request, options = nil) + # Pass arguments to `delete_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_lfp_store(name: nil) + # Pass arguments to `delete_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the store to delete for the target merchant account. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # @yield [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/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new + # + # # Call the delete_lfp_store method. + # result = client.delete_lfp_store request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_lfp_store.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.delete_lfp_store request, 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 stores of the target merchant, specified by the filter in + # `ListLfpStoresRequest`. + # + # @overload list_lfp_stores(request, options = nil) + # Pass arguments to `list_lfp_stores` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_lfp_stores(parent: nil, target_account: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_lfp_stores` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP partner. + # Format: `accounts/{account}` + # @param target_account [::Integer] + # Required. The Merchant Center id of the merchant to list stores for. + # @param page_size [::Integer] + # Optional. The maximum number of `LfpStore` resources for the given account + # to return. The service returns fewer than this value if the number of + # stores for the given account is less than the `pageSize`. The default value + # is 250. The maximum value is 1000; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListLfpStoresRequest` + # call. Provide the page token to retrieve the subsequent page. When + # paginating, all other parameters provided to `ListLfpStoresRequest` must + # match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse#next_page_token nextPageToken} + # in the response to the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1::LfpStore>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1::LfpStore>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new + # + # # Call the list_lfp_stores method. + # result = client.list_lfp_stores request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Lfp::V1::LfpStore. + # p item + # end + # + def list_lfp_stores request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_lfp_stores.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_lfp_stores.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_lfp_stores.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.list_lfp_stores request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @lfp_store_service_stub, :list_lfp_stores, "lfp_stores", request, result, 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 LfpStoreService REST API. + # + # This class represents the configuration for LfpStoreService 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::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_lfp_store to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_store.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_store.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpStoreService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lfp_store + ## + # RPC-specific configuration for `insert_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_store + ## + # RPC-specific configuration for `delete_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lfp_store + ## + # RPC-specific configuration for `list_lfp_stores` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lfp_stores + + # @private + def initialize parent_rpcs = nil + get_lfp_store_config = parent_rpcs.get_lfp_store if parent_rpcs.respond_to? :get_lfp_store + @get_lfp_store = ::Gapic::Config::Method.new get_lfp_store_config + insert_lfp_store_config = parent_rpcs.insert_lfp_store if parent_rpcs.respond_to? :insert_lfp_store + @insert_lfp_store = ::Gapic::Config::Method.new insert_lfp_store_config + delete_lfp_store_config = parent_rpcs.delete_lfp_store if parent_rpcs.respond_to? :delete_lfp_store + @delete_lfp_store = ::Gapic::Config::Method.new delete_lfp_store_config + list_lfp_stores_config = parent_rpcs.list_lfp_stores if parent_rpcs.respond_to? :list_lfp_stores + @list_lfp_stores = ::Gapic::Config::Method.new list_lfp_stores_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb new file mode 100644 index 000000000000..d91e92f8a337 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb @@ -0,0 +1,328 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/lfp/v1/lfpstore_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpStoreService + module Rest + ## + # REST service stub for the LfpStoreService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # A result object deserialized from the server's reply + def get_lfp_store request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_lfp_store_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_lfp_store", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the insert_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # A result object deserialized from the server's reply + def insert_lfp_store request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_store_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "insert_lfp_store", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.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_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_lfp_store request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_lfp_store_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_lfp_store", + 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_lfp_stores REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse] + # A result object deserialized from the server's reply + def list_lfp_stores request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_lfp_stores_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_lfp_stores", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_lfp_store_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/lfp/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/lfpStores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_lfp_store_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/lfp/v1/{parent}/lfpStores:insert", + body: "lfp_store", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_lfp_store_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/lfp/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/lfpStores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_lfp_stores REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_lfp_stores_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/lfp/v1/{parent}/lfpStores", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_pb.rb new file mode 100644 index 000000000000..bebf50dc2328 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/lfp/v1/lfpinventory.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n2google/shopping/merchant/lfp/v1/lfpinventory.proto\x12\x1fgoogle.shopping.merchant.lfp.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xa2\x05\n\x0cLfpInventory\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x17\n\nstore_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08offer_id\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x04gtin\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12/\n\x05price\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x19\n\x0c\x61vailability\x18\t \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\x08quantity\x18\n \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x38\n\x0f\x63ollection_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x1f\n\rpickup_method\x18\x0c \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1c\n\npickup_sla\x18\r \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1c\n\nfeed_label\x18\x0e \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01:\x95\x01\xea\x41\x91\x01\n\'merchantapi.googleapis.com/LfpInventory\x12Haccounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}*\x0elfpInventories2\x0clfpInventoryB\x07\n\x05_gtinB\x0b\n\t_quantityB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\r\n\x0b_feed_label\"\xa7\x01\n\x19InsertLfpInventoryRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'merchantapi.googleapis.com/LfpInventory\x12I\n\rlfp_inventory\x18\x02 \x01(\x0b\x32-.google.shopping.merchant.lfp.v1.LfpInventoryB\x03\xe0\x41\x02\x32\xaa\x02\n\x13LfpInventoryService\x12\xc9\x01\n\x12InsertLfpInventory\x12:.google.shopping.merchant.lfp.v1.InsertLfpInventoryRequest\x1a-.google.shopping.merchant.lfp.v1.LfpInventory\"H\x82\xd3\xe4\x93\x02\x42\"1/lfp/v1/{parent=accounts/*}/lfpInventories:insert:\rlfp_inventory\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x9c\x02\n#com.google.shopping.merchant.lfp.v1B\x11LfpInventoryProtoP\x01Z;cloud.google.com/go/shopping/merchant/lfp/apiv1/lfppb;lfppb\xaa\x02\x1fGoogle.Shopping.Merchant.Lfp.V1\xca\x02\x1fGoogle\\Shopping\\Merchant\\Lfp\\V1\xea\x02#Google::Shopping::Merchant::Lfp::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Lfp + module V1 + LfpInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpInventory").msgclass + InsertLfpInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.InsertLfpInventoryRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_services_pb.rb new file mode 100644 index 000000000000..209da3015936 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/lfp/v1/lfpinventory.proto for package 'Google.Shopping.Merchant.Lfp.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/shopping/merchant/lfp/v1/lfpinventory_pb' + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpInventoryService + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.lfp.v1.LfpInventoryService' + + # Inserts a `LfpInventory` resource for the given target merchant account. If + # the resource already exists, it will be replaced. The inventory + # automatically expires after 30 days. + rpc :InsertLfpInventory, ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest, ::Google::Shopping::Merchant::Lfp::V1::LfpInventory + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_pb.rb new file mode 100644 index 000000000000..575e93d4392c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/lfp/v1/lfpmerchantstate.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 = "\n6google/shopping/merchant/lfp/v1/lfpmerchantstate.proto\x12\x1fgoogle.shopping.merchant.lfp.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc7\x0e\n\x10LfpMerchantState\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0blinked_gbps\x18\x02 \x01(\x03\x12Z\n\x0cstore_states\x18\x03 \x03(\x0b\x32?.google.shopping.merchant.lfp.v1.LfpMerchantState.LfpStoreStateB\x03\xe0\x41\x03\x12Y\n\x0finventory_stats\x18\x04 \x01(\x0b\x32@.google.shopping.merchant.lfp.v1.LfpMerchantState.InventoryStats\x12[\n\x10\x63ountry_settings\x18\x05 \x03(\x0b\x32\x41.google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings\x1a\xb8\x02\n\rLfpStoreState\x12\x1a\n\nstore_code\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12o\n\x0ematching_state\x18\x02 \x01(\x0e\x32R.google.shopping.merchant.lfp.v1.LfpMerchantState.LfpStoreState.StoreMatchingStateB\x03\xe0\x41\x03\x12\x1b\n\x13matching_state_hint\x18\x03 \x01(\t\"}\n\x12StoreMatchingState\x12$\n STORE_MATCHING_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cSTORE_MATCHING_STATE_MATCHED\x10\x01\x12\x1f\n\x1bSTORE_MATCHING_STATE_FAILED\x10\x02\x1a\x88\x01\n\x0eInventoryStats\x12\x19\n\x11submitted_entries\x18\x01 \x01(\x03\x12\"\n\x1asubmitted_in_stock_entries\x18\x02 \x01(\x03\x12\x1b\n\x13unsubmitted_entries\x18\x03 \x01(\x03\x12\x1a\n\x12submitted_products\x18\x04 \x01(\x03\x1a\x9c\x07\n\x0f\x43ountrySettings\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12#\n\x1b\x66ree_local_listings_enabled\x18\x02 \x01(\x08\x12#\n\x1blocal_inventory_ads_enabled\x18\x03 \x01(\x08\x12~\n\x1cinventory_verification_state\x18\x04 \x01(\x0e\x32S.google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.VerificationStateB\x03\xe0\x41\x03\x12q\n\x11product_page_type\x18\x05 \x01(\x0e\x32Q.google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.ProductPageTypeB\x03\xe0\x41\x03\x12\x84\x01\n\"instock_serving_verification_state\x18\x06 \x01(\x0e\x32S.google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.VerificationStateB\x03\xe0\x41\x03\x12\x83\x01\n!pickup_serving_verification_state\x18\x07 \x01(\x0e\x32S.google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.VerificationStateB\x03\xe0\x41\x03\"\xa1\x01\n\x11VerificationState\x12\"\n\x1eVERIFICATION_STATE_UNSPECIFIED\x10\x00\x12#\n\x1fVERIFICATION_STATE_NOT_APPROVED\x10\x01\x12\"\n\x1eVERIFICATION_STATE_IN_PROGRESS\x10\x02\x12\x1f\n\x1bVERIFICATION_STATE_APPROVED\x10\x03\"\x80\x01\n\x0fProductPageType\x12!\n\x1dPRODUCT_PAGE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rGOOGLE_HOSTED\x10\x01\x12\x13\n\x0fMERCHANT_HOSTED\x10\x02\x12\"\n\x1eMERCHANT_HOSTED_STORE_SPECIFIC\x10\x03:\x91\x01\xea\x41\x8d\x01\n+merchantapi.googleapis.com/LfpMerchantState\x12\x39\x61\x63\x63ounts/{account}/lfpMerchantStates/{lfp_merchant_state}*\x11lfpMerchantStates2\x10lfpMerchantState\"_\n\x1aGetLfpMerchantStateRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/LfpMerchantState2\xa8\x02\n\x17LfpMerchantStateService\x12\xc3\x01\n\x13GetLfpMerchantState\x12;.google.shopping.merchant.lfp.v1.GetLfpMerchantStateRequest\x1a\x31.google.shopping.merchant.lfp.v1.LfpMerchantState\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/lfp/v1/{name=accounts/*/lfpMerchantStates/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xe5\x01\n#com.google.shopping.merchant.lfp.v1B\x15LfpMerchantStateProtoP\x01Z;cloud.google.com/go/shopping/merchant/lfp/apiv1/lfppb;lfppb\xaa\x02\x1fGoogle.Shopping.Merchant.Lfp.V1\xca\x02\x1fGoogle\\Shopping\\Merchant\\Lfp\\V1\xea\x02#Google::Shopping::Merchant::Lfp::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Lfp + module V1 + LfpMerchantState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState").msgclass + LfpMerchantState::LfpStoreState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.LfpStoreState").msgclass + LfpMerchantState::LfpStoreState::StoreMatchingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.LfpStoreState.StoreMatchingState").enummodule + LfpMerchantState::InventoryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.InventoryStats").msgclass + LfpMerchantState::CountrySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings").msgclass + LfpMerchantState::CountrySettings::VerificationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.VerificationState").enummodule + LfpMerchantState::CountrySettings::ProductPageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.ProductPageType").enummodule + GetLfpMerchantStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.GetLfpMerchantStateRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb.rb new file mode 100644 index 000000000000..be26c7cf8f6f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb.rb @@ -0,0 +1,52 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/lfp/v1/lfpmerchantstate.proto for package 'Google.Shopping.Merchant.Lfp.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/shopping/merchant/lfp/v1/lfpmerchantstate_pb' + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpMerchantStateService + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to get the + # state of a merchant. + # + # For information about onboarding a retailer, see [How to onboard a + # retailer](https://support.google.com/merchants/answer/15243706). + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.lfp.v1.LfpMerchantStateService' + + # Gets the LFP state of a merchant + rpc :GetLfpMerchantState, ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest, ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_pb.rb new file mode 100644 index 000000000000..96c8eb9adccb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/lfp/v1/lfpsale.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/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n-google/shopping/merchant/lfp/v1/lfpsale.proto\x12\x1fgoogle.shopping.merchant.lfp.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\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xe8\x03\n\x07LfpSale\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x17\n\nstore_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08offer_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04gtin\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12/\n\x05price\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02\x12\x15\n\x08quantity\x18\t \x01(\x03\x42\x03\xe0\x41\x02\x12\x32\n\tsale_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x1d\n\x03uid\x18\x0b \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01H\x00\x88\x01\x01\x12\x1c\n\nfeed_label\x18\x0c \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01:^\xea\x41[\n\"merchantapi.googleapis.com/LfpSale\x12\"accounts/{account}/lfpSales/{sale}*\x08lfpSales2\x07lfpSaleB\x06\n\x04_uidB\r\n\x0b_feed_label\"l\n\x14InsertLfpSaleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12?\n\x08lfp_sale\x18\x02 \x01(\x0b\x32(.google.shopping.merchant.lfp.v1.LfpSaleB\x03\xe0\x41\x02\x32\x8b\x02\n\x0eLfpSaleService\x12\xaf\x01\n\rInsertLfpSale\x12\x35.google.shopping.merchant.lfp.v1.InsertLfpSaleRequest\x1a(.google.shopping.merchant.lfp.v1.LfpSale\"=\x82\xd3\xe4\x93\x02\x37\"+/lfp/v1/{parent=accounts/*}/lfpSales:insert:\x08lfp_sale\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xdc\x01\n#com.google.shopping.merchant.lfp.v1B\x0cLfpSaleProtoP\x01Z;cloud.google.com/go/shopping/merchant/lfp/apiv1/lfppb;lfppb\xaa\x02\x1fGoogle.Shopping.Merchant.Lfp.V1\xca\x02\x1fGoogle\\Shopping\\Merchant\\Lfp\\V1\xea\x02#Google::Shopping::Merchant::Lfp::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Lfp + module V1 + LfpSale = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpSale").msgclass + InsertLfpSaleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.InsertLfpSaleRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_services_pb.rb new file mode 100644 index 000000000000..60c0eb7527b3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_services_pb.rb @@ -0,0 +1,49 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/lfp/v1/lfpsale.proto for package 'Google.Shopping.Merchant.Lfp.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/shopping/merchant/lfp/v1/lfpsale_pb' + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpSaleService + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.lfp.v1.LfpSaleService' + + # Inserts a `LfpSale` for the given merchant. + rpc :InsertLfpSale, ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest, ::Google::Shopping::Merchant::Lfp::V1::LfpSale + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_pb.rb new file mode 100644 index 000000000000..4a802811b3e0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/lfp/v1/lfpstore.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n.google/shopping/merchant/lfp/v1/lfpstore.proto\x12\x1fgoogle.shopping.merchant.lfp.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xe2\x05\n\x08LfpStore\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x1a\n\nstore_code\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1a\n\rstore_address\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\nstore_name\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1e\n\x0cphone_number\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1d\n\x0bwebsite_uri\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1a\n\rgcid_category\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\x08place_id\x18\t \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\\\n\x0ematching_state\x18\n \x01(\x0e\x32<.google.shopping.merchant.lfp.v1.LfpStore.StoreMatchingStateB\x06\xe0\x41\x01\xe0\x41\x03\x12(\n\x13matching_state_hint\x18\x0b \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03H\x04\x88\x01\x01\"}\n\x12StoreMatchingState\x12$\n STORE_MATCHING_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cSTORE_MATCHING_STATE_MATCHED\x10\x01\x12\x1f\n\x1bSTORE_MATCHING_STATE_FAILED\x10\x02:z\xea\x41w\n#merchantapi.googleapis.com/LfpStore\x12;accounts/{account}/lfpStores/{target_merchant}~{store_code}*\tlfpStores2\x08lfpStoreB\r\n\x0b_store_nameB\x0f\n\r_phone_numberB\x0e\n\x0c_website_uriB\x0b\n\t_place_idB\x16\n\x14_matching_state_hint\"O\n\x12GetLfpStoreRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/LfpStore\"\x97\x01\n\x15InsertLfpStoreRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#merchantapi.googleapis.com/LfpStore\x12\x41\n\tlfp_store\x18\x02 \x01(\x0b\x32).google.shopping.merchant.lfp.v1.LfpStoreB\x03\xe0\x41\x02\"R\n\x15\x44\x65leteLfpStoreRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/LfpStore\"\xa1\x01\n\x14ListLfpStoresRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#merchantapi.googleapis.com/LfpStore\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\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\"o\n\x15ListLfpStoresResponse\x12=\n\nlfp_stores\x18\x01 \x03(\x0b\x32).google.shopping.merchant.lfp.v1.LfpStore\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x9c\x06\n\x0fLfpStoreService\x12\xa3\x01\n\x0bGetLfpStore\x12\x33.google.shopping.merchant.lfp.v1.GetLfpStoreRequest\x1a).google.shopping.merchant.lfp.v1.LfpStore\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'\x12%/lfp/v1/{name=accounts/*/lfpStores/*}\x12\xc7\x01\n\x0eInsertLfpStore\x12\x36.google.shopping.merchant.lfp.v1.InsertLfpStoreRequest\x1a).google.shopping.merchant.lfp.v1.LfpStore\"R\xda\x41\x10parent,lfp_store\x82\xd3\xe4\x93\x02\x39\",/lfp/v1/{parent=accounts/*}/lfpStores:insert:\tlfp_store\x12\x96\x01\n\x0e\x44\x65leteLfpStore\x12\x36.google.shopping.merchant.lfp.v1.DeleteLfpStoreRequest\x1a\x16.google.protobuf.Empty\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'*%/lfp/v1/{name=accounts/*/lfpStores/*}\x12\xb6\x01\n\rListLfpStores\x12\x35.google.shopping.merchant.lfp.v1.ListLfpStoresRequest\x1a\x36.google.shopping.merchant.lfp.v1.ListLfpStoresResponse\"6\xda\x41\x06parent\x82\xd3\xe4\x93\x02\'\x12%/lfp/v1/{parent=accounts/*}/lfpStores\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xdd\x01\n#com.google.shopping.merchant.lfp.v1B\rLfpStoreProtoP\x01Z;cloud.google.com/go/shopping/merchant/lfp/apiv1/lfppb;lfppb\xaa\x02\x1fGoogle.Shopping.Merchant.Lfp.V1\xca\x02\x1fGoogle\\Shopping\\Merchant\\Lfp\\V1\xea\x02#Google::Shopping::Merchant::Lfp::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Lfp + module V1 + LfpStore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpStore").msgclass + LfpStore::StoreMatchingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpStore.StoreMatchingState").enummodule + GetLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.GetLfpStoreRequest").msgclass + InsertLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.InsertLfpStoreRequest").msgclass + DeleteLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.DeleteLfpStoreRequest").msgclass + ListLfpStoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.ListLfpStoresRequest").msgclass + ListLfpStoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.ListLfpStoresResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_services_pb.rb new file mode 100644 index 000000000000..6155bbaea28d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_services_pb.rb @@ -0,0 +1,57 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/lfp/v1/lfpstore.proto for package 'Google.Shopping.Merchant.Lfp.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/shopping/merchant/lfp/v1/lfpstore_pb' + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpStoreService + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.lfp.v1.LfpStoreService' + + # Retrieves information about a store. + rpc :GetLfpStore, ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest, ::Google::Shopping::Merchant::Lfp::V1::LfpStore + # Inserts a store for the target merchant. If the store with the same store + # code already exists, it will be replaced. + rpc :InsertLfpStore, ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest, ::Google::Shopping::Merchant::Lfp::V1::LfpStore + # Deletes a store for a target merchant. + rpc :DeleteLfpStore, ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest, ::Google::Protobuf::Empty + # Lists the stores of the target merchant, specified by the filter in + # `ListLfpStoresRequest`. + rpc :ListLfpStores, ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest, ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/rest.rb new file mode 100644 index 000000000000..4d4fada1a79a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/rest.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/shopping/merchant/lfp/v1/lfp_inventory_service/rest" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest" +require "google/shopping/merchant/lfp/v1/lfp_store_service/rest" +require "google/shopping/merchant/lfp/v1/version" + +module Google + module Shopping + module Merchant + module Lfp + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/lfp/v1/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/version.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/version.rb new file mode 100644 index 000000000000..23d9fe53d3ff --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/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 Shopping + module Merchant + module Lfp + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant 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-shopping-merchant-lfp-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb new file mode 100644 index 000000000000..be67ae3ae6fa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb @@ -0,0 +1,113 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1 + # Local Inventory for the merchant. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name for the `LfpInventory` resource. + # Format: + # `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}` + # @!attribute [rw] target_account + # @return [::Integer] + # Required. The Merchant Center ID of the merchant to submit the inventory + # for. + # @!attribute [rw] store_code + # @return [::String] + # Required. The identifier of the merchant's store. Either the store code + # inserted through `InsertLfpStore` or the store code in the Business + # Profile. + # @!attribute [rw] offer_id + # @return [::String] + # Required. Immutable. A unique identifier for the product. If both + # inventories and sales are submitted for a merchant, this id should match + # for the same product. + # + # **Note**: if the merchant sells the same product new and used, they should + # have different IDs. + # @!attribute [rw] region_code + # @return [::String] + # Required. The [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) + # for the country where the product is sold. + # @!attribute [rw] content_language + # @return [::String] + # Required. The two-letter ISO 639-1 language code for the item. + # @!attribute [rw] gtin + # @return [::String] + # Optional. The Global Trade Item Number of the product. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Optional. The current price of the product. + # @!attribute [rw] availability + # @return [::String] + # Required. Availability of the product at this store. + # For accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342) + # @!attribute [rw] quantity + # @return [::Integer] + # Optional. Quantity of the product available at this store. Must be greater + # than or equal to zero. + # @!attribute [rw] collection_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The time when the inventory is collected. If not set, it will be + # set to the time when the inventory is submitted. + # @!attribute [rw] pickup_method + # @return [::String] + # Optional. Supported pickup method for this offer. Unless the value is "not + # supported", this field must be submitted together with `pickupSla`. For + # accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342). + # @!attribute [rw] pickup_sla + # @return [::String] + # Optional. Expected date that an order will be ready for pickup relative to + # the order date. Must be submitted together with `pickupMethod`. For + # accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342). + # @!attribute [rw] feed_label + # @return [::String] + # Optional. The [feed + # label](https://developers.google.com/shopping-content/guides/products/feed-labels) + # for the product. If this is not set, it will default to `regionCode`. + class LfpInventory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertLfpInventory` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The LFP provider account. + # Format: `accounts/{account}` + # @!attribute [rw] lfp_inventory + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] + # Required. The inventory to insert. + class InsertLfpInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb new file mode 100644 index 000000000000..6c0f10a465ea --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb @@ -0,0 +1,181 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1 + # The LFP state of a merchant. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the `LfpMerchantState` resource. Format: + # `accounts/{account}/lfpMerchantStates/{target_merchant}`. For example, + # `accounts/123456/lfpMerchantStates/567890`. + # @!attribute [rw] linked_gbps + # @return [::Integer] + # Number of [GBPs](https://www.google.com/business/) this merchant has access + # to. + # @!attribute [r] store_states + # @return [::Array<::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::LfpStoreState>] + # Output only. The state per store from the specified merchant. The field + # will be absent if the merchant has no stores submitted through LFP. + # @!attribute [rw] inventory_stats + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::InventoryStats] + # The inventory statistics for the merchant. The field will be absent if the + # merchant has no inventory submitted through LFP. + # @!attribute [rw] country_settings + # @return [::Array<::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::CountrySettings>] + # Country-specific settings for the merchant. + class LfpMerchantState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of a specific merchant's store. + # @!attribute [rw] store_code + # @return [::String] + # Required. Immutable. The identifier of this store. + # @!attribute [r] matching_state + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::LfpStoreState::StoreMatchingState] + # Output only. The store matching state. + # @!attribute [rw] matching_state_hint + # @return [::String] + # The hint of why the matching has failed (only set if matching_state is + # FAILED). + class LfpStoreState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of matching `LfpStore` to a Google Business Profile listing. + module StoreMatchingState + # Store matching state unspecified. + STORE_MATCHING_STATE_UNSPECIFIED = 0 + + # The `LfpStore` is successfully matched with a Google Business Profile + # store. + STORE_MATCHING_STATE_MATCHED = 1 + + # The `LfpStore` is not matched with a Google Business Profile store. + STORE_MATCHING_STATE_FAILED = 2 + end + end + + # The inventory statistics for a merchant. + # @!attribute [rw] submitted_entries + # @return [::Integer] + # Number of entries (understanding entry as a pair of product and store) + # that were built based on provided inventories/sales and submitted to + # Google. + # @!attribute [rw] submitted_in_stock_entries + # @return [::Integer] + # Number of submitted in stock entries. + # @!attribute [rw] unsubmitted_entries + # @return [::Integer] + # Number of entries that were built based on provided + # inventories/sales and couldn't be submitted to Google due to errors like + # missing product. + # @!attribute [rw] submitted_products + # @return [::Integer] + # Number of products from provided inventories/sales that were created from + # matches to existing online products provided by the merchant or to the + # Google catalog. + class InventoryStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Country-specific settings for the merchant. + # @!attribute [rw] region_code + # @return [::String] + # Required. The [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) + # for the country for which these settings are defined. + # @!attribute [rw] free_local_listings_enabled + # @return [::Boolean] + # True if this merchant has enabled free local listings in MC. + # @!attribute [rw] local_inventory_ads_enabled + # @return [::Boolean] + # True if this merchant has enabled local inventory ads in MC. + # @!attribute [r] inventory_verification_state + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::CountrySettings::VerificationState] + # Output only. The verification state of this merchant's inventory check. + # @!attribute [r] product_page_type + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::CountrySettings::ProductPageType] + # Output only. The product page type selected by this merchant. + # @!attribute [r] instock_serving_verification_state + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::CountrySettings::VerificationState] + # Output only. The verification state of this merchant's instock serving + # feature. + # @!attribute [r] pickup_serving_verification_state + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::CountrySettings::VerificationState] + # Output only. The verification state of this merchant's pickup serving + # feature. + class CountrySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible verification states for different merchant programs. + module VerificationState + # Verification state unspecified. + VERIFICATION_STATE_UNSPECIFIED = 0 + + # Verification state not approved. + VERIFICATION_STATE_NOT_APPROVED = 1 + + # Verification state in progress. + VERIFICATION_STATE_IN_PROGRESS = 2 + + # Verification state approved. + VERIFICATION_STATE_APPROVED = 3 + end + + # The possible [product page + # types](https://support.google.com/merchants/topic/15148370) for a + # merchant. + module ProductPageType + # Product page type unspecified. + PRODUCT_PAGE_TYPE_UNSPECIFIED = 0 + + # Google hosted product page. + GOOGLE_HOSTED = 1 + + # Merchant hosted product page. + MERCHANT_HOSTED = 2 + + # Merchant hosted store specific product page. + MERCHANT_HOSTED_STORE_SPECIFIC = 3 + end + end + end + + # Request message for the GetLfpMerchantState method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the state to retrieve. + # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}`. For + # example, `accounts/123456/lfpMerchantStates/567890`. + class GetLfpMerchantStateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb new file mode 100644 index 000000000000..464159590eeb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1 + # A sale for the merchant. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name of the `LfpSale` resource. + # Format: + # `accounts/{account}/lfpSales/{sale}` + # @!attribute [rw] target_account + # @return [::Integer] + # Required. The Merchant Center ID of the merchant to submit the sale for. + # @!attribute [rw] store_code + # @return [::String] + # Required. The identifier of the merchant's store. Either a `storeCode` + # inserted through the API or the code of the store in the Business Profile. + # @!attribute [rw] offer_id + # @return [::String] + # Required. A unique identifier for the product. If both inventories and + # sales are submitted for a merchant, this id should match for the same + # product. + # + # **Note**: if the merchant sells the same product new and used, they should + # have different IDs. + # @!attribute [rw] region_code + # @return [::String] + # Required. The [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) + # for the country where the product is sold. + # @!attribute [rw] content_language + # @return [::String] + # Required. The two-letter ISO 639-1 language code for the item. + # @!attribute [rw] gtin + # @return [::String] + # Required. The Global Trade Item Number of the sold product. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Required. The unit price of the product. + # @!attribute [rw] quantity + # @return [::Integer] + # Required. The relative change of the available quantity. Negative for items + # returned. + # @!attribute [rw] sale_time + # @return [::Google::Protobuf::Timestamp] + # Required. The timestamp for the sale. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the `LfpSale`. + # @!attribute [rw] feed_label + # @return [::String] + # Optional. The [feed + # label](https://developers.google.com/shopping-content/guides/products/feed-labels) + # for the product. If this is not set, it will default to `regionCode`. + class LfpSale + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the InsertLfpSale method. + # @!attribute [rw] parent + # @return [::String] + # Required. The LFP provider account. + # Format: `accounts/{lfp_partner}` + # @!attribute [rw] lfp_sale + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpSale] + # Required. The sale to insert. + class InsertLfpSaleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb new file mode 100644 index 000000000000..36f58df7e7ea --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb @@ -0,0 +1,185 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1 + # A store for the merchant. This will be used to match to a store under the + # Google Business Profile of the target merchant. If a matching store can't be + # found, the inventories or sales submitted with the store code will not be + # used. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name of the `LfpStore` resource. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # @!attribute [rw] target_account + # @return [::Integer] + # Required. The Merchant Center id of the merchant to submit the store for. + # @!attribute [rw] store_code + # @return [::String] + # Required. Immutable. A store identifier that is unique for the target + # merchant. + # @!attribute [rw] store_address + # @return [::String] + # Required. The street address of the store. + # Example: 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA. + # @!attribute [rw] store_name + # @return [::String] + # Optional. The merchant or store name. + # @!attribute [rw] phone_number + # @return [::String] + # Optional. The store phone number in + # [E.164](https://en.wikipedia.org/wiki/E.164) format. Example: + # `+15556767888` + # @!attribute [rw] website_uri + # @return [::String] + # Optional. The website URL for the store or merchant. + # @!attribute [rw] gcid_category + # @return [::Array<::String>] + # Optional. [Google My Business category + # id](https://gcid-explorer.corp.google.com/static/gcid.html). + # @!attribute [rw] place_id + # @return [::String] + # Optional. The [Google Place + # Id](https://developers.google.com/maps/documentation/places/web-service/place-id#id-overview) + # of the store location. + # @!attribute [r] matching_state + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore::StoreMatchingState] + # Optional. Output only. The state of matching to a Google Business Profile. + # See + # {::Google::Shopping::Merchant::Lfp::V1::LfpStore#matching_state_hint matchingStateHint} + # for further details if no match is found. + # @!attribute [r] matching_state_hint + # @return [::String] + # Optional. Output only. The hint of why the matching has failed. This is + # only set when + # {::Google::Shopping::Merchant::Lfp::V1::LfpStore#matching_state matchingState}=`STORE_MATCHING_STATE_FAILED`. + # + # Possible values are: + # + # - "`linked-store-not-found`": There aren't any Google Business + # Profile stores available for matching. + # - "`store-match-not-found`": The provided `LfpStore` couldn't be matched to + # any of the connected Google Business Profile stores. Merchant Center + # account is connected correctly and stores are available on Google Business + # Profile, but the `LfpStore` location address does not match with Google + # Business Profile stores' addresses. Update the `LfpStore` address or Google + # Business Profile store address to match correctly. + # - "`store-match-unverified`": The provided `LfpStore` couldn't be matched + # to any of the connected Google Business Profile stores, as the matched + # Google Business Profile store is unverified. Go through the Google Business + # Profile verification process to match correctly. + class LfpStore + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of matching `LfpStore` to a Google Business Profile. + module StoreMatchingState + # Store matching state unspecified. + STORE_MATCHING_STATE_UNSPECIFIED = 0 + + # The `LfpStore` is successfully matched with a Google Business Profile + # store. + STORE_MATCHING_STATE_MATCHED = 1 + + # The `LfpStore` is not matched with a Google Business Profile store. + STORE_MATCHING_STATE_FAILED = 2 + end + end + + # Request message for the `GetLfpStore` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the store to retrieve. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + class GetLfpStoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the InsertLfpStore method. + # @!attribute [rw] parent + # @return [::String] + # Required. The LFP provider account + # Format: `accounts/{account}` + # @!attribute [rw] lfp_store + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # Required. The store to insert. + class InsertLfpStoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteLfpStore method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the store to delete for the target merchant account. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + class DeleteLfpStoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListLfpStores method. + # @!attribute [rw] parent + # @return [::String] + # Required. The LFP partner. + # Format: `accounts/{account}` + # @!attribute [rw] target_account + # @return [::Integer] + # Required. The Merchant Center id of the merchant to list stores for. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `LfpStore` resources for the given account + # to return. The service returns fewer than this value if the number of + # stores for the given account is less than the `pageSize`. The default value + # is 250. The maximum value is 1000; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListLfpStoresRequest` + # call. Provide the page token to retrieve the subsequent page. When + # paginating, all other parameters provided to `ListLfpStoresRequest` must + # match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListLfpStoresRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListLfpStores method. + # @!attribute [rw] lfp_stores + # @return [::Array<::Google::Shopping::Merchant::Lfp::V1::LfpStore>] + # The stores from the specified merchant. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListLfpStoresResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/type/types.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! + + +module Google + module Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + + # Youtube shopping checkout. + YOUTUBE_SHOPPING_CHECKOUT = 7 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 8 + + # [Free vehicle + # listings](https://support.google.com/merchants/answer/11189169). + FREE_VEHICLE_LISTINGS = 9 + + # [Vehicle ads](https://support.google.com/merchants/answer/11189169). + VEHICLE_ADS = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free product listings on UCP + # checkout](https://developers.google.com/merchant/ucp). + FREE_LISTINGS_UCP_CHECKOUT = 19 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 18 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + + # [Product + # Reviews](https://support.google.com/merchants/answer/14620732). + PRODUCT_REVIEWS = 15 + + # [Merchant + # Reviews](https://developers.google.com/merchant-review-feeds). + MERCHANT_REVIEWS = 16 + + # YouTube Checkout + # . + YOUTUBE_CHECKOUT = 17 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/Gemfile new file mode 100644 index 000000000000..1c952600471e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1", path: "../" +else + gem "google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/snippets/lfp_inventory_service/insert_lfp_inventory.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_inventory_service/insert_lfp_inventory.rb new file mode 100644 index 000000000000..c320eb8f15fb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_inventory_service/insert_lfp_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_LfpInventoryService_InsertLfpInventory_sync] +require "google/shopping/merchant/lfp/v1" + +## +# Snippet for the insert_lfp_inventory call in the LfpInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client#insert_lfp_inventory. +# +def insert_lfp_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new + + # Call the insert_lfp_inventory method. + result = client.insert_lfp_inventory request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpInventory. + p result +end +# [END merchantapi_v1_generated_LfpInventoryService_InsertLfpInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb new file mode 100644 index 000000000000..a01a95ef97f2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_LfpMerchantStateService_GetLfpMerchantState_sync] +require "google/shopping/merchant/lfp/v1" + +## +# Snippet for the get_lfp_merchant_state call in the LfpMerchantStateService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client#get_lfp_merchant_state. +# +def get_lfp_merchant_state + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new + + # Call the get_lfp_merchant_state method. + result = client.get_lfp_merchant_state request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpMerchantState. + p result +end +# [END merchantapi_v1_generated_LfpMerchantStateService_GetLfpMerchantState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_sale_service/insert_lfp_sale.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_sale_service/insert_lfp_sale.rb new file mode 100644 index 000000000000..4735d2bea123 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_sale_service/insert_lfp_sale.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_LfpSaleService_InsertLfpSale_sync] +require "google/shopping/merchant/lfp/v1" + +## +# Snippet for the insert_lfp_sale call in the LfpSaleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client#insert_lfp_sale. +# +def insert_lfp_sale + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new + + # Call the insert_lfp_sale method. + result = client.insert_lfp_sale request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpSale. + p result +end +# [END merchantapi_v1_generated_LfpSaleService_InsertLfpSale_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/delete_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/delete_lfp_store.rb new file mode 100644 index 000000000000..c8d8b6c98a3f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/delete_lfp_store.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_LfpStoreService_DeleteLfpStore_sync] +require "google/shopping/merchant/lfp/v1" + +## +# Snippet for the delete_lfp_store call in the LfpStoreService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#delete_lfp_store. +# +def delete_lfp_store + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new + + # Call the delete_lfp_store method. + result = client.delete_lfp_store request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_LfpStoreService_DeleteLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/get_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/get_lfp_store.rb new file mode 100644 index 000000000000..3e9192af1e2c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/get_lfp_store.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_LfpStoreService_GetLfpStore_sync] +require "google/shopping/merchant/lfp/v1" + +## +# Snippet for the get_lfp_store call in the LfpStoreService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#get_lfp_store. +# +def get_lfp_store + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new + + # Call the get_lfp_store method. + result = client.get_lfp_store request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. + p result +end +# [END merchantapi_v1_generated_LfpStoreService_GetLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/insert_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/insert_lfp_store.rb new file mode 100644 index 000000000000..642f4eec0c49 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/insert_lfp_store.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_LfpStoreService_InsertLfpStore_sync] +require "google/shopping/merchant/lfp/v1" + +## +# Snippet for the insert_lfp_store call in the LfpStoreService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#insert_lfp_store. +# +def insert_lfp_store + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new + + # Call the insert_lfp_store method. + result = client.insert_lfp_store request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. + p result +end +# [END merchantapi_v1_generated_LfpStoreService_InsertLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/list_lfp_stores.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/list_lfp_stores.rb new file mode 100644 index 000000000000..66b394a39c17 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/list_lfp_stores.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 merchantapi_v1_generated_LfpStoreService_ListLfpStores_sync] +require "google/shopping/merchant/lfp/v1" + +## +# Snippet for the list_lfp_stores call in the LfpStoreService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#list_lfp_stores. +# +def list_lfp_stores + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new + + # Call the list_lfp_stores method. + result = client.list_lfp_stores request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Lfp::V1::LfpStore. + p item + end +end +# [END merchantapi_v1_generated_LfpStoreService_ListLfpStores_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json new file mode 100644 index 000000000000..1a6356cc1b53 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json @@ -0,0 +1,295 @@ +{ + "client_library": { + "name": "google-shopping-merchant-lfp-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.lfp.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_LfpInventoryService_InsertLfpInventory_sync", + "title": "Snippet for the insert_lfp_inventory call in the LfpInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client#insert_lfp_inventory.", + "file": "lfp_inventory_service/insert_lfp_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_lfp_inventory", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client#insert_lfp_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1::LfpInventory", + "client": { + "short_name": "LfpInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client" + }, + "method": { + "short_name": "InsertLfpInventory", + "full_name": "google.shopping.merchant.lfp.v1.LfpInventoryService.InsertLfpInventory", + "service": { + "short_name": "LfpInventoryService", + "full_name": "google.shopping.merchant.lfp.v1.LfpInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LfpMerchantStateService_GetLfpMerchantState_sync", + "title": "Snippet for the get_lfp_merchant_state call in the LfpMerchantStateService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client#get_lfp_merchant_state.", + "file": "lfp_merchant_state_service/get_lfp_merchant_state.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_lfp_merchant_state", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client#get_lfp_merchant_state", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState", + "client": { + "short_name": "LfpMerchantStateService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client" + }, + "method": { + "short_name": "GetLfpMerchantState", + "full_name": "google.shopping.merchant.lfp.v1.LfpMerchantStateService.GetLfpMerchantState", + "service": { + "short_name": "LfpMerchantStateService", + "full_name": "google.shopping.merchant.lfp.v1.LfpMerchantStateService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LfpSaleService_InsertLfpSale_sync", + "title": "Snippet for the insert_lfp_sale call in the LfpSaleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client#insert_lfp_sale.", + "file": "lfp_sale_service/insert_lfp_sale.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_lfp_sale", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client#insert_lfp_sale", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1::LfpSale", + "client": { + "short_name": "LfpSaleService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client" + }, + "method": { + "short_name": "InsertLfpSale", + "full_name": "google.shopping.merchant.lfp.v1.LfpSaleService.InsertLfpSale", + "service": { + "short_name": "LfpSaleService", + "full_name": "google.shopping.merchant.lfp.v1.LfpSaleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LfpStoreService_GetLfpStore_sync", + "title": "Snippet for the get_lfp_store call in the LfpStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#get_lfp_store.", + "file": "lfp_store_service/get_lfp_store.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_lfp_store", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#get_lfp_store", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1::LfpStore", + "client": { + "short_name": "LfpStoreService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client" + }, + "method": { + "short_name": "GetLfpStore", + "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService.GetLfpStore", + "service": { + "short_name": "LfpStoreService", + "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LfpStoreService_InsertLfpStore_sync", + "title": "Snippet for the insert_lfp_store call in the LfpStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#insert_lfp_store.", + "file": "lfp_store_service/insert_lfp_store.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_lfp_store", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#insert_lfp_store", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1::LfpStore", + "client": { + "short_name": "LfpStoreService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client" + }, + "method": { + "short_name": "InsertLfpStore", + "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService.InsertLfpStore", + "service": { + "short_name": "LfpStoreService", + "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LfpStoreService_DeleteLfpStore_sync", + "title": "Snippet for the delete_lfp_store call in the LfpStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#delete_lfp_store.", + "file": "lfp_store_service/delete_lfp_store.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_lfp_store", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#delete_lfp_store", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "LfpStoreService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client" + }, + "method": { + "short_name": "DeleteLfpStore", + "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService.DeleteLfpStore", + "service": { + "short_name": "LfpStoreService", + "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LfpStoreService_ListLfpStores_sync", + "title": "Snippet for the list_lfp_stores call in the LfpStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#list_lfp_stores.", + "file": "lfp_store_service/list_lfp_stores.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_lfp_stores", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#list_lfp_stores", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse", + "client": { + "short_name": "LfpStoreService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client" + }, + "method": { + "short_name": "ListLfpStores", + "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService.ListLfpStores", + "service": { + "short_name": "LfpStoreService", + "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService" + } + } + }, + "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-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_paths_test.rb new file mode 100644 index 000000000000..0dad0d8a3cb9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_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/shopping/merchant/lfp/v1/lfp_inventory_service" + +class ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_lfp_inventory_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_inventory_path account: "value0", target_merchant: "value1", store_code: "value2", offer: "value3" + assert_equal "accounts/value0/lfpInventories/value1~value2~value3", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_rest_test.rb new file mode 100644 index 000000000000..a815c8b5b701 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_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/shopping/merchant/lfp/v1/lfpinventory_pb" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest" + + +class ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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_insert_lfp_inventory + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1::LfpInventory.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_inventory = {} + + insert_lfp_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::ServiceStub.stub :transcode_insert_lfp_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_lfp_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_lfp_inventory ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_lfp_inventory(::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_lfp_inventory_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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb new file mode 100644 index 000000000000..ae71ba75dab9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_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/shopping/merchant/lfp/v1/lfpinventory_pb" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service" + +class ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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_insert_lfp_inventory + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1::LfpInventory.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_inventory = {} + + insert_lfp_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_lfp_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1::LfpInventory), request["lfp_inventory"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_lfp_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_lfp_inventory ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_lfp_inventory(::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_lfp_inventory_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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_paths_test.rb new file mode 100644 index 000000000000..b1c5286c6508 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_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/shopping/merchant/lfp/v1/lfp_merchant_state_service" + +class ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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_lfp_merchant_state_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_merchant_state_path account: "value0", lfp_merchant_state: "value1" + assert_equal "accounts/value0/lfpMerchantStates/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb new file mode 100644 index 000000000000..290ca98bbaf5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb @@ -0,0 +1,153 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/lfp/v1/lfpmerchantstate_pb" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest" + + +class ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_lfp_merchant_state + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lfp_merchant_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::ServiceStub.stub :transcode_get_lfp_merchant_state_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_lfp_merchant_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_lfp_merchant_state({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_lfp_merchant_state name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_lfp_merchant_state ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_lfp_merchant_state({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_lfp_merchant_state(::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_lfp_merchant_state_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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb new file mode 100644 index 000000000000..86c962c74def --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb @@ -0,0 +1,162 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/lfp/v1/lfpmerchantstate_pb" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service" + +class ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_lfp_merchant_state + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lfp_merchant_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_lfp_merchant_state, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_lfp_merchant_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_lfp_merchant_state({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_lfp_merchant_state name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_lfp_merchant_state ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_lfp_merchant_state({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_lfp_merchant_state(::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_lfp_merchant_state_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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_paths_test.rb new file mode 100644 index 000000000000..d336b9777d85 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_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/shopping/merchant/lfp/v1/lfp_sale_service" + +class ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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_lfp_sale_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_sale_path account: "value0", sale: "value1" + assert_equal "accounts/value0/lfpSales/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_rest_test.rb new file mode 100644 index 000000000000..298c49ad7341 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_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/shopping/merchant/lfp/v1/lfpsale_pb" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest" + + +class ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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_insert_lfp_sale + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1::LfpSale.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_sale = {} + + insert_lfp_sale_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::ServiceStub.stub :transcode_insert_lfp_sale_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_lfp_sale_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_lfp_sale ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_lfp_sale(::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_lfp_sale_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::Shopping::Merchant::Lfp::V1::LfpSaleService::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::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb new file mode 100644 index 000000000000..f16bddd1ae58 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_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/shopping/merchant/lfp/v1/lfpsale_pb" +require "google/shopping/merchant/lfp/v1/lfp_sale_service" + +class ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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_insert_lfp_sale + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1::LfpSale.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_sale = {} + + insert_lfp_sale_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_lfp_sale, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1::LfpSale), request["lfp_sale"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_lfp_sale_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_lfp_sale ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_lfp_sale(::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_lfp_sale_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::Shopping::Merchant::Lfp::V1::LfpSaleService::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::Shopping::Merchant::Lfp::V1::LfpSaleService::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::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_paths_test.rb new file mode 100644 index 000000000000..c64ac3f0fb5e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_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/shopping/merchant/lfp/v1/lfp_store_service" + +class ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_lfp_store_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_store_path account: "value0", target_merchant: "value1", store_code: "value2" + assert_equal "accounts/value0/lfpStores/value1~value2", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb new file mode 100644 index 000000000000..ab9ff5e835e0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb @@ -0,0 +1,319 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/lfp/v1/lfpstore_pb" +require "google/shopping/merchant/lfp/v1/lfp_store_service/rest" + + +class ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_lfp_store + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ServiceStub.stub :transcode_get_lfp_store_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_lfp_store({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_lfp_store name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_lfp_store ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_lfp_store({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_lfp_store(::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_lfp_store_client_stub.call_count + end + end + end + + def test_insert_lfp_store + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_store = {} + + insert_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ServiceStub.stub :transcode_insert_lfp_store_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_lfp_store parent: parent, lfp_store: lfp_store do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_lfp_store ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_lfp_store(::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_lfp_store_client_stub.call_count + end + end + end + + def test_delete_lfp_store + # 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_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ServiceStub.stub :transcode_delete_lfp_store_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_lfp_store({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_lfp_store name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_lfp_store ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_lfp_store({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_lfp_store(::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_lfp_store_client_stub.call_count + end + end + end + + def test_list_lfp_stores + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + target_account = 42 + page_size = 42 + page_token = "hello world" + + list_lfp_stores_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ServiceStub.stub :transcode_list_lfp_stores_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_lfp_stores_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_lfp_stores parent: parent, target_account: target_account, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_lfp_stores ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new(parent: parent, target_account: target_account, 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_lfp_stores({ parent: parent, target_account: target_account, 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_lfp_stores(::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new(parent: parent, target_account: target_account, 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_lfp_stores_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::Shopping::Merchant::Lfp::V1::LfpStoreService::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::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb new file mode 100644 index 000000000000..a0867c5e40b5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb @@ -0,0 +1,349 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/lfp/v1/lfpstore_pb" +require "google/shopping/merchant/lfp/v1/lfp_store_service" + +class ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_lfp_store + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_lfp_store, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_lfp_store({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_lfp_store name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_lfp_store ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_lfp_store({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_lfp_store(::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_lfp_store_client_stub.call_rpc_count + end + end + + def test_insert_lfp_store + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_store = {} + + insert_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_lfp_store, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1::LfpStore), request["lfp_store"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_lfp_store parent: parent, lfp_store: lfp_store do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_lfp_store ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_lfp_store(::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_lfp_store_client_stub.call_rpc_count + end + end + + def test_delete_lfp_store + # 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_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_lfp_store, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_lfp_store({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_lfp_store name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_lfp_store ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_lfp_store({ 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_lfp_store(::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new(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_lfp_store_client_stub.call_rpc_count + end + end + + def test_list_lfp_stores + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + target_account = 42 + page_size = 42 + page_token = "hello world" + + list_lfp_stores_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_lfp_stores, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["target_account"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_lfp_stores_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: 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_lfp_stores parent: parent, target_account: target_account, page_size: page_size, page_token: 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_lfp_stores ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new(parent: parent, target_account: target_account, page_size: page_size, page_token: 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_lfp_stores({ parent: parent, target_account: target_account, 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_lfp_stores(::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new(parent: parent, target_account: target_account, 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_lfp_stores_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::Shopping::Merchant::Lfp::V1::LfpStoreService::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::Shopping::Merchant::Lfp::V1::LfpStoreService::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::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.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-shopping-merchant-lfp-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..d0ee091e7f0e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta", + "distribution_name": "google-shopping-merchant-lfp-v1beta", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1BETA API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-lfp-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-lfp instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.rubocop.yml new file mode 100644 index 000000000000..5bfed50cae80 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-lfp-v1beta.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-shopping-merchant-lfp-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.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-shopping-merchant-lfp-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1BETA 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-shopping-merchant-lfp-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..f2270ceb15f9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-lfp-v1beta 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-shopping-merchant-lfp-v1beta 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/shopping/merchant/lfp/v1beta" + +client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/lfp/v1beta" + +::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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-shopping-merchant-lfp-v1beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/lfp/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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-shopping-merchant-lfp-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/README.md new file mode 100644 index 000000000000..2778e5e39e75 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1BETA API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1BETA API. Most users should consider using +the main client gem, +[google-shopping-merchant-lfp](https://rubygems.org/gems/google-shopping-merchant-lfp). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-lfp-v1beta +``` + +## 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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/lfp/v1beta" + +client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new +request = ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new # (request fields as keyword arguments...) +response = client.insert_lfp_inventory request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/lfp/v1beta" +require "logger" + +client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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-shopping-merchant-lfp`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-lfp-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-lfp`. +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-shopping-merchant-lfp-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Rakefile new file mode 100644 index 000000000000..39e4090536e4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta 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/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials" + ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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-shopping-merchant-lfp-v1beta 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-shopping-merchant-lfp-v1beta 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-shopping-merchant-lfp-v1beta 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-shopping-merchant-lfp-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-lfp-v1beta" + header "google-shopping-merchant-lfp-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-lfp-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-lfp-v1beta 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-shopping-merchant-lfp-v1beta 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-shopping-merchant-lfp-v1beta 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-shopping-merchant-lfp-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..98df023363e0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/gapic_metadata.json @@ -0,0 +1,80 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.lfp.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::Lfp::V1beta", + "services": { + "LfpInventoryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client", + "rpcs": { + "InsertLfpInventory": { + "methods": [ + "insert_lfp_inventory" + ] + } + } + } + } + }, + "LfpMerchantStateService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client", + "rpcs": { + "GetLfpMerchantState": { + "methods": [ + "get_lfp_merchant_state" + ] + } + } + } + } + }, + "LfpSaleService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client", + "rpcs": { + "InsertLfpSale": { + "methods": [ + "insert_lfp_sale" + ] + } + } + } + } + }, + "LfpStoreService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client", + "rpcs": { + "GetLfpStore": { + "methods": [ + "get_lfp_store" + ] + }, + "InsertLfpStore": { + "methods": [ + "insert_lfp_store" + ] + }, + "DeleteLfpStore": { + "methods": [ + "delete_lfp_store" + ] + }, + "ListLfpStores": { + "methods": [ + "list_lfp_stores" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec new file mode 100644 index 000000000000..a994fec1818b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/lfp/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-lfp-v1beta" + gem.version = Google::Shopping::Merchant::Lfp::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-lfp-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-lfp instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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-shopping-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb new file mode 100644 index 000000000000..a4339e958f48 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.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/shopping/merchant/lfp/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb new file mode 100644 index 000000000000..ba569d5a3db9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service" +require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service" +require "google/shopping/merchant/lfp/v1beta/version" + +module Google + module Shopping + module Merchant + module Lfp + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1beta" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1beta" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/lfp/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb new file mode 100644 index 000000000000..3f182bf2a7c8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1beta/version" + +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new + # + module LfpInventoryService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_inventory_service", "helpers.rb" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb new file mode 100644 index 000000000000..6af5a19806ff --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb @@ -0,0 +1,488 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/lfp/v1beta/lfpinventory_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpInventoryService + ## + # Client for the LfpInventoryService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_inventory_service_stub + + ## + # Configure the LfpInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpInventoryService clients + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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", "Shopping", "Merchant", "Lfp", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpInventoryService 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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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 + @lfp_inventory_service_stub.universe_domain + end + + ## + # Create a new LfpInventoryService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpInventoryService 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/shopping/merchant/lfp/v1beta/lfpinventory_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 + + @lfp_inventory_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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 + ) + + @lfp_inventory_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 + @lfp_inventory_service_stub.logger + end + + # Service calls + + ## + # Inserts a `LfpInventory` resource for the given target merchant account. If + # the resource already exists, it will be replaced. The inventory + # automatically expires after 30 days. + # + # @overload insert_lfp_inventory(request, options = nil) + # Pass arguments to `insert_lfp_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_lfp_inventory(parent: nil, lfp_inventory: nil) + # Pass arguments to `insert_lfp_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account. + # Format: `accounts/{account}` + # @param lfp_inventory [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory, ::Hash] + # Required. The inventory to insert. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new + # + # # Call the insert_lfp_inventory method. + # result = client.insert_lfp_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpInventory. + # p result + # + def insert_lfp_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_lfp_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_lfp_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_lfp_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_inventory_service_stub.call_rpc :insert_lfp_inventory, request, 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 LfpInventoryService API. + # + # This class represents the configuration for LfpInventoryService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # insert_lfp_inventory to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_inventory.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_inventory.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `insert_lfp_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_inventory + + # @private + def initialize parent_rpcs = nil + insert_lfp_inventory_config = parent_rpcs.insert_lfp_inventory if parent_rpcs.respond_to? :insert_lfp_inventory + @insert_lfp_inventory = ::Gapic::Config::Method.new insert_lfp_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb new file mode 100644 index 000000000000..34357f0b45db --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_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 Shopping + module Merchant + module Lfp + module V1beta + module LfpInventoryService + # Credentials for the LfpInventoryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb new file mode 100644 index 000000000000..993a6aade7c4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpInventoryService + # Path helper methods for the LfpInventoryService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified LfpInventory resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}` + # + # @param account [String] + # @param target_merchant [String] + # @param store_code [String] + # @param offer [String] + # + # @return [::String] + def lfp_inventory_path account:, target_merchant:, store_code:, offer: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "target_merchant cannot contain /" if target_merchant.to_s.include? "/" + raise ::ArgumentError, "store_code cannot contain /" if store_code.to_s.include? "/" + + "accounts/#{account}/lfpInventories/#{target_merchant}~#{store_code}~#{offer}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb new file mode 100644 index 000000000000..8aa6339d4641 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1beta/version" + +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new + # + module LfpInventoryService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb new file mode 100644 index 000000000000..531772fd6b43 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb @@ -0,0 +1,438 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/lfp/v1beta/lfpinventory_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpInventoryService + module Rest + ## + # REST client for the LfpInventoryService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_inventory_service_stub + + ## + # Configure the LfpInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpInventoryService clients + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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", "Shopping", "Merchant", "Lfp", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpInventoryService 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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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 + @lfp_inventory_service_stub.universe_domain + end + + ## + # Create a new LfpInventoryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpInventoryService 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 + + @lfp_inventory_service_stub = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lfp_inventory_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 + @lfp_inventory_service_stub.logger + end + + # Service calls + + ## + # Inserts a `LfpInventory` resource for the given target merchant account. If + # the resource already exists, it will be replaced. The inventory + # automatically expires after 30 days. + # + # @overload insert_lfp_inventory(request, options = nil) + # Pass arguments to `insert_lfp_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_lfp_inventory(parent: nil, lfp_inventory: nil) + # Pass arguments to `insert_lfp_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account. + # Format: `accounts/{account}` + # @param lfp_inventory [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory, ::Hash] + # Required. The inventory to insert. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new + # + # # Call the insert_lfp_inventory method. + # result = client.insert_lfp_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpInventory. + # p result + # + def insert_lfp_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_lfp_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_lfp_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_lfp_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_inventory_service_stub.insert_lfp_inventory request, 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 LfpInventoryService REST API. + # + # This class represents the configuration for LfpInventoryService 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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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 + # # insert_lfp_inventory to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_inventory.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_inventory.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `insert_lfp_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_inventory + + # @private + def initialize parent_rpcs = nil + insert_lfp_inventory_config = parent_rpcs.insert_lfp_inventory if parent_rpcs.respond_to? :insert_lfp_inventory + @insert_lfp_inventory = ::Gapic::Config::Method.new insert_lfp_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb new file mode 100644 index 000000000000..401e3ca45ed8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.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! + +require "google/shopping/merchant/lfp/v1beta/lfpinventory_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpInventoryService + module Rest + ## + # REST service stub for the LfpInventoryService 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 insert_lfp_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] + # A result object deserialized from the server's reply + def insert_lfp_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_inventory_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "insert_lfp_inventory", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory.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 insert_lfp_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_lfp_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/lfp/v1beta/{parent}/lfpInventories:insert", + body: "lfp_inventory", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service.rb new file mode 100644 index 000000000000..2eec26b012b3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1beta/version" + +require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/credentials" +require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/paths" +require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/client" +require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to get the + # state of a merchant. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.new + # + module LfpMerchantStateService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_merchant_state_service", "helpers.rb" +require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/client.rb new file mode 100644 index 000000000000..3b5ecbf8e192 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/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/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpMerchantStateService + ## + # Client for the LfpMerchantStateService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to get the + # state of a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_merchant_state_service_stub + + ## + # Configure the LfpMerchantStateService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpMerchantStateService clients + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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", "Shopping", "Merchant", "Lfp", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpMerchantStateService 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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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 + @lfp_merchant_state_service_stub.universe_domain + end + + ## + # Create a new LfpMerchantStateService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpMerchantStateService 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/shopping/merchant/lfp/v1beta/lfpmerchantstate_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 + + @lfp_merchant_state_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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 + ) + + @lfp_merchant_state_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 + @lfp_merchant_state_service_stub.logger + end + + # Service calls + + ## + # Gets the LFP state of a merchant + # + # @overload get_lfp_merchant_state(request, options = nil) + # Pass arguments to `get_lfp_merchant_state` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_lfp_merchant_state(name: nil) + # Pass arguments to `get_lfp_merchant_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the state to retrieve. + # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest.new + # + # # Call the get_lfp_merchant_state method. + # result = client.get_lfp_merchant_state request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState. + # p result + # + def get_lfp_merchant_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_lfp_merchant_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_lfp_merchant_state.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_lfp_merchant_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_merchant_state_service_stub.call_rpc :get_lfp_merchant_state, request, 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 LfpMerchantStateService API. + # + # This class represents the configuration for LfpMerchantStateService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_lfp_merchant_state to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_merchant_state.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_merchant_state.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpMerchantStateService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_lfp_merchant_state` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lfp_merchant_state + + # @private + def initialize parent_rpcs = nil + get_lfp_merchant_state_config = parent_rpcs.get_lfp_merchant_state if parent_rpcs.respond_to? :get_lfp_merchant_state + @get_lfp_merchant_state = ::Gapic::Config::Method.new get_lfp_merchant_state_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/credentials.rb new file mode 100644 index 000000000000..38354370e578 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_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 Shopping + module Merchant + module Lfp + module V1beta + module LfpMerchantStateService + # Credentials for the LfpMerchantStateService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/paths.rb new file mode 100644 index 000000000000..fdd1147f0404 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/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 Shopping + module Merchant + module Lfp + module V1beta + module LfpMerchantStateService + # Path helper methods for the LfpMerchantStateService API. + module Paths + ## + # Create a fully-qualified LfpMerchantState resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/lfpMerchantStates/{lfp_merchant_state}` + # + # @param account [String] + # @param lfp_merchant_state [String] + # + # @return [::String] + def lfp_merchant_state_path account:, lfp_merchant_state: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/lfpMerchantStates/#{lfp_merchant_state}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest.rb new file mode 100644 index 000000000000..6ed162962590 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1beta/version" + +require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/credentials" +require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/paths" +require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/client" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to get the + # state of a merchant. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.new + # + module LfpMerchantStateService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/client.rb new file mode 100644 index 000000000000..c663db5820f6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/client.rb @@ -0,0 +1,434 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpMerchantStateService + module Rest + ## + # REST client for the LfpMerchantStateService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to get the + # state of a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_merchant_state_service_stub + + ## + # Configure the LfpMerchantStateService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpMerchantStateService clients + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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", "Shopping", "Merchant", "Lfp", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpMerchantStateService 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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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 + @lfp_merchant_state_service_stub.universe_domain + end + + ## + # Create a new LfpMerchantStateService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpMerchantStateService 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 + + @lfp_merchant_state_service_stub = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lfp_merchant_state_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 + @lfp_merchant_state_service_stub.logger + end + + # Service calls + + ## + # Gets the LFP state of a merchant + # + # @overload get_lfp_merchant_state(request, options = nil) + # Pass arguments to `get_lfp_merchant_state` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_lfp_merchant_state(name: nil) + # Pass arguments to `get_lfp_merchant_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the state to retrieve. + # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest.new + # + # # Call the get_lfp_merchant_state method. + # result = client.get_lfp_merchant_state request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState. + # p result + # + def get_lfp_merchant_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_lfp_merchant_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_lfp_merchant_state.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_lfp_merchant_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_merchant_state_service_stub.get_lfp_merchant_state request, 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 LfpMerchantStateService REST API. + # + # This class represents the configuration for LfpMerchantStateService 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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_lfp_merchant_state to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_merchant_state.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_merchant_state.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpMerchantStateService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_lfp_merchant_state` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lfp_merchant_state + + # @private + def initialize parent_rpcs = nil + get_lfp_merchant_state_config = parent_rpcs.get_lfp_merchant_state if parent_rpcs.respond_to? :get_lfp_merchant_state + @get_lfp_merchant_state = ::Gapic::Config::Method.new get_lfp_merchant_state_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/service_stub.rb new file mode 100644 index 000000000000..d4ec6c2865b7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/service_stub.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! + +require "google/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpMerchantStateService + module Rest + ## + # REST service stub for the LfpMerchantStateService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_lfp_merchant_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState] + # A result object deserialized from the server's reply + def get_lfp_merchant_state request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_lfp_merchant_state_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_lfp_merchant_state", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_lfp_merchant_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_lfp_merchant_state_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/lfp/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/lfpMerchantStates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb new file mode 100644 index 000000000000..ffff639bc32c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1beta/version" + +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/client" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1beta/lfp_sale_service" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new + # + module LfpSaleService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_sale_service", "helpers.rb" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb new file mode 100644 index 000000000000..e772d1c9b01b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb @@ -0,0 +1,486 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/lfp/v1beta/lfpsale_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpSaleService + ## + # Client for the LfpSaleService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_sale_service_stub + + ## + # Configure the LfpSaleService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpSaleService clients + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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", "Shopping", "Merchant", "Lfp", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpSaleService 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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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 + @lfp_sale_service_stub.universe_domain + end + + ## + # Create a new LfpSaleService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpSaleService 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/shopping/merchant/lfp/v1beta/lfpsale_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 + + @lfp_sale_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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 + ) + + @lfp_sale_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 + @lfp_sale_service_stub.logger + end + + # Service calls + + ## + # Inserts a `LfpSale` for the given merchant. + # + # @overload insert_lfp_sale(request, options = nil) + # Pass arguments to `insert_lfp_sale` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_lfp_sale(parent: nil, lfp_sale: nil) + # Pass arguments to `insert_lfp_sale` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account. + # Format: `accounts/{lfp_partner}` + # @param lfp_sale [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale, ::Hash] + # Required. The sale to insert. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new + # + # # Call the insert_lfp_sale method. + # result = client.insert_lfp_sale request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpSale. + # p result + # + def insert_lfp_sale request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_lfp_sale.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_lfp_sale.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_lfp_sale.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_sale_service_stub.call_rpc :insert_lfp_sale, request, 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 LfpSaleService API. + # + # This class represents the configuration for LfpSaleService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # insert_lfp_sale to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_sale.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_sale.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpSaleService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `insert_lfp_sale` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_sale + + # @private + def initialize parent_rpcs = nil + insert_lfp_sale_config = parent_rpcs.insert_lfp_sale if parent_rpcs.respond_to? :insert_lfp_sale + @insert_lfp_sale = ::Gapic::Config::Method.new insert_lfp_sale_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb new file mode 100644 index 000000000000..579c5651f2f7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_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 Shopping + module Merchant + module Lfp + module V1beta + module LfpSaleService + # Credentials for the LfpSaleService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb new file mode 100644 index 000000000000..76e2d821e236 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/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 Shopping + module Merchant + module Lfp + module V1beta + module LfpSaleService + # Path helper methods for the LfpSaleService API. + module Paths + ## + # Create a fully-qualified LfpSale resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/lfpSales/{sale}` + # + # @param account [String] + # @param sale [String] + # + # @return [::String] + def lfp_sale_path account:, sale: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/lfpSales/#{sale}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb new file mode 100644 index 000000000000..adb464ac4009 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1beta/version" + +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new + # + module LfpSaleService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb new file mode 100644 index 000000000000..d3157f347562 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb @@ -0,0 +1,436 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/lfp/v1beta/lfpsale_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpSaleService + module Rest + ## + # REST client for the LfpSaleService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_sale_service_stub + + ## + # Configure the LfpSaleService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpSaleService clients + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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", "Shopping", "Merchant", "Lfp", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpSaleService 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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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 + @lfp_sale_service_stub.universe_domain + end + + ## + # Create a new LfpSaleService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpSaleService 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 + + @lfp_sale_service_stub = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lfp_sale_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 + @lfp_sale_service_stub.logger + end + + # Service calls + + ## + # Inserts a `LfpSale` for the given merchant. + # + # @overload insert_lfp_sale(request, options = nil) + # Pass arguments to `insert_lfp_sale` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_lfp_sale(parent: nil, lfp_sale: nil) + # Pass arguments to `insert_lfp_sale` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account. + # Format: `accounts/{lfp_partner}` + # @param lfp_sale [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale, ::Hash] + # Required. The sale to insert. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new + # + # # Call the insert_lfp_sale method. + # result = client.insert_lfp_sale request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpSale. + # p result + # + def insert_lfp_sale request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_lfp_sale.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_lfp_sale.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_lfp_sale.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_sale_service_stub.insert_lfp_sale request, 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 LfpSaleService REST API. + # + # This class represents the configuration for LfpSaleService 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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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 + # # insert_lfp_sale to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_sale.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_sale.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpSaleService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `insert_lfp_sale` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_sale + + # @private + def initialize parent_rpcs = nil + insert_lfp_sale_config = parent_rpcs.insert_lfp_sale if parent_rpcs.respond_to? :insert_lfp_sale + @insert_lfp_sale = ::Gapic::Config::Method.new insert_lfp_sale_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb new file mode 100644 index 000000000000..c1011e2ebc60 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.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! + +require "google/shopping/merchant/lfp/v1beta/lfpsale_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpSaleService + module Rest + ## + # REST service stub for the LfpSaleService 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 insert_lfp_sale REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] + # A result object deserialized from the server's reply + def insert_lfp_sale request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_sale_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "insert_lfp_sale", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale.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 insert_lfp_sale REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_lfp_sale_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/lfp/v1beta/{parent}/lfpSales:insert", + body: "lfp_sale", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb new file mode 100644 index 000000000000..e2807eaccfe0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1beta/version" + +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/paths" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/client" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1beta/lfp_store_service" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new + # + module LfpStoreService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_store_service", "helpers.rb" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb new file mode 100644 index 000000000000..3a55c9610eb6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.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! + +require "google/cloud/errors" +require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpStoreService + ## + # Client for the LfpStoreService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_store_service_stub + + ## + # Configure the LfpStoreService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpStoreService clients + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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", "Shopping", "Merchant", "Lfp", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpStoreService 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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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 + @lfp_store_service_stub.universe_domain + end + + ## + # Create a new LfpStoreService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpStoreService 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/shopping/merchant/lfp/v1beta/lfpstore_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 + + @lfp_store_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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 + ) + + @lfp_store_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 + @lfp_store_service_stub.logger + end + + # Service calls + + ## + # Retrieves information about a store. + # + # @overload get_lfp_store(request, options = nil) + # Pass arguments to `get_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_lfp_store(name: nil) + # Pass arguments to `get_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the store to retrieve. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new + # + # # Call the get_lfp_store method. + # result = client.get_lfp_store request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + # p result + # + def get_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_lfp_store.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.call_rpc :get_lfp_store, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inserts a store for the target merchant. If the store with the same store + # code already exists, it will be replaced. + # + # @overload insert_lfp_store(request, options = nil) + # Pass arguments to `insert_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_lfp_store(parent: nil, lfp_store: nil) + # Pass arguments to `insert_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account + # Format: `accounts/{account}` + # @param lfp_store [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore, ::Hash] + # Required. The store to insert. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new + # + # # Call the insert_lfp_store method. + # result = client.insert_lfp_store request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + # p result + # + def insert_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_lfp_store.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.call_rpc :insert_lfp_store, request, 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 store for a target merchant. + # + # @overload delete_lfp_store(request, options = nil) + # Pass arguments to `delete_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_lfp_store(name: nil) + # Pass arguments to `delete_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the store to delete for the target merchant account. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # + # @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/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new + # + # # Call the delete_lfp_store method. + # result = client.delete_lfp_store request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_lfp_store.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.call_rpc :delete_lfp_store, request, 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 stores of the target merchant, specified by the filter in + # `ListLfpStoresRequest`. + # + # @overload list_lfp_stores(request, options = nil) + # Pass arguments to `list_lfp_stores` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_lfp_stores(parent: nil, target_account: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_lfp_stores` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP partner. + # Format: `accounts/{account}` + # @param target_account [::Integer] + # Required. The Merchant Center id of the merchant to list stores for. + # @param page_size [::Integer] + # Optional. The maximum number of `LfpStore` resources for the given account + # to return. The service returns fewer than this value if the number of + # stores for the given account is less than the `pageSize`. The default value + # is 250. The maximum value is 1000; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListLfpStoresRequest` + # call. Provide the page token to retrieve the subsequent page. When + # paginating, all other parameters provided to `ListLfpStoresRequest` must + # match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse#next_page_token nextPageToken} + # in the response to the previous request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new + # + # # Call the list_lfp_stores method. + # result = client.list_lfp_stores request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + # p item + # end + # + def list_lfp_stores request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_lfp_stores.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_lfp_stores.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_lfp_stores.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.call_rpc :list_lfp_stores, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @lfp_store_service_stub, :list_lfp_stores, 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 LfpStoreService API. + # + # This class represents the configuration for LfpStoreService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_lfp_store to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_store.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_store.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpStoreService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lfp_store + ## + # RPC-specific configuration for `insert_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_store + ## + # RPC-specific configuration for `delete_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lfp_store + ## + # RPC-specific configuration for `list_lfp_stores` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lfp_stores + + # @private + def initialize parent_rpcs = nil + get_lfp_store_config = parent_rpcs.get_lfp_store if parent_rpcs.respond_to? :get_lfp_store + @get_lfp_store = ::Gapic::Config::Method.new get_lfp_store_config + insert_lfp_store_config = parent_rpcs.insert_lfp_store if parent_rpcs.respond_to? :insert_lfp_store + @insert_lfp_store = ::Gapic::Config::Method.new insert_lfp_store_config + delete_lfp_store_config = parent_rpcs.delete_lfp_store if parent_rpcs.respond_to? :delete_lfp_store + @delete_lfp_store = ::Gapic::Config::Method.new delete_lfp_store_config + list_lfp_stores_config = parent_rpcs.list_lfp_stores if parent_rpcs.respond_to? :list_lfp_stores + @list_lfp_stores = ::Gapic::Config::Method.new list_lfp_stores_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb new file mode 100644 index 000000000000..e11ec1516c68 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_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 Shopping + module Merchant + module Lfp + module V1beta + module LfpStoreService + # Credentials for the LfpStoreService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb new file mode 100644 index 000000000000..1d64fb821b2f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpStoreService + # Path helper methods for the LfpStoreService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified LfpStore resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # + # @param account [String] + # @param target_merchant [String] + # @param store_code [String] + # + # @return [::String] + def lfp_store_path account:, target_merchant:, store_code: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "target_merchant cannot contain /" if target_merchant.to_s.include? "/" + + "accounts/#{account}/lfpStores/#{target_merchant}~#{store_code}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb new file mode 100644 index 000000000000..672832b066ec --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1beta/version" + +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/paths" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new + # + module LfpStoreService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb new file mode 100644 index 000000000000..b2d21a98f846 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb @@ -0,0 +1,717 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/lfp/v1beta/lfpstore_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpStoreService + module Rest + ## + # REST client for the LfpStoreService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_store_service_stub + + ## + # Configure the LfpStoreService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpStoreService clients + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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", "Shopping", "Merchant", "Lfp", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpStoreService 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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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 + @lfp_store_service_stub.universe_domain + end + + ## + # Create a new LfpStoreService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpStoreService 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 + + @lfp_store_service_stub = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lfp_store_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 + @lfp_store_service_stub.logger + end + + # Service calls + + ## + # Retrieves information about a store. + # + # @overload get_lfp_store(request, options = nil) + # Pass arguments to `get_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_lfp_store(name: nil) + # Pass arguments to `get_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the store to retrieve. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new + # + # # Call the get_lfp_store method. + # result = client.get_lfp_store request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + # p result + # + def get_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_lfp_store.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.get_lfp_store request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inserts a store for the target merchant. If the store with the same store + # code already exists, it will be replaced. + # + # @overload insert_lfp_store(request, options = nil) + # Pass arguments to `insert_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_lfp_store(parent: nil, lfp_store: nil) + # Pass arguments to `insert_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account + # Format: `accounts/{account}` + # @param lfp_store [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore, ::Hash] + # Required. The store to insert. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new + # + # # Call the insert_lfp_store method. + # result = client.insert_lfp_store request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + # p result + # + def insert_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_lfp_store.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.insert_lfp_store request, 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 store for a target merchant. + # + # @overload delete_lfp_store(request, options = nil) + # Pass arguments to `delete_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_lfp_store(name: nil) + # Pass arguments to `delete_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the store to delete for the target merchant account. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # @yield [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/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new + # + # # Call the delete_lfp_store method. + # result = client.delete_lfp_store request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_lfp_store.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.delete_lfp_store request, 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 stores of the target merchant, specified by the filter in + # `ListLfpStoresRequest`. + # + # @overload list_lfp_stores(request, options = nil) + # Pass arguments to `list_lfp_stores` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_lfp_stores(parent: nil, target_account: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_lfp_stores` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP partner. + # Format: `accounts/{account}` + # @param target_account [::Integer] + # Required. The Merchant Center id of the merchant to list stores for. + # @param page_size [::Integer] + # Optional. The maximum number of `LfpStore` resources for the given account + # to return. The service returns fewer than this value if the number of + # stores for the given account is less than the `pageSize`. The default value + # is 250. The maximum value is 1000; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListLfpStoresRequest` + # call. Provide the page token to retrieve the subsequent page. When + # paginating, all other parameters provided to `ListLfpStoresRequest` must + # match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse#next_page_token nextPageToken} + # in the response to the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new + # + # # Call the list_lfp_stores method. + # result = client.list_lfp_stores request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + # p item + # end + # + def list_lfp_stores request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_lfp_stores.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_lfp_stores.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_lfp_stores.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.list_lfp_stores request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @lfp_store_service_stub, :list_lfp_stores, "lfp_stores", request, result, 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 LfpStoreService REST API. + # + # This class represents the configuration for LfpStoreService 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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_lfp_store to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_store.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_store.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpStoreService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lfp_store + ## + # RPC-specific configuration for `insert_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_store + ## + # RPC-specific configuration for `delete_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lfp_store + ## + # RPC-specific configuration for `list_lfp_stores` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lfp_stores + + # @private + def initialize parent_rpcs = nil + get_lfp_store_config = parent_rpcs.get_lfp_store if parent_rpcs.respond_to? :get_lfp_store + @get_lfp_store = ::Gapic::Config::Method.new get_lfp_store_config + insert_lfp_store_config = parent_rpcs.insert_lfp_store if parent_rpcs.respond_to? :insert_lfp_store + @insert_lfp_store = ::Gapic::Config::Method.new insert_lfp_store_config + delete_lfp_store_config = parent_rpcs.delete_lfp_store if parent_rpcs.respond_to? :delete_lfp_store + @delete_lfp_store = ::Gapic::Config::Method.new delete_lfp_store_config + list_lfp_stores_config = parent_rpcs.list_lfp_stores if parent_rpcs.respond_to? :list_lfp_stores + @list_lfp_stores = ::Gapic::Config::Method.new list_lfp_stores_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb new file mode 100644 index 000000000000..67b36688a24c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb @@ -0,0 +1,328 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpStoreService + module Rest + ## + # REST service stub for the LfpStoreService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # A result object deserialized from the server's reply + def get_lfp_store request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_lfp_store_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_lfp_store", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the insert_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # A result object deserialized from the server's reply + def insert_lfp_store request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_store_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "insert_lfp_store", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.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_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_lfp_store request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_lfp_store_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_lfp_store", + 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_lfp_stores REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse] + # A result object deserialized from the server's reply + def list_lfp_stores request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_lfp_stores_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_lfp_stores", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_lfp_store_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/lfp/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/lfpStores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_lfp_store_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/lfp/v1beta/{parent}/lfpStores:insert", + body: "lfp_store", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_lfp_store_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/lfp/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/lfpStores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_lfp_stores REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_lfp_stores_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/lfp/v1beta/{parent}/lfpStores", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_pb.rb new file mode 100644 index 000000000000..74d722d2fdd4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/lfp/v1beta/lfpinventory.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n6google/shopping/merchant/lfp/v1beta/lfpinventory.proto\x12#google.shopping.merchant.lfp.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xa2\x05\n\x0cLfpInventory\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x17\n\nstore_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08offer_id\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x04gtin\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12/\n\x05price\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x19\n\x0c\x61vailability\x18\t \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\x08quantity\x18\n \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x38\n\x0f\x63ollection_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x1f\n\rpickup_method\x18\x0c \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1c\n\npickup_sla\x18\r \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1c\n\nfeed_label\x18\x0e \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01:\x95\x01\xea\x41\x91\x01\n\'merchantapi.googleapis.com/LfpInventory\x12Haccounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}*\x0elfpInventories2\x0clfpInventoryB\x07\n\x05_gtinB\x0b\n\t_quantityB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\r\n\x0b_feed_label\"\xab\x01\n\x19InsertLfpInventoryRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'merchantapi.googleapis.com/LfpInventory\x12M\n\rlfp_inventory\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.lfp.v1beta.LfpInventoryB\x03\xe0\x41\x02\x32\xb6\x02\n\x13LfpInventoryService\x12\xd5\x01\n\x12InsertLfpInventory\x12>.google.shopping.merchant.lfp.v1beta.InsertLfpInventoryRequest\x1a\x31.google.shopping.merchant.lfp.v1beta.LfpInventory\"L\x82\xd3\xe4\x93\x02\x46\"5/lfp/v1beta/{parent=accounts/*}/lfpInventories:insert:\rlfp_inventory\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xba\x01\n\'com.google.shopping.merchant.lfp.v1betaB\x11LfpInventoryProtoP\x01Z?cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb;lfppb\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + LfpInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpInventory").msgclass + InsertLfpInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.InsertLfpInventoryRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb new file mode 100644 index 000000000000..932c329a2f11 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/lfp/v1beta/lfpinventory.proto for package 'google.shopping.merchant.lfp.v1beta' +# 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/shopping/merchant/lfp/v1beta/lfpinventory_pb' + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpInventoryService + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.lfp.v1beta.LfpInventoryService' + + # Inserts a `LfpInventory` resource for the given target merchant account. If + # the resource already exists, it will be replaced. The inventory + # automatically expires after 30 days. + rpc :InsertLfpInventory, ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb.rb new file mode 100644 index 000000000000..e7ec7a65aa10 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/lfp/v1beta/lfpmerchantstate.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/shopping/merchant/lfp/v1beta/lfpmerchantstate.proto\x12#google.shopping.merchant.lfp.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe8\x0e\n\x10LfpMerchantState\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0blinked_gbps\x18\x02 \x01(\x03\x12^\n\x0cstore_states\x18\x03 \x03(\x0b\x32\x43.google.shopping.merchant.lfp.v1beta.LfpMerchantState.LfpStoreStateB\x03\xe0\x41\x03\x12]\n\x0finventory_stats\x18\x04 \x01(\x0b\x32\x44.google.shopping.merchant.lfp.v1beta.LfpMerchantState.InventoryStats\x12_\n\x10\x63ountry_settings\x18\x05 \x03(\x0b\x32\x45.google.shopping.merchant.lfp.v1beta.LfpMerchantState.CountrySettings\x1a\xbc\x02\n\rLfpStoreState\x12\x1a\n\nstore_code\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12s\n\x0ematching_state\x18\x02 \x01(\x0e\x32V.google.shopping.merchant.lfp.v1beta.LfpMerchantState.LfpStoreState.StoreMatchingStateB\x03\xe0\x41\x03\x12\x1b\n\x13matching_state_hint\x18\x03 \x01(\t\"}\n\x12StoreMatchingState\x12$\n STORE_MATCHING_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cSTORE_MATCHING_STATE_MATCHED\x10\x01\x12\x1f\n\x1bSTORE_MATCHING_STATE_FAILED\x10\x02\x1a\x88\x01\n\x0eInventoryStats\x12\x19\n\x11submitted_entries\x18\x01 \x01(\x03\x12\"\n\x1asubmitted_in_stock_entries\x18\x02 \x01(\x03\x12\x1b\n\x13unsubmitted_entries\x18\x03 \x01(\x03\x12\x1a\n\x12submitted_products\x18\x04 \x01(\x03\x1a\xad\x07\n\x0f\x43ountrySettings\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12#\n\x1b\x66ree_local_listings_enabled\x18\x02 \x01(\x08\x12#\n\x1blocal_inventory_ads_enabled\x18\x03 \x01(\x08\x12\x82\x01\n\x1cinventory_verification_state\x18\x04 \x01(\x0e\x32W.google.shopping.merchant.lfp.v1beta.LfpMerchantState.CountrySettings.VerificationStateB\x03\xe0\x41\x03\x12u\n\x11product_page_type\x18\x05 \x01(\x0e\x32U.google.shopping.merchant.lfp.v1beta.LfpMerchantState.CountrySettings.ProductPageTypeB\x03\xe0\x41\x03\x12\x88\x01\n\"instock_serving_verification_state\x18\x06 \x01(\x0e\x32W.google.shopping.merchant.lfp.v1beta.LfpMerchantState.CountrySettings.VerificationStateB\x03\xe0\x41\x03\x12\x87\x01\n!pickup_serving_verification_state\x18\x07 \x01(\x0e\x32W.google.shopping.merchant.lfp.v1beta.LfpMerchantState.CountrySettings.VerificationStateB\x03\xe0\x41\x03\"\xa1\x01\n\x11VerificationState\x12\"\n\x1eVERIFICATION_STATE_UNSPECIFIED\x10\x00\x12#\n\x1fVERIFICATION_STATE_NOT_APPROVED\x10\x01\x12\"\n\x1eVERIFICATION_STATE_IN_PROGRESS\x10\x02\x12\x1f\n\x1bVERIFICATION_STATE_APPROVED\x10\x03\"\x80\x01\n\x0fProductPageType\x12!\n\x1dPRODUCT_PAGE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rGOOGLE_HOSTED\x10\x01\x12\x13\n\x0fMERCHANT_HOSTED\x10\x02\x12\"\n\x1eMERCHANT_HOSTED_STORE_SPECIFIC\x10\x03:\x91\x01\xea\x41\x8d\x01\n+merchantapi.googleapis.com/LfpMerchantState\x12\x39\x61\x63\x63ounts/{account}/lfpMerchantStates/{lfp_merchant_state}*\x11lfpMerchantStates2\x10lfpMerchantState\"_\n\x1aGetLfpMerchantStateRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/LfpMerchantState2\xb4\x02\n\x17LfpMerchantStateService\x12\xcf\x01\n\x13GetLfpMerchantState\x12?.google.shopping.merchant.lfp.v1beta.GetLfpMerchantStateRequest\x1a\x35.google.shopping.merchant.lfp.v1beta.LfpMerchantState\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/lfp/v1beta/{name=accounts/*/lfpMerchantStates/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x83\x01\n\'com.google.shopping.merchant.lfp.v1betaB\x15LfpMerchantStateProtoP\x01Z?cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb;lfppbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + LfpMerchantState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpMerchantState").msgclass + LfpMerchantState::LfpStoreState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpMerchantState.LfpStoreState").msgclass + LfpMerchantState::LfpStoreState::StoreMatchingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpMerchantState.LfpStoreState.StoreMatchingState").enummodule + LfpMerchantState::InventoryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpMerchantState.InventoryStats").msgclass + LfpMerchantState::CountrySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpMerchantState.CountrySettings").msgclass + LfpMerchantState::CountrySettings::VerificationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpMerchantState.CountrySettings.VerificationState").enummodule + LfpMerchantState::CountrySettings::ProductPageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpMerchantState.CountrySettings.ProductPageType").enummodule + GetLfpMerchantStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.GetLfpMerchantStateRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_services_pb.rb new file mode 100644 index 000000000000..007442629602 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_services_pb.rb @@ -0,0 +1,49 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/lfp/v1beta/lfpmerchantstate.proto for package 'google.shopping.merchant.lfp.v1beta' +# 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/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb' + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpMerchantStateService + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to get the + # state of a merchant. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.lfp.v1beta.LfpMerchantStateService' + + # Gets the LFP state of a merchant + rpc :GetLfpMerchantState, ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_pb.rb new file mode 100644 index 000000000000..1f6579b66db2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/lfp/v1beta/lfpsale.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/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n1google/shopping/merchant/lfp/v1beta/lfpsale.proto\x12#google.shopping.merchant.lfp.v1beta\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\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xe8\x03\n\x07LfpSale\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x17\n\nstore_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08offer_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04gtin\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12/\n\x05price\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02\x12\x15\n\x08quantity\x18\t \x01(\x03\x42\x03\xe0\x41\x02\x12\x32\n\tsale_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x1d\n\x03uid\x18\x0b \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01H\x00\x88\x01\x01\x12\x1c\n\nfeed_label\x18\x0c \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01:^\xea\x41[\n\"merchantapi.googleapis.com/LfpSale\x12\"accounts/{account}/lfpSales/{sale}*\x08lfpSales2\x07lfpSaleB\x06\n\x04_uidB\r\n\x0b_feed_label\"p\n\x14InsertLfpSaleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x08lfp_sale\x18\x02 \x01(\x0b\x32,.google.shopping.merchant.lfp.v1beta.LfpSaleB\x03\xe0\x41\x02\x32\x97\x02\n\x0eLfpSaleService\x12\xbb\x01\n\rInsertLfpSale\x12\x39.google.shopping.merchant.lfp.v1beta.InsertLfpSaleRequest\x1a,.google.shopping.merchant.lfp.v1beta.LfpSale\"A\x82\xd3\xe4\x93\x02;\"//lfp/v1beta/{parent=accounts/*}/lfpSales:insert:\x08lfp_sale\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentBz\n\'com.google.shopping.merchant.lfp.v1betaB\x0cLfpSaleProtoP\x01Z?cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb;lfppbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + LfpSale = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpSale").msgclass + InsertLfpSaleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.InsertLfpSaleRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb new file mode 100644 index 000000000000..c567c9b70176 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb @@ -0,0 +1,49 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/lfp/v1beta/lfpsale.proto for package 'google.shopping.merchant.lfp.v1beta' +# 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/shopping/merchant/lfp/v1beta/lfpsale_pb' + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpSaleService + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.lfp.v1beta.LfpSaleService' + + # Inserts a `LfpSale` for the given merchant. + rpc :InsertLfpSale, ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_pb.rb new file mode 100644 index 000000000000..592b1eecaf42 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/lfp/v1beta/lfpstore.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n2google/shopping/merchant/lfp/v1beta/lfpstore.proto\x12#google.shopping.merchant.lfp.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xe6\x05\n\x08LfpStore\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x1a\n\nstore_code\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1a\n\rstore_address\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\nstore_name\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1e\n\x0cphone_number\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1d\n\x0bwebsite_uri\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1a\n\rgcid_category\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\x08place_id\x18\t \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12`\n\x0ematching_state\x18\n \x01(\x0e\x32@.google.shopping.merchant.lfp.v1beta.LfpStore.StoreMatchingStateB\x06\xe0\x41\x01\xe0\x41\x03\x12(\n\x13matching_state_hint\x18\x0b \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03H\x04\x88\x01\x01\"}\n\x12StoreMatchingState\x12$\n STORE_MATCHING_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cSTORE_MATCHING_STATE_MATCHED\x10\x01\x12\x1f\n\x1bSTORE_MATCHING_STATE_FAILED\x10\x02:z\xea\x41w\n#merchantapi.googleapis.com/LfpStore\x12;accounts/{account}/lfpStores/{target_merchant}~{store_code}*\tlfpStores2\x08lfpStoreB\r\n\x0b_store_nameB\x0f\n\r_phone_numberB\x0e\n\x0c_website_uriB\x0b\n\t_place_idB\x16\n\x14_matching_state_hint\"O\n\x12GetLfpStoreRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/LfpStore\"\x9b\x01\n\x15InsertLfpStoreRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#merchantapi.googleapis.com/LfpStore\x12\x45\n\tlfp_store\x18\x02 \x01(\x0b\x32-.google.shopping.merchant.lfp.v1beta.LfpStoreB\x03\xe0\x41\x02\"R\n\x15\x44\x65leteLfpStoreRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/LfpStore\"\xa1\x01\n\x14ListLfpStoresRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#merchantapi.googleapis.com/LfpStore\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\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\"s\n\x15ListLfpStoresResponse\x12\x41\n\nlfp_stores\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.lfp.v1beta.LfpStore\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xc8\x06\n\x0fLfpStoreService\x12\xaf\x01\n\x0bGetLfpStore\x12\x37.google.shopping.merchant.lfp.v1beta.GetLfpStoreRequest\x1a-.google.shopping.merchant.lfp.v1beta.LfpStore\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/lfp/v1beta/{name=accounts/*/lfpStores/*}\x12\xd3\x01\n\x0eInsertLfpStore\x12:.google.shopping.merchant.lfp.v1beta.InsertLfpStoreRequest\x1a-.google.shopping.merchant.lfp.v1beta.LfpStore\"V\xda\x41\x10parent,lfp_store\x82\xd3\xe4\x93\x02=\"0/lfp/v1beta/{parent=accounts/*}/lfpStores:insert:\tlfp_store\x12\x9e\x01\n\x0e\x44\x65leteLfpStore\x12:.google.shopping.merchant.lfp.v1beta.DeleteLfpStoreRequest\x1a\x16.google.protobuf.Empty\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+*)/lfp/v1beta/{name=accounts/*/lfpStores/*}\x12\xc2\x01\n\rListLfpStores\x12\x39.google.shopping.merchant.lfp.v1beta.ListLfpStoresRequest\x1a:.google.shopping.merchant.lfp.v1beta.ListLfpStoresResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/lfp/v1beta/{parent=accounts/*}/lfpStores\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB{\n\'com.google.shopping.merchant.lfp.v1betaB\rLfpStoreProtoP\x01Z?cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb;lfppbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + LfpStore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpStore").msgclass + LfpStore::StoreMatchingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpStore.StoreMatchingState").enummodule + GetLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.GetLfpStoreRequest").msgclass + InsertLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.InsertLfpStoreRequest").msgclass + DeleteLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.DeleteLfpStoreRequest").msgclass + ListLfpStoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.ListLfpStoresRequest").msgclass + ListLfpStoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.ListLfpStoresResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb new file mode 100644 index 000000000000..c32b8a0cff48 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb @@ -0,0 +1,57 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/lfp/v1beta/lfpstore.proto for package 'google.shopping.merchant.lfp.v1beta' +# 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/shopping/merchant/lfp/v1beta/lfpstore_pb' + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpStoreService + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.lfp.v1beta.LfpStoreService' + + # Retrieves information about a store. + rpc :GetLfpStore, ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore + # Inserts a store for the target merchant. If the store with the same store + # code already exists, it will be replaced. + rpc :InsertLfpStore, ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore + # Deletes a store for a target merchant. + rpc :DeleteLfpStore, ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest, ::Google::Protobuf::Empty + # Lists the stores of the target merchant, specified by the filter in + # `ListLfpStoresRequest`. + rpc :ListLfpStores, ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest, ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb new file mode 100644 index 000000000000..ccb9d408d652 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.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/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" +require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" +require "google/shopping/merchant/lfp/v1beta/version" + +module Google + module Shopping + module Merchant + module Lfp + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/lfp/v1beta/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/version.rb new file mode 100644 index 000000000000..9ffd278b15b1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/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 Shopping + module Merchant + module Lfp + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1BETA 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-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb new file mode 100644 index 000000000000..19f58bda679a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb @@ -0,0 +1,113 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + # Local Inventory for the merchant. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name for the `LfpInventory` resource. + # Format: + # `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}` + # @!attribute [rw] target_account + # @return [::Integer] + # Required. The Merchant Center ID of the merchant to submit the inventory + # for. + # @!attribute [rw] store_code + # @return [::String] + # Required. The identifier of the merchant's store. Either the store code + # inserted through `InsertLfpStore` or the store code in the Business + # Profile. + # @!attribute [rw] offer_id + # @return [::String] + # Required. Immutable. A unique identifier for the product. If both + # inventories and sales are submitted for a merchant, this id should match + # for the same product. + # + # **Note**: if the merchant sells the same product new and used, they should + # have different IDs. + # @!attribute [rw] region_code + # @return [::String] + # Required. The [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) + # for the country where the product is sold. + # @!attribute [rw] content_language + # @return [::String] + # Required. The two-letter ISO 639-1 language code for the item. + # @!attribute [rw] gtin + # @return [::String] + # Optional. The Global Trade Item Number of the product. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Optional. The current price of the product. + # @!attribute [rw] availability + # @return [::String] + # Required. Availability of the product at this store. + # For accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342) + # @!attribute [rw] quantity + # @return [::Integer] + # Optional. Quantity of the product available at this store. Must be greater + # than or equal to zero. + # @!attribute [rw] collection_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The time when the inventory is collected. If not set, it will be + # set to the time when the inventory is submitted. + # @!attribute [rw] pickup_method + # @return [::String] + # Optional. Supported pickup method for this offer. Unless the value is "not + # supported", this field must be submitted together with `pickupSla`. For + # accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342). + # @!attribute [rw] pickup_sla + # @return [::String] + # Optional. Expected date that an order will be ready for pickup relative to + # the order date. Must be submitted together with `pickupMethod`. For + # accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342). + # @!attribute [rw] feed_label + # @return [::String] + # Optional. The [feed + # label](https://developers.google.com/shopping-content/guides/products/feed-labels) + # for the product. If this is not set, it will default to `regionCode`. + class LfpInventory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertLfpInventory` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The LFP provider account. + # Format: `accounts/{account}` + # @!attribute [rw] lfp_inventory + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] + # Required. The inventory to insert. + class InsertLfpInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpmerchantstate.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpmerchantstate.rb new file mode 100644 index 000000000000..714550db536e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpmerchantstate.rb @@ -0,0 +1,179 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + # The LFP state of a merchant. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the `LfpMerchantState` resource. Format: + # `accounts/{account}/lfpMerchantStates/{target_merchant}` + # @!attribute [rw] linked_gbps + # @return [::Integer] + # Number of [GBPs](https://www.google.com/business/) this merchant has access + # to. + # @!attribute [r] store_states + # @return [::Array<::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState::LfpStoreState>] + # Output only. The state per store from the specified merchant. The field + # will be absent if the merchant has no stores submitted through LFP. + # @!attribute [rw] inventory_stats + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState::InventoryStats] + # The inventory statistics for the merchant. The field will be absent if the + # merchant has no inventory submitted through LFP. + # @!attribute [rw] country_settings + # @return [::Array<::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState::CountrySettings>] + # Country-specific settings for the merchant. + class LfpMerchantState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of a specific merchant's store. + # @!attribute [rw] store_code + # @return [::String] + # Required. Immutable. The identifier of this store. + # @!attribute [r] matching_state + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState::LfpStoreState::StoreMatchingState] + # Output only. The store matching state. + # @!attribute [rw] matching_state_hint + # @return [::String] + # The hint of why the matching has failed (only set if matching_state is + # FAILED). + class LfpStoreState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of matching `LfpStore` to a Google Business Profile listing. + module StoreMatchingState + # Store matching state unspecified. + STORE_MATCHING_STATE_UNSPECIFIED = 0 + + # The `LfpStore` is successfully matched with a Google Business Profile + # store. + STORE_MATCHING_STATE_MATCHED = 1 + + # The `LfpStore` is not matched with a Google Business Profile store. + STORE_MATCHING_STATE_FAILED = 2 + end + end + + # The inventory statistics for a merchant. + # @!attribute [rw] submitted_entries + # @return [::Integer] + # Number of entries (understanding entry as a pair of product and store) + # that were built based on provided inventories/sales and submitted to + # Google. + # @!attribute [rw] submitted_in_stock_entries + # @return [::Integer] + # Number of submitted in stock entries. + # @!attribute [rw] unsubmitted_entries + # @return [::Integer] + # Number of entries that were built based on provided + # inventories/sales and couldn't be submitted to Google due to errors like + # missing product. + # @!attribute [rw] submitted_products + # @return [::Integer] + # Number of products from provided inventories/sales that were created from + # matches to existing online products provided by the merchant or to the + # Google catalog. + class InventoryStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Country-specific settings for the merchant. + # @!attribute [rw] region_code + # @return [::String] + # Required. The [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) + # for the country for which these settings are defined. + # @!attribute [rw] free_local_listings_enabled + # @return [::Boolean] + # True if this merchant has enabled free local listings in MC. + # @!attribute [rw] local_inventory_ads_enabled + # @return [::Boolean] + # True if this merchant has enabled local inventory ads in MC. + # @!attribute [r] inventory_verification_state + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState::CountrySettings::VerificationState] + # Output only. The verification state of this merchant's inventory check. + # @!attribute [r] product_page_type + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState::CountrySettings::ProductPageType] + # Output only. The product page type selected by this merchant. + # @!attribute [r] instock_serving_verification_state + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState::CountrySettings::VerificationState] + # Output only. The verification state of this merchant's instock serving + # feature. + # @!attribute [r] pickup_serving_verification_state + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState::CountrySettings::VerificationState] + # Output only. The verification state of this merchant's pickup serving + # feature. + class CountrySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible verification states for different merchant programs. + module VerificationState + # Verification state unspecified. + VERIFICATION_STATE_UNSPECIFIED = 0 + + # Verification state not approved. + VERIFICATION_STATE_NOT_APPROVED = 1 + + # Verification state in progress. + VERIFICATION_STATE_IN_PROGRESS = 2 + + # Verification state approved. + VERIFICATION_STATE_APPROVED = 3 + end + + # The possible [product page + # types](https://support.google.com/merchants/topic/15148370) for a + # merchant. + module ProductPageType + # Product page type unspecified. + PRODUCT_PAGE_TYPE_UNSPECIFIED = 0 + + # Google hosted product page. + GOOGLE_HOSTED = 1 + + # Merchant hosted product page. + MERCHANT_HOSTED = 2 + + # Merchant hosted store specific product page. + MERCHANT_HOSTED_STORE_SPECIFIC = 3 + end + end + end + + # Request message for the GetLfpMerchantState method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the state to retrieve. + # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}` + class GetLfpMerchantStateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb new file mode 100644 index 000000000000..cdbbfd2aff70 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + # A sale for the merchant. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name of the `LfpSale` resource. + # Format: + # `accounts/{account}/lfpSales/{sale}` + # @!attribute [rw] target_account + # @return [::Integer] + # Required. The Merchant Center ID of the merchant to submit the sale for. + # @!attribute [rw] store_code + # @return [::String] + # Required. The identifier of the merchant's store. Either a `storeCode` + # inserted through the API or the code of the store in the Business Profile. + # @!attribute [rw] offer_id + # @return [::String] + # Required. A unique identifier for the product. If both inventories and + # sales are submitted for a merchant, this id should match for the same + # product. + # + # **Note**: if the merchant sells the same product new and used, they should + # have different IDs. + # @!attribute [rw] region_code + # @return [::String] + # Required. The [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) + # for the country where the product is sold. + # @!attribute [rw] content_language + # @return [::String] + # Required. The two-letter ISO 639-1 language code for the item. + # @!attribute [rw] gtin + # @return [::String] + # Required. The Global Trade Item Number of the sold product. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Required. The unit price of the product. + # @!attribute [rw] quantity + # @return [::Integer] + # Required. The relative change of the available quantity. Negative for items + # returned. + # @!attribute [rw] sale_time + # @return [::Google::Protobuf::Timestamp] + # Required. The timestamp for the sale. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the `LfpSale`. + # @!attribute [rw] feed_label + # @return [::String] + # Optional. The [feed + # label](https://developers.google.com/shopping-content/guides/products/feed-labels) + # for the product. If this is not set, it will default to `regionCode`. + class LfpSale + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the InsertLfpSale method. + # @!attribute [rw] parent + # @return [::String] + # Required. The LFP provider account. + # Format: `accounts/{lfp_partner}` + # @!attribute [rw] lfp_sale + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] + # Required. The sale to insert. + class InsertLfpSaleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb new file mode 100644 index 000000000000..b107be282b52 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb @@ -0,0 +1,185 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + # A store for the merchant. This will be used to match to a store under the + # Google Business Profile of the target merchant. If a matching store can't be + # found, the inventories or sales submitted with the store code will not be + # used. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name of the `LfpStore` resource. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # @!attribute [rw] target_account + # @return [::Integer] + # Required. The Merchant Center id of the merchant to submit the store for. + # @!attribute [rw] store_code + # @return [::String] + # Required. Immutable. A store identifier that is unique for the target + # merchant. + # @!attribute [rw] store_address + # @return [::String] + # Required. The street address of the store. + # Example: 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA. + # @!attribute [rw] store_name + # @return [::String] + # Optional. The merchant or store name. + # @!attribute [rw] phone_number + # @return [::String] + # Optional. The store phone number in + # [E.164](https://en.wikipedia.org/wiki/E.164) format. Example: + # `+15556767888` + # @!attribute [rw] website_uri + # @return [::String] + # Optional. The website URL for the store or merchant. + # @!attribute [rw] gcid_category + # @return [::Array<::String>] + # Optional. [Google My Business category + # id](https://gcid-explorer.corp.google.com/static/gcid.html). + # @!attribute [rw] place_id + # @return [::String] + # Optional. The [Google Place + # Id](https://developers.google.com/maps/documentation/places/web-service/place-id#id-overview) + # of the store location. + # @!attribute [r] matching_state + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore::StoreMatchingState] + # Optional. Output only. The state of matching to a Google Business Profile. + # See + # {::Google::Shopping::Merchant::Lfp::V1beta::LfpStore#matching_state_hint matchingStateHint} + # for further details if no match is found. + # @!attribute [r] matching_state_hint + # @return [::String] + # Optional. Output only. The hint of why the matching has failed. This is + # only set when + # {::Google::Shopping::Merchant::Lfp::V1beta::LfpStore#matching_state matchingState}=`STORE_MATCHING_STATE_FAILED`. + # + # Possible values are: + # + # - "`linked-store-not-found`": There aren't any Google Business + # Profile stores available for matching. + # - "`store-match-not-found`": The provided `LfpStore` couldn't be matched to + # any of the connected Google Business Profile stores. Merchant Center + # account is connected correctly and stores are available on Google Business + # Profile, but the `LfpStore` location address does not match with Google + # Business Profile stores' addresses. Update the `LfpStore` address or Google + # Business Profile store address to match correctly. + # - "`store-match-unverified`": The provided `LfpStore` couldn't be matched + # to any of the connected Google Business Profile stores, as the matched + # Google Business Profile store is unverified. Go through the Google Business + # Profile verification process to match correctly. + class LfpStore + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of matching `LfpStore` to a Google Business Profile. + module StoreMatchingState + # Store matching state unspecified. + STORE_MATCHING_STATE_UNSPECIFIED = 0 + + # The `LfpStore` is successfully matched with a Google Business Profile + # store. + STORE_MATCHING_STATE_MATCHED = 1 + + # The `LfpStore` is not matched with a Google Business Profile store. + STORE_MATCHING_STATE_FAILED = 2 + end + end + + # Request message for the `GetLfpStore` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the store to retrieve. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + class GetLfpStoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the InsertLfpStore method. + # @!attribute [rw] parent + # @return [::String] + # Required. The LFP provider account + # Format: `accounts/{account}` + # @!attribute [rw] lfp_store + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # Required. The store to insert. + class InsertLfpStoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteLfpStore method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the store to delete for the target merchant account. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + class DeleteLfpStoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListLfpStores method. + # @!attribute [rw] parent + # @return [::String] + # Required. The LFP partner. + # Format: `accounts/{account}` + # @!attribute [rw] target_account + # @return [::Integer] + # Required. The Merchant Center id of the merchant to list stores for. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `LfpStore` resources for the given account + # to return. The service returns fewer than this value if the number of + # stores for the given account is less than the `pageSize`. The default value + # is 250. The maximum value is 1000; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListLfpStoresRequest` + # call. Provide the page token to retrieve the subsequent page. When + # paginating, all other parameters provided to `ListLfpStoresRequest` must + # match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListLfpStoresRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListLfpStores method. + # @!attribute [rw] lfp_stores + # @return [::Array<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] + # The stores from the specified merchant. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListLfpStoresResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.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! + + +module Google + module Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + + # Youtube shopping checkout. + YOUTUBE_SHOPPING_CHECKOUT = 7 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 8 + + # [Free vehicle + # listings](https://support.google.com/merchants/answer/11189169). + FREE_VEHICLE_LISTINGS = 9 + + # [Vehicle ads](https://support.google.com/merchants/answer/11189169). + VEHICLE_ADS = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free product listings on UCP + # checkout](https://developers.google.com/merchant/ucp). + FREE_LISTINGS_UCP_CHECKOUT = 19 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 18 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + + # [Product + # Reviews](https://support.google.com/merchants/answer/14620732). + PRODUCT_REVIEWS = 15 + + # [Merchant + # Reviews](https://developers.google.com/merchant-review-feeds). + MERCHANT_REVIEWS = 16 + + # YouTube Checkout + # . + YOUTUBE_CHECKOUT = 17 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..2ec19bba9dbc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta", path: "../" +else + gem "google-shopping-merchant-lfp-v1beta" +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-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb new file mode 100644 index 000000000000..e2585705684c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LfpInventoryService_InsertLfpInventory_sync] +require "google/shopping/merchant/lfp/v1beta" + +## +# Snippet for the insert_lfp_inventory call in the LfpInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client#insert_lfp_inventory. +# +def insert_lfp_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new + + # Call the insert_lfp_inventory method. + result = client.insert_lfp_inventory request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpInventory. + p result +end +# [END merchantapi_v1beta_generated_LfpInventoryService_InsertLfpInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb new file mode 100644 index 000000000000..141678378df2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LfpMerchantStateService_GetLfpMerchantState_sync] +require "google/shopping/merchant/lfp/v1beta" + +## +# Snippet for the get_lfp_merchant_state call in the LfpMerchantStateService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client#get_lfp_merchant_state. +# +def get_lfp_merchant_state + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest.new + + # Call the get_lfp_merchant_state method. + result = client.get_lfp_merchant_state request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState. + p result +end +# [END merchantapi_v1beta_generated_LfpMerchantStateService_GetLfpMerchantState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb new file mode 100644 index 000000000000..9ab7a5e2d19b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LfpSaleService_InsertLfpSale_sync] +require "google/shopping/merchant/lfp/v1beta" + +## +# Snippet for the insert_lfp_sale call in the LfpSaleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client#insert_lfp_sale. +# +def insert_lfp_sale + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new + + # Call the insert_lfp_sale method. + result = client.insert_lfp_sale request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpSale. + p result +end +# [END merchantapi_v1beta_generated_LfpSaleService_InsertLfpSale_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb new file mode 100644 index 000000000000..02f91277cd57 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LfpStoreService_DeleteLfpStore_sync] +require "google/shopping/merchant/lfp/v1beta" + +## +# Snippet for the delete_lfp_store call in the LfpStoreService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#delete_lfp_store. +# +def delete_lfp_store + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new + + # Call the delete_lfp_store method. + result = client.delete_lfp_store request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_LfpStoreService_DeleteLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb new file mode 100644 index 000000000000..724ea5eb612a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LfpStoreService_GetLfpStore_sync] +require "google/shopping/merchant/lfp/v1beta" + +## +# Snippet for the get_lfp_store call in the LfpStoreService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#get_lfp_store. +# +def get_lfp_store + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new + + # Call the get_lfp_store method. + result = client.get_lfp_store request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + p result +end +# [END merchantapi_v1beta_generated_LfpStoreService_GetLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb new file mode 100644 index 000000000000..1ba55bde4558 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LfpStoreService_InsertLfpStore_sync] +require "google/shopping/merchant/lfp/v1beta" + +## +# Snippet for the insert_lfp_store call in the LfpStoreService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#insert_lfp_store. +# +def insert_lfp_store + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new + + # Call the insert_lfp_store method. + result = client.insert_lfp_store request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + p result +end +# [END merchantapi_v1beta_generated_LfpStoreService_InsertLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb new file mode 100644 index 000000000000..fedc94991d61 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.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 merchantapi_v1beta_generated_LfpStoreService_ListLfpStores_sync] +require "google/shopping/merchant/lfp/v1beta" + +## +# Snippet for the list_lfp_stores call in the LfpStoreService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#list_lfp_stores. +# +def list_lfp_stores + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new + + # Call the list_lfp_stores method. + result = client.list_lfp_stores request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + p item + end +end +# [END merchantapi_v1beta_generated_LfpStoreService_ListLfpStores_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/snippet_metadata_google.shopping.merchant.lfp.v1beta.json b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/snippet_metadata_google.shopping.merchant.lfp.v1beta.json new file mode 100644 index 000000000000..7915b20b9fc9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/snippet_metadata_google.shopping.merchant.lfp.v1beta.json @@ -0,0 +1,295 @@ +{ + "client_library": { + "name": "google-shopping-merchant-lfp-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.lfp.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_LfpInventoryService_InsertLfpInventory_sync", + "title": "Snippet for the insert_lfp_inventory call in the LfpInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client#insert_lfp_inventory.", + "file": "lfp_inventory_service/insert_lfp_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_lfp_inventory", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client#insert_lfp_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory", + "client": { + "short_name": "LfpInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client" + }, + "method": { + "short_name": "InsertLfpInventory", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpInventoryService.InsertLfpInventory", + "service": { + "short_name": "LfpInventoryService", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LfpMerchantStateService_GetLfpMerchantState_sync", + "title": "Snippet for the get_lfp_merchant_state call in the LfpMerchantStateService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client#get_lfp_merchant_state.", + "file": "lfp_merchant_state_service/get_lfp_merchant_state.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_lfp_merchant_state", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client#get_lfp_merchant_state", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState", + "client": { + "short_name": "LfpMerchantStateService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client" + }, + "method": { + "short_name": "GetLfpMerchantState", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpMerchantStateService.GetLfpMerchantState", + "service": { + "short_name": "LfpMerchantStateService", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpMerchantStateService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LfpSaleService_InsertLfpSale_sync", + "title": "Snippet for the insert_lfp_sale call in the LfpSaleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client#insert_lfp_sale.", + "file": "lfp_sale_service/insert_lfp_sale.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_lfp_sale", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client#insert_lfp_sale", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpSale", + "client": { + "short_name": "LfpSaleService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client" + }, + "method": { + "short_name": "InsertLfpSale", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpSaleService.InsertLfpSale", + "service": { + "short_name": "LfpSaleService", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpSaleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LfpStoreService_GetLfpStore_sync", + "title": "Snippet for the get_lfp_store call in the LfpStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#get_lfp_store.", + "file": "lfp_store_service/get_lfp_store.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_lfp_store", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#get_lfp_store", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStore", + "client": { + "short_name": "LfpStoreService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client" + }, + "method": { + "short_name": "GetLfpStore", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService.GetLfpStore", + "service": { + "short_name": "LfpStoreService", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LfpStoreService_InsertLfpStore_sync", + "title": "Snippet for the insert_lfp_store call in the LfpStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#insert_lfp_store.", + "file": "lfp_store_service/insert_lfp_store.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_lfp_store", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#insert_lfp_store", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStore", + "client": { + "short_name": "LfpStoreService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client" + }, + "method": { + "short_name": "InsertLfpStore", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService.InsertLfpStore", + "service": { + "short_name": "LfpStoreService", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LfpStoreService_DeleteLfpStore_sync", + "title": "Snippet for the delete_lfp_store call in the LfpStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#delete_lfp_store.", + "file": "lfp_store_service/delete_lfp_store.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_lfp_store", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#delete_lfp_store", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "LfpStoreService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client" + }, + "method": { + "short_name": "DeleteLfpStore", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService.DeleteLfpStore", + "service": { + "short_name": "LfpStoreService", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LfpStoreService_ListLfpStores_sync", + "title": "Snippet for the list_lfp_stores call in the LfpStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#list_lfp_stores.", + "file": "lfp_store_service/list_lfp_stores.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_lfp_stores", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#list_lfp_stores", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse", + "client": { + "short_name": "LfpStoreService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client" + }, + "method": { + "short_name": "ListLfpStores", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService.ListLfpStores", + "service": { + "short_name": "LfpStoreService", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService" + } + } + }, + "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-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb new file mode 100644 index 000000000000..da075914c662 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_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/shopping/merchant/lfp/v1beta/lfp_inventory_service" + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_lfp_inventory_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_inventory_path account: "value0", target_merchant: "value1", store_code: "value2", offer: "value3" + assert_equal "accounts/value0/lfpInventories/value1~value2~value3", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb new file mode 100644 index 000000000000..5fd18e3c0574 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_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/shopping/merchant/lfp/v1beta/lfpinventory_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" + + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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_insert_lfp_inventory + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_inventory = {} + + insert_lfp_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::ServiceStub.stub :transcode_insert_lfp_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_lfp_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_lfp_inventory ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_lfp_inventory(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_lfp_inventory_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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb new file mode 100644 index 000000000000..eaf377cb3e3a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_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/shopping/merchant/lfp/v1beta/lfpinventory_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service" + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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_insert_lfp_inventory + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_inventory = {} + + insert_lfp_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_lfp_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory), request["lfp_inventory"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_lfp_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_lfp_inventory ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_lfp_inventory(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_lfp_inventory_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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_paths_test.rb new file mode 100644 index 000000000000..57e0727dc345 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_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/shopping/merchant/lfp/v1beta/lfp_merchant_state_service" + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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_lfp_merchant_state_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_merchant_state_path account: "value0", lfp_merchant_state: "value1" + assert_equal "accounts/value0/lfpMerchantStates/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_rest_test.rb new file mode 100644 index 000000000000..4e6971948bc4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_rest_test.rb @@ -0,0 +1,153 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest" + + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_lfp_merchant_state + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lfp_merchant_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::ServiceStub.stub :transcode_get_lfp_merchant_state_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_lfp_merchant_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_lfp_merchant_state({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_lfp_merchant_state name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_lfp_merchant_state ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_lfp_merchant_state({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_lfp_merchant_state(::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_lfp_merchant_state_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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_test.rb new file mode 100644 index 000000000000..4b8600bed807 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_test.rb @@ -0,0 +1,162 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service" + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_lfp_merchant_state + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lfp_merchant_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_lfp_merchant_state, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_lfp_merchant_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_lfp_merchant_state({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_lfp_merchant_state name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_lfp_merchant_state ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_lfp_merchant_state({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_lfp_merchant_state(::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_lfp_merchant_state_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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb new file mode 100644 index 000000000000..e070ba66a8f6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_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/shopping/merchant/lfp/v1beta/lfp_sale_service" + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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_lfp_sale_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_sale_path account: "value0", sale: "value1" + assert_equal "accounts/value0/lfpSales/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb new file mode 100644 index 000000000000..00e3821042a2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_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/shopping/merchant/lfp/v1beta/lfpsale_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" + + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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_insert_lfp_sale + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_sale = {} + + insert_lfp_sale_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::ServiceStub.stub :transcode_insert_lfp_sale_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_lfp_sale_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_lfp_sale ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_lfp_sale(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_lfp_sale_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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb new file mode 100644 index 000000000000..f91812fe3eaf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_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/shopping/merchant/lfp/v1beta/lfpsale_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service" + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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_insert_lfp_sale + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_sale = {} + + insert_lfp_sale_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_lfp_sale, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale), request["lfp_sale"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_lfp_sale_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_lfp_sale ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_lfp_sale(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_lfp_sale_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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb new file mode 100644 index 000000000000..cd51f3f3b1b6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_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/shopping/merchant/lfp/v1beta/lfp_store_service" + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_lfp_store_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_store_path account: "value0", target_merchant: "value1", store_code: "value2" + assert_equal "accounts/value0/lfpStores/value1~value2", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb new file mode 100644 index 000000000000..938bb1acbf83 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb @@ -0,0 +1,319 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/lfp/v1beta/lfpstore_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" + + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_lfp_store + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.stub :transcode_get_lfp_store_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_lfp_store({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_lfp_store name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_lfp_store({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_lfp_store_client_stub.call_count + end + end + end + + def test_insert_lfp_store + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_store = {} + + insert_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.stub :transcode_insert_lfp_store_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_lfp_store parent: parent, lfp_store: lfp_store do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_lfp_store_client_stub.call_count + end + end + end + + def test_delete_lfp_store + # 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_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.stub :transcode_delete_lfp_store_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_lfp_store({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_lfp_store name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_lfp_store({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_lfp_store_client_stub.call_count + end + end + end + + def test_list_lfp_stores + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + target_account = 42 + page_size = 42 + page_token = "hello world" + + list_lfp_stores_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.stub :transcode_list_lfp_stores_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_lfp_stores_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_lfp_stores parent: parent, target_account: target_account, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_lfp_stores ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new(parent: parent, target_account: target_account, 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_lfp_stores({ parent: parent, target_account: target_account, 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_lfp_stores(::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new(parent: parent, target_account: target_account, 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_lfp_stores_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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb new file mode 100644 index 000000000000..5f2540ecd93b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb @@ -0,0 +1,349 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service" + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_lfp_store + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_lfp_store, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_lfp_store({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_lfp_store name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_lfp_store({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_lfp_store_client_stub.call_rpc_count + end + end + + def test_insert_lfp_store + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_store = {} + + insert_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_lfp_store, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore), request["lfp_store"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_lfp_store parent: parent, lfp_store: lfp_store do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_lfp_store_client_stub.call_rpc_count + end + end + + def test_delete_lfp_store + # 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_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_lfp_store, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_lfp_store({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_lfp_store name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_lfp_store({ 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_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new(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_lfp_store_client_stub.call_rpc_count + end + end + + def test_list_lfp_stores + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + target_account = 42 + page_size = 42 + page_token = "hello world" + + list_lfp_stores_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_lfp_stores, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["target_account"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_lfp_stores_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: 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_lfp_stores parent: parent, target_account: target_account, page_size: page_size, page_token: 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_lfp_stores ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new(parent: parent, target_account: target_account, page_size: page_size, page_token: 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_lfp_stores({ parent: parent, target_account: target_account, 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_lfp_stores(::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new(parent: parent, target_account: target_account, 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_lfp_stores_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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-notifications-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-notifications-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-notifications-v1/.repo-metadata.json new file mode 100644 index 000000000000..72fe215300e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-notifications-v1", + "distribution_name": "google-shopping-merchant-notifications-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-notifications-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-notifications instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-notifications-v1/.rubocop.yml new file mode 100644 index 000000000000..c5974b408acf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-notifications-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant 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-shopping-merchant-notifications-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-notifications-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..38ad4c1fb992 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-notifications-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-shopping-merchant-notifications-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/shopping/merchant/notifications/v1" + +client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/notifications/v1" + +::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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-shopping-merchant-notifications-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/shopping/merchant/notifications/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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-shopping-merchant-notifications-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-notifications-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-notifications-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-notifications-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/README.md b/owl-bot-staging/google-shopping-merchant-notifications-v1/README.md new file mode 100644 index 000000000000..fb15c9466375 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-notifications](https://rubygems.org/gems/google-shopping-merchant-notifications). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-notifications-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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/notifications/v1" + +client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new +request = ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new # (request fields as keyword arguments...) +response = client.get_notification_subscription request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-notifications-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/notifications/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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-shopping-merchant-notifications`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-notifications-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-shopping-merchant-notifications`. +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-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-notifications-v1/Rakefile new file mode 100644 index 000000000000..39672e940e60 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-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/shopping/merchant/notifications/v1/notifications_api_service/credentials" + ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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-shopping-merchant-notifications-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-shopping-merchant-notifications-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-shopping-merchant-notifications-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-shopping-merchant-notifications-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-notifications-v1" + header "google-shopping-merchant-notifications-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-notifications-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-notifications-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-shopping-merchant-notifications-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-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-notifications-v1/gapic_metadata.json new file mode 100644 index 000000000000..281f5890c6ac --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/gapic_metadata.json @@ -0,0 +1,48 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.notifications.v1", + "libraryPackage": "::Google::Shopping::Merchant::Notifications::V1", + "services": { + "NotificationsApiService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client", + "rpcs": { + "GetNotificationSubscription": { + "methods": [ + "get_notification_subscription" + ] + }, + "CreateNotificationSubscription": { + "methods": [ + "create_notification_subscription" + ] + }, + "UpdateNotificationSubscription": { + "methods": [ + "update_notification_subscription" + ] + }, + "DeleteNotificationSubscription": { + "methods": [ + "delete_notification_subscription" + ] + }, + "ListNotificationSubscriptions": { + "methods": [ + "list_notification_subscriptions" + ] + }, + "GetNotificationSubscriptionHealthMetrics": { + "methods": [ + "get_notification_subscription_health_metrics" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/google-shopping-merchant-notifications-v1.gemspec b/owl-bot-staging/google-shopping-merchant-notifications-v1/google-shopping-merchant-notifications-v1.gemspec new file mode 100644 index 000000000000..224d0afaabbb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/google-shopping-merchant-notifications-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/notifications/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-notifications-v1" + gem.version = Google::Shopping::Merchant::Notifications::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-notifications-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-notifications instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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-shopping-merchant-notifications-v1/lib/google-shopping-merchant-notifications-v1.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google-shopping-merchant-notifications-v1.rb new file mode 100644 index 000000000000..c64e1071b846 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google-shopping-merchant-notifications-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/shopping/merchant/notifications/v1" diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1.rb new file mode 100644 index 000000000000..ced6dbda5b5f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/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/shopping/merchant/notifications/v1/notifications_api_service" +require "google/shopping/merchant/notifications/v1/version" + +module Google + module Shopping + module Merchant + module Notifications + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/notifications/v1" + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/notifications/v1" + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/notifications/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service.rb new file mode 100644 index 000000000000..729bfaa11947 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/notifications/v1/version" + +require "google/shopping/merchant/notifications/v1/notifications_api_service/credentials" +require "google/shopping/merchant/notifications/v1/notifications_api_service/paths" +require "google/shopping/merchant/notifications/v1/notifications_api_service/client" +require "google/shopping/merchant/notifications/v1/notifications_api_service/rest" + +module Google + module Shopping + module Merchant + module Notifications + module V1 + ## + # Service to manage notification subscriptions for merchants + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/notifications/v1/notifications_api_service" + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/notifications/v1/notifications_api_service/rest" + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + module NotificationsApiService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "notifications_api_service", "helpers.rb" +require "google/shopping/merchant/notifications/v1/notifications_api_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/client.rb new file mode 100644 index 000000000000..bd6fafaf06d0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/client.rb @@ -0,0 +1,988 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/notifications/v1/notificationsapi_pb" + +module Google + module Shopping + module Merchant + module Notifications + module V1 + module NotificationsApiService + ## + # Client for the NotificationsApiService service. + # + # Service to manage notification subscriptions for merchants + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :notifications_api_service_stub + + ## + # Configure the NotificationsApiService Client class. + # + # See {::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all NotificationsApiService clients + # ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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", "Shopping", "Merchant", "Notifications", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the NotificationsApiService 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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 + @notifications_api_service_stub.universe_domain + end + + ## + # Create a new NotificationsApiService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the NotificationsApiService 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/shopping/merchant/notifications/v1/notificationsapi_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 + + @notifications_api_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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 + ) + + @notifications_api_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 + @notifications_api_service_stub.logger + end + + # Service calls + + ## + # Gets notification subscriptions for an account. + # + # @overload get_notification_subscription(request, options = nil) + # Pass arguments to `get_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_notification_subscription(name: nil) + # Pass arguments to `get_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` of the notification subscription. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new + # + # # Call the get_notification_subscription method. + # result = client.get_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + # p result + # + def get_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_notification_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :get_notification_subscription, request, 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 notification subscription for a business. + # For standalone or subaccounts accounts, the business can create a + # subscription for self. For MCAs, the business can create a + # subscription for all managed accounts or for a specific subaccount. + # + # We will allow the following types of notification subscriptions to exist + # together (per business as a subscriber per event type): + # + # 1. Subscription for all managed accounts + subscription for self. + # + # 2. Multiple "partial" subscriptions for managed accounts + subscription + # for self. + # + # we will not allow (per business as a subscriber per event type): + # + # 1. Multiple self subscriptions. + # + # 2. Multiple "all managed accounts" subscriptions. + # + # 3. "All managed accounts" subscription and partial subscriptions at the + # same time. + # + # 4. Multiple partial subscriptions for the same target account. + # + # @overload create_notification_subscription(request, options = nil) + # Pass arguments to `create_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_notification_subscription(parent: nil, notification_subscription: nil) + # Pass arguments to `create_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account that owns the new notification subscription. + # Format: `accounts/{account}` + # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription, ::Hash] + # Required. The notification subscription to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new + # + # # Call the create_notification_subscription method. + # result = client.create_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + # p result + # + def create_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest + + # Converts hash and nil to 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_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_notification_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :create_notification_subscription, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing notification subscription for a merchant. + # + # @overload update_notification_subscription(request, options = nil) + # Pass arguments to `update_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_notification_subscription(notification_subscription: nil, update_mask: nil) + # Pass arguments to `update_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription, ::Hash] + # Required. The new version of the notification subscription that should be + # updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new + # + # # Call the update_notification_subscription method. + # result = client.update_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + # p result + # + def update_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest + + # Converts hash and nil to 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_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.notification_subscription&.name + header_params["notification_subscription.name"] = request.notification_subscription.name + end + + request_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_notification_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :update_notification_subscription, request, 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 notification subscription for a merchant. + # + # @overload delete_notification_subscription(request, options = nil) + # Pass arguments to `delete_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_notification_subscription(name: nil) + # Pass arguments to `delete_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the notification subscription 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/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new + # + # # Call the delete_notification_subscription method. + # result = client.delete_notification_subscription request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_notification_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :delete_notification_subscription, request, 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 all the notification subscriptions for a merchant. + # + # @overload list_notification_subscriptions(request, options = nil) + # Pass arguments to `list_notification_subscriptions` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_notification_subscriptions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_notification_subscriptions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the notification subscriptions. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # The maximum number of notification subscriptions to return in a page. + # The default value for `page_size` is 100. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # @param page_token [::String] + # Token (if provided) to retrieve the subsequent page. All other parameters + # must match the original call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.new + # + # # Call the list_notification_subscriptions method. + # result = client.list_notification_subscriptions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + # p item + # end + # + def list_notification_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_notification_subscriptions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_notification_subscriptions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_notification_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :list_notification_subscriptions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @notifications_api_service_stub, :list_notification_subscriptions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves notification subscription health metrics for a merchant. + # We recommend calling this periodically (hourly or daily) to monitor health + # of your callback endpoint. + # + # @overload get_notification_subscription_health_metrics(request, options = nil) + # Pass arguments to `get_notification_subscription_health_metrics` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_notification_subscription_health_metrics(name: nil) + # Pass arguments to `get_notification_subscription_health_metrics` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` of the notification subscription for which metrics are + # retrieved. + # Format: + # `accounts/{account}/notificationsubscriptions/{notification_subscription}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new + # + # # Call the get_notification_subscription_health_metrics method. + # result = client.get_notification_subscription_health_metrics request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics. + # p result + # + def get_notification_subscription_health_metrics request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_notification_subscription_health_metrics.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_notification_subscription_health_metrics.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_notification_subscription_health_metrics.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :get_notification_subscription_health_metrics, request, 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 NotificationsApiService API. + # + # This class represents the configuration for NotificationsApiService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_notification_subscription to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_notification_subscription.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_notification_subscription.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 NotificationsApiService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_subscription + ## + # RPC-specific configuration for `create_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :create_notification_subscription + ## + # RPC-specific configuration for `update_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :update_notification_subscription + ## + # RPC-specific configuration for `delete_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_notification_subscription + ## + # RPC-specific configuration for `list_notification_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notification_subscriptions + ## + # RPC-specific configuration for `get_notification_subscription_health_metrics` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_subscription_health_metrics + + # @private + def initialize parent_rpcs = nil + get_notification_subscription_config = parent_rpcs.get_notification_subscription if parent_rpcs.respond_to? :get_notification_subscription + @get_notification_subscription = ::Gapic::Config::Method.new get_notification_subscription_config + create_notification_subscription_config = parent_rpcs.create_notification_subscription if parent_rpcs.respond_to? :create_notification_subscription + @create_notification_subscription = ::Gapic::Config::Method.new create_notification_subscription_config + update_notification_subscription_config = parent_rpcs.update_notification_subscription if parent_rpcs.respond_to? :update_notification_subscription + @update_notification_subscription = ::Gapic::Config::Method.new update_notification_subscription_config + delete_notification_subscription_config = parent_rpcs.delete_notification_subscription if parent_rpcs.respond_to? :delete_notification_subscription + @delete_notification_subscription = ::Gapic::Config::Method.new delete_notification_subscription_config + list_notification_subscriptions_config = parent_rpcs.list_notification_subscriptions if parent_rpcs.respond_to? :list_notification_subscriptions + @list_notification_subscriptions = ::Gapic::Config::Method.new list_notification_subscriptions_config + get_notification_subscription_health_metrics_config = parent_rpcs.get_notification_subscription_health_metrics if parent_rpcs.respond_to? :get_notification_subscription_health_metrics + @get_notification_subscription_health_metrics = ::Gapic::Config::Method.new get_notification_subscription_health_metrics_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/credentials.rb new file mode 100644 index 000000000000..e5abb17f2d9b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_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 Shopping + module Merchant + module Notifications + module V1 + module NotificationsApiService + # Credentials for the NotificationsApiService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/paths.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/paths.rb new file mode 100644 index 000000000000..e414dcbea783 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/paths.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Notifications + module V1 + module NotificationsApiService + # Path helper methods for the NotificationsApiService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified NotificationSubscription resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/notificationsubscriptions/{notification_subscription}` + # + # @param account [String] + # @param notification_subscription [String] + # + # @return [::String] + def notification_subscription_path account:, notification_subscription: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/notificationsubscriptions/#{notification_subscription}" + end + + ## + # Create a fully-qualified NotificationSubscriptionHealthMetrics resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/notificationsubscriptions/{notification_subscription}` + # + # @param account [String] + # @param notification_subscription [String] + # + # @return [::String] + def notification_subscription_health_metrics_path account:, notification_subscription: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/notificationsubscriptions/#{notification_subscription}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest.rb new file mode 100644 index 000000000000..c4a23ae7dac0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_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/shopping/merchant/notifications/v1/version" + +require "google/shopping/merchant/notifications/v1/notifications_api_service/credentials" +require "google/shopping/merchant/notifications/v1/notifications_api_service/paths" +require "google/shopping/merchant/notifications/v1/notifications_api_service/rest/client" + +module Google + module Shopping + module Merchant + module Notifications + module V1 + ## + # Service to manage notification subscriptions for merchants + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/notifications/v1/notifications_api_service/rest" + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + module NotificationsApiService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/notifications/v1/notifications_api_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/client.rb new file mode 100644 index 000000000000..4c730f78e8fd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/client.rb @@ -0,0 +1,903 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/notifications/v1/notificationsapi_pb" +require "google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Notifications + module V1 + module NotificationsApiService + module Rest + ## + # REST client for the NotificationsApiService service. + # + # Service to manage notification subscriptions for merchants + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :notifications_api_service_stub + + ## + # Configure the NotificationsApiService Client class. + # + # See {::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all NotificationsApiService clients + # ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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", "Shopping", "Merchant", "Notifications", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the NotificationsApiService 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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 + @notifications_api_service_stub.universe_domain + end + + ## + # Create a new NotificationsApiService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the NotificationsApiService 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 + + @notifications_api_service_stub = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @notifications_api_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 + @notifications_api_service_stub.logger + end + + # Service calls + + ## + # Gets notification subscriptions for an account. + # + # @overload get_notification_subscription(request, options = nil) + # Pass arguments to `get_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_notification_subscription(name: nil) + # Pass arguments to `get_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` of the notification subscription. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new + # + # # Call the get_notification_subscription method. + # result = client.get_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + # p result + # + def get_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_notification_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.get_notification_subscription request, 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 notification subscription for a business. + # For standalone or subaccounts accounts, the business can create a + # subscription for self. For MCAs, the business can create a + # subscription for all managed accounts or for a specific subaccount. + # + # We will allow the following types of notification subscriptions to exist + # together (per business as a subscriber per event type): + # + # 1. Subscription for all managed accounts + subscription for self. + # + # 2. Multiple "partial" subscriptions for managed accounts + subscription + # for self. + # + # we will not allow (per business as a subscriber per event type): + # + # 1. Multiple self subscriptions. + # + # 2. Multiple "all managed accounts" subscriptions. + # + # 3. "All managed accounts" subscription and partial subscriptions at the + # same time. + # + # 4. Multiple partial subscriptions for the same target account. + # + # @overload create_notification_subscription(request, options = nil) + # Pass arguments to `create_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_notification_subscription(parent: nil, notification_subscription: nil) + # Pass arguments to `create_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account that owns the new notification subscription. + # Format: `accounts/{account}` + # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription, ::Hash] + # Required. The notification subscription to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new + # + # # Call the create_notification_subscription method. + # result = client.create_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + # p result + # + def create_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest + + # Converts hash and nil to an 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_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_notification_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.create_notification_subscription request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing notification subscription for a merchant. + # + # @overload update_notification_subscription(request, options = nil) + # Pass arguments to `update_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_notification_subscription(notification_subscription: nil, update_mask: nil) + # Pass arguments to `update_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription, ::Hash] + # Required. The new version of the notification subscription that should be + # updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new + # + # # Call the update_notification_subscription method. + # result = client.update_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + # p result + # + def update_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest + + # Converts hash and nil to an 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_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_notification_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.update_notification_subscription request, 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 notification subscription for a merchant. + # + # @overload delete_notification_subscription(request, options = nil) + # Pass arguments to `delete_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_notification_subscription(name: nil) + # Pass arguments to `delete_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the notification subscription 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/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new + # + # # Call the delete_notification_subscription method. + # result = client.delete_notification_subscription request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_notification_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.delete_notification_subscription request, 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 all the notification subscriptions for a merchant. + # + # @overload list_notification_subscriptions(request, options = nil) + # Pass arguments to `list_notification_subscriptions` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_notification_subscriptions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_notification_subscriptions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the notification subscriptions. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # The maximum number of notification subscriptions to return in a page. + # The default value for `page_size` is 100. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # @param page_token [::String] + # Token (if provided) to retrieve the subsequent page. All other parameters + # must match the original call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.new + # + # # Call the list_notification_subscriptions method. + # result = client.list_notification_subscriptions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + # p item + # end + # + def list_notification_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_notification_subscriptions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_notification_subscriptions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_notification_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.list_notification_subscriptions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @notifications_api_service_stub, :list_notification_subscriptions, "notification_subscriptions", request, result, 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 notification subscription health metrics for a merchant. + # We recommend calling this periodically (hourly or daily) to monitor health + # of your callback endpoint. + # + # @overload get_notification_subscription_health_metrics(request, options = nil) + # Pass arguments to `get_notification_subscription_health_metrics` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_notification_subscription_health_metrics(name: nil) + # Pass arguments to `get_notification_subscription_health_metrics` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` of the notification subscription for which metrics are + # retrieved. + # Format: + # `accounts/{account}/notificationsubscriptions/{notification_subscription}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new + # + # # Call the get_notification_subscription_health_metrics method. + # result = client.get_notification_subscription_health_metrics request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics. + # p result + # + def get_notification_subscription_health_metrics request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_notification_subscription_health_metrics.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_notification_subscription_health_metrics.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_notification_subscription_health_metrics.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.get_notification_subscription_health_metrics request, 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 NotificationsApiService REST API. + # + # This class represents the configuration for NotificationsApiService 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_notification_subscription to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_notification_subscription.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_notification_subscription.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 NotificationsApiService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_subscription + ## + # RPC-specific configuration for `create_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :create_notification_subscription + ## + # RPC-specific configuration for `update_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :update_notification_subscription + ## + # RPC-specific configuration for `delete_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_notification_subscription + ## + # RPC-specific configuration for `list_notification_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notification_subscriptions + ## + # RPC-specific configuration for `get_notification_subscription_health_metrics` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_subscription_health_metrics + + # @private + def initialize parent_rpcs = nil + get_notification_subscription_config = parent_rpcs.get_notification_subscription if parent_rpcs.respond_to? :get_notification_subscription + @get_notification_subscription = ::Gapic::Config::Method.new get_notification_subscription_config + create_notification_subscription_config = parent_rpcs.create_notification_subscription if parent_rpcs.respond_to? :create_notification_subscription + @create_notification_subscription = ::Gapic::Config::Method.new create_notification_subscription_config + update_notification_subscription_config = parent_rpcs.update_notification_subscription if parent_rpcs.respond_to? :update_notification_subscription + @update_notification_subscription = ::Gapic::Config::Method.new update_notification_subscription_config + delete_notification_subscription_config = parent_rpcs.delete_notification_subscription if parent_rpcs.respond_to? :delete_notification_subscription + @delete_notification_subscription = ::Gapic::Config::Method.new delete_notification_subscription_config + list_notification_subscriptions_config = parent_rpcs.list_notification_subscriptions if parent_rpcs.respond_to? :list_notification_subscriptions + @list_notification_subscriptions = ::Gapic::Config::Method.new list_notification_subscriptions_config + get_notification_subscription_health_metrics_config = parent_rpcs.get_notification_subscription_health_metrics if parent_rpcs.respond_to? :get_notification_subscription_health_metrics + @get_notification_subscription_health_metrics = ::Gapic::Config::Method.new get_notification_subscription_health_metrics_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub.rb new file mode 100644 index 000000000000..cf1ad1bda74b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub.rb @@ -0,0 +1,451 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/notifications/v1/notificationsapi_pb" + +module Google + module Shopping + module Merchant + module Notifications + module V1 + module NotificationsApiService + module Rest + ## + # REST service stub for the NotificationsApiService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # A result object deserialized from the server's reply + def get_notification_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_notification_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.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_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # A result object deserialized from the server's reply + def create_notification_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_notification_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.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_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # A result object deserialized from the server's reply + def update_notification_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_notification_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.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_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_notification_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_notification_subscription", + 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_notification_subscriptions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse] + # A result object deserialized from the server's reply + def list_notification_subscriptions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_subscriptions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_notification_subscriptions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_notification_subscription_health_metrics REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] + # A result object deserialized from the server's reply + def get_notification_subscription_health_metrics request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_subscription_health_metrics_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_notification_subscription_health_metrics", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_notification_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/notifications/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest] + # 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_notification_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/notifications/v1/{parent}/notificationsubscriptions", + body: "notification_subscription", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest] + # 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_notification_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/notifications/v1/{notification_subscription.name}", + body: "notification_subscription", + matches: [ + ["notification_subscription.name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_notification_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/notifications/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_notification_subscriptions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_notification_subscriptions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/notifications/v1/{parent}/notificationsubscriptions", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_notification_subscription_health_metrics REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_notification_subscription_health_metrics_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/notifications/v1/{name}:getHealth", + matches: [ + ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_pb.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_pb.rb new file mode 100644 index 000000000000..3e68d9acf1ee --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/notifications/v1/notificationsapi.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n@google/shopping/merchant/notifications/v1/notificationsapi.proto\x12)google.shopping.merchant.notifications.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"o\n\"GetNotificationSubscriptionRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3merchantapi.googleapis.com/NotificationSubscription\"\xe1\x01\n%CreateNotificationSubscriptionRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33merchantapi.googleapis.com/NotificationSubscription\x12k\n\x19notification_subscription\x18\x02 \x01(\x0b\x32\x43.google.shopping.merchant.notifications.v1.NotificationSubscriptionB\x03\xe0\x41\x02\"\xc5\x01\n%UpdateNotificationSubscriptionRequest\x12k\n\x19notification_subscription\x18\x01 \x01(\x0b\x32\x43.google.shopping.merchant.notifications.v1.NotificationSubscriptionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"r\n%DeleteNotificationSubscriptionRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3merchantapi.googleapis.com/NotificationSubscription\"\x9a\x01\n$ListNotificationSubscriptionsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33merchantapi.googleapis.com/NotificationSubscription\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xa9\x01\n%ListNotificationSubscriptionsResponse\x12g\n\x1anotification_subscriptions\x18\x01 \x03(\x0b\x32\x43.google.shopping.merchant.notifications.v1.NotificationSubscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe6\x03\n\x18NotificationSubscription\x12\x1e\n\x14\x61ll_managed_accounts\x18\x03 \x01(\x08H\x00\x12\x18\n\x0etarget_account\x18\x04 \x01(\tH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12s\n\x10registered_event\x18\x02 \x01(\x0e\x32Y.google.shopping.merchant.notifications.v1.NotificationSubscription.NotificationEventType\x12\x15\n\rcall_back_uri\x18\x05 \x01(\t\"[\n\x15NotificationEventType\x12\'\n#NOTIFICATION_EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15PRODUCT_STATUS_CHANGE\x10\x01:\x82\x01\xea\x41\x7f\n3merchantapi.googleapis.com/NotificationSubscription\x12Haccounts/{account}/notificationsubscriptions/{notification_subscription}B\x0f\n\rinterested_in\"\x89\x01\n/GetNotificationSubscriptionHealthMetricsRequest\x12V\n\x04name\x18\x01 \x01(\tBH\xe0\x41\x02\xfa\x41\x42\n@merchantapi.googleapis.com/NotificationSubscriptionHealthMetrics\"\xcd\x02\n%NotificationSubscriptionHealthMetrics\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12#\n\x1b\x61\x63knowledged_messages_count\x18\x02 \x01(\x03\x12\"\n\x1aundelivered_messages_count\x18\x03 \x01(\x03\x12\x32\n*oldest_unacknowledged_message_waiting_time\x18\x04 \x01(\x03:\x90\x01\xea\x41\x8c\x01\n@merchantapi.googleapis.com/NotificationSubscriptionHealthMetrics\x12Haccounts/{account}/notificationsubscriptions/{notification_subscription}2\xb2\x0e\n\x17NotificationsApiService\x12\x81\x02\n\x1bGetNotificationSubscription\x12M.google.shopping.merchant.notifications.v1.GetNotificationSubscriptionRequest\x1a\x43.google.shopping.merchant.notifications.v1.NotificationSubscription\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/notifications/v1/{name=accounts/*/notificationsubscriptions/*}\x12\xbf\x02\n\x1e\x43reateNotificationSubscription\x12P.google.shopping.merchant.notifications.v1.CreateNotificationSubscriptionRequest\x1a\x43.google.shopping.merchant.notifications.v1.NotificationSubscription\"\x85\x01\xda\x41 parent,notification_subscription\x82\xd3\xe4\x93\x02\\\"?/notifications/v1/{parent=accounts/*}/notificationsubscriptions:\x19notification_subscription\x12\xde\x02\n\x1eUpdateNotificationSubscription\x12P.google.shopping.merchant.notifications.v1.UpdateNotificationSubscriptionRequest\x1a\x43.google.shopping.merchant.notifications.v1.NotificationSubscription\"\xa4\x01\xda\x41%notification_subscription,update_mask\x82\xd3\xe4\x93\x02v2Y/notifications/v1/{notification_subscription.name=accounts/*/notificationsubscriptions/*}:\x19notification_subscription\x12\xda\x01\n\x1e\x44\x65leteNotificationSubscription\x12P.google.shopping.merchant.notifications.v1.DeleteNotificationSubscriptionRequest\x1a\x16.google.protobuf.Empty\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/notifications/v1/{name=accounts/*/notificationsubscriptions/*}\x12\x94\x02\n\x1dListNotificationSubscriptions\x12O.google.shopping.merchant.notifications.v1.ListNotificationSubscriptionsRequest\x1aP.google.shopping.merchant.notifications.v1.ListNotificationSubscriptionsResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/notifications/v1/{parent=accounts/*}/notificationsubscriptions\x12\xb2\x02\n(GetNotificationSubscriptionHealthMetrics\x12Z.google.shopping.merchant.notifications.v1.GetNotificationSubscriptionHealthMetricsRequest\x1aP.google.shopping.merchant.notifications.v1.NotificationSubscriptionHealthMetrics\"X\xda\x41\x04name\x82\xd3\xe4\x93\x02K\x12I/notifications/v1/{name=accounts/*/notificationsubscriptions/*}:getHealth\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xe6\x02\n-com.google.shopping.merchant.notifications.v1B\x15NotificationsApiProtoP\x01ZYcloud.google.com/go/shopping/merchant/notifications/apiv1/notificationspb;notificationspb\xaa\x02)Google.Shopping.Merchant.Notifications.V1\xca\x02)Google\\Shopping\\Merchant\\Notifications\\V1\xea\x02-Google::Shopping::Merchant::Notifications::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Notifications + module V1 + GetNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.GetNotificationSubscriptionRequest").msgclass + CreateNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.CreateNotificationSubscriptionRequest").msgclass + UpdateNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.UpdateNotificationSubscriptionRequest").msgclass + DeleteNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.DeleteNotificationSubscriptionRequest").msgclass + ListNotificationSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.ListNotificationSubscriptionsRequest").msgclass + ListNotificationSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.ListNotificationSubscriptionsResponse").msgclass + NotificationSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.NotificationSubscription").msgclass + NotificationSubscription::NotificationEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.NotificationSubscription.NotificationEventType").enummodule + GetNotificationSubscriptionHealthMetricsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.GetNotificationSubscriptionHealthMetricsRequest").msgclass + NotificationSubscriptionHealthMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.NotificationSubscriptionHealthMetrics").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_services_pb.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_services_pb.rb new file mode 100644 index 000000000000..cba98b6bbebc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_services_pb.rb @@ -0,0 +1,81 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/notifications/v1/notificationsapi.proto for package 'Google.Shopping.Merchant.Notifications.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/shopping/merchant/notifications/v1/notificationsapi_pb' + +module Google + module Shopping + module Merchant + module Notifications + module V1 + module NotificationsApiService + # Service to manage notification subscriptions for merchants + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.notifications.v1.NotificationsApiService' + + # Gets notification subscriptions for an account. + rpc :GetNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription + # Creates a notification subscription for a business. + # For standalone or subaccounts accounts, the business can create a + # subscription for self. For MCAs, the business can create a + # subscription for all managed accounts or for a specific subaccount. + # + # We will allow the following types of notification subscriptions to exist + # together (per business as a subscriber per event type): + # + # 1. Subscription for all managed accounts + subscription for self. + # + # 2. Multiple "partial" subscriptions for managed accounts + subscription + # for self. + # + # we will not allow (per business as a subscriber per event type): + # + # 1. Multiple self subscriptions. + # + # 2. Multiple "all managed accounts" subscriptions. + # + # 3. "All managed accounts" subscription and partial subscriptions at the + # same time. + # + # 4. Multiple partial subscriptions for the same target account. + rpc :CreateNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription + # Updates an existing notification subscription for a merchant. + rpc :UpdateNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription + # Deletes a notification subscription for a merchant. + rpc :DeleteNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest, ::Google::Protobuf::Empty + # Gets all the notification subscriptions for a merchant. + rpc :ListNotificationSubscriptions, ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest, ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse + # Retrieves notification subscription health metrics for a merchant. + # We recommend calling this periodically (hourly or daily) to monitor health + # of your callback endpoint. + rpc :GetNotificationSubscriptionHealthMetrics, ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest, ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/rest.rb new file mode 100644 index 000000000000..3e437250fcea --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/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/shopping/merchant/notifications/v1/notifications_api_service/rest" +require "google/shopping/merchant/notifications/v1/version" + +module Google + module Shopping + module Merchant + module Notifications + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/notifications/v1/rest" + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/version.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/version.rb new file mode 100644 index 000000000000..4da1227893b0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/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 Shopping + module Merchant + module Notifications + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant 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-shopping-merchant-notifications-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/proto_docs/google/shopping/merchant/notifications/v1/notificationsapi.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/shopping/merchant/notifications/v1/notificationsapi.rb new file mode 100644 index 000000000000..a8c8ee14d999 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/shopping/merchant/notifications/v1/notificationsapi.rb @@ -0,0 +1,184 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Notifications + module V1 + # Request message for the GetNotificationSubscription method. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` of the notification subscription. + class GetNotificationSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateNotificationSubscription method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account that owns the new notification subscription. + # Format: `accounts/{account}` + # @!attribute [rw] notification_subscription + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # Required. The notification subscription to create. + class CreateNotificationSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateNotificationSubscription method. + # @!attribute [rw] notification_subscription + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # Required. The new version of the notification subscription that should be + # updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # List of fields being updated. + class UpdateNotificationSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteNotificationSubscription method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the notification subscription to be deleted. + class DeleteNotificationSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListNotificationSubscription method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account who owns the notification subscriptions. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of notification subscriptions to return in a page. + # The default value for `page_size` is 100. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # @!attribute [rw] page_token + # @return [::String] + # Token (if provided) to retrieve the subsequent page. All other parameters + # must match the original call that provided the page token. + class ListNotificationSubscriptionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListNotificationSubscription method. + # @!attribute [rw] notification_subscriptions + # @return [::Array<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>] + # The list of notification subscriptions requested by the merchant. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListNotificationSubscriptionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a notification subscription owned by a Merchant account. + # @!attribute [rw] all_managed_accounts + # @return [::Boolean] + # If this value is true, the requesting account is notified of the + # specified event for all managed accounts (can be subaccounts or other + # linked accounts) including newly added accounts on a daily basis. + # + # Note: The following fields are mutually exclusive: `all_managed_accounts`, `target_account`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] target_account + # @return [::String] + # The `name` of the account you want to receive notifications for. + # Format: `accounts/{account}` + # + # Note: The following fields are mutually exclusive: `target_account`, `all_managed_accounts`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] name + # @return [::String] + # Output only. The `name` of the notification configuration. Generated by the + # Content API upon creation of a new `NotificationSubscription`. The + # `account` represents the merchant ID of the merchant that owns the + # configuration. Format: + # `accounts/{account}/notificationsubscriptions/{notification_subscription}` + # @!attribute [rw] registered_event + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription::NotificationEventType] + # The event that the merchant wants to be notified about. + # @!attribute [rw] call_back_uri + # @return [::String] + # URL to be used to push the notification to the merchant. + class NotificationSubscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the event type that the merchant is interested in receiving + # notifications for. + module NotificationEventType + # Notifications event type is unspecified. + NOTIFICATION_EVENT_TYPE_UNSPECIFIED = 0 + + # Notification of product status changes, for example when product becomes + # disapproved. + PRODUCT_STATUS_CHANGE = 1 + end + end + + # Request for notification subscription health metrics. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` of the notification subscription for which metrics are + # retrieved. + # Format: + # `accounts/{account}/notificationsubscriptions/{notification_subscription}` + class GetNotificationSubscriptionHealthMetricsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a notification subscription health metrics. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name of the notification configuration. + # Generated by the Content API upon creation of a new + # NotificationSubscription. The account represents the merchant ID of the + # merchant that owns the configuration. + # @!attribute [rw] acknowledged_messages_count + # @return [::Integer] + # The number of retained acknowledged messages for the last 24 hours + # @!attribute [rw] undelivered_messages_count + # @return [::Integer] + # The number of unacknowledged messages for the last 7 days, we will attempt + # to re-deliver the unacknowledged message later and once successfully + # delivered it will not be counted within unacknowledged messages (the number + # of unacknowledged messages should gradually decrease to zero once the issue + # is fixed). + # @!attribute [rw] oldest_unacknowledged_message_waiting_time + # @return [::Integer] + # The time since the oldest unacknowledged message was sent in seconds + class NotificationSubscriptionHealthMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/Gemfile new file mode 100644 index 000000000000..960aba6e86ed --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1", path: "../" +else + gem "google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/snippets/notifications_api_service/create_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/create_notification_subscription.rb new file mode 100644 index 000000000000..d3a2b04118d1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/create_notification_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_NotificationsApiService_CreateNotificationSubscription_sync] +require "google/shopping/merchant/notifications/v1" + +## +# Snippet for the create_notification_subscription call in the NotificationsApiService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#create_notification_subscription. +# +def create_notification_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new + + # Call the create_notification_subscription method. + result = client.create_notification_subscription request + + # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + p result +end +# [END merchantapi_v1_generated_NotificationsApiService_CreateNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/delete_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/delete_notification_subscription.rb new file mode 100644 index 000000000000..e961584dafda --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/delete_notification_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_NotificationsApiService_DeleteNotificationSubscription_sync] +require "google/shopping/merchant/notifications/v1" + +## +# Snippet for the delete_notification_subscription call in the NotificationsApiService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#delete_notification_subscription. +# +def delete_notification_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new + + # Call the delete_notification_subscription method. + result = client.delete_notification_subscription request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_NotificationsApiService_DeleteNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription.rb new file mode 100644 index 000000000000..ddc49357f143 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscription_sync] +require "google/shopping/merchant/notifications/v1" + +## +# Snippet for the get_notification_subscription call in the NotificationsApiService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription. +# +def get_notification_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new + + # Call the get_notification_subscription method. + result = client.get_notification_subscription request + + # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + p result +end +# [END merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription_health_metrics.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription_health_metrics.rb new file mode 100644 index 000000000000..72354ecda181 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription_health_metrics.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscriptionHealthMetrics_sync] +require "google/shopping/merchant/notifications/v1" + +## +# Snippet for the get_notification_subscription_health_metrics call in the NotificationsApiService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription_health_metrics. +# +def get_notification_subscription_health_metrics + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new + + # Call the get_notification_subscription_health_metrics method. + result = client.get_notification_subscription_health_metrics request + + # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics. + p result +end +# [END merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscriptionHealthMetrics_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/list_notification_subscriptions.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/list_notification_subscriptions.rb new file mode 100644 index 000000000000..c52981db27c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/list_notification_subscriptions.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 merchantapi_v1_generated_NotificationsApiService_ListNotificationSubscriptions_sync] +require "google/shopping/merchant/notifications/v1" + +## +# Snippet for the list_notification_subscriptions call in the NotificationsApiService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#list_notification_subscriptions. +# +def list_notification_subscriptions + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.new + + # Call the list_notification_subscriptions method. + result = client.list_notification_subscriptions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + p item + end +end +# [END merchantapi_v1_generated_NotificationsApiService_ListNotificationSubscriptions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/update_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/update_notification_subscription.rb new file mode 100644 index 000000000000..6ed730e3a5e3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/update_notification_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_NotificationsApiService_UpdateNotificationSubscription_sync] +require "google/shopping/merchant/notifications/v1" + +## +# Snippet for the update_notification_subscription call in the NotificationsApiService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#update_notification_subscription. +# +def update_notification_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new + + # Call the update_notification_subscription method. + result = client.update_notification_subscription request + + # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + p result +end +# [END merchantapi_v1_generated_NotificationsApiService_UpdateNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json new file mode 100644 index 000000000000..da3479d90d3c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-shopping-merchant-notifications-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.notifications.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscription_sync", + "title": "Snippet for the get_notification_subscription call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription.", + "file": "notifications_api_service/get_notification_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_notification_subscription", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" + }, + "method": { + "short_name": "GetNotificationSubscription", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.GetNotificationSubscription", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_NotificationsApiService_CreateNotificationSubscription_sync", + "title": "Snippet for the create_notification_subscription call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#create_notification_subscription.", + "file": "notifications_api_service/create_notification_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_notification_subscription", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#create_notification_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" + }, + "method": { + "short_name": "CreateNotificationSubscription", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.CreateNotificationSubscription", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_NotificationsApiService_UpdateNotificationSubscription_sync", + "title": "Snippet for the update_notification_subscription call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#update_notification_subscription.", + "file": "notifications_api_service/update_notification_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_notification_subscription", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#update_notification_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" + }, + "method": { + "short_name": "UpdateNotificationSubscription", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.UpdateNotificationSubscription", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_NotificationsApiService_DeleteNotificationSubscription_sync", + "title": "Snippet for the delete_notification_subscription call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#delete_notification_subscription.", + "file": "notifications_api_service/delete_notification_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_notification_subscription", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#delete_notification_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" + }, + "method": { + "short_name": "DeleteNotificationSubscription", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.DeleteNotificationSubscription", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_NotificationsApiService_ListNotificationSubscriptions_sync", + "title": "Snippet for the list_notification_subscriptions call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#list_notification_subscriptions.", + "file": "notifications_api_service/list_notification_subscriptions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_notification_subscriptions", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#list_notification_subscriptions", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" + }, + "method": { + "short_name": "ListNotificationSubscriptions", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.ListNotificationSubscriptions", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscriptionHealthMetrics_sync", + "title": "Snippet for the get_notification_subscription_health_metrics call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription_health_metrics.", + "file": "notifications_api_service/get_notification_subscription_health_metrics.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_notification_subscription_health_metrics", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription_health_metrics", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" + }, + "method": { + "short_name": "GetNotificationSubscriptionHealthMetrics", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.GetNotificationSubscriptionHealthMetrics", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" + } + } + }, + "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-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_paths_test.rb new file mode 100644 index 000000000000..068026b3f458 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_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/shopping/merchant/notifications/v1/notifications_api_service" + +class ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_notification_subscription_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.notification_subscription_path account: "value0", notification_subscription: "value1" + assert_equal "accounts/value0/notificationsubscriptions/value1", path + end + end + + def test_notification_subscription_health_metrics_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.notification_subscription_health_metrics_path account: "value0", notification_subscription: "value1" + assert_equal "accounts/value0/notificationsubscriptions/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_rest_test.rb new file mode 100644 index 000000000000..534cf6785ceb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/notifications/v1/notificationsapi_pb" +require "google/shopping/merchant/notifications/v1/notifications_api_service/rest" + + +class ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_notification_subscription + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_get_notification_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_notification_subscription({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_notification_subscription name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_notification_subscription({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_notification_subscription_client_stub.call_count + end + end + end + + def test_create_notification_subscription + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + notification_subscription = {} + + create_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_create_notification_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_notification_subscription parent: parent, notification_subscription: notification_subscription do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_notification_subscription_client_stub.call_count + end + end + end + + def test_update_notification_subscription + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + notification_subscription = {} + update_mask = {} + + update_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_update_notification_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_notification_subscription notification_subscription: notification_subscription, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_notification_subscription_client_stub.call_count + end + end + end + + def test_delete_notification_subscription + # 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_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_delete_notification_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_notification_subscription({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_notification_subscription name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_notification_subscription({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_notification_subscription_client_stub.call_count + end + end + end + + def test_list_notification_subscriptions + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse.new + http_response = OpenStruct.new 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_notification_subscriptions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_list_notification_subscriptions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_notification_subscriptions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_notification_subscriptions({ 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_notification_subscriptions 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_notification_subscriptions ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.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_notification_subscriptions({ 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_notification_subscriptions(::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.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_notification_subscriptions_client_stub.call_count + end + end + end + + def test_get_notification_subscription_health_metrics + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_subscription_health_metrics_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_get_notification_subscription_health_metrics_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_notification_subscription_health_metrics_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_notification_subscription_health_metrics({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_notification_subscription_health_metrics name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_notification_subscription_health_metrics ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_notification_subscription_health_metrics({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_notification_subscription_health_metrics(::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_notification_subscription_health_metrics_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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb new file mode 100644 index 000000000000..98cb610b8daa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb @@ -0,0 +1,465 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/notifications/v1/notificationsapi_pb" +require "google/shopping/merchant/notifications/v1/notifications_api_service" + +class ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_notification_subscription + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_notification_subscription, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_notification_subscription({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_notification_subscription name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_notification_subscription({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_notification_subscription_client_stub.call_rpc_count + end + end + + def test_create_notification_subscription + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + notification_subscription = {} + + create_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_notification_subscription, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription), request["notification_subscription"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_notification_subscription parent: parent, notification_subscription: notification_subscription do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_notification_subscription_client_stub.call_rpc_count + end + end + + def test_update_notification_subscription + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + notification_subscription = {} + update_mask = {} + + update_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_notification_subscription, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription), request["notification_subscription"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_notification_subscription notification_subscription: notification_subscription, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, 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_notification_subscription({ notification_subscription: notification_subscription, 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_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, 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_notification_subscription_client_stub.call_rpc_count + end + end + + def test_delete_notification_subscription + # 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_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_notification_subscription, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_notification_subscription({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_notification_subscription name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_notification_subscription({ 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_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new(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_notification_subscription_client_stub.call_rpc_count + end + end + + def test_list_notification_subscriptions + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_notification_subscriptions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_notification_subscriptions, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest, 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_notification_subscriptions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_notification_subscriptions({ 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_notification_subscriptions 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_notification_subscriptions ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.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_notification_subscriptions({ 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_notification_subscriptions(::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.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_notification_subscriptions_client_stub.call_rpc_count + end + end + + def test_get_notification_subscription_health_metrics + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_subscription_health_metrics_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_notification_subscription_health_metrics, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_notification_subscription_health_metrics_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_notification_subscription_health_metrics({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_notification_subscription_health_metrics name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_notification_subscription_health_metrics ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_notification_subscription_health_metrics({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_notification_subscription_health_metrics(::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_notification_subscription_health_metrics_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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.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-shopping-merchant-notifications-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..f46b21050567 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-notifications-v1beta", + "distribution_name": "google-shopping-merchant-notifications-v1beta", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1BETA API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-notifications-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-notifications instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.rubocop.yml new file mode 100644 index 000000000000..4befa09072a1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-notifications-v1beta.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-shopping-merchant-notifications-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.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-shopping-merchant-notifications-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1BETA 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-shopping-merchant-notifications-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..88d0015bde4b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-notifications-v1beta 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-shopping-merchant-notifications-v1beta 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/shopping/merchant/notifications/v1beta" + +client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/notifications/v1beta" + +::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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-shopping-merchant-notifications-v1beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/notifications/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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-shopping-merchant-notifications-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/README.md new file mode 100644 index 000000000000..7c0bb0a9d626 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Merchant V1BETA API + +Programmatically manage your Merchant Center accounts. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1BETA API. Most users should consider using +the main client gem, +[google-shopping-merchant-notifications](https://rubygems.org/gems/google-shopping-merchant-notifications). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-notifications-v1beta +``` + +## 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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/notifications/v1beta" + +client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new +request = ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new # (request fields as keyword arguments...) +response = client.get_notification_subscription request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-notifications-v1beta) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/notifications/v1beta" +require "logger" + +client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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-shopping-merchant-notifications`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-notifications-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-notifications`. +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-shopping-merchant-notifications-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Rakefile new file mode 100644 index 000000000000..ecbbd459a9d4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta 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/shopping/merchant/notifications/v1beta/notifications_api_service/credentials" + ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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-shopping-merchant-notifications-v1beta 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-shopping-merchant-notifications-v1beta 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-shopping-merchant-notifications-v1beta 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-shopping-merchant-notifications-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-notifications-v1beta" + header "google-shopping-merchant-notifications-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-notifications-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-notifications-v1beta 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-shopping-merchant-notifications-v1beta 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-shopping-merchant-notifications-v1beta 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-shopping-merchant-notifications-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..bf7527d699f0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/gapic_metadata.json @@ -0,0 +1,43 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.notifications.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::Notifications::V1beta", + "services": { + "NotificationsApiService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client", + "rpcs": { + "GetNotificationSubscription": { + "methods": [ + "get_notification_subscription" + ] + }, + "CreateNotificationSubscription": { + "methods": [ + "create_notification_subscription" + ] + }, + "UpdateNotificationSubscription": { + "methods": [ + "update_notification_subscription" + ] + }, + "DeleteNotificationSubscription": { + "methods": [ + "delete_notification_subscription" + ] + }, + "ListNotificationSubscriptions": { + "methods": [ + "list_notification_subscriptions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec new file mode 100644 index 000000000000..3afef6869bec --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/notifications/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-notifications-v1beta" + gem.version = Google::Shopping::Merchant::Notifications::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-notifications-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-notifications instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center accounts." + 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-shopping-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google-shopping-merchant-notifications-v1beta.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google-shopping-merchant-notifications-v1beta.rb new file mode 100644 index 000000000000..251e43d31d75 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google-shopping-merchant-notifications-v1beta.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/shopping/merchant/notifications/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta.rb new file mode 100644 index 000000000000..a73afc6705d9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/notifications/v1beta/notifications_api_service" +require "google/shopping/merchant/notifications/v1beta/version" + +module Google + module Shopping + module Merchant + module Notifications + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/notifications/v1beta" + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/notifications/v1beta" + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/notifications/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb new file mode 100644 index 000000000000..52fc96175eb2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/notifications/v1beta/version" + +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/paths" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/client" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + ## + # Service to manage notification subscriptions for merchants + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/notifications/v1beta/notifications_api_service" + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + module NotificationsApiService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "notifications_api_service", "helpers.rb" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb new file mode 100644 index 000000000000..0edd74d9ff4a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb @@ -0,0 +1,880 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/notifications/v1beta/notificationsapi_pb" + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + module NotificationsApiService + ## + # Client for the NotificationsApiService service. + # + # Service to manage notification subscriptions for merchants + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :notifications_api_service_stub + + ## + # Configure the NotificationsApiService Client class. + # + # See {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all NotificationsApiService clients + # ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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", "Shopping", "Merchant", "Notifications", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the NotificationsApiService 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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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 + @notifications_api_service_stub.universe_domain + end + + ## + # Create a new NotificationsApiService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the NotificationsApiService 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/shopping/merchant/notifications/v1beta/notificationsapi_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 + + @notifications_api_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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 + ) + + @notifications_api_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 + @notifications_api_service_stub.logger + end + + # Service calls + + ## + # Gets notification subscriptions for an account. + # + # @overload get_notification_subscription(request, options = nil) + # Pass arguments to `get_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_notification_subscription(name: nil) + # Pass arguments to `get_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` of the notification subscription. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new + # + # # Call the get_notification_subscription method. + # result = client.get_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + # p result + # + def get_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_notification_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :get_notification_subscription, request, 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 notification subscription for a merchant. We will allow the + # following types of notification subscriptions to exist together (per + # merchant as a subscriber per event type): + # 1. Subscription for all managed accounts + subscription for self + # 2. Multiple "partial" subscriptions for managed accounts + subscription + # for self + # + # we will not allow (per merchant as a subscriber per event type): + # 1. multiple self subscriptions. + # 2. multiple "all managed accounts" subscriptions. + # 3. all and partial subscriptions at the same time. + # 4. multiple partial subscriptions for the same target account + # + # @overload create_notification_subscription(request, options = nil) + # Pass arguments to `create_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_notification_subscription(parent: nil, notification_subscription: nil) + # Pass arguments to `create_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account that owns the new notification subscription. + # Format: `accounts/{account}` + # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription, ::Hash] + # Required. The notification subscription to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new + # + # # Call the create_notification_subscription method. + # result = client.create_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + # p result + # + def create_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest + + # Converts hash and nil to 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_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_notification_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :create_notification_subscription, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing notification subscription for a merchant. + # + # @overload update_notification_subscription(request, options = nil) + # Pass arguments to `update_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_notification_subscription(notification_subscription: nil, update_mask: nil) + # Pass arguments to `update_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription, ::Hash] + # Required. The new version of the notification subscription that should be + # updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new + # + # # Call the update_notification_subscription method. + # result = client.update_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + # p result + # + def update_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest + + # Converts hash and nil to 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_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.notification_subscription&.name + header_params["notification_subscription.name"] = request.notification_subscription.name + end + + request_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_notification_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :update_notification_subscription, request, 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 notification subscription for a merchant. + # + # @overload delete_notification_subscription(request, options = nil) + # Pass arguments to `delete_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_notification_subscription(name: nil) + # Pass arguments to `delete_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the notification subscription 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/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new + # + # # Call the delete_notification_subscription method. + # result = client.delete_notification_subscription request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_notification_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :delete_notification_subscription, request, 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 all the notification subscriptions for a merchant. + # + # @overload list_notification_subscriptions(request, options = nil) + # Pass arguments to `list_notification_subscriptions` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_notification_subscriptions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_notification_subscriptions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the notification subscriptions. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # The maximum number of notification subscriptions to return in a page. + # The default value for `page_size` is 100. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # @param page_token [::String] + # Token (if provided) to retrieve the subsequent page. All other parameters + # must match the original call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new + # + # # Call the list_notification_subscriptions method. + # result = client.list_notification_subscriptions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + # p item + # end + # + def list_notification_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_notification_subscriptions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_notification_subscriptions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_notification_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :list_notification_subscriptions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @notifications_api_service_stub, :list_notification_subscriptions, 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 NotificationsApiService API. + # + # This class represents the configuration for NotificationsApiService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_notification_subscription to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_notification_subscription.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_notification_subscription.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 NotificationsApiService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_subscription + ## + # RPC-specific configuration for `create_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :create_notification_subscription + ## + # RPC-specific configuration for `update_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :update_notification_subscription + ## + # RPC-specific configuration for `delete_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_notification_subscription + ## + # RPC-specific configuration for `list_notification_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notification_subscriptions + + # @private + def initialize parent_rpcs = nil + get_notification_subscription_config = parent_rpcs.get_notification_subscription if parent_rpcs.respond_to? :get_notification_subscription + @get_notification_subscription = ::Gapic::Config::Method.new get_notification_subscription_config + create_notification_subscription_config = parent_rpcs.create_notification_subscription if parent_rpcs.respond_to? :create_notification_subscription + @create_notification_subscription = ::Gapic::Config::Method.new create_notification_subscription_config + update_notification_subscription_config = parent_rpcs.update_notification_subscription if parent_rpcs.respond_to? :update_notification_subscription + @update_notification_subscription = ::Gapic::Config::Method.new update_notification_subscription_config + delete_notification_subscription_config = parent_rpcs.delete_notification_subscription if parent_rpcs.respond_to? :delete_notification_subscription + @delete_notification_subscription = ::Gapic::Config::Method.new delete_notification_subscription_config + list_notification_subscriptions_config = parent_rpcs.list_notification_subscriptions if parent_rpcs.respond_to? :list_notification_subscriptions + @list_notification_subscriptions = ::Gapic::Config::Method.new list_notification_subscriptions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials.rb new file mode 100644 index 000000000000..c6c048ccb9b0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_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 Shopping + module Merchant + module Notifications + module V1beta + module NotificationsApiService + # Credentials for the NotificationsApiService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/paths.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/paths.rb new file mode 100644 index 000000000000..c14192b4befb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_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 Shopping + module Merchant + module Notifications + module V1beta + module NotificationsApiService + # Path helper methods for the NotificationsApiService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified NotificationSubscription resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/notificationsubscriptions/{notification_subscription}` + # + # @param account [String] + # @param notification_subscription [String] + # + # @return [::String] + def notification_subscription_path account:, notification_subscription: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/notificationsubscriptions/#{notification_subscription}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest.rb new file mode 100644 index 000000000000..3e7b76a2589d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_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/shopping/merchant/notifications/v1beta/version" + +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/paths" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client" + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + ## + # Service to manage notification subscriptions for merchants + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + module NotificationsApiService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb new file mode 100644 index 000000000000..2a7aa66b358b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb @@ -0,0 +1,802 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/shopping/merchant/notifications/v1beta/notificationsapi_pb" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + module NotificationsApiService + module Rest + ## + # REST client for the NotificationsApiService service. + # + # Service to manage notification subscriptions for merchants + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :notifications_api_service_stub + + ## + # Configure the NotificationsApiService Client class. + # + # See {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all NotificationsApiService clients + # ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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", "Shopping", "Merchant", "Notifications", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the NotificationsApiService 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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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 + @notifications_api_service_stub.universe_domain + end + + ## + # Create a new NotificationsApiService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the NotificationsApiService 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 + + @notifications_api_service_stub = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @notifications_api_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 + @notifications_api_service_stub.logger + end + + # Service calls + + ## + # Gets notification subscriptions for an account. + # + # @overload get_notification_subscription(request, options = nil) + # Pass arguments to `get_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_notification_subscription(name: nil) + # Pass arguments to `get_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` of the notification subscription. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new + # + # # Call the get_notification_subscription method. + # result = client.get_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + # p result + # + def get_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_notification_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.get_notification_subscription request, 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 notification subscription for a merchant. We will allow the + # following types of notification subscriptions to exist together (per + # merchant as a subscriber per event type): + # 1. Subscription for all managed accounts + subscription for self + # 2. Multiple "partial" subscriptions for managed accounts + subscription + # for self + # + # we will not allow (per merchant as a subscriber per event type): + # 1. multiple self subscriptions. + # 2. multiple "all managed accounts" subscriptions. + # 3. all and partial subscriptions at the same time. + # 4. multiple partial subscriptions for the same target account + # + # @overload create_notification_subscription(request, options = nil) + # Pass arguments to `create_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_notification_subscription(parent: nil, notification_subscription: nil) + # Pass arguments to `create_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account that owns the new notification subscription. + # Format: `accounts/{account}` + # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription, ::Hash] + # Required. The notification subscription to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new + # + # # Call the create_notification_subscription method. + # result = client.create_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + # p result + # + def create_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest + + # Converts hash and nil to an 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_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_notification_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.create_notification_subscription request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing notification subscription for a merchant. + # + # @overload update_notification_subscription(request, options = nil) + # Pass arguments to `update_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_notification_subscription(notification_subscription: nil, update_mask: nil) + # Pass arguments to `update_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription, ::Hash] + # Required. The new version of the notification subscription that should be + # updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new + # + # # Call the update_notification_subscription method. + # result = client.update_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + # p result + # + def update_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest + + # Converts hash and nil to an 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_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_notification_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.update_notification_subscription request, 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 notification subscription for a merchant. + # + # @overload delete_notification_subscription(request, options = nil) + # Pass arguments to `delete_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_notification_subscription(name: nil) + # Pass arguments to `delete_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the notification subscription 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/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new + # + # # Call the delete_notification_subscription method. + # result = client.delete_notification_subscription request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_notification_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.delete_notification_subscription request, 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 all the notification subscriptions for a merchant. + # + # @overload list_notification_subscriptions(request, options = nil) + # Pass arguments to `list_notification_subscriptions` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_notification_subscriptions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_notification_subscriptions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the notification subscriptions. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # The maximum number of notification subscriptions to return in a page. + # The default value for `page_size` is 100. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # @param page_token [::String] + # Token (if provided) to retrieve the subsequent page. All other parameters + # must match the original call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new + # + # # Call the list_notification_subscriptions method. + # result = client.list_notification_subscriptions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + # p item + # end + # + def list_notification_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_notification_subscriptions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_notification_subscriptions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_notification_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.list_notification_subscriptions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @notifications_api_service_stub, :list_notification_subscriptions, "notification_subscriptions", request, result, 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 NotificationsApiService REST API. + # + # This class represents the configuration for NotificationsApiService 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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_notification_subscription to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_notification_subscription.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_notification_subscription.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 NotificationsApiService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_subscription + ## + # RPC-specific configuration for `create_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :create_notification_subscription + ## + # RPC-specific configuration for `update_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :update_notification_subscription + ## + # RPC-specific configuration for `delete_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_notification_subscription + ## + # RPC-specific configuration for `list_notification_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notification_subscriptions + + # @private + def initialize parent_rpcs = nil + get_notification_subscription_config = parent_rpcs.get_notification_subscription if parent_rpcs.respond_to? :get_notification_subscription + @get_notification_subscription = ::Gapic::Config::Method.new get_notification_subscription_config + create_notification_subscription_config = parent_rpcs.create_notification_subscription if parent_rpcs.respond_to? :create_notification_subscription + @create_notification_subscription = ::Gapic::Config::Method.new create_notification_subscription_config + update_notification_subscription_config = parent_rpcs.update_notification_subscription if parent_rpcs.respond_to? :update_notification_subscription + @update_notification_subscription = ::Gapic::Config::Method.new update_notification_subscription_config + delete_notification_subscription_config = parent_rpcs.delete_notification_subscription if parent_rpcs.respond_to? :delete_notification_subscription + @delete_notification_subscription = ::Gapic::Config::Method.new delete_notification_subscription_config + list_notification_subscriptions_config = parent_rpcs.list_notification_subscriptions if parent_rpcs.respond_to? :list_notification_subscriptions + @list_notification_subscriptions = ::Gapic::Config::Method.new list_notification_subscriptions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb new file mode 100644 index 000000000000..9fc583be7538 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb @@ -0,0 +1,390 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/notifications/v1beta/notificationsapi_pb" + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + module NotificationsApiService + module Rest + ## + # REST service stub for the NotificationsApiService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # A result object deserialized from the server's reply + def get_notification_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_notification_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.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_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # A result object deserialized from the server's reply + def create_notification_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_notification_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.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_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # A result object deserialized from the server's reply + def update_notification_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_notification_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.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_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_notification_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_notification_subscription", + 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_notification_subscriptions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse] + # A result object deserialized from the server's reply + def list_notification_subscriptions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_subscriptions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_notification_subscriptions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_notification_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/notifications/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest] + # 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_notification_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/notifications/v1beta/{parent}/notificationsubscriptions", + body: "notification_subscription", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest] + # 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_notification_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/notifications/v1beta/{notification_subscription.name}", + body: "notification_subscription", + matches: [ + ["notification_subscription.name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_notification_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/notifications/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_notification_subscriptions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_notification_subscriptions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/notifications/v1beta/{parent}/notificationsubscriptions", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb new file mode 100644 index 000000000000..9b186eed6053 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/notifications/v1beta/notificationsapi.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\nDgoogle/shopping/merchant/notifications/v1beta/notificationsapi.proto\x12-google.shopping.merchant.notifications.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a google/shopping/type/types.proto\"o\n\"GetNotificationSubscriptionRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3merchantapi.googleapis.com/NotificationSubscription\"\xe5\x01\n%CreateNotificationSubscriptionRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33merchantapi.googleapis.com/NotificationSubscription\x12o\n\x19notification_subscription\x18\x02 \x01(\x0b\x32G.google.shopping.merchant.notifications.v1beta.NotificationSubscriptionB\x03\xe0\x41\x02\"\xc9\x01\n%UpdateNotificationSubscriptionRequest\x12o\n\x19notification_subscription\x18\x01 \x01(\x0b\x32G.google.shopping.merchant.notifications.v1beta.NotificationSubscriptionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"r\n%DeleteNotificationSubscriptionRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3merchantapi.googleapis.com/NotificationSubscription\"\x9a\x01\n$ListNotificationSubscriptionsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33merchantapi.googleapis.com/NotificationSubscription\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xad\x01\n%ListNotificationSubscriptionsResponse\x12k\n\x1anotification_subscriptions\x18\x01 \x03(\x0b\x32G.google.shopping.merchant.notifications.v1beta.NotificationSubscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xea\x03\n\x18NotificationSubscription\x12\x1e\n\x14\x61ll_managed_accounts\x18\x03 \x01(\x08H\x00\x12\x18\n\x0etarget_account\x18\x04 \x01(\tH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12w\n\x10registered_event\x18\x02 \x01(\x0e\x32].google.shopping.merchant.notifications.v1beta.NotificationSubscription.NotificationEventType\x12\x15\n\rcall_back_uri\x18\x05 \x01(\t\"[\n\x15NotificationEventType\x12\'\n#NOTIFICATION_EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15PRODUCT_STATUS_CHANGE\x10\x01:\x82\x01\xea\x41\x7f\n3merchantapi.googleapis.com/NotificationSubscription\x12Haccounts/{account}/notificationsubscriptions/{notification_subscription}B\x0f\n\rinterested_in\"\xf8\x01\n\rProductChange\x12\x16\n\told_value\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnew_value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0bregion_code\x18\x03 \x01(\tH\x02\x88\x01\x01\x12[\n\x11reporting_context\x18\x04 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x03\x88\x01\x01\x42\x0c\n\n_old_valueB\x0c\n\n_new_valueB\x0e\n\x0c_region_codeB\x14\n\x12_reporting_context\"\xd6\x03\n\x1aProductStatusChangeMessage\x12\x14\n\x07\x61\x63\x63ount\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x10managing_account\x18\x02 \x01(\tH\x01\x88\x01\x01\x12S\n\rresource_type\x18\x03 \x01(\x0e\x32\x37.google.shopping.merchant.notifications.v1beta.ResourceH\x02\x88\x01\x01\x12P\n\tattribute\x18\x04 \x01(\x0e\x32\x38.google.shopping.merchant.notifications.v1beta.AttributeH\x03\x88\x01\x01\x12M\n\x07\x63hanges\x18\x05 \x03(\x0b\x32<.google.shopping.merchant.notifications.v1beta.ProductChange\x12\x18\n\x0bresource_id\x18\x06 \x01(\tH\x04\x88\x01\x01\x12\x15\n\x08resource\x18\x07 \x01(\tH\x05\x88\x01\x01\x42\n\n\x08_accountB\x13\n\x11_managing_accountB\x10\n\x0e_resource_typeB\x0c\n\n_attributeB\x0e\n\x0c_resource_idB\x0b\n\t_resource*1\n\x08Resource\x12\x18\n\x14RESOURCE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRODUCT\x10\x01*2\n\tAttribute\x12\x19\n\x15\x41TTRIBUTE_UNSPECIFIED\x10\x00\x12\n\n\x06STATUS\x10\x01\x32\xb5\x0c\n\x17NotificationsApiService\x12\x8d\x02\n\x1bGetNotificationSubscription\x12Q.google.shopping.merchant.notifications.v1beta.GetNotificationSubscriptionRequest\x1aG.google.shopping.merchant.notifications.v1beta.NotificationSubscription\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\x12\x43/notifications/v1beta/{name=accounts/*/notificationsubscriptions/*}\x12\xcb\x02\n\x1e\x43reateNotificationSubscription\x12T.google.shopping.merchant.notifications.v1beta.CreateNotificationSubscriptionRequest\x1aG.google.shopping.merchant.notifications.v1beta.NotificationSubscription\"\x89\x01\xda\x41 parent,notification_subscription\x82\xd3\xe4\x93\x02`\"C/notifications/v1beta/{parent=accounts/*}/notificationsubscriptions:\x19notification_subscription\x12\xea\x02\n\x1eUpdateNotificationSubscription\x12T.google.shopping.merchant.notifications.v1beta.UpdateNotificationSubscriptionRequest\x1aG.google.shopping.merchant.notifications.v1beta.NotificationSubscription\"\xa8\x01\xda\x41%notification_subscription,update_mask\x82\xd3\xe4\x93\x02z2]/notifications/v1beta/{notification_subscription.name=accounts/*/notificationsubscriptions/*}:\x19notification_subscription\x12\xe2\x01\n\x1e\x44\x65leteNotificationSubscription\x12T.google.shopping.merchant.notifications.v1beta.DeleteNotificationSubscriptionRequest\x1a\x16.google.protobuf.Empty\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45*C/notifications/v1beta/{name=accounts/*/notificationsubscriptions/*}\x12\xa0\x02\n\x1dListNotificationSubscriptions\x12S.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest\x1aT.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/notifications/v1beta/{parent=accounts/*}/notificationsubscriptions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xe6\x01\n1com.google.shopping.merchant.notifications.v1betaB\x15NotificationsApiProtoP\x01Z]cloud.google.com/go/shopping/merchant/notifications/apiv1beta/notificationspb;notificationspb\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + GetNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.GetNotificationSubscriptionRequest").msgclass + CreateNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.CreateNotificationSubscriptionRequest").msgclass + UpdateNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.UpdateNotificationSubscriptionRequest").msgclass + DeleteNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.DeleteNotificationSubscriptionRequest").msgclass + ListNotificationSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest").msgclass + ListNotificationSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsResponse").msgclass + NotificationSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.NotificationSubscription").msgclass + NotificationSubscription::NotificationEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.NotificationSubscription.NotificationEventType").enummodule + ProductChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ProductChange").msgclass + ProductStatusChangeMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ProductStatusChangeMessage").msgclass + Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.Resource").enummodule + Attribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.Attribute").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb new file mode 100644 index 000000000000..719a5d62b1f2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/notifications/v1beta/notificationsapi.proto for package 'google.shopping.merchant.notifications.v1beta' +# 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/shopping/merchant/notifications/v1beta/notificationsapi_pb' + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + module NotificationsApiService + # Service to manage notification subscriptions for merchants + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.notifications.v1beta.NotificationsApiService' + + # Gets notification subscriptions for an account. + rpc :GetNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription + # Creates a notification subscription for a merchant. We will allow the + # following types of notification subscriptions to exist together (per + # merchant as a subscriber per event type): + # 1. Subscription for all managed accounts + subscription for self + # 2. Multiple "partial" subscriptions for managed accounts + subscription + # for self + # + # we will not allow (per merchant as a subscriber per event type): + # 1. multiple self subscriptions. + # 2. multiple "all managed accounts" subscriptions. + # 3. all and partial subscriptions at the same time. + # 4. multiple partial subscriptions for the same target account + rpc :CreateNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription + # Updates an existing notification subscription for a merchant. + rpc :UpdateNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription + # Deletes a notification subscription for a merchant. + rpc :DeleteNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, ::Google::Protobuf::Empty + # Gets all the notification subscriptions for a merchant. + rpc :ListNotificationSubscriptions, ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/rest.rb new file mode 100644 index 000000000000..39685b31f335 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/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/shopping/merchant/notifications/v1beta/notifications_api_service/rest" +require "google/shopping/merchant/notifications/v1beta/version" + +module Google + module Shopping + module Merchant + module Notifications + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/notifications/v1beta/rest" + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/version.rb new file mode 100644 index 000000000000..7c38f1339637 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/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 Shopping + module Merchant + module Notifications + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1BETA 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-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb new file mode 100644 index 000000000000..706a4dbbd1ba --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb @@ -0,0 +1,219 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + # Request message for the GetNotificationSubscription method. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` of the notification subscription. + class GetNotificationSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateNotificationSubscription method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account that owns the new notification subscription. + # Format: `accounts/{account}` + # @!attribute [rw] notification_subscription + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # Required. The notification subscription to create. + class CreateNotificationSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateNotificationSubscription method. + # @!attribute [rw] notification_subscription + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # Required. The new version of the notification subscription that should be + # updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # List of fields being updated. + class UpdateNotificationSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteNotificationSubscription method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the notification subscription to be deleted. + class DeleteNotificationSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListNotificationSubscription method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account who owns the notification subscriptions. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of notification subscriptions to return in a page. + # The default value for `page_size` is 100. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # @!attribute [rw] page_token + # @return [::String] + # Token (if provided) to retrieve the subsequent page. All other parameters + # must match the original call that provided the page token. + class ListNotificationSubscriptionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListNotificationSubscription method. + # @!attribute [rw] notification_subscriptions + # @return [::Array<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] + # The list of notification subscriptions requested by the merchant. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListNotificationSubscriptionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a notification subscription owned by a Merchant account. + # @!attribute [rw] all_managed_accounts + # @return [::Boolean] + # If this value is true, the requesting account is notified of the + # specified event for all managed accounts (can be subaccounts or other + # linked accounts) including newly added accounts on a daily basis. + # + # Note: The following fields are mutually exclusive: `all_managed_accounts`, `target_account`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] target_account + # @return [::String] + # The `name` of the account you want to receive notifications for. + # Format: `accounts/{account}` + # + # Note: The following fields are mutually exclusive: `target_account`, `all_managed_accounts`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] name + # @return [::String] + # Output only. The `name` of the notification configuration. Generated by the + # Content API upon creation of a new `NotificationSubscription`. The + # `account` represents the merchant ID of the merchant that owns the + # configuration. Format: + # `accounts/{account}/notificationsubscriptions/{notification_subscription}` + # @!attribute [rw] registered_event + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription::NotificationEventType] + # The event that the merchant wants to be notified about. + # @!attribute [rw] call_back_uri + # @return [::String] + # URL to be used to push the notification to the merchant. + class NotificationSubscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the event type that the merchant is interested in receiving + # notifications for. + module NotificationEventType + # Notifications event type is unspecified. + NOTIFICATION_EVENT_TYPE_UNSPECIFIED = 0 + + # Notification of product status changes, for example when product becomes + # disapproved. + PRODUCT_STATUS_CHANGE = 1 + end + end + + # The change that happened to the product including old value, new value, + # country code as the region code and reporting context. + # @!attribute [rw] old_value + # @return [::String] + # The old value of the changed resource or attribute. + # @!attribute [rw] new_value + # @return [::String] + # The new value of the changed resource or attribute. + # @!attribute [rw] region_code + # @return [::String] + # Countries that have the change (if applicable) + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Reporting contexts that have the change (if applicable) + class ProductChange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The message that the merchant will receive to notify about product status + # change event + # @!attribute [rw] account + # @return [::String] + # The target account that owns the entity that changed. + # Format : `accounts/{merchant_id}` + # @!attribute [rw] managing_account + # @return [::String] + # The account that manages the merchant's account. can be the same as + # merchant id if it is standalone account. Format : + # `accounts/{service_provider_id}` + # @!attribute [rw] resource_type + # @return [::Google::Shopping::Merchant::Notifications::V1beta::Resource] + # The resource that changed, in this case it will always be `Product`. + # @!attribute [rw] attribute + # @return [::Google::Shopping::Merchant::Notifications::V1beta::Attribute] + # The attribute in the resource that changed, in this case it will be always + # `Status`. + # @!attribute [rw] changes + # @return [::Array<::Google::Shopping::Merchant::Notifications::V1beta::ProductChange>] + # A message to describe the change that happened to the product + # @!attribute [rw] resource_id + # @return [::String] + # The product id. + # @!attribute [rw] resource + # @return [::String] + # The product name. + # Format: `{product.name=accounts/{account}/products/{product}}` + class ProductStatusChangeMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enum to specify the resource that is being changed to notify the merchant + # about. + module Resource + # Unspecified resource + RESOURCE_UNSPECIFIED = 0 + + # Resource type : product + PRODUCT = 1 + end + + # Enum to specify the attribute in the resource that is being changed to + # notify the merchant about. + module Attribute + # Unspecified attribute + ATTRIBUTE_UNSPECIFIED = 0 + + # Status of the changed entity + STATUS = 1 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/type/types.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! + + +module Google + module Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + + # Youtube shopping checkout. + YOUTUBE_SHOPPING_CHECKOUT = 7 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 8 + + # [Free vehicle + # listings](https://support.google.com/merchants/answer/11189169). + FREE_VEHICLE_LISTINGS = 9 + + # [Vehicle ads](https://support.google.com/merchants/answer/11189169). + VEHICLE_ADS = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free product listings on UCP + # checkout](https://developers.google.com/merchant/ucp). + FREE_LISTINGS_UCP_CHECKOUT = 19 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 18 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + + # [Product + # Reviews](https://support.google.com/merchants/answer/14620732). + PRODUCT_REVIEWS = 15 + + # [Merchant + # Reviews](https://developers.google.com/merchant-review-feeds). + MERCHANT_REVIEWS = 16 + + # YouTube Checkout + # . + YOUTUBE_CHECKOUT = 17 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..c7e4dd3bfc65 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta", path: "../" +else + gem "google-shopping-merchant-notifications-v1beta" +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-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/create_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/create_notification_subscription.rb new file mode 100644 index 000000000000..704c52334aff --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/create_notification_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_NotificationsApiService_CreateNotificationSubscription_sync] +require "google/shopping/merchant/notifications/v1beta" + +## +# Snippet for the create_notification_subscription call in the NotificationsApiService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#create_notification_subscription. +# +def create_notification_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new + + # Call the create_notification_subscription method. + result = client.create_notification_subscription request + + # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + p result +end +# [END merchantapi_v1beta_generated_NotificationsApiService_CreateNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/delete_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/delete_notification_subscription.rb new file mode 100644 index 000000000000..e5734961cb61 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/delete_notification_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_NotificationsApiService_DeleteNotificationSubscription_sync] +require "google/shopping/merchant/notifications/v1beta" + +## +# Snippet for the delete_notification_subscription call in the NotificationsApiService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#delete_notification_subscription. +# +def delete_notification_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new + + # Call the delete_notification_subscription method. + result = client.delete_notification_subscription request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_NotificationsApiService_DeleteNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/get_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/get_notification_subscription.rb new file mode 100644 index 000000000000..f97f82a4c1d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/get_notification_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_NotificationsApiService_GetNotificationSubscription_sync] +require "google/shopping/merchant/notifications/v1beta" + +## +# Snippet for the get_notification_subscription call in the NotificationsApiService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#get_notification_subscription. +# +def get_notification_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new + + # Call the get_notification_subscription method. + result = client.get_notification_subscription request + + # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + p result +end +# [END merchantapi_v1beta_generated_NotificationsApiService_GetNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/list_notification_subscriptions.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/list_notification_subscriptions.rb new file mode 100644 index 000000000000..b84d0a363362 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/list_notification_subscriptions.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 merchantapi_v1beta_generated_NotificationsApiService_ListNotificationSubscriptions_sync] +require "google/shopping/merchant/notifications/v1beta" + +## +# Snippet for the list_notification_subscriptions call in the NotificationsApiService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#list_notification_subscriptions. +# +def list_notification_subscriptions + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new + + # Call the list_notification_subscriptions method. + result = client.list_notification_subscriptions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + p item + end +end +# [END merchantapi_v1beta_generated_NotificationsApiService_ListNotificationSubscriptions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/update_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/update_notification_subscription.rb new file mode 100644 index 000000000000..a692dcc8e2aa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/update_notification_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_NotificationsApiService_UpdateNotificationSubscription_sync] +require "google/shopping/merchant/notifications/v1beta" + +## +# Snippet for the update_notification_subscription call in the NotificationsApiService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#update_notification_subscription. +# +def update_notification_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new + + # Call the update_notification_subscription method. + result = client.update_notification_subscription request + + # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + p result +end +# [END merchantapi_v1beta_generated_NotificationsApiService_UpdateNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/snippet_metadata_google.shopping.merchant.notifications.v1beta.json b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/snippet_metadata_google.shopping.merchant.notifications.v1beta.json new file mode 100644 index 000000000000..ef440913e101 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/snippet_metadata_google.shopping.merchant.notifications.v1beta.json @@ -0,0 +1,215 @@ +{ + "client_library": { + "name": "google-shopping-merchant-notifications-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.notifications.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_GetNotificationSubscription_sync", + "title": "Snippet for the get_notification_subscription call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#get_notification_subscription.", + "file": "notifications_api_service/get_notification_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_notification_subscription", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#get_notification_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" + }, + "method": { + "short_name": "GetNotificationSubscription", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.GetNotificationSubscription", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_CreateNotificationSubscription_sync", + "title": "Snippet for the create_notification_subscription call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#create_notification_subscription.", + "file": "notifications_api_service/create_notification_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_notification_subscription", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#create_notification_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" + }, + "method": { + "short_name": "CreateNotificationSubscription", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.CreateNotificationSubscription", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_UpdateNotificationSubscription_sync", + "title": "Snippet for the update_notification_subscription call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#update_notification_subscription.", + "file": "notifications_api_service/update_notification_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_notification_subscription", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#update_notification_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" + }, + "method": { + "short_name": "UpdateNotificationSubscription", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.UpdateNotificationSubscription", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_DeleteNotificationSubscription_sync", + "title": "Snippet for the delete_notification_subscription call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#delete_notification_subscription.", + "file": "notifications_api_service/delete_notification_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_notification_subscription", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#delete_notification_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" + }, + "method": { + "short_name": "DeleteNotificationSubscription", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.DeleteNotificationSubscription", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_ListNotificationSubscriptions_sync", + "title": "Snippet for the list_notification_subscriptions call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#list_notification_subscriptions.", + "file": "notifications_api_service/list_notification_subscriptions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_notification_subscriptions", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#list_notification_subscriptions", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" + }, + "method": { + "short_name": "ListNotificationSubscriptions", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.ListNotificationSubscriptions", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" + } + } + }, + "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-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_paths_test.rb new file mode 100644 index 000000000000..a770baee3f73 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_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/shopping/merchant/notifications/v1beta/notifications_api_service" + +class ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_notification_subscription_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.notification_subscription_path account: "value0", notification_subscription: "value1" + assert_equal "accounts/value0/notificationsubscriptions/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_rest_test.rb new file mode 100644 index 000000000000..225f464b4939 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_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/shopping/merchant/notifications/v1beta/notificationsapi_pb" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" + + +class ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_notification_subscription + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_get_notification_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_notification_subscription({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_notification_subscription name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_notification_subscription({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_notification_subscription_client_stub.call_count + end + end + end + + def test_create_notification_subscription + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + notification_subscription = {} + + create_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_create_notification_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_notification_subscription parent: parent, notification_subscription: notification_subscription do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_notification_subscription_client_stub.call_count + end + end + end + + def test_update_notification_subscription + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + notification_subscription = {} + update_mask = {} + + update_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_update_notification_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_notification_subscription notification_subscription: notification_subscription, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_notification_subscription_client_stub.call_count + end + end + end + + def test_delete_notification_subscription + # 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_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_delete_notification_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_notification_subscription({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_notification_subscription name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_notification_subscription({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_notification_subscription_client_stub.call_count + end + end + end + + def test_list_notification_subscriptions + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse.new + http_response = OpenStruct.new 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_notification_subscriptions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_list_notification_subscriptions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_notification_subscriptions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_notification_subscriptions({ 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_notification_subscriptions 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_notification_subscriptions ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.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_notification_subscriptions({ 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_notification_subscriptions(::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.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_notification_subscriptions_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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb new file mode 100644 index 000000000000..009d9aac8c77 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_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/shopping/merchant/notifications/v1beta/notificationsapi_pb" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service" + +class ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_notification_subscription + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_notification_subscription, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_notification_subscription({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_notification_subscription name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_notification_subscription({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_notification_subscription_client_stub.call_rpc_count + end + end + + def test_create_notification_subscription + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + notification_subscription = {} + + create_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_notification_subscription, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription), request["notification_subscription"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_notification_subscription parent: parent, notification_subscription: notification_subscription do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_notification_subscription_client_stub.call_rpc_count + end + end + + def test_update_notification_subscription + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + notification_subscription = {} + update_mask = {} + + update_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_notification_subscription, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription), request["notification_subscription"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_notification_subscription notification_subscription: notification_subscription, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, 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_notification_subscription({ notification_subscription: notification_subscription, 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_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, 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_notification_subscription_client_stub.call_rpc_count + end + end + + def test_delete_notification_subscription + # 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_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_notification_subscription, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_notification_subscription({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_notification_subscription name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_notification_subscription({ 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_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new(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_notification_subscription_client_stub.call_rpc_count + end + end + + def test_list_notification_subscriptions + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_notification_subscriptions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_notification_subscriptions, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, 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_notification_subscriptions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_notification_subscriptions({ 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_notification_subscriptions 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_notification_subscriptions ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.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_notification_subscriptions({ 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_notification_subscriptions(::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.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_notification_subscriptions_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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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 e02f42417b806ccb47504d2cacc3c8f19fb2ddda Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 25 Mar 2026 21:27:01 +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 --- google-iam-v3/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/routing.rb | 10 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/routing.rb | 10 +- .../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 +- owl-bot-staging/google-iam-v3/.gitignore | 22 - .../google-iam-v3/.repo-metadata.json | 17 - owl-bot-staging/google-iam-v3/.rubocop.yml | 33 - owl-bot-staging/google-iam-v3/.toys.rb | 28 - owl-bot-staging/google-iam-v3/.yardopts | 12 - .../google-iam-v3/AUTHENTICATION.md | 122 - owl-bot-staging/google-iam-v3/CHANGELOG.md | 2 - owl-bot-staging/google-iam-v3/Gemfile | 14 - owl-bot-staging/google-iam-v3/LICENSE.md | 201 - owl-bot-staging/google-iam-v3/README.md | 154 - owl-bot-staging/google-iam-v3/Rakefile | 169 - .../google-iam-v3/gapic_metadata.json | 87 - .../google-iam-v3/google-iam-v3.gemspec | 29 - .../google-iam-v3/lib/google-iam-v3.rb | 21 - .../google-iam-v3/lib/google/iam/v3.rb | 44 - .../google/iam/v3/operation_metadata_pb.rb | 22 - .../iam/v3/policy_binding_resources_pb.rb | 27 - .../lib/google/iam/v3/policy_bindings.rb | 55 - .../google/iam/v3/policy_bindings/client.rb | 1147 ------ .../iam/v3/policy_bindings/credentials.rb | 45 - .../iam/v3/policy_bindings/operations.rb | 839 ----- .../google/iam/v3/policy_bindings/paths.rb | 140 - .../lib/google/iam/v3/policy_bindings/rest.rb | 52 - .../iam/v3/policy_bindings/rest/client.rb | 1062 ------ .../iam/v3/policy_bindings/rest/operations.rb | 937 ----- .../v3/policy_bindings/rest/service_stub.rb | 535 --- .../iam/v3/policy_bindings_service_pb.rb | 36 - .../v3/policy_bindings_service_services_pb.rb | 63 - .../v3/principal_access_boundary_policies.rb | 55 - .../client.rb | 1100 ------ .../credentials.rb | 45 - .../operations.rb | 839 ----- .../paths.rb | 67 - .../rest.rb | 52 - .../rest/client.rb | 1015 ----- .../rest/operations.rb | 937 ----- .../rest/service_stub.rb | 447 --- ...pal_access_boundary_policies_service_pb.rb | 37 - ...s_boundary_policies_service_services_pb.rb | 56 - ...pal_access_boundary_policy_resources_pb.rb | 27 - .../google-iam-v3/lib/google/iam/v3/rest.rb | 36 - .../lib/google/iam/v3/version.rb | 26 - .../google-iam-v3/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 -- .../google/iam/v3/operation_metadata.rb | 55 - .../google/iam/v3/policy_binding_resources.rb | 171 - .../google/iam/v3/policy_bindings_service.rb | 232 -- ...ncipal_access_boundary_policies_service.rb | 191 - ...ncipal_access_boundary_policy_resources.rb | 127 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../google-iam-v3/snippets/Gemfile | 32 - .../policy_bindings/create_policy_binding.rb | 54 - .../policy_bindings/delete_policy_binding.rb | 54 - .../policy_bindings/get_policy_binding.rb | 47 - .../policy_bindings/list_policy_bindings.rb | 51 - .../search_target_policy_bindings.rb | 51 - .../policy_bindings/update_policy_binding.rb | 54 - ...create_principal_access_boundary_policy.rb | 54 - ...delete_principal_access_boundary_policy.rb | 54 - .../get_principal_access_boundary_policy.rb | 47 - ...list_principal_access_boundary_policies.rb | 51 - ...incipal_access_boundary_policy_bindings.rb | 51 - ...update_principal_access_boundary_policy.rb | 54 - .../snippet_metadata_google.iam.v3.json | 495 --- .../iam/v3/policy_bindings_operations_test.rb | 400 -- .../iam/v3/policy_bindings_paths_test.rb | 97 - .../iam/v3/policy_bindings_rest_test.rb | 436 --- .../google/iam/v3/policy_bindings_test.rb | 517 --- ...ccess_boundary_policies_operations_test.rb | 400 -- ...pal_access_boundary_policies_paths_test.rb | 67 - ...ipal_access_boundary_policies_rest_test.rb | 435 --- ...principal_access_boundary_policies_test.rb | 515 --- owl-bot-staging/google-iam-v3/test/helper.rb | 26 - owl-bot-staging/google-iam-v3beta/.gitignore | 22 - .../google-iam-v3beta/.repo-metadata.json | 17 - .../google-iam-v3beta/.rubocop.yml | 33 - owl-bot-staging/google-iam-v3beta/.toys.rb | 28 - owl-bot-staging/google-iam-v3beta/.yardopts | 12 - .../google-iam-v3beta/AUTHENTICATION.md | 122 - .../google-iam-v3beta/CHANGELOG.md | 2 - owl-bot-staging/google-iam-v3beta/Gemfile | 14 - owl-bot-staging/google-iam-v3beta/LICENSE.md | 201 - owl-bot-staging/google-iam-v3beta/README.md | 154 - owl-bot-staging/google-iam-v3beta/Rakefile | 169 - .../google-iam-v3beta/gapic_metadata.json | 87 - .../google-iam-v3beta.gemspec | 29 - .../lib/google-iam-v3beta.rb | 21 - .../lib/google/iam/v3beta.rb | 44 - .../iam/v3beta/operation_metadata_pb.rb | 22 - .../iam/v3beta/policy_binding_resources_pb.rb | 27 - .../lib/google/iam/v3beta/policy_bindings.rb | 55 - .../iam/v3beta/policy_bindings/client.rb | 1147 ------ .../iam/v3beta/policy_bindings/credentials.rb | 45 - .../iam/v3beta/policy_bindings/operations.rb | 839 ----- .../iam/v3beta/policy_bindings/paths.rb | 140 - .../google/iam/v3beta/policy_bindings/rest.rb | 52 - .../iam/v3beta/policy_bindings/rest/client.rb | 1062 ------ .../v3beta/policy_bindings/rest/operations.rb | 937 ----- .../policy_bindings/rest/service_stub.rb | 535 --- .../iam/v3beta/policy_bindings_service_pb.rb | 36 - .../policy_bindings_service_services_pb.rb | 63 - .../principal_access_boundary_policies.rb | 55 - .../client.rb | 1100 ------ .../credentials.rb | 45 - .../operations.rb | 839 ----- .../paths.rb | 67 - .../rest.rb | 52 - .../rest/client.rb | 1015 ----- .../rest/operations.rb | 937 ----- .../rest/service_stub.rb | 447 --- ...pal_access_boundary_policies_service_pb.rb | 37 - ...s_boundary_policies_service_services_pb.rb | 56 - ...pal_access_boundary_policy_resources_pb.rb | 27 - .../lib/google/iam/v3beta/rest.rb | 36 - .../lib/google/iam/v3beta/version.rb | 26 - .../google-iam-v3beta/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 -- .../google/iam/v3beta/operation_metadata.rb | 55 - .../iam/v3beta/policy_binding_resources.rb | 171 - .../iam/v3beta/policy_bindings_service.rb | 232 -- ...ncipal_access_boundary_policies_service.rb | 191 - ...ncipal_access_boundary_policy_resources.rb | 127 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../google-iam-v3beta/snippets/Gemfile | 32 - .../policy_bindings/create_policy_binding.rb | 54 - .../policy_bindings/delete_policy_binding.rb | 54 - .../policy_bindings/get_policy_binding.rb | 47 - .../policy_bindings/list_policy_bindings.rb | 51 - .../search_target_policy_bindings.rb | 51 - .../policy_bindings/update_policy_binding.rb | 54 - ...create_principal_access_boundary_policy.rb | 54 - ...delete_principal_access_boundary_policy.rb | 54 - .../get_principal_access_boundary_policy.rb | 47 - ...list_principal_access_boundary_policies.rb | 51 - ...incipal_access_boundary_policy_bindings.rb | 51 - ...update_principal_access_boundary_policy.rb | 54 - .../snippet_metadata_google.iam.v3beta.json | 495 --- .../v3beta/policy_bindings_operations_test.rb | 400 -- .../iam/v3beta/policy_bindings_paths_test.rb | 97 - .../iam/v3beta/policy_bindings_rest_test.rb | 436 --- .../google/iam/v3beta/policy_bindings_test.rb | 517 --- ...ccess_boundary_policies_operations_test.rb | 400 -- ...pal_access_boundary_policies_paths_test.rb | 67 - ...ipal_access_boundary_policies_rest_test.rb | 435 --- ...principal_access_boundary_policies_test.rb | 515 --- .../google-iam-v3beta/test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.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 | 148 - ...identity-access_context_manager-v1.gemspec | 29 - ...ogle-identity-access_context_manager-v1.rb | 21 - .../identity/access_context_manager/v1.rb | 45 - .../v1/access_context_manager.rb | 66 - .../v1/access_context_manager/client.rb | 3297 ----------------- .../v1/access_context_manager/credentials.rb | 47 - .../v1/access_context_manager/operations.rb | 841 ----- .../v1/access_context_manager/paths.rb | 112 - .../v1/access_context_manager/rest.rb | 63 - .../v1/access_context_manager/rest/client.rb | 3088 --------------- .../access_context_manager/rest/operations.rb | 925 ----- .../rest/service_stub.rb | 1693 --------- .../access_context_manager/v1/rest.rb | 37 - .../access_context_manager/v1/version.rb | 28 - .../type/device_resources_pb.rb | 23 - .../v1/access_context_manager_pb.rb | 65 - .../v1/access_context_manager_services_pb.rb | 240 -- .../v1/access_level_pb.rb | 32 - .../v1/access_policy_pb.rb | 24 - .../v1/gcp_user_access_binding_pb.rb | 24 - .../v1/service_perimeter_pb.rb | 37 - .../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 -- .../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 --- .../type/device_resources.rb | 84 - .../v1/access_context_manager.rb | 539 --- .../accesscontextmanager/v1/access_level.rb | 201 - .../accesscontextmanager/v1/access_policy.rb | 76 - .../v1/gcp_user_access_binding.rb | 55 - .../v1/service_perimeter.rb | 500 --- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../commit_service_perimeters.rb | 54 - .../create_access_level.rb | 54 - .../create_access_policy.rb | 54 - .../create_gcp_user_access_binding.rb | 54 - .../create_service_perimeter.rb | 54 - .../delete_access_level.rb | 54 - .../delete_access_policy.rb | 54 - .../delete_gcp_user_access_binding.rb | 54 - .../delete_service_perimeter.rb | 54 - .../get_access_level.rb | 47 - .../get_access_policy.rb | 47 - .../get_gcp_user_access_binding.rb | 47 - .../access_context_manager/get_iam_policy.rb | 47 - .../get_service_perimeter.rb | 47 - .../list_access_levels.rb | 51 - .../list_access_policies.rb | 51 - .../list_gcp_user_access_bindings.rb | 51 - .../list_service_perimeters.rb | 51 - .../replace_access_levels.rb | 54 - .../replace_service_perimeters.rb | 54 - .../access_context_manager/set_iam_policy.rb | 47 - .../test_iam_permissions.rb | 47 - .../update_access_level.rb | 54 - .../update_access_policy.rb | 54 - .../update_gcp_user_access_binding.rb | 54 - .../update_service_perimeter.rb | 54 - ...ogle.identity.accesscontextmanager.v1.json | 1055 ------ .../access_context_manager_operations_test.rb | 400 -- .../v1/access_context_manager_paths_test.rb | 103 - .../v1/access_context_manager_rest_test.rb | 1535 -------- .../v1/access_context_manager_test.rb | 1785 --------- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.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 | 78 - ...ogle-maps-fleet_engine-delivery-v1.gemspec | 29 - .../google-maps-fleet_engine-delivery-v1.rb | 21 - .../google/maps/fleet_engine/delivery/v1.rb | 47 - .../delivery/v1/delivery_service.rb | 57 - .../delivery/v1/delivery_service/client.rb | 1755 --------- .../v1/delivery_service/credentials.rb | 49 - .../delivery/v1/delivery_service/paths.rb | 100 - .../delivery/v1/delivery_service/rest.rb | 54 - .../v1/delivery_service/rest/client.rb | 1616 -------- .../v1/delivery_service/rest/service_stub.rb | 820 ---- .../maps/fleet_engine/delivery/v1/rest.rb | 39 - .../maps/fleet_engine/delivery/v1/version.rb | 30 - .../maps/fleetengine/delivery/v1/common_pb.rb | 33 - .../delivery/v1/delivery_api_pb.rb | 50 - .../delivery/v1/delivery_api_services_pb.rb | 81 - .../delivery/v1/delivery_vehicles_pb.rb | 36 - .../maps/fleetengine/delivery/v1/header_pb.rb | 27 - .../delivery/v1/task_tracking_info_pb.rb | 32 - .../maps/fleetengine/delivery/v1/tasks_pb.rb | 37 - .../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 -- .../proto_docs/google/api/routing.rb | 463 --- .../proto_docs/google/geo/type/viewport.rb | 70 - .../maps/fleetengine/delivery/v1/common.rb | 276 -- .../fleetengine/delivery/v1/delivery_api.rb | 395 -- .../delivery/v1/delivery_vehicles.rb | 276 -- .../maps/fleetengine/delivery/v1/header.rb | 113 - .../delivery/v1/task_tracking_info.rb | 91 - .../maps/fleetengine/delivery/v1/tasks.rb | 291 -- .../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/type/latlng.rb | 38 - .../snippets/Gemfile | 32 - .../delivery_service/batch_create_tasks.rb | 47 - .../create_delivery_vehicle.rb | 47 - .../snippets/delivery_service/create_task.rb | 47 - .../delete_delivery_vehicle.rb | 47 - .../snippets/delivery_service/delete_task.rb | 47 - .../delivery_service/get_delivery_vehicle.rb | 47 - .../snippets/delivery_service/get_task.rb | 47 - .../get_task_tracking_info.rb | 47 - .../list_delivery_vehicles.rb | 51 - .../snippets/delivery_service/list_tasks.rb | 51 - .../update_delivery_vehicle.rb | 47 - .../snippets/delivery_service/update_task.rb | 47 - ...metadata_maps.fleetengine.delivery.v1.json | 495 --- .../v1/delivery_service_paths_test.rb | 91 - .../delivery/v1/delivery_service_rest_test.rb | 773 ---- .../delivery/v1/delivery_service_test.rb | 862 ----- .../test/helper.rb | 26 - .../google-maps-fleet_engine-v1/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-maps-fleet_engine-v1/.rubocop.yml | 33 - .../google-maps-fleet_engine-v1/.toys.rb | 28 - .../google-maps-fleet_engine-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-maps-fleet_engine-v1/CHANGELOG.md | 2 - .../google-maps-fleet_engine-v1/Gemfile | 14 - .../google-maps-fleet_engine-v1/LICENSE.md | 201 - .../google-maps-fleet_engine-v1/README.md | 154 - .../google-maps-fleet_engine-v1/Rakefile | 169 - .../gapic_metadata.json | 92 - .../google-maps-fleet_engine-v1.gemspec | 29 - .../lib/google-maps-fleet_engine-v1.rb | 21 - .../lib/google/maps/fleet_engine/v1.rb | 46 - .../lib/google/maps/fleet_engine/v1/rest.rb | 38 - .../maps/fleet_engine/v1/trip_service.rb | 55 - .../fleet_engine/v1/trip_service/client.rb | 1151 ------ .../v1/trip_service/credentials.rb | 47 - .../fleet_engine/v1/trip_service/paths.rb | 50 - .../maps/fleet_engine/v1/trip_service/rest.rb | 52 - .../v1/trip_service/rest/client.rb | 1060 ------ .../v1/trip_service/rest/service_stub.rb | 451 --- .../maps/fleet_engine/v1/vehicle_service.rb | 55 - .../fleet_engine/v1/vehicle_service/client.rb | 1461 -------- .../v1/vehicle_service/credentials.rb | 47 - .../fleet_engine/v1/vehicle_service/paths.rb | 50 - .../fleet_engine/v1/vehicle_service/rest.rb | 52 - .../v1/vehicle_service/rest/client.rb | 1362 ------- .../v1/vehicle_service/rest/service_stub.rb | 512 --- .../google/maps/fleet_engine/v1/version.rb | 28 - .../maps/fleetengine/v1/fleetengine_pb.rb | 39 - .../google/maps/fleetengine/v1/header_pb.rb | 25 - .../google/maps/fleetengine/v1/traffic_pb.rb | 23 - .../google/maps/fleetengine/v1/trip_api_pb.rb | 41 - .../fleetengine/v1/trip_api_services_pb.rb | 58 - .../google/maps/fleetengine/v1/trips_pb.rb | 34 - .../maps/fleetengine/v1/vehicle_api_pb.rb | 52 - .../fleetengine/v1/vehicle_api_services_pb.rb | 108 - .../google/maps/fleetengine/v1/vehicles_pb.rb | 40 - .../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 -- .../proto_docs/google/api/routing.rb | 463 --- .../proto_docs/google/geo/type/viewport.rb | 70 - .../google/maps/fleetengine/v1/fleetengine.rb | 394 -- .../google/maps/fleetengine/v1/header.rb | 111 - .../google/maps/fleetengine/v1/traffic.rb | 76 - .../google/maps/fleetengine/v1/trip_api.rb | 312 -- .../google/maps/fleetengine/v1/trips.rb | 289 -- .../google/maps/fleetengine/v1/vehicle_api.rb | 674 ---- .../google/maps/fleetengine/v1/vehicles.rb | 365 -- .../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/type/latlng.rb | 38 - .../snippets/Gemfile | 32 - .../snippet_metadata_maps.fleetengine.v1.json | 535 --- .../snippets/trip_service/create_trip.rb | 47 - .../snippets/trip_service/delete_trip.rb | 47 - .../snippets/trip_service/get_trip.rb | 47 - .../trip_service/report_billable_trip.rb | 47 - .../snippets/trip_service/search_trips.rb | 51 - .../snippets/trip_service/update_trip.rb | 47 - .../vehicle_service/create_vehicle.rb | 47 - .../vehicle_service/delete_vehicle.rb | 47 - .../snippets/vehicle_service/get_vehicle.rb | 47 - .../snippets/vehicle_service/list_vehicles.rb | 51 - .../vehicle_service/search_vehicles.rb | 47 - .../vehicle_service/update_vehicle.rb | 47 - .../update_vehicle_attributes.rb | 47 - .../v1/trip_service_paths_test.rb | 55 - .../fleet_engine/v1/trip_service_rest_test.rb | 447 --- .../maps/fleet_engine/v1/trip_service_test.rb | 505 --- .../v1/vehicle_service_paths_test.rb | 55 - .../v1/vehicle_service_rest_test.rb | 520 --- .../fleet_engine/v1/vehicle_service_test.rb | 601 --- .../test/helper.rb | 26 - .../google-shopping-css-v1/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-shopping-css-v1/.rubocop.yml | 33 - .../google-shopping-css-v1/.toys.rb | 28 - .../google-shopping-css-v1/.yardopts | 12 - .../google-shopping-css-v1/AUTHENTICATION.md | 122 - .../google-shopping-css-v1/CHANGELOG.md | 2 - .../google-shopping-css-v1/Gemfile | 14 - .../google-shopping-css-v1/LICENSE.md | 201 - .../google-shopping-css-v1/README.md | 154 - .../google-shopping-css-v1/Rakefile | 169 - .../gapic_metadata.json | 119 - .../google-shopping-css-v1.gemspec | 29 - .../lib/google-shopping-css-v1.rb | 21 - .../lib/google/shopping/css/v1.rb | 49 - .../shopping/css/v1/account_labels_service.rb | 55 - .../css/v1/account_labels_service/client.rb | 783 ---- .../v1/account_labels_service/credentials.rb | 47 - .../css/v1/account_labels_service/paths.rb | 64 - .../css/v1/account_labels_service/rest.rb | 52 - .../v1/account_labels_service/rest/client.rb | 712 ---- .../rest/service_stub.rb | 327 -- .../shopping/css/v1/accounts_labels_pb.rb | 33 - .../css/v1/accounts_labels_services_pb.rb | 51 - .../lib/google/shopping/css/v1/accounts_pb.rb | 31 - .../shopping/css/v1/accounts_service.rb | 55 - .../css/v1/accounts_service/client.rb | 707 ---- .../css/v1/accounts_service/credentials.rb | 47 - .../shopping/css/v1/accounts_service/paths.rb | 47 - .../shopping/css/v1/accounts_service/rest.rb | 52 - .../css/v1/accounts_service/rest/client.rb | 643 ---- .../v1/accounts_service/rest/service_stub.rb | 265 -- .../shopping/css/v1/accounts_services_pb.rb | 50 - .../shopping/css/v1/css_product_common_pb.rb | 35 - .../shopping/css/v1/css_product_inputs_pb.rb | 34 - .../css/v1/css_product_inputs_service.rb | 56 - .../v1/css_product_inputs_service/client.rb | 714 ---- .../css_product_inputs_service/credentials.rb | 47 - .../v1/css_product_inputs_service/paths.rb | 64 - .../css/v1/css_product_inputs_service/rest.rb | 53 - .../css_product_inputs_service/rest/client.rb | 650 ---- .../rest/service_stub.rb | 266 -- .../css/v1/css_product_inputs_services_pb.rb | 61 - .../google/shopping/css/v1/css_products_pb.rb | 31 - .../shopping/css/v1/css_products_service.rb | 56 - .../css/v1/css_products_service/client.rb | 604 --- .../v1/css_products_service/credentials.rb | 47 - .../css/v1/css_products_service/paths.rb | 64 - .../css/v1/css_products_service/rest.rb | 53 - .../v1/css_products_service/rest/client.rb | 547 --- .../css_products_service/rest/service_stub.rb | 203 - .../css/v1/css_products_services_pb.rb | 56 - .../lib/google/shopping/css/v1/quota_pb.rb | 29 - .../google/shopping/css/v1/quota_service.rb | 55 - .../shopping/css/v1/quota_service/client.rb | 493 --- .../css/v1/quota_service/credentials.rb | 47 - .../shopping/css/v1/quota_service/paths.rb | 47 - .../shopping/css/v1/quota_service/rest.rb | 52 - .../css/v1/quota_service/rest/client.rb | 443 --- .../css/v1/quota_service/rest/service_stub.rb | 142 - .../shopping/css/v1/quota_services_pb.rb | 45 - .../lib/google/shopping/css/v1/rest.rb | 41 - .../lib/google/shopping/css/v1/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 -- .../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 - .../google/shopping/css/v1/accounts.rb | 171 - .../google/shopping/css/v1/accounts_labels.rb | 131 - .../shopping/css/v1/css_product_common.rb | 436 --- .../shopping/css/v1/css_product_inputs.rb | 169 - .../google/shopping/css/v1/css_products.rb | 110 - .../google/shopping/css/v1/quota.rb | 110 - .../proto_docs/google/shopping/type/types.rb | 248 -- .../google-shopping-css-v1/snippets/Gemfile | 32 - .../create_account_label.rb | 47 - .../delete_account_label.rb | 47 - .../list_account_labels.rb | 51 - .../update_account_label.rb | 47 - .../snippets/accounts_service/get_account.rb | 47 - .../accounts_service/list_child_accounts.rb | 51 - .../accounts_service/update_labels.rb | 47 - .../delete_css_product_input.rb | 47 - .../insert_css_product_input.rb | 47 - .../update_css_product_input.rb | 47 - .../css_products_service/get_css_product.rb | 47 - .../css_products_service/list_css_products.rb | 51 - .../quota_service/list_quota_groups.rb | 51 - ...ippet_metadata_google.shopping.css.v1.json | 535 --- .../v1/account_labels_service_paths_test.rb | 67 - .../v1/account_labels_service_rest_test.rb | 318 -- .../css/v1/account_labels_service_test.rb | 347 -- .../css/v1/accounts_service_paths_test.rb | 55 - .../css/v1/accounts_service_rest_test.rb | 268 -- .../shopping/css/v1/accounts_service_test.rb | 301 -- .../css_product_inputs_service_paths_test.rb | 67 - .../css_product_inputs_service_rest_test.rb | 265 -- .../css/v1/css_product_inputs_service_test.rb | 287 -- .../css/v1/css_products_service_paths_test.rb | 67 - .../css/v1/css_products_service_rest_test.rb | 209 -- .../css/v1/css_products_service_test.rb | 229 -- .../css/v1/quota_service_paths_test.rb | 55 - .../css/v1/quota_service_rest_test.rb | 155 - .../shopping/css/v1/quota_service_test.rb | 171 - .../google-shopping-css-v1/test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.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 | 587 --- ...ogle-shopping-merchant-accounts-v1.gemspec | 29 - .../google-shopping-merchant-accounts-v1.rb | 21 - .../google/shopping/merchant/accounts/v1.rb | 68 - .../merchant/accounts/v1/accessright_pb.rb | 23 - .../accounts/v1/account_issue_service.rb | 57 - .../v1/account_issue_service/client.rb | 514 --- .../v1/account_issue_service/credentials.rb | 49 - .../v1/account_issue_service/paths.rb | 49 - .../accounts/v1/account_issue_service/rest.rb | 54 - .../v1/account_issue_service/rest/client.rb | 464 --- .../rest/service_stub.rb | 144 - .../v1/account_relationships_service.rb | 57 - .../account_relationships_service/client.rb | 688 ---- .../credentials.rb | 49 - .../v1/account_relationships_service/paths.rb | 66 - .../v1/account_relationships_service/rest.rb | 54 - .../rest/client.rb | 624 ---- .../rest/service_stub.rb | 267 -- .../accounts/v1/account_services_service.rb | 57 - .../v1/account_services_service/client.rb | 873 ----- .../account_services_service/credentials.rb | 49 - .../v1/account_services_service/paths.rb | 66 - .../v1/account_services_service/rest.rb | 54 - .../account_services_service/rest/client.rb | 795 ---- .../rest/service_stub.rb | 391 -- .../merchant/accounts/v1/accountissue_pb.rb | 34 - .../accounts/v1/accountissue_services_pb.rb | 54 - .../accounts/v1/accountrelationships_pb.rb | 33 - .../v1/accountrelationships_services_pb.rb | 52 - .../merchant/accounts/v1/accounts_pb.rb | 46 - .../merchant/accounts/v1/accounts_service.rb | 57 - .../accounts/v1/accounts_service/client.rb | 1119 ------ .../v1/accounts_service/credentials.rb | 49 - .../accounts/v1/accounts_service/paths.rb | 66 - .../accounts/v1/accounts_service/rest.rb | 54 - .../v1/accounts_service/rest/client.rb | 1043 ------ .../v1/accounts_service/rest/service_stub.rb | 509 --- .../accounts/v1/accounts_services_pb.rb | 92 - .../accounts/v1/accountservices_pb.rb | 45 - .../v1/accountservices_services_pb.rb | 56 - .../accounts/v1/autofeed_settings_service.rb | 58 - .../v1/autofeed_settings_service/client.rb | 577 --- .../autofeed_settings_service/credentials.rb | 49 - .../v1/autofeed_settings_service/paths.rb | 49 - .../v1/autofeed_settings_service/rest.rb | 55 - .../autofeed_settings_service/rest/client.rb | 520 --- .../rest/service_stub.rb | 206 - .../accounts/v1/autofeedsettings_pb.rb | 31 - .../v1/autofeedsettings_services_pb.rb | 50 - .../v1/automatic_improvements_service.rb | 59 - .../automatic_improvements_service/client.rb | 587 --- .../credentials.rb | 49 - .../automatic_improvements_service/paths.rb | 49 - .../v1/automatic_improvements_service/rest.rb | 56 - .../rest/client.rb | 530 --- .../rest/service_stub.rb | 206 - .../accounts/v1/automaticimprovements_pb.rb | 36 - .../v1/automaticimprovements_services_pb.rb | 51 - .../accounts/v1/business_identity_service.rb | 58 - .../v1/business_identity_service/client.rb | 589 --- .../business_identity_service/credentials.rb | 49 - .../v1/business_identity_service/paths.rb | 49 - .../v1/business_identity_service/rest.rb | 55 - .../business_identity_service/rest/client.rb | 532 --- .../rest/service_stub.rb | 206 - .../accounts/v1/business_info_service.rb | 57 - .../v1/business_info_service/client.rb | 585 --- .../v1/business_info_service/credentials.rb | 49 - .../v1/business_info_service/paths.rb | 49 - .../accounts/v1/business_info_service/rest.rb | 54 - .../v1/business_info_service/rest/client.rb | 528 --- .../rest/service_stub.rb | 206 - .../accounts/v1/businessidentity_pb.rb | 34 - .../v1/businessidentity_services_pb.rb | 51 - .../merchant/accounts/v1/businessinfo_pb.rb | 35 - .../accounts/v1/businessinfo_services_pb.rb | 50 - .../accounts/v1/checkout_settings_service.rb | 58 - .../v1/checkout_settings_service/client.rb | 774 ---- .../checkout_settings_service/credentials.rb | 49 - .../v1/checkout_settings_service/paths.rb | 69 - .../v1/checkout_settings_service/rest.rb | 55 - .../checkout_settings_service/rest/client.rb | 703 ---- .../rest/service_stub.rb | 329 -- .../accounts/v1/checkoutsettings_pb.rb | 38 - .../v1/checkoutsettings_services_pb.rb | 56 - .../accounts/v1/customerservice_pb.rb | 26 - .../v1/developer_registration_service.rb | 57 - .../developer_registration_service/client.rb | 761 ---- .../credentials.rb | 49 - .../developer_registration_service/paths.rb | 49 - .../v1/developer_registration_service/rest.rb | 54 - .../rest/client.rb | 698 ---- .../rest/service_stub.rb | 327 -- .../accounts/v1/developerregistration_pb.rb | 33 - .../v1/developerregistration_services_pb.rb | 58 - .../accounts/v1/email_preferences_service.rb | 57 - .../v1/email_preferences_service/client.rb | 596 --- .../email_preferences_service/credentials.rb | 49 - .../v1/email_preferences_service/paths.rb | 52 - .../v1/email_preferences_service/rest.rb | 54 - .../email_preferences_service/rest/client.rb | 539 --- .../rest/service_stub.rb | 206 - .../accounts/v1/emailpreferences_pb.rb | 32 - .../v1/emailpreferences_services_pb.rb | 64 - .../accounts/v1/gbp_accounts_service.rb | 60 - .../v1/gbp_accounts_service/client.rb | 602 --- .../v1/gbp_accounts_service/credentials.rb | 49 - .../accounts/v1/gbp_accounts_service/paths.rb | 49 - .../accounts/v1/gbp_accounts_service/rest.rb | 57 - .../v1/gbp_accounts_service/rest/client.rb | 545 --- .../gbp_accounts_service/rest/service_stub.rb | 206 - .../merchant/accounts/v1/gbpaccounts_pb.rb | 34 - .../accounts/v1/gbpaccounts_services_pb.rb | 56 - .../merchant/accounts/v1/homepage_pb.rb | 33 - .../merchant/accounts/v1/homepage_service.rb | 57 - .../accounts/v1/homepage_service/client.rb | 791 ---- .../v1/homepage_service/credentials.rb | 49 - .../accounts/v1/homepage_service/paths.rb | 49 - .../accounts/v1/homepage_service/rest.rb | 54 - .../v1/homepage_service/rest/client.rb | 720 ---- .../v1/homepage_service/rest/service_stub.rb | 330 -- .../accounts/v1/homepage_services_pb.rb | 73 - .../accounts/v1/lfp_providers_service.rb | 59 - .../v1/lfp_providers_service/client.rb | 601 --- .../v1/lfp_providers_service/credentials.rb | 49 - .../v1/lfp_providers_service/paths.rb | 71 - .../accounts/v1/lfp_providers_service/rest.rb | 56 - .../v1/lfp_providers_service/rest/client.rb | 544 --- .../rest/service_stub.rb | 206 - .../merchant/accounts/v1/lfpproviders_pb.rb | 33 - .../accounts/v1/lfpproviders_services_pb.rb | 51 - .../v1/omnichannel_settings_service.rb | 60 - .../v1/omnichannel_settings_service/client.rb | 892 ----- .../credentials.rb | 49 - .../v1/omnichannel_settings_service/paths.rb | 66 - .../v1/omnichannel_settings_service/rest.rb | 57 - .../rest/client.rb | 814 ---- .../rest/service_stub.rb | 391 -- .../accounts/v1/omnichannelsettings_pb.rb | 46 - .../v1/omnichannelsettings_services_pb.rb | 58 - .../accounts/v1/online_return_policy_pb.rb | 45 - .../v1/online_return_policy_service.rb | 61 - .../v1/online_return_policy_service/client.rb | 788 ---- .../credentials.rb | 49 - .../v1/online_return_policy_service/paths.rb | 66 - .../v1/online_return_policy_service/rest.rb | 58 - .../rest/client.rb | 717 ---- .../rest/service_stub.rb | 328 -- .../v1/online_return_policy_services_pb.rb | 57 - .../accounts/v1/phoneverificationstate_pb.rb | 23 - .../merchant/accounts/v1/programs_pb.rb | 35 - .../merchant/accounts/v1/programs_service.rb | 67 - .../accounts/v1/programs_service/client.rb | 787 ---- .../v1/programs_service/credentials.rb | 49 - .../accounts/v1/programs_service/paths.rb | 66 - .../accounts/v1/programs_service/rest.rb | 64 - .../v1/programs_service/rest/client.rb | 716 ---- .../v1/programs_service/rest/service_stub.rb | 329 -- .../accounts/v1/programs_services_pb.rb | 63 - .../merchant/accounts/v1/regions_pb.rb | 48 - .../merchant/accounts/v1/regions_service.rb | 61 - .../accounts/v1/regions_service/client.rb | 1177 ------ .../v1/regions_service/credentials.rb | 49 - .../accounts/v1/regions_service/paths.rb | 66 - .../accounts/v1/regions_service/rest.rb | 58 - .../v1/regions_service/rest/client.rb | 1078 ------ .../v1/regions_service/rest/service_stub.rb | 576 --- .../accounts/v1/regions_services_pb.rb | 71 - .../shopping/merchant/accounts/v1/rest.rb | 60 - .../accounts/v1/shipping_settings_service.rb | 58 - .../v1/shipping_settings_service/client.rb | 581 --- .../shipping_settings_service/credentials.rb | 49 - .../v1/shipping_settings_service/paths.rb | 63 - .../v1/shipping_settings_service/rest.rb | 55 - .../shipping_settings_service/rest/client.rb | 524 --- .../rest/service_stub.rb | 206 - .../accounts/v1/shippingsettings_pb.rb | 61 - .../v1/shippingsettings_services_pb.rb | 51 - ...erms_of_service_agreement_state_service.rb | 57 - .../client.rb | 580 --- .../credentials.rb | 49 - .../paths.rb | 66 - .../rest.rb | 54 - .../rest/client.rb | 523 --- .../rest/service_stub.rb | 205 - .../accounts/v1/terms_of_service_service.rb | 57 - .../v1/terms_of_service_service/client.rb | 671 ---- .../terms_of_service_service/credentials.rb | 49 - .../v1/terms_of_service_service/paths.rb | 63 - .../v1/terms_of_service_service/rest.rb | 54 - .../terms_of_service_service/rest/client.rb | 615 --- .../rest/service_stub.rb | 264 -- .../merchant/accounts/v1/termsofservice_pb.rb | 34 - .../accounts/v1/termsofservice_services_pb.rb | 52 - .../v1/termsofserviceagreementstate_pb.rb | 34 - ...ermsofserviceagreementstate_services_pb.rb | 53 - .../accounts/v1/termsofservicekind_pb.rb | 23 - .../shopping/merchant/accounts/v1/user_pb.rb | 39 - .../merchant/accounts/v1/user_service.rb | 57 - .../accounts/v1/user_service/client.rb | 989 ----- .../accounts/v1/user_service/credentials.rb | 49 - .../accounts/v1/user_service/paths.rb | 66 - .../merchant/accounts/v1/user_service/rest.rb | 54 - .../accounts/v1/user_service/rest/client.rb | 904 ----- .../v1/user_service/rest/service_stub.rb | 452 --- .../merchant/accounts/v1/user_services_pb.rb | 62 - .../v1/verificationmailsettings_pb.rb | 26 - .../shopping/merchant/accounts/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 -- .../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/wrappers.rb | 148 - .../merchant/accounts/v1/accessright.rb | 53 - .../merchant/accounts/v1/accountissue.rb | 144 - .../accounts/v1/accountrelationships.rb | 124 - .../shopping/merchant/accounts/v1/accounts.rb | 337 -- .../merchant/accounts/v1/accountservices.rb | 301 -- .../merchant/accounts/v1/autofeedsettings.rb | 75 - .../accounts/v1/automaticimprovements.rb | 235 -- .../merchant/accounts/v1/businessidentity.rb | 140 - .../merchant/accounts/v1/businessinfo.rb | 91 - .../merchant/accounts/v1/checkoutsettings.rb | 188 - .../merchant/accounts/v1/customerservice.rb | 43 - .../accounts/v1/developerregistration.rb | 94 - .../merchant/accounts/v1/emailpreferences.rb | 87 - .../merchant/accounts/v1/gbpaccounts.rb | 123 - .../shopping/merchant/accounts/v1/homepage.rb | 106 - .../merchant/accounts/v1/lfpproviders.rb | 108 - .../accounts/v1/omnichannelsettings.rb | 336 -- .../accounts/v1/online_return_policy.rb | 317 -- .../accounts/v1/phoneverificationstate.rb | 40 - .../shopping/merchant/accounts/v1/programs.rb | 172 - .../shopping/merchant/accounts/v1/regions.rb | 296 -- .../merchant/accounts/v1/shippingsettings.rb | 757 ---- .../merchant/accounts/v1/termsofservice.rb | 118 - .../v1/termsofserviceagreementstate.rb | 136 - .../accounts/v1/termsofservicekind.rb | 37 - .../shopping/merchant/accounts/v1/user.rb | 176 - .../accounts/v1/verificationmailsettings.rb | 53 - .../proto_docs/google/shopping/type/types.rb | 248 -- .../proto_docs/google/type/date.rb | 53 - .../proto_docs/google/type/datetime.rb | 103 - .../proto_docs/google/type/latlng.rb | 38 - .../proto_docs/google/type/phone_number.rb | 116 - .../proto_docs/google/type/postal_address.rb | 135 - .../snippets/Gemfile | 32 - .../list_account_issues.rb | 51 - .../get_account_relationship.rb | 47 - .../list_account_relationships.rb | 51 - .../update_account_relationship.rb | 47 - .../approve_account_service.rb | 47 - .../get_account_service.rb | 47 - .../list_account_services.rb | 51 - .../propose_account_service.rb | 47 - .../reject_account_service.rb | 47 - .../create_and_configure_account.rb | 47 - .../accounts_service/create_test_account.rb | 47 - .../accounts_service/delete_account.rb | 47 - .../snippets/accounts_service/get_account.rb | 47 - .../accounts_service/list_accounts.rb | 51 - .../accounts_service/list_sub_accounts.rb | 51 - .../accounts_service/update_account.rb | 47 - .../get_autofeed_settings.rb | 47 - .../update_autofeed_settings.rb | 47 - .../get_automatic_improvements.rb | 47 - .../update_automatic_improvements.rb | 47 - .../get_business_identity.rb | 47 - .../update_business_identity.rb | 47 - .../get_business_info.rb | 47 - .../update_business_info.rb | 47 - .../create_checkout_settings.rb | 47 - .../delete_checkout_settings.rb | 47 - .../get_checkout_settings.rb | 47 - .../update_checkout_settings.rb | 47 - .../get_account_for_gcp_registration.rb | 47 - .../get_developer_registration.rb | 47 - .../register_gcp.rb | 47 - .../unregister_gcp.rb | 47 - .../get_email_preferences.rb | 47 - .../update_email_preferences.rb | 47 - .../gbp_accounts_service/link_gbp_account.rb | 47 - .../gbp_accounts_service/list_gbp_accounts.rb | 51 - .../homepage_service/claim_homepage.rb | 47 - .../snippets/homepage_service/get_homepage.rb | 47 - .../homepage_service/unclaim_homepage.rb | 47 - .../homepage_service/update_homepage.rb | 47 - .../find_lfp_providers.rb | 51 - .../link_lfp_provider.rb | 47 - .../create_omnichannel_setting.rb | 47 - .../get_omnichannel_setting.rb | 47 - .../list_omnichannel_settings.rb | 51 - .../request_inventory_verification.rb | 47 - .../update_omnichannel_setting.rb | 47 - .../create_online_return_policy.rb | 47 - .../delete_online_return_policy.rb | 47 - .../get_online_return_policy.rb | 47 - .../list_online_return_policies.rb | 51 - .../programs_service/disable_program.rb | 47 - .../programs_service/enable_program.rb | 47 - .../snippets/programs_service/get_program.rb | 47 - .../programs_service/list_programs.rb | 51 - .../regions_service/batch_create_regions.rb | 47 - .../regions_service/batch_delete_regions.rb | 47 - .../regions_service/batch_update_regions.rb | 47 - .../snippets/regions_service/create_region.rb | 47 - .../snippets/regions_service/delete_region.rb | 47 - .../snippets/regions_service/get_region.rb | 47 - .../snippets/regions_service/list_regions.rb | 51 - .../snippets/regions_service/update_region.rb | 47 - .../get_shipping_settings.rb | 47 - .../insert_shipping_settings.rb | 47 - ..._google.shopping.merchant.accounts.v1.json | 3055 --------------- .../get_terms_of_service_agreement_state.rb | 47 - ...cation_terms_of_service_agreement_state.rb | 47 - .../accept_terms_of_service.rb | 47 - .../get_terms_of_service.rb | 47 - .../retrieve_latest_terms_of_service.rb | 47 - .../snippets/user_service/create_user.rb | 47 - .../snippets/user_service/delete_user.rb | 47 - .../snippets/user_service/get_user.rb | 47 - .../snippets/user_service/list_users.rb | 51 - .../snippets/user_service/update_user.rb | 47 - .../snippets/user_service/verify_self.rb | 47 - .../v1/account_issue_service_paths_test.rb | 55 - .../v1/account_issue_service_rest_test.rb | 157 - .../accounts/v1/account_issue_service_test.rb | 175 - ...ccount_relationships_service_paths_test.rb | 67 - ...account_relationships_service_rest_test.rb | 264 -- .../v1/account_relationships_service_test.rb | 289 -- .../v1/account_services_service_paths_test.rb | 67 - .../v1/account_services_service_rest_test.rb | 373 -- .../v1/account_services_service_test.rb | 407 -- .../v1/accounts_service_paths_test.rb | 67 - .../accounts/v1/accounts_service_rest_test.rb | 487 --- .../accounts/v1/accounts_service_test.rb | 540 --- .../autofeed_settings_service_paths_test.rb | 55 - .../v1/autofeed_settings_service_rest_test.rb | 208 -- .../v1/autofeed_settings_service_test.rb | 222 -- ...tomatic_improvements_service_paths_test.rb | 55 - ...utomatic_improvements_service_rest_test.rb | 208 -- .../v1/automatic_improvements_service_test.rb | 222 -- .../business_identity_service_paths_test.rb | 55 - .../v1/business_identity_service_rest_test.rb | 208 -- .../v1/business_identity_service_test.rb | 222 -- .../v1/business_info_service_paths_test.rb | 55 - .../v1/business_info_service_rest_test.rb | 208 -- .../accounts/v1/business_info_service_test.rb | 222 -- .../checkout_settings_service_paths_test.rb | 67 - .../v1/checkout_settings_service_rest_test.rb | 317 -- .../v1/checkout_settings_service_test.rb | 340 -- ...veloper_registration_service_paths_test.rb | 55 - ...eveloper_registration_service_rest_test.rb | 310 -- .../v1/developer_registration_service_test.rb | 330 -- .../email_preferences_service_paths_test.rb | 55 - .../v1/email_preferences_service_rest_test.rb | 208 -- .../v1/email_preferences_service_test.rb | 222 -- .../v1/gbp_accounts_service_paths_test.rb | 55 - .../v1/gbp_accounts_service_rest_test.rb | 210 -- .../accounts/v1/gbp_accounts_service_test.rb | 231 -- .../v1/homepage_service_paths_test.rb | 55 - .../accounts/v1/homepage_service_rest_test.rb | 317 -- .../accounts/v1/homepage_service_test.rb | 340 -- .../v1/lfp_providers_service_paths_test.rb | 67 - .../v1/lfp_providers_service_rest_test.rb | 210 -- .../accounts/v1/lfp_providers_service_test.rb | 231 -- ...omnichannel_settings_service_paths_test.rb | 67 - .../omnichannel_settings_service_rest_test.rb | 373 -- .../v1/omnichannel_settings_service_test.rb | 407 -- ...online_return_policy_service_paths_test.rb | 67 - .../online_return_policy_service_rest_test.rb | 318 -- .../v1/online_return_policy_service_test.rb | 347 -- .../v1/programs_service_paths_test.rb | 67 - .../accounts/v1/programs_service_rest_test.rb | 317 -- .../accounts/v1/programs_service_test.rb | 345 -- .../accounts/v1/regions_service_paths_test.rb | 67 - .../accounts/v1/regions_service_rest_test.rb | 539 --- .../accounts/v1/regions_service_test.rb | 589 --- .../shipping_settings_service_paths_test.rb | 67 - .../v1/shipping_settings_service_rest_test.rb | 208 -- .../v1/shipping_settings_service_test.rb | 222 -- ...vice_agreement_state_service_paths_test.rb | 67 - ...rvice_agreement_state_service_rest_test.rb | 207 -- ...of_service_agreement_state_service_test.rb | 220 -- .../v1/terms_of_service_service_paths_test.rb | 67 - .../v1/terms_of_service_service_rest_test.rb | 264 -- .../v1/terms_of_service_service_test.rb | 284 -- .../accounts/v1/user_service_paths_test.rb | 67 - .../accounts/v1/user_service_rest_test.rb | 428 --- .../merchant/accounts/v1/user_service_test.rb | 467 --- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.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 | 504 --- ...-shopping-merchant-accounts-v1beta.gemspec | 29 - ...oogle-shopping-merchant-accounts-v1beta.rb | 21 - .../shopping/merchant/accounts/v1beta.rb | 66 - .../accounts/v1beta/accessright_pb.rb | 23 - .../accounts/v1beta/account_issue_service.rb | 57 - .../v1beta/account_issue_service/client.rb | 507 --- .../account_issue_service/credentials.rb | 49 - .../v1beta/account_issue_service/paths.rb | 49 - .../v1beta/account_issue_service/rest.rb | 54 - .../account_issue_service/rest/client.rb | 457 --- .../rest/service_stub.rb | 144 - .../accounts/v1beta/account_tax_pb.rb | 34 - .../accounts/v1beta/account_tax_service.rb | 61 - .../v1beta/account_tax_service/client.rb | 686 ---- .../v1beta/account_tax_service/credentials.rb | 49 - .../v1beta/account_tax_service/paths.rb | 66 - .../v1beta/account_tax_service/rest.rb | 58 - .../v1beta/account_tax_service/rest/client.rb | 622 ---- .../account_tax_service/rest/service_stub.rb | 267 -- .../v1beta/account_tax_services_pb.rb | 58 - .../accounts/v1beta/accountissue_pb.rb | 34 - .../v1beta/accountissue_services_pb.rb | 47 - .../merchant/accounts/v1beta/accounts_pb.rb | 43 - .../accounts/v1beta/accounts_service.rb | 57 - .../v1beta/accounts_service/client.rb | 998 ----- .../v1beta/accounts_service/credentials.rb | 49 - .../accounts/v1beta/accounts_service/paths.rb | 80 - .../accounts/v1beta/accounts_service/rest.rb | 54 - .../v1beta/accounts_service/rest/client.rb | 929 ----- .../accounts_service/rest/service_stub.rb | 447 --- .../accounts/v1beta/accounts_services_pb.rb | 75 - .../accounts/v1beta/accountservices_pb.rb | 28 - .../v1beta/autofeed_settings_service.rb | 58 - .../autofeed_settings_service/client.rb | 577 --- .../autofeed_settings_service/credentials.rb | 49 - .../v1beta/autofeed_settings_service/paths.rb | 49 - .../v1beta/autofeed_settings_service/rest.rb | 55 - .../autofeed_settings_service/rest/client.rb | 520 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/autofeedsettings_pb.rb | 31 - .../v1beta/autofeedsettings_services_pb.rb | 50 - .../v1beta/automatic_improvements_service.rb | 59 - .../automatic_improvements_service/client.rb | 587 --- .../credentials.rb | 49 - .../automatic_improvements_service/paths.rb | 49 - .../automatic_improvements_service/rest.rb | 56 - .../rest/client.rb | 530 --- .../rest/service_stub.rb | 206 - .../v1beta/automaticimprovements_pb.rb | 36 - .../automaticimprovements_services_pb.rb | 51 - .../v1beta/business_identity_service.rb | 58 - .../business_identity_service/client.rb | 578 --- .../business_identity_service/credentials.rb | 49 - .../v1beta/business_identity_service/paths.rb | 49 - .../v1beta/business_identity_service/rest.rb | 55 - .../business_identity_service/rest/client.rb | 521 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/business_info_service.rb | 57 - .../v1beta/business_info_service/client.rb | 577 --- .../business_info_service/credentials.rb | 49 - .../v1beta/business_info_service/paths.rb | 49 - .../v1beta/business_info_service/rest.rb | 54 - .../business_info_service/rest/client.rb | 520 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/businessidentity_pb.rb | 34 - .../v1beta/businessidentity_services_pb.rb | 51 - .../accounts/v1beta/businessinfo_pb.rb | 35 - .../v1beta/businessinfo_services_pb.rb | 50 - .../v1beta/checkout_settings_service.rb | 58 - .../checkout_settings_service/client.rb | 774 ---- .../checkout_settings_service/credentials.rb | 49 - .../v1beta/checkout_settings_service/paths.rb | 69 - .../v1beta/checkout_settings_service/rest.rb | 55 - .../checkout_settings_service/rest/client.rb | 703 ---- .../rest/service_stub.rb | 329 -- .../accounts/v1beta/checkoutsettings_pb.rb | 38 - .../v1beta/checkoutsettings_services_pb.rb | 56 - .../accounts/v1beta/customerservice_pb.rb | 26 - .../v1beta/email_preferences_service.rb | 60 - .../email_preferences_service/client.rb | 592 --- .../email_preferences_service/credentials.rb | 49 - .../v1beta/email_preferences_service/paths.rb | 52 - .../v1beta/email_preferences_service/rest.rb | 57 - .../email_preferences_service/rest/client.rb | 535 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/emailpreferences_pb.rb | 32 - .../v1beta/emailpreferences_services_pb.rb | 65 - .../accounts/v1beta/gbp_accounts_service.rb | 60 - .../v1beta/gbp_accounts_service/client.rb | 598 --- .../gbp_accounts_service/credentials.rb | 49 - .../v1beta/gbp_accounts_service/paths.rb | 49 - .../v1beta/gbp_accounts_service/rest.rb | 57 - .../gbp_accounts_service/rest/client.rb | 541 --- .../gbp_accounts_service/rest/service_stub.rb | 206 - .../accounts/v1beta/gbpaccounts_pb.rb | 34 - .../v1beta/gbpaccounts_services_pb.rb | 52 - .../merchant/accounts/v1beta/homepage_pb.rb | 33 - .../accounts/v1beta/homepage_service.rb | 57 - .../v1beta/homepage_service/client.rb | 775 ---- .../v1beta/homepage_service/credentials.rb | 49 - .../accounts/v1beta/homepage_service/paths.rb | 49 - .../accounts/v1beta/homepage_service/rest.rb | 54 - .../v1beta/homepage_service/rest/client.rb | 704 ---- .../homepage_service/rest/service_stub.rb | 330 -- .../accounts/v1beta/homepage_services_pb.rb | 66 - .../accounts/v1beta/lfp_providers_service.rb | 59 - .../v1beta/lfp_providers_service/client.rb | 601 --- .../lfp_providers_service/credentials.rb | 49 - .../v1beta/lfp_providers_service/paths.rb | 71 - .../v1beta/lfp_providers_service/rest.rb | 56 - .../lfp_providers_service/rest/client.rb | 544 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/lfpproviders_pb.rb | 33 - .../v1beta/lfpproviders_services_pb.rb | 51 - .../v1beta/omnichannel_settings_service.rb | 60 - .../omnichannel_settings_service/client.rb | 892 ----- .../credentials.rb | 49 - .../omnichannel_settings_service/paths.rb | 66 - .../omnichannel_settings_service/rest.rb | 57 - .../rest/client.rb | 814 ---- .../rest/service_stub.rb | 391 -- .../accounts/v1beta/omnichannelsettings_pb.rb | 46 - .../v1beta/omnichannelsettings_services_pb.rb | 58 - .../v1beta/online_return_policy_pb.rb | 47 - .../v1beta/online_return_policy_service.rb | 61 - .../online_return_policy_service/client.rb | 897 ----- .../credentials.rb | 49 - .../online_return_policy_service/paths.rb | 66 - .../online_return_policy_service/rest.rb | 58 - .../rest/client.rb | 819 ---- .../rest/service_stub.rb | 390 -- .../online_return_policy_services_pb.rb | 59 - .../v1beta/phoneverificationstate_pb.rb | 23 - .../merchant/accounts/v1beta/programs_pb.rb | 35 - .../accounts/v1beta/programs_service.rb | 67 - .../v1beta/programs_service/client.rb | 786 ---- .../v1beta/programs_service/credentials.rb | 49 - .../accounts/v1beta/programs_service/paths.rb | 66 - .../accounts/v1beta/programs_service/rest.rb | 64 - .../v1beta/programs_service/rest/client.rb | 715 ---- .../programs_service/rest/service_stub.rb | 329 -- .../accounts/v1beta/programs_services_pb.rb | 65 - .../merchant/accounts/v1beta/regions_pb.rb | 40 - .../accounts/v1beta/regions_service.rb | 61 - .../accounts/v1beta/regions_service/client.rb | 886 ----- .../v1beta/regions_service/credentials.rb | 49 - .../accounts/v1beta/regions_service/paths.rb | 66 - .../accounts/v1beta/regions_service/rest.rb | 58 - .../v1beta/regions_service/rest/client.rb | 808 ---- .../regions_service/rest/service_stub.rb | 390 -- .../accounts/v1beta/regions_services_pb.rb | 62 - .../shopping/merchant/accounts/v1beta/rest.rb | 58 - .../v1beta/shipping_settings_service.rb | 58 - .../shipping_settings_service/client.rb | 574 --- .../shipping_settings_service/credentials.rb | 49 - .../v1beta/shipping_settings_service/paths.rb | 49 - .../v1beta/shipping_settings_service/rest.rb | 55 - .../shipping_settings_service/rest/client.rb | 517 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/shippingsettings_pb.rb | 61 - .../v1beta/shippingsettings_services_pb.rb | 51 - .../merchant/accounts/v1beta/tax_rule_pb.rb | 27 - ...erms_of_service_agreement_state_service.rb | 57 - .../client.rb | 576 --- .../credentials.rb | 49 - .../paths.rb | 66 - .../rest.rb | 54 - .../rest/client.rb | 519 --- .../rest/service_stub.rb | 205 - .../v1beta/terms_of_service_service.rb | 57 - .../v1beta/terms_of_service_service/client.rb | 670 ---- .../terms_of_service_service/credentials.rb | 49 - .../v1beta/terms_of_service_service/paths.rb | 63 - .../v1beta/terms_of_service_service/rest.rb | 54 - .../terms_of_service_service/rest/client.rb | 614 --- .../rest/service_stub.rb | 264 -- .../accounts/v1beta/termsofservice_pb.rb | 33 - .../v1beta/termsofservice_services_pb.rb | 52 - .../v1beta/termsofserviceagreementstate_pb.rb | 34 - ...ermsofserviceagreementstate_services_pb.rb | 49 - .../accounts/v1beta/termsofservicekind_pb.rb | 23 - .../merchant/accounts/v1beta/user_pb.rb | 38 - .../merchant/accounts/v1beta/user_service.rb | 57 - .../accounts/v1beta/user_service/client.rb | 889 ----- .../v1beta/user_service/credentials.rb | 49 - .../accounts/v1beta/user_service/paths.rb | 66 - .../accounts/v1beta/user_service/rest.rb | 54 - .../v1beta/user_service/rest/client.rb | 811 ---- .../v1beta/user_service/rest/service_stub.rb | 390 -- .../accounts/v1beta/user_services_pb.rb | 58 - .../v1beta/verificationmailsettings_pb.rb | 26 - .../merchant/accounts/v1beta/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 -- .../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 - .../merchant/accounts/v1beta/accessright.rb | 43 - .../merchant/accounts/v1beta/account_tax.rb | 101 - .../merchant/accounts/v1beta/accountissue.rb | 142 - .../merchant/accounts/v1beta/accounts.rb | 231 -- .../accounts/v1beta/accountservices.rb | 34 - .../accounts/v1beta/autofeedsettings.rb | 75 - .../accounts/v1beta/automaticimprovements.rb | 235 -- .../accounts/v1beta/businessidentity.rb | 129 - .../merchant/accounts/v1beta/businessinfo.rb | 77 - .../accounts/v1beta/checkoutsettings.rb | 185 - .../accounts/v1beta/customerservice.rb | 43 - .../accounts/v1beta/emailpreferences.rb | 82 - .../merchant/accounts/v1beta/gbpaccounts.rb | 123 - .../merchant/accounts/v1beta/homepage.rb | 87 - .../merchant/accounts/v1beta/lfpproviders.rb | 108 - .../accounts/v1beta/omnichannelsettings.rb | 336 -- .../accounts/v1beta/online_return_policy.rb | 345 -- .../accounts/v1beta/phoneverificationstate.rb | 40 - .../merchant/accounts/v1beta/programs.rb | 160 - .../merchant/accounts/v1beta/regions.rb | 195 - .../accounts/v1beta/shippingsettings.rb | 747 ---- .../merchant/accounts/v1beta/tax_rule.rb | 96 - .../accounts/v1beta/termsofservice.rb | 99 - .../v1beta/termsofserviceagreementstate.rb | 135 - .../accounts/v1beta/termsofservicekind.rb | 37 - .../shopping/merchant/accounts/v1beta/user.rb | 156 - .../v1beta/verificationmailsettings.rb | 53 - .../proto_docs/google/shopping/type/types.rb | 248 -- .../proto_docs/google/type/date.rb | 53 - .../proto_docs/google/type/datetime.rb | 103 - .../proto_docs/google/type/interval.rb | 45 - .../proto_docs/google/type/phone_number.rb | 116 - .../proto_docs/google/type/postal_address.rb | 135 - .../snippets/Gemfile | 32 - .../list_account_issues.rb | 51 - .../account_tax_service/get_account_tax.rb | 47 - .../account_tax_service/list_account_tax.rb | 51 - .../account_tax_service/update_account_tax.rb | 47 - .../create_and_configure_account.rb | 47 - .../accounts_service/delete_account.rb | 47 - .../snippets/accounts_service/get_account.rb | 47 - .../accounts_service/list_accounts.rb | 51 - .../accounts_service/list_sub_accounts.rb | 51 - .../accounts_service/update_account.rb | 47 - .../get_autofeed_settings.rb | 47 - .../update_autofeed_settings.rb | 47 - .../get_automatic_improvements.rb | 47 - .../update_automatic_improvements.rb | 47 - .../get_business_identity.rb | 47 - .../update_business_identity.rb | 47 - .../get_business_info.rb | 47 - .../update_business_info.rb | 47 - .../create_checkout_settings.rb | 47 - .../delete_checkout_settings.rb | 47 - .../get_checkout_settings.rb | 47 - .../update_checkout_settings.rb | 47 - .../get_email_preferences.rb | 47 - .../update_email_preferences.rb | 47 - .../gbp_accounts_service/link_gbp_account.rb | 47 - .../gbp_accounts_service/list_gbp_accounts.rb | 51 - .../homepage_service/claim_homepage.rb | 47 - .../snippets/homepage_service/get_homepage.rb | 47 - .../homepage_service/unclaim_homepage.rb | 47 - .../homepage_service/update_homepage.rb | 47 - .../find_lfp_providers.rb | 51 - .../link_lfp_provider.rb | 47 - .../create_omnichannel_setting.rb | 47 - .../get_omnichannel_setting.rb | 47 - .../list_omnichannel_settings.rb | 51 - .../request_inventory_verification.rb | 47 - .../update_omnichannel_setting.rb | 47 - .../create_online_return_policy.rb | 47 - .../delete_online_return_policy.rb | 47 - .../get_online_return_policy.rb | 47 - .../list_online_return_policies.rb | 51 - .../update_online_return_policy.rb | 47 - .../programs_service/disable_program.rb | 47 - .../programs_service/enable_program.rb | 47 - .../snippets/programs_service/get_program.rb | 47 - .../programs_service/list_programs.rb | 51 - .../snippets/regions_service/create_region.rb | 47 - .../snippets/regions_service/delete_region.rb | 47 - .../snippets/regions_service/get_region.rb | 47 - .../snippets/regions_service/list_regions.rb | 51 - .../snippets/regions_service/update_region.rb | 47 - .../get_shipping_settings.rb | 47 - .../insert_shipping_settings.rb | 47 - ...gle.shopping.merchant.accounts.v1beta.json | 2535 ------------- .../get_terms_of_service_agreement_state.rb | 47 - ...cation_terms_of_service_agreement_state.rb | 47 - .../accept_terms_of_service.rb | 47 - .../get_terms_of_service.rb | 47 - .../retrieve_latest_terms_of_service.rb | 47 - .../snippets/user_service/create_user.rb | 47 - .../snippets/user_service/delete_user.rb | 47 - .../snippets/user_service/get_user.rb | 47 - .../snippets/user_service/list_users.rb | 51 - .../snippets/user_service/update_user.rb | 47 - .../account_issue_service_paths_test.rb | 55 - .../v1beta/account_issue_service_rest_test.rb | 157 - .../v1beta/account_issue_service_test.rb | 175 - .../v1beta/account_tax_service_paths_test.rb | 67 - .../v1beta/account_tax_service_rest_test.rb | 264 -- .../v1beta/account_tax_service_test.rb | 289 -- .../v1beta/accounts_service_paths_test.rb | 79 - .../v1beta/accounts_service_rest_test.rb | 432 --- .../accounts/v1beta/accounts_service_test.rb | 481 --- .../autofeed_settings_service_paths_test.rb | 55 - .../autofeed_settings_service_rest_test.rb | 208 -- .../v1beta/autofeed_settings_service_test.rb | 222 -- ...tomatic_improvements_service_paths_test.rb | 55 - ...utomatic_improvements_service_rest_test.rb | 208 -- .../automatic_improvements_service_test.rb | 222 -- .../business_identity_service_paths_test.rb | 55 - .../business_identity_service_rest_test.rb | 208 -- .../v1beta/business_identity_service_test.rb | 222 -- .../business_info_service_paths_test.rb | 55 - .../v1beta/business_info_service_rest_test.rb | 208 -- .../v1beta/business_info_service_test.rb | 222 -- .../checkout_settings_service_paths_test.rb | 67 - .../checkout_settings_service_rest_test.rb | 317 -- .../v1beta/checkout_settings_service_test.rb | 340 -- .../email_preferences_service_paths_test.rb | 55 - .../email_preferences_service_rest_test.rb | 208 -- .../v1beta/email_preferences_service_test.rb | 222 -- .../v1beta/gbp_accounts_service_paths_test.rb | 55 - .../v1beta/gbp_accounts_service_rest_test.rb | 210 -- .../v1beta/gbp_accounts_service_test.rb | 231 -- .../v1beta/homepage_service_paths_test.rb | 55 - .../v1beta/homepage_service_rest_test.rb | 316 -- .../accounts/v1beta/homepage_service_test.rb | 338 -- .../lfp_providers_service_paths_test.rb | 67 - .../v1beta/lfp_providers_service_rest_test.rb | 210 -- .../v1beta/lfp_providers_service_test.rb | 231 -- ...omnichannel_settings_service_paths_test.rb | 67 - .../omnichannel_settings_service_rest_test.rb | 373 -- .../omnichannel_settings_service_test.rb | 407 -- ...online_return_policy_service_paths_test.rb | 67 - .../online_return_policy_service_rest_test.rb | 373 -- .../online_return_policy_service_test.rb | 407 -- .../v1beta/programs_service_paths_test.rb | 67 - .../v1beta/programs_service_rest_test.rb | 317 -- .../accounts/v1beta/programs_service_test.rb | 345 -- .../v1beta/regions_service_paths_test.rb | 67 - .../v1beta/regions_service_rest_test.rb | 374 -- .../accounts/v1beta/regions_service_test.rb | 409 -- .../shipping_settings_service_paths_test.rb | 55 - .../shipping_settings_service_rest_test.rb | 208 -- .../v1beta/shipping_settings_service_test.rb | 222 -- ...vice_agreement_state_service_paths_test.rb | 67 - ...rvice_agreement_state_service_rest_test.rb | 207 -- ...of_service_agreement_state_service_test.rb | 220 -- .../terms_of_service_service_paths_test.rb | 67 - .../terms_of_service_service_rest_test.rb | 264 -- .../v1beta/terms_of_service_service_test.rb | 284 -- .../v1beta/user_service_paths_test.rb | 67 - .../accounts/v1beta/user_service_rest_test.rb | 374 -- .../accounts/v1beta/user_service_test.rb | 409 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.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 | 48 - ...e-shopping-merchant-conversions-v1.gemspec | 28 - ...google-shopping-merchant-conversions-v1.rb | 21 - .../shopping/merchant/conversions/v1.rb | 47 - .../v1/conversion_sources_service.rb | 57 - .../v1/conversion_sources_service/client.rb | 973 ----- .../conversion_sources_service/credentials.rb | 49 - .../v1/conversion_sources_service/paths.rb | 66 - .../v1/conversion_sources_service/rest.rb | 54 - .../conversion_sources_service/rest/client.rb | 888 ----- .../rest/service_stub.rb | 452 --- .../conversions/v1/conversionsources_pb.rb | 45 - .../v1/conversionsources_services_pb.rb | 62 - .../shopping/merchant/conversions/v1/rest.rb | 39 - .../merchant/conversions/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 -- .../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 - .../conversions/v1/conversionsources.rb | 289 -- .../snippets/Gemfile | 32 - .../create_conversion_source.rb | 47 - .../delete_conversion_source.rb | 47 - .../get_conversion_source.rb | 47 - .../list_conversion_sources.rb | 51 - .../undelete_conversion_source.rb | 47 - .../update_conversion_source.rb | 47 - ...ogle.shopping.merchant.conversions.v1.json | 255 -- .../conversion_sources_service_paths_test.rb | 67 - .../conversion_sources_service_rest_test.rb | 428 --- .../v1/conversion_sources_service_test.rb | 467 --- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.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 | 48 - ...opping-merchant-conversions-v1beta.gemspec | 28 - ...le-shopping-merchant-conversions-v1beta.rb | 21 - .../shopping/merchant/conversions/v1beta.rb | 47 - .../v1beta/conversion_sources_service.rb | 57 - .../conversion_sources_service/client.rb | 973 ----- .../conversion_sources_service/credentials.rb | 49 - .../conversion_sources_service/paths.rb | 66 - .../v1beta/conversion_sources_service/rest.rb | 54 - .../conversion_sources_service/rest/client.rb | 888 ----- .../rest/service_stub.rb | 452 --- .../v1beta/conversionsources_pb.rb | 45 - .../v1beta/conversionsources_services_pb.rb | 62 - .../merchant/conversions/v1beta/rest.rb | 39 - .../merchant/conversions/v1beta/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 -- .../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 - .../conversions/v1beta/conversionsources.rb | 290 -- .../snippets/Gemfile | 32 - .../create_conversion_source.rb | 47 - .../delete_conversion_source.rb | 47 - .../get_conversion_source.rb | 47 - .../list_conversion_sources.rb | 51 - .../undelete_conversion_source.rb | 47 - .../update_conversion_source.rb | 47 - ....shopping.merchant.conversions.v1beta.json | 255 -- .../conversion_sources_service_paths_test.rb | 67 - .../conversion_sources_service_rest_test.rb | 428 --- .../v1beta/conversion_sources_service_test.rb | 467 --- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.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 | 62 - ...-shopping-merchant-data_sources-v1.gemspec | 29 - ...oogle-shopping-merchant-data_sources-v1.rb | 21 - .../shopping/merchant/data_sources/v1.rb | 48 - .../data_sources/v1/data_sources_service.rb | 59 - .../v1/data_sources_service/client.rb | 984 ----- .../v1/data_sources_service/credentials.rb | 49 - .../v1/data_sources_service/paths.rb | 66 - .../v1/data_sources_service/rest.rb | 56 - .../v1/data_sources_service/rest/client.rb | 899 ----- .../data_sources_service/rest/service_stub.rb | 452 --- .../data_sources/v1/file_uploads_service.rb | 57 - .../v1/file_uploads_service/client.rb | 484 --- .../v1/file_uploads_service/credentials.rb | 49 - .../v1/file_uploads_service/paths.rb | 54 - .../v1/file_uploads_service/rest.rb | 54 - .../v1/file_uploads_service/rest/client.rb | 434 --- .../file_uploads_service/rest/service_stub.rb | 144 - .../shopping/merchant/data_sources/v1/rest.rb | 40 - .../merchant/data_sources/v1/version.rb | 30 - .../merchant/datasources/v1/datasources_pb.rb | 40 - .../datasources/v1/datasources_services_pb.rb | 65 - .../datasources/v1/datasourcetypes_pb.rb | 36 - .../merchant/datasources/v1/fileinputs_pb.rb | 30 - .../merchant/datasources/v1/fileuploads_pb.rb | 33 - .../datasources/v1/fileuploads_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 -- .../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 - .../merchant/datasources/v1/datasources.rb | 231 -- .../datasources/v1/datasourcetypes.rb | 293 -- .../merchant/datasources/v1/fileinputs.rb | 135 - .../merchant/datasources/v1/fileuploads.rb | 131 - .../proto_docs/google/shopping/type/types.rb | 248 -- .../proto_docs/google/type/dayofweek.rb | 49 - .../proto_docs/google/type/timeofday.rb | 45 - .../snippets/Gemfile | 32 - .../create_data_source.rb | 47 - .../delete_data_source.rb | 47 - .../data_sources_service/fetch_data_source.rb | 47 - .../data_sources_service/get_data_source.rb | 47 - .../data_sources_service/list_data_sources.rb | 51 - .../update_data_source.rb | 47 - .../file_uploads_service/get_file_upload.rb | 47 - ...ogle.shopping.merchant.datasources.v1.json | 295 -- .../v1/data_sources_service_paths_test.rb | 67 - .../v1/data_sources_service_rest_test.rb | 427 --- .../v1/data_sources_service_test.rb | 465 --- .../v1/file_uploads_service_paths_test.rb | 55 - .../v1/file_uploads_service_rest_test.rb | 153 - .../v1/file_uploads_service_test.rb | 162 - .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.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 | 62 - ...pping-merchant-data_sources-v1beta.gemspec | 29 - ...e-shopping-merchant-data_sources-v1beta.rb | 21 - .../shopping/merchant/data_sources/v1beta.rb | 48 - .../v1beta/data_sources_service.rb | 59 - .../v1beta/data_sources_service/client.rb | 980 ----- .../data_sources_service/credentials.rb | 49 - .../v1beta/data_sources_service/paths.rb | 66 - .../v1beta/data_sources_service/rest.rb | 56 - .../data_sources_service/rest/client.rb | 895 ----- .../data_sources_service/rest/service_stub.rb | 452 --- .../v1beta/file_uploads_service.rb | 57 - .../v1beta/file_uploads_service/client.rb | 484 --- .../file_uploads_service/credentials.rb | 49 - .../v1beta/file_uploads_service/paths.rb | 54 - .../v1beta/file_uploads_service/rest.rb | 54 - .../file_uploads_service/rest/client.rb | 434 --- .../file_uploads_service/rest/service_stub.rb | 144 - .../merchant/data_sources/v1beta/rest.rb | 40 - .../merchant/data_sources/v1beta/version.rb | 30 - .../datasources/v1beta/datasources_pb.rb | 40 - .../v1beta/datasources_services_pb.rb | 64 - .../datasources/v1beta/datasourcetypes_pb.rb | 37 - .../datasources/v1beta/fileinputs_pb.rb | 30 - .../datasources/v1beta/fileuploads_pb.rb | 33 - .../v1beta/fileuploads_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 -- .../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 - .../datasources/v1beta/datasources.rb | 228 -- .../datasources/v1beta/datasourcetypes.rb | 310 -- .../merchant/datasources/v1beta/fileinputs.rb | 141 - .../datasources/v1beta/fileuploads.rb | 131 - .../proto_docs/google/shopping/type/types.rb | 248 -- .../proto_docs/google/type/dayofweek.rb | 49 - .../proto_docs/google/type/timeofday.rb | 45 - .../snippets/Gemfile | 32 - .../create_data_source.rb | 47 - .../delete_data_source.rb | 47 - .../data_sources_service/fetch_data_source.rb | 47 - .../data_sources_service/get_data_source.rb | 47 - .../data_sources_service/list_data_sources.rb | 51 - .../update_data_source.rb | 47 - .../file_uploads_service/get_file_upload.rb | 47 - ....shopping.merchant.datasources.v1beta.json | 295 -- .../v1beta/data_sources_service_paths_test.rb | 67 - .../v1beta/data_sources_service_rest_test.rb | 427 --- .../v1beta/data_sources_service_test.rb | 465 --- .../v1beta/file_uploads_service_paths_test.rb | 55 - .../v1beta/file_uploads_service_rest_test.rb | 153 - .../v1beta/file_uploads_service_test.rb | 162 - .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.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 | 57 - ...e-shopping-merchant-inventories-v1.gemspec | 29 - ...google-shopping-merchant-inventories-v1.rb | 21 - .../shopping/merchant/inventories/v1.rb | 48 - .../inventories/v1/inventories_common_pb.rb | 32 - .../inventories/v1/local_inventory_service.rb | 57 - .../v1/local_inventory_service/client.rb | 711 ---- .../v1/local_inventory_service/credentials.rb | 49 - .../v1/local_inventory_service/paths.rb | 71 - .../v1/local_inventory_service/rest.rb | 54 - .../v1/local_inventory_service/rest/client.rb | 647 ---- .../rest/service_stub.rb | 267 -- .../inventories/v1/localinventory_pb.rb | 34 - .../v1/localinventory_services_pb.rb | 68 - .../v1/regional_inventory_service.rb | 58 - .../v1/regional_inventory_service/client.rb | 711 ---- .../regional_inventory_service/credentials.rb | 49 - .../v1/regional_inventory_service/paths.rb | 71 - .../v1/regional_inventory_service/rest.rb | 55 - .../regional_inventory_service/rest/client.rb | 647 ---- .../rest/service_stub.rb | 267 -- .../inventories/v1/regionalinventory_pb.rb | 34 - .../v1/regionalinventory_services_pb.rb | 69 - .../shopping/merchant/inventories/v1/rest.rb | 40 - .../merchant/inventories/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 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../inventories/v1/inventories_common.rb | 182 - .../merchant/inventories/v1/localinventory.rb | 124 - .../inventories/v1/regionalinventory.rb | 123 - .../proto_docs/google/shopping/type/types.rb | 248 -- .../proto_docs/google/type/interval.rb | 45 - .../snippets/Gemfile | 32 - .../delete_local_inventory.rb | 47 - .../insert_local_inventory.rb | 47 - .../list_local_inventories.rb | 51 - .../delete_regional_inventory.rb | 47 - .../insert_regional_inventory.rb | 47 - .../list_regional_inventories.rb | 51 - ...ogle.shopping.merchant.inventories.v1.json | 255 -- .../v1/local_inventory_service_paths_test.rb | 67 - .../v1/local_inventory_service_rest_test.rb | 264 -- .../v1/local_inventory_service_test.rb | 289 -- .../regional_inventory_service_paths_test.rb | 67 - .../regional_inventory_service_rest_test.rb | 264 -- .../v1/regional_inventory_service_test.rb | 289 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.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 | 57 - ...opping-merchant-inventories-v1beta.gemspec | 29 - ...le-shopping-merchant-inventories-v1beta.rb | 21 - .../shopping/merchant/inventories/v1beta.rb | 48 - .../v1beta/local_inventory_service.rb | 57 - .../v1beta/local_inventory_service/client.rb | 711 ---- .../local_inventory_service/credentials.rb | 49 - .../v1beta/local_inventory_service/paths.rb | 71 - .../v1beta/local_inventory_service/rest.rb | 54 - .../local_inventory_service/rest/client.rb | 647 ---- .../rest/service_stub.rb | 267 -- .../inventories/v1beta/localinventory_pb.rb | 35 - .../v1beta/localinventory_services_pb.rb | 68 - .../v1beta/regional_inventory_service.rb | 58 - .../regional_inventory_service/client.rb | 711 ---- .../regional_inventory_service/credentials.rb | 49 - .../regional_inventory_service/paths.rb | 71 - .../v1beta/regional_inventory_service/rest.rb | 55 - .../regional_inventory_service/rest/client.rb | 647 ---- .../rest/service_stub.rb | 267 -- .../v1beta/regionalinventory_pb.rb | 35 - .../v1beta/regionalinventory_services_pb.rb | 69 - .../merchant/inventories/v1beta/rest.rb | 40 - .../merchant/inventories/v1beta/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 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../inventories/v1beta/localinventory.rb | 164 - .../inventories/v1beta/regionalinventory.rb | 142 - .../proto_docs/google/shopping/type/types.rb | 248 -- .../proto_docs/google/type/interval.rb | 45 - .../snippets/Gemfile | 32 - .../delete_local_inventory.rb | 47 - .../insert_local_inventory.rb | 47 - .../list_local_inventories.rb | 51 - .../delete_regional_inventory.rb | 47 - .../insert_regional_inventory.rb | 47 - .../list_regional_inventories.rb | 51 - ....shopping.merchant.inventories.v1beta.json | 255 -- .../local_inventory_service_paths_test.rb | 67 - .../local_inventory_service_rest_test.rb | 264 -- .../v1beta/local_inventory_service_test.rb | 289 -- .../regional_inventory_service_paths_test.rb | 67 - .../regional_inventory_service_rest_test.rb | 264 -- .../v1beta/regional_inventory_service_test.rb | 289 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.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 - ...pping-merchant-issue_resolution-v1.gemspec | 29 - ...e-shopping-merchant-issue_resolution-v1.rb | 21 - .../shopping/merchant/issue_resolution/v1.rb | 48 - .../v1/aggregate_product_statuses_service.rb | 57 - .../client.rb | 508 --- .../credentials.rb | 49 - .../paths.rb | 49 - .../rest.rb | 54 - .../rest/client.rb | 458 --- .../rest/service_stub.rb | 144 - .../v1/issue_resolution_service.rb | 58 - .../v1/issue_resolution_service/client.rb | 709 ---- .../issue_resolution_service/credentials.rb | 49 - .../v1/issue_resolution_service/paths.rb | 66 - .../v1/issue_resolution_service/rest.rb | 55 - .../issue_resolution_service/rest/client.rb | 645 ---- .../rest/service_stub.rb | 269 -- .../merchant/issue_resolution/v1/rest.rb | 40 - .../merchant/issue_resolution/v1/version.rb | 30 - .../v1/aggregateproductstatuses_pb.rb | 35 - .../aggregateproductstatuses_services_pb.rb | 50 - .../issueresolution/v1/issueresolution_pb.rb | 66 - .../v1/issueresolution_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 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../v1/aggregateproductstatuses.rb | 173 - .../issueresolution/v1/issueresolution.rb | 952 ----- .../proto_docs/google/shopping/type/types.rb | 248 -- .../snippets/Gemfile | 32 - .../list_aggregate_product_statuses.rb | 51 - .../render_account_issues.rb | 47 - .../render_product_issues.rb | 47 - .../trigger_action.rb | 47 - ....shopping.merchant.issueresolution.v1.json | 175 - ...ate_product_statuses_service_paths_test.rb | 55 - ...gate_product_statuses_service_rest_test.rb | 156 - ...aggregate_product_statuses_service_test.rb | 173 - .../v1/issue_resolution_service_paths_test.rb | 67 - .../v1/issue_resolution_service_rest_test.rb | 269 -- .../v1/issue_resolution_service_test.rb | 294 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.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 - ...g-merchant-issue_resolution-v1beta.gemspec | 29 - ...opping-merchant-issue_resolution-v1beta.rb | 21 - .../merchant/issue_resolution/v1beta.rb | 48 - .../aggregate_product_statuses_service.rb | 57 - .../client.rb | 508 --- .../credentials.rb | 49 - .../paths.rb | 49 - .../rest.rb | 54 - .../rest/client.rb | 458 --- .../rest/service_stub.rb | 144 - .../v1beta/issue_resolution_service.rb | 58 - .../v1beta/issue_resolution_service/client.rb | 709 ---- .../issue_resolution_service/credentials.rb | 49 - .../v1beta/issue_resolution_service/paths.rb | 66 - .../v1beta/issue_resolution_service/rest.rb | 55 - .../issue_resolution_service/rest/client.rb | 645 ---- .../rest/service_stub.rb | 269 -- .../merchant/issue_resolution/v1beta/rest.rb | 40 - .../issue_resolution/v1beta/version.rb | 30 - .../v1beta/aggregateproductstatuses_pb.rb | 35 - .../aggregateproductstatuses_services_pb.rb | 50 - .../v1beta/issueresolution_pb.rb | 66 - .../v1beta/issueresolution_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 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../v1beta/aggregateproductstatuses.rb | 173 - .../issueresolution/v1beta/issueresolution.rb | 954 ----- .../proto_docs/google/shopping/type/types.rb | 248 -- .../snippets/Gemfile | 32 - .../list_aggregate_product_statuses.rb | 51 - .../render_account_issues.rb | 47 - .../render_product_issues.rb | 47 - .../trigger_action.rb | 47 - ...pping.merchant.issueresolution.v1beta.json | 175 - ...ate_product_statuses_service_paths_test.rb | 55 - ...gate_product_statuses_service_rest_test.rb | 156 - ...aggregate_product_statuses_service_test.rb | 173 - .../issue_resolution_service_paths_test.rb | 67 - .../issue_resolution_service_rest_test.rb | 269 -- .../v1beta/issue_resolution_service_test.rb | 294 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../google-shopping-merchant-lfp-v1/.toys.rb | 28 - .../google-shopping-merchant-lfp-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-shopping-merchant-lfp-v1/Gemfile | 14 - .../LICENSE.md | 201 - .../google-shopping-merchant-lfp-v1/README.md | 154 - .../google-shopping-merchant-lfp-v1/Rakefile | 169 - .../gapic_metadata.json | 80 - .../google-shopping-merchant-lfp-v1.gemspec | 29 - .../lib/google-shopping-merchant-lfp-v1.rb | 21 - .../lib/google/shopping/merchant/lfp/v1.rb | 50 - .../merchant/lfp/v1/lfp_inventory_service.rb | 59 - .../lfp/v1/lfp_inventory_service/client.rb | 488 --- .../v1/lfp_inventory_service/credentials.rb | 49 - .../lfp/v1/lfp_inventory_service/paths.rb | 70 - .../lfp/v1/lfp_inventory_service/rest.rb | 56 - .../v1/lfp_inventory_service/rest/client.rb | 438 --- .../rest/service_stub.rb | 145 - .../lfp/v1/lfp_merchant_state_service.rb | 62 - .../v1/lfp_merchant_state_service/client.rb | 488 --- .../lfp_merchant_state_service/credentials.rb | 49 - .../v1/lfp_merchant_state_service/paths.rb | 52 - .../lfp/v1/lfp_merchant_state_service/rest.rb | 59 - .../lfp_merchant_state_service/rest/client.rb | 438 --- .../rest/service_stub.rb | 144 - .../merchant/lfp/v1/lfp_sale_service.rb | 59 - .../lfp/v1/lfp_sale_service/client.rb | 486 --- .../lfp/v1/lfp_sale_service/credentials.rb | 49 - .../merchant/lfp/v1/lfp_sale_service/paths.rb | 52 - .../merchant/lfp/v1/lfp_sale_service/rest.rb | 56 - .../lfp/v1/lfp_sale_service/rest/client.rb | 436 --- .../v1/lfp_sale_service/rest/service_stub.rb | 145 - .../merchant/lfp/v1/lfp_store_service.rb | 59 - .../lfp/v1/lfp_store_service/client.rb | 788 ---- .../lfp/v1/lfp_store_service/credentials.rb | 49 - .../lfp/v1/lfp_store_service/paths.rb | 68 - .../merchant/lfp/v1/lfp_store_service/rest.rb | 56 - .../lfp/v1/lfp_store_service/rest/client.rb | 717 ---- .../v1/lfp_store_service/rest/service_stub.rb | 328 -- .../merchant/lfp/v1/lfpinventory_pb.rb | 31 - .../lfp/v1/lfpinventory_services_pb.rb | 51 - .../merchant/lfp/v1/lfpmerchantstate_pb.rb | 35 - .../lfp/v1/lfpmerchantstate_services_pb.rb | 52 - .../shopping/merchant/lfp/v1/lfpsale_pb.rb | 32 - .../merchant/lfp/v1/lfpsale_services_pb.rb | 49 - .../shopping/merchant/lfp/v1/lfpstore_pb.rb | 35 - .../merchant/lfp/v1/lfpstore_services_pb.rb | 57 - .../google/shopping/merchant/lfp/v1/rest.rb | 42 - .../shopping/merchant/lfp/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/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../shopping/merchant/lfp/v1/lfpinventory.rb | 113 - .../merchant/lfp/v1/lfpmerchantstate.rb | 181 - .../shopping/merchant/lfp/v1/lfpsale.rb | 96 - .../shopping/merchant/lfp/v1/lfpstore.rb | 185 - .../proto_docs/google/shopping/type/types.rb | 248 -- .../snippets/Gemfile | 32 - .../insert_lfp_inventory.rb | 47 - .../get_lfp_merchant_state.rb | 47 - .../lfp_sale_service/insert_lfp_sale.rb | 47 - .../lfp_store_service/delete_lfp_store.rb | 47 - .../lfp_store_service/get_lfp_store.rb | 47 - .../lfp_store_service/insert_lfp_store.rb | 47 - .../lfp_store_service/list_lfp_stores.rb | 51 - ...adata_google.shopping.merchant.lfp.v1.json | 295 -- .../v1/lfp_inventory_service_paths_test.rb | 67 - .../lfp/v1/lfp_inventory_service_rest_test.rb | 154 - .../lfp/v1/lfp_inventory_service_test.rb | 164 - .../lfp_merchant_state_service_paths_test.rb | 55 - .../lfp_merchant_state_service_rest_test.rb | 153 - .../lfp/v1/lfp_merchant_state_service_test.rb | 162 - .../lfp/v1/lfp_sale_service_paths_test.rb | 55 - .../lfp/v1/lfp_sale_service_rest_test.rb | 154 - .../merchant/lfp/v1/lfp_sale_service_test.rb | 164 - .../lfp/v1/lfp_store_service_paths_test.rb | 67 - .../lfp/v1/lfp_store_service_rest_test.rb | 319 -- .../merchant/lfp/v1/lfp_store_service_test.rb | 349 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.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 | 80 - ...oogle-shopping-merchant-lfp-v1beta.gemspec | 29 - .../google-shopping-merchant-lfp-v1beta.rb | 21 - .../google/shopping/merchant/lfp/v1beta.rb | 50 - .../lfp/v1beta/lfp_inventory_service.rb | 59 - .../v1beta/lfp_inventory_service/client.rb | 488 --- .../lfp_inventory_service/credentials.rb | 49 - .../lfp/v1beta/lfp_inventory_service/paths.rb | 70 - .../lfp/v1beta/lfp_inventory_service/rest.rb | 56 - .../lfp_inventory_service/rest/client.rb | 438 --- .../rest/service_stub.rb | 145 - .../lfp/v1beta/lfp_merchant_state_service.rb | 59 - .../lfp_merchant_state_service/client.rb | 484 --- .../lfp_merchant_state_service/credentials.rb | 49 - .../lfp_merchant_state_service/paths.rb | 52 - .../v1beta/lfp_merchant_state_service/rest.rb | 56 - .../lfp_merchant_state_service/rest/client.rb | 434 --- .../rest/service_stub.rb | 144 - .../merchant/lfp/v1beta/lfp_sale_service.rb | 59 - .../lfp/v1beta/lfp_sale_service/client.rb | 486 --- .../v1beta/lfp_sale_service/credentials.rb | 49 - .../lfp/v1beta/lfp_sale_service/paths.rb | 52 - .../lfp/v1beta/lfp_sale_service/rest.rb | 56 - .../v1beta/lfp_sale_service/rest/client.rb | 436 --- .../lfp_sale_service/rest/service_stub.rb | 145 - .../merchant/lfp/v1beta/lfp_store_service.rb | 59 - .../lfp/v1beta/lfp_store_service/client.rb | 788 ---- .../v1beta/lfp_store_service/credentials.rb | 49 - .../lfp/v1beta/lfp_store_service/paths.rb | 68 - .../lfp/v1beta/lfp_store_service/rest.rb | 56 - .../v1beta/lfp_store_service/rest/client.rb | 717 ---- .../lfp_store_service/rest/service_stub.rb | 328 -- .../merchant/lfp/v1beta/lfpinventory_pb.rb | 31 - .../lfp/v1beta/lfpinventory_services_pb.rb | 51 - .../lfp/v1beta/lfpmerchantstate_pb.rb | 35 - .../v1beta/lfpmerchantstate_services_pb.rb | 49 - .../merchant/lfp/v1beta/lfpsale_pb.rb | 32 - .../lfp/v1beta/lfpsale_services_pb.rb | 49 - .../merchant/lfp/v1beta/lfpstore_pb.rb | 35 - .../lfp/v1beta/lfpstore_services_pb.rb | 57 - .../shopping/merchant/lfp/v1beta/rest.rb | 42 - .../shopping/merchant/lfp/v1beta/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/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../merchant/lfp/v1beta/lfpinventory.rb | 113 - .../merchant/lfp/v1beta/lfpmerchantstate.rb | 179 - .../shopping/merchant/lfp/v1beta/lfpsale.rb | 96 - .../shopping/merchant/lfp/v1beta/lfpstore.rb | 185 - .../proto_docs/google/shopping/type/types.rb | 248 -- .../snippets/Gemfile | 32 - .../insert_lfp_inventory.rb | 47 - .../get_lfp_merchant_state.rb | 47 - .../lfp_sale_service/insert_lfp_sale.rb | 47 - .../lfp_store_service/delete_lfp_store.rb | 47 - .../lfp_store_service/get_lfp_store.rb | 47 - .../lfp_store_service/insert_lfp_store.rb | 47 - .../lfp_store_service/list_lfp_stores.rb | 51 - ...a_google.shopping.merchant.lfp.v1beta.json | 295 -- .../lfp_inventory_service_paths_test.rb | 67 - .../v1beta/lfp_inventory_service_rest_test.rb | 154 - .../lfp/v1beta/lfp_inventory_service_test.rb | 164 - .../lfp_merchant_state_service_paths_test.rb | 55 - .../lfp_merchant_state_service_rest_test.rb | 153 - .../v1beta/lfp_merchant_state_service_test.rb | 162 - .../lfp/v1beta/lfp_sale_service_paths_test.rb | 55 - .../lfp/v1beta/lfp_sale_service_rest_test.rb | 154 - .../lfp/v1beta/lfp_sale_service_test.rb | 164 - .../v1beta/lfp_store_service_paths_test.rb | 67 - .../lfp/v1beta/lfp_store_service_rest_test.rb | 319 -- .../lfp/v1beta/lfp_store_service_test.rb | 349 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.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 | 48 - ...shopping-merchant-notifications-v1.gemspec | 28 - ...ogle-shopping-merchant-notifications-v1.rb | 21 - .../shopping/merchant/notifications/v1.rb | 47 - .../v1/notifications_api_service.rb | 57 - .../v1/notifications_api_service/client.rb | 988 ----- .../notifications_api_service/credentials.rb | 49 - .../v1/notifications_api_service/paths.rb | 83 - .../v1/notifications_api_service/rest.rb | 54 - .../notifications_api_service/rest/client.rb | 903 ----- .../rest/service_stub.rb | 451 --- .../notifications/v1/notificationsapi_pb.rb | 39 - .../v1/notificationsapi_services_pb.rb | 81 - .../merchant/notifications/v1/rest.rb | 39 - .../merchant/notifications/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 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../notifications/v1/notificationsapi.rb | 184 - .../snippets/Gemfile | 32 - .../create_notification_subscription.rb | 47 - .../delete_notification_subscription.rb | 47 - .../get_notification_subscription.rb | 47 - ...otification_subscription_health_metrics.rb | 47 - .../list_notification_subscriptions.rb | 51 - .../update_notification_subscription.rb | 47 - ...le.shopping.merchant.notifications.v1.json | 255 -- .../notifications_api_service_paths_test.rb | 79 - .../v1/notifications_api_service_rest_test.rb | 427 --- .../v1/notifications_api_service_test.rb | 465 --- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.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 | 43 - ...ping-merchant-notifications-v1beta.gemspec | 29 - ...-shopping-merchant-notifications-v1beta.rb | 21 - .../shopping/merchant/notifications/v1beta.rb | 47 - .../v1beta/notifications_api_service.rb | 57 - .../notifications_api_service/client.rb | 880 ----- .../notifications_api_service/credentials.rb | 49 - .../v1beta/notifications_api_service/paths.rb | 66 - .../v1beta/notifications_api_service/rest.rb | 54 - .../notifications_api_service/rest/client.rb | 802 ---- .../rest/service_stub.rb | 390 -- .../v1beta/notificationsapi_pb.rb | 42 - .../v1beta/notificationsapi_services_pb.rb | 66 - .../merchant/notifications/v1beta/rest.rb | 39 - .../merchant/notifications/v1beta/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 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../notifications/v1beta/notificationsapi.rb | 219 -- .../proto_docs/google/shopping/type/types.rb | 248 -- .../snippets/Gemfile | 32 - .../create_notification_subscription.rb | 47 - .../delete_notification_subscription.rb | 47 - .../get_notification_subscription.rb | 47 - .../list_notification_subscriptions.rb | 51 - .../update_notification_subscription.rb | 47 - ...hopping.merchant.notifications.v1beta.json | 215 -- .../notifications_api_service_paths_test.rb | 67 - .../notifications_api_service_rest_test.rb | 373 -- .../v1beta/notifications_api_service_test.rb | 407 -- .../test/helper.rb | 26 - 2064 files changed, 2914 insertions(+), 345879 deletions(-) delete mode 100644 owl-bot-staging/google-iam-v3/.gitignore delete mode 100644 owl-bot-staging/google-iam-v3/.repo-metadata.json delete mode 100644 owl-bot-staging/google-iam-v3/.rubocop.yml delete mode 100644 owl-bot-staging/google-iam-v3/.toys.rb delete mode 100644 owl-bot-staging/google-iam-v3/.yardopts delete mode 100644 owl-bot-staging/google-iam-v3/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-iam-v3/CHANGELOG.md delete mode 100644 owl-bot-staging/google-iam-v3/Gemfile delete mode 100644 owl-bot-staging/google-iam-v3/LICENSE.md delete mode 100644 owl-bot-staging/google-iam-v3/README.md delete mode 100644 owl-bot-staging/google-iam-v3/Rakefile delete mode 100644 owl-bot-staging/google-iam-v3/gapic_metadata.json delete mode 100644 owl-bot-staging/google-iam-v3/google-iam-v3.gemspec delete mode 100644 owl-bot-staging/google-iam-v3/lib/google-iam-v3.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/README.md delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/Gemfile delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/helper.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/.gitignore delete mode 100644 owl-bot-staging/google-iam-v3beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-iam-v3beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-iam-v3beta/.toys.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/.yardopts delete mode 100644 owl-bot-staging/google-iam-v3beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-iam-v3beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-iam-v3beta/Gemfile delete mode 100644 owl-bot-staging/google-iam-v3beta/LICENSE.md delete mode 100644 owl-bot-staging/google-iam-v3beta/README.md delete mode 100644 owl-bot-staging/google-iam-v3beta/Rakefile delete mode 100644 owl-bot-staging/google-iam-v3beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/helper.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.gitignore delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.yardopts delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/Gemfile delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/README.md delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/Rakefile delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.gitignore delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.toys.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.yardopts delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/README.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/Rakefile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_services_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_vehicles_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/tasks_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.gitignore delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.toys.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.yardopts delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/Gemfile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/README.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/Rakefile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-css-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-css-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-css-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-css-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-css-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-css-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-css-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-css-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-css-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-css-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-v1.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/google-shopping-merchant-accounts-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google-shopping-merchant-accounts-v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accessright_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkoutsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkoutsettings_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/customerservice_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/phoneverificationstate_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservicekind_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/verificationmailsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accessright.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountissue.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountrelationships.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountservices.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/autofeedsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/automaticimprovements.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessidentity.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessinfo.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/checkoutsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/customerservice.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/developerregistration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/emailpreferences.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/gbpaccounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/lfpproviders.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/omnichannelsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/phoneverificationstate.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/programs.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/regions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/shippingsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservice.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofserviceagreementstate.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservicekind.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/verificationmailsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/datetime.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/latlng.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/phone_number.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/postal_address.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_issue_service/list_account_issues.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/get_account_relationship.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/list_account_relationships.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/update_account_relationship.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/approve_account_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/get_account_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/list_account_services.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/propose_account_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/reject_account_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_and_configure_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_test_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/delete_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/get_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_sub_accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/update_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/get_autofeed_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/update_autofeed_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/get_automatic_improvements.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/update_automatic_improvements.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_identity_service/get_business_identity.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_identity_service/update_business_identity.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_info_service/get_business_info.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_info_service/update_business_info.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/create_checkout_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/delete_checkout_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/get_checkout_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/update_checkout_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_account_for_gcp_registration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_developer_registration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/register_gcp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/unregister_gcp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/get_email_preferences.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/update_email_preferences.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/link_gbp_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/list_gbp_accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/claim_homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/get_homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/unclaim_homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/update_homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/find_lfp_providers.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/link_lfp_provider.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/create_omnichannel_setting.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/get_omnichannel_setting.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/list_omnichannel_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/request_inventory_verification.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/update_omnichannel_setting.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/create_online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/delete_online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/get_online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/list_online_return_policies.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/disable_program.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/enable_program.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/get_program.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/list_programs.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_create_regions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_delete_regions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_update_regions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/create_region.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/delete_region.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/get_region.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/list_regions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/update_region.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/get_shipping_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/insert_shipping_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/accept_terms_of_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/get_terms_of_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/create_user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/delete_user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/get_user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/list_users.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/update_user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/verify_self.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/tax_rule_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/google-shopping-merchant-data_sources-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google-shopping-merchant-data_sources-v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasourcetypes_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileinputs_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/dayofweek.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/create_data_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/delete_data_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/fetch_data_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/get_data_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/list_data_sources.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/update_data_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/file_uploads_service/get_file_upload.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/google-shopping-merchant-data_sources-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google-shopping-merchant-data_sources-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasourcetypes_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/fileinputs_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/fileuploads_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/fileuploads_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasources.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasourcetypes.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileinputs.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileuploads.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/dayofweek.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/timeofday.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/create_data_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/delete_data_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/fetch_data_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/get_data_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/list_data_sources.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/update_data_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/file_uploads_service/get_file_upload.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/snippet_metadata_google.shopping.merchant.datasources.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/google-shopping-merchant-inventories-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google-shopping-merchant-inventories-v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/inventories_common_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/delete_local_inventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/insert_local_inventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/list_local_inventories.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/delete_regional_inventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/insert_regional_inventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/list_regional_inventories.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/snippet_metadata_google.shopping.merchant.inventories.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/google-shopping-merchant-issue_resolution-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google-shopping-merchant-issue_resolution-v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_account_issues.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_product_issues.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/trigger_action.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google-shopping-merchant-issue_resolution-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_account_issues.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_product_issues.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/trigger_action.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/google-shopping-merchant-lfp-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google-shopping-merchant-lfp-v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_inventory_service/insert_lfp_inventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_sale_service/insert_lfp_sale.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/delete_lfp_store.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/get_lfp_store.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/insert_lfp_store.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/list_lfp_stores.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpmerchantstate.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/snippet_metadata_google.shopping.merchant.lfp.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/google-shopping-merchant-notifications-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google-shopping-merchant-notifications-v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/shopping/merchant/notifications/v1/notificationsapi.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/create_notification_subscription.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/delete_notification_subscription.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription_health_metrics.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/list_notification_subscriptions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/update_notification_subscription.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google-shopping-merchant-notifications-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/create_notification_subscription.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/delete_notification_subscription.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/get_notification_subscription.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/list_notification_subscriptions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/update_notification_subscription.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/snippet_metadata_google.shopping.merchant.notifications.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/helper.rb diff --git a/google-iam-v3/proto_docs/google/api/client.rb b/google-iam-v3/proto_docs/google/api/client.rb index c6b6b60729c9..25b227e61cdc 100644 --- a/google-iam-v3/proto_docs/google/api/client.rb +++ b/google-iam-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-iam-v3beta/proto_docs/google/api/client.rb b/google-iam-v3beta/proto_docs/google/api/client.rb index c6b6b60729c9..25b227e61cdc 100644 --- a/google-iam-v3beta/proto_docs/google/api/client.rb +++ b/google-iam-v3beta/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-identity-access_context_manager-v1/proto_docs/google/api/client.rb b/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb +++ b/google-identity-access_context_manager-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/client.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/client.rb index 483a6510978e..a8b1b06d1cad 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/client.rb +++ b/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb index 0a6697baa4a9..497560392276 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb @@ -49,9 +49,13 @@ module Api # app_profile_id: profiles/prof_qux # } # - # The routing header consists of one or multiple key-value pairs. Every key - # and value must be percent-encoded, and joined together in the format of - # `key1=value1&key2=value2`. + # The routing header consists of one or multiple key-value pairs. The order of + # the key-value pairs is undefined, the order of the `routing_parameters` in + # the `RoutingRule` only matters for the evaluation order of the path + # templates when `field` is the same. See the examples below for more details. + # + # Every key and value in the routing header must be percent-encoded, + # and joined together in the following format: `key1=value1&key2=value2`. # The examples below skip the percent-encoding for readability. # # Example 1 diff --git a/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb b/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb index 483a6510978e..a8b1b06d1cad 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb +++ b/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/routing.rb b/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb index 0a6697baa4a9..497560392276 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb @@ -49,9 +49,13 @@ module Api # app_profile_id: profiles/prof_qux # } # - # The routing header consists of one or multiple key-value pairs. Every key - # and value must be percent-encoded, and joined together in the format of - # `key1=value1&key2=value2`. + # The routing header consists of one or multiple key-value pairs. The order of + # the key-value pairs is undefined, the order of the `routing_parameters` in + # the `RoutingRule` only matters for the evaluation order of the path + # templates when `field` is the same. See the examples below for more details. + # + # Every key and value in the routing header must be percent-encoded, + # and joined together in the following format: `key1=value1&key2=value2`. # The examples below skip the percent-encoding for readability. # # Example 1 diff --git a/google-shopping-css-v1/proto_docs/google/api/client.rb b/google-shopping-css-v1/proto_docs/google/api/client.rb index 483a6510978e..a8b1b06d1cad 100644 --- a/google-shopping-css-v1/proto_docs/google/api/client.rb +++ b/google-shopping-css-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-shopping-merchant-accounts-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/api/client.rb index c6b6b60729c9..25b227e61cdc 100644 --- a/google-shopping-merchant-accounts-v1/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb index 483a6510978e..a8b1b06d1cad 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb index c6b6b60729c9..25b227e61cdc 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb index 483a6510978e..a8b1b06d1cad 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-data_sources-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/api/client.rb index c6b6b60729c9..25b227e61cdc 100644 --- a/google-shopping-merchant-data_sources-v1/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/client.rb index 483a6510978e..a8b1b06d1cad 100644 --- a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-inventories-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/api/client.rb index c6b6b60729c9..25b227e61cdc 100644 --- a/google-shopping-merchant-inventories-v1/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb index 44c6bee7f2e5..97193034f37c 100644 --- a/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-issue_resolution-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/client.rb index c6b6b60729c9..25b227e61cdc 100644 --- a/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb index c6b6b60729c9..25b227e61cdc 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-lfp-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/api/client.rb index c6b6b60729c9..25b227e61cdc 100644 --- a/google-shopping-merchant-lfp-v1/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb index 483a6510978e..a8b1b06d1cad 100644 --- a/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-notifications-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-notifications-v1/proto_docs/google/api/client.rb index c6b6b60729c9..25b227e61cdc 100644 --- a/google-shopping-merchant-notifications-v1/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb index 483a6510978e..a8b1b06d1cad 100644 --- a/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-notifications-v1beta/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-iam-v3/.gitignore b/owl-bot-staging/google-iam-v3/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3/.repo-metadata.json b/owl-bot-staging/google-iam-v3/.repo-metadata.json deleted file mode 100644 index 99b5e3acd3ae..000000000000 --- a/owl-bot-staging/google-iam-v3/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "iam.googleapis.com", - "api_shortname": "iam", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-iam-v3/latest", - "distribution_name": "google-iam-v3", - "is_cloud": true, - "language": "ruby", - "name": "iam", - "name_pretty": "Identity and Access Management (IAM) V3 API", - "product_documentation": "https://cloud.google.com/iam/docs/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3 is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/iam/docs/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-iam-v3/.rubocop.yml b/owl-bot-staging/google-iam-v3/.rubocop.yml deleted file mode 100644 index a513a8400ebb..000000000000 --- a/owl-bot-staging/google-iam-v3/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-iam-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-iam-v3.rb" diff --git a/owl-bot-staging/google-iam-v3/.toys.rb b/owl-bot-staging/google-iam-v3/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3/.yardopts b/owl-bot-staging/google-iam-v3/.yardopts deleted file mode 100644 index b0b7998f4801..000000000000 --- a/owl-bot-staging/google-iam-v3/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Identity and Access Management (IAM) 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-iam-v3/AUTHENTICATION.md b/owl-bot-staging/google-iam-v3/AUTHENTICATION.md deleted file mode 100644 index 6530963bb8fa..000000000000 --- a/owl-bot-staging/google-iam-v3/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-iam-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-iam-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/iam/v3" - -client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/iam/v3" - -::Google::Iam::V3::PolicyBindings::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Iam::V3::PolicyBindings::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-iam-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/iam/v3" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Iam::V3::PolicyBindings::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-iam-v3/CHANGELOG.md b/owl-bot-staging/google-iam-v3/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-iam-v3/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-iam-v3/Gemfile b/owl-bot-staging/google-iam-v3/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3/LICENSE.md b/owl-bot-staging/google-iam-v3/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3/README.md b/owl-bot-staging/google-iam-v3/README.md deleted file mode 100644 index 4d8c6b082b47..000000000000 --- a/owl-bot-staging/google-iam-v3/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Identity and Access Management (IAM) V3 API - -Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. - -Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials 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 Identity and Access Management (IAM) V3 API. Most users should consider using -the main client gem, -[google-iam](https://rubygems.org/gems/google-iam). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-iam-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/iam.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/iam/v3" - -client = ::Google::Iam::V3::PolicyBindings::Client.new -request = ::Google::Iam::V3::CreatePolicyBindingRequest.new # (request fields as keyword arguments...) -response = client.create_policy_binding request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-iam-v3/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/iam/docs/overview) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/iam/v3" -require "logger" - -client = ::Google::Iam::V3::PolicyBindings::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-iam`, -and lower-level _versioned_ client libraries with names such as -`google-iam-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-iam`. -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-iam-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-iam-v3/Rakefile b/owl-bot-staging/google-iam-v3/Rakefile deleted file mode 100644 index 2c984d93b8d7..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3 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/iam/v3/policy_bindings/credentials" - ::Google::Iam::V3::PolicyBindings::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-iam-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-iam-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-iam-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-iam-v3 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-iam-v3" - header "google-iam-v3 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-iam-v3 yard", "*" - Rake::Task[:yard].invoke - header "google-iam-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-iam-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-iam-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-iam-v3/gapic_metadata.json b/owl-bot-staging/google-iam-v3/gapic_metadata.json deleted file mode 100644 index 76d45f6a44df..000000000000 --- a/owl-bot-staging/google-iam-v3/gapic_metadata.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.iam.v3", - "libraryPackage": "::Google::Iam::V3", - "services": { - "PolicyBindings": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V3::PolicyBindings::Client", - "rpcs": { - "CreatePolicyBinding": { - "methods": [ - "create_policy_binding" - ] - }, - "GetPolicyBinding": { - "methods": [ - "get_policy_binding" - ] - }, - "UpdatePolicyBinding": { - "methods": [ - "update_policy_binding" - ] - }, - "DeletePolicyBinding": { - "methods": [ - "delete_policy_binding" - ] - }, - "ListPolicyBindings": { - "methods": [ - "list_policy_bindings" - ] - }, - "SearchTargetPolicyBindings": { - "methods": [ - "search_target_policy_bindings" - ] - } - } - } - } - }, - "PrincipalAccessBoundaryPolicies": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client", - "rpcs": { - "CreatePrincipalAccessBoundaryPolicy": { - "methods": [ - "create_principal_access_boundary_policy" - ] - }, - "GetPrincipalAccessBoundaryPolicy": { - "methods": [ - "get_principal_access_boundary_policy" - ] - }, - "UpdatePrincipalAccessBoundaryPolicy": { - "methods": [ - "update_principal_access_boundary_policy" - ] - }, - "DeletePrincipalAccessBoundaryPolicy": { - "methods": [ - "delete_principal_access_boundary_policy" - ] - }, - "ListPrincipalAccessBoundaryPolicies": { - "methods": [ - "list_principal_access_boundary_policies" - ] - }, - "SearchPrincipalAccessBoundaryPolicyBindings": { - "methods": [ - "search_principal_access_boundary_policy_bindings" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-iam-v3/google-iam-v3.gemspec b/owl-bot-staging/google-iam-v3/google-iam-v3.gemspec deleted file mode 100644 index a485d001dc45..000000000000 --- a/owl-bot-staging/google-iam-v3/google-iam-v3.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/iam/v3/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-iam-v3" - gem.version = Google::Iam::V3::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3 is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details." - gem.summary = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials 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-iam-v3/lib/google-iam-v3.rb b/owl-bot-staging/google-iam-v3/lib/google-iam-v3.rb deleted file mode 100644 index 567b503c671b..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google-iam-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/iam/v3" diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb deleted file mode 100644 index 93137c725614..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v3/policy_bindings" -require "google/iam/v3/principal_access_boundary_policies" -require "google/iam/v3/version" - -module Google - module Iam - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/iam/v3" - # client = ::Google::Iam::V3::PolicyBindings::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/iam/v3" - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new - # - module V3 - end - end -end - -helper_path = ::File.join __dir__, "v3", "_helpers.rb" -require "google/iam/v3/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb deleted file mode 100644 index d0c9141ce226..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/operation_metadata.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/iam/v3/operation_metadata.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x42\x84\x01\n\x11\x63om.google.iam.v3B\x16OperationMetadataProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.OperationMetadata").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb deleted file mode 100644 index d9f06b7d7158..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/policy_binding_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n,google/iam/v3/policy_binding_resources.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xd6\x07\n\rPolicyBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32-.google.iam.v3.PolicyBinding.AnnotationsEntryB\x03\xe0\x41\x01\x12;\n\x06target\x18\x06 \x01(\x0b\x32#.google.iam.v3.PolicyBinding.TargetB\x06\xe0\x41\x05\xe0\x41\x02\x12\x41\n\x0bpolicy_kind\x18\x0b \x01(\x0e\x32\'.google.iam.v3.PolicyBinding.PolicyKindB\x03\xe0\x41\x05\x12\x16\n\x06policy\x18\x07 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x17\n\npolicy_uid\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12)\n\tcondition\x18\x08 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\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\x1a\x30\n\x06Target\x12\x1c\n\rprincipal_set\x18\x01 \x01(\tB\x03\xe0\x41\x05H\x00\x42\x08\n\x06target\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"H\n\nPolicyKind\x12\x1b\n\x17POLICY_KIND_UNSPECIFIED\x10\x00\x12\x1d\n\x19PRINCIPAL_ACCESS_BOUNDARY\x10\x01:\xa8\x02\xea\x41\xa4\x02\n iam.googleapis.com/PolicyBinding\x12Qorganizations/{organization}/locations/{location}/policyBindings/{policy_binding}\x12\x45\x66olders/{folder}/locations/{location}/policyBindings/{policy_binding}\x12Gprojects/{project}/locations/{location}/policyBindings/{policy_binding}*\x0epolicyBindings2\rpolicyBindingB\x89\x01\n\x11\x63om.google.iam.v3B\x1bPolicyBindingResourcesProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - PolicyBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PolicyBinding").msgclass - PolicyBinding::Target = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PolicyBinding.Target").msgclass - PolicyBinding::PolicyKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PolicyBinding.PolicyKind").enummodule - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.rb deleted file mode 100644 index 89b89d81de14..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.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/iam/v3/version" - -require "google/iam/v3/policy_bindings/credentials" -require "google/iam/v3/policy_bindings/paths" -require "google/iam/v3/policy_bindings/operations" -require "google/iam/v3/policy_bindings/client" -require "google/iam/v3/policy_bindings/rest" - -module Google - module Iam - module V3 - ## - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v3/policy_bindings" - # client = ::Google::Iam::V3::PolicyBindings::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v3/policy_bindings/rest" - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new - # - module PolicyBindings - end - end - end -end - -helper_path = ::File.join __dir__, "policy_bindings", "helpers.rb" -require "google/iam/v3/policy_bindings/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb deleted file mode 100644 index f857a396e033..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb +++ /dev/null @@ -1,1147 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/iam/v3/policy_bindings_service_pb" -require "google/cloud/location" - -module Google - module Iam - module V3 - module PolicyBindings - ## - # Client for the PolicyBindings service. - # - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :policy_bindings_stub - - ## - # Configure the PolicyBindings Client class. - # - # See {::Google::Iam::V3::PolicyBindings::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PolicyBindings clients - # ::Google::Iam::V3::PolicyBindings::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", "Iam", "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.create_policy_binding.timeout = 30.0 - - default_config.rpcs.get_policy_binding.timeout = 60.0 - default_config.rpcs.get_policy_binding.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_policy_binding.timeout = 30.0 - - default_config.rpcs.delete_policy_binding.timeout = 30.0 - - default_config.rpcs.list_policy_bindings.timeout = 60.0 - default_config.rpcs.list_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_target_policy_bindings.timeout = 60.0 - default_config.rpcs.search_target_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PolicyBindings 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::Iam::V3::PolicyBindings::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 - @policy_bindings_stub.universe_domain - end - - ## - # Create a new PolicyBindings client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PolicyBindings 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/iam/v3/policy_bindings_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 - - @policy_bindings_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V3::PolicyBindings::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 - ) - - @policy_bindings_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 = @policy_bindings_stub.endpoint - config.universe_domain = @policy_bindings_stub.universe_domain - config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3::PolicyBindings::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 - @policy_bindings_stub.logger - end - - # Service calls - - ## - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # Once the binding is created, the policy is applied to the target. - # - # @overload create_policy_binding(request, options = nil) - # Pass arguments to `create_policy_binding` via a request object, either of type - # {::Google::Iam::V3::CreatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::CreatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) - # Pass arguments to `create_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param policy_binding_id [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] - # Required. The policy binding to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::CreatePolicyBindingRequest.new - # - # # Call the create_policy_binding method. - # result = client.create_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePolicyBindingRequest - - # Converts hash and nil to 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_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::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_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :create_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a policy binding. - # - # @overload get_policy_binding(request, options = nil) - # Pass arguments to `get_policy_binding` via a request object, either of type - # {::Google::Iam::V3::GetPolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::GetPolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_policy_binding(name: nil) - # Pass arguments to `get_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V3::PolicyBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V3::PolicyBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::GetPolicyBindingRequest.new - # - # # Call the get_policy_binding method. - # result = client.get_policy_binding request - # - # # The returned object is of type Google::Iam::V3::PolicyBinding. - # p result - # - def get_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::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_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :get_policy_binding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update, and the IAM permission to remove the existing policy - # from the binding. Target is immutable and cannot be updated. Once the - # binding is updated, the new policy is applied to the target. - # - # @overload update_policy_binding(request, options = nil) - # Pass arguments to `update_policy_binding` via a request object, either of type - # {::Google::Iam::V3::UpdatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::UpdatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::UpdatePolicyBindingRequest.new - # - # # Call the update_policy_binding method. - # result = client.update_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePolicyBindingRequest - - # Converts hash and nil to 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_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::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.policy_binding&.name - header_params["policy_binding.name"] = request.policy_binding.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :update_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # Once the binding is deleted, the policy no longer applies to the target. - # - # @overload delete_policy_binding(request, options = nil) - # Pass arguments to `delete_policy_binding` via a request object, either of type - # {::Google::Iam::V3::DeletePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::DeletePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) - # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @param etag [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::DeletePolicyBindingRequest.new - # - # # Call the delete_policy_binding method. - # result = client.delete_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::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_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :delete_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists policy bindings. - # - # @overload list_policy_bindings(request, options = nil) - # Pass arguments to `list_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::ListPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::ListPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::ListPolicyBindingsRequest.new - # - # # Call the list_policy_bindings method. - # result = client.list_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def list_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPolicyBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::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_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :list_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - # - # @overload search_target_policy_bindings(request, options = nil) - # Pass arguments to `search_target_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::SearchTargetPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::SearchTargetPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil) - # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param target [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @param parent [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::SearchTargetPolicyBindingsRequest.new - # - # # Call the search_target_policy_bindings method. - # result = client.search_target_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def search_target_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchTargetPolicyBindingsRequest - - # Converts hash and nil to 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_target_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::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.search_target_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :search_target_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the PolicyBindings API. - # - # This class represents the configuration for PolicyBindings, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Iam::V3::PolicyBindings::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_policy_binding to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3::PolicyBindings::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Iam::V3::PolicyBindings::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 = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 PolicyBindings API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_policy_binding - ## - # RPC-specific configuration for `get_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy_binding - ## - # RPC-specific configuration for `update_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy_binding - ## - # RPC-specific configuration for `delete_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_policy_binding - ## - # RPC-specific configuration for `list_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_policy_bindings - ## - # RPC-specific configuration for `search_target_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_target_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding - @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config - get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding - @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config - update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding - @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config - delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding - @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config - list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings - @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config - search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings - @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb deleted file mode 100644 index a3f91a0fb8fe..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.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 "googleauth" - -module Google - module Iam - module V3 - module PolicyBindings - # Credentials for the PolicyBindings 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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb deleted file mode 100644 index b297fe6c84e2..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb +++ /dev/null @@ -1,839 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3 - module PolicyBindings - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::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::Iam::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::Iam::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::Iam::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::Iam::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 - - 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 = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb deleted file mode 100644 index cc9e0c46ea72..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb +++ /dev/null @@ -1,140 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 V3 - module PolicyBindings - # Path helper methods for the PolicyBindings API. - module Paths - ## - # Create a fully-qualified FolderLocation resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}` - # - # @param folder [String] - # @param location [String] - # - # @return [::String] - def folder_location_path folder:, location: - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/locations/#{location}" - 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 OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified PolicyBinding resource string. - # - # @overload policy_binding_path(organization:, location:, policy_binding:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/policyBindings/{policy_binding}` - # - # @param organization [String] - # @param location [String] - # @param policy_binding [String] - # - # @overload policy_binding_path(folder:, location:, policy_binding:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/policyBindings/{policy_binding}` - # - # @param folder [String] - # @param location [String] - # @param policy_binding [String] - # - # @overload policy_binding_path(project:, location:, policy_binding:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/policyBindings/{policy_binding}` - # - # @param project [String] - # @param location [String] - # @param policy_binding [String] - # - # @return [::String] - def policy_binding_path **args - resources = { - "location:organization:policy_binding" => (proc do |organization:, location:, policy_binding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/policyBindings/#{policy_binding}" - end), - "folder:location:policy_binding" => (proc do |folder:, location:, policy_binding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/policyBindings/#{policy_binding}" - end), - "location:policy_binding:project" => (proc do |project:, location:, policy_binding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/policyBindings/#{policy_binding}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb deleted file mode 100644 index 102093998bd5..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/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/iam/v3/version" - -require "google/iam/v3/policy_bindings/credentials" -require "google/iam/v3/policy_bindings/paths" -require "google/iam/v3/policy_bindings/rest/operations" -require "google/iam/v3/policy_bindings/rest/client" - -module Google - module Iam - module V3 - ## - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v3/policy_bindings/rest" - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new - # - module PolicyBindings - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v3/policy_bindings/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb deleted file mode 100644 index 1e2093cd2c95..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb +++ /dev/null @@ -1,1062 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/iam/v3/policy_bindings_service_pb" -require "google/iam/v3/policy_bindings/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V3 - module PolicyBindings - module Rest - ## - # REST client for the PolicyBindings service. - # - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :policy_bindings_stub - - ## - # Configure the PolicyBindings Client class. - # - # See {::Google::Iam::V3::PolicyBindings::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PolicyBindings clients - # ::Google::Iam::V3::PolicyBindings::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", "Iam", "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.create_policy_binding.timeout = 30.0 - - default_config.rpcs.get_policy_binding.timeout = 60.0 - default_config.rpcs.get_policy_binding.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_policy_binding.timeout = 30.0 - - default_config.rpcs.delete_policy_binding.timeout = 30.0 - - default_config.rpcs.list_policy_bindings.timeout = 60.0 - default_config.rpcs.list_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_target_policy_bindings.timeout = 60.0 - default_config.rpcs.search_target_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PolicyBindings 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::Iam::V3::PolicyBindings::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 - @policy_bindings_stub.universe_domain - end - - ## - # Create a new PolicyBindings REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PolicyBindings 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::Iam::V3::PolicyBindings::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 - - @policy_bindings_stub = ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @policy_bindings_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 = @policy_bindings_stub.endpoint - config.universe_domain = @policy_bindings_stub.universe_domain - config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3::PolicyBindings::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 - @policy_bindings_stub.logger - end - - # Service calls - - ## - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # Once the binding is created, the policy is applied to the target. - # - # @overload create_policy_binding(request, options = nil) - # Pass arguments to `create_policy_binding` via a request object, either of type - # {::Google::Iam::V3::CreatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::CreatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) - # Pass arguments to `create_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param policy_binding_id [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] - # Required. The policy binding to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::CreatePolicyBindingRequest.new - # - # # Call the create_policy_binding method. - # result = client.create_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePolicyBindingRequest - - # Converts hash and nil to an 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_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::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_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.create_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a policy binding. - # - # @overload get_policy_binding(request, options = nil) - # Pass arguments to `get_policy_binding` via a request object, either of type - # {::Google::Iam::V3::GetPolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::GetPolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_policy_binding(name: nil) - # Pass arguments to `get_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V3::PolicyBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::PolicyBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::GetPolicyBindingRequest.new - # - # # Call the get_policy_binding method. - # result = client.get_policy_binding request - # - # # The returned object is of type Google::Iam::V3::PolicyBinding. - # p result - # - def get_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::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_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.get_policy_binding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update, and the IAM permission to remove the existing policy - # from the binding. Target is immutable and cannot be updated. Once the - # binding is updated, the new policy is applied to the target. - # - # @overload update_policy_binding(request, options = nil) - # Pass arguments to `update_policy_binding` via a request object, either of type - # {::Google::Iam::V3::UpdatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::UpdatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::UpdatePolicyBindingRequest.new - # - # # Call the update_policy_binding method. - # result = client.update_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePolicyBindingRequest - - # Converts hash and nil to an 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_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::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_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.update_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # Once the binding is deleted, the policy no longer applies to the target. - # - # @overload delete_policy_binding(request, options = nil) - # Pass arguments to `delete_policy_binding` via a request object, either of type - # {::Google::Iam::V3::DeletePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::DeletePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) - # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @param etag [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::DeletePolicyBindingRequest.new - # - # # Call the delete_policy_binding method. - # result = client.delete_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::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_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.delete_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists policy bindings. - # - # @overload list_policy_bindings(request, options = nil) - # Pass arguments to `list_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::ListPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::ListPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::ListPolicyBindingsRequest.new - # - # # Call the list_policy_bindings method. - # result = client.list_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def list_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPolicyBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::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_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.list_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, "policy_bindings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - # - # @overload search_target_policy_bindings(request, options = nil) - # Pass arguments to `search_target_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::SearchTargetPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::SearchTargetPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil) - # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param target [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @param parent [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::SearchTargetPolicyBindingsRequest.new - # - # # Call the search_target_policy_bindings method. - # result = client.search_target_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def search_target_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchTargetPolicyBindingsRequest - - # Converts hash and nil to an 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_target_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::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.search_target_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.search_target_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, "policy_bindings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the PolicyBindings REST API. - # - # This class represents the configuration for PolicyBindings 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::Iam::V3::PolicyBindings::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_policy_binding to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3::PolicyBindings::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 PolicyBindings API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_policy_binding - ## - # RPC-specific configuration for `get_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy_binding - ## - # RPC-specific configuration for `update_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy_binding - ## - # RPC-specific configuration for `delete_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_policy_binding - ## - # RPC-specific configuration for `list_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_policy_bindings - ## - # RPC-specific configuration for `search_target_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_target_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding - @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config - get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding - @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config - update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding - @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config - delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding - @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config - list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings - @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config - search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings - @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb deleted file mode 100644 index e7daad469288..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb +++ /dev/null @@ -1,937 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3 - module PolicyBindings - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::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::Iam::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::Iam::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::Iam::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 - - ## - # 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 = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb deleted file mode 100644 index ba0446cdb560..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb +++ /dev/null @@ -1,535 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v3/policy_bindings_service_pb" - -module Google - module Iam - module V3 - module PolicyBindings - module Rest - ## - # REST service stub for the PolicyBindings 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_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::CreatePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::GetPolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::PolicyBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::PolicyBinding] - # A result object deserialized from the server's reply - def get_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::PolicyBinding.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_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::UpdatePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::DeletePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::ListPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::ListPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::ListPolicyBindingsResponse] - # A result object deserialized from the server's reply - def list_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::ListPolicyBindingsResponse.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_target_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::SearchTargetPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::SearchTargetPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::SearchTargetPolicyBindingsResponse] - # A result object deserialized from the server's reply - def search_target_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_target_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "search_target_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::SearchTargetPolicyBindingsResponse.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_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::CreatePolicyBindingRequest] - # 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_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::GetPolicyBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::UpdatePolicyBindingRequest] - # 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_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::DeletePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::ListPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_target_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::SearchTargetPolicyBindingsRequest] - # 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_target_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb deleted file mode 100644 index 0909b40a7929..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/policy_bindings_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/iam/v3/operation_metadata_pb' -require 'google/iam/v3/policy_binding_resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n+google/iam/v3/policy_bindings_service.proto\x12\rgoogle.iam.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/iam/v3/operation_metadata.proto\x1a,google/iam/v3/policy_binding_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xcd\x01\n\x1a\x43reatePolicyBindingRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x1e\n\x11policy_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x0epolicy_binding\x18\x03 \x01(\x0b\x32\x1c.google.iam.v3.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"Q\n\x17GetPolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\"\xa9\x01\n\x1aUpdatePolicyBindingRequest\x12\x39\n\x0epolicy_binding\x18\x01 \x01(\x0b\x32\x1c.google.iam.v3.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x83\x01\n\x1a\x44\x65letePolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x9b\x01\n\x19ListPolicyBindingsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x16\n\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\"q\n\x1aListPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n!SearchTargetPolicyBindingsRequest\x12\x13\n\x06target\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\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\x38\n\x06parent\x18\x05 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\"y\n\"SearchTargetPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xa0\x11\n\x0ePolicyBindings\x12\x8c\x03\n\x13\x43reatePolicyBinding\x12).google.iam.v3.CreatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\'parent,policy_binding,policy_binding_id\x82\xd3\xe4\x93\x02\xd4\x01\"2/v3/{parent=projects/*/locations/*}/policyBindings:\x0epolicy_bindingZC\"1/v3/{parent=folders/*/locations/*}/policyBindings:\x0epolicy_bindingZI\"7/v3/{parent=organizations/*/locations/*}/policyBindings:\x0epolicy_binding\x12\x8d\x02\n\x10GetPolicyBinding\x12&.google.iam.v3.GetPolicyBindingRequest\x1a\x1c.google.iam.v3.PolicyBinding\"\xb2\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa4\x01\x12\x32/v3/{name=projects/*/locations/*/policyBindings/*}Z3\x12\x31/v3/{name=folders/*/locations/*/policyBindings/*}Z9\x12\x37/v3/{name=organizations/*/locations/*/policyBindings/*}\x12\xac\x03\n\x13UpdatePolicyBinding\x12).google.iam.v3.UpdatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xca\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\x1apolicy_binding,update_mask\x82\xd3\xe4\x93\x02\x81\x02\x32\x41/v3/{policy_binding.name=projects/*/locations/*/policyBindings/*}:\x0epolicy_bindingZR2@/v3/{policy_binding.name=folders/*/locations/*/policyBindings/*}:\x0epolicy_bindingZX2F/v3/{policy_binding.name=organizations/*/locations/*/policyBindings/*}:\x0epolicy_binding\x12\xc1\x02\n\x13\x44\x65letePolicyBinding\x12).google.iam.v3.DeletePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xdf\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa4\x01*2/v3/{name=projects/*/locations/*/policyBindings/*}Z3*1/v3/{name=folders/*/locations/*/policyBindings/*}Z9*7/v3/{name=organizations/*/locations/*/policyBindings/*}\x12\xa0\x02\n\x12ListPolicyBindings\x12(.google.iam.v3.ListPolicyBindingsRequest\x1a).google.iam.v3.ListPolicyBindingsResponse\"\xb4\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xa4\x01\x12\x32/v3/{parent=projects/*/locations/*}/policyBindingsZ3\x12\x31/v3/{parent=folders/*/locations/*}/policyBindingsZ9\x12\x37/v3/{parent=organizations/*/locations/*}/policyBindings\x12\x90\x03\n\x1aSearchTargetPolicyBindings\x12\x30.google.iam.v3.SearchTargetPolicyBindingsRequest\x1a\x31.google.iam.v3.SearchTargetPolicyBindingsResponse\"\x8c\x02\xda\x41\rparent,target\x82\xd3\xe4\x93\x02\xf5\x01\x12M/v3/{parent=projects/*/locations/*}/policyBindings:searchTargetPolicyBindingsZN\x12L/v3/{parent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindingsZT\x12R/v3/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb4\x02\n\x11\x63om.google.iam.v3B\x1aPolicyBindingsServiceProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3\xea\x41\\\n\'iam.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41J\n!iam.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - CreatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.CreatePolicyBindingRequest").msgclass - GetPolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.GetPolicyBindingRequest").msgclass - UpdatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.UpdatePolicyBindingRequest").msgclass - DeletePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.DeletePolicyBindingRequest").msgclass - ListPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPolicyBindingsRequest").msgclass - ListPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPolicyBindingsResponse").msgclass - SearchTargetPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchTargetPolicyBindingsRequest").msgclass - SearchTargetPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchTargetPolicyBindingsResponse").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb deleted file mode 100644 index 6883173088e3..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb +++ /dev/null @@ -1,63 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v3/policy_bindings_service.proto for package 'google.iam.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/iam/v3/policy_bindings_service_pb' - -module Google - module Iam - module V3 - module PolicyBindings - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v3.PolicyBindings' - - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # Once the binding is created, the policy is applied to the target. - rpc :CreatePolicyBinding, ::Google::Iam::V3::CreatePolicyBindingRequest, ::Google::Longrunning::Operation - # Gets a policy binding. - rpc :GetPolicyBinding, ::Google::Iam::V3::GetPolicyBindingRequest, ::Google::Iam::V3::PolicyBinding - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update, and the IAM permission to remove the existing policy - # from the binding. Target is immutable and cannot be updated. Once the - # binding is updated, the new policy is applied to the target. - rpc :UpdatePolicyBinding, ::Google::Iam::V3::UpdatePolicyBindingRequest, ::Google::Longrunning::Operation - # Deletes a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # Once the binding is deleted, the policy no longer applies to the target. - rpc :DeletePolicyBinding, ::Google::Iam::V3::DeletePolicyBindingRequest, ::Google::Longrunning::Operation - # Lists policy bindings. - rpc :ListPolicyBindings, ::Google::Iam::V3::ListPolicyBindingsRequest, ::Google::Iam::V3::ListPolicyBindingsResponse - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - rpc :SearchTargetPolicyBindings, ::Google::Iam::V3::SearchTargetPolicyBindingsRequest, ::Google::Iam::V3::SearchTargetPolicyBindingsResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb deleted file mode 100644 index 74a5371b0372..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.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/iam/v3/version" - -require "google/iam/v3/principal_access_boundary_policies/credentials" -require "google/iam/v3/principal_access_boundary_policies/paths" -require "google/iam/v3/principal_access_boundary_policies/operations" -require "google/iam/v3/principal_access_boundary_policies/client" -require "google/iam/v3/principal_access_boundary_policies/rest" - -module Google - module Iam - module V3 - ## - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v3/principal_access_boundary_policies" - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v3/principal_access_boundary_policies/rest" - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - module PrincipalAccessBoundaryPolicies - end - end - end -end - -helper_path = ::File.join __dir__, "principal_access_boundary_policies", "helpers.rb" -require "google/iam/v3/principal_access_boundary_policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb deleted file mode 100644 index 39ae3de250d6..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb +++ /dev/null @@ -1,1100 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/iam/v3/principal_access_boundary_policies_service_pb" -require "google/cloud/location" - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - ## - # Client for the PrincipalAccessBoundaryPolicies service. - # - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :principal_access_boundary_policies_stub - - ## - # Configure the PrincipalAccessBoundaryPolicies Client class. - # - # See {::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients - # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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", "Iam", "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.create_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 - default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 - default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 - default_config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.universe_domain - end - - ## - # Create a new PrincipalAccessBoundaryPolicies client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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/iam/v3/principal_access_boundary_policies_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 - - @principal_access_boundary_policies_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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 - ) - - @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint - config.universe_domain = @principal_access_boundary_policies_stub.universe_domain - config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.logger - end - - # Service calls - - ## - # Creates a principal access boundary policy, and returns a long running - # operation. - # - # @overload create_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) - # Pass arguments to `create_principal_access_boundary_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 parent [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param principal_access_boundary_policy_id [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the create_principal_access_boundary_policy method. - # result = client.create_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to 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_principal_access_boundary_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::Iam::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_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :create_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. - # - # @overload get_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_principal_access_boundary_policy(name: nil) - # Pass arguments to `get_principal_access_boundary_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 name [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new - # - # # Call the get_principal_access_boundary_policy method. - # result = client.get_principal_access_boundary_policy request - # - # # The returned object is of type Google::Iam::V3::PrincipalAccessBoundaryPolicy. - # p result - # - def get_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_principal_access_boundary_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::Iam::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_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :get_principal_access_boundary_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 - - ## - # Updates a principal access boundary policy. - # - # @overload update_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_principal_access_boundary_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 principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the update_principal_access_boundary_policy method. - # result = client.update_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to 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_principal_access_boundary_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::Iam::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.principal_access_boundary_policy&.name - header_params["principal_access_boundary_policy.name"] = request.principal_access_boundary_policy.name - end - - request_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_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :update_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. - # - # @overload delete_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_principal_access_boundary_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 name [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param etag [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the delete_principal_access_boundary_policy method. - # result = client.delete_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_principal_access_boundary_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::Iam::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_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :delete_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policies. - # - # @overload list_principal_access_boundary_policies(request, options = nil) - # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type - # {::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new - # - # # Call the list_principal_access_boundary_policies method. - # result = client.list_principal_access_boundary_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PrincipalAccessBoundaryPolicy. - # p item - # end - # - def list_principal_access_boundary_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::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_principal_access_boundary_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :list_principal_access_boundary_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, 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 all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_principal_access_boundary_policy_bindings(request, options = nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - # - # # Call the search_principal_access_boundary_policy_bindings method. - # result = client.search_principal_access_boundary_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def search_principal_access_boundary_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest - - # Converts hash and nil to 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_principal_access_boundary_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::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.search_principal_access_boundary_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :search_principal_access_boundary_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the PrincipalAccessBoundaryPolicies API. - # - # This class represents the configuration for PrincipalAccessBoundaryPolicies, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_principal_access_boundary_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Iam::V3::PrincipalAccessBoundaryPolicies::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 = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 PrincipalAccessBoundaryPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_principal_access_boundary_policy - ## - # RPC-specific configuration for `get_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_principal_access_boundary_policy - ## - # RPC-specific configuration for `update_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_principal_access_boundary_policy - ## - # RPC-specific configuration for `delete_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_principal_access_boundary_policy - ## - # RPC-specific configuration for `list_principal_access_boundary_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_principal_access_boundary_policies - ## - # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_principal_access_boundary_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy - @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config - get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy - @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config - update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy - @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config - delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy - @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config - list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies - @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config - search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings - @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb deleted file mode 100644 index 84103a366146..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.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 "googleauth" - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - # Credentials for the PrincipalAccessBoundaryPolicies 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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb deleted file mode 100644 index 21ecdebb9d34..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb +++ /dev/null @@ -1,839 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3 - module PrincipalAccessBoundaryPolicies - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::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::Iam::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::Iam::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::Iam::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::Iam::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 - - 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 = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb deleted file mode 100644 index d7fbd72948b5..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.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! - - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - # Path helper methods for the PrincipalAccessBoundaryPolicies API. - module Paths - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified PrincipalAccessBoundaryPolicy resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}` - # - # @param organization [String] - # @param location [String] - # @param principal_access_boundary_policy [String] - # - # @return [::String] - def principal_access_boundary_policy_path organization:, location:, principal_access_boundary_policy: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/principalAccessBoundaryPolicies/#{principal_access_boundary_policy}" - end - - extend self - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb deleted file mode 100644 index 8e3308deab2f..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/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/iam/v3/version" - -require "google/iam/v3/principal_access_boundary_policies/credentials" -require "google/iam/v3/principal_access_boundary_policies/paths" -require "google/iam/v3/principal_access_boundary_policies/rest/operations" -require "google/iam/v3/principal_access_boundary_policies/rest/client" - -module Google - module Iam - module V3 - ## - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v3/principal_access_boundary_policies/rest" - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - module PrincipalAccessBoundaryPolicies - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v3/principal_access_boundary_policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb deleted file mode 100644 index c74d51bcbd1a..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb +++ /dev/null @@ -1,1015 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/iam/v3/principal_access_boundary_policies_service_pb" -require "google/iam/v3/principal_access_boundary_policies/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - module Rest - ## - # REST client for the PrincipalAccessBoundaryPolicies service. - # - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :principal_access_boundary_policies_stub - - ## - # Configure the PrincipalAccessBoundaryPolicies Client class. - # - # See {::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients - # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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", "Iam", "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.create_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 - default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 - default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 - default_config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.universe_domain - end - - ## - # Create a new PrincipalAccessBoundaryPolicies REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3::PrincipalAccessBoundaryPolicies::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 - - @principal_access_boundary_policies_stub = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint - config.universe_domain = @principal_access_boundary_policies_stub.universe_domain - config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.logger - end - - # Service calls - - ## - # Creates a principal access boundary policy, and returns a long running - # operation. - # - # @overload create_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) - # Pass arguments to `create_principal_access_boundary_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 parent [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param principal_access_boundary_policy_id [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the create_principal_access_boundary_policy method. - # result = client.create_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an 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_principal_access_boundary_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::Iam::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_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.create_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. - # - # @overload get_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_principal_access_boundary_policy(name: nil) - # Pass arguments to `get_principal_access_boundary_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 name [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new - # - # # Call the get_principal_access_boundary_policy method. - # result = client.get_principal_access_boundary_policy request - # - # # The returned object is of type Google::Iam::V3::PrincipalAccessBoundaryPolicy. - # p result - # - def get_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_principal_access_boundary_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::Iam::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_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.get_principal_access_boundary_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 - - ## - # Updates a principal access boundary policy. - # - # @overload update_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_principal_access_boundary_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 principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the update_principal_access_boundary_policy method. - # result = client.update_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an 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_principal_access_boundary_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::Iam::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_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.update_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. - # - # @overload delete_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_principal_access_boundary_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 name [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param etag [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the delete_principal_access_boundary_policy method. - # result = client.delete_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_principal_access_boundary_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::Iam::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_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.delete_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policies. - # - # @overload list_principal_access_boundary_policies(request, options = nil) - # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type - # {::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new - # - # # Call the list_principal_access_boundary_policies method. - # result = client.list_principal_access_boundary_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PrincipalAccessBoundaryPolicy. - # p item - # end - # - def list_principal_access_boundary_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::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_principal_access_boundary_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.list_principal_access_boundary_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, "principal_access_boundary_policies", request, result, 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 all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_principal_access_boundary_policy_bindings(request, options = nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - # - # # Call the search_principal_access_boundary_policy_bindings method. - # result = client.search_principal_access_boundary_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def search_principal_access_boundary_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest - - # Converts hash and nil to an 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_principal_access_boundary_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::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.search_principal_access_boundary_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.search_principal_access_boundary_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, "policy_bindings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the PrincipalAccessBoundaryPolicies REST API. - # - # This class represents the configuration for PrincipalAccessBoundaryPolicies 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::Iam::V3::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 PrincipalAccessBoundaryPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_principal_access_boundary_policy - ## - # RPC-specific configuration for `get_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_principal_access_boundary_policy - ## - # RPC-specific configuration for `update_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_principal_access_boundary_policy - ## - # RPC-specific configuration for `delete_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_principal_access_boundary_policy - ## - # RPC-specific configuration for `list_principal_access_boundary_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_principal_access_boundary_policies - ## - # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_principal_access_boundary_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy - @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config - get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy - @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config - update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy - @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config - delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy - @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config - list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies - @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config - search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings - @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb deleted file mode 100644 index 88a187e21a3a..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb +++ /dev/null @@ -1,937 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3 - module PrincipalAccessBoundaryPolicies - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::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::Iam::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::Iam::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::Iam::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 - - ## - # 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 = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb deleted file mode 100644 index f1c525adbc3a..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb +++ /dev/null @@ -1,447 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v3/principal_access_boundary_policies_service_pb" - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - module Rest - ## - # REST service stub for the PrincipalAccessBoundaryPolicies 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_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_principal_access_boundary_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: "create_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # A result object deserialized from the server's reply - def get_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_principal_access_boundary_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_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::PrincipalAccessBoundaryPolicy.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_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_principal_access_boundary_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: "update_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_principal_access_boundary_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: "delete_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_principal_access_boundary_policies REST call - # - # @param request_pb [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::ListPrincipalAccessBoundaryPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse] - # A result object deserialized from the server's reply - def list_principal_access_boundary_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_principal_access_boundary_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_principal_access_boundary_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse.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_principal_access_boundary_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse] - # A result object deserialized from the server's reply - def search_principal_access_boundary_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_principal_access_boundary_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "search_principal_access_boundary_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest] - # 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_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/principalAccessBoundaryPolicies", - body: "principal_access_boundary_policy", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest] - # 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_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{principal_access_boundary_policy.name}", - body: "principal_access_boundary_policy", - matches: [ - ["principal_access_boundary_policy.name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_principal_access_boundary_policies REST call - # - # @param request_pb [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_principal_access_boundary_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/principalAccessBoundaryPolicies", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_principal_access_boundary_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest] - # 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_principal_access_boundary_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb deleted file mode 100644 index 56f9951c56c1..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/principal_access_boundary_policies_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/iam/v3/operation_metadata_pb' -require 'google/iam/v3/policy_binding_resources_pb' -require 'google/iam/v3/principal_access_boundary_policy_resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n>google/iam/v3/principal_access_boundary_policies_service.proto\x12\rgoogle.iam.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/iam/v3/operation_metadata.proto\x1a,google/iam/v3/policy_binding_resources.proto\x1a>google/iam/v3/principal_access_boundary_policy_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa1\x02\n*CreatePrincipalAccessBoundaryPolicyRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x30\n#principal_access_boundary_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12[\n principal_access_boundary_policy\x18\x03 \x01(\x0b\x32,.google.iam.v3.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"q\n\'GetPrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\"\xdb\x01\n*UpdatePrincipalAccessBoundaryPolicyRequest\x12[\n principal_access_boundary_policy\x18\x01 \x01(\x0b\x32,.google.iam.v3.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb7\x01\n*DeletePrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa7\x01\n*ListPrincipalAccessBoundaryPoliciesRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa5\x01\n+ListPrincipalAccessBoundaryPoliciesResponse\x12X\n\"principal_access_boundary_policies\x18\x01 \x03(\x0b\x32,.google.iam.v3.PrincipalAccessBoundaryPolicy\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n2SearchPrincipalAccessBoundaryPolicyBindingsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\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\"\x8a\x01\n3SearchPrincipalAccessBoundaryPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xec\x0e\n\x1fPrincipalAccessBoundaryPolicies\x12\xf7\x02\n#CreatePrincipalAccessBoundaryPolicy\x12\x39.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xf5\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41Kparent,principal_access_boundary_policy,principal_access_boundary_policy_id\x82\xd3\xe4\x93\x02l\"H/v3/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies: principal_access_boundary_policy\x12\xe1\x01\n GetPrincipalAccessBoundaryPolicy\x12\x36.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest\x1a,.google.iam.v3.PrincipalAccessBoundaryPolicy\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\xfa\x02\n#UpdatePrincipalAccessBoundaryPolicy\x12\x39.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xf8\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41,principal_access_boundary_policy,update_mask\x82\xd3\xe4\x93\x02\x8d\x01\x32i/v3/{principal_access_boundary_policy.name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}: principal_access_boundary_policy\x12\x86\x02\n#DeletePrincipalAccessBoundaryPolicy\x12\x39.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\xf7\x01\n#ListPrincipalAccessBoundaryPolicies\x12\x39.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest\x1a:.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v3/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies\x12\xa2\x02\n+SearchPrincipalAccessBoundaryPolicyBindings\x12\x41.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest\x1a\x42.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse\"l\xda\x41\x04name\x82\xd3\xe4\x93\x02_\x12]/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}:searchPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x99\x01\n\x11\x63om.google.iam.v3B+PrincipalAccessBoundaryPoliciesServiceProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - CreatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest").msgclass - GetPrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest").msgclass - UpdatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest").msgclass - DeletePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest").msgclass - ListPrincipalAccessBoundaryPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest").msgclass - ListPrincipalAccessBoundaryPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse").msgclass - SearchPrincipalAccessBoundaryPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest").msgclass - SearchPrincipalAccessBoundaryPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb deleted file mode 100644 index afa8d5bef116..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v3/principal_access_boundary_policies_service.proto for package 'google.iam.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/iam/v3/principal_access_boundary_policies_service_pb' - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v3.PrincipalAccessBoundaryPolicies' - - # Creates a principal access boundary policy, and returns a long running - # operation. - rpc :CreatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Gets a principal access boundary policy. - rpc :GetPrincipalAccessBoundaryPolicy, ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, ::Google::Iam::V3::PrincipalAccessBoundaryPolicy - # Updates a principal access boundary policy. - rpc :UpdatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Deletes a principal access boundary policy. - rpc :DeletePrincipalAccessBoundaryPolicy, ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Lists principal access boundary policies. - rpc :ListPrincipalAccessBoundaryPolicies, ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - rpc :SearchPrincipalAccessBoundaryPolicyBindings, ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb deleted file mode 100644 index 2a5009d8b3b2..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/principal_access_boundary_policy_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n>google/iam/v3/principal_access_boundary_policy_resources.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xad\x05\n\x1dPrincipalAccessBoundaryPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12W\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32=.google.iam.v3.PrincipalAccessBoundaryPolicy.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x07\x64\x65tails\x18\x08 \x01(\x0b\x32\x33.google.iam.v3.PrincipalAccessBoundaryPolicyDetailsB\x03\xe0\x41\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xec\x01\xea\x41\xe8\x01\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12torganizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}*\x1fprincipalAccessBoundaryPolicies2\x1dprincipalAccessBoundaryPolicy\"\x8e\x01\n$PrincipalAccessBoundaryPolicyDetails\x12\x44\n\x05rules\x18\x01 \x03(\x0b\x32\x30.google.iam.v3.PrincipalAccessBoundaryPolicyRuleB\x03\xe0\x41\x02\x12 \n\x13\x65nforcement_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xd0\x01\n!PrincipalAccessBoundaryPolicyRule\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tresources\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12L\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32\x37.google.iam.v3.PrincipalAccessBoundaryPolicyRule.EffectB\x03\xe0\x41\x02\"+\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x42\x99\x01\n\x11\x63om.google.iam.v3B+PrincipalAccessBoundaryPolicyResourcesProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - PrincipalAccessBoundaryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicy").msgclass - PrincipalAccessBoundaryPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicyDetails").msgclass - PrincipalAccessBoundaryPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicyRule").msgclass - PrincipalAccessBoundaryPolicyRule::Effect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect").enummodule - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb deleted file mode 100644 index 98fc2a1c0a35..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v3/policy_bindings/rest" -require "google/iam/v3/principal_access_boundary_policies/rest" -require "google/iam/v3/version" - -module Google - module Iam - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/iam/v3/rest" - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new - # - module V3 - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb deleted file mode 100644 index 9892bb2c28a6..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3 - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/README.md b/owl-bot-staging/google-iam-v3/proto_docs/README.md deleted file mode 100644 index 02d67f814ded..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Identity and Access Management (IAM) 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-iam-v3/proto_docs/google/api/client.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/api/resource.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb deleted file mode 100644 index 42ec222a1f98..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.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! - - -module Google - module Iam - module V3 - # 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 - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb deleted file mode 100644 index 9a7a7477a7eb..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb +++ /dev/null @@ -1,171 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 V3 - # IAM policy binding resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the policy binding, in the format - # `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`. - # The binding parent is the closest Resource Manager resource (project, - # folder, or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @!attribute [r] uid - # @return [::String] - # Output only. The globally unique ID of the policy binding. Assigned when - # the policy binding is created. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the policy binding. - # If this is provided on update, it must match the server's etag. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The description of the policy binding. Must be less than or equal - # to 63 characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations - # @!attribute [rw] target - # @return [::Google::Iam::V3::PolicyBinding::Target] - # Required. Immutable. Target is the full resource name of the resource to - # which the policy will be bound. Immutable once set. - # @!attribute [rw] policy_kind - # @return [::Google::Iam::V3::PolicyBinding::PolicyKind] - # Immutable. The kind of the policy to attach in this binding. This field - # must be one of the following: - # - # - Left empty (will be automatically set to the policy kind) - # - The input policy kind - # @!attribute [rw] policy - # @return [::String] - # Required. Immutable. The resource name of the policy to be bound. The - # binding parent and policy must belong to the same organization. - # @!attribute [r] policy_uid - # @return [::String] - # Output only. The globally unique ID of the policy to be bound. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # Optional. The condition to apply to the policy binding. When set, the - # `expression` field in the `Expr` must include from 1 to 10 subexpressions, - # joined by the - # "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and - # cannot contain more than 250 characters. - # - # The condition is currently only supported when bound to policies of kind - # principal access boundary. - # - # When the bound policy is a principal access boundary policy, the only - # supported attributes in any subexpression are `principal.type` and - # `principal.subject`. An example expression is: "principal.type == - # 'iam.googleapis.com/ServiceAccount'" or "principal.subject == - # 'bob@example.com'". - # - # Allowed operations for `principal.subject`: - # - # - `principal.subject == ` - # - `principal.subject != ` - # - `principal.subject in []` - # - `principal.subject.startsWith()` - # - `principal.subject.endsWith()` - # - # Allowed operations for `principal.type`: - # - # - `principal.type == ` - # - `principal.type != ` - # - `principal.type in []` - # - # Supported principal types are Workspace, Workforce Pool, Workload Pool and - # Service Account. Allowed string must be one of: - # - # - iam.googleapis.com/WorkspaceIdentity - # - iam.googleapis.com/WorkforcePoolIdentity - # - iam.googleapis.com/WorkloadPoolIdentity - # - iam.googleapis.com/ServiceAccount - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the policy binding was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the policy binding was most recently updated. - class PolicyBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Target is the full resource name of the resource to which the policy will - # be bound. Immutable once set. - # @!attribute [rw] principal_set - # @return [::String] - # Immutable. Full Resource Name used for principal access boundary policy - # bindings. The principal set must be directly parented by the policy - # binding's parent or same as the parent if the target is a - # project/folder/organization. - # - # Examples: - # * For binding's parented by an organization: - # * Organization: - # `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` - # * Workforce Identity: - # `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID` - # * Workspace Identity: - # `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * For binding's parented by a folder: - # * Folder: - # `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` - # * For binding's parented by a project: - # * Project: - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` - # * Workload Identity Pool: - # `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID` - class Target - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Different policy kinds supported in this binding. - module PolicyKind - # Unspecified policy kind; Not a valid state - POLICY_KIND_UNSPECIFIED = 0 - - # Principal access boundary policy kind - PRINCIPAL_ACCESS_BOUNDARY = 1 - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb deleted file mode 100644 index 9651e5fa26b5..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb +++ /dev/null @@ -1,232 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 V3 - # Request message for CreatePolicyBinding method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] policy_binding_id - # @return [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @!attribute [rw] policy_binding - # @return [::Google::Iam::V3::PolicyBinding] - # Required. The policy binding to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - class CreatePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetPolicyBinding method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - class GetPolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdatePolicyBinding method. - # @!attribute [rw] policy_binding - # @return [::Google::Iam::V3::PolicyBinding] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update - class UpdatePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeletePolicyBinding method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - class DeletePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListPolicyBindings method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - class ListPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListPolicyBindings method. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3::PolicyBinding>] - # The policy bindings from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchTargetPolicyBindings method. - # @!attribute [rw] target - # @return [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - class SearchTargetPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchTargetPolicyBindings method. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3::PolicyBinding>] - # The policy bindings bound to the specified target. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class SearchTargetPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb deleted file mode 100644 index bd02495524b4..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.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 Iam - module V3 - # Request message for CreatePrincipalAccessBoundaryPolicyRequest method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] principal_access_boundary_policy_id - # @return [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @!attribute [rw] principal_access_boundary_policy - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # Required. The principal access boundary policy to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - class CreatePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetPrincipalAccessBoundaryPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - class GetPrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdatePrincipalAccessBoundaryPolicy method. - # @!attribute [rw] principal_access_boundary_policy - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update - class UpdatePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeletePrincipalAccessBoundaryPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - class DeletePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListPrincipalAccessBoundaryPolicies method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - class ListPrincipalAccessBoundaryPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListPrincipalAccessBoundaryPolicies method. - # @!attribute [rw] principal_access_boundary_policies - # @return [::Array<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] - # The principal access boundary policies from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListPrincipalAccessBoundaryPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - class SearchPrincipalAccessBoundaryPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3::PolicyBinding>] - # The policy bindings that reference the specified policy. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class SearchPrincipalAccessBoundaryPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb deleted file mode 100644 index 40b6170b1a17..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.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 Iam - module V3 - # An IAM principal access boundary policy resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the principal access boundary policy. - # - # The following format is supported: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}` - # @!attribute [r] uid - # @return [::String] - # Output only. The globally unique ID of the principal access boundary - # policy. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the principal access boundary. - # If this is provided on update, it must match the server's etag. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The description of the principal access boundary policy. Must be - # less than or equal to 63 characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the principal access boundary policy was - # created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the principal access boundary policy was most - # recently updated. - # @!attribute [rw] details - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicyDetails] - # Optional. The details for the principal access boundary policy. - class PrincipalAccessBoundaryPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Principal access boundary policy details - # @!attribute [rw] rules - # @return [::Array<::Google::Iam::V3::PrincipalAccessBoundaryPolicyRule>] - # Required. A list of principal access boundary policy rules. The number of - # rules in a policy is limited to 500. - # @!attribute [rw] enforcement_version - # @return [::String] - # Optional. - # The version number (for example, `1` or `latest`) that indicates which - # permissions are able to be blocked by the policy. If empty, the PAB policy - # version will be set to the most recent version number at the time of the - # policy's creation. - class PrincipalAccessBoundaryPolicyDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Principal access boundary policy rule that defines the resource boundary. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the principal access boundary policy rule. - # Must be less than or equal to 256 characters. - # @!attribute [rw] resources - # @return [::Array<::String>] - # Required. A list of Resource Manager resources. If a resource is listed in - # the rule, then the rule applies for that resource and its descendants. The - # number of resources in a policy is limited to 500 across all rules in the - # policy. - # - # The following resource types are supported: - # - # * Organizations, such as - # `//cloudresourcemanager.googleapis.com/organizations/123`. - # * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`. - # * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123` - # or `//cloudresourcemanager.googleapis.com/projects/my-project-id`. - # @!attribute [rw] effect - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicyRule::Effect] - # Required. The access relationship of principals to the resources in this - # rule. - class PrincipalAccessBoundaryPolicyRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An effect to describe the access relationship. - module Effect - # Effect unspecified. - EFFECT_UNSPECIFIED = 0 - - # Allows access to the resources in this rule. - ALLOW = 1 - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3/proto_docs/google/type/expr.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-iam-v3/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-iam-v3/snippets/Gemfile b/owl-bot-staging/google-iam-v3/snippets/Gemfile deleted file mode 100644 index 1ae54b711716..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3", path: "../" -else - gem "google-iam-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-iam-v3/snippets/policy_bindings/create_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb deleted file mode 100644 index df4ee7219d1d..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync] -require "google/iam/v3" - -## -# Snippet for the create_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3::PolicyBindings::Client#create_policy_binding. -# -def create_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::CreatePolicyBindingRequest.new - - # Call the create_policy_binding method. - result = client.create_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb deleted file mode 100644 index 55f3efffd3e3..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync] -require "google/iam/v3" - -## -# Snippet for the delete_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3::PolicyBindings::Client#delete_policy_binding. -# -def delete_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::DeletePolicyBindingRequest.new - - # Call the delete_policy_binding method. - result = client.delete_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb deleted file mode 100644 index 94c0c21f6316..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_GetPolicyBinding_sync] -require "google/iam/v3" - -## -# Snippet for the get_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3::PolicyBindings::Client#get_policy_binding. -# -def get_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::GetPolicyBindingRequest.new - - # Call the get_policy_binding method. - result = client.get_policy_binding request - - # The returned object is of type Google::Iam::V3::PolicyBinding. - p result -end -# [END iam_v3_generated_PolicyBindings_GetPolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb deleted file mode 100644 index 2dbb442b3771..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_ListPolicyBindings_sync] -require "google/iam/v3" - -## -# Snippet for the list_policy_bindings call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3::PolicyBindings::Client#list_policy_bindings. -# -def list_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::ListPolicyBindingsRequest.new - - # Call the list_policy_bindings method. - result = client.list_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3::PolicyBinding. - p item - end -end -# [END iam_v3_generated_PolicyBindings_ListPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb deleted file mode 100644 index 46f121f588f0..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync] -require "google/iam/v3" - -## -# Snippet for the search_target_policy_bindings call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3::PolicyBindings::Client#search_target_policy_bindings. -# -def search_target_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::SearchTargetPolicyBindingsRequest.new - - # Call the search_target_policy_bindings method. - result = client.search_target_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3::PolicyBinding. - p item - end -end -# [END iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb deleted file mode 100644 index 10cbd400a9ef..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync] -require "google/iam/v3" - -## -# Snippet for the update_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3::PolicyBindings::Client#update_policy_binding. -# -def update_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::UpdatePolicyBindingRequest.new - - # Call the update_policy_binding method. - result = client.update_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb deleted file mode 100644 index b4700ad72f99..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.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 iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy. -# -def create_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new - - # Call the create_principal_access_boundary_policy method. - result = client.create_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb deleted file mode 100644 index 85f48ef8c04a..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.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 iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy. -# -def delete_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new - - # Call the delete_principal_access_boundary_policy method. - result = client.delete_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb deleted file mode 100644 index ac50d60e307f..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_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 iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy. -# -def get_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new - - # Call the get_principal_access_boundary_policy method. - result = client.get_principal_access_boundary_policy request - - # The returned object is of type Google::Iam::V3::PrincipalAccessBoundaryPolicy. - p result -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb deleted file mode 100644 index b3c624c9b24f..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.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 iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] -require "google/iam/v3" - -## -# Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies. -# -def list_principal_access_boundary_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new - - # Call the list_principal_access_boundary_policies method. - result = client.list_principal_access_boundary_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3::PrincipalAccessBoundaryPolicy. - p item - end -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb deleted file mode 100644 index 7a39b0874454..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] -require "google/iam/v3" - -## -# Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings. -# -def search_principal_access_boundary_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - - # Call the search_principal_access_boundary_policy_bindings method. - result = client.search_principal_access_boundary_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3::PolicyBinding. - p item - end -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb deleted file mode 100644 index 0b6bc521c7f0..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.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 iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy. -# -def update_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new - - # Call the update_principal_access_boundary_policy method. - result = client.update_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json b/owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json deleted file mode 100644 index 21ca8a28e3ff..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json +++ /dev/null @@ -1,495 +0,0 @@ -{ - "client_library": { - "name": "google-iam-v3", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.iam.v3", - "version": "v3" - } - ] - }, - "snippets": [ - { - "region_tag": "iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync", - "title": "Snippet for the create_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#create_policy_binding.", - "file": "policy_bindings/create_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_policy_binding", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#create_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::CreatePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "CreatePolicyBinding", - "full_name": "google.iam.v3.PolicyBindings.CreatePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_GetPolicyBinding_sync", - "title": "Snippet for the get_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#get_policy_binding.", - "file": "policy_bindings/get_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_policy_binding", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#get_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::GetPolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::PolicyBinding", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "GetPolicyBinding", - "full_name": "google.iam.v3.PolicyBindings.GetPolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync", - "title": "Snippet for the update_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#update_policy_binding.", - "file": "policy_bindings/update_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_policy_binding", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#update_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::UpdatePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "UpdatePolicyBinding", - "full_name": "google.iam.v3.PolicyBindings.UpdatePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync", - "title": "Snippet for the delete_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#delete_policy_binding.", - "file": "policy_bindings/delete_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_policy_binding", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#delete_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::DeletePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "DeletePolicyBinding", - "full_name": "google.iam.v3.PolicyBindings.DeletePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_ListPolicyBindings_sync", - "title": "Snippet for the list_policy_bindings call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#list_policy_bindings.", - "file": "policy_bindings/list_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_policy_bindings", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#list_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::ListPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::ListPolicyBindingsResponse", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "ListPolicyBindings", - "full_name": "google.iam.v3.PolicyBindings.ListPolicyBindings", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync", - "title": "Snippet for the search_target_policy_bindings call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#search_target_policy_bindings.", - "file": "policy_bindings/search_target_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_target_policy_bindings", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#search_target_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::SearchTargetPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::SearchTargetPolicyBindingsResponse", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "SearchTargetPolicyBindings", - "full_name": "google.iam.v3.PolicyBindings.SearchTargetPolicyBindings", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/create_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "CreatePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.CreatePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/get_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::PrincipalAccessBoundaryPolicy", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "GetPrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.GetPrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/update_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "UpdatePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.UpdatePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/delete_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "DeletePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.DeletePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync", - "title": "Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies.", - "file": "principal_access_boundary_policies/list_principal_access_boundary_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_principal_access_boundary_policies", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "ListPrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.ListPrincipalAccessBoundaryPolicies", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync", - "title": "Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings.", - "file": "principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_principal_access_boundary_policy_bindings", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "SearchPrincipalAccessBoundaryPolicyBindings", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.SearchPrincipalAccessBoundaryPolicyBindings", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "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-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb deleted file mode 100644 index 903cbd3c384b..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_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/iam/v3/policy_bindings_service_pb" -require "google/iam/v3/policy_bindings_service_services_pb" -require "google/iam/v3/policy_bindings" - -class ::Google::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb deleted file mode 100644 index e21017f180db..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_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/iam/v3/policy_bindings" - -class ::Google::Iam::V3::PolicyBindings::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_folder_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_location_path folder: "value0", location: "value1" - assert_equal "folders/value0/locations/value1", 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::Iam::V3::PolicyBindings::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_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_policy_binding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.policy_binding_path organization: "value0", location: "value1", policy_binding: "value2" - assert_equal "organizations/value0/locations/value1/policyBindings/value2", path - - path = client.policy_binding_path folder: "value0", location: "value1", policy_binding: "value2" - assert_equal "folders/value0/locations/value1/policyBindings/value2", path - - path = client.policy_binding_path project: "value0", location: "value1", policy_binding: "value2" - assert_equal "projects/value0/locations/value1/policyBindings/value2", path - end - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb deleted file mode 100644 index 3d4566853daf..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb +++ /dev/null @@ -1,436 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/iam/v3/policy_bindings_service_pb" -require "google/iam/v3/policy_bindings/rest" - - -class ::Google::Iam::V3::PolicyBindings::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_policy_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - policy_binding_id = "hello world" - policy_binding = {} - validate_only = true - - create_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_create_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_policy_binding_client_stub do - # Create client - client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_policy_binding ::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_policy_binding(::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_policy_binding_client_stub.call_count - end - end - end - - def test_get_policy_binding - # Create test objects. - client_result = ::Google::Iam::V3::PolicyBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_get_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_policy_binding_client_stub do - # Create client - client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_policy_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_policy_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_policy_binding ::Google::Iam::V3::GetPolicyBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_policy_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_policy_binding(::Google::Iam::V3::GetPolicyBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_policy_binding_client_stub.call_count - end - end - end - - def test_update_policy_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - policy_binding = {} - validate_only = true - update_mask = {} - - update_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_update_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_policy_binding_client_stub do - # Create client - client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_policy_binding policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_policy_binding ::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_policy_binding(::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_policy_binding_client_stub.call_count - end - end - end - - def test_delete_policy_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - - delete_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_delete_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_policy_binding_client_stub do - # Create client - client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_policy_binding ::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_policy_binding(::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_policy_binding_client_stub.call_count - end - end - end - - def test_list_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3::ListPolicyBindingsResponse.new - http_response = OpenStruct.new 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_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_list_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_policy_bindings_client_stub do - # Create client - client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_policy_bindings({ 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_policy_bindings 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_policy_bindings ::Google::Iam::V3::ListPolicyBindingsRequest.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_policy_bindings({ 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_policy_bindings(::Google::Iam::V3::ListPolicyBindingsRequest.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_policy_bindings_client_stub.call_count - end - end - end - - def test_search_target_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3::SearchTargetPolicyBindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - target = "hello world" - page_size = 42 - page_token = "hello world" - parent = "hello world" - - search_target_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_search_target_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_target_policy_bindings_client_stub do - # Create client - client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_target_policy_bindings ::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.search_target_policy_bindings(::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_target_policy_bindings_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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb deleted file mode 100644 index de01adf69e95..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb +++ /dev/null @@ -1,517 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/iam/v3/policy_bindings_service_pb" -require "google/iam/v3/policy_bindings" - -class ::Google::Iam::V3::PolicyBindings::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_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - policy_binding_id = "hello world" - policy_binding = {} - validate_only = true - - create_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_policy_binding, name - assert_kind_of ::Google::Iam::V3::CreatePolicyBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["policy_binding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PolicyBinding), request["policy_binding"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_policy_binding_client_stub do - # Create client - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_policy_binding ::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_policy_binding(::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_policy_binding_client_stub.call_rpc_count - end - end - - def test_get_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::PolicyBinding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_policy_binding, name - assert_kind_of ::Google::Iam::V3::GetPolicyBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_policy_binding_client_stub do - # Create client - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_policy_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_policy_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_policy_binding ::Google::Iam::V3::GetPolicyBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_policy_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_policy_binding(::Google::Iam::V3::GetPolicyBindingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_policy_binding_client_stub.call_rpc_count - end - end - - def test_update_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - policy_binding = {} - validate_only = true - update_mask = {} - - update_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_policy_binding, name - assert_kind_of ::Google::Iam::V3::UpdatePolicyBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PolicyBinding), request["policy_binding"] - assert_equal true, request["validate_only"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_policy_binding_client_stub do - # Create client - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding ::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding(::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding_client_stub.call_rpc_count - end - end - - def test_delete_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - - delete_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_policy_binding, name - assert_kind_of ::Google::Iam::V3::DeletePolicyBindingRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_policy_binding_client_stub do - # Create client - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_policy_binding ::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_policy_binding(::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_policy_binding_client_stub.call_rpc_count - end - end - - def test_list_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::ListPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_policy_bindings, name - assert_kind_of ::Google::Iam::V3::ListPolicyBindingsRequest, 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_policy_bindings_client_stub do - # Create client - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_policy_bindings({ 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_policy_bindings 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_policy_bindings ::Google::Iam::V3::ListPolicyBindingsRequest.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_policy_bindings({ 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_policy_bindings(::Google::Iam::V3::ListPolicyBindingsRequest.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_policy_bindings_client_stub.call_rpc_count - end - end - - def test_search_target_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::SearchTargetPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - target = "hello world" - page_size = 42 - page_token = "hello world" - parent = "hello world" - - search_target_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_target_policy_bindings, name - assert_kind_of ::Google::Iam::V3::SearchTargetPolicyBindingsRequest, request - assert_equal "hello world", request["target"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_target_policy_bindings_client_stub do - # Create client - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent }) do |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_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent do |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_target_policy_bindings ::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent) do |response, operation| - 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_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent }, grpc_options) do |response, operation| - 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_target_policy_bindings(::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent), grpc_options) do |response, operation| - 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_target_policy_bindings_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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V3::PolicyBindings::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb deleted file mode 100644 index f1ffe40b1968..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_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/iam/v3/principal_access_boundary_policies_service_pb" -require "google/iam/v3/principal_access_boundary_policies_service_services_pb" -require "google/iam/v3/principal_access_boundary_policies" - -class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb deleted file mode 100644 index 28fb979db795..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_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/iam/v3/principal_access_boundary_policies" - -class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_principal_access_boundary_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.principal_access_boundary_policy_path organization: "value0", location: "value1", principal_access_boundary_policy: "value2" - assert_equal "organizations/value0/locations/value1/principalAccessBoundaryPolicies/value2", path - end - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb deleted file mode 100644 index d414e3e4561c..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb +++ /dev/null @@ -1,435 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/iam/v3/principal_access_boundary_policies_service_pb" -require "google/iam/v3/principal_access_boundary_policies/rest" - - -class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy - # Create test objects. - 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" - principal_access_boundary_policy_id = "hello world" - principal_access_boundary_policy = {} - validate_only = true - - create_principal_access_boundary_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::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_create_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_principal_access_boundary_policy_client_stub do - # Create client - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_principal_access_boundary_policy ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_principal_access_boundary_policy(::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_get_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Iam::V3::PrincipalAccessBoundaryPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_principal_access_boundary_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::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_get_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_principal_access_boundary_policy_client_stub do - # Create client - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_principal_access_boundary_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_principal_access_boundary_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_principal_access_boundary_policy ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_principal_access_boundary_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_principal_access_boundary_policy(::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_update_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - principal_access_boundary_policy = {} - validate_only = true - update_mask = {} - - update_principal_access_boundary_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::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_update_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_principal_access_boundary_policy_client_stub do - # Create client - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_principal_access_boundary_policy ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_principal_access_boundary_policy(::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_delete_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_principal_access_boundary_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::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_delete_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_principal_access_boundary_policy_client_stub do - # Create client - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_principal_access_boundary_policy ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_principal_access_boundary_policy(::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_list_principal_access_boundary_policies - # Create test objects. - client_result = ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse.new - http_response = OpenStruct.new 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_principal_access_boundary_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_list_principal_access_boundary_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_principal_access_boundary_policies_client_stub do - # Create client - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_principal_access_boundary_policies({ 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_principal_access_boundary_policies 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_principal_access_boundary_policies ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies({ 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_principal_access_boundary_policies(::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_count - end - end - end - - def test_search_principal_access_boundary_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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" - - search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_search_principal_access_boundary_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_principal_access_boundary_policy_bindings_client_stub do - # Create client - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_principal_access_boundary_policy_bindings({ 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.search_principal_access_boundary_policy_bindings 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.search_principal_access_boundary_policy_bindings ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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.search_principal_access_boundary_policy_bindings({ 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.search_principal_access_boundary_policy_bindings(::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb deleted file mode 100644 index 383ccdb82c26..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb +++ /dev/null @@ -1,515 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/iam/v3/principal_access_boundary_policies_service_pb" -require "google/iam/v3/principal_access_boundary_policies" - -class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - principal_access_boundary_policy_id = "hello world" - principal_access_boundary_policy = {} - validate_only = true - - create_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["principal_access_boundary_policy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_principal_access_boundary_policy_client_stub do - # Create client - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_principal_access_boundary_policy ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_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_principal_access_boundary_policy(::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only), grpc_options) do |response, operation| - assert_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_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_get_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::PrincipalAccessBoundaryPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_principal_access_boundary_policy_client_stub do - # Create client - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_principal_access_boundary_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_principal_access_boundary_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_principal_access_boundary_policy ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_principal_access_boundary_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_principal_access_boundary_policy(::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_update_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - principal_access_boundary_policy = {} - validate_only = true - update_mask = {} - - update_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] - assert_equal true, request["validate_only"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_principal_access_boundary_policy_client_stub do - # Create client - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy(::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_delete_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_principal_access_boundary_policy_client_stub do - # Create client - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy(::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_list_principal_access_boundary_policies - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_principal_access_boundary_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_principal_access_boundary_policies, name - assert_kind_of ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, 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_principal_access_boundary_policies_client_stub do - # Create client - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_principal_access_boundary_policies({ 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_principal_access_boundary_policies 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_principal_access_boundary_policies ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies({ 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_principal_access_boundary_policies(::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_rpc_count - end - end - - def test_search_principal_access_boundary_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_principal_access_boundary_policy_bindings, name - assert_kind_of ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, 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, search_principal_access_boundary_policy_bindings_client_stub do - # Create client - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_principal_access_boundary_policy_bindings({ 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.search_principal_access_boundary_policy_bindings 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.search_principal_access_boundary_policy_bindings ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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.search_principal_access_boundary_policy_bindings({ 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.search_principal_access_boundary_policy_bindings(::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v3/test/helper.rb b/owl-bot-staging/google-iam-v3/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-iam-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-iam-v3beta/.gitignore b/owl-bot-staging/google-iam-v3beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-iam-v3beta/.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-iam-v3beta/.repo-metadata.json b/owl-bot-staging/google-iam-v3beta/.repo-metadata.json deleted file mode 100644 index ef94dec23f48..000000000000 --- a/owl-bot-staging/google-iam-v3beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "iam.googleapis.com", - "api_shortname": "iam", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-iam-v3beta/latest", - "distribution_name": "google-iam-v3beta", - "is_cloud": true, - "language": "ruby", - "name": "iam", - "name_pretty": "Identity and Access Management (IAM) V3BETA API", - "product_documentation": "https://cloud.google.com/iam/docs/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3beta is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/iam/docs/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-iam-v3beta/.rubocop.yml b/owl-bot-staging/google-iam-v3beta/.rubocop.yml deleted file mode 100644 index b142b763dfa7..000000000000 --- a/owl-bot-staging/google-iam-v3beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-iam-v3beta.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-iam-v3beta.rb" diff --git a/owl-bot-staging/google-iam-v3beta/.toys.rb b/owl-bot-staging/google-iam-v3beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-iam-v3beta/.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-iam-v3beta/.yardopts b/owl-bot-staging/google-iam-v3beta/.yardopts deleted file mode 100644 index 10df2b7003ed..000000000000 --- a/owl-bot-staging/google-iam-v3beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Identity and Access Management (IAM) V3BETA 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-iam-v3beta/AUTHENTICATION.md b/owl-bot-staging/google-iam-v3beta/AUTHENTICATION.md deleted file mode 100644 index 27d31ca1f47f..000000000000 --- a/owl-bot-staging/google-iam-v3beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-iam-v3beta 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-iam-v3beta 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/iam/v3beta" - -client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/iam/v3beta" - -::Google::Iam::V3beta::PolicyBindings::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Iam::V3beta::PolicyBindings::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-iam-v3beta -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/iam/v3beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Iam::V3beta::PolicyBindings::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-iam-v3beta/CHANGELOG.md b/owl-bot-staging/google-iam-v3beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-iam-v3beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-iam-v3beta/Gemfile b/owl-bot-staging/google-iam-v3beta/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/LICENSE.md b/owl-bot-staging/google-iam-v3beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/README.md b/owl-bot-staging/google-iam-v3beta/README.md deleted file mode 100644 index cba8c6d0bb77..000000000000 --- a/owl-bot-staging/google-iam-v3beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Identity and Access Management (IAM) V3BETA API - -Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. - -Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials 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 Identity and Access Management (IAM) V3BETA API. Most users should consider using -the main client gem, -[google-iam](https://rubygems.org/gems/google-iam). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-iam-v3beta -``` - -## 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/iam.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/iam/v3beta" - -client = ::Google::Iam::V3beta::PolicyBindings::Client.new -request = ::Google::Iam::V3beta::CreatePolicyBindingRequest.new # (request fields as keyword arguments...) -response = client.create_policy_binding request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-iam-v3beta/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/iam/docs/overview) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/iam/v3beta" -require "logger" - -client = ::Google::Iam::V3beta::PolicyBindings::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-iam`, -and lower-level _versioned_ client libraries with names such as -`google-iam-v3beta`. -_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-iam`. -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-iam-v3beta`. - -### 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-iam-v3beta/Rakefile b/owl-bot-staging/google-iam-v3beta/Rakefile deleted file mode 100644 index 911338f6029f..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta 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/iam/v3beta/policy_bindings/credentials" - ::Google::Iam::V3beta::PolicyBindings::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-iam-v3beta 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-iam-v3beta 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-iam-v3beta 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-iam-v3beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-iam-v3beta" - header "google-iam-v3beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-iam-v3beta yard", "*" - Rake::Task[:yard].invoke - header "google-iam-v3beta 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-iam-v3beta 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-iam-v3beta 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-iam-v3beta/gapic_metadata.json b/owl-bot-staging/google-iam-v3beta/gapic_metadata.json deleted file mode 100644 index 5aec57c62173..000000000000 --- a/owl-bot-staging/google-iam-v3beta/gapic_metadata.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.iam.v3beta", - "libraryPackage": "::Google::Iam::V3beta", - "services": { - "PolicyBindings": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V3beta::PolicyBindings::Client", - "rpcs": { - "CreatePolicyBinding": { - "methods": [ - "create_policy_binding" - ] - }, - "GetPolicyBinding": { - "methods": [ - "get_policy_binding" - ] - }, - "UpdatePolicyBinding": { - "methods": [ - "update_policy_binding" - ] - }, - "DeletePolicyBinding": { - "methods": [ - "delete_policy_binding" - ] - }, - "ListPolicyBindings": { - "methods": [ - "list_policy_bindings" - ] - }, - "SearchTargetPolicyBindings": { - "methods": [ - "search_target_policy_bindings" - ] - } - } - } - } - }, - "PrincipalAccessBoundaryPolicies": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client", - "rpcs": { - "CreatePrincipalAccessBoundaryPolicy": { - "methods": [ - "create_principal_access_boundary_policy" - ] - }, - "GetPrincipalAccessBoundaryPolicy": { - "methods": [ - "get_principal_access_boundary_policy" - ] - }, - "UpdatePrincipalAccessBoundaryPolicy": { - "methods": [ - "update_principal_access_boundary_policy" - ] - }, - "DeletePrincipalAccessBoundaryPolicy": { - "methods": [ - "delete_principal_access_boundary_policy" - ] - }, - "ListPrincipalAccessBoundaryPolicies": { - "methods": [ - "list_principal_access_boundary_policies" - ] - }, - "SearchPrincipalAccessBoundaryPolicyBindings": { - "methods": [ - "search_principal_access_boundary_policy_bindings" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec b/owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec deleted file mode 100644 index 17bc1cf0bcb8..000000000000 --- a/owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/iam/v3beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-iam-v3beta" - gem.version = Google::Iam::V3beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3beta is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details." - gem.summary = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials 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-iam-v3beta/lib/google-iam-v3beta.rb b/owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.rb deleted file mode 100644 index 462c76ed1789..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.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/iam/v3beta" diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb deleted file mode 100644 index 4b1633c7c84e..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v3beta/policy_bindings" -require "google/iam/v3beta/principal_access_boundary_policies" -require "google/iam/v3beta/version" - -module Google - module Iam - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/iam/v3beta" - # client = ::Google::Iam::V3beta::PolicyBindings::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/iam/v3beta" - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - module V3beta - end - end -end - -helper_path = ::File.join __dir__, "v3beta", "_helpers.rb" -require "google/iam/v3beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb deleted file mode 100644 index 84f3e0210548..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/operation_metadata.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n*google/iam/v3beta/operation_metadata.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x42\x94\x01\n\x15\x63om.google.iam.v3betaB\x16OperationMetadataProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.OperationMetadata").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb deleted file mode 100644 index 8062797ff505..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/policy_binding_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n0google/iam/v3beta/policy_binding_resources.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xe2\x07\n\rPolicyBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12K\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x31.google.iam.v3beta.PolicyBinding.AnnotationsEntryB\x03\xe0\x41\x01\x12?\n\x06target\x18\x06 \x01(\x0b\x32\'.google.iam.v3beta.PolicyBinding.TargetB\x06\xe0\x41\x05\xe0\x41\x02\x12\x45\n\x0bpolicy_kind\x18\x0b \x01(\x0e\x32+.google.iam.v3beta.PolicyBinding.PolicyKindB\x03\xe0\x41\x05\x12\x16\n\x06policy\x18\x07 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x17\n\npolicy_uid\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12)\n\tcondition\x18\x08 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\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\x1a\x30\n\x06Target\x12\x1c\n\rprincipal_set\x18\x01 \x01(\tB\x03\xe0\x41\x05H\x00\x42\x08\n\x06target\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"H\n\nPolicyKind\x12\x1b\n\x17POLICY_KIND_UNSPECIFIED\x10\x00\x12\x1d\n\x19PRINCIPAL_ACCESS_BOUNDARY\x10\x01:\xa8\x02\xea\x41\xa4\x02\n iam.googleapis.com/PolicyBinding\x12Qorganizations/{organization}/locations/{location}/policyBindings/{policy_binding}\x12\x45\x66olders/{folder}/locations/{location}/policyBindings/{policy_binding}\x12Gprojects/{project}/locations/{location}/policyBindings/{policy_binding}*\x0epolicyBindings2\rpolicyBindingB\x99\x01\n\x15\x63om.google.iam.v3betaB\x1bPolicyBindingResourcesProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - PolicyBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PolicyBinding").msgclass - PolicyBinding::Target = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PolicyBinding.Target").msgclass - PolicyBinding::PolicyKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PolicyBinding.PolicyKind").enummodule - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb deleted file mode 100644 index 8c10eab801a6..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.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/iam/v3beta/version" - -require "google/iam/v3beta/policy_bindings/credentials" -require "google/iam/v3beta/policy_bindings/paths" -require "google/iam/v3beta/policy_bindings/operations" -require "google/iam/v3beta/policy_bindings/client" -require "google/iam/v3beta/policy_bindings/rest" - -module Google - module Iam - module V3beta - ## - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v3beta/policy_bindings" - # client = ::Google::Iam::V3beta::PolicyBindings::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v3beta/policy_bindings/rest" - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - module PolicyBindings - end - end - end -end - -helper_path = ::File.join __dir__, "policy_bindings", "helpers.rb" -require "google/iam/v3beta/policy_bindings/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb deleted file mode 100644 index cbaf01af44f2..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb +++ /dev/null @@ -1,1147 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/iam/v3beta/policy_bindings_service_pb" -require "google/cloud/location" - -module Google - module Iam - module V3beta - module PolicyBindings - ## - # Client for the PolicyBindings service. - # - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :policy_bindings_stub - - ## - # Configure the PolicyBindings Client class. - # - # See {::Google::Iam::V3beta::PolicyBindings::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PolicyBindings clients - # ::Google::Iam::V3beta::PolicyBindings::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", "Iam", "V3beta"] - 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_policy_binding.timeout = 30.0 - - default_config.rpcs.get_policy_binding.timeout = 60.0 - default_config.rpcs.get_policy_binding.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_policy_binding.timeout = 30.0 - - default_config.rpcs.delete_policy_binding.timeout = 30.0 - - default_config.rpcs.list_policy_bindings.timeout = 60.0 - default_config.rpcs.list_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_target_policy_bindings.timeout = 60.0 - default_config.rpcs.search_target_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PolicyBindings 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::Iam::V3beta::PolicyBindings::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 - @policy_bindings_stub.universe_domain - end - - ## - # Create a new PolicyBindings client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PolicyBindings 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/iam/v3beta/policy_bindings_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 - - @policy_bindings_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V3beta::PolicyBindings::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 - ) - - @policy_bindings_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 = @policy_bindings_stub.endpoint - config.universe_domain = @policy_bindings_stub.universe_domain - config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3beta::PolicyBindings::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 - @policy_bindings_stub.logger - end - - # Service calls - - ## - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # Once the binding is created, the policy is applied to the target. - # - # @overload create_policy_binding(request, options = nil) - # Pass arguments to `create_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::CreatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::CreatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) - # Pass arguments to `create_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param policy_binding_id [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] - # Required. The policy binding to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::CreatePolicyBindingRequest.new - # - # # Call the create_policy_binding method. - # result = client.create_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePolicyBindingRequest - - # Converts hash and nil to 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_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :create_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a policy binding. - # - # @overload get_policy_binding(request, options = nil) - # Pass arguments to `get_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::GetPolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::GetPolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_policy_binding(name: nil) - # Pass arguments to `get_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V3beta::PolicyBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V3beta::PolicyBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::GetPolicyBindingRequest.new - # - # # Call the get_policy_binding method. - # result = client.get_policy_binding request - # - # # The returned object is of type Google::Iam::V3beta::PolicyBinding. - # p result - # - def get_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :get_policy_binding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update, and the IAM permission to remove the existing policy - # from the binding. Target is immutable and cannot be updated. Once the - # binding is updated, the new policy is applied to the target. - # - # @overload update_policy_binding(request, options = nil) - # Pass arguments to `update_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::UpdatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::UpdatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::UpdatePolicyBindingRequest.new - # - # # Call the update_policy_binding method. - # result = client.update_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePolicyBindingRequest - - # Converts hash and nil to 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_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.policy_binding&.name - header_params["policy_binding.name"] = request.policy_binding.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :update_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # Once the binding is deleted, the policy no longer applies to the target. - # - # @overload delete_policy_binding(request, options = nil) - # Pass arguments to `delete_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::DeletePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::DeletePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) - # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @param etag [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::DeletePolicyBindingRequest.new - # - # # Call the delete_policy_binding method. - # result = client.delete_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :delete_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists policy bindings. - # - # @overload list_policy_bindings(request, options = nil) - # Pass arguments to `list_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::ListPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::ListPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::ListPolicyBindingsRequest.new - # - # # Call the list_policy_bindings method. - # result = client.list_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def list_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPolicyBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :list_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - # - # @overload search_target_policy_bindings(request, options = nil) - # Pass arguments to `search_target_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil) - # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param target [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @param parent [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new - # - # # Call the search_target_policy_bindings method. - # result = client.search_target_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def search_target_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest - - # Converts hash and nil to 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_target_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_target_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :search_target_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the PolicyBindings API. - # - # This class represents the configuration for PolicyBindings, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Iam::V3beta::PolicyBindings::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_policy_binding to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3beta::PolicyBindings::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Iam::V3beta::PolicyBindings::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 = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 PolicyBindings API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_policy_binding - ## - # RPC-specific configuration for `get_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy_binding - ## - # RPC-specific configuration for `update_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy_binding - ## - # RPC-specific configuration for `delete_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_policy_binding - ## - # RPC-specific configuration for `list_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_policy_bindings - ## - # RPC-specific configuration for `search_target_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_target_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding - @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config - get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding - @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config - update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding - @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config - delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding - @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config - list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings - @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config - search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings - @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb deleted file mode 100644 index 8544d9e0da3c..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.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 "googleauth" - -module Google - module Iam - module V3beta - module PolicyBindings - # Credentials for the PolicyBindings 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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb deleted file mode 100644 index 48cd91a86578..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb +++ /dev/null @@ -1,839 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3beta - module PolicyBindings - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Iam::V3beta::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 = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb deleted file mode 100644 index b4c61be97d31..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb +++ /dev/null @@ -1,140 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 V3beta - module PolicyBindings - # Path helper methods for the PolicyBindings API. - module Paths - ## - # Create a fully-qualified FolderLocation resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}` - # - # @param folder [String] - # @param location [String] - # - # @return [::String] - def folder_location_path folder:, location: - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/locations/#{location}" - 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 OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified PolicyBinding resource string. - # - # @overload policy_binding_path(organization:, location:, policy_binding:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/policyBindings/{policy_binding}` - # - # @param organization [String] - # @param location [String] - # @param policy_binding [String] - # - # @overload policy_binding_path(folder:, location:, policy_binding:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/policyBindings/{policy_binding}` - # - # @param folder [String] - # @param location [String] - # @param policy_binding [String] - # - # @overload policy_binding_path(project:, location:, policy_binding:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/policyBindings/{policy_binding}` - # - # @param project [String] - # @param location [String] - # @param policy_binding [String] - # - # @return [::String] - def policy_binding_path **args - resources = { - "location:organization:policy_binding" => (proc do |organization:, location:, policy_binding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/policyBindings/#{policy_binding}" - end), - "folder:location:policy_binding" => (proc do |folder:, location:, policy_binding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/policyBindings/#{policy_binding}" - end), - "location:policy_binding:project" => (proc do |project:, location:, policy_binding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/policyBindings/#{policy_binding}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb deleted file mode 100644 index 8d9da90d458b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/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/iam/v3beta/version" - -require "google/iam/v3beta/policy_bindings/credentials" -require "google/iam/v3beta/policy_bindings/paths" -require "google/iam/v3beta/policy_bindings/rest/operations" -require "google/iam/v3beta/policy_bindings/rest/client" - -module Google - module Iam - module V3beta - ## - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v3beta/policy_bindings/rest" - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - module PolicyBindings - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v3beta/policy_bindings/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb deleted file mode 100644 index 25f5f29c0fe8..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb +++ /dev/null @@ -1,1062 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/iam/v3beta/policy_bindings_service_pb" -require "google/iam/v3beta/policy_bindings/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V3beta - module PolicyBindings - module Rest - ## - # REST client for the PolicyBindings service. - # - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :policy_bindings_stub - - ## - # Configure the PolicyBindings Client class. - # - # See {::Google::Iam::V3beta::PolicyBindings::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PolicyBindings clients - # ::Google::Iam::V3beta::PolicyBindings::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", "Iam", "V3beta"] - 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_policy_binding.timeout = 30.0 - - default_config.rpcs.get_policy_binding.timeout = 60.0 - default_config.rpcs.get_policy_binding.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_policy_binding.timeout = 30.0 - - default_config.rpcs.delete_policy_binding.timeout = 30.0 - - default_config.rpcs.list_policy_bindings.timeout = 60.0 - default_config.rpcs.list_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_target_policy_bindings.timeout = 60.0 - default_config.rpcs.search_target_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PolicyBindings 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::Iam::V3beta::PolicyBindings::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 - @policy_bindings_stub.universe_domain - end - - ## - # Create a new PolicyBindings REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PolicyBindings 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::Iam::V3beta::PolicyBindings::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 - - @policy_bindings_stub = ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @policy_bindings_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 = @policy_bindings_stub.endpoint - config.universe_domain = @policy_bindings_stub.universe_domain - config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3beta::PolicyBindings::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 - @policy_bindings_stub.logger - end - - # Service calls - - ## - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # Once the binding is created, the policy is applied to the target. - # - # @overload create_policy_binding(request, options = nil) - # Pass arguments to `create_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::CreatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::CreatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) - # Pass arguments to `create_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param policy_binding_id [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] - # Required. The policy binding to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::CreatePolicyBindingRequest.new - # - # # Call the create_policy_binding method. - # result = client.create_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePolicyBindingRequest - - # Converts hash and nil to an 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_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.create_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a policy binding. - # - # @overload get_policy_binding(request, options = nil) - # Pass arguments to `get_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::GetPolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::GetPolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_policy_binding(name: nil) - # Pass arguments to `get_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V3beta::PolicyBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::PolicyBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::GetPolicyBindingRequest.new - # - # # Call the get_policy_binding method. - # result = client.get_policy_binding request - # - # # The returned object is of type Google::Iam::V3beta::PolicyBinding. - # p result - # - def get_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.get_policy_binding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update, and the IAM permission to remove the existing policy - # from the binding. Target is immutable and cannot be updated. Once the - # binding is updated, the new policy is applied to the target. - # - # @overload update_policy_binding(request, options = nil) - # Pass arguments to `update_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::UpdatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::UpdatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::UpdatePolicyBindingRequest.new - # - # # Call the update_policy_binding method. - # result = client.update_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePolicyBindingRequest - - # Converts hash and nil to an 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_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.update_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # Once the binding is deleted, the policy no longer applies to the target. - # - # @overload delete_policy_binding(request, options = nil) - # Pass arguments to `delete_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::DeletePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::DeletePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) - # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @param etag [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::DeletePolicyBindingRequest.new - # - # # Call the delete_policy_binding method. - # result = client.delete_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.delete_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists policy bindings. - # - # @overload list_policy_bindings(request, options = nil) - # Pass arguments to `list_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::ListPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::ListPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::ListPolicyBindingsRequest.new - # - # # Call the list_policy_bindings method. - # result = client.list_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def list_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPolicyBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.list_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, "policy_bindings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - # - # @overload search_target_policy_bindings(request, options = nil) - # Pass arguments to `search_target_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil) - # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param target [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @param parent [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new - # - # # Call the search_target_policy_bindings method. - # result = client.search_target_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def search_target_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest - - # Converts hash and nil to an 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_target_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_target_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.search_target_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, "policy_bindings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the PolicyBindings REST API. - # - # This class represents the configuration for PolicyBindings 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::Iam::V3beta::PolicyBindings::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_policy_binding to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3beta::PolicyBindings::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 PolicyBindings API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_policy_binding - ## - # RPC-specific configuration for `get_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy_binding - ## - # RPC-specific configuration for `update_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy_binding - ## - # RPC-specific configuration for `delete_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_policy_binding - ## - # RPC-specific configuration for `list_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_policy_bindings - ## - # RPC-specific configuration for `search_target_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_target_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding - @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config - get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding - @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config - update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding - @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config - delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding - @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config - list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings - @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config - search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings - @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb deleted file mode 100644 index a659cab4d859..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb +++ /dev/null @@ -1,937 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3beta - module PolicyBindings - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb deleted file mode 100644 index ce126e354617..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb +++ /dev/null @@ -1,535 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v3beta/policy_bindings_service_pb" - -module Google - module Iam - module V3beta - module PolicyBindings - module Rest - ## - # REST service stub for the PolicyBindings 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_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::CreatePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::GetPolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::PolicyBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::PolicyBinding] - # A result object deserialized from the server's reply - def get_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::PolicyBinding.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_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::UpdatePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::DeletePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::ListPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::ListPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::ListPolicyBindingsResponse] - # A result object deserialized from the server's reply - def list_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::ListPolicyBindingsResponse.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_target_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::SearchTargetPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse] - # A result object deserialized from the server's reply - def search_target_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_target_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "search_target_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse.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_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::CreatePolicyBindingRequest] - # 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_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::GetPolicyBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::UpdatePolicyBindingRequest] - # 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_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::DeletePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::ListPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_target_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest] - # 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_target_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb deleted file mode 100644 index 0398541a7af3..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/policy_bindings_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/iam/v3beta/operation_metadata_pb' -require 'google/iam/v3beta/policy_binding_resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n/google/iam/v3beta/policy_bindings_service.proto\x12\x11google.iam.v3beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/iam/v3beta/operation_metadata.proto\x1a\x30google/iam/v3beta/policy_binding_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xd1\x01\n\x1a\x43reatePolicyBindingRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x1e\n\x11policy_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x0epolicy_binding\x18\x03 \x01(\x0b\x32 .google.iam.v3beta.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"Q\n\x17GetPolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\"\xad\x01\n\x1aUpdatePolicyBindingRequest\x12=\n\x0epolicy_binding\x18\x01 \x01(\x0b\x32 .google.iam.v3beta.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x83\x01\n\x1a\x44\x65letePolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x9b\x01\n\x19ListPolicyBindingsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x16\n\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\"u\n\x1aListPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n!SearchTargetPolicyBindingsRequest\x12\x13\n\x06target\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\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\x38\n\x06parent\x18\x05 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\"}\n\"SearchTargetPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\x8c\x12\n\x0ePolicyBindings\x12\x9c\x03\n\x13\x43reatePolicyBinding\x12-.google.iam.v3beta.CreatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\'parent,policy_binding,policy_binding_id\x82\xd3\xe4\x93\x02\xe0\x01\"6/v3beta/{parent=projects/*/locations/*}/policyBindings:\x0epolicy_bindingZG\"5/v3beta/{parent=folders/*/locations/*}/policyBindings:\x0epolicy_bindingZM\";/v3beta/{parent=organizations/*/locations/*}/policyBindings:\x0epolicy_binding\x12\xa1\x02\n\x10GetPolicyBinding\x12*.google.iam.v3beta.GetPolicyBindingRequest\x1a .google.iam.v3beta.PolicyBinding\"\xbe\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb0\x01\x12\x36/v3beta/{name=projects/*/locations/*/policyBindings/*}Z7\x12\x35/v3beta/{name=folders/*/locations/*/policyBindings/*}Z=\x12;/v3beta/{name=organizations/*/locations/*/policyBindings/*}\x12\xbc\x03\n\x13UpdatePolicyBinding\x12-.google.iam.v3beta.UpdatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xd6\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\x1apolicy_binding,update_mask\x82\xd3\xe4\x93\x02\x8d\x02\x32\x45/v3beta/{policy_binding.name=projects/*/locations/*/policyBindings/*}:\x0epolicy_bindingZV2D/v3beta/{policy_binding.name=folders/*/locations/*/policyBindings/*}:\x0epolicy_bindingZ\\2J/v3beta/{policy_binding.name=organizations/*/locations/*/policyBindings/*}:\x0epolicy_binding\x12\xd1\x02\n\x13\x44\x65letePolicyBinding\x12-.google.iam.v3beta.DeletePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xeb\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb0\x01*6/v3beta/{name=projects/*/locations/*/policyBindings/*}Z7*5/v3beta/{name=folders/*/locations/*/policyBindings/*}Z=*;/v3beta/{name=organizations/*/locations/*/policyBindings/*}\x12\xb4\x02\n\x12ListPolicyBindings\x12,.google.iam.v3beta.ListPolicyBindingsRequest\x1a-.google.iam.v3beta.ListPolicyBindingsResponse\"\xc0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb0\x01\x12\x36/v3beta/{parent=projects/*/locations/*}/policyBindingsZ7\x12\x35/v3beta/{parent=folders/*/locations/*}/policyBindingsZ=\x12;/v3beta/{parent=organizations/*/locations/*}/policyBindings\x12\xa4\x03\n\x1aSearchTargetPolicyBindings\x12\x34.google.iam.v3beta.SearchTargetPolicyBindingsRequest\x1a\x35.google.iam.v3beta.SearchTargetPolicyBindingsResponse\"\x98\x02\xda\x41\rparent,target\x82\xd3\xe4\x93\x02\x81\x02\x12Q/v3beta/{parent=projects/*/locations/*}/policyBindings:searchTargetPolicyBindingsZR\x12P/v3beta/{parent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindingsZX\x12V/v3beta/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc4\x02\n\x15\x63om.google.iam.v3betaB\x1aPolicyBindingsServiceProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3beta\xea\x41\\\n\'iam.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41J\n!iam.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - CreatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.CreatePolicyBindingRequest").msgclass - GetPolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.GetPolicyBindingRequest").msgclass - UpdatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.UpdatePolicyBindingRequest").msgclass - DeletePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.DeletePolicyBindingRequest").msgclass - ListPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPolicyBindingsRequest").msgclass - ListPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPolicyBindingsResponse").msgclass - SearchTargetPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchTargetPolicyBindingsRequest").msgclass - SearchTargetPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchTargetPolicyBindingsResponse").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb deleted file mode 100644 index 4529103991f0..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb +++ /dev/null @@ -1,63 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v3beta/policy_bindings_service.proto for package 'google.iam.v3beta' -# 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/iam/v3beta/policy_bindings_service_pb' - -module Google - module Iam - module V3beta - module PolicyBindings - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v3beta.PolicyBindings' - - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # Once the binding is created, the policy is applied to the target. - rpc :CreatePolicyBinding, ::Google::Iam::V3beta::CreatePolicyBindingRequest, ::Google::Longrunning::Operation - # Gets a policy binding. - rpc :GetPolicyBinding, ::Google::Iam::V3beta::GetPolicyBindingRequest, ::Google::Iam::V3beta::PolicyBinding - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update, and the IAM permission to remove the existing policy - # from the binding. Target is immutable and cannot be updated. Once the - # binding is updated, the new policy is applied to the target. - rpc :UpdatePolicyBinding, ::Google::Iam::V3beta::UpdatePolicyBindingRequest, ::Google::Longrunning::Operation - # Deletes a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # Once the binding is deleted, the policy no longer applies to the target. - rpc :DeletePolicyBinding, ::Google::Iam::V3beta::DeletePolicyBindingRequest, ::Google::Longrunning::Operation - # Lists policy bindings. - rpc :ListPolicyBindings, ::Google::Iam::V3beta::ListPolicyBindingsRequest, ::Google::Iam::V3beta::ListPolicyBindingsResponse - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - rpc :SearchTargetPolicyBindings, ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb deleted file mode 100644 index 131df2f35581..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.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/iam/v3beta/version" - -require "google/iam/v3beta/principal_access_boundary_policies/credentials" -require "google/iam/v3beta/principal_access_boundary_policies/paths" -require "google/iam/v3beta/principal_access_boundary_policies/operations" -require "google/iam/v3beta/principal_access_boundary_policies/client" -require "google/iam/v3beta/principal_access_boundary_policies/rest" - -module Google - module Iam - module V3beta - ## - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v3beta/principal_access_boundary_policies" - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v3beta/principal_access_boundary_policies/rest" - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - module PrincipalAccessBoundaryPolicies - end - end - end -end - -helper_path = ::File.join __dir__, "principal_access_boundary_policies", "helpers.rb" -require "google/iam/v3beta/principal_access_boundary_policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb deleted file mode 100644 index 57d78114a8d3..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb +++ /dev/null @@ -1,1100 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/iam/v3beta/principal_access_boundary_policies_service_pb" -require "google/cloud/location" - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - ## - # Client for the PrincipalAccessBoundaryPolicies service. - # - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :principal_access_boundary_policies_stub - - ## - # Configure the PrincipalAccessBoundaryPolicies Client class. - # - # See {::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients - # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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", "Iam", "V3beta"] - 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_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 - default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 - default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 - default_config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.universe_domain - end - - ## - # Create a new PrincipalAccessBoundaryPolicies client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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/iam/v3beta/principal_access_boundary_policies_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 - - @principal_access_boundary_policies_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 - ) - - @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint - config.universe_domain = @principal_access_boundary_policies_stub.universe_domain - config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.logger - end - - # Service calls - - ## - # Creates a principal access boundary policy, and returns a long running - # operation. - # - # @overload create_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) - # Pass arguments to `create_principal_access_boundary_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 parent [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param principal_access_boundary_policy_id [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the create_principal_access_boundary_policy method. - # result = client.create_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to 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_principal_access_boundary_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :create_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. - # - # @overload get_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_principal_access_boundary_policy(name: nil) - # Pass arguments to `get_principal_access_boundary_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 name [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new - # - # # Call the get_principal_access_boundary_policy method. - # result = client.get_principal_access_boundary_policy request - # - # # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - # p result - # - def get_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_principal_access_boundary_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :get_principal_access_boundary_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 - - ## - # Updates a principal access boundary policy. - # - # @overload update_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_principal_access_boundary_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 principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the update_principal_access_boundary_policy method. - # result = client.update_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to 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_principal_access_boundary_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.principal_access_boundary_policy&.name - header_params["principal_access_boundary_policy.name"] = request.principal_access_boundary_policy.name - end - - request_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_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :update_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. - # - # @overload delete_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_principal_access_boundary_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 name [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param etag [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the delete_principal_access_boundary_policy method. - # result = client.delete_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_principal_access_boundary_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :delete_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policies. - # - # @overload list_principal_access_boundary_policies(request, options = nil) - # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type - # {::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new - # - # # Call the list_principal_access_boundary_policies method. - # result = client.list_principal_access_boundary_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - # p item - # end - # - def list_principal_access_boundary_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :list_principal_access_boundary_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, 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 all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_principal_access_boundary_policy_bindings(request, options = nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - # - # # Call the search_principal_access_boundary_policy_bindings method. - # result = client.search_principal_access_boundary_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def search_principal_access_boundary_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest - - # Converts hash and nil to 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_principal_access_boundary_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_principal_access_boundary_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :search_principal_access_boundary_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the PrincipalAccessBoundaryPolicies API. - # - # This class represents the configuration for PrincipalAccessBoundaryPolicies, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_principal_access_boundary_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 PrincipalAccessBoundaryPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_principal_access_boundary_policy - ## - # RPC-specific configuration for `get_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_principal_access_boundary_policy - ## - # RPC-specific configuration for `update_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_principal_access_boundary_policy - ## - # RPC-specific configuration for `delete_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_principal_access_boundary_policy - ## - # RPC-specific configuration for `list_principal_access_boundary_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_principal_access_boundary_policies - ## - # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_principal_access_boundary_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy - @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config - get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy - @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config - update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy - @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config - delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy - @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config - list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies - @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config - search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings - @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb deleted file mode 100644 index faa2a134d021..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.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 "googleauth" - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - # Credentials for the PrincipalAccessBoundaryPolicies 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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb deleted file mode 100644 index 85069923da0c..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb +++ /dev/null @@ -1,839 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3beta - module PrincipalAccessBoundaryPolicies - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Iam::V3beta::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 = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb deleted file mode 100644 index 5c221ecd1178..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.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! - - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - # Path helper methods for the PrincipalAccessBoundaryPolicies API. - module Paths - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified PrincipalAccessBoundaryPolicy resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}` - # - # @param organization [String] - # @param location [String] - # @param principal_access_boundary_policy [String] - # - # @return [::String] - def principal_access_boundary_policy_path organization:, location:, principal_access_boundary_policy: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/principalAccessBoundaryPolicies/#{principal_access_boundary_policy}" - end - - extend self - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb deleted file mode 100644 index a46c2f64c9d5..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/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/iam/v3beta/version" - -require "google/iam/v3beta/principal_access_boundary_policies/credentials" -require "google/iam/v3beta/principal_access_boundary_policies/paths" -require "google/iam/v3beta/principal_access_boundary_policies/rest/operations" -require "google/iam/v3beta/principal_access_boundary_policies/rest/client" - -module Google - module Iam - module V3beta - ## - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v3beta/principal_access_boundary_policies/rest" - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - module PrincipalAccessBoundaryPolicies - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v3beta/principal_access_boundary_policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb deleted file mode 100644 index 91e0a67c013b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb +++ /dev/null @@ -1,1015 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/iam/v3beta/principal_access_boundary_policies_service_pb" -require "google/iam/v3beta/principal_access_boundary_policies/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - module Rest - ## - # REST client for the PrincipalAccessBoundaryPolicies service. - # - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :principal_access_boundary_policies_stub - - ## - # Configure the PrincipalAccessBoundaryPolicies Client class. - # - # See {::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients - # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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", "Iam", "V3beta"] - 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_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 - default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 - default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 - default_config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.universe_domain - end - - ## - # Create a new PrincipalAccessBoundaryPolicies REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 - - @principal_access_boundary_policies_stub = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint - config.universe_domain = @principal_access_boundary_policies_stub.universe_domain - config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.logger - end - - # Service calls - - ## - # Creates a principal access boundary policy, and returns a long running - # operation. - # - # @overload create_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) - # Pass arguments to `create_principal_access_boundary_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 parent [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param principal_access_boundary_policy_id [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the create_principal_access_boundary_policy method. - # result = client.create_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an 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_principal_access_boundary_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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.create_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. - # - # @overload get_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_principal_access_boundary_policy(name: nil) - # Pass arguments to `get_principal_access_boundary_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 name [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new - # - # # Call the get_principal_access_boundary_policy method. - # result = client.get_principal_access_boundary_policy request - # - # # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - # p result - # - def get_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_principal_access_boundary_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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.get_principal_access_boundary_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 - - ## - # Updates a principal access boundary policy. - # - # @overload update_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_principal_access_boundary_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 principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the update_principal_access_boundary_policy method. - # result = client.update_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an 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_principal_access_boundary_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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.update_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. - # - # @overload delete_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_principal_access_boundary_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 name [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param etag [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the delete_principal_access_boundary_policy method. - # result = client.delete_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_principal_access_boundary_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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.delete_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policies. - # - # @overload list_principal_access_boundary_policies(request, options = nil) - # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type - # {::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new - # - # # Call the list_principal_access_boundary_policies method. - # result = client.list_principal_access_boundary_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - # p item - # end - # - def list_principal_access_boundary_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.list_principal_access_boundary_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, "principal_access_boundary_policies", request, result, 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 all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_principal_access_boundary_policy_bindings(request, options = nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - # - # # Call the search_principal_access_boundary_policy_bindings method. - # result = client.search_principal_access_boundary_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def search_principal_access_boundary_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest - - # Converts hash and nil to an 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_principal_access_boundary_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.search_principal_access_boundary_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, "policy_bindings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the PrincipalAccessBoundaryPolicies REST API. - # - # This class represents the configuration for PrincipalAccessBoundaryPolicies 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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 PrincipalAccessBoundaryPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_principal_access_boundary_policy - ## - # RPC-specific configuration for `get_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_principal_access_boundary_policy - ## - # RPC-specific configuration for `update_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_principal_access_boundary_policy - ## - # RPC-specific configuration for `delete_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_principal_access_boundary_policy - ## - # RPC-specific configuration for `list_principal_access_boundary_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_principal_access_boundary_policies - ## - # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_principal_access_boundary_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy - @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config - get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy - @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config - update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy - @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config - delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy - @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config - list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies - @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config - search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings - @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb deleted file mode 100644 index 70eff442deb0..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb +++ /dev/null @@ -1,937 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3beta - module PrincipalAccessBoundaryPolicies - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb deleted file mode 100644 index e36e1d4e8f56..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb +++ /dev/null @@ -1,447 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v3beta/principal_access_boundary_policies_service_pb" - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - module Rest - ## - # REST service stub for the PrincipalAccessBoundaryPolicies 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_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_principal_access_boundary_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: "create_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # A result object deserialized from the server's reply - def get_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_principal_access_boundary_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_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.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_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_principal_access_boundary_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: "update_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_principal_access_boundary_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: "delete_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_principal_access_boundary_policies REST call - # - # @param request_pb [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::ListPrincipalAccessBoundaryPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse] - # A result object deserialized from the server's reply - def list_principal_access_boundary_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_principal_access_boundary_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_principal_access_boundary_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse.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_principal_access_boundary_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse] - # A result object deserialized from the server's reply - def search_principal_access_boundary_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_principal_access_boundary_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "search_principal_access_boundary_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest] - # 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_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/principalAccessBoundaryPolicies", - body: "principal_access_boundary_policy", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest] - # 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_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{principal_access_boundary_policy.name}", - body: "principal_access_boundary_policy", - matches: [ - ["principal_access_boundary_policy.name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_principal_access_boundary_policies REST call - # - # @param request_pb [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_principal_access_boundary_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/principalAccessBoundaryPolicies", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_principal_access_boundary_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest] - # 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_principal_access_boundary_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb deleted file mode 100644 index ee829930af81..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/principal_access_boundary_policies_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/iam/v3beta/operation_metadata_pb' -require 'google/iam/v3beta/policy_binding_resources_pb' -require 'google/iam/v3beta/principal_access_boundary_policy_resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\nBgoogle/iam/v3beta/principal_access_boundary_policies_service.proto\x12\x11google.iam.v3beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/iam/v3beta/operation_metadata.proto\x1a\x30google/iam/v3beta/policy_binding_resources.proto\x1a\x42google/iam/v3beta/principal_access_boundary_policy_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa5\x02\n*CreatePrincipalAccessBoundaryPolicyRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x30\n#principal_access_boundary_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12_\n principal_access_boundary_policy\x18\x03 \x01(\x0b\x32\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"q\n\'GetPrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\"\xdf\x01\n*UpdatePrincipalAccessBoundaryPolicyRequest\x12_\n principal_access_boundary_policy\x18\x01 \x01(\x0b\x32\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb7\x01\n*DeletePrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa7\x01\n*ListPrincipalAccessBoundaryPoliciesRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa9\x01\n+ListPrincipalAccessBoundaryPoliciesResponse\x12\\\n\"principal_access_boundary_policies\x18\x01 \x03(\x0b\x32\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicy\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n2SearchPrincipalAccessBoundaryPolicyBindingsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\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\"\x8e\x01\n3SearchPrincipalAccessBoundaryPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xa8\x0f\n\x1fPrincipalAccessBoundaryPolicies\x12\xff\x02\n#CreatePrincipalAccessBoundaryPolicy\x12=.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xf9\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41Kparent,principal_access_boundary_policy,principal_access_boundary_policy_id\x82\xd3\xe4\x93\x02p\"L/v3beta/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies: principal_access_boundary_policy\x12\xed\x01\n GetPrincipalAccessBoundaryPolicy\x12:.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest\x1a\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicy\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\x12L/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\x82\x03\n#UpdatePrincipalAccessBoundaryPolicy\x12=.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xfc\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41,principal_access_boundary_policy,update_mask\x82\xd3\xe4\x93\x02\x91\x01\x32m/v3beta/{principal_access_boundary_policy.name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}: principal_access_boundary_policy\x12\x8e\x02\n#DeletePrincipalAccessBoundaryPolicy\x12=.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02N*L/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\x83\x02\n#ListPrincipalAccessBoundaryPolicies\x12=.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest\x1a>.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/v3beta/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies\x12\xae\x02\n+SearchPrincipalAccessBoundaryPolicyBindings\x12\x45.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest\x1a\x46.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse\"p\xda\x41\x04name\x82\xd3\xe4\x93\x02\x63\x12\x61/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}:searchPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa9\x01\n\x15\x63om.google.iam.v3betaB+PrincipalAccessBoundaryPoliciesServiceProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - CreatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest").msgclass - GetPrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest").msgclass - UpdatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest").msgclass - DeletePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest").msgclass - ListPrincipalAccessBoundaryPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest").msgclass - ListPrincipalAccessBoundaryPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse").msgclass - SearchPrincipalAccessBoundaryPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest").msgclass - SearchPrincipalAccessBoundaryPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb deleted file mode 100644 index 0ee7d8797ccf..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v3beta/principal_access_boundary_policies_service.proto for package 'google.iam.v3beta' -# 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/iam/v3beta/principal_access_boundary_policies_service_pb' - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v3beta.PrincipalAccessBoundaryPolicies' - - # Creates a principal access boundary policy, and returns a long running - # operation. - rpc :CreatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Gets a principal access boundary policy. - rpc :GetPrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy - # Updates a principal access boundary policy. - rpc :UpdatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Deletes a principal access boundary policy. - rpc :DeletePrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Lists principal access boundary policies. - rpc :ListPrincipalAccessBoundaryPolicies, ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - rpc :SearchPrincipalAccessBoundaryPolicyBindings, ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb deleted file mode 100644 index aeddd8701494..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/principal_access_boundary_policy_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nBgoogle/iam/v3beta/principal_access_boundary_policy_resources.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb5\x05\n\x1dPrincipalAccessBoundaryPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12[\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x41.google.iam.v3beta.PrincipalAccessBoundaryPolicy.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x07\x64\x65tails\x18\x08 \x01(\x0b\x32\x37.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsB\x03\xe0\x41\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xec\x01\xea\x41\xe8\x01\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12torganizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}*\x1fprincipalAccessBoundaryPolicies2\x1dprincipalAccessBoundaryPolicy\"\x92\x01\n$PrincipalAccessBoundaryPolicyDetails\x12H\n\x05rules\x18\x01 \x03(\x0b\x32\x34.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleB\x03\xe0\x41\x02\x12 \n\x13\x65nforcement_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xd4\x01\n!PrincipalAccessBoundaryPolicyRule\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tresources\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12P\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32;.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.EffectB\x03\xe0\x41\x02\"+\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x42\xa9\x01\n\x15\x63om.google.iam.v3betaB+PrincipalAccessBoundaryPolicyResourcesProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - PrincipalAccessBoundaryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicy").msgclass - PrincipalAccessBoundaryPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails").msgclass - PrincipalAccessBoundaryPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicyRule").msgclass - PrincipalAccessBoundaryPolicyRule::Effect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect").enummodule - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb deleted file mode 100644 index 7dd507355dde..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v3beta/policy_bindings/rest" -require "google/iam/v3beta/principal_access_boundary_policies/rest" -require "google/iam/v3beta/version" - -module Google - module Iam - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/iam/v3beta/rest" - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - module V3beta - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb deleted file mode 100644 index 738981bb3f21..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3beta - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/README.md b/owl-bot-staging/google-iam-v3beta/proto_docs/README.md deleted file mode 100644 index 536b687b8e98..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Identity and Access Management (IAM) V3BETA 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-iam-v3beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb deleted file mode 100644 index 4e4463d9171f..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.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! - - -module Google - module Iam - module V3beta - # 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 - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb deleted file mode 100644 index 8cf546427830..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb +++ /dev/null @@ -1,171 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 V3beta - # IAM policy binding resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the policy binding, in the format - # `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`. - # The binding parent is the closest Resource Manager resource (project, - # folder, or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @!attribute [r] uid - # @return [::String] - # Output only. The globally unique ID of the policy binding. Assigned when - # the policy binding is created. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the policy binding. - # If this is provided on update, it must match the server's etag. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The description of the policy binding. Must be less than or equal - # to 63 characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations - # @!attribute [rw] target - # @return [::Google::Iam::V3beta::PolicyBinding::Target] - # Required. Immutable. Target is the full resource name of the resource to - # which the policy will be bound. Immutable once set. - # @!attribute [rw] policy_kind - # @return [::Google::Iam::V3beta::PolicyBinding::PolicyKind] - # Immutable. The kind of the policy to attach in this binding. This field - # must be one of the following: - # - # - Left empty (will be automatically set to the policy kind) - # - The input policy kind - # @!attribute [rw] policy - # @return [::String] - # Required. Immutable. The resource name of the policy to be bound. The - # binding parent and policy must belong to the same organization. - # @!attribute [r] policy_uid - # @return [::String] - # Output only. The globally unique ID of the policy to be bound. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # Optional. The condition to apply to the policy binding. When set, the - # `expression` field in the `Expr` must include from 1 to 10 subexpressions, - # joined by the - # "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and - # cannot contain more than 250 characters. - # - # The condition is currently only supported when bound to policies of kind - # principal access boundary. - # - # When the bound policy is a principal access boundary policy, the only - # supported attributes in any subexpression are `principal.type` and - # `principal.subject`. An example expression is: "principal.type == - # 'iam.googleapis.com/ServiceAccount'" or "principal.subject == - # 'bob@example.com'". - # - # Allowed operations for `principal.subject`: - # - # - `principal.subject == ` - # - `principal.subject != ` - # - `principal.subject in []` - # - `principal.subject.startsWith()` - # - `principal.subject.endsWith()` - # - # Allowed operations for `principal.type`: - # - # - `principal.type == ` - # - `principal.type != ` - # - `principal.type in []` - # - # Supported principal types are Workspace, Workforce Pool, Workload Pool and - # Service Account. Allowed string must be one of: - # - # - iam.googleapis.com/WorkspaceIdentity - # - iam.googleapis.com/WorkforcePoolIdentity - # - iam.googleapis.com/WorkloadPoolIdentity - # - iam.googleapis.com/ServiceAccount - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the policy binding was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the policy binding was most recently updated. - class PolicyBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Target is the full resource name of the resource to which the policy will - # be bound. Immutable once set. - # @!attribute [rw] principal_set - # @return [::String] - # Immutable. Full Resource Name used for principal access boundary policy - # bindings. The principal set must be directly parented by the policy - # binding's parent or same as the parent if the target is a - # project/folder/organization. - # - # Examples: - # * For binding's parented by an organization: - # * Organization: - # `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` - # * Workforce Identity: - # `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID` - # * Workspace Identity: - # `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * For binding's parented by a folder: - # * Folder: - # `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` - # * For binding's parented by a project: - # * Project: - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` - # * Workload Identity Pool: - # `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID` - class Target - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Different policy kinds supported in this binding. - module PolicyKind - # Unspecified policy kind; Not a valid state - POLICY_KIND_UNSPECIFIED = 0 - - # Principal access boundary policy kind - PRINCIPAL_ACCESS_BOUNDARY = 1 - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb deleted file mode 100644 index cb39df203048..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb +++ /dev/null @@ -1,232 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 V3beta - # Request message for CreatePolicyBinding method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] policy_binding_id - # @return [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @!attribute [rw] policy_binding - # @return [::Google::Iam::V3beta::PolicyBinding] - # Required. The policy binding to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - class CreatePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetPolicyBinding method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - class GetPolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdatePolicyBinding method. - # @!attribute [rw] policy_binding - # @return [::Google::Iam::V3beta::PolicyBinding] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update - class UpdatePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeletePolicyBinding method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - class DeletePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListPolicyBindings method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - class ListPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListPolicyBindings method. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] - # The policy bindings from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchTargetPolicyBindings method. - # @!attribute [rw] target - # @return [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - class SearchTargetPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchTargetPolicyBindings method. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] - # The policy bindings bound to the specified target. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class SearchTargetPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb deleted file mode 100644 index 565de307d98b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.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 Iam - module V3beta - # Request message for CreatePrincipalAccessBoundaryPolicyRequest method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] principal_access_boundary_policy_id - # @return [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @!attribute [rw] principal_access_boundary_policy - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # Required. The principal access boundary policy to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - class CreatePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetPrincipalAccessBoundaryPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - class GetPrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdatePrincipalAccessBoundaryPolicy method. - # @!attribute [rw] principal_access_boundary_policy - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update - class UpdatePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeletePrincipalAccessBoundaryPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - class DeletePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListPrincipalAccessBoundaryPolicies method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - class ListPrincipalAccessBoundaryPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListPrincipalAccessBoundaryPolicies method. - # @!attribute [rw] principal_access_boundary_policies - # @return [::Array<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] - # The principal access boundary policies from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListPrincipalAccessBoundaryPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - class SearchPrincipalAccessBoundaryPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] - # The policy bindings that reference the specified policy. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class SearchPrincipalAccessBoundaryPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb deleted file mode 100644 index a01db22285ba..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.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 Iam - module V3beta - # An IAM principal access boundary policy resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the principal access boundary policy. - # - # The following format is supported: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}` - # @!attribute [r] uid - # @return [::String] - # Output only. The globally unique ID of the principal access boundary - # policy. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the principal access boundary. - # If this is provided on update, it must match the server's etag. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The description of the principal access boundary policy. Must be - # less than or equal to 63 characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the principal access boundary policy was - # created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the principal access boundary policy was most - # recently updated. - # @!attribute [rw] details - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicyDetails] - # Optional. The details for the principal access boundary policy. - class PrincipalAccessBoundaryPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Principal access boundary policy details - # @!attribute [rw] rules - # @return [::Array<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicyRule>] - # Required. A list of principal access boundary policy rules. The number of - # rules in a policy is limited to 500. - # @!attribute [rw] enforcement_version - # @return [::String] - # Optional. - # The version number (for example, `1` or `latest`) that indicates which - # permissions are able to be blocked by the policy. If empty, the PAB policy - # version will be set to the most recent version number at the time of the - # policy's creation. - class PrincipalAccessBoundaryPolicyDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Principal access boundary policy rule that defines the resource boundary. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the principal access boundary policy rule. - # Must be less than or equal to 256 characters. - # @!attribute [rw] resources - # @return [::Array<::String>] - # Required. A list of Resource Manager resources. If a resource is listed in - # the rule, then the rule applies for that resource and its descendants. The - # number of resources in a policy is limited to 500 across all rules in the - # policy. - # - # The following resource types are supported: - # - # * Organizations, such as - # `//cloudresourcemanager.googleapis.com/organizations/123`. - # * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`. - # * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123` - # or `//cloudresourcemanager.googleapis.com/projects/my-project-id`. - # @!attribute [rw] effect - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicyRule::Effect] - # Required. The access relationship of principals to the resources in this - # rule. - class PrincipalAccessBoundaryPolicyRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An effect to describe the access relationship. - module Effect - # Effect unspecified. - EFFECT_UNSPECIFIED = 0 - - # Allows access to the resources in this rule. - ALLOW = 1 - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/type/expr.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/snippets/Gemfile b/owl-bot-staging/google-iam-v3beta/snippets/Gemfile deleted file mode 100644 index c2385cbb7f70..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta", path: "../" -else - gem "google-iam-v3beta" -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-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb deleted file mode 100644 index 71d915589110..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync] -require "google/iam/v3beta" - -## -# Snippet for the create_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3beta::PolicyBindings::Client#create_policy_binding. -# -def create_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::CreatePolicyBindingRequest.new - - # Call the create_policy_binding method. - result = client.create_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb deleted file mode 100644 index 71f4b669183c..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync] -require "google/iam/v3beta" - -## -# Snippet for the delete_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3beta::PolicyBindings::Client#delete_policy_binding. -# -def delete_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::DeletePolicyBindingRequest.new - - # Call the delete_policy_binding method. - result = client.delete_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb deleted file mode 100644 index 95a37b3bd52d..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync] -require "google/iam/v3beta" - -## -# Snippet for the get_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3beta::PolicyBindings::Client#get_policy_binding. -# -def get_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::GetPolicyBindingRequest.new - - # Call the get_policy_binding method. - result = client.get_policy_binding request - - # The returned object is of type Google::Iam::V3beta::PolicyBinding. - p result -end -# [END iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb deleted file mode 100644 index 0f7e29a87412..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync] -require "google/iam/v3beta" - -## -# Snippet for the list_policy_bindings call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3beta::PolicyBindings::Client#list_policy_bindings. -# -def list_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::ListPolicyBindingsRequest.new - - # Call the list_policy_bindings method. - result = client.list_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - p item - end -end -# [END iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb deleted file mode 100644 index f27b0677d25b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync] -require "google/iam/v3beta" - -## -# Snippet for the search_target_policy_bindings call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3beta::PolicyBindings::Client#search_target_policy_bindings. -# -def search_target_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new - - # Call the search_target_policy_bindings method. - result = client.search_target_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - p item - end -end -# [END iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb deleted file mode 100644 index 135862214560..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync] -require "google/iam/v3beta" - -## -# Snippet for the update_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3beta::PolicyBindings::Client#update_policy_binding. -# -def update_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::UpdatePolicyBindingRequest.new - - # Call the update_policy_binding method. - result = client.update_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb deleted file mode 100644 index 5adbcf4dcc27..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.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 iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy. -# -def create_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new - - # Call the create_principal_access_boundary_policy method. - result = client.create_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb deleted file mode 100644 index 80a3f6830daa..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.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 iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy. -# -def delete_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new - - # Call the delete_principal_access_boundary_policy method. - result = client.delete_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb deleted file mode 100644 index a6c6b2d32724..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_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 iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy. -# -def get_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new - - # Call the get_principal_access_boundary_policy method. - result = client.get_principal_access_boundary_policy request - - # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - p result -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb deleted file mode 100644 index 6d15a7805873..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.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 iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] -require "google/iam/v3beta" - -## -# Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies. -# -def list_principal_access_boundary_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new - - # Call the list_principal_access_boundary_policies method. - result = client.list_principal_access_boundary_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - p item - end -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb deleted file mode 100644 index f55151327579..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] -require "google/iam/v3beta" - -## -# Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings. -# -def search_principal_access_boundary_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - - # Call the search_principal_access_boundary_policy_bindings method. - result = client.search_principal_access_boundary_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - p item - end -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb deleted file mode 100644 index 821e090ddea2..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.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 iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy. -# -def update_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new - - # Call the update_principal_access_boundary_policy method. - result = client.update_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json b/owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json deleted file mode 100644 index 5a961802393a..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json +++ /dev/null @@ -1,495 +0,0 @@ -{ - "client_library": { - "name": "google-iam-v3beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.iam.v3beta", - "version": "v3beta" - } - ] - }, - "snippets": [ - { - "region_tag": "iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync", - "title": "Snippet for the create_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#create_policy_binding.", - "file": "policy_bindings/create_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_policy_binding", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#create_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::CreatePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "CreatePolicyBinding", - "full_name": "google.iam.v3beta.PolicyBindings.CreatePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync", - "title": "Snippet for the get_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#get_policy_binding.", - "file": "policy_bindings/get_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_policy_binding", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#get_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::GetPolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::PolicyBinding", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "GetPolicyBinding", - "full_name": "google.iam.v3beta.PolicyBindings.GetPolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync", - "title": "Snippet for the update_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#update_policy_binding.", - "file": "policy_bindings/update_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_policy_binding", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#update_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::UpdatePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "UpdatePolicyBinding", - "full_name": "google.iam.v3beta.PolicyBindings.UpdatePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync", - "title": "Snippet for the delete_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#delete_policy_binding.", - "file": "policy_bindings/delete_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_policy_binding", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#delete_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::DeletePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "DeletePolicyBinding", - "full_name": "google.iam.v3beta.PolicyBindings.DeletePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync", - "title": "Snippet for the list_policy_bindings call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#list_policy_bindings.", - "file": "policy_bindings/list_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_policy_bindings", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#list_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::ListPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::ListPolicyBindingsResponse", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "ListPolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings.ListPolicyBindings", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync", - "title": "Snippet for the search_target_policy_bindings call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#search_target_policy_bindings.", - "file": "policy_bindings/search_target_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_target_policy_bindings", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#search_target_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "SearchTargetPolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings.SearchTargetPolicyBindings", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/create_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "CreatePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.CreatePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/get_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "GetPrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.GetPrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/update_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "UpdatePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.UpdatePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/delete_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "DeletePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.DeletePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync", - "title": "Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies.", - "file": "principal_access_boundary_policies/list_principal_access_boundary_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_principal_access_boundary_policies", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "ListPrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.ListPrincipalAccessBoundaryPolicies", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync", - "title": "Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings.", - "file": "principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_principal_access_boundary_policy_bindings", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "SearchPrincipalAccessBoundaryPolicyBindings", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.SearchPrincipalAccessBoundaryPolicyBindings", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "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-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb deleted file mode 100644 index 511734647747..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_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/iam/v3beta/policy_bindings_service_pb" -require "google/iam/v3beta/policy_bindings_service_services_pb" -require "google/iam/v3beta/policy_bindings" - -class ::Google::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb deleted file mode 100644 index 25795739b50c..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_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/iam/v3beta/policy_bindings" - -class ::Google::Iam::V3beta::PolicyBindings::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_folder_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_location_path folder: "value0", location: "value1" - assert_equal "folders/value0/locations/value1", 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::Iam::V3beta::PolicyBindings::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_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_policy_binding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.policy_binding_path organization: "value0", location: "value1", policy_binding: "value2" - assert_equal "organizations/value0/locations/value1/policyBindings/value2", path - - path = client.policy_binding_path folder: "value0", location: "value1", policy_binding: "value2" - assert_equal "folders/value0/locations/value1/policyBindings/value2", path - - path = client.policy_binding_path project: "value0", location: "value1", policy_binding: "value2" - assert_equal "projects/value0/locations/value1/policyBindings/value2", path - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb deleted file mode 100644 index 0caba8b8c86e..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb +++ /dev/null @@ -1,436 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/iam/v3beta/policy_bindings_service_pb" -require "google/iam/v3beta/policy_bindings/rest" - - -class ::Google::Iam::V3beta::PolicyBindings::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_policy_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - policy_binding_id = "hello world" - policy_binding = {} - validate_only = true - - create_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_create_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_policy_binding_client_stub do - # Create client - client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_policy_binding ::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_policy_binding(::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_policy_binding_client_stub.call_count - end - end - end - - def test_get_policy_binding - # Create test objects. - client_result = ::Google::Iam::V3beta::PolicyBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_get_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_policy_binding_client_stub do - # Create client - client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_policy_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_policy_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_policy_binding ::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_policy_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_policy_binding(::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_policy_binding_client_stub.call_count - end - end - end - - def test_update_policy_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - policy_binding = {} - validate_only = true - update_mask = {} - - update_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_update_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_policy_binding_client_stub do - # Create client - client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_policy_binding policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_policy_binding ::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_policy_binding(::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_policy_binding_client_stub.call_count - end - end - end - - def test_delete_policy_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - - delete_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_delete_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_policy_binding_client_stub do - # Create client - client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_policy_binding ::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_policy_binding(::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_policy_binding_client_stub.call_count - end - end - end - - def test_list_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3beta::ListPolicyBindingsResponse.new - http_response = OpenStruct.new 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_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_list_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_policy_bindings_client_stub do - # Create client - client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_policy_bindings({ 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_policy_bindings 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_policy_bindings ::Google::Iam::V3beta::ListPolicyBindingsRequest.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_policy_bindings({ 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_policy_bindings(::Google::Iam::V3beta::ListPolicyBindingsRequest.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_policy_bindings_client_stub.call_count - end - end - end - - def test_search_target_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - target = "hello world" - page_size = 42 - page_token = "hello world" - parent = "hello world" - - search_target_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_search_target_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_target_policy_bindings_client_stub do - # Create client - client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_target_policy_bindings ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.search_target_policy_bindings(::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_target_policy_bindings_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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb deleted file mode 100644 index 29374042c006..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb +++ /dev/null @@ -1,517 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/iam/v3beta/policy_bindings_service_pb" -require "google/iam/v3beta/policy_bindings" - -class ::Google::Iam::V3beta::PolicyBindings::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_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - policy_binding_id = "hello world" - policy_binding = {} - validate_only = true - - create_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_policy_binding, name - assert_kind_of ::Google::Iam::V3beta::CreatePolicyBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["policy_binding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PolicyBinding), request["policy_binding"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_policy_binding_client_stub do - # Create client - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_policy_binding ::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_policy_binding(::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_policy_binding_client_stub.call_rpc_count - end - end - - def test_get_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::PolicyBinding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_policy_binding, name - assert_kind_of ::Google::Iam::V3beta::GetPolicyBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_policy_binding_client_stub do - # Create client - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_policy_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_policy_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_policy_binding ::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_policy_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_policy_binding(::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_policy_binding_client_stub.call_rpc_count - end - end - - def test_update_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - policy_binding = {} - validate_only = true - update_mask = {} - - update_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_policy_binding, name - assert_kind_of ::Google::Iam::V3beta::UpdatePolicyBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PolicyBinding), request["policy_binding"] - assert_equal true, request["validate_only"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_policy_binding_client_stub do - # Create client - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding ::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding(::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, 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_policy_binding_client_stub.call_rpc_count - end - end - - def test_delete_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - - delete_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_policy_binding, name - assert_kind_of ::Google::Iam::V3beta::DeletePolicyBindingRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_policy_binding_client_stub do - # Create client - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_policy_binding ::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_policy_binding(::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_policy_binding_client_stub.call_rpc_count - end - end - - def test_list_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::ListPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_policy_bindings, name - assert_kind_of ::Google::Iam::V3beta::ListPolicyBindingsRequest, 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_policy_bindings_client_stub do - # Create client - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_policy_bindings({ 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_policy_bindings 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_policy_bindings ::Google::Iam::V3beta::ListPolicyBindingsRequest.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_policy_bindings({ 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_policy_bindings(::Google::Iam::V3beta::ListPolicyBindingsRequest.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_policy_bindings_client_stub.call_rpc_count - end - end - - def test_search_target_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - target = "hello world" - page_size = 42 - page_token = "hello world" - parent = "hello world" - - search_target_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_target_policy_bindings, name - assert_kind_of ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, request - assert_equal "hello world", request["target"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_target_policy_bindings_client_stub do - # Create client - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent }) do |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_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent do |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_target_policy_bindings ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent) do |response, operation| - 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_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent }, grpc_options) do |response, operation| - 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_target_policy_bindings(::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent), grpc_options) do |response, operation| - 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_target_policy_bindings_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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V3beta::PolicyBindings::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb deleted file mode 100644 index ed86bcce8c03..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_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/iam/v3beta/principal_access_boundary_policies_service_pb" -require "google/iam/v3beta/principal_access_boundary_policies_service_services_pb" -require "google/iam/v3beta/principal_access_boundary_policies" - -class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb deleted file mode 100644 index e7a89396ed57..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_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/iam/v3beta/principal_access_boundary_policies" - -class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_principal_access_boundary_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.principal_access_boundary_policy_path organization: "value0", location: "value1", principal_access_boundary_policy: "value2" - assert_equal "organizations/value0/locations/value1/principalAccessBoundaryPolicies/value2", path - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb deleted file mode 100644 index c05429d23690..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb +++ /dev/null @@ -1,435 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/iam/v3beta/principal_access_boundary_policies_service_pb" -require "google/iam/v3beta/principal_access_boundary_policies/rest" - - -class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy - # Create test objects. - 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" - principal_access_boundary_policy_id = "hello world" - principal_access_boundary_policy = {} - validate_only = true - - create_principal_access_boundary_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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_create_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_principal_access_boundary_policy_client_stub do - # Create client - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_principal_access_boundary_policy ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_principal_access_boundary_policy(::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_get_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_principal_access_boundary_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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_get_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_principal_access_boundary_policy_client_stub do - # Create client - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_principal_access_boundary_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_principal_access_boundary_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_principal_access_boundary_policy ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_principal_access_boundary_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_principal_access_boundary_policy(::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_update_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - principal_access_boundary_policy = {} - validate_only = true - update_mask = {} - - update_principal_access_boundary_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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_update_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_principal_access_boundary_policy_client_stub do - # Create client - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_principal_access_boundary_policy ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_principal_access_boundary_policy(::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_delete_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_principal_access_boundary_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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_delete_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_principal_access_boundary_policy_client_stub do - # Create client - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_principal_access_boundary_policy ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_principal_access_boundary_policy(::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_list_principal_access_boundary_policies - # Create test objects. - client_result = ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse.new - http_response = OpenStruct.new 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_principal_access_boundary_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_list_principal_access_boundary_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_principal_access_boundary_policies_client_stub do - # Create client - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_principal_access_boundary_policies({ 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_principal_access_boundary_policies 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_principal_access_boundary_policies ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies({ 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_principal_access_boundary_policies(::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_count - end - end - end - - def test_search_principal_access_boundary_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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" - - search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_search_principal_access_boundary_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_principal_access_boundary_policy_bindings_client_stub do - # Create client - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_principal_access_boundary_policy_bindings({ 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.search_principal_access_boundary_policy_bindings 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.search_principal_access_boundary_policy_bindings ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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.search_principal_access_boundary_policy_bindings({ 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.search_principal_access_boundary_policy_bindings(::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb deleted file mode 100644 index 276b103f56aa..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb +++ /dev/null @@ -1,515 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/iam/v3beta/principal_access_boundary_policies_service_pb" -require "google/iam/v3beta/principal_access_boundary_policies" - -class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - principal_access_boundary_policy_id = "hello world" - principal_access_boundary_policy = {} - validate_only = true - - create_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["principal_access_boundary_policy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_principal_access_boundary_policy_client_stub do - # Create client - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_principal_access_boundary_policy ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_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_principal_access_boundary_policy(::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only), grpc_options) do |response, operation| - assert_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_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_get_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_principal_access_boundary_policy_client_stub do - # Create client - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_principal_access_boundary_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_principal_access_boundary_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_principal_access_boundary_policy ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_principal_access_boundary_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_principal_access_boundary_policy(::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_update_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - principal_access_boundary_policy = {} - validate_only = true - update_mask = {} - - update_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] - assert_equal true, request["validate_only"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_principal_access_boundary_policy_client_stub do - # Create client - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy(::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, 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_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_delete_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_principal_access_boundary_policy_client_stub do - # Create client - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy(::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_list_principal_access_boundary_policies - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_principal_access_boundary_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_principal_access_boundary_policies, name - assert_kind_of ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, 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_principal_access_boundary_policies_client_stub do - # Create client - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_principal_access_boundary_policies({ 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_principal_access_boundary_policies 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_principal_access_boundary_policies ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies({ 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_principal_access_boundary_policies(::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_rpc_count - end - end - - def test_search_principal_access_boundary_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_principal_access_boundary_policy_bindings, name - assert_kind_of ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, 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, search_principal_access_boundary_policy_bindings_client_stub do - # Create client - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_principal_access_boundary_policy_bindings({ 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.search_principal_access_boundary_policy_bindings 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.search_principal_access_boundary_policy_bindings ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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.search_principal_access_boundary_policy_bindings({ 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.search_principal_access_boundary_policy_bindings(::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/helper.rb b/owl-bot-staging/google-iam-v3beta/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-identity-access_context_manager-v1/.gitignore b/owl-bot-staging/google-identity-access_context_manager-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/.repo-metadata.json b/owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json deleted file mode 100644 index b5b3f48e3f37..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "accesscontextmanager.googleapis.com", - "api_shortname": "accesscontextmanager", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest", - "distribution_name": "google-identity-access_context_manager-v1", - "is_cloud": true, - "language": "ruby", - "name": "accesscontextmanager", - "name_pretty": "Access Context Manager V1 API", - "product_documentation": "https://cloud.google.com/access-context-manager/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Access Context Manager allows enterprises to configure access levels which map to a policy defined on request attributes. Note that google-identity-access_context_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-identity-access_context_manager instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/access-context-manager/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml b/owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml deleted file mode 100644 index 15b11069b7b8..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-identity-access_context_manager-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-identity-access_context_manager-v1.rb" diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb b/owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/.yardopts b/owl-bot-staging/google-identity-access_context_manager-v1/.yardopts deleted file mode 100644 index bba046b41e67..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Access Context Manager 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-identity-access_context_manager-v1/AUTHENTICATION.md b/owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md deleted file mode 100644 index 3537ff875c7f..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-identity-access_context_manager-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-identity-access_context_manager-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/identity/access_context_manager/v1" - -client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/identity/access_context_manager/v1" - -::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager-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/identity/access_context_manager/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager-v1/CHANGELOG.md b/owl-bot-staging/google-identity-access_context_manager-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/Gemfile b/owl-bot-staging/google-identity-access_context_manager-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/LICENSE.md b/owl-bot-staging/google-identity-access_context_manager-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/README.md b/owl-bot-staging/google-identity-access_context_manager-v1/README.md deleted file mode 100644 index fa1eb979073e..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Access Context Manager V1 API - -An API for setting attribute based access control to requests to GCP services. - -Access Context Manager allows enterprises to configure access levels which map to a policy defined on request attributes. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Access Context Manager V1 API. Most users should consider using -the main client gem, -[google-identity-access_context_manager](https://rubygems.org/gems/google-identity-access_context_manager). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-identity-access_context_manager-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/accesscontextmanager.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/identity/access_context_manager/v1" - -client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new -request = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new # (request fields as keyword arguments...) -response = client.list_access_policies request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/access-context-manager/) -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/identity/access_context_manager/v1" -require "logger" - -client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager`, -and lower-level _versioned_ client libraries with names such as -`google-identity-access_context_manager-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-identity-access_context_manager`. -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-identity-access_context_manager-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-identity-access_context_manager-v1/Rakefile b/owl-bot-staging/google-identity-access_context_manager-v1/Rakefile deleted file mode 100644 index 4d845f513939..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-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/identity/access_context_manager/v1/access_context_manager/credentials" - ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager-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-identity-access_context_manager-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-identity-access_context_manager-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-identity-access_context_manager-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-identity-access_context_manager-v1" - header "google-identity-access_context_manager-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-identity-access_context_manager-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-identity-access_context_manager-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-identity-access_context_manager-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-identity-access_context_manager-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-identity-access_context_manager-v1/gapic_metadata.json b/owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json deleted file mode 100644 index a47b974d0dbf..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.identity.accesscontextmanager.v1", - "libraryPackage": "::Google::Identity::AccessContextManager::V1", - "services": { - "AccessContextManager": { - "clients": { - "grpc": { - "libraryClient": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client", - "rpcs": { - "ListAccessPolicies": { - "methods": [ - "list_access_policies" - ] - }, - "GetAccessPolicy": { - "methods": [ - "get_access_policy" - ] - }, - "CreateAccessPolicy": { - "methods": [ - "create_access_policy" - ] - }, - "UpdateAccessPolicy": { - "methods": [ - "update_access_policy" - ] - }, - "DeleteAccessPolicy": { - "methods": [ - "delete_access_policy" - ] - }, - "ListAccessLevels": { - "methods": [ - "list_access_levels" - ] - }, - "GetAccessLevel": { - "methods": [ - "get_access_level" - ] - }, - "CreateAccessLevel": { - "methods": [ - "create_access_level" - ] - }, - "UpdateAccessLevel": { - "methods": [ - "update_access_level" - ] - }, - "DeleteAccessLevel": { - "methods": [ - "delete_access_level" - ] - }, - "ReplaceAccessLevels": { - "methods": [ - "replace_access_levels" - ] - }, - "ListServicePerimeters": { - "methods": [ - "list_service_perimeters" - ] - }, - "GetServicePerimeter": { - "methods": [ - "get_service_perimeter" - ] - }, - "CreateServicePerimeter": { - "methods": [ - "create_service_perimeter" - ] - }, - "UpdateServicePerimeter": { - "methods": [ - "update_service_perimeter" - ] - }, - "DeleteServicePerimeter": { - "methods": [ - "delete_service_perimeter" - ] - }, - "ReplaceServicePerimeters": { - "methods": [ - "replace_service_perimeters" - ] - }, - "CommitServicePerimeters": { - "methods": [ - "commit_service_perimeters" - ] - }, - "ListGcpUserAccessBindings": { - "methods": [ - "list_gcp_user_access_bindings" - ] - }, - "GetGcpUserAccessBinding": { - "methods": [ - "get_gcp_user_access_binding" - ] - }, - "CreateGcpUserAccessBinding": { - "methods": [ - "create_gcp_user_access_binding" - ] - }, - "UpdateGcpUserAccessBinding": { - "methods": [ - "update_gcp_user_access_binding" - ] - }, - "DeleteGcpUserAccessBinding": { - "methods": [ - "delete_gcp_user_access_binding" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec b/owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec deleted file mode 100644 index c1efbea93872..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/identity/access_context_manager/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-identity-access_context_manager-v1" - gem.version = Google::Identity::AccessContextManager::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Access Context Manager allows enterprises to configure access levels which map to a policy defined on request attributes. Note that google-identity-access_context_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-identity-access_context_manager instead. See the readme for more details." - gem.summary = "An API for setting attribute based access control to requests to GCP services." - 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 "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb deleted file mode 100644 index 5d4eaa9b5df6..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-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/identity/access_context_manager/v1" diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb deleted file mode 100644 index c51f7bf61440..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/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/identity/access_context_manager/v1/access_context_manager" -require "google/identity/access_context_manager/v1/version" - -module Google - module Identity - module AccessContextManager - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/identity/access_context_manager/v1" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/identity/access_context_manager/v1" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/identity/access_context_manager/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb deleted file mode 100644 index 557344644e3e..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.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! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/identity/access_context_manager/v1/version" - -require "google/identity/access_context_manager/v1/access_context_manager/credentials" -require "google/identity/access_context_manager/v1/access_context_manager/paths" -require "google/identity/access_context_manager/v1/access_context_manager/operations" -require "google/identity/access_context_manager/v1/access_context_manager/client" -require "google/identity/access_context_manager/v1/access_context_manager/rest" - -module Google - module Identity - module AccessContextManager - module V1 - ## - # API for setting [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] and [service - # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] - # for Google Cloud projects. Each organization has one [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the - # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # and [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is - # applicable to all resources in the organization. - # AccessPolicies - # - # @example Load this service and instantiate a gRPC client - # - # require "google/identity/access_context_manager/v1/access_context_manager" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/identity/access_context_manager/v1/access_context_manager/rest" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - module AccessContextManager - end - end - end - end -end - -helper_path = ::File.join __dir__, "access_context_manager", "helpers.rb" -require "google/identity/access_context_manager/v1/access_context_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb deleted file mode 100644 index f6edfe855d26..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb +++ /dev/null @@ -1,3297 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/identity/accesscontextmanager/v1/access_context_manager_pb" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - ## - # Client for the AccessContextManager service. - # - # API for setting [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] and [service - # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] - # for Google Cloud projects. Each organization has one [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the - # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # and [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is - # applicable to all resources in the organization. - # AccessPolicies - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :access_context_manager_stub - - ## - # Configure the AccessContextManager Client class. - # - # See {::Google::Identity::AccessContextManager::V1::AccessContextManager::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccessContextManager clients - # ::Google::Identity::AccessContextManager::V1::AccessContextManager::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", "Identity", "AccessContextManager", "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 AccessContextManager 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::Identity::AccessContextManager::V1::AccessContextManager::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 - @access_context_manager_stub.universe_domain - end - - ## - # Create a new AccessContextManager client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccessContextManager 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/identity/accesscontextmanager/v1/access_context_manager_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 - - @access_context_manager_stub = ::Gapic::ServiceStub.new( - ::Google::Identity::AccessContextManager::V1::AccessContextManager::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 - ) - - @access_context_manager_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @access_context_manager_stub.logger - end - - # Service calls - - ## - # Lists all [access policies] - # [google.identity.accesscontextmanager.v1.AccessPolicy] in an - # organization. - # - # @overload list_access_policies(request, options = nil) - # Pass arguments to `list_access_policies` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_access_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the container to list AccessPolicy instances - # from. - # - # Format: - # `organizations/{org_id}` - # @param page_size [::Integer] - # Number of AccessPolicy instances to include in the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of AccessPolicy instances. Defaults to - # the first page of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new - # - # # Call the list_access_policies method. - # result = client.list_access_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy. - # p item - # end - # - def list_access_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_access_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::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_access_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_access_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :list_access_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_access_policies, 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 an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name. - # - # @overload get_access_policy(request, options = nil) - # Pass arguments to `get_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_access_policy(name: nil) - # Pass arguments to `get_access_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 name [::String] - # Required. Resource name for the access policy to get. - # - # Format `accessPolicies/{policy_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new - # - # # Call the get_access_policy method. - # result = client.get_access_policy request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy. - # p result - # - def get_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_access_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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :get_access_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 - - ## - # Creates an access policy. This method fails if the organization already has - # an access policy. The long-running operation has a successful status - # after the access policy propagates to long-lasting storage. - # Syntactic and basic semantic errors are returned in `metadata` as a - # BadRequest proto. - # - # @overload create_access_policy(request, options = nil) - # Pass arguments to `create_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::AccessPolicy} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_access_policy(name: nil, parent: nil, title: nil, scopes: nil, create_time: nil, update_time: nil, etag: nil) - # Pass arguments to `create_access_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 name [::String] - # Output only. Resource name of the `AccessPolicy`. Format: - # `accessPolicies/{access_policy}` - # @param parent [::String] - # Required. The parent of this `AccessPolicy` in the Cloud Resource - # Hierarchy. Currently immutable once created. Format: - # `organizations/{organization_id}` - # @param title [::String] - # Required. Human readable title. Does not affect behavior. - # @param scopes [::Array<::String>] - # The scopes of a policy define which resources an ACM policy can restrict, - # and where ACM resources can be referenced. - # For example, a policy with scopes=["folders/123"] has the following - # behavior: - # - vpcsc perimeters can only restrict projects within folders/123 - # - access levels can only be referenced by resources within folders/123. - # If empty, there are no limitations on which resources can be restricted by - # an ACM policy, and there are no limitations on where ACM resources can be - # referenced. - # Only one policy can include a given scope (attempting to create a second - # policy which includes "folders/123" will result in an error). - # Currently, scopes cannot be modified after a policy is created. - # Currently, policies can only have a single scope. - # Format: list of `folders/{folder_number}` or `projects/{project_number}` - # @param create_time [::Google::Protobuf::Timestamp, ::Hash] - # Output only. Time the `AccessPolicy` was created in UTC. - # @param update_time [::Google::Protobuf::Timestamp, ::Hash] - # Output only. Time the `AccessPolicy` was updated in UTC. - # @param etag [::String] - # Output only. An opaque identifier for the current version of the - # `AccessPolicy`. This will always be a strongly validated etag, meaning that - # two Access Polices will be identical if and only if their etags are - # identical. Clients should not expect this to be in any specific format. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::AccessPolicy.new - # - # # Call the create_access_policy method. - # result = client.create_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::AccessPolicy - - # Converts hash and nil to 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_access_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::Identity::AccessContextManager::V1::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.create_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :create_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. The - # long-running operation from this RPC has a successful status after the - # changes to the [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] propagate - # to long-lasting storage. - # - # @overload update_access_policy(request, options = nil) - # Pass arguments to `update_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_access_policy(policy: nil, update_mask: nil) - # Pass arguments to `update_access_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 policy [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] - # Required. The updated AccessPolicy. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new - # - # # Call the update_access_policy method. - # result = client.update_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest - - # Converts hash and nil to 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_access_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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.policy&.name - header_params["policy.name"] = request.policy.name - end - - request_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_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :update_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the - # resource name. The long-running operation has a successful status after the - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] - # is removed from long-lasting storage. - # - # @overload delete_access_policy(request, options = nil) - # Pass arguments to `delete_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_access_policy(name: nil) - # Pass arguments to `delete_access_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 name [::String] - # Required. Resource name for the access policy to delete. - # - # Format `accessPolicies/{policy_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/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new - # - # # Call the delete_access_policy method. - # result = client.delete_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_access_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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :delete_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] for an access - # policy. - # - # @overload list_access_levels(request, options = nil) - # Pass arguments to `list_access_levels` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_access_levels(parent: nil, page_size: nil, page_token: nil, access_level_format: nil) - # Pass arguments to `list_access_levels` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the access policy to list [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @param page_size [::Integer] - # Number of [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] to include in - # the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] instances. - # Defaults to the first page of results. - # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression language, as - # `CustomLevels`, rather than as `BasicLevels`. Defaults to returning - # `AccessLevels` in the format they were defined. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new - # - # # Call the list_access_levels method. - # result = client.list_access_levels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel. - # p item - # end - # - def list_access_levels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_access_levels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_access_levels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_access_levels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :list_access_levels, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_access_levels, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. - # - # @overload get_access_level(request, options = nil) - # Pass arguments to `get_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_access_level(name: nil, access_level_format: nil) - # Pass arguments to `get_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression - # Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where - # [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # are returned as `BasicLevels` or `CustomLevels` based on how they were - # created. If set to CEL, all [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are returned as - # `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent - # `CustomLevels`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Identity::AccessContextManager::V1::AccessLevel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new - # - # # Call the get_access_level method. - # result = client.get_access_level request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel. - # p result - # - def get_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_access_level.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :get_access_level, request, 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 [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the [access - # level] [google.identity.accesscontextmanager.v1.AccessLevel] - # propagates to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - # - # @overload create_access_level(request, options = nil) - # Pass arguments to `create_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_access_level(parent: nil, access_level: nil) - # Pass arguments to `create_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the access policy which owns this [Access - # Level] [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] - # Required. The [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] to create. - # Syntactic correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new - # - # # Call the create_access_level method. - # result = client.create_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest - - # Converts hash and nil to 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_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_access_level.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :create_access_level, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the changes to - # the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] propagate - # to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - # - # @overload update_access_level(request, options = nil) - # Pass arguments to `update_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_access_level(access_level: nil, update_mask: nil) - # Pass arguments to `update_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] - # Required. The updated [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic - # correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new - # - # # Call the update_access_level method. - # result = client.update_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest - - # Converts hash and nil to 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_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.access_level&.name - header_params["access_level.name"] = request.access_level.name - end - - request_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_access_level.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :update_access_level, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. The long-running operation from this RPC has a successful status - # after the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] has been removed - # from long-lasting storage. - # - # @overload delete_access_level(request, options = nil) - # Pass arguments to `delete_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_access_level(name: nil) - # Pass arguments to `delete_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_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/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new - # - # # Call the delete_access_level method. - # result = client.delete_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_access_level.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :delete_access_level, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replaces all existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with - # the [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting - # storage. If the replacement contains errors, an error response is returned - # for the first error encountered. Upon error, the replacement is cancelled, - # and existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are not - # affected. The Operation.response field contains - # ReplaceAccessLevelsResponse. Removing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an - # error. - # - # @overload replace_access_levels(request, options = nil) - # Pass arguments to `replace_access_levels` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload replace_access_levels(parent: nil, access_levels: nil, etag: nil) - # Pass arguments to `replace_access_levels` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the access policy which owns these - # [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @param access_levels [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash>] - # Required. The desired [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] that should - # replace all existing [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new - # - # # Call the replace_access_levels method. - # result = client.replace_access_levels request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def replace_access_levels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.replace_access_levels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.replace_access_levels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.replace_access_levels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :replace_access_levels, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] for an - # access policy. - # - # @overload list_service_perimeters(request, options = nil) - # Pass arguments to `list_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_service_perimeters(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the access policy to list [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @param page_size [::Integer] - # Number of [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to include - # in the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. - # Defaults to the first page of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new - # - # # Call the list_service_perimeters method. - # result = client.list_service_perimeters request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter. - # p item - # end - # - def list_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_service_perimeters.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :list_service_perimeters, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_service_perimeters, 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 [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. - # - # @overload get_service_perimeter(request, options = nil) - # Pass arguments to `get_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_service_perimeter(name: nil) - # Pass arguments to `get_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new - # - # # Call the get_service_perimeter method. - # result = client.get_service_perimeter request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter. - # p result - # - def get_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_service_perimeter.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :get_service_perimeter, request, 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 [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - # - # @overload create_service_perimeter(request, options = nil) - # Pass arguments to `create_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_service_perimeter(parent: nil, service_perimeter: nil) - # Pass arguments to `create_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the access policy which owns this [Service - # Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] - # Required. The [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to create. - # Syntactic correctness of the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is a - # precondition for creation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new - # - # # Call the create_service_perimeter method. - # result = client.create_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest - - # Converts hash and nil to 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_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_service_perimeter.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :create_service_perimeter, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - # - # @overload update_service_perimeter(request, options = nil) - # Pass arguments to `update_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_service_perimeter(service_perimeter: nil, update_mask: nil) - # Pass arguments to `update_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] - # Required. The updated `ServicePerimeter`. Syntactic correctness of the - # `ServicePerimeter` is a precondition for creation. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new - # - # # Call the update_service_perimeter method. - # result = client.update_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest - - # Converts hash and nil to 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_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service_perimeter&.name - header_params["service_perimeter.name"] = request.service_perimeter.name - end - - request_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_service_perimeter.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :update_service_perimeter, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. The long-running operation from this RPC has a successful - # status after the [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from - # long-lasting storage. - # - # @overload delete_service_perimeter(request, options = nil) - # Pass arguments to `delete_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_service_perimeter(name: nil) - # Pass arguments to `delete_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_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/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new - # - # # Call the delete_service_perimeter method. - # result = client.delete_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_service_perimeter.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :delete_service_perimeter, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replace all existing [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting storage. - # Replacements containing errors result in an error response for the first - # error encountered. Upon an error, replacement are cancelled and existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] are not - # affected. The Operation.response field contains - # ReplaceServicePerimetersResponse. - # - # @overload replace_service_perimeters(request, options = nil) - # Pass arguments to `replace_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload replace_service_perimeters(parent: nil, service_perimeters: nil, etag: nil) - # Pass arguments to `replace_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the access policy which owns these - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @param service_perimeters [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash>] - # Required. The desired [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] that should - # replace all existing [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new - # - # # Call the replace_service_perimeters method. - # result = client.replace_service_perimeters request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def replace_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.replace_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.replace_service_perimeters.timeout, - metadata: metadata, - retry_policy: @config.rpcs.replace_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :replace_service_perimeters, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Commits the dry-run specification for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # A commit operation on a service perimeter involves copying its `spec` field - # to the `status` field of the service perimeter. Only [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] with - # `use_explicit_dry_run_spec` field set to true are affected by a commit - # operation. The long-running operation from this RPC has a successful - # status after the dry-run specifications for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] have been - # committed. If a commit fails, it causes the long-running operation to - # return an error response and the entire commit operation is cancelled. - # When successful, the Operation.response field contains - # CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are - # cleared after a successful commit operation. - # - # @overload commit_service_perimeters(request, options = nil) - # Pass arguments to `commit_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload commit_service_perimeters(parent: nil, etag: nil) - # Pass arguments to `commit_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the parent [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for - # the commit operation. - # - # Format: `accessPolicies/{policy_id}` - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # commit operation is to be performed on. If, at the time of commit, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the commit operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new - # - # # Call the commit_service_perimeters method. - # result = client.commit_service_perimeters request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def commit_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.commit_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.commit_service_perimeters.timeout, - metadata: metadata, - retry_policy: @config.rpcs.commit_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :commit_service_perimeters, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 [GcpUserAccessBindings] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a - # Google Cloud organization. - # - # @overload list_gcp_user_access_bindings(request, options = nil) - # Pass arguments to `list_gcp_user_access_bindings` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_gcp_user_access_bindings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gcp_user_access_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Example: "organizations/256" - # @param page_size [::Integer] - # Optional. Maximum number of items to return. The server may return fewer items. - # If left blank, the server may return any number of items. - # @param page_token [::String] - # Optional. If left blank, returns the first page. To enumerate all items, use the - # [next_page_token] - # [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token] - # from your previous list operation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new - # - # # Call the list_gcp_user_access_bindings method. - # result = client.list_gcp_user_access_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - # p item - # end - # - def list_gcp_user_access_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_gcp_user_access_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_gcp_user_access_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_gcp_user_access_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :list_gcp_user_access_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_gcp_user_access_bindings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with - # the given name. - # - # @overload get_gcp_user_access_binding(request, options = nil) - # Pass arguments to `get_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_gcp_user_access_binding(name: nil) - # Pass arguments to `get_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new - # - # # Call the get_gcp_user_access_binding method. - # result = client.get_gcp_user_access_binding request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - # p result - # - def get_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_gcp_user_access_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :get_gcp_user_access_binding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the - # client specifies a [name] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], - # the server ignores it. Fails if a resource already exists with the same - # [group_key] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. - # Completion of this long-running operation does not necessarily signify that - # the new binding is deployed onto all affected users, which may take more - # time. - # - # @overload create_gcp_user_access_binding(request, options = nil) - # Pass arguments to `create_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_gcp_user_access_binding(parent: nil, gcp_user_access_binding: nil) - # Pass arguments to `create_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Example: "organizations/256" - # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new - # - # # Call the create_gcp_user_access_binding method. - # result = client.create_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest - - # Converts hash and nil to 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_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_gcp_user_access_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :create_gcp_user_access_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the changed binding is deployed onto all affected users, which may take - # more time. - # - # @overload update_gcp_user_access_binding(request, options = nil) - # Pass arguments to `update_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_gcp_user_access_binding(gcp_user_access_binding: nil, update_mask: nil) - # Pass arguments to `update_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Only the fields specified in this mask are updated. Because name and - # group_key cannot be changed, update_mask is required and must always be: - # - # update_mask { - # paths: "access_levels" - # } - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new - # - # # Call the update_gcp_user_access_binding method. - # result = client.update_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest - - # Converts hash and nil to 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_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.gcp_user_access_binding&.name - header_params["gcp_user_access_binding.name"] = request.gcp_user_access_binding.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_gcp_user_access_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :update_gcp_user_access_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the binding deletion is deployed onto all affected users, which may take - # more time. - # - # @overload delete_gcp_user_access_binding(request, options = nil) - # Pass arguments to `delete_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_gcp_user_access_binding(name: nil) - # Pass arguments to `delete_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new - # - # # Call the delete_gcp_user_access_binding method. - # result = client.delete_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_gcp_user_access_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :delete_gcp_user_access_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the IAM policy for the specified Access Context Manager - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # This method replaces the existing IAM policy on the access policy. The IAM - # policy controls the set of users who can perform specific operations on the - # Access Context Manager [access - # policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - # - # @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/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-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 - - @access_context_manager_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM policy for the specified Access Context Manager - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # - # @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/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-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 - - @access_context_manager_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 - - ## - # Returns the IAM permissions that the caller has on the specified Access - # Context Manager resource. The resource can be an - # {::Google::Identity::AccessContextManager::V1::AccessPolicy AccessPolicy}, - # {::Google::Identity::AccessContextManager::V1::AccessLevel AccessLevel}, or - # [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter - # ]. This method does not support other resources. - # - # @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/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-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 - - @access_context_manager_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccessContextManager API. - # - # This class represents the configuration for AccessContextManager, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Identity::AccessContextManager::V1::AccessContextManager::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_access_policies to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_access_policies.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_access_policies.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Identity::AccessContextManager::V1::AccessContextManager::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 = "accesscontextmanager.googleapis.com" - - config_attr :endpoint, nil, ::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 AccessContextManager API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_access_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_policies - ## - # RPC-specific configuration for `get_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_policy - ## - # RPC-specific configuration for `create_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_policy - ## - # RPC-specific configuration for `update_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_policy - ## - # RPC-specific configuration for `delete_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_policy - ## - # RPC-specific configuration for `list_access_levels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_levels - ## - # RPC-specific configuration for `get_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_level - ## - # RPC-specific configuration for `create_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_level - ## - # RPC-specific configuration for `update_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_level - ## - # RPC-specific configuration for `delete_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_level - ## - # RPC-specific configuration for `replace_access_levels` - # @return [::Gapic::Config::Method] - # - attr_reader :replace_access_levels - ## - # RPC-specific configuration for `list_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_perimeters - ## - # RPC-specific configuration for `get_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_perimeter - ## - # RPC-specific configuration for `create_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_perimeter - ## - # RPC-specific configuration for `update_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service_perimeter - ## - # RPC-specific configuration for `delete_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_perimeter - ## - # RPC-specific configuration for `replace_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :replace_service_perimeters - ## - # RPC-specific configuration for `commit_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :commit_service_perimeters - ## - # RPC-specific configuration for `list_gcp_user_access_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gcp_user_access_bindings - ## - # RPC-specific configuration for `get_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_gcp_user_access_binding - ## - # RPC-specific configuration for `create_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_gcp_user_access_binding - ## - # RPC-specific configuration for `update_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_gcp_user_access_binding - ## - # RPC-specific configuration for `delete_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_gcp_user_access_binding - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies - @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config - get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy - @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config - create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy - @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config - update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy - @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config - delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy - @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config - list_access_levels_config = parent_rpcs.list_access_levels if parent_rpcs.respond_to? :list_access_levels - @list_access_levels = ::Gapic::Config::Method.new list_access_levels_config - get_access_level_config = parent_rpcs.get_access_level if parent_rpcs.respond_to? :get_access_level - @get_access_level = ::Gapic::Config::Method.new get_access_level_config - create_access_level_config = parent_rpcs.create_access_level if parent_rpcs.respond_to? :create_access_level - @create_access_level = ::Gapic::Config::Method.new create_access_level_config - update_access_level_config = parent_rpcs.update_access_level if parent_rpcs.respond_to? :update_access_level - @update_access_level = ::Gapic::Config::Method.new update_access_level_config - delete_access_level_config = parent_rpcs.delete_access_level if parent_rpcs.respond_to? :delete_access_level - @delete_access_level = ::Gapic::Config::Method.new delete_access_level_config - replace_access_levels_config = parent_rpcs.replace_access_levels if parent_rpcs.respond_to? :replace_access_levels - @replace_access_levels = ::Gapic::Config::Method.new replace_access_levels_config - list_service_perimeters_config = parent_rpcs.list_service_perimeters if parent_rpcs.respond_to? :list_service_perimeters - @list_service_perimeters = ::Gapic::Config::Method.new list_service_perimeters_config - get_service_perimeter_config = parent_rpcs.get_service_perimeter if parent_rpcs.respond_to? :get_service_perimeter - @get_service_perimeter = ::Gapic::Config::Method.new get_service_perimeter_config - create_service_perimeter_config = parent_rpcs.create_service_perimeter if parent_rpcs.respond_to? :create_service_perimeter - @create_service_perimeter = ::Gapic::Config::Method.new create_service_perimeter_config - update_service_perimeter_config = parent_rpcs.update_service_perimeter if parent_rpcs.respond_to? :update_service_perimeter - @update_service_perimeter = ::Gapic::Config::Method.new update_service_perimeter_config - delete_service_perimeter_config = parent_rpcs.delete_service_perimeter if parent_rpcs.respond_to? :delete_service_perimeter - @delete_service_perimeter = ::Gapic::Config::Method.new delete_service_perimeter_config - replace_service_perimeters_config = parent_rpcs.replace_service_perimeters if parent_rpcs.respond_to? :replace_service_perimeters - @replace_service_perimeters = ::Gapic::Config::Method.new replace_service_perimeters_config - commit_service_perimeters_config = parent_rpcs.commit_service_perimeters if parent_rpcs.respond_to? :commit_service_perimeters - @commit_service_perimeters = ::Gapic::Config::Method.new commit_service_perimeters_config - list_gcp_user_access_bindings_config = parent_rpcs.list_gcp_user_access_bindings if parent_rpcs.respond_to? :list_gcp_user_access_bindings - @list_gcp_user_access_bindings = ::Gapic::Config::Method.new list_gcp_user_access_bindings_config - get_gcp_user_access_binding_config = parent_rpcs.get_gcp_user_access_binding if parent_rpcs.respond_to? :get_gcp_user_access_binding - @get_gcp_user_access_binding = ::Gapic::Config::Method.new get_gcp_user_access_binding_config - create_gcp_user_access_binding_config = parent_rpcs.create_gcp_user_access_binding if parent_rpcs.respond_to? :create_gcp_user_access_binding - @create_gcp_user_access_binding = ::Gapic::Config::Method.new create_gcp_user_access_binding_config - update_gcp_user_access_binding_config = parent_rpcs.update_gcp_user_access_binding if parent_rpcs.respond_to? :update_gcp_user_access_binding - @update_gcp_user_access_binding = ::Gapic::Config::Method.new update_gcp_user_access_binding_config - delete_gcp_user_access_binding_config = parent_rpcs.delete_gcp_user_access_binding if parent_rpcs.respond_to? :delete_gcp_user_access_binding - @delete_gcp_user_access_binding = ::Gapic::Config::Method.new delete_gcp_user_access_binding_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb deleted file mode 100644 index 776e70b9d2b2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - # Credentials for the AccessContextManager 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-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb deleted file mode 100644 index 77e76d9d22b6..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AccessContextManager 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 AccessContextManager 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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Identity::AccessContextManager::V1::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 = "accesscontextmanager.googleapis.com" - - config_attr :endpoint, nil, ::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-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb deleted file mode 100644 index 11645e15c66f..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.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 Identity - module AccessContextManager - module V1 - module AccessContextManager - # Path helper methods for the AccessContextManager API. - module Paths - ## - # Create a fully-qualified AccessLevel resource string. - # - # The resource will be in the following format: - # - # `accessPolicies/{access_policy}/accessLevels/{access_level}` - # - # @param access_policy [String] - # @param access_level [String] - # - # @return [::String] - def access_level_path access_policy:, access_level: - raise ::ArgumentError, "access_policy cannot contain /" if access_policy.to_s.include? "/" - - "accessPolicies/#{access_policy}/accessLevels/#{access_level}" - end - - ## - # Create a fully-qualified AccessPolicy resource string. - # - # The resource will be in the following format: - # - # `accessPolicies/{access_policy}` - # - # @param access_policy [String] - # - # @return [::String] - def access_policy_path access_policy: - "accessPolicies/#{access_policy}" - end - - ## - # Create a fully-qualified GcpUserAccessBinding resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/gcpUserAccessBindings/{gcp_user_access_binding}` - # - # @param organization [String] - # @param gcp_user_access_binding [String] - # - # @return [::String] - def gcp_user_access_binding_path organization:, gcp_user_access_binding: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/gcpUserAccessBindings/#{gcp_user_access_binding}" - end - - ## - # Create a fully-qualified Organization resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}` - # - # @param organization [String] - # - # @return [::String] - def organization_path organization: - "organizations/#{organization}" - end - - ## - # Create a fully-qualified ServicePerimeter resource string. - # - # The resource will be in the following format: - # - # `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}` - # - # @param access_policy [String] - # @param service_perimeter [String] - # - # @return [::String] - def service_perimeter_path access_policy:, service_perimeter: - raise ::ArgumentError, "access_policy cannot contain /" if access_policy.to_s.include? "/" - - "accessPolicies/#{access_policy}/servicePerimeters/#{service_perimeter}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb deleted file mode 100644 index db852d4c1c3e..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/identity/access_context_manager/v1/version" - -require "google/identity/access_context_manager/v1/access_context_manager/credentials" -require "google/identity/access_context_manager/v1/access_context_manager/paths" -require "google/identity/access_context_manager/v1/access_context_manager/rest/operations" -require "google/identity/access_context_manager/v1/access_context_manager/rest/client" - -module Google - module Identity - module AccessContextManager - module V1 - ## - # API for setting [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] and [service - # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] - # for Google Cloud projects. Each organization has one [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the - # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # and [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is - # applicable to all resources in the organization. - # AccessPolicies - # - # To load this service and instantiate a REST client: - # - # require "google/identity/access_context_manager/v1/access_context_manager/rest" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - module AccessContextManager - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/identity/access_context_manager/v1/access_context_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb deleted file mode 100644 index b939c885a3ac..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb +++ /dev/null @@ -1,3088 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/identity/accesscontextmanager/v1/access_context_manager_pb" -require "google/identity/access_context_manager/v1/access_context_manager/rest/service_stub" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - module Rest - ## - # REST client for the AccessContextManager service. - # - # API for setting [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] and [service - # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] - # for Google Cloud projects. Each organization has one [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the - # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # and [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is - # applicable to all resources in the organization. - # AccessPolicies - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :access_context_manager_stub - - ## - # Configure the AccessContextManager Client class. - # - # See {::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccessContextManager clients - # ::Google::Identity::AccessContextManager::V1::AccessContextManager::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", "Identity", "AccessContextManager", "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 AccessContextManager 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::Identity::AccessContextManager::V1::AccessContextManager::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 - @access_context_manager_stub.universe_domain - end - - ## - # Create a new AccessContextManager REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccessContextManager 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::Identity::AccessContextManager::V1::AccessContextManager::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 - - @access_context_manager_stub = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @access_context_manager_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @access_context_manager_stub.logger - end - - # Service calls - - ## - # Lists all [access policies] - # [google.identity.accesscontextmanager.v1.AccessPolicy] in an - # organization. - # - # @overload list_access_policies(request, options = nil) - # Pass arguments to `list_access_policies` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_access_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the container to list AccessPolicy instances - # from. - # - # Format: - # `organizations/{org_id}` - # @param page_size [::Integer] - # Number of AccessPolicy instances to include in the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of AccessPolicy instances. Defaults to - # the first page of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new - # - # # Call the list_access_policies method. - # result = client.list_access_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy. - # p item - # end - # - def list_access_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_access_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_access_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.list_access_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_access_policies, "access_policies", request, result, 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 an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name. - # - # @overload get_access_policy(request, options = nil) - # Pass arguments to `get_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_access_policy(name: nil) - # Pass arguments to `get_access_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 name [::String] - # Required. Resource name for the access policy to get. - # - # Format `accessPolicies/{policy_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new - # - # # Call the get_access_policy method. - # result = client.get_access_policy request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy. - # p result - # - def get_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_access_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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.get_access_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 - - ## - # Creates an access policy. This method fails if the organization already has - # an access policy. The long-running operation has a successful status - # after the access policy propagates to long-lasting storage. - # Syntactic and basic semantic errors are returned in `metadata` as a - # BadRequest proto. - # - # @overload create_access_policy(request, options = nil) - # Pass arguments to `create_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::AccessPolicy} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_access_policy(name: nil, parent: nil, title: nil, scopes: nil, create_time: nil, update_time: nil, etag: nil) - # Pass arguments to `create_access_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 name [::String] - # Output only. Resource name of the `AccessPolicy`. Format: - # `accessPolicies/{access_policy}` - # @param parent [::String] - # Required. The parent of this `AccessPolicy` in the Cloud Resource - # Hierarchy. Currently immutable once created. Format: - # `organizations/{organization_id}` - # @param title [::String] - # Required. Human readable title. Does not affect behavior. - # @param scopes [::Array<::String>] - # The scopes of a policy define which resources an ACM policy can restrict, - # and where ACM resources can be referenced. - # For example, a policy with scopes=["folders/123"] has the following - # behavior: - # - vpcsc perimeters can only restrict projects within folders/123 - # - access levels can only be referenced by resources within folders/123. - # If empty, there are no limitations on which resources can be restricted by - # an ACM policy, and there are no limitations on where ACM resources can be - # referenced. - # Only one policy can include a given scope (attempting to create a second - # policy which includes "folders/123" will result in an error). - # Currently, scopes cannot be modified after a policy is created. - # Currently, policies can only have a single scope. - # Format: list of `folders/{folder_number}` or `projects/{project_number}` - # @param create_time [::Google::Protobuf::Timestamp, ::Hash] - # Output only. Time the `AccessPolicy` was created in UTC. - # @param update_time [::Google::Protobuf::Timestamp, ::Hash] - # Output only. Time the `AccessPolicy` was updated in UTC. - # @param etag [::String] - # Output only. An opaque identifier for the current version of the - # `AccessPolicy`. This will always be a strongly validated etag, meaning that - # two Access Polices will be identical if and only if their etags are - # identical. Clients should not expect this to be in any specific format. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::AccessPolicy.new - # - # # Call the create_access_policy method. - # result = client.create_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::AccessPolicy - - # Converts hash and nil to an 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_access_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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.create_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. The - # long-running operation from this RPC has a successful status after the - # changes to the [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] propagate - # to long-lasting storage. - # - # @overload update_access_policy(request, options = nil) - # Pass arguments to `update_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_access_policy(policy: nil, update_mask: nil) - # Pass arguments to `update_access_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 policy [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] - # Required. The updated AccessPolicy. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new - # - # # Call the update_access_policy method. - # result = client.update_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest - - # Converts hash and nil to an 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_access_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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.update_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the - # resource name. The long-running operation has a successful status after the - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] - # is removed from long-lasting storage. - # - # @overload delete_access_policy(request, options = nil) - # Pass arguments to `delete_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_access_policy(name: nil) - # Pass arguments to `delete_access_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 name [::String] - # Required. Resource name for the access policy to delete. - # - # Format `accessPolicies/{policy_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new - # - # # Call the delete_access_policy method. - # result = client.delete_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_access_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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.delete_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] for an access - # policy. - # - # @overload list_access_levels(request, options = nil) - # Pass arguments to `list_access_levels` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_access_levels(parent: nil, page_size: nil, page_token: nil, access_level_format: nil) - # Pass arguments to `list_access_levels` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the access policy to list [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @param page_size [::Integer] - # Number of [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] to include in - # the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] instances. - # Defaults to the first page of results. - # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression language, as - # `CustomLevels`, rather than as `BasicLevels`. Defaults to returning - # `AccessLevels` in the format they were defined. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new - # - # # Call the list_access_levels method. - # result = client.list_access_levels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel. - # p item - # end - # - def list_access_levels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_access_levels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_access_levels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_access_levels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.list_access_levels request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_access_levels, "access_levels", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. - # - # @overload get_access_level(request, options = nil) - # Pass arguments to `get_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_access_level(name: nil, access_level_format: nil) - # Pass arguments to `get_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression - # Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where - # [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # are returned as `BasicLevels` or `CustomLevels` based on how they were - # created. If set to CEL, all [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are returned as - # `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent - # `CustomLevels`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessLevel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new - # - # # Call the get_access_level method. - # result = client.get_access_level request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel. - # p result - # - def get_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_access_level.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.get_access_level request, 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 [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the [access - # level] [google.identity.accesscontextmanager.v1.AccessLevel] - # propagates to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - # - # @overload create_access_level(request, options = nil) - # Pass arguments to `create_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_access_level(parent: nil, access_level: nil) - # Pass arguments to `create_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the access policy which owns this [Access - # Level] [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] - # Required. The [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] to create. - # Syntactic correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new - # - # # Call the create_access_level method. - # result = client.create_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest - - # Converts hash and nil to an 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_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_level.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.create_access_level request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the changes to - # the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] propagate - # to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - # - # @overload update_access_level(request, options = nil) - # Pass arguments to `update_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_access_level(access_level: nil, update_mask: nil) - # Pass arguments to `update_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] - # Required. The updated [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic - # correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new - # - # # Call the update_access_level method. - # result = client.update_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest - - # Converts hash and nil to an 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_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_level.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.update_access_level request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. The long-running operation from this RPC has a successful status - # after the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] has been removed - # from long-lasting storage. - # - # @overload delete_access_level(request, options = nil) - # Pass arguments to `delete_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_access_level(name: nil) - # Pass arguments to `delete_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new - # - # # Call the delete_access_level method. - # result = client.delete_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_level.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.delete_access_level request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replaces all existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with - # the [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting - # storage. If the replacement contains errors, an error response is returned - # for the first error encountered. Upon error, the replacement is cancelled, - # and existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are not - # affected. The Operation.response field contains - # ReplaceAccessLevelsResponse. Removing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an - # error. - # - # @overload replace_access_levels(request, options = nil) - # Pass arguments to `replace_access_levels` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload replace_access_levels(parent: nil, access_levels: nil, etag: nil) - # Pass arguments to `replace_access_levels` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the access policy which owns these - # [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @param access_levels [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash>] - # Required. The desired [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] that should - # replace all existing [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new - # - # # Call the replace_access_levels method. - # result = client.replace_access_levels request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def replace_access_levels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.replace_access_levels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.replace_access_levels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.replace_access_levels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.replace_access_levels request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] for an - # access policy. - # - # @overload list_service_perimeters(request, options = nil) - # Pass arguments to `list_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_service_perimeters(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the access policy to list [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @param page_size [::Integer] - # Number of [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to include - # in the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. - # Defaults to the first page of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new - # - # # Call the list_service_perimeters method. - # result = client.list_service_perimeters request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter. - # p item - # end - # - def list_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_service_perimeters.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.list_service_perimeters request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_service_perimeters, "service_perimeters", request, result, 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 [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. - # - # @overload get_service_perimeter(request, options = nil) - # Pass arguments to `get_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_service_perimeter(name: nil) - # Pass arguments to `get_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new - # - # # Call the get_service_perimeter method. - # result = client.get_service_perimeter request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter. - # p result - # - def get_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_service_perimeter.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.get_service_perimeter request, 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 [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - # - # @overload create_service_perimeter(request, options = nil) - # Pass arguments to `create_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_service_perimeter(parent: nil, service_perimeter: nil) - # Pass arguments to `create_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the access policy which owns this [Service - # Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] - # Required. The [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to create. - # Syntactic correctness of the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is a - # precondition for creation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new - # - # # Call the create_service_perimeter method. - # result = client.create_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest - - # Converts hash and nil to an 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_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_service_perimeter.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.create_service_perimeter request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - # - # @overload update_service_perimeter(request, options = nil) - # Pass arguments to `update_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_service_perimeter(service_perimeter: nil, update_mask: nil) - # Pass arguments to `update_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] - # Required. The updated `ServicePerimeter`. Syntactic correctness of the - # `ServicePerimeter` is a precondition for creation. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new - # - # # Call the update_service_perimeter method. - # result = client.update_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest - - # Converts hash and nil to an 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_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_service_perimeter.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.update_service_perimeter request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. The long-running operation from this RPC has a successful - # status after the [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from - # long-lasting storage. - # - # @overload delete_service_perimeter(request, options = nil) - # Pass arguments to `delete_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_service_perimeter(name: nil) - # Pass arguments to `delete_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new - # - # # Call the delete_service_perimeter method. - # result = client.delete_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_service_perimeter.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.delete_service_perimeter request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replace all existing [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting storage. - # Replacements containing errors result in an error response for the first - # error encountered. Upon an error, replacement are cancelled and existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] are not - # affected. The Operation.response field contains - # ReplaceServicePerimetersResponse. - # - # @overload replace_service_perimeters(request, options = nil) - # Pass arguments to `replace_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload replace_service_perimeters(parent: nil, service_perimeters: nil, etag: nil) - # Pass arguments to `replace_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the access policy which owns these - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @param service_perimeters [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash>] - # Required. The desired [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] that should - # replace all existing [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new - # - # # Call the replace_service_perimeters method. - # result = client.replace_service_perimeters request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def replace_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.replace_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.replace_service_perimeters.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.replace_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.replace_service_perimeters request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Commits the dry-run specification for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # A commit operation on a service perimeter involves copying its `spec` field - # to the `status` field of the service perimeter. Only [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] with - # `use_explicit_dry_run_spec` field set to true are affected by a commit - # operation. The long-running operation from this RPC has a successful - # status after the dry-run specifications for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] have been - # committed. If a commit fails, it causes the long-running operation to - # return an error response and the entire commit operation is cancelled. - # When successful, the Operation.response field contains - # CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are - # cleared after a successful commit operation. - # - # @overload commit_service_perimeters(request, options = nil) - # Pass arguments to `commit_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload commit_service_perimeters(parent: nil, etag: nil) - # Pass arguments to `commit_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 for the parent [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for - # the commit operation. - # - # Format: `accessPolicies/{policy_id}` - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # commit operation is to be performed on. If, at the time of commit, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the commit operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new - # - # # Call the commit_service_perimeters method. - # result = client.commit_service_perimeters request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def commit_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.commit_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.commit_service_perimeters.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.commit_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.commit_service_perimeters request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 [GcpUserAccessBindings] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a - # Google Cloud organization. - # - # @overload list_gcp_user_access_bindings(request, options = nil) - # Pass arguments to `list_gcp_user_access_bindings` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_gcp_user_access_bindings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gcp_user_access_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Example: "organizations/256" - # @param page_size [::Integer] - # Optional. Maximum number of items to return. The server may return fewer items. - # If left blank, the server may return any number of items. - # @param page_token [::String] - # Optional. If left blank, returns the first page. To enumerate all items, use the - # [next_page_token] - # [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token] - # from your previous list operation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new - # - # # Call the list_gcp_user_access_bindings method. - # result = client.list_gcp_user_access_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - # p item - # end - # - def list_gcp_user_access_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_gcp_user_access_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_gcp_user_access_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_gcp_user_access_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.list_gcp_user_access_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_gcp_user_access_bindings, "gcp_user_access_bindings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with - # the given name. - # - # @overload get_gcp_user_access_binding(request, options = nil) - # Pass arguments to `get_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_gcp_user_access_binding(name: nil) - # Pass arguments to `get_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new - # - # # Call the get_gcp_user_access_binding method. - # result = client.get_gcp_user_access_binding request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - # p result - # - def get_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_gcp_user_access_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.get_gcp_user_access_binding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the - # client specifies a [name] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], - # the server ignores it. Fails if a resource already exists with the same - # [group_key] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. - # Completion of this long-running operation does not necessarily signify that - # the new binding is deployed onto all affected users, which may take more - # time. - # - # @overload create_gcp_user_access_binding(request, options = nil) - # Pass arguments to `create_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_gcp_user_access_binding(parent: nil, gcp_user_access_binding: nil) - # Pass arguments to `create_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Example: "organizations/256" - # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new - # - # # Call the create_gcp_user_access_binding method. - # result = client.create_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest - - # Converts hash and nil to an 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_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_gcp_user_access_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.create_gcp_user_access_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the changed binding is deployed onto all affected users, which may take - # more time. - # - # @overload update_gcp_user_access_binding(request, options = nil) - # Pass arguments to `update_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_gcp_user_access_binding(gcp_user_access_binding: nil, update_mask: nil) - # Pass arguments to `update_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Only the fields specified in this mask are updated. Because name and - # group_key cannot be changed, update_mask is required and must always be: - # - # update_mask { - # paths: "access_levels" - # } - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new - # - # # Call the update_gcp_user_access_binding method. - # result = client.update_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest - - # Converts hash and nil to an 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_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_gcp_user_access_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.update_gcp_user_access_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the binding deletion is deployed onto all affected users, which may take - # more time. - # - # @overload delete_gcp_user_access_binding(request, options = nil) - # Pass arguments to `delete_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_gcp_user_access_binding(name: nil) - # Pass arguments to `delete_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new - # - # # Call the delete_gcp_user_access_binding method. - # result = client.delete_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_gcp_user_access_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.delete_gcp_user_access_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the IAM policy for the specified Access Context Manager - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # This method replaces the existing IAM policy on the access policy. The IAM - # policy controls the set of users who can perform specific operations on the - # Access Context Manager [access - # policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - # - # @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/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @access_context_manager_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM policy for the specified Access Context Manager - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # - # @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/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @access_context_manager_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 - - ## - # Returns the IAM permissions that the caller has on the specified Access - # Context Manager resource. The resource can be an - # {::Google::Identity::AccessContextManager::V1::AccessPolicy AccessPolicy}, - # {::Google::Identity::AccessContextManager::V1::AccessLevel AccessLevel}, or - # [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter - # ]. This method does not support other resources. - # - # @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/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @access_context_manager_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccessContextManager REST API. - # - # This class represents the configuration for AccessContextManager 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::Identity::AccessContextManager::V1::AccessContextManager::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_access_policies to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_access_policies.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_access_policies.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "accesscontextmanager.googleapis.com" - - config_attr :endpoint, nil, ::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 AccessContextManager API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_access_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_policies - ## - # RPC-specific configuration for `get_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_policy - ## - # RPC-specific configuration for `create_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_policy - ## - # RPC-specific configuration for `update_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_policy - ## - # RPC-specific configuration for `delete_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_policy - ## - # RPC-specific configuration for `list_access_levels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_levels - ## - # RPC-specific configuration for `get_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_level - ## - # RPC-specific configuration for `create_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_level - ## - # RPC-specific configuration for `update_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_level - ## - # RPC-specific configuration for `delete_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_level - ## - # RPC-specific configuration for `replace_access_levels` - # @return [::Gapic::Config::Method] - # - attr_reader :replace_access_levels - ## - # RPC-specific configuration for `list_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_perimeters - ## - # RPC-specific configuration for `get_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_perimeter - ## - # RPC-specific configuration for `create_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_perimeter - ## - # RPC-specific configuration for `update_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service_perimeter - ## - # RPC-specific configuration for `delete_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_perimeter - ## - # RPC-specific configuration for `replace_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :replace_service_perimeters - ## - # RPC-specific configuration for `commit_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :commit_service_perimeters - ## - # RPC-specific configuration for `list_gcp_user_access_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gcp_user_access_bindings - ## - # RPC-specific configuration for `get_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_gcp_user_access_binding - ## - # RPC-specific configuration for `create_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_gcp_user_access_binding - ## - # RPC-specific configuration for `update_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_gcp_user_access_binding - ## - # RPC-specific configuration for `delete_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_gcp_user_access_binding - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies - @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config - get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy - @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config - create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy - @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config - update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy - @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config - delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy - @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config - list_access_levels_config = parent_rpcs.list_access_levels if parent_rpcs.respond_to? :list_access_levels - @list_access_levels = ::Gapic::Config::Method.new list_access_levels_config - get_access_level_config = parent_rpcs.get_access_level if parent_rpcs.respond_to? :get_access_level - @get_access_level = ::Gapic::Config::Method.new get_access_level_config - create_access_level_config = parent_rpcs.create_access_level if parent_rpcs.respond_to? :create_access_level - @create_access_level = ::Gapic::Config::Method.new create_access_level_config - update_access_level_config = parent_rpcs.update_access_level if parent_rpcs.respond_to? :update_access_level - @update_access_level = ::Gapic::Config::Method.new update_access_level_config - delete_access_level_config = parent_rpcs.delete_access_level if parent_rpcs.respond_to? :delete_access_level - @delete_access_level = ::Gapic::Config::Method.new delete_access_level_config - replace_access_levels_config = parent_rpcs.replace_access_levels if parent_rpcs.respond_to? :replace_access_levels - @replace_access_levels = ::Gapic::Config::Method.new replace_access_levels_config - list_service_perimeters_config = parent_rpcs.list_service_perimeters if parent_rpcs.respond_to? :list_service_perimeters - @list_service_perimeters = ::Gapic::Config::Method.new list_service_perimeters_config - get_service_perimeter_config = parent_rpcs.get_service_perimeter if parent_rpcs.respond_to? :get_service_perimeter - @get_service_perimeter = ::Gapic::Config::Method.new get_service_perimeter_config - create_service_perimeter_config = parent_rpcs.create_service_perimeter if parent_rpcs.respond_to? :create_service_perimeter - @create_service_perimeter = ::Gapic::Config::Method.new create_service_perimeter_config - update_service_perimeter_config = parent_rpcs.update_service_perimeter if parent_rpcs.respond_to? :update_service_perimeter - @update_service_perimeter = ::Gapic::Config::Method.new update_service_perimeter_config - delete_service_perimeter_config = parent_rpcs.delete_service_perimeter if parent_rpcs.respond_to? :delete_service_perimeter - @delete_service_perimeter = ::Gapic::Config::Method.new delete_service_perimeter_config - replace_service_perimeters_config = parent_rpcs.replace_service_perimeters if parent_rpcs.respond_to? :replace_service_perimeters - @replace_service_perimeters = ::Gapic::Config::Method.new replace_service_perimeters_config - commit_service_perimeters_config = parent_rpcs.commit_service_perimeters if parent_rpcs.respond_to? :commit_service_perimeters - @commit_service_perimeters = ::Gapic::Config::Method.new commit_service_perimeters_config - list_gcp_user_access_bindings_config = parent_rpcs.list_gcp_user_access_bindings if parent_rpcs.respond_to? :list_gcp_user_access_bindings - @list_gcp_user_access_bindings = ::Gapic::Config::Method.new list_gcp_user_access_bindings_config - get_gcp_user_access_binding_config = parent_rpcs.get_gcp_user_access_binding if parent_rpcs.respond_to? :get_gcp_user_access_binding - @get_gcp_user_access_binding = ::Gapic::Config::Method.new get_gcp_user_access_binding_config - create_gcp_user_access_binding_config = parent_rpcs.create_gcp_user_access_binding if parent_rpcs.respond_to? :create_gcp_user_access_binding - @create_gcp_user_access_binding = ::Gapic::Config::Method.new create_gcp_user_access_binding_config - update_gcp_user_access_binding_config = parent_rpcs.update_gcp_user_access_binding if parent_rpcs.respond_to? :update_gcp_user_access_binding - @update_gcp_user_access_binding = ::Gapic::Config::Method.new update_gcp_user_access_binding_config - delete_gcp_user_access_binding_config = parent_rpcs.delete_gcp_user_access_binding if parent_rpcs.respond_to? :delete_gcp_user_access_binding - @delete_gcp_user_access_binding = ::Gapic::Config::Method.new delete_gcp_user_access_binding_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb deleted file mode 100644 index 7be075887045..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AccessContextManager 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 AccessContextManager 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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "accesscontextmanager.googleapis.com" - - config_attr :endpoint, nil, ::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-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb deleted file mode 100644 index 2eba8ab83681..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb +++ /dev/null @@ -1,1693 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/identity/accesscontextmanager/v1/access_context_manager_pb" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - module Rest - ## - # REST service stub for the AccessContextManager 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_access_policies REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse] - # A result object deserialized from the server's reply - def list_access_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_access_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_access_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # A result object deserialized from the server's reply - def get_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_access_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_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::AccessPolicy.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_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_access_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: "create_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_access_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: "update_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_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: "delete_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_access_levels REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse] - # A result object deserialized from the server's reply - def list_access_levels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_access_levels_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_access_levels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessLevel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] - # A result object deserialized from the server's reply - def get_access_level request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_access_level_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_access_level", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::AccessLevel.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_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_level request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_access_level_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_access_level", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_level request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_access_level_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_access_level", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_level request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_level_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_access_level", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the replace_access_levels REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def replace_access_levels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_replace_access_levels_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "replace_access_levels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse] - # A result object deserialized from the server's reply - def list_service_perimeters request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_service_perimeters_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_service_perimeters", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # A result object deserialized from the server's reply - def get_service_perimeter request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_perimeter_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_service_perimeter", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::ServicePerimeter.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_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_service_perimeter request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_service_perimeter_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_service_perimeter", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_service_perimeter request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_service_perimeter_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_service_perimeter", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_service_perimeter request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_perimeter_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_service_perimeter", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the replace_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def replace_service_perimeters request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_replace_service_perimeters_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "replace_service_perimeters", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the commit_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def commit_service_perimeters request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_commit_service_perimeters_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "commit_service_perimeters", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_gcp_user_access_bindings REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse] - # A result object deserialized from the server's reply - def list_gcp_user_access_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_gcp_user_access_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_gcp_user_access_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # A result object deserialized from the server's reply - def get_gcp_user_access_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_gcp_user_access_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_gcp_user_access_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.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_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_gcp_user_access_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_gcp_user_access_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_gcp_user_access_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_gcp_user_access_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_gcp_user_access_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_gcp_user_access_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_gcp_user_access_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_gcp_user_access_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_gcp_user_access_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_access_policies REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_access_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/accessPolicies", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # 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_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/accessPolicies", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest] - # 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_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{policy.name}", - body: "policy", - matches: [ - ["policy.name", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_access_levels REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_access_levels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/accessLevels", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_access_level_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest] - # 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_access_level_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/accessLevels", - body: "access_level", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest] - # 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_access_level_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{access_level.name}", - body: "access_level", - matches: [ - ["access_level.name", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_access_level_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the replace_access_levels REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_replace_access_levels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/accessLevels:replaceAll", - body: "*", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_service_perimeters_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/servicePerimeters", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_service_perimeter_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest] - # 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_service_perimeter_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/servicePerimeters", - body: "service_perimeter", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest] - # 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_service_perimeter_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{service_perimeter.name}", - body: "service_perimeter", - matches: [ - ["service_perimeter.name", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_service_perimeter_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the replace_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_replace_service_perimeters_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/servicePerimeters:replaceAll", - body: "*", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the commit_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_commit_service_perimeters_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/servicePerimeters:commit", - body: "*", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_gcp_user_access_bindings REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_gcp_user_access_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/gcpUserAccessBindings", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_gcp_user_access_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/gcpUserAccessBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest] - # 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_gcp_user_access_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/gcpUserAccessBindings", - body: "gcp_user_access_binding", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest] - # 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_gcp_user_access_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{gcp_user_access_binding.name}", - body: "gcp_user_access_binding", - matches: [ - ["gcp_user_access_binding.name", %r{^organizations/[^/]+/gcpUserAccessBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_gcp_user_access_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/gcpUserAccessBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^accessPolicies/[^/]+/?$}, 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: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb deleted file mode 100644 index b85e8d3b9a1c..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/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/identity/access_context_manager/v1/access_context_manager/rest" -require "google/identity/access_context_manager/v1/version" - -module Google - module Identity - module AccessContextManager - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/identity/access_context_manager/v1/rest" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb deleted file mode 100644 index d2c2604fbcd6..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/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 Identity - module AccessContextManager - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb deleted file mode 100644 index 5b241ff87987..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/type/device_resources.proto - -require 'google/protobuf' - - -descriptor_data = "\n@google/identity/accesscontextmanager/type/device_resources.proto\x12)google.identity.accesscontextmanager.type*p\n\x16\x44\x65viceEncryptionStatus\x12\x1a\n\x16\x45NCRYPTION_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x45NCRYPTION_UNSUPPORTED\x10\x01\x12\x0f\n\x0bUNENCRYPTED\x10\x02\x12\r\n\tENCRYPTED\x10\x03*\x82\x01\n\x06OsType\x12\x12\n\x0eOS_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x44\x45SKTOP_MAC\x10\x01\x12\x13\n\x0f\x44\x45SKTOP_WINDOWS\x10\x02\x12\x11\n\rDESKTOP_LINUX\x10\x03\x12\x15\n\x11\x44\x45SKTOP_CHROME_OS\x10\x06\x12\x0b\n\x07\x41NDROID\x10\x04\x12\x07\n\x03IOS\x10\x05*V\n\x15\x44\x65viceManagementLevel\x12\x1a\n\x16MANAGEMENT_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x12\x0c\n\x08\x43OMPLETE\x10\x03\x42\x8d\x02\n-com.google.identity.accesscontextmanager.typeB\tTypeProtoP\x01ZHgoogle.golang.org/genproto/googleapis/identity/accesscontextmanager/type\xaa\x02)Google.Identity.AccessContextManager.Type\xca\x02)Google\\Identity\\AccessContextManager\\Type\xea\x02,Google::Identity::AccessContextManager::Typeb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module Type - DeviceEncryptionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.type.DeviceEncryptionStatus").enummodule - OsType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.type.OsType").enummodule - DeviceManagementLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.type.DeviceManagementLevel").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb deleted file mode 100644 index 73ed14280699..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/v1/access_context_manager.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/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/identity/accesscontextmanager/v1/access_level_pb' -require 'google/identity/accesscontextmanager/v1/access_policy_pb' -require 'google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb' -require 'google/identity/accesscontextmanager/v1/service_perimeter_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\nDgoogle/identity/accesscontextmanager/v1/access_context_manager.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a:google/identity/accesscontextmanager/v1/access_level.proto\x1a;google/identity/accesscontextmanager/v1/access_policy.proto\x1a\x45google/identity/accesscontextmanager/v1/gcp_user_access_binding.proto\x1a?google/identity/accesscontextmanager/v1/service_perimeter.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\"\x8c\x01\n\x19ListAccessPoliciesRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x85\x01\n\x1aListAccessPoliciesResponse\x12N\n\x0f\x61\x63\x63\x65ss_policies\x18\x01 \x03(\x0b\x32\x35.google.identity.accesscontextmanager.v1.AccessPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"`\n\x16GetAccessPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0accesscontextmanager.googleapis.com/AccessPolicy\"\x9d\x01\n\x19UpdateAccessPolicyRequest\x12J\n\x06policy\x18\x01 \x01(\x0b\x32\x35.google.identity.accesscontextmanager.v1.AccessPolicyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"c\n\x19\x44\x65leteAccessPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0accesscontextmanager.googleapis.com/AccessPolicy\"\xdc\x01\n\x17ListAccessLevelsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/accesscontextmanager.googleapis.com/AccessLevel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12Q\n\x13\x61\x63\x63\x65ss_level_format\x18\x04 \x01(\x0e\x32\x34.google.identity.accesscontextmanager.v1.LevelFormat\"\x80\x01\n\x18ListAccessLevelsResponse\x12K\n\raccess_levels\x18\x01 \x03(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb1\x01\n\x15GetAccessLevelRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/accesscontextmanager.googleapis.com/AccessLevel\x12Q\n\x13\x61\x63\x63\x65ss_level_format\x18\x02 \x01(\x0e\x32\x34.google.identity.accesscontextmanager.v1.LevelFormat\"\xb4\x01\n\x18\x43reateAccessLevelRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/accesscontextmanager.googleapis.com/AccessLevel\x12O\n\x0c\x61\x63\x63\x65ss_level\x18\x02 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelB\x03\xe0\x41\x02\"\xa1\x01\n\x18UpdateAccessLevelRequest\x12O\n\x0c\x61\x63\x63\x65ss_level\x18\x01 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"a\n\x18\x44\x65leteAccessLevelRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/accesscontextmanager.googleapis.com/AccessLevel\"\xc5\x01\n\x1aReplaceAccessLevelsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/accesscontextmanager.googleapis.com/AccessLevel\x12P\n\raccess_levels\x18\x02 \x03(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelB\x03\xe0\x41\x02\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\"j\n\x1bReplaceAccessLevelsResponse\x12K\n\raccess_levels\x18\x01 \x03(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevel\"\x93\x01\n\x1cListServicePerimetersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8f\x01\n\x1dListServicePerimetersResponse\x12U\n\x12service_perimeters\x18\x01 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"h\n\x1aGetServicePerimeterRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4accesscontextmanager.googleapis.com/ServicePerimeter\"\xc8\x01\n\x1d\x43reateServicePerimeterRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12Y\n\x11service_perimeter\x18\x02 \x01(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterB\x03\xe0\x41\x02\"\xb0\x01\n\x1dUpdateServicePerimeterRequest\x12Y\n\x11service_perimeter\x18\x01 \x01(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"k\n\x1d\x44\x65leteServicePerimeterRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4accesscontextmanager.googleapis.com/ServicePerimeter\"\xd9\x01\n\x1fReplaceServicePerimetersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12Z\n\x12service_perimeters\x18\x02 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterB\x03\xe0\x41\x02\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"y\n ReplaceServicePerimetersResponse\x12U\n\x12service_perimeters\x18\x01 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\"|\n\x1e\x43ommitServicePerimetersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\"x\n\x1f\x43ommitServicePerimetersResponse\x12U\n\x12service_perimeters\x18\x01 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\"\x9d\x01\n ListGcpUserAccessBindingsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n!ListGcpUserAccessBindingsResponse\x12_\n\x18gcp_user_access_bindings\x18\x01 \x03(\x0b\x32=.google.identity.accesscontextmanager.v1.GcpUserAccessBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"p\n\x1eGetGcpUserAccessBindingRequest\x12N\n\x04name\x18\x01 \x01(\tB@\xe0\x41\x02\xfa\x41:\n8accesscontextmanager.googleapis.com/GcpUserAccessBinding\"\xd2\x01\n!CreateGcpUserAccessBindingRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x63\n\x17gcp_user_access_binding\x18\x02 \x01(\x0b\x32=.google.identity.accesscontextmanager.v1.GcpUserAccessBindingB\x03\xe0\x41\x02\"\xbe\x01\n!UpdateGcpUserAccessBindingRequest\x12\x63\n\x17gcp_user_access_binding\x18\x01 \x01(\x0b\x32=.google.identity.accesscontextmanager.v1.GcpUserAccessBindingB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"s\n!DeleteGcpUserAccessBindingRequest\x12N\n\x04name\x18\x01 \x01(\tB@\xe0\x41\x02\xfa\x41:\n8accesscontextmanager.googleapis.com/GcpUserAccessBinding\"\'\n%GcpUserAccessBindingOperationMetadata\"\'\n%AccessContextManagerOperationMetadata*D\n\x0bLevelFormat\x12\x1c\n\x18LEVEL_FORMAT_UNSPECIFIED\x10\x00\x12\x0e\n\nAS_DEFINED\x10\x01\x12\x07\n\x03\x43\x45L\x10\x02\x32\xf1\x32\n\x14\x41\x63\x63\x65ssContextManager\x12\xb9\x01\n\x12ListAccessPolicies\x12\x42.google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest\x1a\x43.google.identity.accesscontextmanager.v1.ListAccessPoliciesResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/v1/accessPolicies\x12\xb5\x01\n\x0fGetAccessPolicy\x12?.google.identity.accesscontextmanager.v1.GetAccessPolicyRequest\x1a\x35.google.identity.accesscontextmanager.v1.AccessPolicy\"*\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1d\x12\x1b/v1/{name=accessPolicies/*}\x12\xc1\x01\n\x12\x43reateAccessPolicy\x12\x35.google.identity.accesscontextmanager.v1.AccessPolicy\x1a\x1d.google.longrunning.Operation\"U\xca\x41\x35\n\x0c\x41\x63\x63\x65ssPolicy\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02\x17\"\x12/v1/accessPolicies:\x01*\x12\xf8\x01\n\x12UpdateAccessPolicy\x12\x42.google.identity.accesscontextmanager.v1.UpdateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x35\n\x0c\x41\x63\x63\x65ssPolicy\x12%AccessContextManagerOperationMetadata\xda\x41\x12policy,update_mask\x82\xd3\xe4\x93\x02,2\"/v1/{policy.name=accessPolicies/*}:\x06policy\x12\xe4\x01\n\x12\x44\x65leteAccessPolicy\x12\x42.google.identity.accesscontextmanager.v1.DeleteAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41>\n\x15google.protobuf.Empty\x12%AccessContextManagerOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1d*\x1b/v1/{name=accessPolicies/*}\x12\xd4\x01\n\x10ListAccessLevels\x12@.google.identity.accesscontextmanager.v1.ListAccessLevelsRequest\x1a\x41.google.identity.accesscontextmanager.v1.ListAccessLevelsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=accessPolicies/*}/accessLevels\x12\xc1\x01\n\x0eGetAccessLevel\x12>.google.identity.accesscontextmanager.v1.GetAccessLevelRequest\x1a\x34.google.identity.accesscontextmanager.v1.AccessLevel\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=accessPolicies/*/accessLevels/*}\x12\x85\x02\n\x11\x43reateAccessLevel\x12\x41.google.identity.accesscontextmanager.v1.CreateAccessLevelRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41\x34\n\x0b\x41\x63\x63\x65ssLevel\x12%AccessContextManagerOperationMetadata\xda\x41\x13parent,access_level\x82\xd3\xe4\x93\x02:\"*/v1/{parent=accessPolicies/*}/accessLevels:\x0c\x61\x63\x63\x65ss_level\x12\x97\x02\n\x11UpdateAccessLevel\x12\x41.google.identity.accesscontextmanager.v1.UpdateAccessLevelRequest\x1a\x1d.google.longrunning.Operation\"\x9f\x01\xca\x41\x34\n\x0b\x41\x63\x63\x65ssLevel\x12%AccessContextManagerOperationMetadata\xda\x41\x18\x61\x63\x63\x65ss_level,update_mask\x82\xd3\xe4\x93\x02G27/v1/{access_level.name=accessPolicies/*/accessLevels/*}:\x0c\x61\x63\x63\x65ss_level\x12\xf1\x01\n\x11\x44\x65leteAccessLevel\x12\x41.google.identity.accesscontextmanager.v1.DeleteAccessLevelRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41>\n\x15google.protobuf.Empty\x12%AccessContextManagerOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=accessPolicies/*/accessLevels/*}\x12\x83\x02\n\x13ReplaceAccessLevels\x12\x43.google.identity.accesscontextmanager.v1.ReplaceAccessLevelsRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x44\n\x1bReplaceAccessLevelsResponse\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02:\"5/v1/{parent=accessPolicies/*}/accessLevels:replaceAll:\x01*\x12\xe8\x01\n\x15ListServicePerimeters\x12\x45.google.identity.accesscontextmanager.v1.ListServicePerimetersRequest\x1a\x46.google.identity.accesscontextmanager.v1.ListServicePerimetersResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=accessPolicies/*}/servicePerimeters\x12\xd5\x01\n\x13GetServicePerimeter\x12\x43.google.identity.accesscontextmanager.v1.GetServicePerimeterRequest\x1a\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=accessPolicies/*/servicePerimeters/*}\x12\xa3\x02\n\x16\x43reateServicePerimeter\x12\x46.google.identity.accesscontextmanager.v1.CreateServicePerimeterRequest\x1a\x1d.google.longrunning.Operation\"\xa1\x01\xca\x41\x39\n\x10ServicePerimeter\x12%AccessContextManagerOperationMetadata\xda\x41\x18parent,service_perimeter\x82\xd3\xe4\x93\x02\x44\"//v1/{parent=accessPolicies/*}/servicePerimeters:\x11service_perimeter\x12\xba\x02\n\x16UpdateServicePerimeter\x12\x46.google.identity.accesscontextmanager.v1.UpdateServicePerimeterRequest\x1a\x1d.google.longrunning.Operation\"\xb8\x01\xca\x41\x39\n\x10ServicePerimeter\x12%AccessContextManagerOperationMetadata\xda\x41\x1dservice_perimeter,update_mask\x82\xd3\xe4\x93\x02V2A/v1/{service_perimeter.name=accessPolicies/*/servicePerimeters/*}:\x11service_perimeter\x12\x80\x02\n\x16\x44\x65leteServicePerimeter\x12\x46.google.identity.accesscontextmanager.v1.DeleteServicePerimeterRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41>\n\x15google.protobuf.Empty\x12%AccessContextManagerOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=accessPolicies/*/servicePerimeters/*}\x12\x97\x02\n\x18ReplaceServicePerimeters\x12H.google.identity.accesscontextmanager.v1.ReplaceServicePerimetersRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41I\n ReplaceServicePerimetersResponse\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02?\":/v1/{parent=accessPolicies/*}/servicePerimeters:replaceAll:\x01*\x12\x90\x02\n\x17\x43ommitServicePerimeters\x12G.google.identity.accesscontextmanager.v1.CommitServicePerimetersRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41H\n\x1f\x43ommitServicePerimetersResponse\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02;\"6/v1/{parent=accessPolicies/*}/servicePerimeters:commit:\x01*\x12\xf7\x01\n\x19ListGcpUserAccessBindings\x12I.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest\x1aJ.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=organizations/*}/gcpUserAccessBindings\x12\xe4\x01\n\x17GetGcpUserAccessBinding\x12G.google.identity.accesscontextmanager.v1.GetGcpUserAccessBindingRequest\x1a=.google.identity.accesscontextmanager.v1.GcpUserAccessBinding\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=organizations/*/gcpUserAccessBindings/*}\x12\xbe\x02\n\x1a\x43reateGcpUserAccessBinding\x12J.google.identity.accesscontextmanager.v1.CreateGcpUserAccessBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41=\n\x14GcpUserAccessBinding\x12%GcpUserAccessBindingOperationMetadata\xda\x41\x1eparent,gcp_user_access_binding\x82\xd3\xe4\x93\x02M\"2/v1/{parent=organizations/*}/gcpUserAccessBindings:\x17gcp_user_access_binding\x12\xdb\x02\n\x1aUpdateGcpUserAccessBinding\x12J.google.identity.accesscontextmanager.v1.UpdateGcpUserAccessBindingRequest\x1a\x1d.google.longrunning.Operation\"\xd1\x01\xca\x41=\n\x14GcpUserAccessBinding\x12%GcpUserAccessBindingOperationMetadata\xda\x41#gcp_user_access_binding,update_mask\x82\xd3\xe4\x93\x02\x65\x32J/v1/{gcp_user_access_binding.name=organizations/*/gcpUserAccessBindings/*}:\x17gcp_user_access_binding\x12\x8c\x02\n\x1a\x44\x65leteGcpUserAccessBinding\x12J.google.identity.accesscontextmanager.v1.DeleteGcpUserAccessBindingRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41>\n\x15google.protobuf.Empty\x12%GcpUserAccessBindingOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=organizations/*/gcpUserAccessBindings/*}\x12\x82\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"7\x82\xd3\xe4\x93\x02\x31\",/v1/{resource=accessPolicies/*}:setIamPolicy:\x01*\x12\x82\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"7\x82\xd3\xe4\x93\x02\x31\",/v1/{resource=accessPolicies/*}:getIamPolicy:\x01*\x12\xbf\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xd3\x01\x82\xd3\xe4\x93\x02\xcc\x01\"2/v1/{resource=accessPolicies/*}:testIamPermissions:\x01*ZF\"A/v1/{resource=accessPolicies/*/accessLevels/*}:testIamPermissions:\x01*ZK\"F/v1/{resource=accessPolicies/*/servicePerimeters/*}:testIamPermissions:\x01*\x1aW\xca\x41#accesscontextmanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb0\x02\n+com.google.identity.accesscontextmanager.v1B\x19\x41\x63\x63\x65ssContextManagerProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module V1 - ListAccessPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest").msgclass - ListAccessPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessPoliciesResponse").msgclass - GetAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetAccessPolicyRequest").msgclass - UpdateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateAccessPolicyRequest").msgclass - DeleteAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteAccessPolicyRequest").msgclass - ListAccessLevelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessLevelsRequest").msgclass - ListAccessLevelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessLevelsResponse").msgclass - GetAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetAccessLevelRequest").msgclass - CreateAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CreateAccessLevelRequest").msgclass - UpdateAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateAccessLevelRequest").msgclass - DeleteAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteAccessLevelRequest").msgclass - ReplaceAccessLevelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceAccessLevelsRequest").msgclass - ReplaceAccessLevelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceAccessLevelsResponse").msgclass - ListServicePerimetersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListServicePerimetersRequest").msgclass - ListServicePerimetersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListServicePerimetersResponse").msgclass - GetServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetServicePerimeterRequest").msgclass - CreateServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CreateServicePerimeterRequest").msgclass - UpdateServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateServicePerimeterRequest").msgclass - DeleteServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteServicePerimeterRequest").msgclass - ReplaceServicePerimetersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceServicePerimetersRequest").msgclass - ReplaceServicePerimetersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceServicePerimetersResponse").msgclass - CommitServicePerimetersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CommitServicePerimetersRequest").msgclass - CommitServicePerimetersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CommitServicePerimetersResponse").msgclass - ListGcpUserAccessBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest").msgclass - ListGcpUserAccessBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse").msgclass - GetGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetGcpUserAccessBindingRequest").msgclass - CreateGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CreateGcpUserAccessBindingRequest").msgclass - UpdateGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateGcpUserAccessBindingRequest").msgclass - DeleteGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteGcpUserAccessBindingRequest").msgclass - GcpUserAccessBindingOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GcpUserAccessBindingOperationMetadata").msgclass - AccessContextManagerOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata").msgclass - LevelFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.LevelFormat").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb deleted file mode 100644 index 5d40fe4c565a..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb +++ /dev/null @@ -1,240 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/identity/accesscontextmanager/v1/access_context_manager.proto for package 'Google.Identity.AccessContextManager.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/identity/accesscontextmanager/v1/access_context_manager_pb' - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - # API for setting [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] and [service - # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] - # for Google Cloud projects. Each organization has one [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the - # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # and [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is - # applicable to all resources in the organization. - # AccessPolicies - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.identity.accesscontextmanager.v1.AccessContextManager' - - # Lists all [access policies] - # [google.identity.accesscontextmanager.v1.AccessPolicy] in an - # organization. - rpc :ListAccessPolicies, ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse - # Returns an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name. - rpc :GetAccessPolicy, ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, ::Google::Identity::AccessContextManager::V1::AccessPolicy - # Creates an access policy. This method fails if the organization already has - # an access policy. The long-running operation has a successful status - # after the access policy propagates to long-lasting storage. - # Syntactic and basic semantic errors are returned in `metadata` as a - # BadRequest proto. - rpc :CreateAccessPolicy, ::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Google::Longrunning::Operation - # Updates an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. The - # long-running operation from this RPC has a successful status after the - # changes to the [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] propagate - # to long-lasting storage. - rpc :UpdateAccessPolicy, ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, ::Google::Longrunning::Operation - # Deletes an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the - # resource name. The long-running operation has a successful status after the - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] - # is removed from long-lasting storage. - rpc :DeleteAccessPolicy, ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, ::Google::Longrunning::Operation - # Lists all [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] for an access - # policy. - rpc :ListAccessLevels, ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse - # Gets an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. - rpc :GetAccessLevel, ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, ::Google::Identity::AccessContextManager::V1::AccessLevel - # Creates an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the [access - # level] [google.identity.accesscontextmanager.v1.AccessLevel] - # propagates to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - rpc :CreateAccessLevel, ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, ::Google::Longrunning::Operation - # Updates an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the changes to - # the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] propagate - # to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - rpc :UpdateAccessLevel, ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, ::Google::Longrunning::Operation - # Deletes an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. The long-running operation from this RPC has a successful status - # after the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] has been removed - # from long-lasting storage. - rpc :DeleteAccessLevel, ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, ::Google::Longrunning::Operation - # Replaces all existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with - # the [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting - # storage. If the replacement contains errors, an error response is returned - # for the first error encountered. Upon error, the replacement is cancelled, - # and existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are not - # affected. The Operation.response field contains - # ReplaceAccessLevelsResponse. Removing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an - # error. - rpc :ReplaceAccessLevels, ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, ::Google::Longrunning::Operation - # Lists all [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] for an - # access policy. - rpc :ListServicePerimeters, ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse - # Gets a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. - rpc :GetServicePerimeter, ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, ::Google::Identity::AccessContextManager::V1::ServicePerimeter - # Creates a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - rpc :CreateServicePerimeter, ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, ::Google::Longrunning::Operation - # Updates a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - rpc :UpdateServicePerimeter, ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, ::Google::Longrunning::Operation - # Deletes a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. The long-running operation from this RPC has a successful - # status after the [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from - # long-lasting storage. - rpc :DeleteServicePerimeter, ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, ::Google::Longrunning::Operation - # Replace all existing [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting storage. - # Replacements containing errors result in an error response for the first - # error encountered. Upon an error, replacement are cancelled and existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] are not - # affected. The Operation.response field contains - # ReplaceServicePerimetersResponse. - rpc :ReplaceServicePerimeters, ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, ::Google::Longrunning::Operation - # Commits the dry-run specification for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an - # [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - # A commit operation on a service perimeter involves copying its `spec` field - # to the `status` field of the service perimeter. Only [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] with - # `use_explicit_dry_run_spec` field set to true are affected by a commit - # operation. The long-running operation from this RPC has a successful - # status after the dry-run specifications for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] have been - # committed. If a commit fails, it causes the long-running operation to - # return an error response and the entire commit operation is cancelled. - # When successful, the Operation.response field contains - # CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are - # cleared after a successful commit operation. - rpc :CommitServicePerimeters, ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, ::Google::Longrunning::Operation - # Lists all [GcpUserAccessBindings] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a - # Google Cloud organization. - rpc :ListGcpUserAccessBindings, ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse - # Gets the [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with - # the given name. - rpc :GetGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding - # Creates a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the - # client specifies a [name] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], - # the server ignores it. Fails if a resource already exists with the same - # [group_key] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. - # Completion of this long-running operation does not necessarily signify that - # the new binding is deployed onto all affected users, which may take more - # time. - rpc :CreateGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, ::Google::Longrunning::Operation - # Updates a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the changed binding is deployed onto all affected users, which may take - # more time. - rpc :UpdateGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, ::Google::Longrunning::Operation - # Deletes a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the binding deletion is deployed onto all affected users, which may take - # more time. - rpc :DeleteGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, ::Google::Longrunning::Operation - # Sets the IAM policy for the specified Access Context Manager - # [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - # This method replaces the existing IAM policy on the access policy. The IAM - # policy controls the set of users who can perform specific operations on the - # Access Context Manager [access - # policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets the IAM policy for the specified Access Context Manager - # [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns the IAM permissions that the caller has on the specified Access - # Context Manager resource. The resource can be an - # [AccessPolicy][google.identity.accesscontextmanager.v1.AccessPolicy], - # [AccessLevel][google.identity.accesscontextmanager.v1.AccessLevel], or - # [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter - # ]. This method does not support other resources. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb deleted file mode 100644 index ead78b22f47d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/v1/access_level.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/identity/accesscontextmanager/type/device_resources_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n:google/identity/accesscontextmanager/v1/access_level.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x19google/api/resource.proto\x1a@google/identity/accesscontextmanager/type/device_resources.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xaa\x03\n\x0b\x41\x63\x63\x65ssLevel\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x44\n\x05\x62\x61sic\x18\x04 \x01(\x0b\x32\x33.google.identity.accesscontextmanager.v1.BasicLevelH\x00\x12\x46\n\x06\x63ustom\x18\x05 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.CustomLevelH\x00\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:p\xea\x41m\n/accesscontextmanager.googleapis.com/AccessLevel\x12:accessPolicies/{access_policy}/accessLevels/{access_level}B\x07\n\x05level\"\xef\x01\n\nBasicLevel\x12\x46\n\nconditions\x18\x01 \x03(\x0b\x32\x32.google.identity.accesscontextmanager.v1.Condition\x12j\n\x12\x63ombining_function\x18\x02 \x01(\x0e\x32N.google.identity.accesscontextmanager.v1.BasicLevel.ConditionCombiningFunction\"-\n\x1a\x43onditionCombiningFunction\x12\x07\n\x03\x41ND\x10\x00\x12\x06\n\x02OR\x10\x01\"\xc3\x01\n\tCondition\x12\x16\n\x0eip_subnetworks\x18\x01 \x03(\t\x12L\n\rdevice_policy\x18\x02 \x01(\x0b\x32\x35.google.identity.accesscontextmanager.v1.DevicePolicy\x12\x1e\n\x16required_access_levels\x18\x03 \x03(\t\x12\x0e\n\x06negate\x18\x05 \x01(\x08\x12\x0f\n\x07members\x18\x06 \x03(\t\x12\x0f\n\x07regions\x18\x07 \x03(\t\".\n\x0b\x43ustomLevel\x12\x1f\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x11.google.type.Expr\"\x89\x03\n\x0c\x44\x65vicePolicy\x12\x1a\n\x12require_screenlock\x18\x01 \x01(\x08\x12\x66\n\x1b\x61llowed_encryption_statuses\x18\x02 \x03(\x0e\x32\x41.google.identity.accesscontextmanager.type.DeviceEncryptionStatus\x12M\n\x0eos_constraints\x18\x03 \x03(\x0b\x32\x35.google.identity.accesscontextmanager.v1.OsConstraint\x12j\n allowed_device_management_levels\x18\x06 \x03(\x0e\x32@.google.identity.accesscontextmanager.type.DeviceManagementLevel\x12\x1e\n\x16require_admin_approval\x18\x07 \x01(\x08\x12\x1a\n\x12require_corp_owned\x18\x08 \x01(\x08\"\x8f\x01\n\x0cOsConstraint\x12\x42\n\x07os_type\x18\x01 \x01(\x0e\x32\x31.google.identity.accesscontextmanager.type.OsType\x12\x17\n\x0fminimum_version\x18\x02 \x01(\t\x12\"\n\x1arequire_verified_chrome_os\x18\x03 \x01(\x08\x42\xa7\x02\n+com.google.identity.accesscontextmanager.v1B\x10\x41\x63\x63\x65ssLevelProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module V1 - AccessLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.AccessLevel").msgclass - BasicLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.BasicLevel").msgclass - BasicLevel::ConditionCombiningFunction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.BasicLevel.ConditionCombiningFunction").enummodule - Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.Condition").msgclass - CustomLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CustomLevel").msgclass - DevicePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DevicePolicy").msgclass - OsConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.OsConstraint").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb deleted file mode 100644 index 3a8fc38766be..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/v1/access_policy.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n;google/identity/accesscontextmanager/v1/access_policy.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x92\x02\n\x0c\x41\x63\x63\x65ssPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\x0e\n\x06scopes\x18\x07 \x03(\t\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t:U\xea\x41R\n0accesscontextmanager.googleapis.com/AccessPolicy\x12\x1e\x61\x63\x63\x65ssPolicies/{access_policy}B\xa2\x02\n+com.google.identity.accesscontextmanager.v1B\x0bPolicyProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module V1 - AccessPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.AccessPolicy").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb deleted file mode 100644 index ea5da3c0c0e1..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/v1/gcp_user_access_binding.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\nEgoogle/identity/accesscontextmanager/v1/gcp_user_access_binding.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa3\x02\n\x14GcpUserAccessBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\tgroup_key\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12N\n\raccess_levels\x18\x03 \x03(\tB7\xe0\x41\x02\xfa\x41\x31\n/accesscontextmanager.googleapis.com/AccessLevel:\x8c\x01\xea\x41\x88\x01\n8accesscontextmanager.googleapis.com/GcpUserAccessBinding\x12Lorganizations/{organization}/gcpUserAccessBindings/{gcp_user_access_binding}B\xb0\x02\n+com.google.identity.accesscontextmanager.v1B\x19GcpUserAccessBindingProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module V1 - GcpUserAccessBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GcpUserAccessBinding").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb deleted file mode 100644 index e57cf251b2a2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/v1/service_perimeter.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n?google/identity/accesscontextmanager/v1/service_perimeter.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x93\x05\n\x10ServicePerimeter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12_\n\x0eperimeter_type\x18\x06 \x01(\x0e\x32G.google.identity.accesscontextmanager.v1.ServicePerimeter.PerimeterType\x12O\n\x06status\x18\x07 \x01(\x0b\x32?.google.identity.accesscontextmanager.v1.ServicePerimeterConfig\x12M\n\x04spec\x18\x08 \x01(\x0b\x32?.google.identity.accesscontextmanager.v1.ServicePerimeterConfig\x12!\n\x19use_explicit_dry_run_spec\x18\t \x01(\x08\"F\n\rPerimeterType\x12\x1a\n\x16PERIMETER_TYPE_REGULAR\x10\x00\x12\x19\n\x15PERIMETER_TYPE_BRIDGE\x10\x01:\x7f\xea\x41|\n4accesscontextmanager.googleapis.com/ServicePerimeter\x12\x44\x61\x63\x63\x65ssPolicies/{access_policy}/servicePerimeters/{service_perimeter}\"\xb5\x0f\n\x16ServicePerimeterConfig\x12\x11\n\tresources\x18\x01 \x03(\t\x12\x15\n\raccess_levels\x18\x02 \x03(\t\x12\x1b\n\x13restricted_services\x18\x04 \x03(\t\x12v\n\x17vpc_accessible_services\x18\n \x01(\x0b\x32U.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.VpcAccessibleServices\x12g\n\x10ingress_policies\x18\x08 \x03(\x0b\x32M.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy\x12\x65\n\x0f\x65gress_policies\x18\t \x03(\x0b\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy\x1aM\n\x15VpcAccessibleServices\x12\x1a\n\x12\x65nable_restriction\x18\x01 \x01(\x08\x12\x18\n\x10\x61llowed_services\x18\x02 \x03(\t\x1a@\n\x0eMethodSelector\x12\x10\n\x06method\x18\x01 \x01(\tH\x00\x12\x14\n\npermission\x18\x02 \x01(\tH\x00\x42\x06\n\x04kind\x1a\x8e\x01\n\x0c\x41piOperation\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12h\n\x10method_selectors\x18\x02 \x03(\x0b\x32N.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.MethodSelector\x1a\x45\n\rIngressSource\x12\x16\n\x0c\x61\x63\x63\x65ss_level\x18\x01 \x01(\tH\x00\x12\x12\n\x08resource\x18\x02 \x01(\tH\x00\x42\x08\n\x06source\x1a\xe6\x01\n\x0bIngressFrom\x12^\n\x07sources\x18\x01 \x03(\x0b\x32M.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressSource\x12\x12\n\nidentities\x18\x02 \x03(\t\x12\x63\n\ridentity_type\x18\x03 \x01(\x0e\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IdentityType\x1a\x80\x01\n\tIngressTo\x12`\n\noperations\x18\x01 \x03(\x0b\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation\x12\x11\n\tresources\x18\x02 \x03(\t\x1a\xd1\x01\n\rIngressPolicy\x12\x61\n\x0cingress_from\x18\x01 \x01(\x0b\x32K.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom\x12]\n\ningress_to\x18\x02 \x01(\x0b\x32I.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressTo\x1a\x85\x01\n\nEgressFrom\x12\x12\n\nidentities\x18\x01 \x03(\t\x12\x63\n\ridentity_type\x18\x02 \x01(\x0e\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IdentityType\x1a\x9b\x01\n\x08\x45gressTo\x12\x11\n\tresources\x18\x01 \x03(\t\x12`\n\noperations\x18\x02 \x03(\x0b\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation\x12\x1a\n\x12\x65xternal_resources\x18\x03 \x03(\t\x1a\xcc\x01\n\x0c\x45gressPolicy\x12_\n\x0b\x65gress_from\x18\x01 \x01(\x0b\x32J.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom\x12[\n\tegress_to\x18\x02 \x01(\x0b\x32H.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo\"n\n\x0cIdentityType\x12\x1d\n\x19IDENTITY_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41NY_IDENTITY\x10\x01\x12\x14\n\x10\x41NY_USER_ACCOUNT\x10\x02\x12\x17\n\x13\x41NY_SERVICE_ACCOUNT\x10\x03\x42\xac\x02\n+com.google.identity.accesscontextmanager.v1B\x15ServicePerimeterProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module V1 - ServicePerimeter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeter").msgclass - ServicePerimeter::PerimeterType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeter.PerimeterType").enummodule - ServicePerimeterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig").msgclass - ServicePerimeterConfig::VpcAccessibleServices = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.VpcAccessibleServices").msgclass - ServicePerimeterConfig::MethodSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.MethodSelector").msgclass - ServicePerimeterConfig::ApiOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation").msgclass - ServicePerimeterConfig::IngressSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressSource").msgclass - ServicePerimeterConfig::IngressFrom = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom").msgclass - ServicePerimeterConfig::IngressTo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressTo").msgclass - ServicePerimeterConfig::IngressPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy").msgclass - ServicePerimeterConfig::EgressFrom = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom").msgclass - ServicePerimeterConfig::EgressTo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo").msgclass - ServicePerimeterConfig::EgressPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy").msgclass - ServicePerimeterConfig::IdentityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IdentityType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md deleted file mode 100644 index 6f796a729053..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Access Context Manager 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-identity-access_context_manager-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/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-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/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-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/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-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb deleted file mode 100644 index 98103f9a8eb2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb +++ /dev/null @@ -1,84 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module Type - # The encryption state of the device. - module DeviceEncryptionStatus - # The encryption status of the device is not specified or not known. - ENCRYPTION_UNSPECIFIED = 0 - - # The device does not support encryption. - ENCRYPTION_UNSUPPORTED = 1 - - # The device supports encryption, but is currently unencrypted. - UNENCRYPTED = 2 - - # The device is encrypted. - ENCRYPTED = 3 - end - - # The operating system type of the device. - # Next id: 7 - module OsType - # The operating system of the device is not specified or not known. - OS_UNSPECIFIED = 0 - - # A desktop Mac operating system. - DESKTOP_MAC = 1 - - # A desktop Windows operating system. - DESKTOP_WINDOWS = 2 - - # A desktop Linux operating system. - DESKTOP_LINUX = 3 - - # A desktop ChromeOS operating system. - DESKTOP_CHROME_OS = 6 - - # An Android operating system. - ANDROID = 4 - - # An iOS operating system. - IOS = 5 - end - - # The degree to which the device is managed by the Cloud organization. - module DeviceManagementLevel - # The device's management level is not specified or not known. - MANAGEMENT_UNSPECIFIED = 0 - - # The device is not managed. - NONE = 1 - - # Basic management is enabled, which is generally limited to monitoring and - # wiping the corporate account. - BASIC = 2 - - # Complete device management. This includes more thorough monitoring and the - # ability to directly manage the device (such as remote wiping). This can be - # enabled through the Android Enterprise Platform. - COMPLETE = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb deleted file mode 100644 index 0a4ef8552281..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb +++ /dev/null @@ -1,539 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module V1 - # A request to list all `AccessPolicies` for a container. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the container to list AccessPolicy instances - # from. - # - # Format: - # `organizations/{org_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Number of AccessPolicy instances to include in the list. Default 100. - # @!attribute [rw] page_token - # @return [::String] - # Next page token for the next batch of AccessPolicy instances. Defaults to - # the first page of results. - class ListAccessPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to `ListAccessPoliciesRequest`. - # @!attribute [rw] access_policies - # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessPolicy>] - # List of the AccessPolicy instances. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token to retrieve the next page of results. If the value is - # empty, no further results remain. - class ListAccessPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a particular `AccessPolicy`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the access policy to get. - # - # Format `accessPolicies/{policy_id}` - class GetAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update an `AccessPolicy`. - # @!attribute [rw] policy - # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # Required. The updated AccessPolicy. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask to control which fields get updated. Must be non-empty. - class UpdateAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete an `AccessPolicy`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the access policy to delete. - # - # Format `accessPolicies/{policy_id}` - class DeleteAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list all `AccessLevels` in an `AccessPolicy`. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy to list [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Number of [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] to include in - # the list. Default 100. - # @!attribute [rw] page_token - # @return [::String] - # Next page token for the next batch of [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] instances. - # Defaults to the first page of results. - # @!attribute [rw] access_level_format - # @return [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression language, as - # `CustomLevels`, rather than as `BasicLevels`. Defaults to returning - # `AccessLevels` in the format they were defined. - class ListAccessLevelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to `ListAccessLevelsRequest`. - # @!attribute [rw] access_levels - # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # List of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] instances. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token to retrieve the next page of results. If the value is - # empty, no further results remain. - class ListAccessLevelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a particular `AccessLevel`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - # @!attribute [rw] access_level_format - # @return [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression - # Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where - # [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # are returned as `BasicLevels` or `CustomLevels` based on how they were - # created. If set to CEL, all [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are returned as - # `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent - # `CustomLevels`. - class GetAccessLevelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create an `AccessLevel`. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy which owns this [Access - # Level] [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @!attribute [rw] access_level - # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] - # Required. The [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] to create. - # Syntactic correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - class CreateAccessLevelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update an `AccessLevel`. - # @!attribute [rw] access_level - # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] - # Required. The updated [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic - # correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask to control which fields get updated. Must be non-empty. - class UpdateAccessLevelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete an `AccessLevel`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - class DeleteAccessLevelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to replace all existing Access Levels in an Access Policy with - # the Access Levels provided. This is done atomically. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy which owns these - # [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @!attribute [rw] access_levels - # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # Required. The desired [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] that should - # replace all existing [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - class ReplaceAccessLevelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to ReplaceAccessLevelsRequest. This will be put inside of - # Operation.response field. - # @!attribute [rw] access_levels - # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # List of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] instances. - class ReplaceAccessLevelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list all `ServicePerimeters` in an `AccessPolicy`. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy to list [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Number of [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to include - # in the list. Default 100. - # @!attribute [rw] page_token - # @return [::String] - # Next page token for the next batch of [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. - # Defaults to the first page of results. - class ListServicePerimetersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to `ListServicePerimetersRequest`. - # @!attribute [rw] service_perimeters - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # List of the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token to retrieve the next page of results. If the value is - # empty, no further results remain. - class ListServicePerimetersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a particular `ServicePerimeter`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` - class GetServicePerimeterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create a `ServicePerimeter`. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy which owns this [Service - # Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @!attribute [rw] service_perimeter - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # Required. The [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to create. - # Syntactic correctness of the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is a - # precondition for creation. - class CreateServicePerimeterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update a `ServicePerimeter`. - # @!attribute [rw] service_perimeter - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # Required. The updated `ServicePerimeter`. Syntactic correctness of the - # `ServicePerimeter` is a precondition for creation. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask to control which fields get updated. Must be non-empty. - class UpdateServicePerimeterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete a `ServicePerimeter`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}` - class DeleteServicePerimeterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to replace all existing Service Perimeters in an Access Policy - # with the Service Perimeters provided. This is done atomically. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy which owns these - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @!attribute [rw] service_perimeters - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # Required. The desired [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] that should - # replace all existing [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - class ReplaceServicePerimetersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to ReplaceServicePerimetersRequest. This will be put inside of - # Operation.response field. - # @!attribute [rw] service_perimeters - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # List of the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. - class ReplaceServicePerimetersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to commit dry-run specs in all [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] belonging to - # an {::Google::Identity::AccessContextManager::V1::AccessPolicy Access Policy}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the parent [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for - # the commit operation. - # - # Format: `accessPolicies/{policy_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # commit operation is to be performed on. If, at the time of commit, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the commit operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - class CommitServicePerimetersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to CommitServicePerimetersRequest. This will be put inside of - # Operation.response field. - # @!attribute [rw] service_perimeters - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # List of all the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances in - # the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - class CommitServicePerimetersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of [ListGcpUserAccessBindings] - # [google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings]. - # @!attribute [rw] parent - # @return [::String] - # Required. Example: "organizations/256" - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of items to return. The server may return fewer items. - # If left blank, the server may return any number of items. - # @!attribute [rw] page_token - # @return [::String] - # Optional. If left blank, returns the first page. To enumerate all items, use the - # [next_page_token] - # [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token] - # from your previous list operation. - class ListGcpUserAccessBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of [ListGcpUserAccessBindings] - # [google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings]. - # @!attribute [rw] gcp_user_access_bindings - # @return [::Array<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] - # [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # @!attribute [rw] next_page_token - # @return [::String] - # Token to get the next page of items. If blank, there are no more items. - class ListGcpUserAccessBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of [GetGcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.AccessContextManager.GetGcpUserAccessBinding]. - # @!attribute [rw] name - # @return [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - class GetGcpUserAccessBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of [CreateGcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.AccessContextManager.CreateGcpUserAccessBinding]. - # @!attribute [rw] parent - # @return [::String] - # Required. Example: "organizations/256" - # @!attribute [rw] gcp_user_access_binding - # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - class CreateGcpUserAccessBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of [UpdateGcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.AccessContextManager.UpdateGcpUserAccessBinding]. - # @!attribute [rw] gcp_user_access_binding - # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Only the fields specified in this mask are updated. Because name and - # group_key cannot be changed, update_mask is required and must always be: - # - # update_mask { - # paths: "access_levels" - # } - class UpdateGcpUserAccessBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of [DeleteGcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.AccessContextManager.DeleteGcpUserAccessBinding]. - # @!attribute [rw] name - # @return [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - class DeleteGcpUserAccessBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Currently, a completed operation means nothing. In the future, this metadata - # and a completed operation may indicate that the binding has taken effect and - # is affecting access decisions for all users. - class GcpUserAccessBindingOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata of Access Context Manager's Long Running Operations. - class AccessContextManagerOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The format used in an `AccessLevel`. - module LevelFormat - # The format was not specified. - LEVEL_FORMAT_UNSPECIFIED = 0 - - # Uses the format the resource was defined in. BasicLevels are returned as - # BasicLevels, CustomLevels are returned as CustomLevels. - AS_DEFINED = 1 - - # Use Cloud Common Expression Language when returning the resource. Both - # BasicLevels and CustomLevels are returned as CustomLevels. - CEL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb deleted file mode 100644 index 263cc28aa3d0..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb +++ /dev/null @@ -1,201 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module V1 - # An `AccessLevel` is a label that can be applied to requests to Google Cloud - # services, along with a list of requirements necessary for the label to be - # applied. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the Access Level. The `short_name` component - # must begin with a letter and only include alphanumeric and '_'. Format: - # `accessPolicies/{access_policy}/accessLevels/{access_level}`. The maximum - # length of the `access_level` component is 50 characters. - # @!attribute [rw] title - # @return [::String] - # Human readable title. Must be unique within the Policy. - # @!attribute [rw] description - # @return [::String] - # Description of the `AccessLevel` and its use. Does not affect behavior. - # @!attribute [rw] basic - # @return [::Google::Identity::AccessContextManager::V1::BasicLevel] - # A `BasicLevel` composed of `Conditions`. - # - # Note: The following fields are mutually exclusive: `basic`, `custom`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom - # @return [::Google::Identity::AccessContextManager::V1::CustomLevel] - # A `CustomLevel` written in the Common Expression Language. - # - # Note: The following fields are mutually exclusive: `custom`, `basic`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `AccessLevel` was created in UTC. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `AccessLevel` was updated in UTC. - class AccessLevel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BasicLevel` is an `AccessLevel` using a set of recommended features. - # @!attribute [rw] conditions - # @return [::Array<::Google::Identity::AccessContextManager::V1::Condition>] - # Required. A list of requirements for the `AccessLevel` to be granted. - # @!attribute [rw] combining_function - # @return [::Google::Identity::AccessContextManager::V1::BasicLevel::ConditionCombiningFunction] - # How the `conditions` list should be combined to determine if a request is - # granted this `AccessLevel`. If AND is used, each `Condition` in - # `conditions` must be satisfied for the `AccessLevel` to be applied. If OR - # is used, at least one `Condition` in `conditions` must be satisfied for the - # `AccessLevel` to be applied. Default behavior is AND. - class BasicLevel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Options for how the `conditions` list should be combined to determine if - # this `AccessLevel` is applied. Default is AND. - module ConditionCombiningFunction - # All `Conditions` must be true for the `BasicLevel` to be true. - AND = 0 - - # If at least one `Condition` is true, then the `BasicLevel` is true. - OR = 1 - end - end - - # A condition necessary for an `AccessLevel` to be granted. The Condition is an - # AND over its fields. So a Condition is true if: 1) the request IP is from one - # of the listed subnetworks AND 2) the originating device complies with the - # listed device policy AND 3) all listed access levels are granted AND 4) the - # request was sent at a time allowed by the DateTimeRestriction. - # @!attribute [rw] ip_subnetworks - # @return [::Array<::String>] - # CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for - # a CIDR IP address block, the specified IP address portion must be properly - # truncated (i.e. all the host bits must be zero) or the input is considered - # malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is - # not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas - # "2001:db8::1/32" is not. The originating IP of a request must be in one of - # the listed subnets in order for this Condition to be true. If empty, all IP - # addresses are allowed. - # @!attribute [rw] device_policy - # @return [::Google::Identity::AccessContextManager::V1::DevicePolicy] - # Device specific restrictions, all restrictions must hold for the - # Condition to be true. If not specified, all devices are allowed. - # @!attribute [rw] required_access_levels - # @return [::Array<::String>] - # A list of other access levels defined in the same `Policy`, referenced by - # resource name. Referencing an `AccessLevel` which does not exist is an - # error. All access levels listed must be granted for the Condition - # to be true. Example: - # "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"` - # @!attribute [rw] negate - # @return [::Boolean] - # Whether to negate the Condition. If true, the Condition becomes a NAND over - # its non-empty fields, each field must be false for the Condition overall to - # be satisfied. Defaults to false. - # @!attribute [rw] members - # @return [::Array<::String>] - # The request must be made by one of the provided user or service - # accounts. Groups are not supported. - # Syntax: - # `user:{emailid}` - # `serviceAccount:{emailid}` - # If not specified, a request may come from any user. - # @!attribute [rw] regions - # @return [::Array<::String>] - # The request must originate from one of the provided countries/regions. - # Must be valid ISO 3166-1 alpha-2 codes. - class Condition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language - # to represent the necessary conditions for the level to apply to a request. - # See CEL spec at: https://github.com/google/cel-spec - # @!attribute [rw] expr - # @return [::Google::Type::Expr] - # Required. A Cloud CEL expression evaluating to a boolean. - class CustomLevel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `DevicePolicy` specifies device specific restrictions necessary to acquire a - # given access level. A `DevicePolicy` specifies requirements for requests from - # devices to be granted access levels, it does not do any enforcement on the - # device. `DevicePolicy` acts as an AND over all specified fields, and each - # repeated field is an OR over its elements. Any unset fields are ignored. For - # example, if the proto is { os_type : DESKTOP_WINDOWS, os_type : - # DESKTOP_LINUX, encryption_status: ENCRYPTED}, then the DevicePolicy will be - # true for requests originating from encrypted Linux desktops and encrypted - # Windows desktops. - # @!attribute [rw] require_screenlock - # @return [::Boolean] - # Whether or not screenlock is required for the DevicePolicy to be true. - # Defaults to `false`. - # @!attribute [rw] allowed_encryption_statuses - # @return [::Array<::Google::Identity::AccessContextManager::Type::DeviceEncryptionStatus>] - # Allowed encryptions statuses, an empty list allows all statuses. - # @!attribute [rw] os_constraints - # @return [::Array<::Google::Identity::AccessContextManager::V1::OsConstraint>] - # Allowed OS versions, an empty list allows all types and all versions. - # @!attribute [rw] allowed_device_management_levels - # @return [::Array<::Google::Identity::AccessContextManager::Type::DeviceManagementLevel>] - # Allowed device management levels, an empty list allows all management - # levels. - # @!attribute [rw] require_admin_approval - # @return [::Boolean] - # Whether the device needs to be approved by the customer admin. - # @!attribute [rw] require_corp_owned - # @return [::Boolean] - # Whether the device needs to be corp owned. - class DevicePolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A restriction on the OS type and version of devices making requests. - # @!attribute [rw] os_type - # @return [::Google::Identity::AccessContextManager::Type::OsType] - # Required. The allowed OS type. - # @!attribute [rw] minimum_version - # @return [::String] - # The minimum allowed OS version. If not set, any version of this OS - # satisfies the constraint. Format: `"major.minor.patch"`. - # Examples: `"10.5.301"`, `"9.2.1"`. - # @!attribute [rw] require_verified_chrome_os - # @return [::Boolean] - # Only allows requests from devices with a verified Chrome OS. - # Verifications includes requirements that the device is enterprise-managed, - # conformant to domain policies, and the caller has permission to call - # the API targeted by the request. - class OsConstraint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb deleted file mode 100644 index b034d49fe22d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module V1 - # `AccessPolicy` is a container for `AccessLevels` (which define the necessary - # attributes to use Google Cloud services) and `ServicePerimeters` (which - # define regions of services able to freely pass data within a perimeter). An - # access policy is globally visible within an organization, and the - # restrictions it specifies apply to all projects within an organization. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the `AccessPolicy`. Format: - # `accessPolicies/{access_policy}` - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of this `AccessPolicy` in the Cloud Resource - # Hierarchy. Currently immutable once created. Format: - # `organizations/{organization_id}` - # @!attribute [rw] title - # @return [::String] - # Required. Human readable title. Does not affect behavior. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # The scopes of a policy define which resources an ACM policy can restrict, - # and where ACM resources can be referenced. - # For example, a policy with scopes=["folders/123"] has the following - # behavior: - # - vpcsc perimeters can only restrict projects within folders/123 - # - access levels can only be referenced by resources within folders/123. - # If empty, there are no limitations on which resources can be restricted by - # an ACM policy, and there are no limitations on where ACM resources can be - # referenced. - # Only one policy can include a given scope (attempting to create a second - # policy which includes "folders/123" will result in an error). - # Currently, scopes cannot be modified after a policy is created. - # Currently, policies can only have a single scope. - # Format: list of `folders/{folder_number}` or `projects/{project_number}` - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `AccessPolicy` was created in UTC. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `AccessPolicy` was updated in UTC. - # @!attribute [rw] etag - # @return [::String] - # Output only. An opaque identifier for the current version of the - # `AccessPolicy`. This will always be a strongly validated etag, meaning that - # two Access Polices will be identical if and only if their etags are - # identical. Clients should not expect this to be in any specific format. - class AccessPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb deleted file mode 100644 index bbd9b110d43b..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.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! - - -module Google - module Identity - module AccessContextManager - module V1 - # Restricts access to Cloud Console and Google Cloud APIs for a set of users - # using Context-Aware Access. - # @!attribute [rw] name - # @return [::String] - # Immutable. Assigned by the server during creation. The last segment has an arbitrary - # length and has only URI unreserved characters (as defined by - # [RFC 3986 Section 2.3](https://tools.ietf.org/html/rfc3986#section-2.3)). - # Should not be specified by the client during creation. - # Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - # @!attribute [rw] group_key - # @return [::String] - # Required. Immutable. Google Group id whose members are subject to this binding's restrictions. - # See "id" in the [G Suite Directory API's Groups resource] - # (https://developers.google.com/admin-sdk/directory/v1/reference/groups#resource). - # If a group's email address/alias is changed, this resource will continue - # to point at the changed group. This field does not accept group email - # addresses or aliases. - # Example: "01d520gv4vjcrht" - # @!attribute [rw] access_levels - # @return [::Array<::String>] - # Required. Access level that a user must have to be granted access. Only one access - # level is supported, not multiple. This repeated field must have exactly - # one element. - # Example: "accessPolicies/9522/accessLevels/device_trusted" - class GcpUserAccessBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb deleted file mode 100644 index be4e39e46ef2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb +++ /dev/null @@ -1,500 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module V1 - # `ServicePerimeter` describes a set of Google Cloud resources which can freely - # import and export data amongst themselves, but not export outside of the - # `ServicePerimeter`. If a request with a source within this `ServicePerimeter` - # has a target outside of the `ServicePerimeter`, the request will be blocked. - # Otherwise the request is allowed. There are two types of Service Perimeter - - # Regular and Bridge. Regular Service Perimeters cannot overlap, a single - # Google Cloud project can only belong to a single regular Service Perimeter. - # Service Perimeter Bridges can contain only Google Cloud projects as members, - # a single Google Cloud project may belong to multiple Service Perimeter - # Bridges. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the ServicePerimeter. The `short_name` - # component must begin with a letter and only include alphanumeric and '_'. - # Format: - # `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}` - # @!attribute [rw] title - # @return [::String] - # Human readable title. Must be unique within the Policy. - # @!attribute [rw] description - # @return [::String] - # Description of the `ServicePerimeter` and its use. Does not affect - # behavior. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `ServicePerimeter` was created in UTC. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `ServicePerimeter` was updated in UTC. - # @!attribute [rw] perimeter_type - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter::PerimeterType] - # Perimeter type indicator. A single project is - # allowed to be a member of single regular perimeter, but multiple service - # perimeter bridges. A project cannot be a included in a perimeter bridge - # without being included in regular perimeter. For perimeter bridges, - # the restricted service list as well as access level lists must be - # empty. - # @!attribute [rw] status - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig] - # Current ServicePerimeter configuration. Specifies sets of resources, - # restricted services and access levels that determine perimeter - # content and boundaries. - # @!attribute [rw] spec - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig] - # Proposed (or dry run) ServicePerimeter configuration. This configuration - # allows to specify and test ServicePerimeter configuration without enforcing - # actual access restrictions. Only allowed to be set when the - # "use_explicit_dry_run_spec" flag is set. - # @!attribute [rw] use_explicit_dry_run_spec - # @return [::Boolean] - # Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly - # exists for all Service Perimeters, and that spec is identical to the - # status for those Service Perimeters. When this flag is set, it inhibits the - # generation of the implicit spec, thereby allowing the user to explicitly - # provide a configuration ("spec") to use in a dry-run version of the Service - # Perimeter. This allows the user to test changes to the enforced config - # ("status") without actually enforcing them. This testing is done through - # analyzing the differences between currently enforced and suggested - # restrictions. use_explicit_dry_run_spec must bet set to True if any of the - # fields in the spec are set to non-default values. - class ServicePerimeter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the type of the Perimeter. There are two types: regular and - # bridge. Regular Service Perimeter contains resources, access levels, and - # restricted services. Every resource can be in at most ONE - # regular Service Perimeter. - # - # In addition to being in a regular service perimeter, a resource can also - # be in zero or more perimeter bridges. A perimeter bridge only contains - # resources. Cross project operations are permitted if all effected - # resources share some perimeter (whether bridge or regular). Perimeter - # Bridge does not contain access levels or services: those are governed - # entirely by the regular perimeter that resource is in. - # - # Perimeter Bridges are typically useful when building more complex toplogies - # with many independent perimeters that need to share some data with a common - # perimeter, but should not be able to share data among themselves. - module PerimeterType - # Regular Perimeter. - PERIMETER_TYPE_REGULAR = 0 - - # Perimeter Bridge. - PERIMETER_TYPE_BRIDGE = 1 - end - end - - # `ServicePerimeterConfig` specifies a set of Google Cloud resources that - # describe specific Service Perimeter configuration. - # @!attribute [rw] resources - # @return [::Array<::String>] - # A list of Google Cloud resources that are inside of the service perimeter. - # Currently only projects are allowed. Format: `projects/{project_number}` - # @!attribute [rw] access_levels - # @return [::Array<::String>] - # A list of `AccessLevel` resource names that allow resources within the - # `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed - # must be in the same policy as this `ServicePerimeter`. Referencing a - # nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are - # listed, resources within the perimeter can only be accessed via Google - # Cloud calls with request origins within the perimeter. Example: - # `"accessPolicies/MY_POLICY/accessLevels/MY_LEVEL"`. - # For Service Perimeter Bridge, must be empty. - # @!attribute [rw] restricted_services - # @return [::Array<::String>] - # Google Cloud services that are subject to the Service Perimeter - # restrictions. For example, if `storage.googleapis.com` is specified, access - # to the storage buckets inside the perimeter must meet the perimeter's - # access restrictions. - # @!attribute [rw] vpc_accessible_services - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::VpcAccessibleServices] - # Configuration for APIs allowed within Perimeter. - # @!attribute [rw] ingress_policies - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressPolicy>] - # List of [IngressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # to apply to the perimeter. A perimeter may have multiple [IngressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy], - # each of which is evaluated separately. Access is granted if any [Ingress - # Policy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # grants it. Must be empty for a perimeter bridge. - # @!attribute [rw] egress_policies - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::EgressPolicy>] - # List of [EgressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # to apply to the perimeter. A perimeter may have multiple [EgressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy], - # each of which is evaluated separately. Access is granted if any - # [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # grants it. Must be empty for a perimeter bridge. - class ServicePerimeterConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies how APIs are allowed to communicate within the Service - # Perimeter. - # @!attribute [rw] enable_restriction - # @return [::Boolean] - # Whether to restrict API calls within the Service Perimeter to the list of - # APIs specified in 'allowed_services'. - # @!attribute [rw] allowed_services - # @return [::Array<::String>] - # The list of APIs usable within the Service Perimeter. Must be empty - # unless 'enable_restriction' is True. You can specify a list of individual - # services, as well as include the 'RESTRICTED-SERVICES' value, which - # automatically includes all of the services protected by the perimeter. - class VpcAccessibleServices - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An allowed method or permission of a service specified in [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]. - # @!attribute [rw] method - # @return [::String] - # Value for `method` should be a valid method name for the corresponding - # `service_name` in [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]. - # If `*` used as value for `method`, then ALL methods and permissions are - # allowed. - # - # Note: The following fields are mutually exclusive: `method`, `permission`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] permission - # @return [::String] - # Value for `permission` should be a valid Cloud IAM permission for the - # corresponding `service_name` in [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]. - # - # Note: The following fields are mutually exclusive: `permission`, `method`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class MethodSelector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Identification for an API Operation. - # @!attribute [rw] service_name - # @return [::String] - # The name of the API whose methods or permissions the [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # or [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # want to allow. A single [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # with `service_name` field set to `*` will allow all methods AND - # permissions for all services. - # @!attribute [rw] method_selectors - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::MethodSelector>] - # API methods or permissions to allow. Method or permission must belong to - # the service specified by `service_name` field. A single [MethodSelector] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.MethodSelector] - # entry with `*` specified for the `method` field will allow all methods - # AND permissions for the service specified in `service_name`. - class ApiOperation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The source that [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # authorizes access from. - # @!attribute [rw] access_level - # @return [::String] - # An [AccessLevel] - # [google.identity.accesscontextmanager.v1.AccessLevel] resource - # name that allow resources within the [ServicePerimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to be - # accessed from the internet. [AccessLevels] - # [google.identity.accesscontextmanager.v1.AccessLevel] listed must - # be in the same policy as this [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # Referencing a nonexistent [AccessLevel] - # [google.identity.accesscontextmanager.v1.AccessLevel] will cause - # an error. If no [AccessLevel] - # [google.identity.accesscontextmanager.v1.AccessLevel] names are - # listed, resources within the perimeter can only be accessed via Google - # Cloud calls with request origins within the perimeter. Example: - # `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is - # specified for `access_level`, then all [IngressSources] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressSource] - # will be allowed. - # - # Note: The following fields are mutually exclusive: `access_level`, `resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] resource - # @return [::String] - # A Google Cloud resource that is allowed to ingress the perimeter. - # Requests from these resources will be allowed to access perimeter data. - # Currently only projects are allowed. - # Format: `projects/{project_number}` - # The project may be in any Google Cloud organization, not just the - # organization that the perimeter is defined in. `*` is not allowed, the - # case of allowing all Google Cloud resources only is not supported. - # - # Note: The following fields are mutually exclusive: `resource`, `access_level`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class IngressSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the conditions under which an [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # matches a request. Conditions are based on information about the source of - # the request. The request must satisfy what is defined in `sources` AND - # identity related fields in order to match. - # @!attribute [rw] sources - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressSource>] - # Sources that this [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # authorizes access from. - # @!attribute [rw] identities - # @return [::Array<::String>] - # A list of identities that are allowed access through this ingress - # policy. Should be in the format of email address. The email address - # should represent individual user or service account only. - # @!attribute [rw] identity_type - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IdentityType] - # Specifies the type of identities that are allowed access from outside the - # perimeter. If left unspecified, then members of `identities` field will - # be allowed access. - class IngressFrom - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the conditions under which an [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # matches a request. Conditions are based on information about the - # [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # intended to be performed on the target resource of the request. The request - # must satisfy what is defined in `operations` AND `resources` in order to - # match. - # @!attribute [rw] operations - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::ApiOperation>] - # A list of [ApiOperations] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # allowed to be performed by the sources specified in corresponding - # [IngressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom] - # in this [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # @!attribute [rw] resources - # @return [::Array<::String>] - # A list of resources, currently only projects in the form - # `projects/`, protected by this [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] that are - # allowed to be accessed by sources defined in the corresponding - # [IngressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom]. - # If a single `*` is specified, then access to all resources inside the - # perimeter are allowed. - class IngressTo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Policy for ingress into [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # [IngressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # match requests based on `ingress_from` and `ingress_to` stanzas. For an - # ingress policy to match, both the `ingress_from` and `ingress_to` stanzas - # must be matched. If an [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # matches a request, the request is allowed through the perimeter boundary - # from outside the perimeter. - # - # For example, access from the internet can be allowed either - # based on an [AccessLevel] - # [google.identity.accesscontextmanager.v1.AccessLevel] or, for traffic - # hosted on Google Cloud, the project of the source network. For access from - # private networks, using the project of the hosting network is required. - # - # Individual ingress policies can be limited by restricting which - # services and/or actions they match using the `ingress_to` field. - # @!attribute [rw] ingress_from - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressFrom] - # Defines the conditions on the source of a request causing this - # [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # to apply. - # @!attribute [rw] ingress_to - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressTo] - # Defines the conditions on the [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # and request destination that cause this [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # to apply. - class IngressPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the conditions under which an [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # matches a request. Conditions based on information about the source of the - # request. Note that if the destination of the request is also protected by a - # [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter], then that - # [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] must have - # an [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # which allows access in order for this request to succeed. - # @!attribute [rw] identities - # @return [::Array<::String>] - # A list of identities that are allowed access through this [EgressPolicy]. - # Should be in the format of email address. The email address should - # represent individual user or service account only. - # @!attribute [rw] identity_type - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IdentityType] - # Specifies the type of identities that are allowed access to outside the - # perimeter. If left unspecified, then members of `identities` field will - # be allowed access. - class EgressFrom - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the conditions under which an [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # matches a request. Conditions are based on information about the - # [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # intended to be performed on the `resources` specified. Note that if the - # destination of the request is also protected by a [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter], then that - # [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] must have - # an [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # which allows access in order for this request to succeed. The request must - # match `operations` AND `resources` fields in order to be allowed egress out - # of the perimeter. - # @!attribute [rw] resources - # @return [::Array<::String>] - # A list of resources, currently only projects in the form - # `projects/`, that are allowed to be accessed by sources - # defined in the corresponding [EgressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom]. - # A request matches if it contains a resource in this list. If `*` is - # specified for `resources`, then this [EgressTo] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo] - # rule will authorize access to all resources outside the perimeter. - # @!attribute [rw] operations - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::ApiOperation>] - # A list of [ApiOperations] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # allowed to be performed by the sources specified in the corresponding - # [EgressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom]. - # A request matches if it uses an operation/service in this list. - # @!attribute [rw] external_resources - # @return [::Array<::String>] - # A list of external resources that are allowed to be accessed. Only AWS - # and Azure resources are supported. For Amazon S3, the supported format is - # s3://BUCKET_NAME. For Azure Storage, the supported format is - # azure://myaccount.blob.core.windows.net/CONTAINER_NAME. A request matches - # if it contains an external resource in this list (Example: - # s3://bucket/path). Currently '*' is not allowed. - class EgressTo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Policy for egress from perimeter. - # - # [EgressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # match requests based on `egress_from` and `egress_to` stanzas. For an - # [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # to match, both `egress_from` and `egress_to` stanzas must be matched. If an - # [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # matches a request, the request is allowed to span the [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] boundary. - # For example, an [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # can be used to allow VMs on networks within the [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to access a - # defined set of projects outside the perimeter in certain contexts (e.g. to - # read data from a Cloud Storage bucket or query against a BigQuery dataset). - # - # [EgressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # are concerned with the *resources* that a request relates as well as the - # API services and API actions being used. They do not related to the - # direction of data movement. More detailed documentation for this concept - # can be found in the descriptions of [EgressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom] - # and [EgressTo] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo]. - # @!attribute [rw] egress_from - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::EgressFrom] - # Defines conditions on the source of a request causing this [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # to apply. - # @!attribute [rw] egress_to - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::EgressTo] - # Defines the conditions on the [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # and destination resources that cause this [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # to apply. - class EgressPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the types of identities that are allowed access in either - # [IngressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom] - # or [EgressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom] - # rules. - module IdentityType - # No blanket identity group specified. - IDENTITY_TYPE_UNSPECIFIED = 0 - - # Authorize access from all identities outside the perimeter. - ANY_IDENTITY = 1 - - # Authorize access from all human users outside the perimeter. - ANY_USER_ACCOUNT = 2 - - # Authorize access from all service accounts outside the perimeter. - ANY_SERVICE_ACCOUNT = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile deleted file mode 100644 index 7c4756c28a3a..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-identity-access_context_manager-v1", path: "../" -else - gem "google-identity-access_context_manager-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-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb deleted file mode 100644 index 8df7e306a7f2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.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 accesscontextmanager_v1_generated_AccessContextManager_CommitServicePerimeters_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the commit_service_perimeters call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#commit_service_perimeters. -# -def commit_service_perimeters - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new - - # Call the commit_service_perimeters method. - result = client.commit_service_perimeters request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_CommitServicePerimeters_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb deleted file mode 100644 index 7ad25cd17d4d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.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 accesscontextmanager_v1_generated_AccessContextManager_CreateAccessLevel_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the create_access_level call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_level. -# -def create_access_level - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new - - # Call the create_access_level method. - result = client.create_access_level request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_CreateAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb deleted file mode 100644 index a9f9d7289673..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.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 accesscontextmanager_v1_generated_AccessContextManager_CreateAccessPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the create_access_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_policy. -# -def create_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::AccessPolicy.new - - # Call the create_access_policy method. - result = client.create_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_CreateAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb deleted file mode 100644 index f1020626f742..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_CreateGcpUserAccessBinding_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the create_gcp_user_access_binding call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_gcp_user_access_binding. -# -def create_gcp_user_access_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new - - # Call the create_gcp_user_access_binding method. - result = client.create_gcp_user_access_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_CreateGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb deleted file mode 100644 index 412e217d7849..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.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 accesscontextmanager_v1_generated_AccessContextManager_CreateServicePerimeter_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the create_service_perimeter call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_service_perimeter. -# -def create_service_perimeter - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new - - # Call the create_service_perimeter method. - result = client.create_service_perimeter request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_CreateServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb deleted file mode 100644 index 00c5232fc6d1..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.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 accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessLevel_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the delete_access_level call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_level. -# -def delete_access_level - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new - - # Call the delete_access_level method. - result = client.delete_access_level request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb deleted file mode 100644 index eee4a031ae6e..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.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 accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the delete_access_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_policy. -# -def delete_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new - - # Call the delete_access_policy method. - result = client.delete_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb deleted file mode 100644 index dd965cf499c5..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_DeleteGcpUserAccessBinding_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the delete_gcp_user_access_binding call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_gcp_user_access_binding. -# -def delete_gcp_user_access_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new - - # Call the delete_gcp_user_access_binding method. - result = client.delete_gcp_user_access_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb deleted file mode 100644 index 983eda52bacc..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.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 accesscontextmanager_v1_generated_AccessContextManager_DeleteServicePerimeter_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the delete_service_perimeter call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_service_perimeter. -# -def delete_service_perimeter - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new - - # Call the delete_service_perimeter method. - result = client.delete_service_perimeter request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb deleted file mode 100644 index 0597699fa439..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_GetAccessLevel_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the get_access_level call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_level. -# -def get_access_level - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new - - # Call the get_access_level method. - result = client.get_access_level request - - # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_GetAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb deleted file mode 100644 index 0531cf3580ad..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_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 accesscontextmanager_v1_generated_AccessContextManager_GetAccessPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the get_access_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_policy. -# -def get_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new - - # Call the get_access_policy method. - result = client.get_access_policy request - - # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_GetAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb deleted file mode 100644 index d732c416d5c8..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_GetGcpUserAccessBinding_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the get_gcp_user_access_binding call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_gcp_user_access_binding. -# -def get_gcp_user_access_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new - - # Call the get_gcp_user_access_binding method. - result = client.get_gcp_user_access_binding request - - # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_GetGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb deleted file mode 100644 index b134f682cf0c..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/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 accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the get_iam_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::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 accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb deleted file mode 100644 index fd5e1db7b14d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_GetServicePerimeter_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the get_service_perimeter call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_service_perimeter. -# -def get_service_perimeter - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new - - # Call the get_service_perimeter method. - result = client.get_service_perimeter request - - # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_GetServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb deleted file mode 100644 index a5bf8a3cae59..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.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 accesscontextmanager_v1_generated_AccessContextManager_ListAccessLevels_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the list_access_levels call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_levels. -# -def list_access_levels - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new - - # Call the list_access_levels method. - result = client.list_access_levels request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel. - p item - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ListAccessLevels_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb deleted file mode 100644 index 8244d0f6948b..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.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 accesscontextmanager_v1_generated_AccessContextManager_ListAccessPolicies_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the list_access_policies call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_policies. -# -def list_access_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new - - # Call the list_access_policies method. - result = client.list_access_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy. - p item - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ListAccessPolicies_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb deleted file mode 100644 index 933198ef288d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_ListGcpUserAccessBindings_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the list_gcp_user_access_bindings call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_gcp_user_access_bindings. -# -def list_gcp_user_access_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new - - # Call the list_gcp_user_access_bindings method. - result = client.list_gcp_user_access_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - p item - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ListGcpUserAccessBindings_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb deleted file mode 100644 index 7e6aab1e29ef..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.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 accesscontextmanager_v1_generated_AccessContextManager_ListServicePerimeters_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the list_service_perimeters call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_service_perimeters. -# -def list_service_perimeters - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new - - # Call the list_service_perimeters method. - result = client.list_service_perimeters request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter. - p item - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ListServicePerimeters_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb deleted file mode 100644 index 8c5a3d228fae..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.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 accesscontextmanager_v1_generated_AccessContextManager_ReplaceAccessLevels_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the replace_access_levels call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_access_levels. -# -def replace_access_levels - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new - - # Call the replace_access_levels method. - result = client.replace_access_levels request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ReplaceAccessLevels_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb deleted file mode 100644 index 0bb1d425f50d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.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 accesscontextmanager_v1_generated_AccessContextManager_ReplaceServicePerimeters_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the replace_service_perimeters call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_service_perimeters. -# -def replace_service_perimeters - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new - - # Call the replace_service_perimeters method. - result = client.replace_service_perimeters request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ReplaceServicePerimeters_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb deleted file mode 100644 index 47743b7f9b84..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/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 accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the set_iam_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::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 accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb deleted file mode 100644 index 780f1b93ba1a..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/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 accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the test_iam_permissions call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::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 accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb deleted file mode 100644 index 0c0f947da7b7..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.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 accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessLevel_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the update_access_level call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_level. -# -def update_access_level - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new - - # Call the update_access_level method. - result = client.update_access_level request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb deleted file mode 100644 index a29a2622b29f..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.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 accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the update_access_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_policy. -# -def update_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new - - # Call the update_access_policy method. - result = client.update_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb deleted file mode 100644 index 48d03cc216bc..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_UpdateGcpUserAccessBinding_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the update_gcp_user_access_binding call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_gcp_user_access_binding. -# -def update_gcp_user_access_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new - - # Call the update_gcp_user_access_binding method. - result = client.update_gcp_user_access_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb deleted file mode 100644 index a751242211b5..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.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 accesscontextmanager_v1_generated_AccessContextManager_UpdateServicePerimeter_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the update_service_perimeter call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_service_perimeter. -# -def update_service_perimeter - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new - - # Call the update_service_perimeter method. - result = client.update_service_perimeter request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json deleted file mode 100644 index f5838dcb8ff7..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json +++ /dev/null @@ -1,1055 +0,0 @@ -{ - "client_library": { - "name": "google-identity-access_context_manager-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.identity.accesscontextmanager.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListAccessPolicies_sync", - "title": "Snippet for the list_access_policies call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_policies.", - "file": "access_context_manager/list_access_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_access_policies", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ListAccessPolicies", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListAccessPolicies", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetAccessPolicy_sync", - "title": "Snippet for the get_access_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_policy.", - "file": "access_context_manager/get_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_access_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::AccessPolicy", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "GetAccessPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetAccessPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateAccessPolicy_sync", - "title": "Snippet for the create_access_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_policy.", - "file": "access_context_manager/create_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_access_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::AccessPolicy", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "CreateAccessPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateAccessPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessPolicy_sync", - "title": "Snippet for the update_access_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_policy.", - "file": "access_context_manager/update_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_access_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "UpdateAccessPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateAccessPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessPolicy_sync", - "title": "Snippet for the delete_access_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_policy.", - "file": "access_context_manager/delete_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_access_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "DeleteAccessPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteAccessPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListAccessLevels_sync", - "title": "Snippet for the list_access_levels call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_levels.", - "file": "access_context_manager/list_access_levels.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_access_levels", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_levels", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ListAccessLevels", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListAccessLevels", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetAccessLevel_sync", - "title": "Snippet for the get_access_level call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_level.", - "file": "access_context_manager/get_access_level.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_access_level", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_level", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::AccessLevel", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "GetAccessLevel", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetAccessLevel", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateAccessLevel_sync", - "title": "Snippet for the create_access_level call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_level.", - "file": "access_context_manager/create_access_level.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_access_level", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_level", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "CreateAccessLevel", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateAccessLevel", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessLevel_sync", - "title": "Snippet for the update_access_level call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_level.", - "file": "access_context_manager/update_access_level.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_access_level", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_level", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "UpdateAccessLevel", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateAccessLevel", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessLevel_sync", - "title": "Snippet for the delete_access_level call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_level.", - "file": "access_context_manager/delete_access_level.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_access_level", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_level", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "DeleteAccessLevel", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteAccessLevel", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ReplaceAccessLevels_sync", - "title": "Snippet for the replace_access_levels call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_access_levels.", - "file": "access_context_manager/replace_access_levels.rb", - "language": "RUBY", - "client_method": { - "short_name": "replace_access_levels", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_access_levels", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ReplaceAccessLevels", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ReplaceAccessLevels", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListServicePerimeters_sync", - "title": "Snippet for the list_service_perimeters call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_service_perimeters.", - "file": "access_context_manager/list_service_perimeters.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_service_perimeters", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_service_perimeters", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ListServicePerimeters", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListServicePerimeters", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetServicePerimeter_sync", - "title": "Snippet for the get_service_perimeter call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_service_perimeter.", - "file": "access_context_manager/get_service_perimeter.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service_perimeter", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_service_perimeter", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::ServicePerimeter", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "GetServicePerimeter", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetServicePerimeter", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateServicePerimeter_sync", - "title": "Snippet for the create_service_perimeter call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_service_perimeter.", - "file": "access_context_manager/create_service_perimeter.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_service_perimeter", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_service_perimeter", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "CreateServicePerimeter", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateServicePerimeter", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateServicePerimeter_sync", - "title": "Snippet for the update_service_perimeter call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_service_perimeter.", - "file": "access_context_manager/update_service_perimeter.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_service_perimeter", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_service_perimeter", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "UpdateServicePerimeter", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateServicePerimeter", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteServicePerimeter_sync", - "title": "Snippet for the delete_service_perimeter call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_service_perimeter.", - "file": "access_context_manager/delete_service_perimeter.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_service_perimeter", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_service_perimeter", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "DeleteServicePerimeter", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteServicePerimeter", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ReplaceServicePerimeters_sync", - "title": "Snippet for the replace_service_perimeters call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_service_perimeters.", - "file": "access_context_manager/replace_service_perimeters.rb", - "language": "RUBY", - "client_method": { - "short_name": "replace_service_perimeters", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_service_perimeters", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ReplaceServicePerimeters", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ReplaceServicePerimeters", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CommitServicePerimeters_sync", - "title": "Snippet for the commit_service_perimeters call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#commit_service_perimeters.", - "file": "access_context_manager/commit_service_perimeters.rb", - "language": "RUBY", - "client_method": { - "short_name": "commit_service_perimeters", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#commit_service_perimeters", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "CommitServicePerimeters", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CommitServicePerimeters", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListGcpUserAccessBindings_sync", - "title": "Snippet for the list_gcp_user_access_bindings call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_gcp_user_access_bindings.", - "file": "access_context_manager/list_gcp_user_access_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_gcp_user_access_bindings", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_gcp_user_access_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ListGcpUserAccessBindings", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetGcpUserAccessBinding_sync", - "title": "Snippet for the get_gcp_user_access_binding call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_gcp_user_access_binding.", - "file": "access_context_manager/get_gcp_user_access_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_gcp_user_access_binding", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_gcp_user_access_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "GetGcpUserAccessBinding", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetGcpUserAccessBinding", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateGcpUserAccessBinding_sync", - "title": "Snippet for the create_gcp_user_access_binding call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_gcp_user_access_binding.", - "file": "access_context_manager/create_gcp_user_access_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_gcp_user_access_binding", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_gcp_user_access_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "CreateGcpUserAccessBinding", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateGcpUserAccessBinding", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateGcpUserAccessBinding_sync", - "title": "Snippet for the update_gcp_user_access_binding call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_gcp_user_access_binding.", - "file": "access_context_manager/update_gcp_user_access_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_gcp_user_access_binding", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_gcp_user_access_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "UpdateGcpUserAccessBinding", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateGcpUserAccessBinding", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteGcpUserAccessBinding_sync", - "title": "Snippet for the delete_gcp_user_access_binding call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_gcp_user_access_binding.", - "file": "access_context_manager/delete_gcp_user_access_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_gcp_user_access_binding", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_gcp_user_access_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "DeleteGcpUserAccessBinding", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteGcpUserAccessBinding", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#set_iam_policy.", - "file": "access_context_manager/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.SetIamPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_iam_policy.", - "file": "access_context_manager/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetIamPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#test_iam_permissions.", - "file": "access_context_manager/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.TestIamPermissions", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "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-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb deleted file mode 100644 index 1ea8e7851b02..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/identity/accesscontextmanager/v1/access_context_manager_pb" -require "google/identity/accesscontextmanager/v1/access_context_manager_services_pb" -require "google/identity/access_context_manager/v1/access_context_manager" - -class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb deleted file mode 100644 index d60902c54e76..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/identity/access_context_manager/v1/access_context_manager" - -class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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_access_level_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.access_level_path access_policy: "value0", access_level: "value1" - assert_equal "accessPolicies/value0/accessLevels/value1", path - end - end - - def test_access_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.access_policy_path access_policy: "value0" - assert_equal "accessPolicies/value0", path - end - end - - def test_gcp_user_access_binding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.gcp_user_access_binding_path organization: "value0", gcp_user_access_binding: "value1" - assert_equal "organizations/value0/gcpUserAccessBindings/value1", path - end - end - - def test_organization_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_path organization: "value0" - assert_equal "organizations/value0", path - end - end - - def test_service_perimeter_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_perimeter_path access_policy: "value0", service_perimeter: "value1" - assert_equal "accessPolicies/value0/servicePerimeters/value1", path - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb deleted file mode 100644 index ca3e1e9d95ca..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb +++ /dev/null @@ -1,1535 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/identity/accesscontextmanager/v1/access_context_manager_pb" -require "google/identity/access_context_manager/v1/access_context_manager/rest" - - -class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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_access_policies - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse.new - http_response = OpenStruct.new 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_access_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_access_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_access_policies_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_access_policies({ 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_access_policies 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_access_policies ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.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_access_policies({ 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_access_policies(::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.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_access_policies_client_stub.call_count - end - end - end - - def test_get_access_policy - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::AccessPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_access_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::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_access_policy_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_access_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_access_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_access_policy ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_access_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_access_policy(::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_access_policy_client_stub.call_count - end - end - end - - def test_create_access_policy - # Create test objects. - 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" - parent = "hello world" - title = "hello world" - scopes = ["hello world"] - create_time = {} - update_time = {} - etag = "hello world" - - create_access_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::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_access_policy_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_access_policy name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_access_policy ::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_access_policy(::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_access_policy_client_stub.call_count - end - end - end - - def test_update_access_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - policy = {} - update_mask = {} - - update_access_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::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_access_policy_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_access_policy({ policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_access_policy policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_access_policy ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_access_policy({ 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.update_access_policy(::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(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, update_access_policy_client_stub.call_count - end - end - end - - def test_delete_access_policy - # Create test objects. - 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_access_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::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_access_policy_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_access_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_access_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_access_policy ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_access_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_access_policy(::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_access_policy_client_stub.call_count - end - end - end - - def test_list_access_levels - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - access_level_format = :LEVEL_FORMAT_UNSPECIFIED - - list_access_levels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_access_levels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_access_levels_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_access_levels parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_access_levels ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_access_levels(::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_access_levels_client_stub.call_count - end - end - end - - def test_get_access_level - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::AccessLevel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - access_level_format = :LEVEL_FORMAT_UNSPECIFIED - - get_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_access_level_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_access_level_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_access_level({ name: name, access_level_format: access_level_format }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_access_level name: name, access_level_format: access_level_format do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_access_level ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_access_level({ name: name, access_level_format: access_level_format }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_access_level(::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_access_level_client_stub.call_count - end - end - end - - def test_create_access_level - # Create test objects. - 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" - access_level = {} - - create_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_access_level_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_access_level_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_access_level({ parent: parent, access_level: access_level }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_access_level parent: parent, access_level: access_level do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_access_level ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_access_level({ parent: parent, access_level: access_level }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_access_level(::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_access_level_client_stub.call_count - end - end - end - - def test_update_access_level - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - access_level = {} - update_mask = {} - - update_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_access_level_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_access_level_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_access_level({ access_level: access_level, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_access_level access_level: access_level, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_access_level ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_access_level({ access_level: access_level, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_access_level(::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_access_level_client_stub.call_count - end - end - end - - def test_delete_access_level - # Create test objects. - 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_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_access_level_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_access_level_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_access_level({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_access_level name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_access_level ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_access_level({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_access_level(::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_access_level_client_stub.call_count - end - end - end - - def test_replace_access_levels - # Create test objects. - 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" - access_levels = [{}] - etag = "hello world" - - replace_access_levels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_replace_access_levels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, replace_access_levels_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.replace_access_levels parent: parent, access_levels: access_levels, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.replace_access_levels ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.replace_access_levels(::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, replace_access_levels_client_stub.call_count - end - end - end - - def test_list_service_perimeters - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse.new - http_response = OpenStruct.new 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_service_perimeters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_service_perimeters_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_service_perimeters_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_service_perimeters({ 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_service_perimeters 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_service_perimeters ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.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_service_perimeters({ 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_service_perimeters(::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.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_service_perimeters_client_stub.call_count - end - end - end - - def test_get_service_perimeter - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::ServicePerimeter.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_service_perimeter_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_perimeter_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_service_perimeter({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_service_perimeter name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_service_perimeter ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_service_perimeter({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_service_perimeter(::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_perimeter_client_stub.call_count - end - end - end - - def test_create_service_perimeter - # Create test objects. - 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" - service_perimeter = {} - - create_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_service_perimeter_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_service_perimeter_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_service_perimeter parent: parent, service_perimeter: service_perimeter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_service_perimeter ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_service_perimeter(::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_service_perimeter_client_stub.call_count - end - end - end - - def test_update_service_perimeter - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service_perimeter = {} - update_mask = {} - - update_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_service_perimeter_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_service_perimeter_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_service_perimeter({ service_perimeter: service_perimeter, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_service_perimeter service_perimeter: service_perimeter, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_service_perimeter ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_service_perimeter({ service_perimeter: service_perimeter, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_service_perimeter(::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_service_perimeter_client_stub.call_count - end - end - end - - def test_delete_service_perimeter - # Create test objects. - 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_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_service_perimeter_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_service_perimeter_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_service_perimeter({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_service_perimeter name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_service_perimeter ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_service_perimeter({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_service_perimeter(::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_service_perimeter_client_stub.call_count - end - end - end - - def test_replace_service_perimeters - # Create test objects. - 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" - service_perimeters = [{}] - etag = "hello world" - - replace_service_perimeters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_replace_service_perimeters_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, replace_service_perimeters_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.replace_service_perimeters parent: parent, service_perimeters: service_perimeters, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.replace_service_perimeters ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.replace_service_perimeters(::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, replace_service_perimeters_client_stub.call_count - end - end - end - - def test_commit_service_perimeters - # Create test objects. - 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" - etag = "hello world" - - commit_service_perimeters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_commit_service_perimeters_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, commit_service_perimeters_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.commit_service_perimeters({ parent: parent, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.commit_service_perimeters parent: parent, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.commit_service_perimeters ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.commit_service_perimeters({ parent: parent, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.commit_service_perimeters(::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, commit_service_perimeters_client_stub.call_count - end - end - end - - def test_list_gcp_user_access_bindings - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse.new - http_response = OpenStruct.new 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_gcp_user_access_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_gcp_user_access_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_gcp_user_access_bindings_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_gcp_user_access_bindings({ 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_gcp_user_access_bindings 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_gcp_user_access_bindings ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.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_gcp_user_access_bindings({ 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_gcp_user_access_bindings(::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.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_gcp_user_access_bindings_client_stub.call_count - end - end - end - - def test_get_gcp_user_access_binding - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_gcp_user_access_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_gcp_user_access_binding_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_gcp_user_access_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_gcp_user_access_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_gcp_user_access_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_gcp_user_access_binding_client_stub.call_count - end - end - end - - def test_create_gcp_user_access_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - gcp_user_access_binding = {} - - create_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_gcp_user_access_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_gcp_user_access_binding_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_gcp_user_access_binding parent: parent, gcp_user_access_binding: gcp_user_access_binding do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_gcp_user_access_binding_client_stub.call_count - end - end - end - - def test_update_gcp_user_access_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - gcp_user_access_binding = {} - update_mask = {} - - update_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_gcp_user_access_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_gcp_user_access_binding_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_gcp_user_access_binding gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_gcp_user_access_binding_client_stub.call_count - end - end - end - - def test_delete_gcp_user_access_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_gcp_user_access_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_gcp_user_access_binding_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_gcp_user_access_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_gcp_user_access_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_gcp_user_access_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_gcp_user_access_binding_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::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb deleted file mode 100644 index d3b3b3c58ac8..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb +++ /dev/null @@ -1,1785 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/identity/accesscontextmanager/v1/access_context_manager_pb" -require "google/identity/access_context_manager/v1/access_context_manager" - -class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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_access_policies - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_access_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_access_policies, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, 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_access_policies_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_access_policies({ 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_access_policies 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_access_policies ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.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_access_policies({ 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_access_policies(::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.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_access_policies_client_stub.call_rpc_count - end - end - - def test_get_access_policy - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::AccessPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_access_policy, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_access_policy_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_access_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_access_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_access_policy ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_access_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_access_policy(::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_access_policy_client_stub.call_rpc_count - end - end - - def test_create_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - parent = "hello world" - title = "hello world" - scopes = ["hello world"] - create_time = {} - update_time = {} - etag = "hello world" - - create_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_access_policy, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessPolicy, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["title"] - assert_equal ["hello world"], request["scopes"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["create_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["update_time"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_access_policy_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_access_policy name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_access_policy ::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_access_policy(::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_access_policy_client_stub.call_rpc_count - end - end - - def test_update_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - policy = {} - update_mask = {} - - update_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_access_policy, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::AccessPolicy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_access_policy_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_access_policy({ policy: policy, 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_access_policy policy: policy, 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_access_policy ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, 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_access_policy({ policy: policy, 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_access_policy(::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, 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_access_policy_client_stub.call_rpc_count - end - end - - def test_delete_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_access_policy, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_access_policy_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_access_policy({ name: 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_access_policy name: 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_access_policy ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.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_access_policy({ name: name }, grpc_options) do |response, operation| - assert_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_access_policy(::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.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_access_policy_client_stub.call_rpc_count - end - end - - def test_list_access_levels - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - access_level_format = :LEVEL_FORMAT_UNSPECIFIED - - list_access_levels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_access_levels, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :LEVEL_FORMAT_UNSPECIFIED, request["access_level_format"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_access_levels_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_access_levels parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_access_levels ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_access_levels(::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_access_levels_client_stub.call_rpc_count - end - end - - def test_get_access_level - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::AccessLevel.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - access_level_format = :LEVEL_FORMAT_UNSPECIFIED - - get_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_access_level, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, request - assert_equal "hello world", request["name"] - assert_equal :LEVEL_FORMAT_UNSPECIFIED, request["access_level_format"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_access_level_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_access_level({ name: name, access_level_format: access_level_format }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_access_level name: name, access_level_format: access_level_format do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_access_level ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_access_level({ name: name, access_level_format: access_level_format }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_access_level(::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_access_level_client_stub.call_rpc_count - end - end - - def test_create_access_level - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - access_level = {} - - create_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_access_level, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::AccessLevel), request["access_level"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_access_level_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_access_level({ parent: parent, access_level: access_level }) do |response, 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_access_level parent: parent, access_level: access_level do |response, 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_access_level ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level) do |response, operation| - assert_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_access_level({ parent: parent, access_level: access_level }, grpc_options) do |response, operation| - assert_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_access_level(::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level), grpc_options) do |response, operation| - assert_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_access_level_client_stub.call_rpc_count - end - end - - def test_update_access_level - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - access_level = {} - update_mask = {} - - update_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_access_level, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::AccessLevel), request["access_level"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_access_level_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_access_level({ access_level: access_level, 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_access_level access_level: access_level, 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_access_level ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, 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_access_level({ access_level: access_level, 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_access_level(::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, 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_access_level_client_stub.call_rpc_count - end - end - - def test_delete_access_level - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_access_level, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_access_level_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_access_level({ name: 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_access_level name: 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_access_level ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.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_access_level({ name: name }, grpc_options) do |response, operation| - assert_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_access_level(::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.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_access_level_client_stub.call_rpc_count - end - end - - def test_replace_access_levels - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - access_levels = [{}] - etag = "hello world" - - replace_access_levels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :replace_access_levels, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessLevel, request["access_levels"].first - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, replace_access_levels_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.replace_access_levels parent: parent, access_levels: access_levels, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.replace_access_levels ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.replace_access_levels(::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, replace_access_levels_client_stub.call_rpc_count - end - end - - def test_list_service_perimeters - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_service_perimeters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_service_perimeters, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, 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_service_perimeters_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_service_perimeters({ 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_service_perimeters 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_service_perimeters ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.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_service_perimeters({ 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_service_perimeters(::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.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_service_perimeters_client_stub.call_rpc_count - end - end - - def test_get_service_perimeter - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::ServicePerimeter.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service_perimeter, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_perimeter_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_service_perimeter({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_service_perimeter name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_service_perimeter ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_service_perimeter({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_service_perimeter(::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_service_perimeter_client_stub.call_rpc_count - end - end - - def test_create_service_perimeter - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_perimeter = {} - - create_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_service_perimeter, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::ServicePerimeter), request["service_perimeter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_service_perimeter_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }) do |response, 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_service_perimeter parent: parent, service_perimeter: service_perimeter do |response, 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_service_perimeter ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter) do |response, operation| - assert_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_service_perimeter({ parent: parent, service_perimeter: service_perimeter }, grpc_options) do |response, operation| - assert_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_service_perimeter(::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter), grpc_options) do |response, operation| - assert_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_service_perimeter_client_stub.call_rpc_count - end - end - - def test_update_service_perimeter - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service_perimeter = {} - update_mask = {} - - update_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_service_perimeter, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::ServicePerimeter), request["service_perimeter"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_service_perimeter_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_service_perimeter({ service_perimeter: service_perimeter, 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_service_perimeter service_perimeter: service_perimeter, 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_service_perimeter ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, 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_service_perimeter({ service_perimeter: service_perimeter, 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_service_perimeter(::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, 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_service_perimeter_client_stub.call_rpc_count - end - end - - def test_delete_service_perimeter - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_service_perimeter, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_service_perimeter_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_service_perimeter({ name: 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_service_perimeter name: 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_service_perimeter ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.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_service_perimeter({ name: name }, grpc_options) do |response, operation| - assert_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_service_perimeter(::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.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_service_perimeter_client_stub.call_rpc_count - end - end - - def test_replace_service_perimeters - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_perimeters = [{}] - etag = "hello world" - - replace_service_perimeters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :replace_service_perimeters, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Identity::AccessContextManager::V1::ServicePerimeter, request["service_perimeters"].first - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, replace_service_perimeters_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.replace_service_perimeters parent: parent, service_perimeters: service_perimeters, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.replace_service_perimeters ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.replace_service_perimeters(::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, replace_service_perimeters_client_stub.call_rpc_count - end - end - - def test_commit_service_perimeters - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - etag = "hello world" - - commit_service_perimeters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :commit_service_perimeters, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, commit_service_perimeters_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.commit_service_perimeters({ parent: parent, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.commit_service_perimeters parent: parent, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.commit_service_perimeters ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.commit_service_perimeters({ parent: parent, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.commit_service_perimeters(::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, commit_service_perimeters_client_stub.call_rpc_count - end - end - - def test_list_gcp_user_access_bindings - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_gcp_user_access_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_gcp_user_access_bindings, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, 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_gcp_user_access_bindings_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_gcp_user_access_bindings({ 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_gcp_user_access_bindings 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_gcp_user_access_bindings ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.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_gcp_user_access_bindings({ 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_gcp_user_access_bindings(::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.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_gcp_user_access_bindings_client_stub.call_rpc_count - end - end - - def test_get_gcp_user_access_binding - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_gcp_user_access_binding, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_gcp_user_access_binding_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_gcp_user_access_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_gcp_user_access_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_gcp_user_access_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_gcp_user_access_binding_client_stub.call_rpc_count - end - end - - def test_create_gcp_user_access_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - gcp_user_access_binding = {} - - create_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_gcp_user_access_binding, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding), request["gcp_user_access_binding"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_gcp_user_access_binding_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }) do |response, 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_gcp_user_access_binding parent: parent, gcp_user_access_binding: gcp_user_access_binding do |response, 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_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding) do |response, operation| - assert_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_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }, grpc_options) do |response, operation| - assert_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_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding), grpc_options) do |response, operation| - assert_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_gcp_user_access_binding_client_stub.call_rpc_count - end - end - - def test_update_gcp_user_access_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - gcp_user_access_binding = {} - update_mask = {} - - update_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_gcp_user_access_binding, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding), request["gcp_user_access_binding"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_gcp_user_access_binding_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, 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_gcp_user_access_binding gcp_user_access_binding: gcp_user_access_binding, 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_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, 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_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, 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_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, 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_gcp_user_access_binding_client_stub.call_rpc_count - end - end - - def test_delete_gcp_user_access_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_gcp_user_access_binding, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_gcp_user_access_binding_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_gcp_user_access_binding({ name: 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_gcp_user_access_binding name: 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_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.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_gcp_user_access_binding({ name: name }, grpc_options) do |response, operation| - assert_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_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.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_gcp_user_access_binding_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::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-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-maps-fleet_engine-delivery-v1/.gitignore b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/.repo-metadata.json b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json deleted file mode 100644 index 9720ed4289b0..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "fleetengine.googleapis.com", - "api_shortname": "fleetengine-delivery", - "client_documentation": "https://rubydoc.info/gems/google-maps-fleet_engine-delivery-v1", - "distribution_name": "google-maps-fleet_engine-delivery-v1", - "is_cloud": false, - "language": "ruby", - "name": "fleetengine-delivery", - "name_pretty": "Last Mile Fleet Solution Delivery V1 API", - "product_documentation": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-delivery-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine-delivery instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml deleted file mode 100644 index 5134ed6467fb..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1.rb" diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.toys.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/.yardopts b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.yardopts deleted file mode 100644 index 443d62823a66..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Last Mile Fleet Solution Delivery 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-maps-fleet_engine-delivery-v1/AUTHENTICATION.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/AUTHENTICATION.md deleted file mode 100644 index 5667ca97e0e4..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1" - -client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/maps/fleet_engine/delivery/v1" - -::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery-v1/CHANGELOG.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/LICENSE.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/README.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/README.md deleted file mode 100644 index 82a47c4e3770..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Last Mile Fleet Solution Delivery V1 API - -Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. - -Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Last Mile Fleet Solution Delivery V1 API. Most users should consider using -the main client gem, -[google-maps-fleet_engine-delivery](https://rubygems.org/gems/google-maps-fleet_engine-delivery). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-maps-fleet_engine-delivery-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/fleetengine.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/maps/fleet_engine/delivery/v1" - -client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new -request = ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new # (request fields as keyword arguments...) -response = client.create_delivery_vehicle request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-maps-fleet_engine-delivery-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/maps/documentation/transportation-logistics/mobility) -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/maps/fleet_engine/delivery/v1" -require "logger" - -client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery`, -and lower-level _versioned_ client libraries with names such as -`google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery`. -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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/Rakefile b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Rakefile deleted file mode 100644 index cd9e87b75d54..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1/delivery_service/credentials" - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-maps-fleet_engine-delivery-v1" - header "google-maps-fleet_engine-delivery-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-maps-fleet_engine-delivery-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/gapic_metadata.json b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/gapic_metadata.json deleted file mode 100644 index 4c69a9a6c497..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/gapic_metadata.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "maps.fleetengine.delivery.v1", - "libraryPackage": "::Google::Maps::FleetEngine::Delivery::V1", - "services": { - "DeliveryService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client", - "rpcs": { - "CreateDeliveryVehicle": { - "methods": [ - "create_delivery_vehicle" - ] - }, - "GetDeliveryVehicle": { - "methods": [ - "get_delivery_vehicle" - ] - }, - "DeleteDeliveryVehicle": { - "methods": [ - "delete_delivery_vehicle" - ] - }, - "UpdateDeliveryVehicle": { - "methods": [ - "update_delivery_vehicle" - ] - }, - "BatchCreateTasks": { - "methods": [ - "batch_create_tasks" - ] - }, - "CreateTask": { - "methods": [ - "create_task" - ] - }, - "GetTask": { - "methods": [ - "get_task" - ] - }, - "DeleteTask": { - "methods": [ - "delete_task" - ] - }, - "UpdateTask": { - "methods": [ - "update_task" - ] - }, - "ListTasks": { - "methods": [ - "list_tasks" - ] - }, - "GetTaskTrackingInfo": { - "methods": [ - "get_task_tracking_info" - ] - }, - "ListDeliveryVehicles": { - "methods": [ - "list_delivery_vehicles" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec deleted file mode 100644 index 14a432b6a9ba..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/maps/fleet_engine/delivery/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-maps-fleet_engine-delivery-v1" - gem.version = Google::Maps::FleetEngine::Delivery::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-delivery-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine-delivery instead. See the readme for more details." - gem.summary = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms." - 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-geo-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb deleted file mode 100644 index cd1ad7559d55..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1" diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb deleted file mode 100644 index bf548f559e81..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/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/maps/fleet_engine/delivery/v1/delivery_service" -require "google/maps/fleet_engine/delivery/v1/version" - -module Google - module Maps - module FleetEngine - module Delivery - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/maps/fleet_engine/delivery/v1" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/maps/fleet_engine/delivery/v1" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/maps/fleet_engine/delivery/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb deleted file mode 100644 index 3f52ddd3345e..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/maps/fleet_engine/delivery/v1/version" - -require "google/maps/fleet_engine/delivery/v1/delivery_service/credentials" -require "google/maps/fleet_engine/delivery/v1/delivery_service/paths" -require "google/maps/fleet_engine/delivery/v1/delivery_service/client" -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - ## - # The Last Mile Delivery service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/maps/fleet_engine/delivery/v1/delivery_service" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - module DeliveryService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "delivery_service", "helpers.rb" -require "google/maps/fleet_engine/delivery/v1/delivery_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb deleted file mode 100644 index bacd2d0c6b05..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb +++ /dev/null @@ -1,1755 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/maps/fleetengine/delivery/v1/delivery_api_pb" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - module DeliveryService - ## - # Client for the DeliveryService service. - # - # The Last Mile Delivery service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :delivery_service_stub - - ## - # Configure the DeliveryService Client class. - # - # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DeliveryService clients - # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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", "Maps", "FleetEngine", "Delivery", "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_delivery_vehicle.timeout = 60.0 - default_config.rpcs.create_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_delivery_vehicle.timeout = 60.0 - default_config.rpcs.get_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_delivery_vehicle.timeout = 60.0 - default_config.rpcs.update_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.batch_create_tasks.timeout = 60.0 - default_config.rpcs.batch_create_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_task.timeout = 60.0 - default_config.rpcs.create_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task.timeout = 60.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_task.timeout = 60.0 - default_config.rpcs.update_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_tasks.timeout = 60.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task_tracking_info.timeout = 60.0 - default_config.rpcs.get_task_tracking_info.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_delivery_vehicles.timeout = 60.0 - default_config.rpcs.list_delivery_vehicles.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DeliveryService 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::Maps::FleetEngine::Delivery::V1::DeliveryService::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 - @delivery_service_stub.universe_domain - end - - ## - # Create a new DeliveryService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DeliveryService 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/maps/fleetengine/delivery/v1/delivery_api_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 - - @delivery_service_stub = ::Gapic::ServiceStub.new( - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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 - ) - - @delivery_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 - @delivery_service_stub.logger - end - - # Service calls - - ## - # Creates and returns a new `DeliveryVehicle`. - # - # @overload create_delivery_vehicle(request, options = nil) - # Pass arguments to `create_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_delivery_vehicle(header: nil, parent: nil, delivery_vehicle_id: nil, delivery_vehicle: nil) - # Pass arguments to `create_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. The provider must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @param delivery_vehicle_id [::String] - # Required. The Delivery Vehicle ID must be unique and subject to the - # following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] - # Required. The `DeliveryVehicle` entity to create. When creating a new - # delivery vehicle, you may set the following optional fields: - # - # * type - # * last_location - # * attributes - # - # Note: The DeliveryVehicle's `name` field is ignored. All other - # DeliveryVehicle fields must not be set; otherwise, an error is returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new - # - # # Call the create_delivery_vehicle method. - # result = client.create_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def create_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest - - # Converts hash and nil to 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_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_delivery_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :create_delivery_vehicle, request, 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 specified `DeliveryVehicle` instance. - # - # @overload get_delivery_vehicle(request, options = nil) - # Pass arguments to `get_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_delivery_vehicle(header: nil, name: nil) - # Pass arguments to `get_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new - # - # # Call the get_delivery_vehicle method. - # result = client.get_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def get_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_delivery_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :get_delivery_vehicle, request, 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 DeliveryVehicle from the Fleet Engine. - # - # Returns FAILED_PRECONDITION if the DeliveryVehicle has OPEN Tasks - # assigned to it. - # - # @overload delete_delivery_vehicle(request, options = nil) - # Pass arguments to `delete_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_delivery_vehicle(header: nil, name: nil) - # Pass arguments to `delete_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # - # @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/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new - # - # # Call the delete_delivery_vehicle method. - # result = client.delete_delivery_vehicle request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_delivery_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :delete_delivery_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns - # `Tasks` to the `DeliveryVehicle`. You cannot update the name of the - # `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`, - # but it must contain all of the `VehicleJourneySegment`s to be persisted on - # the `DeliveryVehicle`. The `task_id`s are retrieved from - # `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are - # assigned to the `DeliveryVehicle` if they have not yet been assigned. - # - # @overload update_delivery_vehicle(request, options = nil) - # Pass arguments to `update_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_delivery_vehicle(header: nil, delivery_vehicle: nil, update_mask: nil) - # Pass arguments to `update_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] - # Required. The `DeliveryVehicle` entity update to apply. - # Note: You cannot update the name of the `DeliveryVehicle`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A field mask that indicates which `DeliveryVehicle` fields to - # update. Note that the update_mask must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"remaining_vehicle_journey_segments"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new - # - # # Call the update_delivery_vehicle method. - # result = client.update_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def update_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest - - # Converts hash and nil to 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_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.delivery_vehicle&.name && - %r{^providers/[^/]+/?$}.match?(request.delivery_vehicle.name) - header_params["provider_id"] = request.delivery_vehicle.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_delivery_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :update_delivery_vehicle, request, 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 batch of new `Task` objects. - # - # @overload batch_create_tasks(request, options = nil) - # Pass arguments to `batch_create_tasks` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tasks(header: nil, parent: nil, requests: nil) - # Pass arguments to `batch_create_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 header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # Note: If you set this field, then the header field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @param parent [::String] - # Required. The parent resource shared by all tasks. This value must be in - # the format `providers/{provider}`. The `provider` must be the Google Cloud - # Project ID. For example, `sample-cloud-project`. The parent field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @param requests [::Array<::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash>] - # Required. The request message that specifies the resources to create. - # Note: You can create a maximum of 500 tasks in a batch. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new - # - # # Call the batch_create_tasks method. - # result = client.batch_create_tasks request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse. - # p result - # - def batch_create_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest - - # Converts hash and nil to 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_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::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_create_tasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_create_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :batch_create_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 - - ## - # Creates and returns a new `Task` object. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_task(header: nil, parent: nil, task_id: nil, task: 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 header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. The `provider` must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @param task_id [::String] - # Required. The Task ID must be unique, but it should be not a shipment - # tracking ID. To store a shipment tracking ID, use the `tracking_id` field. - # Note that multiple tasks can have the same `tracking_id`. Task IDs are - # subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] - # Required. The Task entity to create. - # When creating a Task, the following fields are required: - # - # * `type` - # * `state` (must be set to `OPEN`) - # * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` - # tasks, but required for all other task types) - # * `planned_location` (optional for `UNAVAILABLE` tasks) - # * `task_duration` - # - # The following fields can be optionally set: - # - # * `target_time_window` - # * `task_tracking_view_config` - # * `attributes` - # - # Note: The Task's `name` field is ignored. All other Task fields must not be - # set; otherwise, an error is returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::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::Maps::FleetEngine::Delivery::V1::CreateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - 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 - - @delivery_service_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 - - ## - # Gets information about a `Task`. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_task(header: nil, name: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - 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 - - @delivery_service_stub.call_rpc :get_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Task. - # - # Returns FAILED_PRECONDITION if the Task is OPEN and assigned to a - # DeliveryVehicle. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_task(header: nil, 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 header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # - # @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/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::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::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - 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 - - @delivery_service_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 - - ## - # Updates `Task` data. - # - # @overload update_task(request, options = nil) - # Pass arguments to `update_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_task(header: nil, task: nil, update_mask: nil) - # Pass arguments to `update_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] - # Required. The Task associated with the update. - # The following fields are maintained by Fleet Engine. Do not update - # them using `Task.update`. - # - # * `last_location`. - # * `last_location_snappable`. - # * `name`. - # * `remaining_vehicle_journey_segments`. - # * `task_outcome_location_source`. - # - # Note: You cannot change the value of `task_outcome` once you set it. - # - # If the Task has been assigned to a delivery vehicle, then don't set the - # Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` - # that contains the Task from the delivery vehicle, which automatically sets - # the Task state to CLOSED. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The field mask that indicates which Task fields to update. - # Note: The `update_mask` must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"task_outcome,task_outcome_time,task_outcome_location"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new - # - # # Call the update_task method. - # result = client.update_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - # p result - # - def update_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.task&.name && - %r{^providers/[^/]+/?$}.match?(request.task.name) - header_params["provider_id"] = request.task.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :update_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 - - ## - # Gets all `Task`s that meet the specified filtering criteria. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tasks(header: nil, parent: nil, page_size: nil, page_token: nil, filter: 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 header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @param page_size [::Integer] - # Optional. The maximum number of Tasks to return. The service may return - # fewer than this value. If you don't specify this value, then the server - # determines the number of results to return. - # @param page_token [::String] - # Optional. A page token received from a previous `ListTasks` call. - # You can provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListTasks` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter query to apply when listing Tasks. See - # http://aip.dev/160 for examples of filter syntax. If you don't specify a - # value, or if you filter on an empty string, then all Tasks are returned. - # For information about the Task properties that you can filter on, see [List - # tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - 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 - - @delivery_service_stub.call_rpc :list_tasks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @delivery_service_stub, :list_tasks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified `TaskTrackingInfo` instance. - # - # @overload get_task_tracking_info(request, options = nil) - # Pass arguments to `get_task_tracking_info` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_tracking_info(header: nil, name: nil) - # Pass arguments to `get_task_tracking_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` - # must be the Google Cloud Project ID, and the `tracking_id` must be the - # tracking ID associated with the task. An example name can be - # `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new - # - # # Call the get_task_tracking_info method. - # result = client.get_task_tracking_info request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo. - # p result - # - def get_task_tracking_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest - - # Converts hash and nil to an 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_tracking_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_task_tracking_info.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_task_tracking_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :get_task_tracking_info, request, 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 all `DeliveryVehicle`s that meet the specified filtering criteria. - # - # @overload list_delivery_vehicles(request, options = nil) - # Pass arguments to `list_delivery_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_delivery_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil, viewport: nil) - # Pass arguments to `list_delivery_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. - # For example, `sample-cloud-project`. - # @param page_size [::Integer] - # Optional. The maximum number of vehicles to return. The service may return - # fewer than this number. If you don't specify this number, then the server - # determines the number of results to return. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDeliveryVehicles` - # call. You must provide this in order to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDeliveryVehicles` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. A filter query to apply when listing delivery vehicles. See - # http://aip.dev/160 for examples of the filter syntax. If you don't specify - # a value, or if you specify an empty string for the filter, then all - # delivery vehicles are returned. - # - # Note that the only queries supported for `ListDeliveryVehicles` are - # on vehicle attributes (for example, `attributes. = ` or - # `attributes. = AND attributes. = `). Also, all - # attributes are stored as strings, so the only supported comparisons against - # attributes are string comparisons. In order to compare against number or - # boolean values, the values must be explicitly quoted to be treated as - # strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # - # The maximum number of restrictions allowed in a filter query is 50. A - # restriction is a part of the query of the form - # `attribute. `, for example `attributes.foo = bar` - # is 1 restriction. - # @param viewport [::Google::Geo::Type::Viewport, ::Hash] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new - # - # # Call the list_delivery_vehicles method. - # result = client.list_delivery_vehicles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p item - # end - # - def list_delivery_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_delivery_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_delivery_vehicles.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_delivery_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :list_delivery_vehicles, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @delivery_service_stub, :list_delivery_vehicles, 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 DeliveryService API. - # - # This class represents the configuration for DeliveryService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_delivery_vehicle to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_delivery_vehicle.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_delivery_vehicle.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Maps::FleetEngine::Delivery::V1::DeliveryService::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 = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::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 DeliveryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :create_delivery_vehicle - ## - # RPC-specific configuration for `get_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :get_delivery_vehicle - ## - # RPC-specific configuration for `delete_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_delivery_vehicle - ## - # RPC-specific configuration for `update_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :update_delivery_vehicle - ## - # RPC-specific configuration for `batch_create_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_tasks - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `update_task` - # @return [::Gapic::Config::Method] - # - attr_reader :update_task - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task_tracking_info` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task_tracking_info - ## - # RPC-specific configuration for `list_delivery_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_delivery_vehicles - - # @private - def initialize parent_rpcs = nil - create_delivery_vehicle_config = parent_rpcs.create_delivery_vehicle if parent_rpcs.respond_to? :create_delivery_vehicle - @create_delivery_vehicle = ::Gapic::Config::Method.new create_delivery_vehicle_config - get_delivery_vehicle_config = parent_rpcs.get_delivery_vehicle if parent_rpcs.respond_to? :get_delivery_vehicle - @get_delivery_vehicle = ::Gapic::Config::Method.new get_delivery_vehicle_config - delete_delivery_vehicle_config = parent_rpcs.delete_delivery_vehicle if parent_rpcs.respond_to? :delete_delivery_vehicle - @delete_delivery_vehicle = ::Gapic::Config::Method.new delete_delivery_vehicle_config - update_delivery_vehicle_config = parent_rpcs.update_delivery_vehicle if parent_rpcs.respond_to? :update_delivery_vehicle - @update_delivery_vehicle = ::Gapic::Config::Method.new update_delivery_vehicle_config - batch_create_tasks_config = parent_rpcs.batch_create_tasks if parent_rpcs.respond_to? :batch_create_tasks - @batch_create_tasks = ::Gapic::Config::Method.new batch_create_tasks_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_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 - update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task - @update_task = ::Gapic::Config::Method.new update_task_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_tracking_info_config = parent_rpcs.get_task_tracking_info if parent_rpcs.respond_to? :get_task_tracking_info - @get_task_tracking_info = ::Gapic::Config::Method.new get_task_tracking_info_config - list_delivery_vehicles_config = parent_rpcs.list_delivery_vehicles if parent_rpcs.respond_to? :list_delivery_vehicles - @list_delivery_vehicles = ::Gapic::Config::Method.new list_delivery_vehicles_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb deleted file mode 100644 index 8665c263a506..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_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 Maps - module FleetEngine - module Delivery - module V1 - module DeliveryService - # Credentials for the DeliveryService 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-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb deleted file mode 100644 index dddaace08010..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb +++ /dev/null @@ -1,100 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - module DeliveryService - # Path helper methods for the DeliveryService API. - module Paths - ## - # Create a fully-qualified DeliveryVehicle resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}/deliveryVehicles/{vehicle}` - # - # @param provider [String] - # @param vehicle [String] - # - # @return [::String] - def delivery_vehicle_path provider:, vehicle: - raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" - - "providers/#{provider}/deliveryVehicles/#{vehicle}" - end - - ## - # Create a fully-qualified Provider resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}` - # - # @param provider [String] - # - # @return [::String] - def provider_path provider: - "providers/#{provider}" - end - - ## - # Create a fully-qualified Task resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}/tasks/{task}` - # - # @param provider [String] - # @param task [String] - # - # @return [::String] - def task_path provider:, task: - raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" - - "providers/#{provider}/tasks/#{task}" - end - - ## - # Create a fully-qualified TaskTrackingInfo resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}/taskTrackingInfo/{tracking}` - # - # @param provider [String] - # @param tracking [String] - # - # @return [::String] - def task_tracking_info_path provider:, tracking: - raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" - - "providers/#{provider}/taskTrackingInfo/#{tracking}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb deleted file mode 100644 index c3e0d58b6ef6..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_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/maps/fleet_engine/delivery/v1/version" - -require "google/maps/fleet_engine/delivery/v1/delivery_service/credentials" -require "google/maps/fleet_engine/delivery/v1/delivery_service/paths" -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest/client" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - ## - # The Last Mile Delivery service. - # - # To load this service and instantiate a REST client: - # - # require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - module DeliveryService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb deleted file mode 100644 index 97556e6a0c7a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb +++ /dev/null @@ -1,1616 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/maps/fleetengine/delivery/v1/delivery_api_pb" -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - module DeliveryService - module Rest - ## - # REST client for the DeliveryService service. - # - # The Last Mile Delivery service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :delivery_service_stub - - ## - # Configure the DeliveryService Client class. - # - # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DeliveryService clients - # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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", "Maps", "FleetEngine", "Delivery", "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_delivery_vehicle.timeout = 60.0 - default_config.rpcs.create_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_delivery_vehicle.timeout = 60.0 - default_config.rpcs.get_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_delivery_vehicle.timeout = 60.0 - default_config.rpcs.update_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.batch_create_tasks.timeout = 60.0 - default_config.rpcs.batch_create_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_task.timeout = 60.0 - default_config.rpcs.create_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task.timeout = 60.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_task.timeout = 60.0 - default_config.rpcs.update_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_tasks.timeout = 60.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task_tracking_info.timeout = 60.0 - default_config.rpcs.get_task_tracking_info.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_delivery_vehicles.timeout = 60.0 - default_config.rpcs.list_delivery_vehicles.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DeliveryService 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::Maps::FleetEngine::Delivery::V1::DeliveryService::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 - @delivery_service_stub.universe_domain - end - - ## - # Create a new DeliveryService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DeliveryService 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 - - @delivery_service_stub = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @delivery_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 - @delivery_service_stub.logger - end - - # Service calls - - ## - # Creates and returns a new `DeliveryVehicle`. - # - # @overload create_delivery_vehicle(request, options = nil) - # Pass arguments to `create_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_delivery_vehicle(header: nil, parent: nil, delivery_vehicle_id: nil, delivery_vehicle: nil) - # Pass arguments to `create_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. The provider must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @param delivery_vehicle_id [::String] - # Required. The Delivery Vehicle ID must be unique and subject to the - # following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] - # Required. The `DeliveryVehicle` entity to create. When creating a new - # delivery vehicle, you may set the following optional fields: - # - # * type - # * last_location - # * attributes - # - # Note: The DeliveryVehicle's `name` field is ignored. All other - # DeliveryVehicle fields must not be set; otherwise, an error is returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new - # - # # Call the create_delivery_vehicle method. - # result = client.create_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def create_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest - - # Converts hash and nil to an 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_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_delivery_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.create_delivery_vehicle request, 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 specified `DeliveryVehicle` instance. - # - # @overload get_delivery_vehicle(request, options = nil) - # Pass arguments to `get_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_delivery_vehicle(header: nil, name: nil) - # Pass arguments to `get_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new - # - # # Call the get_delivery_vehicle method. - # result = client.get_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def get_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_delivery_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.get_delivery_vehicle request, 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 DeliveryVehicle from the Fleet Engine. - # - # Returns FAILED_PRECONDITION if the DeliveryVehicle has OPEN Tasks - # assigned to it. - # - # @overload delete_delivery_vehicle(request, options = nil) - # Pass arguments to `delete_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_delivery_vehicle(header: nil, name: nil) - # Pass arguments to `delete_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @yield [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/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new - # - # # Call the delete_delivery_vehicle method. - # result = client.delete_delivery_vehicle request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_delivery_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.delete_delivery_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns - # `Tasks` to the `DeliveryVehicle`. You cannot update the name of the - # `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`, - # but it must contain all of the `VehicleJourneySegment`s to be persisted on - # the `DeliveryVehicle`. The `task_id`s are retrieved from - # `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are - # assigned to the `DeliveryVehicle` if they have not yet been assigned. - # - # @overload update_delivery_vehicle(request, options = nil) - # Pass arguments to `update_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_delivery_vehicle(header: nil, delivery_vehicle: nil, update_mask: nil) - # Pass arguments to `update_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] - # Required. The `DeliveryVehicle` entity update to apply. - # Note: You cannot update the name of the `DeliveryVehicle`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A field mask that indicates which `DeliveryVehicle` fields to - # update. Note that the update_mask must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"remaining_vehicle_journey_segments"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new - # - # # Call the update_delivery_vehicle method. - # result = client.update_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def update_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest - - # Converts hash and nil to an 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_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_delivery_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.update_delivery_vehicle request, 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 batch of new `Task` objects. - # - # @overload batch_create_tasks(request, options = nil) - # Pass arguments to `batch_create_tasks` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tasks(header: nil, parent: nil, requests: nil) - # Pass arguments to `batch_create_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 header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # Note: If you set this field, then the header field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @param parent [::String] - # Required. The parent resource shared by all tasks. This value must be in - # the format `providers/{provider}`. The `provider` must be the Google Cloud - # Project ID. For example, `sample-cloud-project`. The parent field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @param requests [::Array<::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash>] - # Required. The request message that specifies the resources to create. - # Note: You can create a maximum of 500 tasks in a batch. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new - # - # # Call the batch_create_tasks method. - # result = client.batch_create_tasks request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse. - # p result - # - def batch_create_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest - - # Converts hash and nil to an 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_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::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_tasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_create_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.batch_create_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 - - ## - # Creates and returns a new `Task` object. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_task(header: nil, parent: nil, task_id: nil, task: 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 header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. The `provider` must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @param task_id [::String] - # Required. The Task ID must be unique, but it should be not a shipment - # tracking ID. To store a shipment tracking ID, use the `tracking_id` field. - # Note that multiple tasks can have the same `tracking_id`. Task IDs are - # subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] - # Required. The Task entity to create. - # When creating a Task, the following fields are required: - # - # * `type` - # * `state` (must be set to `OPEN`) - # * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` - # tasks, but required for all other task types) - # * `planned_location` (optional for `UNAVAILABLE` tasks) - # * `task_duration` - # - # The following fields can be optionally set: - # - # * `target_time_window` - # * `task_tracking_view_config` - # * `attributes` - # - # Note: The Task's `name` field is ignored. All other Task fields must not be - # set; otherwise, an error is returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::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::Maps::FleetEngine::Delivery::V1::CreateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @delivery_service_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 - - ## - # Gets information about a `Task`. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_task(header: nil, name: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @delivery_service_stub.get_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Task. - # - # Returns FAILED_PRECONDITION if the Task is OPEN and assigned to a - # DeliveryVehicle. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_task(header: nil, 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 header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @yield [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/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::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::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @delivery_service_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 - - ## - # Updates `Task` data. - # - # @overload update_task(request, options = nil) - # Pass arguments to `update_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_task(header: nil, task: nil, update_mask: nil) - # Pass arguments to `update_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] - # Required. The Task associated with the update. - # The following fields are maintained by Fleet Engine. Do not update - # them using `Task.update`. - # - # * `last_location`. - # * `last_location_snappable`. - # * `name`. - # * `remaining_vehicle_journey_segments`. - # * `task_outcome_location_source`. - # - # Note: You cannot change the value of `task_outcome` once you set it. - # - # If the Task has been assigned to a delivery vehicle, then don't set the - # Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` - # that contains the Task from the delivery vehicle, which automatically sets - # the Task state to CLOSED. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The field mask that indicates which Task fields to update. - # Note: The `update_mask` must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"task_outcome,task_outcome_time,task_outcome_location"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new - # - # # Call the update_task method. - # result = client.update_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - # p result - # - def update_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.update_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 - - ## - # Gets all `Task`s that meet the specified filtering criteria. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_tasks(header: nil, parent: nil, page_size: nil, page_token: nil, filter: 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 header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @param page_size [::Integer] - # Optional. The maximum number of Tasks to return. The service may return - # fewer than this value. If you don't specify this value, then the server - # determines the number of results to return. - # @param page_token [::String] - # Optional. A page token received from a previous `ListTasks` call. - # You can provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListTasks` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter query to apply when listing Tasks. See - # http://aip.dev/160 for examples of filter syntax. If you don't specify a - # value, or if you filter on an empty string, then all Tasks are returned. - # For information about the Task properties that you can filter on, see [List - # tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @delivery_service_stub.list_tasks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @delivery_service_stub, :list_tasks, "tasks", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified `TaskTrackingInfo` instance. - # - # @overload get_task_tracking_info(request, options = nil) - # Pass arguments to `get_task_tracking_info` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_tracking_info(header: nil, name: nil) - # Pass arguments to `get_task_tracking_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` - # must be the Google Cloud Project ID, and the `tracking_id` must be the - # tracking ID associated with the task. An example name can be - # `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new - # - # # Call the get_task_tracking_info method. - # result = client.get_task_tracking_info request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo. - # p result - # - def get_task_tracking_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest - - # Converts hash and nil to an options 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_tracking_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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_tracking_info.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_task_tracking_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.get_task_tracking_info request, 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 all `DeliveryVehicle`s that meet the specified filtering criteria. - # - # @overload list_delivery_vehicles(request, options = nil) - # Pass arguments to `list_delivery_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_delivery_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil, viewport: nil) - # Pass arguments to `list_delivery_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. - # For example, `sample-cloud-project`. - # @param page_size [::Integer] - # Optional. The maximum number of vehicles to return. The service may return - # fewer than this number. If you don't specify this number, then the server - # determines the number of results to return. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDeliveryVehicles` - # call. You must provide this in order to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDeliveryVehicles` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. A filter query to apply when listing delivery vehicles. See - # http://aip.dev/160 for examples of the filter syntax. If you don't specify - # a value, or if you specify an empty string for the filter, then all - # delivery vehicles are returned. - # - # Note that the only queries supported for `ListDeliveryVehicles` are - # on vehicle attributes (for example, `attributes. = ` or - # `attributes. = AND attributes. = `). Also, all - # attributes are stored as strings, so the only supported comparisons against - # attributes are string comparisons. In order to compare against number or - # boolean values, the values must be explicitly quoted to be treated as - # strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # - # The maximum number of restrictions allowed in a filter query is 50. A - # restriction is a part of the query of the form - # `attribute. `, for example `attributes.foo = bar` - # is 1 restriction. - # @param viewport [::Google::Geo::Type::Viewport, ::Hash] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new - # - # # Call the list_delivery_vehicles method. - # result = client.list_delivery_vehicles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p item - # end - # - def list_delivery_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_delivery_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_delivery_vehicles.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_delivery_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.list_delivery_vehicles request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @delivery_service_stub, :list_delivery_vehicles, "delivery_vehicles", request, result, 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 DeliveryService REST API. - # - # This class represents the configuration for DeliveryService 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::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_delivery_vehicle.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_delivery_vehicle.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::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 DeliveryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :create_delivery_vehicle - ## - # RPC-specific configuration for `get_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :get_delivery_vehicle - ## - # RPC-specific configuration for `delete_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_delivery_vehicle - ## - # RPC-specific configuration for `update_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :update_delivery_vehicle - ## - # RPC-specific configuration for `batch_create_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_tasks - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `update_task` - # @return [::Gapic::Config::Method] - # - attr_reader :update_task - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task_tracking_info` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task_tracking_info - ## - # RPC-specific configuration for `list_delivery_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_delivery_vehicles - - # @private - def initialize parent_rpcs = nil - create_delivery_vehicle_config = parent_rpcs.create_delivery_vehicle if parent_rpcs.respond_to? :create_delivery_vehicle - @create_delivery_vehicle = ::Gapic::Config::Method.new create_delivery_vehicle_config - get_delivery_vehicle_config = parent_rpcs.get_delivery_vehicle if parent_rpcs.respond_to? :get_delivery_vehicle - @get_delivery_vehicle = ::Gapic::Config::Method.new get_delivery_vehicle_config - delete_delivery_vehicle_config = parent_rpcs.delete_delivery_vehicle if parent_rpcs.respond_to? :delete_delivery_vehicle - @delete_delivery_vehicle = ::Gapic::Config::Method.new delete_delivery_vehicle_config - update_delivery_vehicle_config = parent_rpcs.update_delivery_vehicle if parent_rpcs.respond_to? :update_delivery_vehicle - @update_delivery_vehicle = ::Gapic::Config::Method.new update_delivery_vehicle_config - batch_create_tasks_config = parent_rpcs.batch_create_tasks if parent_rpcs.respond_to? :batch_create_tasks - @batch_create_tasks = ::Gapic::Config::Method.new batch_create_tasks_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_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 - update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task - @update_task = ::Gapic::Config::Method.new update_task_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_tracking_info_config = parent_rpcs.get_task_tracking_info if parent_rpcs.respond_to? :get_task_tracking_info - @get_task_tracking_info = ::Gapic::Config::Method.new get_task_tracking_info_config - list_delivery_vehicles_config = parent_rpcs.list_delivery_vehicles if parent_rpcs.respond_to? :list_delivery_vehicles - @list_delivery_vehicles = ::Gapic::Config::Method.new list_delivery_vehicles_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb deleted file mode 100644 index b1a86959625c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb +++ /dev/null @@ -1,820 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/maps/fleetengine/delivery/v1/delivery_api_pb" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - module DeliveryService - module Rest - ## - # REST service stub for the DeliveryService 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_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # A result object deserialized from the server's reply - def create_delivery_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_delivery_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_delivery_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # A result object deserialized from the server's reply - def get_delivery_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_delivery_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_delivery_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.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_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_delivery_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_delivery_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_delivery_vehicle", - 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 update_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # A result object deserialized from the server's reply - def update_delivery_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_delivery_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_delivery_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.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_tasks REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # A result object deserialized from the server's reply - def batch_create_tasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_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: "batch_create_tasks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.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::Maps::FleetEngine::Delivery::V1::CreateTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::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::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # A result object deserialized from the server's reply - def get_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::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 update_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # A result object deserialized from the server's reply - def update_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_tasks REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse] - # A result object deserialized from the server's reply - def list_tasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_tasks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_task_tracking_info REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # A result object deserialized from the server's reply - def get_task_tracking_info request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_task_tracking_info_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |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_tracking_info", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.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_delivery_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse] - # A result object deserialized from the server's reply - def list_delivery_vehicles request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_delivery_vehicles_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_delivery_vehicles", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.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_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest] - # 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_delivery_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/deliveryVehicles", - body: "delivery_vehicle", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_delivery_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_delivery_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest] - # 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_delivery_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{delivery_vehicle.name}", - body: "delivery_vehicle", - matches: [ - ["delivery_vehicle.name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_create_tasks REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest] - # 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_tasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/tasks:batchCreate", - body: "*", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/tasks", - body: "task", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{task.name}", - body: "task", - matches: [ - ["task.name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tasks REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_tasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/tasks", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_task_tracking_info REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest] - # A 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_tracking_info_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/taskTrackingInfo/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_delivery_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_delivery_vehicles_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/deliveryVehicles", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb deleted file mode 100644 index 8bc23bd54948..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/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/maps/fleet_engine/delivery/v1/delivery_service/rest" -require "google/maps/fleet_engine/delivery/v1/version" - -module Google - module Maps - module FleetEngine - module Delivery - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/maps/fleet_engine/delivery/v1/rest" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb deleted file mode 100644 index 5376e1dc941f..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/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 Maps - module FleetEngine - module Delivery - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb deleted file mode 100644 index 192798ce9466..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/delivery/v1/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' - - -descriptor_data = "\n0google/maps/fleetengine/delivery/v1/common.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xa0\x01\n\x18\x44\x65liveryVehicleAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x05 \x01(\x01H\x00\x42\"\n delivery_vehicle_attribute_value\"\xd0\x0e\n\x17\x44\x65liveryVehicleLocation\x12%\n\x08location\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12=\n\x13horizontal_accuracy\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x35\n\x0flatlng_accuracy\x18\x16 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12,\n\x07heading\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12:\n\x10\x62\x65\x61ring_accuracy\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x36\n\x10heading_accuracy\x18\x17 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12.\n\x08\x61ltitude\x18\x05 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12;\n\x11vertical_accuracy\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x37\n\x11\x61ltitude_accuracy\x18\x18 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x33\n\nspeed_kmph\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x02\x18\x01\x12+\n\x05speed\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x34\n\x0espeed_accuracy\x18\x07 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bserver_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x0flocation_sensor\x18\x0b \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12\x33\n\x0fis_road_snapped\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12>\n\x15is_gps_sensor_enabled\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x04\x12;\n\x11time_since_update\x18\x0e \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12=\n\x11num_stale_updates\x18\x0f \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x05\x18\x01\xe0\x41\x04\x12)\n\x0craw_location\x18\x10 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x11raw_location_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x13raw_location_sensor\x18\x1c \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12;\n\x15raw_location_accuracy\x18\x19 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12)\n\x0c\x66lp_location\x18\x1d \x01(\x0b\x32\x13.google.type.LatLng\x12\x33\n\x0f\x66lp_update_time\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x1a\x66lp_latlng_accuracy_meters\x18\x1f \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x38\n\x13\x66lp_heading_degrees\x18 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x32\n\x15supplemental_location\x18\x12 \x01(\x0b\x32\x13.google.type.LatLng\x12>\n\x1asupplemental_location_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x61\n\x1csupplemental_location_sensor\x18\x14 \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12\x44\n\x1esupplemental_location_accuracy\x18\x15 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x18\n\x0croad_snapped\x18\x1a \x01(\x08\x42\x02\x18\x01\"t\n\nTimeWindow\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"z\n\rTaskAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x04 \x01(\x01H\x00\x42\x16\n\x14task_attribute_value*\xe6\x01\n\x1d\x44\x65liveryVehicleLocationSensor\x12\x12\n\x0eUNKNOWN_SENSOR\x10\x00\x12\x07\n\x03GPS\x10\x01\x12\x0b\n\x07NETWORK\x10\x02\x12\x0b\n\x07PASSIVE\x10\x03\x12\"\n\x1eROAD_SNAPPED_LOCATION_PROVIDER\x10\x04\x12\x1e\n\x1a\x43USTOMER_SUPPLIED_LOCATION\x10\x05\x12\x19\n\x15\x46LEET_ENGINE_LOCATION\x10\x06\x12\x1b\n\x17\x46USED_LOCATION_PROVIDER\x10\x64\x12\x12\n\rCORE_LOCATION\x10\xc8\x01*\x98\x01\n\x1f\x44\x65liveryVehicleNavigationStatus\x12\x1d\n\x19UNKNOWN_NAVIGATION_STATUS\x10\x00\x12\x0f\n\x0bNO_GUIDANCE\x10\x01\x12\x1a\n\x16\x45NROUTE_TO_DESTINATION\x10\x02\x12\r\n\tOFF_ROUTE\x10\x03\x12\x1a\n\x16\x41RRIVED_AT_DESTINATION\x10\x04\x42\xfb\x01\n\'com.google.maps.fleetengine.delivery.v1B\x06\x43ommonP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - DeliveryVehicleAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleAttribute").msgclass - DeliveryVehicleLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleLocation").msgclass - TimeWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.TimeWindow").msgclass - TaskAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.TaskAttribute").msgclass - DeliveryVehicleLocationSensor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor").enummodule - DeliveryVehicleNavigationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb deleted file mode 100644 index 1d269d5162eb..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/delivery/v1/delivery_api.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/api/routing_pb' -require 'google/geo/type/viewport_pb' -require 'google/maps/fleetengine/delivery/v1/delivery_vehicles_pb' -require 'google/maps/fleetengine/delivery/v1/header_pb' -require 'google/maps/fleetengine/delivery/v1/task_tracking_info_pb' -require 'google/maps/fleetengine/delivery/v1/tasks_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n6google/maps/fleetengine/delivery/v1/delivery_api.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1egoogle/geo/type/viewport.proto\x1a;google/maps/fleetengine/delivery/v1/delivery_vehicles.proto\x1a\x30google/maps/fleetengine/delivery/v1/header.proto\x1a\n\x19remaining_distance_meters\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x35\n\x12remaining_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12_\n\"remaining_vehicle_journey_segments\x18\x08 \x03(\x0b\x32\x33.maps.fleetengine.delivery.v1.VehicleJourneySegment\x12J\n\nattributes\x18\t \x03(\x0b\x32\x36.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute\x12O\n\x04type\x18\n \x01(\x0e\x32\x41.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType\"t\n\x13\x44\x65liveryVehicleType\x12%\n!DELIVERY_VEHICLE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x0f\n\x0bTWO_WHEELER\x10\x02\x12\x0b\n\x07\x42ICYCLE\x10\x03\x12\x0e\n\nPEDESTRIAN\x10\x04:`\xea\x41]\n*fleetengine.googleapis.com/DeliveryVehicle\x12/providers/{provider}/deliveryVehicles/{vehicle}\"2\n\x0cLocationInfo\x12\"\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\"\xf5\x01\n\x15VehicleJourneySegment\x12\x37\n\x04stop\x18\x01 \x01(\x0b\x32).maps.fleetengine.delivery.v1.VehicleStop\x12\x41\n\x17\x64riving_distance_meters\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x03\x12\x38\n\x10\x64riving_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12&\n\x04path\x18\x05 \x03(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x03\"\xbe\x03\n\x0bVehicleStop\x12I\n\x10planned_location\x18\x01 \x01(\x0b\x32*.maps.fleetengine.delivery.v1.LocationInfoB\x03\xe0\x41\x02\x12\x41\n\x05tasks\x18\x02 \x03(\x0b\x32\x32.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo\x12>\n\x05state\x18\x03 \x01(\x0e\x32/.maps.fleetengine.delivery.v1.VehicleStop.State\x1a\x9d\x01\n\x08TaskInfo\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x35\n\rtask_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12I\n\x12target_time_window\x18\x03 \x01(\x0b\x32(.maps.fleetengine.delivery.v1.TimeWindowB\x03\xe0\x41\x03\"A\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x0b\n\x07\x45NROUTE\x10\x02\x12\x0b\n\x07\x41RRIVED\x10\x03\x42\x85\x02\n\'com.google.maps.fleetengine.delivery.v1B\x10\x44\x65liveryVehiclesP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - DeliveryVehicle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicle").msgclass - DeliveryVehicle::DeliveryVehicleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType").enummodule - LocationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.LocationInfo").msgclass - VehicleJourneySegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleJourneySegment").msgclass - VehicleStop = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleStop").msgclass - VehicleStop::TaskInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleStop.TaskInfo").msgclass - VehicleStop::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleStop.State").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb deleted file mode 100644 index 1e64318e1070..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/delivery/v1/header.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n0google/maps/fleetengine/delivery/v1/header.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1fgoogle/api/field_behavior.proto\"\xb0\x04\n\x15\x44\x65liveryRequestHeader\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0bsdk_version\x18\x03 \x01(\t\x12\x12\n\nos_version\x18\x04 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x05 \x01(\t\x12M\n\x08sdk_type\x18\x06 \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType\x12\x18\n\x10maps_sdk_version\x18\x07 \x01(\t\x12\x17\n\x0fnav_sdk_version\x18\x08 \x01(\t\x12N\n\x08platform\x18\t \x01(\x0e\x32<.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform\x12\x14\n\x0cmanufacturer\x18\n \x01(\t\x12\x19\n\x11\x61ndroid_api_level\x18\x0b \x01(\x05\x12\x10\n\x08trace_id\x18\x0c \x01(\t\"M\n\x07SdkType\x12\x18\n\x14SDK_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43ONSUMER\x10\x01\x12\n\n\x06\x44RIVER\x10\x02\x12\x0e\n\nJAVASCRIPT\x10\x03\"C\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41NDROID\x10\x01\x12\x07\n\x03IOS\x10\x02\x12\x07\n\x03WEB\x10\x03\x42\xfc\x01\n\'com.google.maps.fleetengine.delivery.v1B\x07HeadersP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - DeliveryRequestHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryRequestHeader").msgclass - DeliveryRequestHeader::SdkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType").enummodule - DeliveryRequestHeader::Platform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb deleted file mode 100644 index b483e697d6e9..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/delivery/v1/task_tracking_info.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/maps/fleetengine/delivery/v1/common_pb' -require 'google/maps/fleetengine/delivery/v1/delivery_vehicles_pb' -require 'google/maps/fleetengine/delivery/v1/tasks_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n] - # 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-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb deleted file mode 100644 index 6d71a9430253..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb +++ /dev/null @@ -1,463 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Specifies the routing information that should be sent along with the request - # in the form of routing header. - # **NOTE:** All service configuration rules follow the "last one wins" order. - # - # The examples below will apply to an RPC which has the following request type: - # - # Message Definition: - # - # message Request { - # // The name of the Table - # // Values can be of the following formats: - # // - `projects//tables/

` - # // - `projects//instances//tables/
` - # // - `region//zones//tables/
` - # string table_name = 1; - # - # // This value specifies routing for replication. - # // It can be in the following formats: - # // - `profiles/` - # // - a legacy `profile_id` that can be any string - # string app_profile_id = 2; - # } - # - # Example message: - # - # { - # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, - # app_profile_id: profiles/prof_qux - # } - # - # The routing header consists of one or multiple key-value pairs. The order of - # the key-value pairs is undefined, the order of the `routing_parameters` in - # the `RoutingRule` only matters for the evaluation order of the path - # templates when `field` is the same. See the examples below for more details. - # - # Every key and value in the routing header must be percent-encoded, - # and joined together in the following format: `key1=value1&key2=value2`. - # The examples below skip the percent-encoding for readability. - # - # Example 1 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key equal to the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`. - # routing_parameters { - # field: "app_profile_id" - # } - # }; - # - # result: - # - # x-goog-request-params: app_profile_id=profiles/prof_qux - # - # Example 2 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key different from the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`, but name it `routing_id` in the header. - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 3 - # - # Extracting a field from the request to put into the routing - # header, while matching a path template syntax on the field's value. - # - # NB: it is more useful to send nothing than to send garbage for the purpose - # of dynamic routing, since garbage pollutes cache. Thus the matching. - # - # Sub-example 3a - # - # The field matches the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with project-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Sub-example 3b - # - # The field does not match the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with region-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # }; - # - # result: - # - # - # - # Sub-example 3c - # - # Multiple alternative conflictingly named path templates are - # specified. The one that matches is used to construct the header. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed, whether - # // using the region- or projects-based syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Example 4 - # - # Extracting a single routing header key-value pair by matching a - # template syntax on (a part of) a single request field. - # - # annotation: - # - # option (google.api.routing) = { - # // Take just the project id from the `table_name` field. - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=projects/proj_foo - # - # Example 5 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on (parts of) a single request - # field. The last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // If the `table_name` does not have instances information, - # // take just the project id for routing. - # // Otherwise take project + instance. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*/instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # routing_id=projects/proj_foo/instances/instance_bar - # - # Example 6 - # - # Extracting multiple routing header key-value pairs by matching - # several non-conflicting path templates on (parts of) a single request field. - # - # Sub-example 6a - # - # Make the templates strict, so that if the `table_name` does not - # have an instance information, nothing is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code needs two keys instead of one composite - # // but works only for the tables with the "project-instance" name - # // syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/instances/*/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Sub-example 6b - # - # Make the templates loose, so that if the `table_name` does not - # have an instance information, just the project id part is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code wants two keys instead of one composite - # // but will work with just the `project_id` for tables without - # // an instance in the `table_name`. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result (is the same as 6a for our example message because it has the instance - # information): - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Example 7 - # - # Extracting multiple routing header key-value pairs by matching - # several path templates on multiple request fields. - # - # NB: note that here there is no way to specify sending nothing if one of the - # fields does not match its template. E.g. if the `table_name` is in the wrong - # format, the `project_id` will not be sent, but the `routing_id` will be. - # The backend routing code has to be aware of that and be prepared to not - # receive a full complement of keys if it expects multiple. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing needs both `project_id` and `routing_id` - # // (from the `app_profile_id` field) for routing. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&routing_id=profiles/prof_qux - # - # Example 8 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on several request fields. The - # last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // The `routing_id` can be a project id or a region id depending on - # // the table name format, but only if the `app_profile_id` is not set. - # // If `app_profile_id` is set it should be used instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=regions/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 9 - # - # Bringing it all together. - # - # annotation: - # - # option (google.api.routing) = { - # // For routing both `table_location` and a `routing_id` are needed. - # // - # // table_location can be either an instance id or a region+zone id. - # // - # // For `routing_id`, take the value of `app_profile_id` - # // - If it's in the format `profiles/`, send - # // just the `` part. - # // - If it's any other literal, send it as is. - # // If the `app_profile_id` is empty, and the `table_name` starts with - # // the project_id, send that instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_location=regions/*/zones/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "profiles/{routing_id=*}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_location=instances/instance_bar&routing_id=prof_qux - # @!attribute [rw] routing_parameters - # @return [::Array<::Google::Api::RoutingParameter>] - # A collection of Routing Parameter specifications. - # **NOTE:** If multiple Routing Parameters describe the same key - # (via the `path_template` field or via the `field` field when - # `path_template` is not provided), "last one wins" rule - # determines which Parameter gets used. - # See the examples for more details. - class RoutingRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A projection from an input message to the GRPC or REST header. - # @!attribute [rw] field - # @return [::String] - # A request field to extract the header key-value pair from. - # @!attribute [rw] path_template - # @return [::String] - # A pattern matching the key-value field. Optional. - # If not specified, the whole field specified in the `field` field will be - # taken as value, and its name used as key. If specified, it MUST contain - # exactly one named segment (along with any number of unnamed segments) The - # pattern will be matched over the field specified in the `field` field, then - # if the match is successful: - # - the name of the single named segment will be used as a header name, - # - the match value of the segment will be used as a header value; - # if the match is NOT successful, nothing will be sent. - # - # Example: - # - # -- This is a field in the request message - # | that the header value will be extracted from. - # | - # | -- This is the key name in the - # | | routing header. - # V | - # field: "table_name" v - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # ^ ^ - # | | - # In the {} brackets is the pattern that -- | - # specifies what to extract from the | - # field as a value to be sent. | - # | - # The string in the field must match the whole pattern -- - # before brackets, inside brackets, after brackets. - # - # When looking at this specific example, we can see that: - # - A key-value pair with the key `table_location` - # and the value matching `instances/*` should be added - # to the x-goog-request-params routing header. - # - The value is extracted from the request message's `table_name` field - # if it matches the full pattern specified: - # `projects/*/instances/*/tables/*`. - # - # **NB:** If the `path_template` field is not provided, the key name is - # equal to the field name, and the whole field should be sent as a value. - # This makes the pattern for the field and the value functionally equivalent - # to `**`, and the configuration - # - # { - # field: "table_name" - # } - # - # is a functionally equivalent shorthand to: - # - # { - # field: "table_name" - # path_template: "{table_name=**}" - # } - # - # See Example 1 for more details. - class RoutingParameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb deleted file mode 100644 index f387552a7073..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Geo - module Type - # A latitude-longitude viewport, represented as two diagonally opposite `low` - # and `high` points. A viewport is considered a closed region, i.e. it includes - # its boundary. The latitude bounds must range between -90 to 90 degrees - # inclusive, and the longitude bounds must range between -180 to 180 degrees - # inclusive. Various cases include: - # - # - If `low` = `high`, the viewport consists of that single point. - # - # - If `low.longitude` > `high.longitude`, the longitude range is inverted - # (the viewport crosses the 180 degree longitude line). - # - # - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, - # the viewport includes all longitudes. - # - # - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, - # the longitude range is empty. - # - # - If `low.latitude` > `high.latitude`, the latitude range is empty. - # - # Both `low` and `high` must be populated, and the represented box cannot be - # empty (as specified by the definitions above). An empty viewport will result - # in an error. - # - # For example, this viewport fully encloses New York City: - # - # { - # "low": { - # "latitude": 40.477398, - # "longitude": -74.259087 - # }, - # "high": { - # "latitude": 40.91618, - # "longitude": -73.70018 - # } - # } - # @!attribute [rw] low - # @return [::Google::Type::LatLng] - # Required. The low point of the viewport. - # @!attribute [rw] high - # @return [::Google::Type::LatLng] - # Required. The high point of the viewport. - class Viewport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb deleted file mode 100644 index 1feab364a2dd..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb +++ /dev/null @@ -1,276 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - # Describes a vehicle attribute as a key-value pair. The "key:value" string - # length cannot exceed 256 characters. - # @!attribute [rw] key - # @return [::String] - # The attribute's key. - # @!attribute [rw] value - # @return [::String] - # The attribute's value. - # @!attribute [rw] string_value - # @return [::String] - # String typed attribute value. - # - # Note: This is identical to the `value` field which will eventually be - # deprecated. For create or update methods, either field can be used, but - # it's strongly recommended to use `string_value`. If both `string_value` - # and `value` are set, they must be identical or an error will be thrown. - # Both fields are populated in responses. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_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] - # Boolean typed attribute value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_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] - # Double typed attribute value. - # - # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DeliveryVehicleAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The location, speed, and heading of a vehicle at a point in time. - # @!attribute [rw] location - # @return [::Google::Type::LatLng] - # The location of the vehicle. - # When it is sent to Fleet Engine, the vehicle's location is a GPS location. - # When you receive it in a response, the vehicle's location can be either a - # GPS location, a supplemental location, or some other estimated location. - # The source is specified in `location_sensor`. - # @!attribute [rw] horizontal_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `latlng_accuracy` instead. - # @!attribute [rw] latlng_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `location` in meters as a radius. - # @!attribute [rw] heading - # @return [::Google::Protobuf::Int32Value] - # Direction the vehicle is moving in degrees. 0 represents North. - # The valid range is [0,360). - # @!attribute [rw] bearing_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `heading_accuracy` instead. - # @!attribute [rw] heading_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `heading` in degrees. - # @!attribute [rw] altitude - # @return [::Google::Protobuf::DoubleValue] - # Altitude in meters above WGS84. - # @!attribute [rw] vertical_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `altitude_accuracy` instead. - # @!attribute [rw] altitude_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `altitude` in meters. - # @!attribute [rw] speed_kmph - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Int32Value] - # Speed of the vehicle in kilometers per hour. - # Deprecated: Use `speed` instead. - # @!attribute [rw] speed - # @return [::Google::Protobuf::DoubleValue] - # Speed of the vehicle in meters/second - # @!attribute [rw] speed_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `speed` in meters/second. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when `location` was reported by the sensor according to the - # sensor's clock. - # @!attribute [r] server_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the server received the location information. - # @!attribute [rw] location_sensor - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocationSensor] - # Provider of location data (for example, `GPS`). - # @!attribute [rw] is_road_snapped - # @return [::Google::Protobuf::BoolValue] - # Whether `location` is snapped to a road. - # @!attribute [rw] is_gps_sensor_enabled - # @return [::Google::Protobuf::BoolValue] - # Input only. Indicates whether the GPS sensor is enabled on the mobile - # device. - # @!attribute [rw] time_since_update - # @return [::Google::Protobuf::Int32Value] - # Input only. Time (in seconds) since this location was first sent to the - # server. This will be zero for the first update. If the time is unknown (for - # example, when the app restarts), this value resets to zero. - # @!attribute [rw] num_stale_updates - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Int32Value] - # Input only. Deprecated: Other signals are now used to determine if a - # location is stale. - # @!attribute [rw] raw_location - # @return [::Google::Type::LatLng] - # Raw vehicle location (unprocessed by road-snapper). - # @!attribute [rw] raw_location_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp associated with the raw location. - # @!attribute [rw] raw_location_sensor - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocationSensor] - # Source of the raw location. Defaults to `GPS`. - # @!attribute [rw] raw_location_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `raw_location` as a radius, in meters. - # @!attribute [rw] flp_location - # @return [::Google::Type::LatLng] - # The location from Android's Fused Location Provider. - # @!attribute [rw] flp_update_time - # @return [::Google::Protobuf::Timestamp] - # Update timestamp of the `flp_location` - # @!attribute [rw] flp_latlng_accuracy_meters - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `flp_location` in meters as a radius. - # @!attribute [rw] flp_heading_degrees - # @return [::Google::Protobuf::Int32Value] - # Direction the vehicle is moving in degrees, as determined by the Fused - # Location Provider. 0 represents North. The valid range is [0,360). - # @!attribute [rw] supplemental_location - # @return [::Google::Type::LatLng] - # Supplemental location provided by the integrating app. - # @!attribute [rw] supplemental_location_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp associated with the supplemental location. - # @!attribute [rw] supplemental_location_sensor - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocationSensor] - # Source of the supplemental location. Defaults to - # `CUSTOMER_SUPPLIED_LOCATION`. - # @!attribute [rw] supplemental_location_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `supplemental_location` as a radius, in meters. - # @!attribute [rw] road_snapped - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Deprecated: Use `is_road_snapped` instead. - class DeliveryVehicleLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A time range. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Required. The start time of the time window (inclusive). - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Required. The end time of the time window (inclusive). - class TimeWindow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a task attribute as a key-value pair. The "key:value" string length - # cannot exceed 256 characters. - # @!attribute [rw] key - # @return [::String] - # The attribute's key. Keys may not contain the colon character (:). - # @!attribute [rw] string_value - # @return [::String] - # String typed attribute value. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_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] - # Boolean typed attribute value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_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] - # Double typed attribute value. - # - # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TaskAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The sensor or methodology used to determine the location. - module DeliveryVehicleLocationSensor - # The sensor is unspecified or unknown. - UNKNOWN_SENSOR = 0 - - # GPS or Assisted GPS. - GPS = 1 - - # Assisted GPS, cell tower ID, or WiFi access point. - NETWORK = 2 - - # Cell tower ID or WiFi access point. - PASSIVE = 3 - - # A location determined by the mobile device to be the most likely - # road position. - ROAD_SNAPPED_LOCATION_PROVIDER = 4 - - # A customer-supplied location from an independent source. Typically, this - # value is used for a location provided from sources other than the mobile - # device running Driver SDK. If the original source is described by one of - # the other enum values, use that value. Locations marked - # CUSTOMER_SUPPLIED_LOCATION are typically provided via a DeliveryVehicle's - # `last_location.supplemental_location_sensor`. - CUSTOMER_SUPPLIED_LOCATION = 5 - - # A location calculated by Fleet Engine based on the signals available to it. - # Output only. This value will be rejected if it is received in a request. - FLEET_ENGINE_LOCATION = 6 - - # Android's Fused Location Provider. - FUSED_LOCATION_PROVIDER = 100 - - # The location provider on Apple operating systems. - CORE_LOCATION = 200 - end - - # The vehicle's navigation status. - module DeliveryVehicleNavigationStatus - # Unspecified navigation status. - UNKNOWN_NAVIGATION_STATUS = 0 - - # The Driver app's navigation is in `FREE_NAV` mode. - NO_GUIDANCE = 1 - - # Turn-by-turn navigation is available and the Driver app navigation has - # entered `GUIDED_NAV` mode. - ENROUTE_TO_DESTINATION = 2 - - # The vehicle has gone off the suggested route. - OFF_ROUTE = 3 - - # The vehicle is within approximately 50m of the destination. - ARRIVED_AT_DESTINATION = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb deleted file mode 100644 index 8c9bb733f9ef..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb +++ /dev/null @@ -1,395 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - # The `CreateDeliveryVehicle` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. The provider must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @!attribute [rw] delivery_vehicle_id - # @return [::String] - # Required. The Delivery Vehicle ID must be unique and subject to the - # following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] delivery_vehicle - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # Required. The `DeliveryVehicle` entity to create. When creating a new - # delivery vehicle, you may set the following optional fields: - # - # * type - # * last_location - # * attributes - # - # Note: The DeliveryVehicle's `name` field is ignored. All other - # DeliveryVehicle fields must not be set; otherwise, an error is returned. - class CreateDeliveryVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `GetDeliveryVehicle` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - class GetDeliveryVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteDeliveryVehicle request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - class DeleteDeliveryVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `ListDeliveryVehicles` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. - # For example, `sample-cloud-project`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of vehicles to return. The service may return - # fewer than this number. If you don't specify this number, then the server - # determines the number of results to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDeliveryVehicles` - # call. You must provide this in order to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDeliveryVehicles` - # must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter query to apply when listing delivery vehicles. See - # http://aip.dev/160 for examples of the filter syntax. If you don't specify - # a value, or if you specify an empty string for the filter, then all - # delivery vehicles are returned. - # - # Note that the only queries supported for `ListDeliveryVehicles` are - # on vehicle attributes (for example, `attributes. = ` or - # `attributes. = AND attributes. = `). Also, all - # attributes are stored as strings, so the only supported comparisons against - # attributes are string comparisons. In order to compare against number or - # boolean values, the values must be explicitly quoted to be treated as - # strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # - # The maximum number of restrictions allowed in a filter query is 50. A - # restriction is a part of the query of the form - # `attribute. `, for example `attributes.foo = bar` - # is 1 restriction. - # @!attribute [rw] viewport - # @return [::Google::Geo::Type::Viewport] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - class ListDeliveryVehiclesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `ListDeliveryVehicles` response message. - # @!attribute [rw] delivery_vehicles - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] - # The set of delivery vehicles that meet the requested filtering criteria. - # When no filter is specified, the request returns all delivery vehicles. A - # successful response can also be empty. An empty response indicates that no - # delivery vehicles were found meeting the requested filter criteria. - # @!attribute [rw] next_page_token - # @return [::String] - # You can pass this token in the `ListDeliveryVehiclesRequest` to continue to - # list results. When all of the results are returned, this field won't be in - # the response, or it will be an empty string. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of delivery vehicles that match the request criteria, - # across all pages. - class ListDeliveryVehiclesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `UpdateDeliveryVehicle` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] delivery_vehicle - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # Required. The `DeliveryVehicle` entity update to apply. - # Note: You cannot update the name of the `DeliveryVehicle`. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A field mask that indicates which `DeliveryVehicle` fields to - # update. Note that the update_mask must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"remaining_vehicle_journey_segments"`. - class UpdateDeliveryVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `BatchCreateTask` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # Note: If you set this field, then the header field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource shared by all tasks. This value must be in - # the format `providers/{provider}`. The `provider` must be the Google Cloud - # Project ID. For example, `sample-cloud-project`. The parent field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @!attribute [rw] requests - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest>] - # Required. The request message that specifies the resources to create. - # Note: You can create a maximum of 500 tasks in a batch. - class BatchCreateTasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `BatchCreateTask` response message. - # @!attribute [rw] tasks - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # The created Tasks. - class BatchCreateTasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `CreateTask` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. The `provider` must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @!attribute [rw] task_id - # @return [::String] - # Required. The Task ID must be unique, but it should be not a shipment - # tracking ID. To store a shipment tracking ID, use the `tracking_id` field. - # Note that multiple tasks can have the same `tracking_id`. Task IDs are - # subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] task - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # Required. The Task entity to create. - # When creating a Task, the following fields are required: - # - # * `type` - # * `state` (must be set to `OPEN`) - # * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` - # tasks, but required for all other task types) - # * `planned_location` (optional for `UNAVAILABLE` tasks) - # * `task_duration` - # - # The following fields can be optionally set: - # - # * `target_time_window` - # * `task_tracking_view_config` - # * `attributes` - # - # Note: The Task's `name` field is ignored. All other Task fields must not be - # set; otherwise, an error is returned. - class CreateTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `GetTask` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - class GetTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteTask request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - class DeleteTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `UpdateTask` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] task - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # Required. The Task associated with the update. - # The following fields are maintained by Fleet Engine. Do not update - # them using `Task.update`. - # - # * `last_location`. - # * `last_location_snappable`. - # * `name`. - # * `remaining_vehicle_journey_segments`. - # * `task_outcome_location_source`. - # - # Note: You cannot change the value of `task_outcome` once you set it. - # - # If the Task has been assigned to a delivery vehicle, then don't set the - # Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` - # that contains the Task from the delivery vehicle, which automatically sets - # the Task state to CLOSED. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The field mask that indicates which Task fields to update. - # Note: The `update_mask` must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"task_outcome,task_outcome_time,task_outcome_location"`. - class UpdateTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `ListTasks` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of Tasks to return. The service may return - # fewer than this value. If you don't specify this value, then the server - # determines the number of results to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token received from a previous `ListTasks` call. - # You can provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListTasks` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter query to apply when listing Tasks. See - # http://aip.dev/160 for examples of filter syntax. If you don't specify a - # value, or if you filter on an empty string, then all Tasks are returned. - # For information about the Task properties that you can filter on, see [List - # tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). - class ListTasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `ListTasks` response that contains the set of Tasks that meet the filter - # criteria in the `ListTasksRequest`. - # @!attribute [rw] tasks - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # The set of Tasks that meet the requested filtering criteria. When no filter - # is specified, the request returns all tasks. A successful response can also - # be empty. An empty response indicates that no Tasks were found meeting the - # requested filter criteria. - # @!attribute [rw] next_page_token - # @return [::String] - # Pass this token in the `ListTasksRequest` to continue to list results. - # If all results have been returned, then this field is either an empty - # string, or it doesn't appear in the response. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of Tasks that match the request criteria, across all - # pages. - class ListTasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `GetTaskTrackingInfoRequest` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` - # must be the Google Cloud Project ID, and the `tracking_id` must be the - # tracking ID associated with the task. An example name can be - # `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. - class GetTaskTrackingInfoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb deleted file mode 100644 index 815ff7ffd128..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb +++ /dev/null @@ -1,276 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - # The `DeliveryVehicle` message. A delivery vehicle transports shipments from a - # depot to a delivery location, and from a pickup location to the depot. In - # some cases, delivery vehicles also transport shipments directly from the - # pickup location to the delivery location. - # - # Note: gRPC and REST APIs use different field naming conventions. For example, - # the `DeliveryVehicle.current_route_segment` field in the gRPC API and the - # `DeliveryVehicle.currentRouteSegment` field in the REST API refer to the same - # field. - # @!attribute [rw] name - # @return [::String] - # The unique name of this Delivery Vehicle. - # The format is `providers/{provider}/deliveryVehicles/{vehicle}`. - # @!attribute [rw] last_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation] - # The last reported location of the Delivery Vehicle. - # @!attribute [rw] past_locations - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation>] - # Input only. Locations where this Delivery Vehicle has been in the past that - # haven't yet been reported to Fleet Engine. This is used in - # `UpdateDeliveryVehicleRequest` to record locations which were previously - # unable to be sent to the server. Typically this happens when the Delivery - # Vehicle does not have internet connectivity. - # @!attribute [rw] navigation_status - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleNavigationStatus] - # The Delivery Vehicle's navigation status. - # @!attribute [rw] current_route_segment - # @return [::String] - # The encoded polyline specifying the route that the navigation recommends - # taking to the next waypoint. Your driver app updates this when a - # stop is reached or passed, and when the navigation reroutes. These - # `LatLng`s are returned in - # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - # (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - # (REST) for all active Tasks assigned to the Vehicle. - # - # There are a few cases where this field might not be used to populate - # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - # (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - # (REST): - # - # * The endpoint of the `current_route_segment` does not match - # `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or - # `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST). - # - # * The driver app has not updated its location recently, so the last - # updated value for this field might be stale. - # - # * The driver app has recently updated its location, but the - # `current_route_segment` is stale, and points to a previous vehicle stop. - # - # In these cases, Fleet Engine populates this field with a route from the - # most recently passed VehicleStop to the upcoming VehicleStop to ensure that - # the consumer of this field has the best available information on the - # current path of the Delivery Vehicle. - # @!attribute [rw] current_route_segment_end_point - # @return [::Google::Type::LatLng] - # The location where the `current_route_segment` ends. This is not currently - # populated by the driver app, but you can supply it on - # `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming - # vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet - # Engine will then do its best to interpolate to an actual `VehicleStop`. - # - # This field is ignored in `UpdateDeliveryVehicle` calls if the - # `current_route_segment` field is empty. - # @!attribute [rw] remaining_distance_meters - # @return [::Google::Protobuf::Int32Value] - # The remaining driving distance for the `current_route_segment`. - # The Driver app typically provides this field, but there are some - # circumstances in which Fleet Engine will override the value sent by the - # app. For more information, see - # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}. - # This field is returned in - # `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) - # or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) - # for all active `Task`s assigned to the Delivery Vehicle. - # - # Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the - # `current_route_segment` field is empty. - # @!attribute [rw] remaining_duration - # @return [::Google::Protobuf::Duration] - # The remaining driving time for the `current_route_segment`. - # The Driver app typically provides this field, but there are some - # circumstances in which Fleet Engine will override the value sent by the - # app. For more information, see - # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}. - # This field is returned in - # `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or - # `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all - # active tasks assigned to the Delivery Vehicle. - # - # Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the - # `current_route_segment` field is empty. - # @!attribute [rw] remaining_vehicle_journey_segments - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>] - # The journey segments assigned to this Delivery Vehicle, starting from the - # Vehicle's most recently reported location. This field won't be populated - # in the response of `ListDeliveryVehicles`. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleAttribute>] - # A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have - # at most 100 attributes, and each attribute must have a unique key. - # @!attribute [rw] type - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle::DeliveryVehicleType] - # The type of this delivery vehicle. If unset, this will default to `AUTO`. - class DeliveryVehicle - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of delivery vehicle. - module DeliveryVehicleType - # The value is unused. - DELIVERY_VEHICLE_TYPE_UNSPECIFIED = 0 - - # An automobile. - AUTO = 1 - - # A motorcycle, moped, or other two-wheeled vehicle - TWO_WHEELER = 2 - - # Human-powered transport. - BICYCLE = 3 - - # A human transporter, typically walking or running, traveling along - # pedestrian pathways. - PEDESTRIAN = 4 - end - end - - # A location with any additional identifiers. - # @!attribute [rw] point - # @return [::Google::Type::LatLng] - # The location's coordinates. - class LocationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a Vehicle’s travel segment - from its previous stop to the - # current stop. If it is the first active stop, then it is from the - # Vehicle’s current location to this stop. - # @!attribute [rw] stop - # @return [::Google::Maps::FleetEngine::Delivery::V1::VehicleStop] - # Specifies the stop location, along with the `Task`s associated with - # the stop. Some fields of the VehicleStop might not be present if this - # journey segment is part of `JourneySharingInfo`. - # @!attribute [r] driving_distance_meters - # @return [::Google::Protobuf::Int32Value] - # Output only. The travel distance from the previous stop to this stop. - # If the current stop is the first stop in the list of journey - # segments, then the starting point is the vehicle's location recorded - # at the time that this stop was added to the list. This field might not be - # present if this journey segment is part of `JourneySharingInfo`. - # @!attribute [r] driving_duration - # @return [::Google::Protobuf::Duration] - # Output only. The travel time from the previous stop to this stop. - # If the current stop is the first stop in the list of journey - # segments, then the starting point is the Vehicle's location recorded - # at the time that this stop was added to the list. - # - # If this field is defined in the path - # `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or - # `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST), - # then it may be populated with the value from - # `DeliveryVehicle.remaining_duration` (gRPC) or - # `DeliveryVehicle.remainingDuration` (REST). - # This provides the remaining driving duration from the driver app's latest - # known location rather than the driving time from the previous stop. - # @!attribute [r] path - # @return [::Array<::Google::Type::LatLng>] - # Output only. The path from the previous stop to this stop. If the current - # stop is the first stop in the list of journey segments, then this is the - # path from the vehicle's current location to this stop at the time that the - # stop was added to the list. This field might not be present if this journey - # segment is part of `JourneySharingInfo`. - # - # If this field is defined in the path - # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - # (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - # (REST), then it may be populated with the `LatLng`s decoded from - # `DeliveryVehicle.current_route_segment` (gRPC) or - # `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving - # path from the driver app's latest known location rather than the path from - # the previous stop. - class VehicleJourneySegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a point where a Vehicle stops to perform one or more `Task`s. - # @!attribute [rw] planned_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] - # Required. The location of the stop. Note that the locations in the `Task`s - # might not exactly match this location, but will be within a short distance - # of it. This field won't be populated in the response of a `GetTask` call. - # @!attribute [rw] tasks - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleStop::TaskInfo>] - # The list of `Task`s to be performed at this stop. This field won't be - # populated in the response of a `GetTask` call. - # @!attribute [rw] state - # @return [::Google::Maps::FleetEngine::Delivery::V1::VehicleStop::State] - # The state of the `VehicleStop`. This field won't be populated in the - # response of a `GetTask` call. - class VehicleStop - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Additional information about the Task performed at this stop. - # @!attribute [rw] task_id - # @return [::String] - # The Task ID. This field won't be populated in the response of a `GetTask` - # call. Task IDs are subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [r] task_duration - # @return [::Google::Protobuf::Duration] - # Output only. The time required to perform the Task. - # @!attribute [r] target_time_window - # @return [::Google::Maps::FleetEngine::Delivery::V1::TimeWindow] - # Output only. The time window during which the task should be completed. - # This is only set in the response to `GetDeliveryVehicle`. - class TaskInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The current state of a `VehicleStop`. - module State - # Unknown. - STATE_UNSPECIFIED = 0 - - # Created, but not actively routing. - NEW = 1 - - # Assigned and actively routing. - ENROUTE = 2 - - # Arrived at stop. Assumes that when the Vehicle is routing to the next - # stop, that all previous stops have been completed. - ARRIVED = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb deleted file mode 100644 index 8475ff84935a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb +++ /dev/null @@ -1,113 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - # A RequestHeader contains fields common to all Delivery RPC requests. - # @!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. If none - # is specified, the response may be in any language, with a preference for - # English if such a name exists. Field value example: `en-US`. - # @!attribute [rw] region_code - # @return [::String] - # Required. CLDR region code of the region where the request originates. - # Field value example: `US`. - # @!attribute [rw] sdk_version - # @return [::String] - # Version of the calling SDK, if applicable. - # The version format is "major.minor.patch", example: `1.1.2`. - # @!attribute [rw] os_version - # @return [::String] - # Version of the operating system on which the calling SDK is running. - # Field value examples: `4.4.1`, `12.1`. - # @!attribute [rw] device_model - # @return [::String] - # Model of the device on which the calling SDK is running. - # Field value examples: `iPhone12,1`, `SM-G920F`. - # @!attribute [rw] sdk_type - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader::SdkType] - # The type of SDK sending the request. - # @!attribute [rw] maps_sdk_version - # @return [::String] - # Version of the MapSDK which the calling SDK depends on, if applicable. - # The version format is "major.minor.patch", example: `5.2.1`. - # @!attribute [rw] nav_sdk_version - # @return [::String] - # Version of the NavSDK which the calling SDK depends on, if applicable. - # The version format is "major.minor.patch", example: `2.1.0`. - # @!attribute [rw] platform - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader::Platform] - # Platform of the calling SDK. - # @!attribute [rw] manufacturer - # @return [::String] - # Manufacturer of the Android device from the calling SDK, only applicable - # for the Android SDKs. - # Field value example: `Samsung`. - # @!attribute [rw] android_api_level - # @return [::Integer] - # Android API level of the calling SDK, only applicable for the Android SDKs. - # Field value example: `23`. - # @!attribute [rw] trace_id - # @return [::String] - # Optional ID that can be provided for logging purposes in order to identify - # the request. - class DeliveryRequestHeader - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible types of SDK. - module SdkType - # The default value. This value is used if the `sdk_type` is omitted. - SDK_TYPE_UNSPECIFIED = 0 - - # The calling SDK is Consumer. - CONSUMER = 1 - - # The calling SDK is Driver. - DRIVER = 2 - - # The calling SDK is JavaScript. - JAVASCRIPT = 3 - end - - # The platform of the calling SDK. - module Platform - # The default value. This value is used if the platform is omitted. - PLATFORM_UNSPECIFIED = 0 - - # The request is coming from Android. - ANDROID = 1 - - # The request is coming from iOS. - IOS = 2 - - # The request is coming from the web. - WEB = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb deleted file mode 100644 index 3a110fdb32d7..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.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! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - # The `TaskTrackingInfo` message. The message contains task tracking - # information which will be used for display. If a tracking ID is associated - # with multiple Tasks, Fleet Engine uses a heuristic to decide which Task's - # TaskTrackingInfo to select. - # @!attribute [rw] name - # @return [::String] - # Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`, - # where `tracking` represents the tracking ID. - # @!attribute [rw] tracking_id - # @return [::String] - # Immutable. The tracking ID of a Task. - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] vehicle_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation] - # The vehicle's last location. - # @!attribute [rw] route_polyline_points - # @return [::Array<::Google::Type::LatLng>] - # A list of points which when connected forms a polyline of the vehicle's - # expected route to the location of this task. - # @!attribute [rw] remaining_stop_count - # @return [::Google::Protobuf::Int32Value] - # Indicates the number of stops the vehicle remaining until the task stop is - # reached, including the task stop. For example, if the vehicle's next stop - # is the task stop, the value will be 1. - # @!attribute [rw] remaining_driving_distance_meters - # @return [::Google::Protobuf::Int32Value] - # The total remaining distance in meters to the `VehicleStop` of interest. - # @!attribute [rw] estimated_arrival_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp that indicates the estimated arrival time to the stop - # location. - # @!attribute [rw] estimated_task_completion_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp that indicates the estimated completion time of a Task. - # @!attribute [rw] state - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::State] - # The current execution state of the Task. - # @!attribute [rw] task_outcome - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcome] - # The outcome of attempting to execute a Task. - # @!attribute [rw] task_outcome_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp that indicates when the Task's outcome was set by the - # provider. - # @!attribute [rw] planned_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] - # Immutable. The location where the Task will be completed. - # @!attribute [rw] target_time_window - # @return [::Google::Maps::FleetEngine::Delivery::V1::TimeWindow] - # The time window during which the task should be completed. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::TaskAttribute>] - # The custom attributes set on the task. - class TaskTrackingInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb deleted file mode 100644 index 0bb1c3f6a05b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb +++ /dev/null @@ -1,291 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - # A Task in the Delivery API represents a single action to track. In general, - # there is a distinction between shipment-related Tasks and break Tasks. A - # shipment can have multiple Tasks associated with it. For example, there could - # be one Task for the pickup, and one for the drop-off or transfer. Also, - # different Tasks for a given shipment can be handled by different vehicles. - # For example, one vehicle could handle the pickup, driving the shipment to the - # hub, while another vehicle drives the same shipment from the hub to the - # drop-off location. - # - # Note: gRPC and REST APIs use different field naming conventions. For example, - # the `Task.journey_sharing_info` field in the gRPC API and the - # `Task.journeySharingInfo` field in the REST API refer to the same - # field. - # @!attribute [rw] name - # @return [::String] - # Must be in the format `providers/{provider}/tasks/{task}`. - # @!attribute [rw] type - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::Type] - # Required. Immutable. Defines the type of the Task. For example, a break or - # shipment. - # @!attribute [rw] state - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::State] - # Required. The current execution state of the Task. - # @!attribute [rw] task_outcome - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcome] - # The outcome of the Task. - # @!attribute [rw] task_outcome_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp that indicates when the `Task`'s outcome was set by the - # provider. - # @!attribute [rw] task_outcome_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] - # The location where the `Task`'s outcome was set. This value is updated as - # part of `UpdateTask`. If this value isn't explicitly updated by the - # provider, then Fleet Engine populates it by default with the last known - # vehicle location (the *raw* location). - # @!attribute [rw] task_outcome_location_source - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcomeLocationSource] - # Indicates where the value of the `task_outcome_location` came from. - # @!attribute [rw] tracking_id - # @return [::String] - # Immutable. This field facilitates the storing of an ID so you can avoid - # using a complicated mapping. You cannot set `tracking_id` for Tasks of type - # `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are subject to the - # following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [r] delivery_vehicle_id - # @return [::String] - # Output only. The ID of the vehicle that is executing this Task. Delivery - # Vehicle IDs are subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] planned_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] - # Immutable. The location where the Task will be completed. - # Optional for `UNAVAILABLE` Tasks, but required for all other Tasks. - # @!attribute [rw] task_duration - # @return [::Google::Protobuf::Duration] - # Required. Immutable. The time needed to execute a Task at this location. - # @!attribute [rw] target_time_window - # @return [::Google::Maps::FleetEngine::Delivery::V1::TimeWindow] - # The time window during which the task should be completed. - # @!attribute [r] journey_sharing_info - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::JourneySharingInfo] - # Output only. Journey sharing-specific fields. Not populated when state is - # `CLOSED`. - # @!attribute [rw] task_tracking_view_config - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig] - # The configuration for task tracking that specifies which data elements are - # visible to the end users under what circumstances. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::TaskAttribute>] - # A list of custom Task attributes. Each attribute must have a unique key. - class Task - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Journey sharing specific fields. - # @!attribute [rw] remaining_vehicle_journey_segments - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>] - # Tracking information for the stops that the assigned vehicle will make - # before it completes this Task. Note that this list can contain stops - # from other tasks. - # - # The first segment, - # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC) - # or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST), - # contains route information from the driver's last known location to the - # upcoming `VehicleStop`. Current route information usually comes from the - # driver app, except for some cases noted in the documentation for - # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}. - # The other segments in - # `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or - # `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are - # populated by Fleet Engine. They provide route information between the - # remaining `VehicleStops`. - # @!attribute [rw] last_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation] - # Indicates the vehicle's last reported location of the assigned vehicle. - # @!attribute [rw] last_location_snappable - # @return [::Boolean] - # Indicates whether the vehicle's lastLocation can be snapped to - # the `current_route_segment`. This value is False if either - # `last_location` or `current_route_segment` don't exist. This value is - # computed by Fleet Engine. Updates from clients are ignored. - class JourneySharingInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of Task. - module Type - # Default, the Task type is unknown. - TYPE_UNSPECIFIED = 0 - - # A pickup Task is the action taken for picking up a shipment from a - # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP` - # type. - PICKUP = 1 - - # A delivery Task is the action taken for delivering a shipment to an end - # customer. Depot or feeder vehicle dropoffs should use the - # `SCHEDULED_STOP` type. - DELIVERY = 2 - - # A scheduled stop Task is used for planning purposes. For example, it - # could represent picking up or dropping off shipments from feeder vehicles - # or depots. It shouldn't be used for any shipments that are picked up or - # dropped off from an end customer. - SCHEDULED_STOP = 3 - - # A Task that means the Vehicle is not available for service. For example, - # this can happen when the driver takes a break, or when the vehicle - # is being refueled. - UNAVAILABLE = 4 - end - - # The state of a Task. This indicates the Tasks's progress. - module State - # Default. Used for an unspecified or unrecognized Task state. - STATE_UNSPECIFIED = 0 - - # Either the Task has not yet been assigned to a delivery vehicle, or the - # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop. - OPEN = 1 - - # When the vehicle passes the vehicle stop for this Task. - CLOSED = 2 - end - - # The outcome of attempting to execute a Task. When `TaskState` is closed, - # `TaskOutcome` indicates whether it was completed successfully. - module TaskOutcome - # The Task outcome before its value is set. - TASK_OUTCOME_UNSPECIFIED = 0 - - # The Task completed successfully. - SUCCEEDED = 1 - - # Either the Task couldn't be completed, or it was cancelled. - FAILED = 2 - end - - # The identity of the source that populated the `task_outcome_location`. - module TaskOutcomeLocationSource - # The task outcome before it is set. - TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0 - - # The provider-specified the `task_outcome_location`. - PROVIDER = 2 - - # The provider didn't specify the `task_outcome_location`, so Fleet Engine - # used the last known vehicle location. - LAST_VEHICLE_LOCATION = 3 - end - end - - # The configuration message that defines when a data element of a Task should - # be visible to the end users. - # @!attribute [rw] route_polyline_points_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when route polyline points can be visible. If this - # field is not specified, the project level default visibility configuration - # for this data will be used. - # @!attribute [rw] estimated_arrival_time_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when estimated arrival time can be visible. If - # this field is not specified, the project level default visibility - # configuration for this data will be used. - # @!attribute [rw] estimated_task_completion_time_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when estimated task completion time can be - # visible. If this field is not specified, the project level default - # visibility configuration for this data will be used. - # @!attribute [rw] remaining_driving_distance_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when remaining driving distance can be visible. If - # this field is not specified, the project level default visibility - # configuration for this data will be used. - # @!attribute [rw] remaining_stop_count_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when remaining stop count can be visible. If this - # field is not specified, the project level default visibility configuration - # for this data will be used. - # @!attribute [rw] vehicle_location_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when vehicle location can be visible. If this - # field is not specified, the project level default visibility configuration - # for this data will be used. - class TaskTrackingViewConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The option message that defines when a data element should be visible to - # the end users. - # @!attribute [rw] remaining_stop_count_threshold - # @return [::Integer] - # This data element is visible to the end users if the remaining stop - # count <= remaining_stop_count_threshold. - # - # Note: The following fields are mutually exclusive: `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `remaining_driving_distance_meters_threshold`, `always`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] duration_until_estimated_arrival_time_threshold - # @return [::Google::Protobuf::Duration] - # This data element is visible to the end users if the ETA to the stop - # <= duration_until_estimated_arrival_time_threshold. - # - # Note: The following fields are mutually exclusive: `duration_until_estimated_arrival_time_threshold`, `remaining_stop_count_threshold`, `remaining_driving_distance_meters_threshold`, `always`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] remaining_driving_distance_meters_threshold - # @return [::Integer] - # This data element is visible to the end users if the remaining - # driving distance in meters <= - # remaining_driving_distance_meters_threshold. - # - # Note: The following fields are mutually exclusive: `remaining_driving_distance_meters_threshold`, `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `always`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] always - # @return [::Boolean] - # If set to true, this data element is always visible to the end users - # with no thresholds. This field cannot be set to false. - # - # Note: The following fields are mutually exclusive: `always`, `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `remaining_driving_distance_meters_threshold`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] never - # @return [::Boolean] - # If set to true, this data element is always hidden from the end users - # with no thresholds. This field cannot be set to false. - # - # Note: The following fields are mutually exclusive: `never`, `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `remaining_driving_distance_meters_threshold`, `always`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class VisibilityOption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb deleted file mode 100644 index c15e78a39a56..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/snippets/Gemfile b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/Gemfile deleted file mode 100644 index 30533202706d..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1", path: "../" -else - gem "google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb deleted file mode 100644 index 14782a4848c5..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_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 fleetenginedelivery_v1_generated_DeliveryService_BatchCreateTasks_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the batch_create_tasks call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#batch_create_tasks. -# -def batch_create_tasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new - - # Call the batch_create_tasks method. - result = client.batch_create_tasks request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_BatchCreateTasks_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb deleted file mode 100644 index 4e414ecb6e94..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_CreateDeliveryVehicle_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the create_delivery_vehicle call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_delivery_vehicle. -# -def create_delivery_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new - - # Call the create_delivery_vehicle method. - result = client.create_delivery_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_CreateDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb deleted file mode 100644 index 786f6ae89625..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/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 fleetenginedelivery_v1_generated_DeliveryService_CreateTask_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the create_task call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_task. -# -def create_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new - - # Call the create_task method. - result = client.create_task request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_CreateTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb deleted file mode 100644 index 0a42a3ea4d16..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the delete_delivery_vehicle call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_delivery_vehicle. -# -def delete_delivery_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new - - # Call the delete_delivery_vehicle method. - result = client.delete_delivery_vehicle request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb deleted file mode 100644 index 7839b4fc3aa0..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/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 fleetenginedelivery_v1_generated_DeliveryService_DeleteTask_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the delete_task call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_task. -# -def delete_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::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 fleetenginedelivery_v1_generated_DeliveryService_DeleteTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb deleted file mode 100644 index ac4be0811ccf..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_GetDeliveryVehicle_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the get_delivery_vehicle call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_delivery_vehicle. -# -def get_delivery_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new - - # Call the get_delivery_vehicle method. - result = client.get_delivery_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_GetDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb deleted file mode 100644 index 51530e7ea2a7..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_GetTask_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the get_task call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task. -# -def get_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new - - # Call the get_task method. - result = client.get_task request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_GetTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb deleted file mode 100644 index 50c6fcfcbe4c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_GetTaskTrackingInfo_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the get_task_tracking_info call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task_tracking_info. -# -def get_task_tracking_info - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new - - # Call the get_task_tracking_info method. - result = client.get_task_tracking_info request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_GetTaskTrackingInfo_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb deleted file mode 100644 index 06025d2f85f2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.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 fleetenginedelivery_v1_generated_DeliveryService_ListDeliveryVehicles_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the list_delivery_vehicles call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_delivery_vehicles. -# -def list_delivery_vehicles - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new - - # Call the list_delivery_vehicles method. - result = client.list_delivery_vehicles request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - p item - end -end -# [END fleetenginedelivery_v1_generated_DeliveryService_ListDeliveryVehicles_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb deleted file mode 100644 index f5751c045373..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_ListTasks_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the list_tasks call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_tasks. -# -def list_tasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new - - # Call the list_tasks method. - result = client.list_tasks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::Task. - p item - end -end -# [END fleetenginedelivery_v1_generated_DeliveryService_ListTasks_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb deleted file mode 100644 index 54d6bfef390a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the update_delivery_vehicle call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_delivery_vehicle. -# -def update_delivery_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new - - # Call the update_delivery_vehicle method. - result = client.update_delivery_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb deleted file mode 100644 index 6413dfeaa315..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_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 fleetenginedelivery_v1_generated_DeliveryService_UpdateTask_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the update_task call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_task. -# -def update_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new - - # Call the update_task method. - result = client.update_task request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_UpdateTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json deleted file mode 100644 index 7abad3f98118..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json +++ /dev/null @@ -1,495 +0,0 @@ -{ - "client_library": { - "name": "google-maps-fleet_engine-delivery-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "maps.fleetengine.delivery.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_CreateDeliveryVehicle_sync", - "title": "Snippet for the create_delivery_vehicle call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_delivery_vehicle.", - "file": "delivery_service/create_delivery_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_delivery_vehicle", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_delivery_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "CreateDeliveryVehicle", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.CreateDeliveryVehicle", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_GetDeliveryVehicle_sync", - "title": "Snippet for the get_delivery_vehicle call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_delivery_vehicle.", - "file": "delivery_service/get_delivery_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_delivery_vehicle", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_delivery_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "GetDeliveryVehicle", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.GetDeliveryVehicle", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync", - "title": "Snippet for the delete_delivery_vehicle call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_delivery_vehicle.", - "file": "delivery_service/delete_delivery_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_delivery_vehicle", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_delivery_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "DeleteDeliveryVehicle", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.DeleteDeliveryVehicle", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync", - "title": "Snippet for the update_delivery_vehicle call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_delivery_vehicle.", - "file": "delivery_service/update_delivery_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_delivery_vehicle", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_delivery_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "UpdateDeliveryVehicle", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.UpdateDeliveryVehicle", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_BatchCreateTasks_sync", - "title": "Snippet for the batch_create_tasks call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#batch_create_tasks.", - "file": "delivery_service/batch_create_tasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_create_tasks", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#batch_create_tasks", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "BatchCreateTasks", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.BatchCreateTasks", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_CreateTask_sync", - "title": "Snippet for the create_task call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_task.", - "file": "delivery_service/create_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_task", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_task", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::Task", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "CreateTask", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.CreateTask", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_GetTask_sync", - "title": "Snippet for the get_task call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task.", - "file": "delivery_service/get_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_task", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::Task", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "GetTask", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.GetTask", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_DeleteTask_sync", - "title": "Snippet for the delete_task call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_task.", - "file": "delivery_service/delete_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_task", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_task", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "DeleteTask", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.DeleteTask", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_UpdateTask_sync", - "title": "Snippet for the update_task call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_task.", - "file": "delivery_service/update_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_task", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_task", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::Task", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "UpdateTask", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.UpdateTask", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_ListTasks_sync", - "title": "Snippet for the list_tasks call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_tasks.", - "file": "delivery_service/list_tasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tasks", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_tasks", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "ListTasks", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.ListTasks", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_GetTaskTrackingInfo_sync", - "title": "Snippet for the get_task_tracking_info call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task_tracking_info.", - "file": "delivery_service/get_task_tracking_info.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_task_tracking_info", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task_tracking_info", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "GetTaskTrackingInfo", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.GetTaskTrackingInfo", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_ListDeliveryVehicles_sync", - "title": "Snippet for the list_delivery_vehicles call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_delivery_vehicles.", - "file": "delivery_service/list_delivery_vehicles.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_delivery_vehicles", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_delivery_vehicles", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "ListDeliveryVehicles", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.ListDeliveryVehicles", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "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-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb deleted file mode 100644 index 8d3d04d6c721..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/maps/fleet_engine/delivery/v1/delivery_service" - -class ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.delivery_vehicle_path provider: "value0", vehicle: "value1" - assert_equal "providers/value0/deliveryVehicles/value1", path - end - end - - def test_provider_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.provider_path provider: "value0" - assert_equal "providers/value0", 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::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.task_path provider: "value0", task: "value1" - assert_equal "providers/value0/tasks/value1", path - end - end - - def test_task_tracking_info_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.task_tracking_info_path provider: "value0", tracking: "value1" - assert_equal "providers/value0/taskTrackingInfo/value1", path - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb deleted file mode 100644 index 25979e7477bb..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb +++ /dev/null @@ -1,773 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/maps/fleetengine/delivery/v1/delivery_api_pb" -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" - - -class ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - delivery_vehicle_id = "hello world" - delivery_vehicle = {} - - create_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_create_delivery_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_delivery_vehicle_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_delivery_vehicle header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_delivery_vehicle_client_stub.call_count - end - end - end - - def test_get_delivery_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_get_delivery_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_delivery_vehicle_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_delivery_vehicle({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_delivery_vehicle header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_delivery_vehicle({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_delivery_vehicle_client_stub.call_count - end - end - end - - def test_delete_delivery_vehicle - # 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. - header = {} - name = "hello world" - - delete_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_delete_delivery_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_delivery_vehicle_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_delivery_vehicle({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_delivery_vehicle header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_delivery_vehicle({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_delivery_vehicle_client_stub.call_count - end - end - end - - def test_update_delivery_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - delivery_vehicle = {} - update_mask = {} - - update_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_update_delivery_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_delivery_vehicle_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_delivery_vehicle header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_delivery_vehicle_client_stub.call_count - end - end - end - - def test_batch_create_tasks - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - requests = [{}] - - batch_create_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::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_batch_create_tasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_create_tasks_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_create_tasks({ header: header, parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_create_tasks header: header, parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_create_tasks ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_create_tasks({ header: header, parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_create_tasks(::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_create_tasks_client_stub.call_count - end - end - end - - def test_create_task - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - task_id = "hello world" - task = {} - - 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::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_create_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_task_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_task({ header: header, parent: parent, task_id: task_id, task: task }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_task header: header, parent: parent, task_id: task_id, task: task do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_task ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_task({ header: header, parent: parent, task_id: task_id, task: task }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_task(::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task), 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_get_task - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_task_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_task({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_task header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_task ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_task({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_task(::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_count - end - end - end - - def test_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. - header = {} - 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::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_delete_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_task({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_task header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_task ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_task({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_task(::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, 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_update_task - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - task = {} - update_mask = {} - - update_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_update_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_task_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_task({ header: header, task: task, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_task header: header, task: task, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_task ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_task({ header: header, task: task, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_task(::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_task_client_stub.call_count - end - end - end - - def test_list_tasks - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "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::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_tasks({ header: header, 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_tasks header: header, 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_tasks ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, 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_tasks({ header: header, 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_tasks(::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, 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_tasks_client_stub.call_count - end - end - end - - def test_get_task_tracking_info - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_task_tracking_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_get_task_tracking_info_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_task_tracking_info_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_task_tracking_info({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_task_tracking_info header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_task_tracking_info ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_task_tracking_info({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_task_tracking_info(::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_task_tracking_info_client_stub.call_count - end - end - end - - def test_list_delivery_vehicles - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - viewport = {} - - list_delivery_vehicles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_list_delivery_vehicles_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_delivery_vehicles_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_delivery_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_delivery_vehicles ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_delivery_vehicles(::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_delivery_vehicles_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::Maps::FleetEngine::Delivery::V1::DeliveryService::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::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb deleted file mode 100644 index 6002c5acf6f7..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb +++ /dev/null @@ -1,862 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/maps/fleetengine/delivery/v1/delivery_api_pb" -require "google/maps/fleet_engine/delivery/v1/delivery_service" - -class ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - delivery_vehicle_id = "hello world" - delivery_vehicle = {} - - create_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_delivery_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["delivery_vehicle_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle), request["delivery_vehicle"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_delivery_vehicle_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_delivery_vehicle header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_delivery_vehicle_client_stub.call_rpc_count - end - end - - def test_get_delivery_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_delivery_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_delivery_vehicle_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_delivery_vehicle({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_delivery_vehicle header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_delivery_vehicle({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_delivery_vehicle_client_stub.call_rpc_count - end - end - - def test_delete_delivery_vehicle - # 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. - header = {} - name = "hello world" - - delete_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_delivery_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_delivery_vehicle_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_delivery_vehicle({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_delivery_vehicle header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_delivery_vehicle({ header: header, 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_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, 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_delivery_vehicle_client_stub.call_rpc_count - end - end - - def test_update_delivery_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - delivery_vehicle = {} - update_mask = {} - - update_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_delivery_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle), request["delivery_vehicle"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_delivery_vehicle_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_delivery_vehicle header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, 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_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, 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_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, 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_delivery_vehicle_client_stub.call_rpc_count - end - end - - def test_batch_create_tasks - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - requests = [{}] - - batch_create_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_create_tasks, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_create_tasks_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_create_tasks({ header: header, parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_create_tasks header: header, parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_create_tasks ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_create_tasks({ header: header, parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_create_tasks(::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_create_tasks_client_stub.call_rpc_count - end - end - - def test_create_task - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - task_id = "hello world" - task = {} - - create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_task, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["task_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::Task), request["task"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_task_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_task({ header: header, parent: parent, task_id: task_id, task: task }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_task header: header, parent: parent, task_id: task_id, task: task do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_task ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_task({ header: header, parent: parent, task_id: task_id, task: task }, 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::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task), 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_get_task - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_task, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_task_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_task({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_task header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_task ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_task({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_task(::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_rpc_count - end - end - - def test_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. - header = {} - 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::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_task_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_task({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_task header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_task ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_task({ header: header, 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::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, 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_update_task - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - task = {} - update_mask = {} - - update_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_task, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::Task), request["task"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_task_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_task({ header: header, task: task, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_task header: header, task: task, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_task ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, 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_task({ header: header, task: task, 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_task(::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, 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_task_client_stub.call_rpc_count - end - end - - def test_list_tasks - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "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::Maps::FleetEngine::Delivery::V1::ListTasksRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - 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_tasks_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_tasks({ header: header, 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_tasks header: header, 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_tasks ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, 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_tasks({ header: header, 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_tasks(::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, 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_tasks_client_stub.call_rpc_count - end - end - - def test_get_task_tracking_info - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_task_tracking_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_task_tracking_info, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_task_tracking_info_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_task_tracking_info({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_task_tracking_info header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_task_tracking_info ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_task_tracking_info({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_task_tracking_info(::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_task_tracking_info_client_stub.call_rpc_count - end - end - - def test_list_delivery_vehicles - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - viewport = {} - - list_delivery_vehicles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_delivery_vehicles, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - 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 Gapic::Protobuf.coerce({}, to: ::Google::Geo::Type::Viewport), request["viewport"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_delivery_vehicles_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_delivery_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_delivery_vehicles ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_delivery_vehicles(::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_delivery_vehicles_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::Maps::FleetEngine::Delivery::V1::DeliveryService::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::Maps::FleetEngine::Delivery::V1::DeliveryService::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::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-v1/.gitignore b/owl-bot-staging/google-maps-fleet_engine-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/.repo-metadata.json b/owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json deleted file mode 100644 index 4592d201ad59..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "fleetengine.googleapis.com", - "api_shortname": "fleetengine", - "client_documentation": "https://rubydoc.info/gems/google-maps-fleet_engine-v1", - "distribution_name": "google-maps-fleet_engine-v1", - "is_cloud": false, - "language": "ruby", - "name": "fleetengine", - "name_pretty": "Local Rides and Deliveries V1 API", - "product_documentation": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml b/owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml deleted file mode 100644 index 50b9b02eb455..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-maps-fleet_engine-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-maps-fleet_engine-v1.rb" diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/.toys.rb b/owl-bot-staging/google-maps-fleet_engine-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/.yardopts b/owl-bot-staging/google-maps-fleet_engine-v1/.yardopts deleted file mode 100644 index 53681741a35c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Local Rides and Deliveries 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-maps-fleet_engine-v1/AUTHENTICATION.md b/owl-bot-staging/google-maps-fleet_engine-v1/AUTHENTICATION.md deleted file mode 100644 index 934462c35216..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-maps-fleet_engine-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-maps-fleet_engine-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/maps/fleet_engine/v1" - -client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/maps/fleet_engine/v1" - -::Google::Maps::FleetEngine::V1::TripService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine-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/maps/fleet_engine/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine-v1/CHANGELOG.md b/owl-bot-staging/google-maps-fleet_engine-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/Gemfile b/owl-bot-staging/google-maps-fleet_engine-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/LICENSE.md b/owl-bot-staging/google-maps-fleet_engine-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/README.md b/owl-bot-staging/google-maps-fleet_engine-v1/README.md deleted file mode 100644 index d5cb1b51c0ec..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Local Rides and Deliveries V1 API - -Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. - -Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Local Rides and Deliveries V1 API. Most users should consider using -the main client gem, -[google-maps-fleet_engine](https://rubygems.org/gems/google-maps-fleet_engine). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-maps-fleet_engine-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/fleetengine.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/maps/fleet_engine/v1" - -client = ::Google::Maps::FleetEngine::V1::TripService::Client.new -request = ::Google::Maps::FleetEngine::V1::CreateTripRequest.new # (request fields as keyword arguments...) -response = client.create_trip request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-maps-fleet_engine-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/maps/documentation/transportation-logistics/mobility) -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/maps/fleet_engine/v1" -require "logger" - -client = ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine`, -and lower-level _versioned_ client libraries with names such as -`google-maps-fleet_engine-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-maps-fleet_engine`. -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-maps-fleet_engine-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-maps-fleet_engine-v1/Rakefile b/owl-bot-staging/google-maps-fleet_engine-v1/Rakefile deleted file mode 100644 index 3919676d82cf..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-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/maps/fleet_engine/v1/trip_service/credentials" - ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-maps-fleet_engine-v1" - header "google-maps-fleet_engine-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-maps-fleet_engine-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-v1/gapic_metadata.json b/owl-bot-staging/google-maps-fleet_engine-v1/gapic_metadata.json deleted file mode 100644 index 0bdd51b5c575..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/gapic_metadata.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "maps.fleetengine.v1", - "libraryPackage": "::Google::Maps::FleetEngine::V1", - "services": { - "TripService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Maps::FleetEngine::V1::TripService::Client", - "rpcs": { - "CreateTrip": { - "methods": [ - "create_trip" - ] - }, - "GetTrip": { - "methods": [ - "get_trip" - ] - }, - "DeleteTrip": { - "methods": [ - "delete_trip" - ] - }, - "ReportBillableTrip": { - "methods": [ - "report_billable_trip" - ] - }, - "SearchTrips": { - "methods": [ - "search_trips" - ] - }, - "UpdateTrip": { - "methods": [ - "update_trip" - ] - } - } - } - } - }, - "VehicleService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Maps::FleetEngine::V1::VehicleService::Client", - "rpcs": { - "CreateVehicle": { - "methods": [ - "create_vehicle" - ] - }, - "GetVehicle": { - "methods": [ - "get_vehicle" - ] - }, - "DeleteVehicle": { - "methods": [ - "delete_vehicle" - ] - }, - "UpdateVehicle": { - "methods": [ - "update_vehicle" - ] - }, - "UpdateVehicleAttributes": { - "methods": [ - "update_vehicle_attributes" - ] - }, - "ListVehicles": { - "methods": [ - "list_vehicles" - ] - }, - "SearchVehicles": { - "methods": [ - "search_vehicles" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec b/owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec deleted file mode 100644 index b3ca75b30403..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/maps/fleet_engine/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-maps-fleet_engine-v1" - gem.version = Google::Maps::FleetEngine::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine instead. See the readme for more details." - gem.summary = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms." - 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-geo-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb deleted file mode 100644 index d09ab3bdc03a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-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/maps/fleet_engine/v1" diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb deleted file mode 100644 index b9e04593edfe..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/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/maps/fleet_engine/v1/trip_service" -require "google/maps/fleet_engine/v1/vehicle_service" -require "google/maps/fleet_engine/v1/version" - -module Google - module Maps - module FleetEngine - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/maps/fleet_engine/v1" - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/maps/fleet_engine/v1" - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/maps/fleet_engine/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb deleted file mode 100644 index a0010e1c40d9..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/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/maps/fleet_engine/v1/trip_service/rest" -require "google/maps/fleet_engine/v1/vehicle_service/rest" -require "google/maps/fleet_engine/v1/version" - -module Google - module Maps - module FleetEngine - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/maps/fleet_engine/v1/rest" - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb deleted file mode 100644 index cb3cd45ab109..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_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/maps/fleet_engine/v1/version" - -require "google/maps/fleet_engine/v1/trip_service/credentials" -require "google/maps/fleet_engine/v1/trip_service/paths" -require "google/maps/fleet_engine/v1/trip_service/client" -require "google/maps/fleet_engine/v1/trip_service/rest" - -module Google - module Maps - module FleetEngine - module V1 - ## - # Trip management service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/maps/fleet_engine/v1/trip_service" - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/maps/fleet_engine/v1/trip_service/rest" - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - module TripService - end - end - end - end -end - -helper_path = ::File.join __dir__, "trip_service", "helpers.rb" -require "google/maps/fleet_engine/v1/trip_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb deleted file mode 100644 index ab9e5be6d941..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb +++ /dev/null @@ -1,1151 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/maps/fleetengine/v1/trip_api_pb" - -module Google - module Maps - module FleetEngine - module V1 - module TripService - ## - # Client for the TripService service. - # - # Trip management service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :trip_service_stub - - ## - # Configure the TripService Client class. - # - # See {::Google::Maps::FleetEngine::V1::TripService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TripService clients - # ::Google::Maps::FleetEngine::V1::TripService::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", "Maps", "FleetEngine", "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_trip.timeout = 15.0 - default_config.rpcs.create_trip.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_trip.timeout = 15.0 - default_config.rpcs.get_trip.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_trips.timeout = 15.0 - default_config.rpcs.search_trips.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_trip.timeout = 15.0 - default_config.rpcs.update_trip.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TripService 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::Maps::FleetEngine::V1::TripService::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 - @trip_service_stub.universe_domain - end - - ## - # Create a new TripService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TripService 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/maps/fleetengine/v1/trip_api_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 - - @trip_service_stub = ::Gapic::ServiceStub.new( - ::Google::Maps::FleetEngine::V1::TripService::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 - ) - - @trip_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 - @trip_service_stub.logger - end - - # Service calls - - ## - # Creates a trip in the Fleet Engine and returns the new trip. - # - # @overload create_trip(request, options = nil) - # Pass arguments to `create_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::CreateTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::CreateTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_trip(header: nil, parent: nil, trip_id: nil, trip: nil) - # Pass arguments to `create_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param trip_id [::String] - # Required. Unique Trip ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] - # Required. Trip entity to create. - # - # When creating a Trip, the following fields are required: - # - # * `trip_type` - # * `pickup_point` - # - # The following fields are used if you provide them: - # - # * `number_of_passengers` - # * `vehicle_id` - # * `dropoff_point` - # * `intermediate_destinations` - # * `vehicle_waypoints` - # - # All other Trip fields are ignored. For example, all trips start with a - # `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in - # the creation request. - # - # Only `EXCLUSIVE` trips support `intermediate_destinations`. - # - # When `vehicle_id` is set for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints for the vehicle, otherwise the waypoint order will be - # undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::CreateTripRequest.new - # - # # Call the create_trip method. - # result = client.create_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def create_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateTripRequest - - # Converts hash and nil to 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_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_trip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :create_trip, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get information about a single trip. - # - # @overload get_trip(request, options = nil) - # Pass arguments to `get_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::GetTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::GetTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_trip(header: nil, name: nil, view: nil, current_route_segment_version: nil, remaining_waypoints_version: nil, route_format_type: nil, current_route_segment_traffic_version: nil, remaining_waypoints_route_version: nil) - # Pass arguments to `get_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param view [::Google::Maps::FleetEngine::V1::TripView] - # The subset of Trip fields that should be returned and their interpretation. - # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which `Trip.route` or - # `Trip.current_route_segment` data are retrieved. If route data are - # unchanged since this timestamp, the route field is not set in the response. - # If a minimum is unspecified, the route data are always retrieved. - # @param remaining_waypoints_version [::Google::Protobuf::Timestamp, ::Hash] - # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use - # `remaining_waypoints_route_version` to control when - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. - # @param route_format_type [::Google::Maps::FleetEngine::V1::PolylineFormatType] - # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), - # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default - # is `LAT_LNG_LIST_TYPE`. - # @param current_route_segment_traffic_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.current_route_segment_traffic` is retrieved. If traffic data are - # unchanged since this timestamp, the `current_route_segment_traffic` field - # is not set in the response. If a minimum is unspecified, the traffic data - # are always retrieved. Note that traffic is only available for On-Demand - # Rides and Deliveries Solution customers. - # @param remaining_waypoints_route_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are - # unchanged since this timestamp, the fields above are - # not set in the response. If `remaining_waypoints_route_version` is - # unspecified, traffic and path are always retrieved. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::GetTripRequest.new - # - # # Call the get_trip method. - # result = client.get_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def get_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_trip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :get_trip, request, 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 Trip. - # - # Returns FAILED_PRECONDITION if the Trip is active and assigned to a - # vehicle. - # - # @overload delete_trip(request, options = nil) - # Pass arguments to `delete_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::DeleteTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::DeleteTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_trip(header: nil, name: nil) - # Pass arguments to `delete_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # Optional. The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # - # @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/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::DeleteTripRequest.new - # - # # Call the delete_trip method. - # result = client.delete_trip request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_trip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :delete_trip, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Report billable trip usage. - # - # @overload report_billable_trip(request, options = nil) - # Pass arguments to `report_billable_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::ReportBillableTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload report_billable_trip(name: nil, country_code: nil, platform: nil, related_ids: nil, solution_type: nil) - # Pass arguments to `report_billable_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/billableTrips/{billable_trip}`. The - # provider must be the Project ID (for example, `sample-cloud-project`) of - # the Google Cloud Project of which the service account making this call is a - # member. - # @param country_code [::String] - # Required. Two letter country code of the country where the trip takes - # place. Price is defined according to country code. - # @param platform [::Google::Maps::FleetEngine::V1::BillingPlatformIdentifier] - # The platform upon which the request was issued. - # @param related_ids [::Array<::String>] - # The identifiers that are directly related to the trip being reported. These - # are usually IDs (for example, session IDs) of pre-booking operations done - # before the trip ID is available. The number of `related_ids` is - # limited to 50. - # @param solution_type [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest::SolutionType] - # The type of GMP product solution (for example, - # `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip. - # - # @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/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new - # - # # Call the report_billable_trip method. - # result = client.report_billable_trip request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def report_billable_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.report_billable_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.report_billable_trip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.report_billable_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :report_billable_trip, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get all the trips for a specific vehicle. - # - # @overload search_trips(request, options = nil) - # Pass arguments to `search_trips` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::SearchTripsRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::SearchTripsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trips(header: nil, parent: nil, vehicle_id: nil, active_trips_only: nil, page_size: nil, page_token: nil, minimum_staleness: nil) - # Pass arguments to `search_trips` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle_id [::String] - # The vehicle associated with the trips in the request. If unspecified, the - # returned trips do not contain: - # - # * `current_route_segment` - # * `remaining_waypoints` - # * `remaining_distance_meters` - # * `eta_to_first_waypoint` - # @param active_trips_only [::Boolean] - # If set to true, the response includes Trips that influence a driver's - # route. - # @param page_size [::Integer] - # If not set, the server decides the number of results to return. - # @param page_token [::String] - # Set this to a value previously returned in the `SearchTripsResponse` to - # continue from previous results. - # @param minimum_staleness [::Google::Protobuf::Duration, ::Hash] - # If specified, returns the trips that have not been updated after the time - # `(current - minimum_staleness)`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::SearchTripsRequest.new - # - # # Call the search_trips method. - # result = client.search_trips request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::V1::Trip. - # p item - # end - # - def search_trips request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchTripsRequest - - # Converts hash and nil to 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_trips.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_trips.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_trips.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :search_trips, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @trip_service_stub, :search_trips, 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 trip data. - # - # @overload update_trip(request, options = nil) - # Pass arguments to `update_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_trip(header: nil, name: nil, trip: nil, update_mask: nil) - # Pass arguments to `update_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/trips/{trip}`. The provider must - # be the Project ID (for example, `sample-consumer-project`) of the Google - # Cloud Project of which the service account making this call is a member. - # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] - # Required. The Trip associated with the update. - # - # The following fields are maintained by the Fleet Engine. Do not update - # them using Trip.update. - # - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_traffic` - # * `current_route_segment_traffic_version` - # * `current_route_segment_version` - # * `dropoff_time` - # * `eta_to_next_waypoint` - # * `intermediate_destinations_version` - # * `last_location` - # * `name` - # * `number_of_passengers` - # * `pickup_time` - # * `remaining_distance_meters` - # * `remaining_time_to_first_waypoint` - # * `remaining_waypoints` - # * `remaining_waypoints_version` - # * `route` - # - # When you update the `Trip.vehicle_id` for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints, otherwise the order will be undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - # - # To avoid a race condition for trips with multiple destinations, you - # should provide `Trip.intermediate_destinations_version` when updating - # the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The - # `Trip.intermediate_destinations_version` passed must be consistent with - # Fleet Engine's version. If it isn't, the request fails. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The field mask indicating which fields in Trip to update. - # The `update_mask` must contain at least one field. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateTripRequest.new - # - # # Call the update_trip method. - # result = client.update_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def update_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateTripRequest - - # Converts hash and nil to 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_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_trip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :update_trip, request, 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 TripService API. - # - # This class represents the configuration for TripService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Maps::FleetEngine::V1::TripService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_trip to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::V1::TripService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_trip.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_trip.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Maps::FleetEngine::V1::TripService::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 = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::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 TripService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :create_trip - ## - # RPC-specific configuration for `get_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :get_trip - ## - # RPC-specific configuration for `delete_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_trip - ## - # RPC-specific configuration for `report_billable_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :report_billable_trip - ## - # RPC-specific configuration for `search_trips` - # @return [::Gapic::Config::Method] - # - attr_reader :search_trips - ## - # RPC-specific configuration for `update_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :update_trip - - # @private - def initialize parent_rpcs = nil - create_trip_config = parent_rpcs.create_trip if parent_rpcs.respond_to? :create_trip - @create_trip = ::Gapic::Config::Method.new create_trip_config - get_trip_config = parent_rpcs.get_trip if parent_rpcs.respond_to? :get_trip - @get_trip = ::Gapic::Config::Method.new get_trip_config - delete_trip_config = parent_rpcs.delete_trip if parent_rpcs.respond_to? :delete_trip - @delete_trip = ::Gapic::Config::Method.new delete_trip_config - report_billable_trip_config = parent_rpcs.report_billable_trip if parent_rpcs.respond_to? :report_billable_trip - @report_billable_trip = ::Gapic::Config::Method.new report_billable_trip_config - search_trips_config = parent_rpcs.search_trips if parent_rpcs.respond_to? :search_trips - @search_trips = ::Gapic::Config::Method.new search_trips_config - update_trip_config = parent_rpcs.update_trip if parent_rpcs.respond_to? :update_trip - @update_trip = ::Gapic::Config::Method.new update_trip_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb deleted file mode 100644 index 4377df747ce3..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Maps - module FleetEngine - module V1 - module TripService - # Credentials for the TripService 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-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb deleted file mode 100644 index 7de4a91f901d..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.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 Maps - module FleetEngine - module V1 - module TripService - # Path helper methods for the TripService API. - module Paths - ## - # Create a fully-qualified Trip resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}/trips/{trip}` - # - # @param provider [String] - # @param trip [String] - # - # @return [::String] - def trip_path provider:, trip: - raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" - - "providers/#{provider}/trips/#{trip}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb deleted file mode 100644 index 8f43dcd60e6b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_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/maps/fleet_engine/v1/version" - -require "google/maps/fleet_engine/v1/trip_service/credentials" -require "google/maps/fleet_engine/v1/trip_service/paths" -require "google/maps/fleet_engine/v1/trip_service/rest/client" - -module Google - module Maps - module FleetEngine - module V1 - ## - # Trip management service. - # - # To load this service and instantiate a REST client: - # - # require "google/maps/fleet_engine/v1/trip_service/rest" - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - module TripService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/maps/fleet_engine/v1/trip_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb deleted file mode 100644 index 238a9023ce45..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb +++ /dev/null @@ -1,1060 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/maps/fleetengine/v1/trip_api_pb" -require "google/maps/fleet_engine/v1/trip_service/rest/service_stub" - -module Google - module Maps - module FleetEngine - module V1 - module TripService - module Rest - ## - # REST client for the TripService service. - # - # Trip management service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :trip_service_stub - - ## - # Configure the TripService Client class. - # - # See {::Google::Maps::FleetEngine::V1::TripService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TripService clients - # ::Google::Maps::FleetEngine::V1::TripService::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", "Maps", "FleetEngine", "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_trip.timeout = 15.0 - default_config.rpcs.create_trip.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_trip.timeout = 15.0 - default_config.rpcs.get_trip.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_trips.timeout = 15.0 - default_config.rpcs.search_trips.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_trip.timeout = 15.0 - default_config.rpcs.update_trip.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TripService 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::Maps::FleetEngine::V1::TripService::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 - @trip_service_stub.universe_domain - end - - ## - # Create a new TripService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TripService 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 - - @trip_service_stub = ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @trip_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 - @trip_service_stub.logger - end - - # Service calls - - ## - # Creates a trip in the Fleet Engine and returns the new trip. - # - # @overload create_trip(request, options = nil) - # Pass arguments to `create_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::CreateTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::CreateTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_trip(header: nil, parent: nil, trip_id: nil, trip: nil) - # Pass arguments to `create_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param trip_id [::String] - # Required. Unique Trip ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] - # Required. Trip entity to create. - # - # When creating a Trip, the following fields are required: - # - # * `trip_type` - # * `pickup_point` - # - # The following fields are used if you provide them: - # - # * `number_of_passengers` - # * `vehicle_id` - # * `dropoff_point` - # * `intermediate_destinations` - # * `vehicle_waypoints` - # - # All other Trip fields are ignored. For example, all trips start with a - # `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in - # the creation request. - # - # Only `EXCLUSIVE` trips support `intermediate_destinations`. - # - # When `vehicle_id` is set for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints for the vehicle, otherwise the waypoint order will be - # undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::CreateTripRequest.new - # - # # Call the create_trip method. - # result = client.create_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def create_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateTripRequest - - # Converts hash and nil to an 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_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_trip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.create_trip request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get information about a single trip. - # - # @overload get_trip(request, options = nil) - # Pass arguments to `get_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::GetTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::GetTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_trip(header: nil, name: nil, view: nil, current_route_segment_version: nil, remaining_waypoints_version: nil, route_format_type: nil, current_route_segment_traffic_version: nil, remaining_waypoints_route_version: nil) - # Pass arguments to `get_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param view [::Google::Maps::FleetEngine::V1::TripView] - # The subset of Trip fields that should be returned and their interpretation. - # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which `Trip.route` or - # `Trip.current_route_segment` data are retrieved. If route data are - # unchanged since this timestamp, the route field is not set in the response. - # If a minimum is unspecified, the route data are always retrieved. - # @param remaining_waypoints_version [::Google::Protobuf::Timestamp, ::Hash] - # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use - # `remaining_waypoints_route_version` to control when - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. - # @param route_format_type [::Google::Maps::FleetEngine::V1::PolylineFormatType] - # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), - # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default - # is `LAT_LNG_LIST_TYPE`. - # @param current_route_segment_traffic_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.current_route_segment_traffic` is retrieved. If traffic data are - # unchanged since this timestamp, the `current_route_segment_traffic` field - # is not set in the response. If a minimum is unspecified, the traffic data - # are always retrieved. Note that traffic is only available for On-Demand - # Rides and Deliveries Solution customers. - # @param remaining_waypoints_route_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are - # unchanged since this timestamp, the fields above are - # not set in the response. If `remaining_waypoints_route_version` is - # unspecified, traffic and path are always retrieved. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::GetTripRequest.new - # - # # Call the get_trip method. - # result = client.get_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def get_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_trip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.get_trip request, 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 Trip. - # - # Returns FAILED_PRECONDITION if the Trip is active and assigned to a - # vehicle. - # - # @overload delete_trip(request, options = nil) - # Pass arguments to `delete_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::DeleteTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::DeleteTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_trip(header: nil, name: nil) - # Pass arguments to `delete_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # Optional. The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @yield [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/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::DeleteTripRequest.new - # - # # Call the delete_trip method. - # result = client.delete_trip request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_trip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.delete_trip request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Report billable trip usage. - # - # @overload report_billable_trip(request, options = nil) - # Pass arguments to `report_billable_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::ReportBillableTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload report_billable_trip(name: nil, country_code: nil, platform: nil, related_ids: nil, solution_type: nil) - # Pass arguments to `report_billable_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/billableTrips/{billable_trip}`. The - # provider must be the Project ID (for example, `sample-cloud-project`) of - # the Google Cloud Project of which the service account making this call is a - # member. - # @param country_code [::String] - # Required. Two letter country code of the country where the trip takes - # place. Price is defined according to country code. - # @param platform [::Google::Maps::FleetEngine::V1::BillingPlatformIdentifier] - # The platform upon which the request was issued. - # @param related_ids [::Array<::String>] - # The identifiers that are directly related to the trip being reported. These - # are usually IDs (for example, session IDs) of pre-booking operations done - # before the trip ID is available. The number of `related_ids` is - # limited to 50. - # @param solution_type [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest::SolutionType] - # The type of GMP product solution (for example, - # `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip. - # @yield [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/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new - # - # # Call the report_billable_trip method. - # result = client.report_billable_trip request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def report_billable_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.report_billable_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.report_billable_trip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.report_billable_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.report_billable_trip request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get all the trips for a specific vehicle. - # - # @overload search_trips(request, options = nil) - # Pass arguments to `search_trips` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::SearchTripsRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::SearchTripsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trips(header: nil, parent: nil, vehicle_id: nil, active_trips_only: nil, page_size: nil, page_token: nil, minimum_staleness: nil) - # Pass arguments to `search_trips` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle_id [::String] - # The vehicle associated with the trips in the request. If unspecified, the - # returned trips do not contain: - # - # * `current_route_segment` - # * `remaining_waypoints` - # * `remaining_distance_meters` - # * `eta_to_first_waypoint` - # @param active_trips_only [::Boolean] - # If set to true, the response includes Trips that influence a driver's - # route. - # @param page_size [::Integer] - # If not set, the server decides the number of results to return. - # @param page_token [::String] - # Set this to a value previously returned in the `SearchTripsResponse` to - # continue from previous results. - # @param minimum_staleness [::Google::Protobuf::Duration, ::Hash] - # If specified, returns the trips that have not been updated after the time - # `(current - minimum_staleness)`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::SearchTripsRequest.new - # - # # Call the search_trips method. - # result = client.search_trips request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::V1::Trip. - # p item - # end - # - def search_trips request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchTripsRequest - - # Converts hash and nil to an 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_trips.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_trips.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_trips.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.search_trips request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @trip_service_stub, :search_trips, "trips", request, result, 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 trip data. - # - # @overload update_trip(request, options = nil) - # Pass arguments to `update_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_trip(header: nil, name: nil, trip: nil, update_mask: nil) - # Pass arguments to `update_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/trips/{trip}`. The provider must - # be the Project ID (for example, `sample-consumer-project`) of the Google - # Cloud Project of which the service account making this call is a member. - # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] - # Required. The Trip associated with the update. - # - # The following fields are maintained by the Fleet Engine. Do not update - # them using Trip.update. - # - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_traffic` - # * `current_route_segment_traffic_version` - # * `current_route_segment_version` - # * `dropoff_time` - # * `eta_to_next_waypoint` - # * `intermediate_destinations_version` - # * `last_location` - # * `name` - # * `number_of_passengers` - # * `pickup_time` - # * `remaining_distance_meters` - # * `remaining_time_to_first_waypoint` - # * `remaining_waypoints` - # * `remaining_waypoints_version` - # * `route` - # - # When you update the `Trip.vehicle_id` for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints, otherwise the order will be undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - # - # To avoid a race condition for trips with multiple destinations, you - # should provide `Trip.intermediate_destinations_version` when updating - # the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The - # `Trip.intermediate_destinations_version` passed must be consistent with - # Fleet Engine's version. If it isn't, the request fails. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The field mask indicating which fields in Trip to update. - # The `update_mask` must contain at least one field. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateTripRequest.new - # - # # Call the update_trip method. - # result = client.update_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def update_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateTripRequest - - # Converts hash and nil to an 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_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_trip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.update_trip request, 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 TripService REST API. - # - # This class represents the configuration for TripService 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::Maps::FleetEngine::V1::TripService::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_trip to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_trip.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_trip.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::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 TripService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :create_trip - ## - # RPC-specific configuration for `get_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :get_trip - ## - # RPC-specific configuration for `delete_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_trip - ## - # RPC-specific configuration for `report_billable_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :report_billable_trip - ## - # RPC-specific configuration for `search_trips` - # @return [::Gapic::Config::Method] - # - attr_reader :search_trips - ## - # RPC-specific configuration for `update_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :update_trip - - # @private - def initialize parent_rpcs = nil - create_trip_config = parent_rpcs.create_trip if parent_rpcs.respond_to? :create_trip - @create_trip = ::Gapic::Config::Method.new create_trip_config - get_trip_config = parent_rpcs.get_trip if parent_rpcs.respond_to? :get_trip - @get_trip = ::Gapic::Config::Method.new get_trip_config - delete_trip_config = parent_rpcs.delete_trip if parent_rpcs.respond_to? :delete_trip - @delete_trip = ::Gapic::Config::Method.new delete_trip_config - report_billable_trip_config = parent_rpcs.report_billable_trip if parent_rpcs.respond_to? :report_billable_trip - @report_billable_trip = ::Gapic::Config::Method.new report_billable_trip_config - search_trips_config = parent_rpcs.search_trips if parent_rpcs.respond_to? :search_trips - @search_trips = ::Gapic::Config::Method.new search_trips_config - update_trip_config = parent_rpcs.update_trip if parent_rpcs.respond_to? :update_trip - @update_trip = ::Gapic::Config::Method.new update_trip_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb deleted file mode 100644 index 989dd713b15c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb +++ /dev/null @@ -1,451 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/maps/fleetengine/v1/trip_api_pb" - -module Google - module Maps - module FleetEngine - module V1 - module TripService - module Rest - ## - # REST service stub for the TripService 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_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::CreateTripRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # A result object deserialized from the server's reply - def create_trip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_trip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_trip", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Trip.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::GetTripRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # A result object deserialized from the server's reply - def get_trip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_trip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_trip", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Trip.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_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteTripRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_trip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_trip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_trip", - 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 report_billable_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 report_billable_trip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_report_billable_trip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "report_billable_trip", - 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 search_trips REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::SearchTripsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::SearchTripsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::SearchTripsResponse] - # A result object deserialized from the server's reply - def search_trips request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_trips_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_trips", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::SearchTripsResponse.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_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateTripRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # A result object deserialized from the server's reply - def update_trip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_trip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_trip", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Trip.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_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::CreateTripRequest] - # 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_trip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/trips", - body: "trip", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::GetTripRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_trip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/trips/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteTripRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_trip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/trips/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the report_billable_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_report_billable_trip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:report", - body: "*", - matches: [ - ["name", %r{^providers/[^/]+/billableTrips/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_trips REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::SearchTripsRequest] - # 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_trips_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/trips:search", - body: "*", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateTripRequest] - # 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_trip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1/{name}", - body: "trip", - matches: [ - ["name", %r{^providers/[^/]+/trips/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb deleted file mode 100644 index 8a9893ae0e60..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_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/maps/fleet_engine/v1/version" - -require "google/maps/fleet_engine/v1/vehicle_service/credentials" -require "google/maps/fleet_engine/v1/vehicle_service/paths" -require "google/maps/fleet_engine/v1/vehicle_service/client" -require "google/maps/fleet_engine/v1/vehicle_service/rest" - -module Google - module Maps - module FleetEngine - module V1 - ## - # Vehicle management service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/maps/fleet_engine/v1/vehicle_service" - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/maps/fleet_engine/v1/vehicle_service/rest" - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - module VehicleService - end - end - end - end -end - -helper_path = ::File.join __dir__, "vehicle_service", "helpers.rb" -require "google/maps/fleet_engine/v1/vehicle_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb deleted file mode 100644 index 9f81723b1bcf..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb +++ /dev/null @@ -1,1461 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/maps/fleetengine/v1/vehicle_api_pb" - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - ## - # Client for the VehicleService service. - # - # Vehicle management service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :vehicle_service_stub - - ## - # Configure the VehicleService Client class. - # - # See {::Google::Maps::FleetEngine::V1::VehicleService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VehicleService clients - # ::Google::Maps::FleetEngine::V1::VehicleService::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", "Maps", "FleetEngine", "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_vehicle.timeout = 15.0 - default_config.rpcs.create_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_vehicle.timeout = 15.0 - default_config.rpcs.get_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_vehicle.timeout = 15.0 - default_config.rpcs.update_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_vehicle_attributes.timeout = 15.0 - default_config.rpcs.update_vehicle_attributes.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_vehicles.timeout = 15.0 - default_config.rpcs.search_vehicles.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the VehicleService 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::Maps::FleetEngine::V1::VehicleService::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 - @vehicle_service_stub.universe_domain - end - - ## - # Create a new VehicleService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VehicleService 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/maps/fleetengine/v1/vehicle_api_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 - - @vehicle_service_stub = ::Gapic::ServiceStub.new( - ::Google::Maps::FleetEngine::V1::VehicleService::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 - ) - - @vehicle_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 - @vehicle_service_stub.logger - end - - # Service calls - - ## - # Instantiates a new vehicle associated with an on-demand rideshare or - # deliveries provider. Each `Vehicle` must have a unique vehicle ID. - # - # The following `Vehicle` fields are required when creating a `Vehicle`: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # The following `Vehicle` fields are ignored when creating a `Vehicle`: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - # - # @overload create_vehicle(request, options = nil) - # Pass arguments to `create_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::CreateVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::CreateVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_vehicle(header: nil, parent: nil, vehicle_id: nil, vehicle: nil) - # Pass arguments to `create_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle_id [::String] - # Required. Unique Vehicle ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] - # Required. The Vehicle entity to create. When creating a Vehicle, the - # following fields are required: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # When creating a Vehicle, the following fields are ignored: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::CreateVehicleRequest.new - # - # # Call the create_vehicle method. - # result = client.create_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def create_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateVehicleRequest - - # Converts hash and nil to 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_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :create_vehicle, request, 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 vehicle from the Fleet Engine. - # - # @overload get_vehicle(request, options = nil) - # Pass arguments to `get_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::GetVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::GetVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_vehicle(header: nil, name: nil, current_route_segment_version: nil, waypoints_version: nil) - # Pass arguments to `get_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Vehicle.current_route_segment` is retrieved. - # If the route is unchanged since this timestamp, the `current_route_segment` - # field is not set in the response. If a minimum is unspecified, the - # `current_route_segment` is always retrieved. - # @param waypoints_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints` - # data is retrieved. If the waypoints are unchanged since this timestamp, the - # `vehicle.waypoints` data is not set in the response. If this field is - # unspecified, `vehicle.waypoints` is always retrieved. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::GetVehicleRequest.new - # - # # Call the get_vehicle method. - # result = client.get_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def get_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :get_vehicle, request, 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 Vehicle from the Fleet Engine. - # - # Returns FAILED_PRECONDITION if the Vehicle has active Trips. - # assigned to it. - # - # @overload delete_vehicle(request, options = nil) - # Pass arguments to `delete_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::DeleteVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_vehicle(header: nil, name: nil) - # Pass arguments to `delete_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # Optional. The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # - # @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/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new - # - # # Call the delete_vehicle method. - # result = client.delete_vehicle request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :delete_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Writes updated vehicle data to the Fleet Engine. - # - # When updating a `Vehicle`, the following fields cannot be updated since - # they are managed by the server: - # - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment_version` - # * `waypoints_version` - # - # The vehicle `name` also cannot be updated. - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. Likewise, - # the `waypoints` field can be updated, but must contain all the waypoints - # currently on the vehicle, and no other waypoints. - # - # @overload update_vehicle(request, options = nil) - # Pass arguments to `update_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_vehicle(header: nil, name: nil, vehicle: nil, update_mask: nil) - # Pass arguments to `update_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] - # Required. The `Vehicle` entity values to apply. When updating a `Vehicle`, - # the following fields may not be updated as they are managed by the - # server. - # - # * `available_capacity` - # * `current_route_segment_version` - # * `current_trips` - # * `name` - # * `waypoints_version` - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. - # - # Likewise, the `waypoints` field can be updated, but must contain all the - # waypoints currently on the vehicle, and no other waypoints. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A field mask indicating which fields of the `Vehicle` to update. - # At least one field name must be provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new - # - # # Call the update_vehicle method. - # result = client.update_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def update_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest - - # Converts hash and nil to 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_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :update_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Partially updates a vehicle's attributes. - # Only the attributes mentioned in the request will be updated, other - # attributes will NOT be altered. Note: this is different in `UpdateVehicle`, - # where the whole `attributes` field will be replaced by the one in - # `UpdateVehicleRequest`, attributes not in the request would be removed. - # - # @overload update_vehicle_attributes(request, options = nil) - # Pass arguments to `update_vehicle_attributes` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_vehicle_attributes(header: nil, name: nil, attributes: nil) - # Pass arguments to `update_vehicle_attributes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] - # Required. The vehicle attributes to update. Unmentioned attributes are not - # altered or removed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new - # - # # Call the update_vehicle_attributes method. - # result = client.update_vehicle_attributes request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse. - # p result - # - def update_vehicle_attributes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest - - # Converts hash and nil to 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_vehicle_attributes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_vehicle_attributes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_vehicle_attributes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :update_vehicle_attributes, request, 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 paginated list of vehicles associated with - # a provider that match the request options. - # - # @overload list_vehicles(request, options = nil) - # Pass arguments to `list_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::ListVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::ListVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_type_categories: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, vehicle_state: nil, on_trip_only: nil, filter: nil, viewport: nil) - # Pass arguments to `list_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param page_size [::Integer] - # The maximum number of vehicles to return. - # Default value: 100. - # @param page_token [::String] - # The value of the `next_page_token` provided by a previous call to - # `ListVehicles` so that you can paginate through groups of vehicles. The - # value is undefined if the filter criteria of the request is not the same as - # the filter criteria for the previous call to `ListVehicles`. - # @param minimum_capacity [::Google::Protobuf::Int32Value, ::Hash] - # Specifies the required minimum capacity of the vehicle. All vehicles - # returned will have a `maximum_capacity` greater than or equal to this - # value. If set, must be greater or equal to 0. - # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Restricts the response to vehicles that support at least one of the - # specified trip types. - # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] - # Restricts the response to vehicles that have sent location updates to Fleet - # Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If present, must be - # a valid positive duration. - # @param vehicle_type_categories [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category>] - # Required. Restricts the response to vehicles with one of the specified type - # categories. `UNKNOWN` is not allowed. - # @param required_attributes [::Array<::String>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the response to vehicles with the specified attributes. This - # field is a conjunction/AND operation. A max of 50 required_attributes is - # allowed. This matches the maximum number of attributes allowed on a - # vehicle. Each repeated string should be of the format "key:value". - # @param required_one_of_attributes [::Array<::String>] - # Restricts the response to vehicles with at least one of the specified - # attributes in each `VehicleAttributeList`. Within each list, a vehicle must - # match at least one of the attributes. This field is an inclusive - # disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # Each repeated string should be of the format - # "key1:value1|key2:value2|key3:value3". - # @param required_one_of_attribute_sets [::Array<::String>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the response to vehicles that match all the attributes in a - # `VehicleAttributeList`. Within each list, a vehicle must match all of the - # attributes. This field is a conjunction/AND operation in each - # `VehicleAttributeList` and inclusive disjunction/OR operation across the - # collection of `VehicleAttributeList`. Each repeated string should be of the - # format "key1:value1|key2:value2|key3:value3". - # @param vehicle_state [::Google::Maps::FleetEngine::V1::VehicleState] - # Restricts the response to vehicles that have this vehicle state. - # @param on_trip_only [::Boolean] - # Only return the vehicles with current trip(s). - # @param filter [::String] - # Optional. A filter query to apply when listing vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `vehicle_state` or `on_trip_only`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # @param viewport [::Google::Geo::Type::Viewport, ::Hash] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::ListVehiclesRequest.new - # - # # Call the list_vehicles method. - # result = client.list_vehicles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::V1::Vehicle. - # p item - # end - # - def list_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ListVehiclesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_vehicles.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :list_vehicles, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @vehicle_service_stub, :list_vehicles, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of vehicles that match the request options. - # - # @overload search_vehicles(request, options = nil) - # Pass arguments to `search_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::SearchVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_vehicles(header: nil, parent: nil, pickup_point: nil, dropoff_point: nil, pickup_radius_meters: nil, count: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_types: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, order_by: nil, include_back_to_back: nil, trip_id: nil, current_trips_present: nil, filter: nil) - # Pass arguments to `search_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param pickup_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] - # Required. The pickup point to search near. - # @param dropoff_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] - # The customer's intended dropoff location. The field is required if - # `trip_types` contains `TripType.SHARED`. - # @param pickup_radius_meters [::Integer] - # Required. Defines the vehicle search radius around the pickup point. Only - # vehicles within the search radius will be returned. Value must be between - # 400 and 10000 meters (inclusive). - # @param count [::Integer] - # Required. Specifies the maximum number of vehicles to return. The value - # must be between 1 and 50 (inclusive). - # @param minimum_capacity [::Integer] - # Required. Specifies the number of passengers being considered for a trip. - # The value must be greater than or equal to one. The driver is not - # considered in the capacity value. - # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Required. Represents the type of proposed trip. Must include exactly one - # type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only - # those vehicles that can support that trip type. - # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] - # Restricts the search to only those vehicles that have sent location updates - # to Fleet Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If this field is not - # set, the server uses five minutes as the default value. - # @param vehicle_types [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType, ::Hash>] - # Required. Restricts the search to vehicles with one of the specified types. - # At least one vehicle type must be specified. VehicleTypes with a category - # of `UNKNOWN` are not allowed. - # @param required_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the search to only those vehicles with the specified attributes. - # This field is a conjunction/AND operation. A max of 50 required_attributes - # is allowed. This matches the maximum number of attributes allowed on a - # vehicle. - # @param required_one_of_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] - # Restricts the search to only those vehicles with at least one of - # the specified attributes in each `VehicleAttributeList`. Within each - # list, a vehicle must match at least one of the attributes. This field is an - # inclusive disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # @param required_one_of_attribute_sets [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the search to only those vehicles with all the attributes in a - # `VehicleAttributeList`. Within each list, a - # vehicle must match all of the attributes. This field is a conjunction/AND - # operation in each `VehicleAttributeList` and inclusive disjunction/OR - # operation across the collection of `VehicleAttributeList`. - # @param order_by [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] - # Required. Specifies the desired ordering criterion for results. - # @param include_back_to_back [::Boolean] - # This indicates if vehicles with a single active trip are eligible for this - # search. This field is only used when `current_trips_present` is - # unspecified. When `current_trips_present` is unspecified and this field - # is `false`, vehicles with assigned trips are excluded from the search - # results. When `current_trips_present` is unspecified and this field is - # `true`, search results can include vehicles with one active trip that has a - # status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified, - # this field cannot be set to true. - # - # The default value is `false`. - # @param trip_id [::String] - # Indicates the trip associated with this `SearchVehicleRequest`. - # @param current_trips_present [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::CurrentTripsPresent] - # This indicates if vehicles with active trips are eligible for this search. - # This must be set to something other than - # `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`. - # @param filter [::String] - # Optional. A filter query to apply when searching vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `minimum_capacity` or `vehicle_types`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new - # - # # Call the search_vehicles method. - # result = client.search_vehicles request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::SearchVehiclesResponse. - # p result - # - def search_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest - - # Converts hash and nil to 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_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_vehicles.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :search_vehicles, request, 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 VehicleService API. - # - # This class represents the configuration for VehicleService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Maps::FleetEngine::V1::VehicleService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_vehicle to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::V1::VehicleService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_vehicle.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_vehicle.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Maps::FleetEngine::V1::VehicleService::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 = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::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 VehicleService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :create_vehicle - ## - # RPC-specific configuration for `get_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vehicle - ## - # RPC-specific configuration for `delete_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_vehicle - ## - # RPC-specific configuration for `update_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vehicle - ## - # RPC-specific configuration for `update_vehicle_attributes` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vehicle_attributes - ## - # RPC-specific configuration for `list_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_vehicles - ## - # RPC-specific configuration for `search_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :search_vehicles - - # @private - def initialize parent_rpcs = nil - create_vehicle_config = parent_rpcs.create_vehicle if parent_rpcs.respond_to? :create_vehicle - @create_vehicle = ::Gapic::Config::Method.new create_vehicle_config - get_vehicle_config = parent_rpcs.get_vehicle if parent_rpcs.respond_to? :get_vehicle - @get_vehicle = ::Gapic::Config::Method.new get_vehicle_config - delete_vehicle_config = parent_rpcs.delete_vehicle if parent_rpcs.respond_to? :delete_vehicle - @delete_vehicle = ::Gapic::Config::Method.new delete_vehicle_config - update_vehicle_config = parent_rpcs.update_vehicle if parent_rpcs.respond_to? :update_vehicle - @update_vehicle = ::Gapic::Config::Method.new update_vehicle_config - update_vehicle_attributes_config = parent_rpcs.update_vehicle_attributes if parent_rpcs.respond_to? :update_vehicle_attributes - @update_vehicle_attributes = ::Gapic::Config::Method.new update_vehicle_attributes_config - list_vehicles_config = parent_rpcs.list_vehicles if parent_rpcs.respond_to? :list_vehicles - @list_vehicles = ::Gapic::Config::Method.new list_vehicles_config - search_vehicles_config = parent_rpcs.search_vehicles if parent_rpcs.respond_to? :search_vehicles - @search_vehicles = ::Gapic::Config::Method.new search_vehicles_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb deleted file mode 100644 index fa225faa2e96..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - # Credentials for the VehicleService 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-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb deleted file mode 100644 index 55fd593ff4b1..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.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 Maps - module FleetEngine - module V1 - module VehicleService - # Path helper methods for the VehicleService API. - module Paths - ## - # Create a fully-qualified Vehicle resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}/vehicles/{vehicle}` - # - # @param provider [String] - # @param vehicle [String] - # - # @return [::String] - def vehicle_path provider:, vehicle: - raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" - - "providers/#{provider}/vehicles/#{vehicle}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb deleted file mode 100644 index c638416560e4..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_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/maps/fleet_engine/v1/version" - -require "google/maps/fleet_engine/v1/vehicle_service/credentials" -require "google/maps/fleet_engine/v1/vehicle_service/paths" -require "google/maps/fleet_engine/v1/vehicle_service/rest/client" - -module Google - module Maps - module FleetEngine - module V1 - ## - # Vehicle management service. - # - # To load this service and instantiate a REST client: - # - # require "google/maps/fleet_engine/v1/vehicle_service/rest" - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - module VehicleService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/maps/fleet_engine/v1/vehicle_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb deleted file mode 100644 index a9298c4b983b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb +++ /dev/null @@ -1,1362 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/maps/fleetengine/v1/vehicle_api_pb" -require "google/maps/fleet_engine/v1/vehicle_service/rest/service_stub" - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - module Rest - ## - # REST client for the VehicleService service. - # - # Vehicle management service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :vehicle_service_stub - - ## - # Configure the VehicleService Client class. - # - # See {::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VehicleService clients - # ::Google::Maps::FleetEngine::V1::VehicleService::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", "Maps", "FleetEngine", "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_vehicle.timeout = 15.0 - default_config.rpcs.create_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_vehicle.timeout = 15.0 - default_config.rpcs.get_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_vehicle.timeout = 15.0 - default_config.rpcs.update_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_vehicle_attributes.timeout = 15.0 - default_config.rpcs.update_vehicle_attributes.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_vehicles.timeout = 15.0 - default_config.rpcs.search_vehicles.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the VehicleService 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::Maps::FleetEngine::V1::VehicleService::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 - @vehicle_service_stub.universe_domain - end - - ## - # Create a new VehicleService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VehicleService 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 - - @vehicle_service_stub = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @vehicle_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 - @vehicle_service_stub.logger - end - - # Service calls - - ## - # Instantiates a new vehicle associated with an on-demand rideshare or - # deliveries provider. Each `Vehicle` must have a unique vehicle ID. - # - # The following `Vehicle` fields are required when creating a `Vehicle`: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # The following `Vehicle` fields are ignored when creating a `Vehicle`: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - # - # @overload create_vehicle(request, options = nil) - # Pass arguments to `create_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::CreateVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::CreateVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_vehicle(header: nil, parent: nil, vehicle_id: nil, vehicle: nil) - # Pass arguments to `create_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle_id [::String] - # Required. Unique Vehicle ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] - # Required. The Vehicle entity to create. When creating a Vehicle, the - # following fields are required: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # When creating a Vehicle, the following fields are ignored: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::CreateVehicleRequest.new - # - # # Call the create_vehicle method. - # result = client.create_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def create_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateVehicleRequest - - # Converts hash and nil to an 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_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.create_vehicle request, 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 vehicle from the Fleet Engine. - # - # @overload get_vehicle(request, options = nil) - # Pass arguments to `get_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::GetVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::GetVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_vehicle(header: nil, name: nil, current_route_segment_version: nil, waypoints_version: nil) - # Pass arguments to `get_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Vehicle.current_route_segment` is retrieved. - # If the route is unchanged since this timestamp, the `current_route_segment` - # field is not set in the response. If a minimum is unspecified, the - # `current_route_segment` is always retrieved. - # @param waypoints_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints` - # data is retrieved. If the waypoints are unchanged since this timestamp, the - # `vehicle.waypoints` data is not set in the response. If this field is - # unspecified, `vehicle.waypoints` is always retrieved. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::GetVehicleRequest.new - # - # # Call the get_vehicle method. - # result = client.get_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def get_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.get_vehicle request, 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 Vehicle from the Fleet Engine. - # - # Returns FAILED_PRECONDITION if the Vehicle has active Trips. - # assigned to it. - # - # @overload delete_vehicle(request, options = nil) - # Pass arguments to `delete_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::DeleteVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_vehicle(header: nil, name: nil) - # Pass arguments to `delete_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # Optional. The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @yield [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/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new - # - # # Call the delete_vehicle method. - # result = client.delete_vehicle request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.delete_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Writes updated vehicle data to the Fleet Engine. - # - # When updating a `Vehicle`, the following fields cannot be updated since - # they are managed by the server: - # - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment_version` - # * `waypoints_version` - # - # The vehicle `name` also cannot be updated. - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. Likewise, - # the `waypoints` field can be updated, but must contain all the waypoints - # currently on the vehicle, and no other waypoints. - # - # @overload update_vehicle(request, options = nil) - # Pass arguments to `update_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_vehicle(header: nil, name: nil, vehicle: nil, update_mask: nil) - # Pass arguments to `update_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] - # Required. The `Vehicle` entity values to apply. When updating a `Vehicle`, - # the following fields may not be updated as they are managed by the - # server. - # - # * `available_capacity` - # * `current_route_segment_version` - # * `current_trips` - # * `name` - # * `waypoints_version` - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. - # - # Likewise, the `waypoints` field can be updated, but must contain all the - # waypoints currently on the vehicle, and no other waypoints. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A field mask indicating which fields of the `Vehicle` to update. - # At least one field name must be provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new - # - # # Call the update_vehicle method. - # result = client.update_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def update_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest - - # Converts hash and nil to an 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_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.update_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Partially updates a vehicle's attributes. - # Only the attributes mentioned in the request will be updated, other - # attributes will NOT be altered. Note: this is different in `UpdateVehicle`, - # where the whole `attributes` field will be replaced by the one in - # `UpdateVehicleRequest`, attributes not in the request would be removed. - # - # @overload update_vehicle_attributes(request, options = nil) - # Pass arguments to `update_vehicle_attributes` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_vehicle_attributes(header: nil, name: nil, attributes: nil) - # Pass arguments to `update_vehicle_attributes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] - # Required. The vehicle attributes to update. Unmentioned attributes are not - # altered or removed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new - # - # # Call the update_vehicle_attributes method. - # result = client.update_vehicle_attributes request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse. - # p result - # - def update_vehicle_attributes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest - - # Converts hash and nil to an 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_vehicle_attributes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_vehicle_attributes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_vehicle_attributes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.update_vehicle_attributes request, 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 paginated list of vehicles associated with - # a provider that match the request options. - # - # @overload list_vehicles(request, options = nil) - # Pass arguments to `list_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::ListVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::ListVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_type_categories: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, vehicle_state: nil, on_trip_only: nil, filter: nil, viewport: nil) - # Pass arguments to `list_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param page_size [::Integer] - # The maximum number of vehicles to return. - # Default value: 100. - # @param page_token [::String] - # The value of the `next_page_token` provided by a previous call to - # `ListVehicles` so that you can paginate through groups of vehicles. The - # value is undefined if the filter criteria of the request is not the same as - # the filter criteria for the previous call to `ListVehicles`. - # @param minimum_capacity [::Google::Protobuf::Int32Value, ::Hash] - # Specifies the required minimum capacity of the vehicle. All vehicles - # returned will have a `maximum_capacity` greater than or equal to this - # value. If set, must be greater or equal to 0. - # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Restricts the response to vehicles that support at least one of the - # specified trip types. - # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] - # Restricts the response to vehicles that have sent location updates to Fleet - # Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If present, must be - # a valid positive duration. - # @param vehicle_type_categories [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category>] - # Required. Restricts the response to vehicles with one of the specified type - # categories. `UNKNOWN` is not allowed. - # @param required_attributes [::Array<::String>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the response to vehicles with the specified attributes. This - # field is a conjunction/AND operation. A max of 50 required_attributes is - # allowed. This matches the maximum number of attributes allowed on a - # vehicle. Each repeated string should be of the format "key:value". - # @param required_one_of_attributes [::Array<::String>] - # Restricts the response to vehicles with at least one of the specified - # attributes in each `VehicleAttributeList`. Within each list, a vehicle must - # match at least one of the attributes. This field is an inclusive - # disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # Each repeated string should be of the format - # "key1:value1|key2:value2|key3:value3". - # @param required_one_of_attribute_sets [::Array<::String>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the response to vehicles that match all the attributes in a - # `VehicleAttributeList`. Within each list, a vehicle must match all of the - # attributes. This field is a conjunction/AND operation in each - # `VehicleAttributeList` and inclusive disjunction/OR operation across the - # collection of `VehicleAttributeList`. Each repeated string should be of the - # format "key1:value1|key2:value2|key3:value3". - # @param vehicle_state [::Google::Maps::FleetEngine::V1::VehicleState] - # Restricts the response to vehicles that have this vehicle state. - # @param on_trip_only [::Boolean] - # Only return the vehicles with current trip(s). - # @param filter [::String] - # Optional. A filter query to apply when listing vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `vehicle_state` or `on_trip_only`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # @param viewport [::Google::Geo::Type::Viewport, ::Hash] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::ListVehiclesRequest.new - # - # # Call the list_vehicles method. - # result = client.list_vehicles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::V1::Vehicle. - # p item - # end - # - def list_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ListVehiclesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_vehicles.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.list_vehicles request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @vehicle_service_stub, :list_vehicles, "vehicles", request, result, 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 vehicles that match the request options. - # - # @overload search_vehicles(request, options = nil) - # Pass arguments to `search_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::SearchVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_vehicles(header: nil, parent: nil, pickup_point: nil, dropoff_point: nil, pickup_radius_meters: nil, count: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_types: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, order_by: nil, include_back_to_back: nil, trip_id: nil, current_trips_present: nil, filter: nil) - # Pass arguments to `search_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param pickup_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] - # Required. The pickup point to search near. - # @param dropoff_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] - # The customer's intended dropoff location. The field is required if - # `trip_types` contains `TripType.SHARED`. - # @param pickup_radius_meters [::Integer] - # Required. Defines the vehicle search radius around the pickup point. Only - # vehicles within the search radius will be returned. Value must be between - # 400 and 10000 meters (inclusive). - # @param count [::Integer] - # Required. Specifies the maximum number of vehicles to return. The value - # must be between 1 and 50 (inclusive). - # @param minimum_capacity [::Integer] - # Required. Specifies the number of passengers being considered for a trip. - # The value must be greater than or equal to one. The driver is not - # considered in the capacity value. - # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Required. Represents the type of proposed trip. Must include exactly one - # type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only - # those vehicles that can support that trip type. - # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] - # Restricts the search to only those vehicles that have sent location updates - # to Fleet Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If this field is not - # set, the server uses five minutes as the default value. - # @param vehicle_types [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType, ::Hash>] - # Required. Restricts the search to vehicles with one of the specified types. - # At least one vehicle type must be specified. VehicleTypes with a category - # of `UNKNOWN` are not allowed. - # @param required_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the search to only those vehicles with the specified attributes. - # This field is a conjunction/AND operation. A max of 50 required_attributes - # is allowed. This matches the maximum number of attributes allowed on a - # vehicle. - # @param required_one_of_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] - # Restricts the search to only those vehicles with at least one of - # the specified attributes in each `VehicleAttributeList`. Within each - # list, a vehicle must match at least one of the attributes. This field is an - # inclusive disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # @param required_one_of_attribute_sets [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the search to only those vehicles with all the attributes in a - # `VehicleAttributeList`. Within each list, a - # vehicle must match all of the attributes. This field is a conjunction/AND - # operation in each `VehicleAttributeList` and inclusive disjunction/OR - # operation across the collection of `VehicleAttributeList`. - # @param order_by [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] - # Required. Specifies the desired ordering criterion for results. - # @param include_back_to_back [::Boolean] - # This indicates if vehicles with a single active trip are eligible for this - # search. This field is only used when `current_trips_present` is - # unspecified. When `current_trips_present` is unspecified and this field - # is `false`, vehicles with assigned trips are excluded from the search - # results. When `current_trips_present` is unspecified and this field is - # `true`, search results can include vehicles with one active trip that has a - # status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified, - # this field cannot be set to true. - # - # The default value is `false`. - # @param trip_id [::String] - # Indicates the trip associated with this `SearchVehicleRequest`. - # @param current_trips_present [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::CurrentTripsPresent] - # This indicates if vehicles with active trips are eligible for this search. - # This must be set to something other than - # `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`. - # @param filter [::String] - # Optional. A filter query to apply when searching vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `minimum_capacity` or `vehicle_types`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new - # - # # Call the search_vehicles method. - # result = client.search_vehicles request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::SearchVehiclesResponse. - # p result - # - def search_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest - - # Converts hash and nil to an 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_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_vehicles.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.search_vehicles request, 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 VehicleService REST API. - # - # This class represents the configuration for VehicleService 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::Maps::FleetEngine::V1::VehicleService::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_vehicle to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_vehicle.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_vehicle.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::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 VehicleService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :create_vehicle - ## - # RPC-specific configuration for `get_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vehicle - ## - # RPC-specific configuration for `delete_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_vehicle - ## - # RPC-specific configuration for `update_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vehicle - ## - # RPC-specific configuration for `update_vehicle_attributes` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vehicle_attributes - ## - # RPC-specific configuration for `list_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_vehicles - ## - # RPC-specific configuration for `search_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :search_vehicles - - # @private - def initialize parent_rpcs = nil - create_vehicle_config = parent_rpcs.create_vehicle if parent_rpcs.respond_to? :create_vehicle - @create_vehicle = ::Gapic::Config::Method.new create_vehicle_config - get_vehicle_config = parent_rpcs.get_vehicle if parent_rpcs.respond_to? :get_vehicle - @get_vehicle = ::Gapic::Config::Method.new get_vehicle_config - delete_vehicle_config = parent_rpcs.delete_vehicle if parent_rpcs.respond_to? :delete_vehicle - @delete_vehicle = ::Gapic::Config::Method.new delete_vehicle_config - update_vehicle_config = parent_rpcs.update_vehicle if parent_rpcs.respond_to? :update_vehicle - @update_vehicle = ::Gapic::Config::Method.new update_vehicle_config - update_vehicle_attributes_config = parent_rpcs.update_vehicle_attributes if parent_rpcs.respond_to? :update_vehicle_attributes - @update_vehicle_attributes = ::Gapic::Config::Method.new update_vehicle_attributes_config - list_vehicles_config = parent_rpcs.list_vehicles if parent_rpcs.respond_to? :list_vehicles - @list_vehicles = ::Gapic::Config::Method.new list_vehicles_config - search_vehicles_config = parent_rpcs.search_vehicles if parent_rpcs.respond_to? :search_vehicles - @search_vehicles = ::Gapic::Config::Method.new search_vehicles_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb deleted file mode 100644 index ab5b0c346f64..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb +++ /dev/null @@ -1,512 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/maps/fleetengine/v1/vehicle_api_pb" - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - module Rest - ## - # REST service stub for the VehicleService 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_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::CreateVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # A result object deserialized from the server's reply - def create_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Vehicle.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::GetVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # A result object deserialized from the server's reply - def get_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Vehicle.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_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_vehicle", - 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 update_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # A result object deserialized from the server's reply - def update_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Vehicle.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_vehicle_attributes REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # A result object deserialized from the server's reply - def update_vehicle_attributes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_vehicle_attributes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_vehicle_attributes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse.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_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::ListVehiclesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::ListVehiclesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::ListVehiclesResponse] - # A result object deserialized from the server's reply - def list_vehicles request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_vehicles_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_vehicles", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::ListVehiclesResponse.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_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # A result object deserialized from the server's reply - def search_vehicles request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_vehicles_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_vehicles", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse.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_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::CreateVehicleRequest] - # 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_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/vehicles", - body: "vehicle", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::GetVehicleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest] - # 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_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1/{name}", - body: "vehicle", - matches: [ - ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_vehicle_attributes REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest] - # 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_vehicle_attributes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:updateAttributes", - body: "*", - matches: [ - ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::ListVehiclesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_vehicles_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/vehicles", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest] - # 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_vehicles_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/vehicles:search", - body: "*", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb deleted file mode 100644 index 5f98242dd062..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/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 Maps - module FleetEngine - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb deleted file mode 100644 index 58e92abfb79e..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/fleetengine.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/maps/fleetengine/v1/traffic_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n,google/maps/fleetengine/v1/fleetengine.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/maps/fleetengine/v1/traffic.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"b\n\x0fTerminalPointId\x12\x16\n\x08place_id\x18\x02 \x01(\tB\x02\x18\x01H\x00\x12\x1a\n\x0cgenerated_id\x18\x03 \x01(\tB\x02\x18\x01H\x00\x12\x11\n\x05value\x18\x04 \x01(\tB\x02\x18\x01:\x02\x18\x01\x42\x04\n\x02Id\"\xf9\x01\n\x10TerminalLocation\x12\'\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12\x43\n\x11terminal_point_id\x18\x02 \x01(\x0b\x32$.maps.fleetengine.v1.TerminalPointIdB\x02\x18\x01\x12\x1b\n\x0f\x61\x63\x63\x65ss_point_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x13\n\x07trip_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x45\n\x16terminal_location_type\x18\x05 \x01(\x0e\x32!.maps.fleetengine.v1.WaypointTypeB\x02\x18\x01\"\xbc\x03\n\x0cTripWaypoint\x12\x37\n\x08location\x18\x01 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x0f\n\x07trip_id\x18\x02 \x01(\t\x12\x38\n\rwaypoint_type\x18\x03 \x01(\x0e\x32!.maps.fleetengine.v1.WaypointType\x12-\n\x10path_to_waypoint\x18\x04 \x03(\x0b\x32\x13.google.type.LatLng\x12 \n\x18\x65ncoded_path_to_waypoint\x18\x05 \x01(\t\x12K\n\x13traffic_to_waypoint\x18\n \x01(\x0b\x32..maps.fleetengine.v1.ConsumableTrafficPolyline\x12\x34\n\x0f\x64istance_meters\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\'\n\x03\x65ta\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x08\x64uration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x8f\x01\n\x10VehicleAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x05 \x01(\x01H\x00\x42\x19\n\x17vehicle_attribute_value\"\x80\x0e\n\x0fVehicleLocation\x12%\n\x08location\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12=\n\x13horizontal_accuracy\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x35\n\x0flatlng_accuracy\x18\x16 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12,\n\x07heading\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12:\n\x10\x62\x65\x61ring_accuracy\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x36\n\x10heading_accuracy\x18\x17 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12.\n\x08\x61ltitude\x18\x05 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12;\n\x11vertical_accuracy\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x37\n\x11\x61ltitude_accuracy\x18\x18 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x33\n\nspeed_kmph\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x02\x18\x01\x12+\n\x05speed\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x34\n\x0espeed_accuracy\x18\x07 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bserver_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0flocation_sensor\x18\x0b \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12\x33\n\x0fis_road_snapped\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12>\n\x15is_gps_sensor_enabled\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x04\x12;\n\x11time_since_update\x18\x0e \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12=\n\x11num_stale_updates\x18\x0f \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x05\x18\x01\xe0\x41\x04\x12)\n\x0craw_location\x18\x10 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x11raw_location_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x13raw_location_sensor\x18\x1c \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12;\n\x15raw_location_accuracy\x18\x19 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12)\n\x0c\x66lp_location\x18\x1d \x01(\x0b\x32\x13.google.type.LatLng\x12\x33\n\x0f\x66lp_update_time\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x1a\x66lp_latlng_accuracy_meters\x18\x1f \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x38\n\x13\x66lp_heading_degrees\x18 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x32\n\x15supplemental_location\x18\x12 \x01(\x0b\x32\x13.google.type.LatLng\x12>\n\x1asupplemental_location_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x1csupplemental_location_sensor\x18\x14 \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12\x44\n\x1esupplemental_location_accuracy\x18\x15 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x18\n\x0croad_snapped\x18\x1a \x01(\x08\x42\x02\x18\x01\"z\n\rTripAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x04 \x01(\x01H\x00\x42\x16\n\x14trip_attribute_value*<\n\x08TripType\x12\x15\n\x11UNKNOWN_TRIP_TYPE\x10\x00\x12\n\n\x06SHARED\x10\x01\x12\r\n\tEXCLUSIVE\x10\x02*\x8b\x01\n\x0cWaypointType\x12\x19\n\x15UNKNOWN_WAYPOINT_TYPE\x10\x00\x12\x18\n\x14PICKUP_WAYPOINT_TYPE\x10\x01\x12\x1a\n\x16\x44ROP_OFF_WAYPOINT_TYPE\x10\x02\x12*\n&INTERMEDIATE_DESTINATION_WAYPOINT_TYPE\x10\x03*_\n\x12PolylineFormatType\x12\x17\n\x13UNKNOWN_FORMAT_TYPE\x10\x00\x12\x15\n\x11LAT_LNG_LIST_TYPE\x10\x01\x12\x19\n\x15\x45NCODED_POLYLINE_TYPE\x10\x02*\x89\x01\n\x10NavigationStatus\x12\x1d\n\x19UNKNOWN_NAVIGATION_STATUS\x10\x00\x12\x0f\n\x0bNO_GUIDANCE\x10\x01\x12\x1a\n\x16\x45NROUTE_TO_DESTINATION\x10\x02\x12\r\n\tOFF_ROUTE\x10\x03\x12\x1a\n\x16\x41RRIVED_AT_DESTINATION\x10\x04*\xd7\x01\n\x0eLocationSensor\x12\x12\n\x0eUNKNOWN_SENSOR\x10\x00\x12\x07\n\x03GPS\x10\x01\x12\x0b\n\x07NETWORK\x10\x02\x12\x0b\n\x07PASSIVE\x10\x03\x12\"\n\x1eROAD_SNAPPED_LOCATION_PROVIDER\x10\x04\x12\x1e\n\x1a\x43USTOMER_SUPPLIED_LOCATION\x10\x05\x12\x19\n\x15\x46LEET_ENGINE_LOCATION\x10\x06\x12\x1b\n\x17\x46USED_LOCATION_PROVIDER\x10\x64\x12\x12\n\rCORE_LOCATION\x10\xc8\x01\x42\xd7\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x0b\x46leetEngineP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - TerminalPointId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TerminalPointId").msgclass - TerminalLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TerminalLocation").msgclass - TripWaypoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripWaypoint").msgclass - VehicleAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleAttribute").msgclass - VehicleLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleLocation").msgclass - TripAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripAttribute").msgclass - TripType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripType").enummodule - WaypointType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.WaypointType").enummodule - PolylineFormatType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.PolylineFormatType").enummodule - NavigationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.NavigationStatus").enummodule - LocationSensor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.LocationSensor").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb deleted file mode 100644 index 3f8cd27dcedb..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/header.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n\'google/maps/fleetengine/v1/header.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\"\x86\x04\n\rRequestHeader\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0bsdk_version\x18\x03 \x01(\t\x12\x12\n\nos_version\x18\x04 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x05 \x01(\t\x12<\n\x08sdk_type\x18\x06 \x01(\x0e\x32*.maps.fleetengine.v1.RequestHeader.SdkType\x12\x18\n\x10maps_sdk_version\x18\x07 \x01(\t\x12\x17\n\x0fnav_sdk_version\x18\x08 \x01(\t\x12=\n\x08platform\x18\t \x01(\x0e\x32+.maps.fleetengine.v1.RequestHeader.Platform\x12\x14\n\x0cmanufacturer\x18\n \x01(\t\x12\x19\n\x11\x61ndroid_api_level\x18\x0b \x01(\x05\x12\x10\n\x08trace_id\x18\x0c \x01(\t\"M\n\x07SdkType\x12\x18\n\x14SDK_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43ONSUMER\x10\x01\x12\n\n\x06\x44RIVER\x10\x02\x12\x0e\n\nJAVASCRIPT\x10\x03\"C\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41NDROID\x10\x01\x12\x07\n\x03IOS\x10\x02\x12\x07\n\x03WEB\x10\x03\x42\xd3\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x07HeadersP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - RequestHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.RequestHeader").msgclass - RequestHeader::SdkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.RequestHeader.SdkType").enummodule - RequestHeader::Platform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.RequestHeader.Platform").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb deleted file mode 100644 index 14bfe0f2b53b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/traffic.proto - -require 'google/protobuf' - - -descriptor_data = "\n(google/maps/fleetengine/v1/traffic.proto\x12\x13maps.fleetengine.v1\"\xe3\x01\n\x14SpeedReadingInterval\x12\"\n\x1astart_polyline_point_index\x18\x01 \x01(\x05\x12 \n\x18\x65nd_polyline_point_index\x18\x02 \x01(\x05\x12>\n\x05speed\x18\x03 \x01(\x0e\x32/.maps.fleetengine.v1.SpeedReadingInterval.Speed\"E\n\x05Speed\x12\x15\n\x11SPEED_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x08\n\x04SLOW\x10\x02\x12\x0f\n\x0bTRAFFIC_JAM\x10\x03\"\x88\x01\n\x19\x43onsumableTrafficPolyline\x12I\n\x16speed_reading_interval\x18\x01 \x03(\x0b\x32).maps.fleetengine.v1.SpeedReadingInterval\x12 \n\x18\x65ncoded_path_to_waypoint\x18\x02 \x01(\tB\xd8\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x0cTrafficProtoP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - SpeedReadingInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SpeedReadingInterval").msgclass - SpeedReadingInterval::Speed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SpeedReadingInterval.Speed").enummodule - ConsumableTrafficPolyline = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ConsumableTrafficPolyline").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb deleted file mode 100644 index eb001c21ef19..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/trip_api.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/api/routing_pb' -require 'google/maps/fleetengine/v1/fleetengine_pb' -require 'google/maps/fleetengine/v1/header_pb' -require 'google/maps/fleetengine/v1/trips_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/maps/fleetengine/v1/trip_api.proto\x12\x13maps.fleetengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\'google/maps/fleetengine/v1/header.proto\x1a&google/maps/fleetengine/v1/trips.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\x01\n\x11\x43reateTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x37\n\x06parent\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\x12\x14\n\x07trip_id\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12,\n\x04trip\x18\x04 \x01(\x0b\x32\x19.maps.fleetengine.v1.TripB\x03\xe0\x41\x02\"\x86\x04\n\x0eGetTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x35\n\x04name\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\x12+\n\x04view\x18\x0b \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripView\x12\x41\n\x1d\x63urrent_route_segment_version\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x1bremaining_waypoints_version\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x42\n\x11route_format_type\x18\x08 \x01(\x0e\x32\'.maps.fleetengine.v1.PolylineFormatType\x12I\n%current_route_segment_traffic_version\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n!remaining_waypoints_route_version\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x83\x01\n\x11\x44\x65leteTripRequest\x12\x37\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeaderB\x03\xe0\x41\x01\x12\x35\n\x04name\x18\x02 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\"\xcd\x02\n\x19ReportBillableTripRequest\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63ountry_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12@\n\x08platform\x18\x05 \x01(\x0e\x32..maps.fleetengine.v1.BillingPlatformIdentifier\x12\x13\n\x0brelated_ids\x18\x06 \x03(\t\x12R\n\rsolution_type\x18\x07 \x01(\x0e\x32;.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType\"W\n\x0cSolutionType\x12\x1d\n\x19SOLUTION_TYPE_UNSPECIFIED\x10\x00\x12(\n$ON_DEMAND_RIDESHARING_AND_DELIVERIES\x10\x01\"\xbe\x01\n\x11UpdateTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12,\n\x04trip\x18\x04 \x01(\x0b\x32\x19.maps.fleetengine.v1.TripB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xe9\x01\n\x12SearchTripsRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nvehicle_id\x18\x04 \x01(\t\x12\x19\n\x11\x61\x63tive_trips_only\x18\x05 \x01(\x08\x12\x11\n\tpage_size\x18\x06 \x01(\x05\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x34\n\x11minimum_staleness\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\"X\n\x13SearchTripsResponse\x12(\n\x05trips\x18\x01 \x03(\x0b\x32\x19.maps.fleetengine.v1.Trip\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf7\x08\n\x0bTripService\x12\xa8\x01\n\nCreateTrip\x12&.maps.fleetengine.v1.CreateTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"W\x82\xd3\xe4\x93\x02&\"\x1e/v1/{parent=providers/*}/trips:\x04trip\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\x9a\x01\n\x07GetTrip\x12#.maps.fleetengine.v1.GetTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"O\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=providers/*/trips/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xa4\x01\n\nDeleteTrip\x12&.maps.fleetengine.v1.DeleteTripRequest\x1a\x16.google.protobuf.Empty\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=providers/*/trips/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xbf\x01\n\x12ReportBillableTrip\x12..maps.fleetengine.v1.ReportBillableTripRequest\x1a\x16.google.protobuf.Empty\"a\x82\xd3\xe4\x93\x02\x32\"-/v1/{name=providers/*/billableTrips/*}:report:\x01*\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xbd\x01\n\x0bSearchTrips\x12\'.maps.fleetengine.v1.SearchTripsRequest\x1a(.maps.fleetengine.v1.SearchTripsResponse\"[\x82\xd3\xe4\x93\x02*\"%/v1/{parent=providers/*}/trips:search:\x01*\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xa6\x01\n\nUpdateTrip\x12&.maps.fleetengine.v1.UpdateTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"U\x82\xd3\xe4\x93\x02&\x1a\x1e/v1/{name=providers/*/trips/*}:\x04trip\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x1aN\xca\x41\x1a\x66leetengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd3\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x07TripApiP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - CreateTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.CreateTripRequest").msgclass - GetTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.GetTripRequest").msgclass - DeleteTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.DeleteTripRequest").msgclass - ReportBillableTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ReportBillableTripRequest").msgclass - ReportBillableTripRequest::SolutionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ReportBillableTripRequest.SolutionType").enummodule - UpdateTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateTripRequest").msgclass - SearchTripsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchTripsRequest").msgclass - SearchTripsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchTripsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb deleted file mode 100644 index 39026e91ba88..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/maps/fleetengine/v1/trip_api.proto for package 'Google.Maps.FleetEngine.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/maps/fleetengine/v1/trip_api_pb' - -module Google - module Maps - module FleetEngine - module V1 - module TripService - # Trip management service. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'maps.fleetengine.v1.TripService' - - # Creates a trip in the Fleet Engine and returns the new trip. - rpc :CreateTrip, ::Google::Maps::FleetEngine::V1::CreateTripRequest, ::Google::Maps::FleetEngine::V1::Trip - # Get information about a single trip. - rpc :GetTrip, ::Google::Maps::FleetEngine::V1::GetTripRequest, ::Google::Maps::FleetEngine::V1::Trip - # Deletes a single Trip. - # - # Returns FAILED_PRECONDITION if the Trip is active and assigned to a - # vehicle. - rpc :DeleteTrip, ::Google::Maps::FleetEngine::V1::DeleteTripRequest, ::Google::Protobuf::Empty - # Report billable trip usage. - rpc :ReportBillableTrip, ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, ::Google::Protobuf::Empty - # Get all the trips for a specific vehicle. - rpc :SearchTrips, ::Google::Maps::FleetEngine::V1::SearchTripsRequest, ::Google::Maps::FleetEngine::V1::SearchTripsResponse - # Updates trip data. - rpc :UpdateTrip, ::Google::Maps::FleetEngine::V1::UpdateTripRequest, ::Google::Maps::FleetEngine::V1::Trip - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb deleted file mode 100644 index 2aea61330c0f..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/trips.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/maps/fleetengine/v1/fleetengine_pb' -require 'google/maps/fleetengine/v1/traffic_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n&google/maps/fleetengine/v1/trips.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a(google/maps/fleetengine/v1/traffic.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xef\x10\n\x04Trip\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\nvehicle_id\x18\x02 \x01(\t\x12\x34\n\x0btrip_status\x18\x03 \x01(\x0e\x32\x1f.maps.fleetengine.v1.TripStatus\x12\x30\n\ttrip_type\x18\x04 \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12;\n\x0cpickup_point\x18\x05 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x43\n\x13\x61\x63tual_pickup_point\x18\x16 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12K\n\x1b\x61\x63tual_pickup_arrival_point\x18 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12\x34\n\x0bpickup_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x19intermediate_destinations\x18\x0e \x03(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x45\n!intermediate_destinations_version\x18\x19 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12&\n\x1eintermediate_destination_index\x18\x0f \x01(\x05\x12^\n.actual_intermediate_destination_arrival_points\x18! \x03(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12P\n actual_intermediate_destinations\x18\" \x03(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12<\n\rdropoff_point\x18\x07 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x44\n\x14\x61\x63tual_dropoff_point\x18\x17 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12\x35\n\x0c\x64ropoff_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x13remaining_waypoints\x18\x10 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypointB\x03\xe0\x41\x03\x12<\n\x11vehicle_waypoints\x18\x14 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12\'\n\x05route\x18\t \x03(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x03\x12\"\n\x15\x63urrent_route_segment\x18\x15 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x1d\x63urrent_route_segment_version\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Z\n\x1d\x63urrent_route_segment_traffic\x18\x1c \x01(\x0b\x32..maps.fleetengine.v1.ConsumableTrafficPolylineB\x03\xe0\x41\x03\x12N\n%current_route_segment_traffic_version\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x1f\x63urrent_route_segment_end_point\x18\x18 \x01(\x0b\x32!.maps.fleetengine.v1.TripWaypointB\x03\xe0\x41\x03\x12\x43\n\x19remaining_distance_meters\x18\x0c \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x03\x12>\n\x15\x65ta_to_first_waypoint\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n remaining_time_to_first_waypoint\x18\x1b \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x44\n\x1bremaining_waypoints_version\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n!remaining_waypoints_route_version\x18\x1d \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12!\n\x14number_of_passengers\x18\n \x01(\x05\x42\x03\xe0\x41\x05\x12@\n\rlast_location\x18\x0b \x01(\x0b\x32$.maps.fleetengine.v1.VehicleLocationB\x03\xe0\x41\x03\x12$\n\x17last_location_snappable\x18\x1a \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\x04view\x18\x1f \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripView\x12\x36\n\nattributes\x18# \x03(\x0b\x32\".maps.fleetengine.v1.TripAttribute:G\xea\x41\x44\n\x1f\x66leetengine.googleapis.com/Trip\x12!providers/{provider}/trips/{trip}\"\x9c\x01\n\x0cStopLocation\x12\'\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\tstop_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x04*\xe2\x01\n\nTripStatus\x12\x17\n\x13UNKNOWN_TRIP_STATUS\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x15\n\x11\x45NROUTE_TO_PICKUP\x10\x02\x12\x15\n\x11\x41RRIVED_AT_PICKUP\x10\x03\x12\'\n#ARRIVED_AT_INTERMEDIATE_DESTINATION\x10\x07\x12\'\n#ENROUTE_TO_INTERMEDIATE_DESTINATION\x10\x08\x12\x16\n\x12\x45NROUTE_TO_DROPOFF\x10\x04\x12\x0c\n\x08\x43OMPLETE\x10\x05\x12\x0c\n\x08\x43\x41NCELED\x10\x06*\x7f\n\x19\x42illingPlatformIdentifier\x12+\n\'BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED\x10\x00\x12\n\n\x06SERVER\x10\x01\x12\x07\n\x03WEB\x10\x02\x12\x0b\n\x07\x41NDROID\x10\x03\x12\x07\n\x03IOS\x10\x04\x12\n\n\x06OTHERS\x10\x05*G\n\x08TripView\x12\x19\n\x15TRIP_VIEW_UNSPECIFIED\x10\x00\x12\x07\n\x03SDK\x10\x01\x12\x17\n\x13JOURNEY_SHARING_V1S\x10\x02\x42\xd1\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x05TripsP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - Trip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Trip").msgclass - StopLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.StopLocation").msgclass - TripStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripStatus").enummodule - BillingPlatformIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.BillingPlatformIdentifier").enummodule - TripView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb deleted file mode 100644 index 4a1949b764b4..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/vehicle_api.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/api/routing_pb' -require 'google/geo/type/viewport_pb' -require 'google/maps/fleetengine/v1/fleetengine_pb' -require 'google/maps/fleetengine/v1/header_pb' -require 'google/maps/fleetengine/v1/vehicles_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n,google/maps/fleetengine/v1/vehicle_api.proto\x12\x13maps.fleetengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1egoogle/geo/type/viewport.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\'google/maps/fleetengine/v1/header.proto\x1a)google/maps/fleetengine/v1/vehicles.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xac\x01\n\x14\x43reateVehicleRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nvehicle_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x32\n\x07vehicle\x18\x05 \x01(\x0b\x32\x1c.maps.fleetengine.v1.VehicleB\x03\xe0\x41\x02\"\xfb\x01\n\x11GetVehicleRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x38\n\x04name\x18\x03 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"fleetengine.googleapis.com/Vehicle\x12\x41\n\x1d\x63urrent_route_segment_version\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11waypoints_version\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x89\x01\n\x14\x44\x65leteVehicleRequest\x12\x37\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeaderB\x03\xe0\x41\x01\x12\x38\n\x04name\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"fleetengine.googleapis.com/Vehicle\"\xc7\x01\n\x14UpdateVehicleRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x32\n\x07vehicle\x18\x04 \x01(\x0b\x32\x1c.maps.fleetengine.v1.VehicleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xa7\x01\n\x1eUpdateVehicleAttributesRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12>\n\nattributes\x18\x04 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttributeB\x03\xe0\x41\x02\"a\n\x1fUpdateVehicleAttributesResponse\x12>\n\nattributes\x18\x01 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttributeB\x03\xe0\x41\x02\"\xc6\t\n\x15SearchVehiclesRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0cpickup_point\x18\x04 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocationB\x03\xe0\x41\x02\x12<\n\rdropoff_point\x18\x05 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12!\n\x14pickup_radius_meters\x18\x06 \x01(\x05\x42\x03\xe0\x41\x02\x12\x12\n\x05\x63ount\x18\x07 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1d\n\x10minimum_capacity\x18\x08 \x01(\x05\x42\x03\xe0\x41\x02\x12\x36\n\ntrip_types\x18\t \x03(\x0e\x32\x1d.maps.fleetengine.v1.TripTypeB\x03\xe0\x41\x02\x12\x34\n\x11maximum_staleness\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x44\n\rvehicle_types\x18\x0e \x03(\x0b\x32(.maps.fleetengine.v1.Vehicle.VehicleTypeB\x03\xe0\x41\x02\x12\x42\n\x13required_attributes\x18\x0c \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttribute\x12M\n\x1arequired_one_of_attributes\x18\x0f \x03(\x0b\x32).maps.fleetengine.v1.VehicleAttributeList\x12Q\n\x1erequired_one_of_attribute_sets\x18\x14 \x03(\x0b\x32).maps.fleetengine.v1.VehicleAttributeList\x12S\n\x08order_by\x18\r \x01(\x0e\x32<.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrderB\x03\xe0\x41\x02\x12\x1c\n\x14include_back_to_back\x18\x12 \x01(\x08\x12\x0f\n\x07trip_id\x18\x13 \x01(\t\x12]\n\x15\x63urrent_trips_present\x18\x15 \x01(\x0e\x32>.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent\x12\x13\n\x06\x66ilter\x18\x16 \x01(\tB\x03\xe0\x41\x01\"\xaa\x01\n\x11VehicleMatchOrder\x12\x1f\n\x1bUNKNOWN_VEHICLE_MATCH_ORDER\x10\x00\x12\x14\n\x10PICKUP_POINT_ETA\x10\x01\x12\x19\n\x15PICKUP_POINT_DISTANCE\x10\x02\x12\x15\n\x11\x44ROPOFF_POINT_ETA\x10\x03\x12\"\n\x1ePICKUP_POINT_STRAIGHT_DISTANCE\x10\x04\x12\x08\n\x04\x43OST\x10\x05\"O\n\x13\x43urrentTripsPresent\x12%\n!CURRENT_TRIPS_PRESENT_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x07\n\x03\x41NY\x10\x02\"L\n\x16SearchVehiclesResponse\x12\x32\n\x07matches\x18\x01 \x03(\x0b\x32!.maps.fleetengine.v1.VehicleMatch\"\xfe\x04\n\x13ListVehiclesRequest\x12\x32\n\x06header\x18\x0c \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x35\n\x10minimum_capacity\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x31\n\ntrip_types\x18\x07 \x03(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12\x34\n\x11maximum_staleness\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12W\n\x17vehicle_type_categories\x18\t \x03(\x0e\x32\x31.maps.fleetengine.v1.Vehicle.VehicleType.CategoryB\x03\xe0\x41\x02\x12\x1b\n\x13required_attributes\x18\n \x03(\t\x12\"\n\x1arequired_one_of_attributes\x18\r \x03(\t\x12&\n\x1erequired_one_of_attribute_sets\x18\x0f \x03(\t\x12\x38\n\rvehicle_state\x18\x0b \x01(\x0e\x32!.maps.fleetengine.v1.VehicleState\x12\x14\n\x0con_trip_only\x18\x0e \x01(\x08\x12\x13\n\x06\x66ilter\x18\x10 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x08viewport\x18\x11 \x01(\x0b\x32\x19.google.geo.type.ViewportB\x03\xe0\x41\x01\"x\n\x14ListVehiclesResponse\x12.\n\x08vehicles\x18\x01 \x03(\x0b\x32\x1c.maps.fleetengine.v1.Vehicle\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x17\n\ntotal_size\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02\"Y\n\x08Waypoint\x12$\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12\'\n\x03\x65ta\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xfe\x06\n\x0cVehicleMatch\x12\x32\n\x07vehicle\x18\x01 \x01(\x0b\x32\x1c.maps.fleetengine.v1.VehicleB\x03\xe0\x41\x02\x12\x36\n\x12vehicle_pickup_eta\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x1evehicle_pickup_distance_meters\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12V\n,vehicle_pickup_straight_line_distance_meters\x18\x0b \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x02\x12\x37\n\x13vehicle_dropoff_eta\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n)vehicle_pickup_to_dropoff_distance_meters\x18\x05 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x35\n\ttrip_type\x18\x06 \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripTypeB\x03\xe0\x41\x02\x12>\n\x17vehicle_trips_waypoints\x18\x07 \x03(\x0b\x32\x1d.maps.fleetengine.v1.Waypoint\x12N\n\x12vehicle_match_type\x18\x08 \x01(\x0e\x32\x32.maps.fleetengine.v1.VehicleMatch.VehicleMatchType\x12Z\n\x14requested_ordered_by\x18\t \x01(\x0e\x32<.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder\x12P\n\nordered_by\x18\n \x01(\x0e\x32<.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder\"g\n\x10VehicleMatchType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tEXCLUSIVE\x10\x01\x12\x10\n\x0c\x42\x41\x43K_TO_BACK\x10\x02\x12\x0b\n\x07\x43\x41RPOOL\x10\x03\x12\x18\n\x14\x43\x41RPOOL_BACK_TO_BACK\x10\x04\"Q\n\x14VehicleAttributeList\x12\x39\n\nattributes\x18\x01 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttribute2\xa2\x0b\n\x0eVehicleService\x12\xb7\x01\n\rCreateVehicle\x12).maps.fleetengine.v1.CreateVehicleRequest\x1a\x1c.maps.fleetengine.v1.Vehicle\"]\x82\xd3\xe4\x93\x02,\"!/v1/{parent=providers/*}/vehicles:\x07vehicle\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xa6\x01\n\nGetVehicle\x12&.maps.fleetengine.v1.GetVehicleRequest\x1a\x1c.maps.fleetengine.v1.Vehicle\"R\x82\xd3\xe4\x93\x02#\x12!/v1/{name=providers/*/vehicles/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xad\x01\n\rDeleteVehicle\x12).maps.fleetengine.v1.DeleteVehicleRequest\x1a\x16.google.protobuf.Empty\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02#*!/v1/{name=providers/*/vehicles/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xb5\x01\n\rUpdateVehicle\x12).maps.fleetengine.v1.UpdateVehicleRequest\x1a\x1c.maps.fleetengine.v1.Vehicle\"[\x82\xd3\xe4\x93\x02,\x1a!/v1/{name=providers/*/vehicles/*}:\x07vehicle\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xec\x01\n\x17UpdateVehicleAttributes\x12\x33.maps.fleetengine.v1.UpdateVehicleAttributesRequest\x1a\x34.maps.fleetengine.v1.UpdateVehicleAttributesResponse\"f\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=providers/*/vehicles/*}:updateAttributes:\x01*\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xb9\x01\n\x0cListVehicles\x12(.maps.fleetengine.v1.ListVehiclesRequest\x1a).maps.fleetengine.v1.ListVehiclesResponse\"T\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=providers/*}/vehicles\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xc9\x01\n\x0eSearchVehicles\x12*.maps.fleetengine.v1.SearchVehiclesRequest\x1a+.maps.fleetengine.v1.SearchVehiclesResponse\"^\x82\xd3\xe4\x93\x02-\"(/v1/{parent=providers/*}/vehicles:search:\x01*\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x1aN\xca\x41\x1a\x66leetengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd6\x01\n\x1e\x63om.google.maps.fleetengine.v1B\nVehicleApiP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - CreateVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.CreateVehicleRequest").msgclass - GetVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.GetVehicleRequest").msgclass - DeleteVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.DeleteVehicleRequest").msgclass - UpdateVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateVehicleRequest").msgclass - UpdateVehicleAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateVehicleAttributesRequest").msgclass - UpdateVehicleAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateVehicleAttributesResponse").msgclass - SearchVehiclesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesRequest").msgclass - SearchVehiclesRequest::VehicleMatchOrder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder").enummodule - SearchVehiclesRequest::CurrentTripsPresent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent").enummodule - SearchVehiclesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesResponse").msgclass - ListVehiclesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ListVehiclesRequest").msgclass - ListVehiclesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ListVehiclesResponse").msgclass - Waypoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Waypoint").msgclass - VehicleMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleMatch").msgclass - VehicleMatch::VehicleMatchType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleMatch.VehicleMatchType").enummodule - VehicleAttributeList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleAttributeList").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb deleted file mode 100644 index 31ee1908cafc..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb +++ /dev/null @@ -1,108 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/maps/fleetengine/v1/vehicle_api.proto for package 'Google.Maps.FleetEngine.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/maps/fleetengine/v1/vehicle_api_pb' - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - # Vehicle management service. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'maps.fleetengine.v1.VehicleService' - - # Instantiates a new vehicle associated with an on-demand rideshare or - # deliveries provider. Each `Vehicle` must have a unique vehicle ID. - # - # The following `Vehicle` fields are required when creating a `Vehicle`: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # The following `Vehicle` fields are ignored when creating a `Vehicle`: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - rpc :CreateVehicle, ::Google::Maps::FleetEngine::V1::CreateVehicleRequest, ::Google::Maps::FleetEngine::V1::Vehicle - # Returns a vehicle from the Fleet Engine. - rpc :GetVehicle, ::Google::Maps::FleetEngine::V1::GetVehicleRequest, ::Google::Maps::FleetEngine::V1::Vehicle - # Deletes a Vehicle from the Fleet Engine. - # - # Returns FAILED_PRECONDITION if the Vehicle has active Trips. - # assigned to it. - rpc :DeleteVehicle, ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, ::Google::Protobuf::Empty - # Writes updated vehicle data to the Fleet Engine. - # - # When updating a `Vehicle`, the following fields cannot be updated since - # they are managed by the server: - # - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment_version` - # * `waypoints_version` - # - # The vehicle `name` also cannot be updated. - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. Likewise, - # the `waypoints` field can be updated, but must contain all the waypoints - # currently on the vehicle, and no other waypoints. - rpc :UpdateVehicle, ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, ::Google::Maps::FleetEngine::V1::Vehicle - # Partially updates a vehicle's attributes. - # Only the attributes mentioned in the request will be updated, other - # attributes will NOT be altered. Note: this is different in `UpdateVehicle`, - # where the whole `attributes` field will be replaced by the one in - # `UpdateVehicleRequest`, attributes not in the request would be removed. - rpc :UpdateVehicleAttributes, ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse - # Returns a paginated list of vehicles associated with - # a provider that match the request options. - rpc :ListVehicles, ::Google::Maps::FleetEngine::V1::ListVehiclesRequest, ::Google::Maps::FleetEngine::V1::ListVehiclesResponse - # Returns a list of vehicles that match the request options. - rpc :SearchVehicles, ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb deleted file mode 100644 index 91a8f67ad59d..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/vehicles.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/maps/fleetengine/v1/fleetengine_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n)google/maps/fleetengine/v1/vehicles.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xa5\x0c\n\x07Vehicle\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x38\n\rvehicle_state\x18\x02 \x01(\x0e\x32!.maps.fleetengine.v1.VehicleState\x12;\n\x14supported_trip_types\x18\x03 \x03(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12\x1a\n\rcurrent_trips\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12;\n\rlast_location\x18\x05 \x01(\x0b\x32$.maps.fleetengine.v1.VehicleLocation\x12\x41\n\x0epast_locations\x18\x1e \x03(\x0b\x32$.maps.fleetengine.v1.VehicleLocationB\x03\xe0\x41\x04\x12\x18\n\x10maximum_capacity\x18\x06 \x01(\x05\x12\x39\n\nattributes\x18\x08 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttribute\x12\x43\n\x0cvehicle_type\x18\t \x01(\x0b\x32(.maps.fleetengine.v1.Vehicle.VehicleTypeB\x03\xe0\x41\x02\x12\x38\n\rlicense_plate\x18\n \x01(\x0b\x32!.maps.fleetengine.v1.LicensePlate\x12\x38\n\x05route\x18\x0c \x03(\x0b\x32%.maps.fleetengine.v1.TerminalLocationB\x02\x18\x01\x12\x1d\n\x15\x63urrent_route_segment\x18\x14 \x01(\t\x12T\n\x1d\x63urrent_route_segment_traffic\x18\x1c \x01(\x0b\x32(.maps.fleetengine.v1.TrafficPolylineDataB\x03\xe0\x41\x04\x12\x46\n\x1d\x63urrent_route_segment_version\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x1f\x63urrent_route_segment_end_point\x18\x18 \x01(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12>\n\x19remaining_distance_meters\x18\x12 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x39\n\x15\x65ta_to_first_waypoint\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x16remaining_time_seconds\x18\x19 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12\x34\n\twaypoints\x18\x16 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12:\n\x11waypoints_version\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x14\x62\x61\x63k_to_back_enabled\x18\x17 \x01(\x08\x12@\n\x11navigation_status\x18\x1a \x01(\x0e\x32%.maps.fleetengine.v1.NavigationStatus\x12\x41\n\x0f\x64\x65vice_settings\x18\x1b \x01(\x0b\x32#.maps.fleetengine.v1.DeviceSettingsB\x03\xe0\x41\x04\x1a\xb8\x01\n\x0bVehicleType\x12\x43\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32\x31.maps.fleetengine.v1.Vehicle.VehicleType.Category\"d\n\x08\x43\x61tegory\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x08\n\x04TAXI\x10\x02\x12\t\n\x05TRUCK\x10\x03\x12\x0f\n\x0bTWO_WHEELER\x10\x04\x12\x0b\n\x07\x42ICYCLE\x10\x05\x12\x0e\n\nPEDESTRIAN\x10\x06:P\xea\x41M\n\"fleetengine.googleapis.com/Vehicle\x12\'providers/{provider}/vehicles/{vehicle}\"\x9d\x01\n\x0b\x42\x61tteryInfo\x12:\n\x0e\x62\x61ttery_status\x18\x01 \x01(\x0e\x32\".maps.fleetengine.v1.BatteryStatus\x12\x36\n\x0cpower_source\x18\x02 \x01(\x0e\x32 .maps.fleetengine.v1.PowerSource\x12\x1a\n\x12\x62\x61ttery_percentage\x18\x03 \x01(\x02\"\xca\x01\n\x0e\x44\x65viceSettings\x12L\n\x18location_power_save_mode\x18\x01 \x01(\x0e\x32*.maps.fleetengine.v1.LocationPowerSaveMode\x12\x1a\n\x12is_power_save_mode\x18\x02 \x01(\x08\x12\x16\n\x0eis_interactive\x18\x03 \x01(\x08\x12\x36\n\x0c\x62\x61ttery_info\x18\x04 \x01(\x0b\x32 .maps.fleetengine.v1.BatteryInfo\"A\n\x0cLicensePlate\x12\x19\n\x0c\x63ountry_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x0elast_character\x18\x02 \x01(\t\"\xf6\x02\n$VisualTrafficReportPolylineRendering\x12`\n\x0croad_stretch\x18\x01 \x03(\x0b\x32\x45.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretchB\x03\xe0\x41\x01\x1a\xeb\x01\n\x0bRoadStretch\x12_\n\x05style\x18\x01 \x01(\x0e\x32K.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch.StyleB\x03\xe0\x41\x02\x12\x1a\n\roffset_meters\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1a\n\rlength_meters\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"C\n\x05Style\x12\x15\n\x11STYLE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSLOWER_TRAFFIC\x10\x01\x12\x0f\n\x0bTRAFFIC_JAM\x10\x02\"k\n\x13TrafficPolylineData\x12T\n\x11traffic_rendering\x18\x01 \x01(\x0b\x32\x39.maps.fleetengine.v1.VisualTrafficReportPolylineRendering*B\n\x0cVehicleState\x12\x19\n\x15UNKNOWN_VEHICLE_STATE\x10\x00\x12\x0b\n\x07OFFLINE\x10\x01\x12\n\n\x06ONLINE\x10\x02*\x92\x02\n\x15LocationPowerSaveMode\x12$\n UNKNOWN_LOCATION_POWER_SAVE_MODE\x10\x00\x12\x1b\n\x17LOCATION_MODE_NO_CHANGE\x10\x01\x12.\n*LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF\x10\x02\x12.\n*LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF\x10\x03\x12!\n\x1dLOCATION_MODE_FOREGROUND_ONLY\x10\x04\x12\x33\n/LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF\x10\x05*\xc0\x01\n\rBatteryStatus\x12\x1a\n\x16UNKNOWN_BATTERY_STATUS\x10\x00\x12\x1b\n\x17\x42\x41TTERY_STATUS_CHARGING\x10\x01\x12\x1e\n\x1a\x42\x41TTERY_STATUS_DISCHARGING\x10\x02\x12\x17\n\x13\x42\x41TTERY_STATUS_FULL\x10\x03\x12\x1f\n\x1b\x42\x41TTERY_STATUS_NOT_CHARGING\x10\x04\x12\x1c\n\x18\x42\x41TTERY_STATUS_POWER_LOW\x10\x05*\x89\x01\n\x0bPowerSource\x12\x18\n\x14UNKNOWN_POWER_SOURCE\x10\x00\x12\x13\n\x0fPOWER_SOURCE_AC\x10\x01\x12\x14\n\x10POWER_SOURCE_USB\x10\x02\x12\x19\n\x15POWER_SOURCE_WIRELESS\x10\x03\x12\x1a\n\x16POWER_SOURCE_UNPLUGGED\x10\x04\x42\xd4\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x08VehiclesP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - Vehicle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Vehicle").msgclass - Vehicle::VehicleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Vehicle.VehicleType").msgclass - Vehicle::VehicleType::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Vehicle.VehicleType.Category").enummodule - BatteryInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.BatteryInfo").msgclass - DeviceSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.DeviceSettings").msgclass - LicensePlate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.LicensePlate").msgclass - VisualTrafficReportPolylineRendering = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VisualTrafficReportPolylineRendering").msgclass - VisualTrafficReportPolylineRendering::RoadStretch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch").msgclass - VisualTrafficReportPolylineRendering::RoadStretch::Style = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch.Style").enummodule - TrafficPolylineData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TrafficPolylineData").msgclass - VehicleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleState").enummodule - LocationPowerSaveMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.LocationPowerSaveMode").enummodule - BatteryStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.BatteryStatus").enummodule - PowerSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.PowerSource").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md deleted file mode 100644 index faf4842e7c03..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Local Rides and Deliveries 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-maps-fleet_engine-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/routing.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb deleted file mode 100644 index 6d71a9430253..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb +++ /dev/null @@ -1,463 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Specifies the routing information that should be sent along with the request - # in the form of routing header. - # **NOTE:** All service configuration rules follow the "last one wins" order. - # - # The examples below will apply to an RPC which has the following request type: - # - # Message Definition: - # - # message Request { - # // The name of the Table - # // Values can be of the following formats: - # // - `projects//tables/
` - # // - `projects//instances//tables/
` - # // - `region//zones//tables/
` - # string table_name = 1; - # - # // This value specifies routing for replication. - # // It can be in the following formats: - # // - `profiles/` - # // - a legacy `profile_id` that can be any string - # string app_profile_id = 2; - # } - # - # Example message: - # - # { - # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, - # app_profile_id: profiles/prof_qux - # } - # - # The routing header consists of one or multiple key-value pairs. The order of - # the key-value pairs is undefined, the order of the `routing_parameters` in - # the `RoutingRule` only matters for the evaluation order of the path - # templates when `field` is the same. See the examples below for more details. - # - # Every key and value in the routing header must be percent-encoded, - # and joined together in the following format: `key1=value1&key2=value2`. - # The examples below skip the percent-encoding for readability. - # - # Example 1 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key equal to the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`. - # routing_parameters { - # field: "app_profile_id" - # } - # }; - # - # result: - # - # x-goog-request-params: app_profile_id=profiles/prof_qux - # - # Example 2 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key different from the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`, but name it `routing_id` in the header. - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 3 - # - # Extracting a field from the request to put into the routing - # header, while matching a path template syntax on the field's value. - # - # NB: it is more useful to send nothing than to send garbage for the purpose - # of dynamic routing, since garbage pollutes cache. Thus the matching. - # - # Sub-example 3a - # - # The field matches the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with project-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Sub-example 3b - # - # The field does not match the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with region-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # }; - # - # result: - # - # - # - # Sub-example 3c - # - # Multiple alternative conflictingly named path templates are - # specified. The one that matches is used to construct the header. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed, whether - # // using the region- or projects-based syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Example 4 - # - # Extracting a single routing header key-value pair by matching a - # template syntax on (a part of) a single request field. - # - # annotation: - # - # option (google.api.routing) = { - # // Take just the project id from the `table_name` field. - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=projects/proj_foo - # - # Example 5 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on (parts of) a single request - # field. The last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // If the `table_name` does not have instances information, - # // take just the project id for routing. - # // Otherwise take project + instance. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*/instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # routing_id=projects/proj_foo/instances/instance_bar - # - # Example 6 - # - # Extracting multiple routing header key-value pairs by matching - # several non-conflicting path templates on (parts of) a single request field. - # - # Sub-example 6a - # - # Make the templates strict, so that if the `table_name` does not - # have an instance information, nothing is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code needs two keys instead of one composite - # // but works only for the tables with the "project-instance" name - # // syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/instances/*/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Sub-example 6b - # - # Make the templates loose, so that if the `table_name` does not - # have an instance information, just the project id part is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code wants two keys instead of one composite - # // but will work with just the `project_id` for tables without - # // an instance in the `table_name`. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result (is the same as 6a for our example message because it has the instance - # information): - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Example 7 - # - # Extracting multiple routing header key-value pairs by matching - # several path templates on multiple request fields. - # - # NB: note that here there is no way to specify sending nothing if one of the - # fields does not match its template. E.g. if the `table_name` is in the wrong - # format, the `project_id` will not be sent, but the `routing_id` will be. - # The backend routing code has to be aware of that and be prepared to not - # receive a full complement of keys if it expects multiple. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing needs both `project_id` and `routing_id` - # // (from the `app_profile_id` field) for routing. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&routing_id=profiles/prof_qux - # - # Example 8 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on several request fields. The - # last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // The `routing_id` can be a project id or a region id depending on - # // the table name format, but only if the `app_profile_id` is not set. - # // If `app_profile_id` is set it should be used instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=regions/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 9 - # - # Bringing it all together. - # - # annotation: - # - # option (google.api.routing) = { - # // For routing both `table_location` and a `routing_id` are needed. - # // - # // table_location can be either an instance id or a region+zone id. - # // - # // For `routing_id`, take the value of `app_profile_id` - # // - If it's in the format `profiles/`, send - # // just the `` part. - # // - If it's any other literal, send it as is. - # // If the `app_profile_id` is empty, and the `table_name` starts with - # // the project_id, send that instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_location=regions/*/zones/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "profiles/{routing_id=*}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_location=instances/instance_bar&routing_id=prof_qux - # @!attribute [rw] routing_parameters - # @return [::Array<::Google::Api::RoutingParameter>] - # A collection of Routing Parameter specifications. - # **NOTE:** If multiple Routing Parameters describe the same key - # (via the `path_template` field or via the `field` field when - # `path_template` is not provided), "last one wins" rule - # determines which Parameter gets used. - # See the examples for more details. - class RoutingRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A projection from an input message to the GRPC or REST header. - # @!attribute [rw] field - # @return [::String] - # A request field to extract the header key-value pair from. - # @!attribute [rw] path_template - # @return [::String] - # A pattern matching the key-value field. Optional. - # If not specified, the whole field specified in the `field` field will be - # taken as value, and its name used as key. If specified, it MUST contain - # exactly one named segment (along with any number of unnamed segments) The - # pattern will be matched over the field specified in the `field` field, then - # if the match is successful: - # - the name of the single named segment will be used as a header name, - # - the match value of the segment will be used as a header value; - # if the match is NOT successful, nothing will be sent. - # - # Example: - # - # -- This is a field in the request message - # | that the header value will be extracted from. - # | - # | -- This is the key name in the - # | | routing header. - # V | - # field: "table_name" v - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # ^ ^ - # | | - # In the {} brackets is the pattern that -- | - # specifies what to extract from the | - # field as a value to be sent. | - # | - # The string in the field must match the whole pattern -- - # before brackets, inside brackets, after brackets. - # - # When looking at this specific example, we can see that: - # - A key-value pair with the key `table_location` - # and the value matching `instances/*` should be added - # to the x-goog-request-params routing header. - # - The value is extracted from the request message's `table_name` field - # if it matches the full pattern specified: - # `projects/*/instances/*/tables/*`. - # - # **NB:** If the `path_template` field is not provided, the key name is - # equal to the field name, and the whole field should be sent as a value. - # This makes the pattern for the field and the value functionally equivalent - # to `**`, and the configuration - # - # { - # field: "table_name" - # } - # - # is a functionally equivalent shorthand to: - # - # { - # field: "table_name" - # path_template: "{table_name=**}" - # } - # - # See Example 1 for more details. - class RoutingParameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb deleted file mode 100644 index f387552a7073..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Geo - module Type - # A latitude-longitude viewport, represented as two diagonally opposite `low` - # and `high` points. A viewport is considered a closed region, i.e. it includes - # its boundary. The latitude bounds must range between -90 to 90 degrees - # inclusive, and the longitude bounds must range between -180 to 180 degrees - # inclusive. Various cases include: - # - # - If `low` = `high`, the viewport consists of that single point. - # - # - If `low.longitude` > `high.longitude`, the longitude range is inverted - # (the viewport crosses the 180 degree longitude line). - # - # - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, - # the viewport includes all longitudes. - # - # - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, - # the longitude range is empty. - # - # - If `low.latitude` > `high.latitude`, the latitude range is empty. - # - # Both `low` and `high` must be populated, and the represented box cannot be - # empty (as specified by the definitions above). An empty viewport will result - # in an error. - # - # For example, this viewport fully encloses New York City: - # - # { - # "low": { - # "latitude": 40.477398, - # "longitude": -74.259087 - # }, - # "high": { - # "latitude": 40.91618, - # "longitude": -73.70018 - # } - # } - # @!attribute [rw] low - # @return [::Google::Type::LatLng] - # Required. The low point of the viewport. - # @!attribute [rw] high - # @return [::Google::Type::LatLng] - # Required. The high point of the viewport. - class Viewport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb deleted file mode 100644 index 9855fd75847c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb +++ /dev/null @@ -1,394 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # Deprecated: TerminalPoints are no longer supported in Fleet Engine. Use - # `TerminalLocation.point` instead. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] place_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated. - # - # Note: The following fields are mutually exclusive: `place_id`, `generated_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] generated_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated. - # - # Note: The following fields are mutually exclusive: `generated_id`, `place_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] value - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated. - class TerminalPointId - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the location of a waypoint. - # @!attribute [rw] point - # @return [::Google::Type::LatLng] - # Required. Denotes the location of a trip waypoint. - # @!attribute [rw] terminal_point_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Maps::FleetEngine::V1::TerminalPointId] - # Deprecated: Specify the `point` field instead. - # @!attribute [rw] access_point_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated: Specify the `point` field instead. - # @!attribute [rw] trip_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated. - # @!attribute [rw] terminal_location_type - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Maps::FleetEngine::V1::WaypointType] - # Deprecated: `Vehicle.waypoint` will have this data. - class TerminalLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a stopping point on a vehicle's route or an ending point on a - # vehicle's trip. - # @!attribute [rw] location - # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] - # The location of this waypoint. - # @!attribute [rw] trip_id - # @return [::String] - # The trip associated with this waypoint. - # @!attribute [rw] waypoint_type - # @return [::Google::Maps::FleetEngine::V1::WaypointType] - # The role this waypoint plays in this trip, such as pickup or dropoff. - # @!attribute [rw] path_to_waypoint - # @return [::Array<::Google::Type::LatLng>] - # The path from the previous waypoint to the current waypoint. Undefined for - # the first waypoint in a list. This field is only populated when requested. - # @!attribute [rw] encoded_path_to_waypoint - # @return [::String] - # The encoded path from the previous waypoint to the current waypoint. - # - #

Note: This field is intended only for use by the Driver SDK and Consumer - # SDK. Decoding is not yet supported. - # @!attribute [rw] traffic_to_waypoint - # @return [::Google::Maps::FleetEngine::V1::ConsumableTrafficPolyline] - # The traffic conditions along the path to this waypoint. Note that traffic - # is only available for Google Map Platform Rides and Deliveries Solution - # customers. - # @!attribute [rw] distance_meters - # @return [::Google::Protobuf::Int32Value] - # The path distance from the previous waypoint to the current waypoint. - # Undefined for the first waypoint in a list. - # @!attribute [rw] eta - # @return [::Google::Protobuf::Timestamp] - # The estimated time of arrival at this waypoint. Undefined for the first - # waypoint in a list. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # The travel time from previous waypoint to this point. Undefined for the - # first waypoint in a list. - class TripWaypoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a vehicle attribute as a key-value pair. The "key:value" string - # length cannot exceed 256 characters. - # @!attribute [rw] key - # @return [::String] - # The attribute's key. Keys may not contain the colon character (:). - # @!attribute [rw] value - # @return [::String] - # The attribute's value. - # @!attribute [rw] string_value - # @return [::String] - # String typed attribute value. - # - # Note: This is identical to the `value` field which will eventually be - # deprecated. For create or update methods, either field can be used, but - # it's strongly recommended to use `string_value`. If both `string_value` - # and `value` are set, they must be identical or an error will be thrown. - # Both fields are populated in responses. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_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] - # Boolean typed attribute value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_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] - # Double typed attribute value. - # - # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class VehicleAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The location, speed, and heading of a vehicle at a point in time. - # @!attribute [rw] location - # @return [::Google::Type::LatLng] - # The location of the vehicle. - # When it is sent to Fleet Engine, the vehicle's location is a GPS location. - # When you receive it in a response, the vehicle's location can be either a - # GPS location, a supplemental location, or some other estimated location. - # The source is specified in `location_sensor`. - # @!attribute [rw] horizontal_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `latlng_accuracy` instead. - # @!attribute [rw] latlng_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `location` in meters as a radius. - # @!attribute [rw] heading - # @return [::Google::Protobuf::Int32Value] - # Direction the vehicle is moving in degrees. 0 represents North. - # The valid range is [0,360). - # @!attribute [rw] bearing_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `heading_accuracy` instead. - # @!attribute [rw] heading_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `heading` in degrees. - # @!attribute [rw] altitude - # @return [::Google::Protobuf::DoubleValue] - # Altitude in meters above WGS84. - # @!attribute [rw] vertical_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `altitude_accuracy` instead. - # @!attribute [rw] altitude_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `altitude` in meters. - # @!attribute [rw] speed_kmph - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Int32Value] - # Speed of the vehicle in kilometers per hour. - # Deprecated: Use `speed` instead. - # @!attribute [rw] speed - # @return [::Google::Protobuf::DoubleValue] - # Speed of the vehicle in meters/second - # @!attribute [rw] speed_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `speed` in meters/second. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when `location` was reported by the sensor according to the - # sensor's clock. - # @!attribute [r] server_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the server received the location information. - # @!attribute [rw] location_sensor - # @return [::Google::Maps::FleetEngine::V1::LocationSensor] - # Provider of location data (for example, `GPS`). - # @!attribute [rw] is_road_snapped - # @return [::Google::Protobuf::BoolValue] - # Whether `location` is snapped to a road. - # @!attribute [rw] is_gps_sensor_enabled - # @return [::Google::Protobuf::BoolValue] - # Input only. Indicates whether the GPS sensor is enabled on the mobile - # device. - # @!attribute [rw] time_since_update - # @return [::Google::Protobuf::Int32Value] - # Input only. Time (in seconds) since this location was first sent to the - # server. This will be zero for the first update. If the time is unknown (for - # example, when the app restarts), this value resets to zero. - # @!attribute [rw] num_stale_updates - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Int32Value] - # Input only. Deprecated: Other signals are now used to determine if a - # location is stale. - # @!attribute [rw] raw_location - # @return [::Google::Type::LatLng] - # Raw vehicle location (unprocessed by road-snapper). - # @!attribute [rw] raw_location_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp associated with the raw location. - # @!attribute [rw] raw_location_sensor - # @return [::Google::Maps::FleetEngine::V1::LocationSensor] - # Source of the raw location. Defaults to `GPS`. - # @!attribute [rw] raw_location_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `raw_location` as a radius, in meters. - # @!attribute [rw] flp_location - # @return [::Google::Type::LatLng] - # The location from Android's Fused Location Provider. - # @!attribute [rw] flp_update_time - # @return [::Google::Protobuf::Timestamp] - # Update timestamp of `flp_location`. - # @!attribute [rw] flp_latlng_accuracy_meters - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `flp_location` in meters as a radius. - # @!attribute [rw] flp_heading_degrees - # @return [::Google::Protobuf::Int32Value] - # Direction the vehicle is moving in degrees, as determined by the Fused - # Location Provider. 0 represents North. The valid range is [0,360). - # @!attribute [rw] supplemental_location - # @return [::Google::Type::LatLng] - # Supplemental location provided by the integrating app. - # @!attribute [rw] supplemental_location_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp associated with the supplemental location. - # @!attribute [rw] supplemental_location_sensor - # @return [::Google::Maps::FleetEngine::V1::LocationSensor] - # Source of the supplemental location. Defaults to - # `CUSTOMER_SUPPLIED_LOCATION`. - # @!attribute [rw] supplemental_location_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `supplemental_location` as a radius, in meters. - # @!attribute [rw] road_snapped - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Deprecated: Use `is_road_snapped` instead. - class VehicleLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a trip attribute as a key-value pair. The "key:value" string length - # cannot exceed 256 characters. - # @!attribute [rw] key - # @return [::String] - # The attribute's key. Keys may not contain the colon character (:). - # @!attribute [rw] string_value - # @return [::String] - # String typed attribute value. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_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] - # Boolean typed attribute value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_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] - # Double typed attribute value. - # - # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TripAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of a trip. - module TripType - # Default, used for unspecified or unrecognized trip types. - UNKNOWN_TRIP_TYPE = 0 - - # The trip may share a vehicle with other trips. - SHARED = 1 - - # The trip is exclusive to a vehicle. - EXCLUSIVE = 2 - end - - # The type of waypoint. - module WaypointType - # Unknown or unspecified waypoint type. - UNKNOWN_WAYPOINT_TYPE = 0 - - # Waypoints for picking up riders or items. - PICKUP_WAYPOINT_TYPE = 1 - - # Waypoints for dropping off riders or items. - DROP_OFF_WAYPOINT_TYPE = 2 - - # Waypoints for intermediate destinations in a multi-destination trip. - INTERMEDIATE_DESTINATION_WAYPOINT_TYPE = 3 - end - - # The type of polyline format. - module PolylineFormatType - # The format is unspecified or unknown. - UNKNOWN_FORMAT_TYPE = 0 - - # A list of `google.type.LatLng`. - LAT_LNG_LIST_TYPE = 1 - - # A polyline encoded with a polyline compression algorithm. Decoding is not - # yet supported. - ENCODED_POLYLINE_TYPE = 2 - end - - # The vehicle's navigation status. - module NavigationStatus - # Unspecified navigation status. - UNKNOWN_NAVIGATION_STATUS = 0 - - # The Driver app's navigation is in `FREE_NAV` mode. - NO_GUIDANCE = 1 - - # Turn-by-turn navigation is available and the Driver app navigation has - # entered `GUIDED_NAV` mode. - ENROUTE_TO_DESTINATION = 2 - - # The vehicle has gone off the suggested route. - OFF_ROUTE = 3 - - # The vehicle is within approximately 50m of the destination. - ARRIVED_AT_DESTINATION = 4 - end - - # The sensor or methodology used to determine the location. - module LocationSensor - # The sensor is unspecified or unknown. - UNKNOWN_SENSOR = 0 - - # GPS or Assisted GPS. - GPS = 1 - - # Assisted GPS, cell tower ID, or WiFi access point. - NETWORK = 2 - - # Cell tower ID or WiFi access point. - PASSIVE = 3 - - # A location determined by the mobile device to be the most likely - # road position. - ROAD_SNAPPED_LOCATION_PROVIDER = 4 - - # A customer-supplied location from an independent source. Typically, this - # value is used for a location provided from sources other than the mobile - # device running Driver SDK. If the original source is described by one of - # the other enum values, use that value. Locations marked - # CUSTOMER_SUPPLIED_LOCATION are typically provided via a Vehicle's - # `last_location.supplemental_location_sensor`. - CUSTOMER_SUPPLIED_LOCATION = 5 - - # A location calculated by Fleet Engine based on the signals available to it. - # Output only. This value will be rejected if it is received in a request. - FLEET_ENGINE_LOCATION = 6 - - # Android's Fused Location Provider. - FUSED_LOCATION_PROVIDER = 100 - - # The location provider on Apple operating systems. - CORE_LOCATION = 200 - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb deleted file mode 100644 index dbc08c7760c6..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb +++ /dev/null @@ -1,111 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # A RequestHeader contains fields common to all Fleet Engine RPC requests. - # @!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. If none - # is specified, the response may be in any language, with a preference for - # English if such a name exists. Field value example: `en-US`. - # @!attribute [rw] region_code - # @return [::String] - # Required. CLDR region code of the region where the request originates. - # Field value example: `US`. - # @!attribute [rw] sdk_version - # @return [::String] - # Version of the calling SDK, if applicable. - # The version format is "major.minor.patch", example: `1.1.2`. - # @!attribute [rw] os_version - # @return [::String] - # Version of the operating system on which the calling SDK is running. - # Field value examples: `4.4.1`, `12.1`. - # @!attribute [rw] device_model - # @return [::String] - # Model of the device on which the calling SDK is running. - # Field value examples: `iPhone12,1`, `SM-G920F`. - # @!attribute [rw] sdk_type - # @return [::Google::Maps::FleetEngine::V1::RequestHeader::SdkType] - # The type of SDK sending the request. - # @!attribute [rw] maps_sdk_version - # @return [::String] - # Version of the MapSDK which the calling SDK depends on, if applicable. - # The version format is "major.minor.patch", example: `5.2.1`. - # @!attribute [rw] nav_sdk_version - # @return [::String] - # Version of the NavSDK which the calling SDK depends on, if applicable. - # The version format is "major.minor.patch", example: `2.1.0`. - # @!attribute [rw] platform - # @return [::Google::Maps::FleetEngine::V1::RequestHeader::Platform] - # Platform of the calling SDK. - # @!attribute [rw] manufacturer - # @return [::String] - # Manufacturer of the Android device from the calling SDK, only applicable - # for the Android SDKs. - # Field value example: `Samsung`. - # @!attribute [rw] android_api_level - # @return [::Integer] - # Android API level of the calling SDK, only applicable for the Android SDKs. - # Field value example: `23`. - # @!attribute [rw] trace_id - # @return [::String] - # Optional ID that can be provided for logging purposes in order to identify - # the request. - class RequestHeader - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible types of SDK. - module SdkType - # The default value. This value is used if the `sdk_type` is omitted. - SDK_TYPE_UNSPECIFIED = 0 - - # The calling SDK is Consumer. - CONSUMER = 1 - - # The calling SDK is Driver. - DRIVER = 2 - - # The calling SDK is JavaScript. - JAVASCRIPT = 3 - end - - # The platform of the calling SDK. - module Platform - # The default value. This value is used if the platform is omitted. - PLATFORM_UNSPECIFIED = 0 - - # The request is coming from Android. - ANDROID = 1 - - # The request is coming from iOS. - IOS = 2 - - # The request is coming from the web. - WEB = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb deleted file mode 100644 index 024d9a7221d4..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # Traffic density indicator on a contiguous segment of a path. Given a path - # with points P_0, P_1, ... , P_N (zero-based index), the SpeedReadingInterval - # defines an interval and describes its traffic using the following categories. - # @!attribute [rw] start_polyline_point_index - # @return [::Integer] - # The starting index of this interval in the path. - # In JSON, when the index is 0, the field will appear to be unpopulated. - # @!attribute [rw] end_polyline_point_index - # @return [::Integer] - # The ending index of this interval in the path. - # In JSON, when the index is 0, the field will appear to be unpopulated. - # @!attribute [rw] speed - # @return [::Google::Maps::FleetEngine::V1::SpeedReadingInterval::Speed] - # Traffic speed in this interval. - class SpeedReadingInterval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The classification of polyline speed based on traffic data. - module Speed - # Default value. This value is unused. - SPEED_UNSPECIFIED = 0 - - # Normal speed, no traffic delays. - NORMAL = 1 - - # Slowdown detected, medium amount of traffic. - SLOW = 2 - - # Traffic delays. - TRAFFIC_JAM = 3 - end - end - - # Traffic density along a Vehicle's path. - # @!attribute [rw] speed_reading_interval - # @return [::Array<::Google::Maps::FleetEngine::V1::SpeedReadingInterval>] - # Traffic speed along the path from the previous waypoint to the current - # waypoint. - # @!attribute [rw] encoded_path_to_waypoint - # @return [::String] - # The path the driver is taking from the previous waypoint to the current - # waypoint. This path has landmarks in it so clients can show traffic markers - # along the path (see `speed_reading_interval`). Decoding is not yet - # supported. - class ConsumableTrafficPolyline - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb deleted file mode 100644 index 4bf45f469f13..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb +++ /dev/null @@ -1,312 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # CreateTrip request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] trip_id - # @return [::String] - # Required. Unique Trip ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] trip - # @return [::Google::Maps::FleetEngine::V1::Trip] - # Required. Trip entity to create. - # - # When creating a Trip, the following fields are required: - # - # * `trip_type` - # * `pickup_point` - # - # The following fields are used if you provide them: - # - # * `number_of_passengers` - # * `vehicle_id` - # * `dropoff_point` - # * `intermediate_destinations` - # * `vehicle_waypoints` - # - # All other Trip fields are ignored. For example, all trips start with a - # `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in - # the creation request. - # - # Only `EXCLUSIVE` trips support `intermediate_destinations`. - # - # When `vehicle_id` is set for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints for the vehicle, otherwise the waypoint order will be - # undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - class CreateTripRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GetTrip request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] view - # @return [::Google::Maps::FleetEngine::V1::TripView] - # The subset of Trip fields that should be returned and their interpretation. - # @!attribute [rw] current_route_segment_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the minimum timestamp (exclusive) for which `Trip.route` or - # `Trip.current_route_segment` data are retrieved. If route data are - # unchanged since this timestamp, the route field is not set in the response. - # If a minimum is unspecified, the route data are always retrieved. - # @!attribute [rw] remaining_waypoints_version - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Timestamp] - # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use - # `remaining_waypoints_route_version` to control when - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. - # @!attribute [rw] route_format_type - # @return [::Google::Maps::FleetEngine::V1::PolylineFormatType] - # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), - # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default - # is `LAT_LNG_LIST_TYPE`. - # @!attribute [rw] current_route_segment_traffic_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.current_route_segment_traffic` is retrieved. If traffic data are - # unchanged since this timestamp, the `current_route_segment_traffic` field - # is not set in the response. If a minimum is unspecified, the traffic data - # are always retrieved. Note that traffic is only available for On-Demand - # Rides and Deliveries Solution customers. - # @!attribute [rw] remaining_waypoints_route_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are - # unchanged since this timestamp, the fields above are - # not set in the response. If `remaining_waypoints_route_version` is - # unspecified, traffic and path are always retrieved. - class GetTripRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteTrip request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # Optional. The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - class DeleteTripRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ReportBillableTrip request message. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/billableTrips/{billable_trip}`. The - # provider must be the Project ID (for example, `sample-cloud-project`) of - # the Google Cloud Project of which the service account making this call is a - # member. - # @!attribute [rw] country_code - # @return [::String] - # Required. Two letter country code of the country where the trip takes - # place. Price is defined according to country code. - # @!attribute [rw] platform - # @return [::Google::Maps::FleetEngine::V1::BillingPlatformIdentifier] - # The platform upon which the request was issued. - # @!attribute [rw] related_ids - # @return [::Array<::String>] - # The identifiers that are directly related to the trip being reported. These - # are usually IDs (for example, session IDs) of pre-booking operations done - # before the trip ID is available. The number of `related_ids` is - # limited to 50. - # @!attribute [rw] solution_type - # @return [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest::SolutionType] - # The type of GMP product solution (for example, - # `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip. - class ReportBillableTripRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Selector for different solution types of a reported trip. - module SolutionType - # The default value. For backwards-compatibility, the API will use - # `ON_DEMAND_RIDESHARING_AND_DELIVERIES` by default which is the first - # supported solution type. - SOLUTION_TYPE_UNSPECIFIED = 0 - - # The solution is an on-demand ridesharing and deliveries trip. - ON_DEMAND_RIDESHARING_AND_DELIVERIES = 1 - end - end - - # UpdateTrip request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/trips/{trip}`. The provider must - # be the Project ID (for example, `sample-consumer-project`) of the Google - # Cloud Project of which the service account making this call is a member. - # @!attribute [rw] trip - # @return [::Google::Maps::FleetEngine::V1::Trip] - # Required. The Trip associated with the update. - # - # The following fields are maintained by the Fleet Engine. Do not update - # them using Trip.update. - # - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_traffic` - # * `current_route_segment_traffic_version` - # * `current_route_segment_version` - # * `dropoff_time` - # * `eta_to_next_waypoint` - # * `intermediate_destinations_version` - # * `last_location` - # * `name` - # * `number_of_passengers` - # * `pickup_time` - # * `remaining_distance_meters` - # * `remaining_time_to_first_waypoint` - # * `remaining_waypoints` - # * `remaining_waypoints_version` - # * `route` - # - # When you update the `Trip.vehicle_id` for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints, otherwise the order will be undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - # - # To avoid a race condition for trips with multiple destinations, you - # should provide `Trip.intermediate_destinations_version` when updating - # the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The - # `Trip.intermediate_destinations_version` passed must be consistent with - # Fleet Engine's version. If it isn't, the request fails. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The field mask indicating which fields in Trip to update. - # The `update_mask` must contain at least one field. - class UpdateTripRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # SearchTrips request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] vehicle_id - # @return [::String] - # The vehicle associated with the trips in the request. If unspecified, the - # returned trips do not contain: - # - # * `current_route_segment` - # * `remaining_waypoints` - # * `remaining_distance_meters` - # * `eta_to_first_waypoint` - # @!attribute [rw] active_trips_only - # @return [::Boolean] - # If set to true, the response includes Trips that influence a driver's - # route. - # @!attribute [rw] page_size - # @return [::Integer] - # If not set, the server decides the number of results to return. - # @!attribute [rw] page_token - # @return [::String] - # Set this to a value previously returned in the `SearchTripsResponse` to - # continue from previous results. - # @!attribute [rw] minimum_staleness - # @return [::Google::Protobuf::Duration] - # If specified, returns the trips that have not been updated after the time - # `(current - minimum_staleness)`. - class SearchTripsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # SearchTrips response message. - # @!attribute [rw] trips - # @return [::Array<::Google::Maps::FleetEngine::V1::Trip>] - # The list of trips for the requested vehicle. - # @!attribute [rw] next_page_token - # @return [::String] - # Pass this token in the SearchTripsRequest to page through list results. The - # API returns a trip list on each call, and when no more results remain the - # trip list is empty. - class SearchTripsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb deleted file mode 100644 index e5dd08d4fdac..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb +++ /dev/null @@ -1,289 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # Trip metadata. - # @!attribute [r] name - # @return [::String] - # Output only. In the format "providers/\\{provider}/trips/\\{trip}" - # @!attribute [rw] vehicle_id - # @return [::String] - # ID of the vehicle making this trip. - # @!attribute [rw] trip_status - # @return [::Google::Maps::FleetEngine::V1::TripStatus] - # Current status of the trip. - # @!attribute [rw] trip_type - # @return [::Google::Maps::FleetEngine::V1::TripType] - # The type of the trip. - # @!attribute [rw] pickup_point - # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] - # Location where customer indicates they will be picked up. - # @!attribute [rw] actual_pickup_point - # @return [::Google::Maps::FleetEngine::V1::StopLocation] - # Input only. The actual location when and where customer was picked up. - # This field is for provider to provide feedback on actual pickup - # information. - # @!attribute [rw] actual_pickup_arrival_point - # @return [::Google::Maps::FleetEngine::V1::StopLocation] - # Input only. The actual time and location of the driver arrival at - # the pickup point. - # This field is for provider to provide feedback on actual arrival - # information at the pickup point. - # @!attribute [r] pickup_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Either the estimated future time when the rider(s) will be - # picked up, or the actual time when they were picked up. - # @!attribute [rw] intermediate_destinations - # @return [::Array<::Google::Maps::FleetEngine::V1::TerminalLocation>] - # Intermediate stops in order that the trip requests (in addition - # to pickup and dropoff). Initially this will not be supported for shared - # trips. - # @!attribute [rw] intermediate_destinations_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the last time the `intermediate_destinations` was modified. - # Your server should cache this value and pass it in `UpdateTripRequest` - # when update `intermediate_destination_index` to ensure the - # `intermediate_destinations` is not changed. - # @!attribute [rw] intermediate_destination_index - # @return [::Integer] - # When `TripStatus` is `ENROUTE_TO_INTERMEDIATE_DESTINATION`, a number - # between [0..N-1] indicating which intermediate destination the vehicle will - # cross next. When `TripStatus` is `ARRIVED_AT_INTERMEDIATE_DESTINATION`, a - # number between [0..N-1] indicating which intermediate destination the - # vehicle is at. The provider sets this value. If there are no - # `intermediate_destinations`, this field is ignored. - # @!attribute [rw] actual_intermediate_destination_arrival_points - # @return [::Array<::Google::Maps::FleetEngine::V1::StopLocation>] - # Input only. The actual time and location of the driver's arrival at - # an intermediate destination. - # This field is for provider to provide feedback on actual arrival - # information at intermediate destinations. - # @!attribute [rw] actual_intermediate_destinations - # @return [::Array<::Google::Maps::FleetEngine::V1::StopLocation>] - # Input only. The actual time and location when and where the customer was - # picked up from an intermediate destination. This field is for provider to - # provide feedback on actual pickup information at intermediate destinations. - # @!attribute [rw] dropoff_point - # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] - # Location where customer indicates they will be dropped off. - # @!attribute [rw] actual_dropoff_point - # @return [::Google::Maps::FleetEngine::V1::StopLocation] - # Input only. The actual time and location when and where customer was - # dropped off. This field is for provider to provide feedback on actual - # dropoff information. - # @!attribute [r] dropoff_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Either the estimated future time when the rider(s) will be - # dropped off at the final destination, or the actual time when they were - # dropped off. - # @!attribute [r] remaining_waypoints - # @return [::Array<::Google::Maps::FleetEngine::V1::TripWaypoint>] - # Output only. The full path from the current location to the dropoff point, - # inclusive. This path could include waypoints from other trips. - # @!attribute [rw] vehicle_waypoints - # @return [::Array<::Google::Maps::FleetEngine::V1::TripWaypoint>] - # This field supports manual ordering of the waypoints for the trip. It - # contains all of the remaining waypoints for the assigned vehicle, as well - # as the pickup and drop-off waypoints for this trip. If the trip hasn't been - # assigned to a vehicle, then Fleet Engine ignores this field. For privacy - # reasons, this field is only populated by the server on `UpdateTrip` and - # `CreateTrip` calls, NOT on `GetTrip` calls. - # @!attribute [r] route - # @return [::Array<::Google::Type::LatLng>] - # Output only. Anticipated route for this trip to the first entry in - # remaining_waypoints. Note that the first waypoint may belong to a different - # trip. - # @!attribute [r] current_route_segment - # @return [::String] - # Output only. An encoded path to the next waypoint. - # - # Note: This field is intended only for use by the Driver SDK and Consumer - # SDK. Decoding is not yet supported. - # @!attribute [r] current_route_segment_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Indicates the last time the route was modified. - # - # Note: This field is intended only for use by the Driver SDK and Consumer - # SDK. - # @!attribute [r] current_route_segment_traffic - # @return [::Google::Maps::FleetEngine::V1::ConsumableTrafficPolyline] - # Output only. Indicates the traffic conditions along the - # `current_route_segment` when they're available. - # - # Note: This field is intended only for use by the Driver SDK and Consumer - # SDK. - # @!attribute [r] current_route_segment_traffic_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Indicates the last time the `current_route_segment_traffic` - # was modified. - # - # Note: This field is intended only for use by the Driver SDK and Consumer - # SDK. - # @!attribute [r] current_route_segment_end_point - # @return [::Google::Maps::FleetEngine::V1::TripWaypoint] - # Output only. The waypoint where `current_route_segment` ends. - # @!attribute [r] remaining_distance_meters - # @return [::Google::Protobuf::Int32Value] - # Output only. The remaining driving distance in the `current_route_segment` - # field. The value is unspecified if the trip is not assigned to a vehicle, - # or the trip is completed or cancelled. - # @!attribute [r] eta_to_first_waypoint - # @return [::Google::Protobuf::Timestamp] - # Output only. The ETA to the next waypoint (the first entry in the - # `remaining_waypoints` field). The value is unspecified if the trip is not - # assigned to a vehicle, or the trip is inactive (completed or cancelled). - # @!attribute [r] remaining_time_to_first_waypoint - # @return [::Google::Protobuf::Duration] - # Output only. The duration from when the Trip data is returned to the time - # in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is - # not assigned to a vehicle, or the trip is inactive (completed or - # cancelled). - # @!attribute [r] remaining_waypoints_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Indicates the last time that `remaining_waypoints` was changed - # (a waypoint was added, removed, or changed). - # @!attribute [r] remaining_waypoints_route_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Indicates the last time the - # `remaining_waypoints.path_to_waypoint` and - # `remaining_waypoints.traffic_to_waypoint` were modified. Your client app - # should cache this value and pass it in `GetTripRequest` to ensure the - # paths and traffic for `remaining_waypoints` are only returned if updated. - # @!attribute [rw] number_of_passengers - # @return [::Integer] - # Immutable. Indicates the number of passengers on this trip and does not - # include the driver. A vehicle must have available capacity to be returned - # in a `SearchVehicles` response. - # @!attribute [r] last_location - # @return [::Google::Maps::FleetEngine::V1::VehicleLocation] - # Output only. Indicates the last reported location of the vehicle along the - # route. - # @!attribute [r] last_location_snappable - # @return [::Boolean] - # Output only. Indicates whether the vehicle's `last_location` can be snapped - # to the current_route_segment. False if `last_location` or - # `current_route_segment` doesn't exist. - # It is computed by Fleet Engine. Any update from clients will be ignored. - # @!attribute [rw] view - # @return [::Google::Maps::FleetEngine::V1::TripView] - # The subset of Trip fields that are populated and how they should be - # interpreted. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::TripAttribute>] - # A list of custom Trip attributes. Each attribute must have a unique key. - class Trip - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The actual location where a stop (pickup/dropoff) happened. - # @!attribute [rw] point - # @return [::Google::Type::LatLng] - # Required. Denotes the actual location. - # @!attribute [rw] timestamp - # @return [::Google::Protobuf::Timestamp] - # Indicates when the stop happened. - # @!attribute [rw] stop_time - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Timestamp] - # Input only. Deprecated. Use the timestamp field. - class StopLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The status of a trip indicating its progression. - module TripStatus - # Default, used for unspecified or unrecognized trip status. - UNKNOWN_TRIP_STATUS = 0 - - # Newly created trip. - NEW = 1 - - # The driver is on their way to the pickup point. - ENROUTE_TO_PICKUP = 2 - - # The driver has arrived at the pickup point. - ARRIVED_AT_PICKUP = 3 - - # The driver has arrived at an intermediate destination and is waiting for - # the rider. - ARRIVED_AT_INTERMEDIATE_DESTINATION = 7 - - # The driver is on their way to an intermediate destination - # (not the dropoff point). - ENROUTE_TO_INTERMEDIATE_DESTINATION = 8 - - # The driver has picked up the rider and is on their way to the - # next destination. - ENROUTE_TO_DROPOFF = 4 - - # The rider has been dropped off and the trip is complete. - COMPLETE = 5 - - # The trip was canceled prior to pickup by the driver, rider, or - # rideshare provider. - CANCELED = 6 - end - - # A set of values that indicate upon which platform the request was issued. - module BillingPlatformIdentifier - # Default. Used for unspecified platforms. - BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED = 0 - - # The platform is a client server. - SERVER = 1 - - # The platform is a web browser. - WEB = 2 - - # The platform is an Android mobile device. - ANDROID = 3 - - # The platform is an IOS mobile device. - IOS = 4 - - # Other platforms that are not listed in this enumeration. - OTHERS = 5 - end - - # Selector for different sets of Trip fields in a `GetTrip` response. See - # [AIP-157](https://google.aip.dev/157) for context. Additional views are - # likely to be added. - module TripView - # The default value. For backwards-compatibility, the API will default to an - # SDK view. To ensure stability and support, customers are - # advised to select a `TripView` other than `SDK`. - TRIP_VIEW_UNSPECIFIED = 0 - - # Includes fields that may not be interpretable or supportable using - # publicly available libraries. - SDK = 1 - - # Trip fields are populated for the Journey Sharing use case. This view is - # intended for server-to-server communications. - JOURNEY_SHARING_V1S = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb deleted file mode 100644 index 501bd43c50a3..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb +++ /dev/null @@ -1,674 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # `CreateVehicle` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] vehicle_id - # @return [::String] - # Required. Unique Vehicle ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] vehicle - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # Required. The Vehicle entity to create. When creating a Vehicle, the - # following fields are required: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # When creating a Vehicle, the following fields are ignored: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - class CreateVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `GetVehicle` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] current_route_segment_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the minimum timestamp (exclusive) for which - # `Vehicle.current_route_segment` is retrieved. - # If the route is unchanged since this timestamp, the `current_route_segment` - # field is not set in the response. If a minimum is unspecified, the - # `current_route_segment` is always retrieved. - # @!attribute [rw] waypoints_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints` - # data is retrieved. If the waypoints are unchanged since this timestamp, the - # `vehicle.waypoints` data is not set in the response. If this field is - # unspecified, `vehicle.waypoints` is always retrieved. - class GetVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteVehicle request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # Optional. The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - class DeleteVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `UpdateVehicle request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] vehicle - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # Required. The `Vehicle` entity values to apply. When updating a `Vehicle`, - # the following fields may not be updated as they are managed by the - # server. - # - # * `available_capacity` - # * `current_route_segment_version` - # * `current_trips` - # * `name` - # * `waypoints_version` - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. - # - # Likewise, the `waypoints` field can be updated, but must contain all the - # waypoints currently on the vehicle, and no other waypoints. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A field mask indicating which fields of the `Vehicle` to update. - # At least one field name must be provided. - class UpdateVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `UpdateVehicleAttributes` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] - # Required. The vehicle attributes to update. Unmentioned attributes are not - # altered or removed. - class UpdateVehicleAttributesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `UpdateVehicleAttributes` response message. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] - # Required. The updated full list of vehicle attributes, including new, - # altered, and untouched attributes. - class UpdateVehicleAttributesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `SearchVehicles` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] pickup_point - # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] - # Required. The pickup point to search near. - # @!attribute [rw] dropoff_point - # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] - # The customer's intended dropoff location. The field is required if - # `trip_types` contains `TripType.SHARED`. - # @!attribute [rw] pickup_radius_meters - # @return [::Integer] - # Required. Defines the vehicle search radius around the pickup point. Only - # vehicles within the search radius will be returned. Value must be between - # 400 and 10000 meters (inclusive). - # @!attribute [rw] count - # @return [::Integer] - # Required. Specifies the maximum number of vehicles to return. The value - # must be between 1 and 50 (inclusive). - # @!attribute [rw] minimum_capacity - # @return [::Integer] - # Required. Specifies the number of passengers being considered for a trip. - # The value must be greater than or equal to one. The driver is not - # considered in the capacity value. - # @!attribute [rw] trip_types - # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Required. Represents the type of proposed trip. Must include exactly one - # type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only - # those vehicles that can support that trip type. - # @!attribute [rw] maximum_staleness - # @return [::Google::Protobuf::Duration] - # Restricts the search to only those vehicles that have sent location updates - # to Fleet Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If this field is not - # set, the server uses five minutes as the default value. - # @!attribute [rw] vehicle_types - # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType>] - # Required. Restricts the search to vehicles with one of the specified types. - # At least one vehicle type must be specified. VehicleTypes with a category - # of `UNKNOWN` are not allowed. - # @!attribute [rw] required_attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the search to only those vehicles with the specified attributes. - # This field is a conjunction/AND operation. A max of 50 required_attributes - # is allowed. This matches the maximum number of attributes allowed on a - # vehicle. - # @!attribute [rw] required_one_of_attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList>] - # Restricts the search to only those vehicles with at least one of - # the specified attributes in each `VehicleAttributeList`. Within each - # list, a vehicle must match at least one of the attributes. This field is an - # inclusive disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # @!attribute [rw] required_one_of_attribute_sets - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the search to only those vehicles with all the attributes in a - # `VehicleAttributeList`. Within each list, a - # vehicle must match all of the attributes. This field is a conjunction/AND - # operation in each `VehicleAttributeList` and inclusive disjunction/OR - # operation across the collection of `VehicleAttributeList`. - # @!attribute [rw] order_by - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] - # Required. Specifies the desired ordering criterion for results. - # @!attribute [rw] include_back_to_back - # @return [::Boolean] - # This indicates if vehicles with a single active trip are eligible for this - # search. This field is only used when `current_trips_present` is - # unspecified. When `current_trips_present` is unspecified and this field - # is `false`, vehicles with assigned trips are excluded from the search - # results. When `current_trips_present` is unspecified and this field is - # `true`, search results can include vehicles with one active trip that has a - # status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified, - # this field cannot be set to true. - # - # The default value is `false`. - # @!attribute [rw] trip_id - # @return [::String] - # Indicates the trip associated with this `SearchVehicleRequest`. - # @!attribute [rw] current_trips_present - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::CurrentTripsPresent] - # This indicates if vehicles with active trips are eligible for this search. - # This must be set to something other than - # `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter query to apply when searching vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `minimum_capacity` or `vehicle_types`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - class SearchVehiclesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the order of the vehicle matches in the response. - module VehicleMatchOrder - # Default, used for unspecified or unrecognized vehicle matches order. - UNKNOWN_VEHICLE_MATCH_ORDER = 0 - - # Ascending order by vehicle driving time to the pickup point. - PICKUP_POINT_ETA = 1 - - # Ascending order by vehicle driving distance to the pickup point. - PICKUP_POINT_DISTANCE = 2 - - # Ascending order by vehicle driving time to the dropoff point. This order - # can only be used if the dropoff point is specified in the request. - DROPOFF_POINT_ETA = 3 - - # Ascending order by straight-line distance from the vehicle's last - # reported location to the pickup point. - PICKUP_POINT_STRAIGHT_DISTANCE = 4 - - # Ascending order by the configured match cost. Match cost is defined as a - # weighted calculation between straight-line distance and ETA. Weights are - # set with default values and can be modified per customer. Please contact - # Google support if these weights need to be modified for your project. - COST = 5 - end - - # Specifies the types of restrictions on a vehicle's current trips. - module CurrentTripsPresent - # The availability of vehicles with trips present is governed by the - # `include_back_to_back` field. - CURRENT_TRIPS_PRESENT_UNSPECIFIED = 0 - - # Vehicles without trips can appear in search results. When this value is - # used, `include_back_to_back` cannot be `true`. - NONE = 1 - - # Vehicles with at most 5 current trips and 10 waypoints are included - # in the search results. When this value is used, `include_back_to_back` - # cannot be `true`. - ANY = 2 - end - end - - # `SearchVehicles` response message. - # @!attribute [rw] matches - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleMatch>] - # List of vehicles that match the `SearchVehiclesRequest` criteria, ordered - # according to `SearchVehiclesRequest.order_by` field. - class SearchVehiclesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListVehicles` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of vehicles to return. - # Default value: 100. - # @!attribute [rw] page_token - # @return [::String] - # The value of the `next_page_token` provided by a previous call to - # `ListVehicles` so that you can paginate through groups of vehicles. The - # value is undefined if the filter criteria of the request is not the same as - # the filter criteria for the previous call to `ListVehicles`. - # @!attribute [rw] minimum_capacity - # @return [::Google::Protobuf::Int32Value] - # Specifies the required minimum capacity of the vehicle. All vehicles - # returned will have a `maximum_capacity` greater than or equal to this - # value. If set, must be greater or equal to 0. - # @!attribute [rw] trip_types - # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Restricts the response to vehicles that support at least one of the - # specified trip types. - # @!attribute [rw] maximum_staleness - # @return [::Google::Protobuf::Duration] - # Restricts the response to vehicles that have sent location updates to Fleet - # Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If present, must be - # a valid positive duration. - # @!attribute [rw] vehicle_type_categories - # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category>] - # Required. Restricts the response to vehicles with one of the specified type - # categories. `UNKNOWN` is not allowed. - # @!attribute [rw] required_attributes - # @return [::Array<::String>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the response to vehicles with the specified attributes. This - # field is a conjunction/AND operation. A max of 50 required_attributes is - # allowed. This matches the maximum number of attributes allowed on a - # vehicle. Each repeated string should be of the format "key:value". - # @!attribute [rw] required_one_of_attributes - # @return [::Array<::String>] - # Restricts the response to vehicles with at least one of the specified - # attributes in each `VehicleAttributeList`. Within each list, a vehicle must - # match at least one of the attributes. This field is an inclusive - # disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # Each repeated string should be of the format - # "key1:value1|key2:value2|key3:value3". - # @!attribute [rw] required_one_of_attribute_sets - # @return [::Array<::String>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the response to vehicles that match all the attributes in a - # `VehicleAttributeList`. Within each list, a vehicle must match all of the - # attributes. This field is a conjunction/AND operation in each - # `VehicleAttributeList` and inclusive disjunction/OR operation across the - # collection of `VehicleAttributeList`. Each repeated string should be of the - # format "key1:value1|key2:value2|key3:value3". - # @!attribute [rw] vehicle_state - # @return [::Google::Maps::FleetEngine::V1::VehicleState] - # Restricts the response to vehicles that have this vehicle state. - # @!attribute [rw] on_trip_only - # @return [::Boolean] - # Only return the vehicles with current trip(s). - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter query to apply when listing vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `vehicle_state` or `on_trip_only`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # @!attribute [rw] viewport - # @return [::Google::Geo::Type::Viewport] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - class ListVehiclesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListVehicles` response message. - # @!attribute [rw] vehicles - # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle>] - # Vehicles matching the criteria in the request. - # The maximum number of vehicles returned is determined by the `page_size` - # field in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of vehicles, or empty if there are no - # more vehicles that meet the request criteria. - # @!attribute [rw] total_size - # @return [::Integer] - # Required. Total number of vehicles matching the request criteria across all - # pages. - class ListVehiclesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes intermediate points along a route for a `VehicleMatch` in a - # `SearchVehiclesResponse`. This concept is represented as a `TripWaypoint` in - # all other endpoints. - # @!attribute [rw] lat_lng - # @return [::Google::Type::LatLng] - # The location of this waypoint. - # @!attribute [rw] eta - # @return [::Google::Protobuf::Timestamp] - # The estimated time that the vehicle will arrive at this waypoint. - class Waypoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains the vehicle and related estimates for a vehicle that match the - # points of active trips for the vehicle `SearchVehiclesRequest`. - # @!attribute [rw] vehicle - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # Required. A vehicle that matches the request. - # @!attribute [rw] vehicle_pickup_eta - # @return [::Google::Protobuf::Timestamp] - # The vehicle's driving ETA to the pickup point specified in the - # request. An empty value indicates a failure in calculating ETA for the - # vehicle. If `SearchVehiclesRequest.include_back_to_back` was `true` and - # this vehicle has an active trip, `vehicle_pickup_eta` includes the time - # required to complete the current active trip. - # @!attribute [rw] vehicle_pickup_distance_meters - # @return [::Google::Protobuf::Int32Value] - # The distance from the Vehicle's current location to the pickup point - # specified in the request, including any intermediate pickup or dropoff - # points for existing trips. This distance comprises the calculated driving - # (route) distance, plus the straight line distance between the navigation - # end point and the requested pickup point. (The distance between the - # navigation end point and the requested pickup point is typically small.) An - # empty value indicates an error in calculating the distance. - # @!attribute [rw] vehicle_pickup_straight_line_distance_meters - # @return [::Google::Protobuf::Int32Value] - # Required. The straight-line distance between the vehicle and the pickup - # point specified in the request. - # @!attribute [rw] vehicle_dropoff_eta - # @return [::Google::Protobuf::Timestamp] - # The complete vehicle's driving ETA to the drop off point specified in the - # request. The ETA includes stopping at any waypoints before the - # `dropoff_point` specified in the request. The value will only be populated - # when a drop off point is specified in the request. An empty value indicates - # an error calculating the ETA. - # @!attribute [rw] vehicle_pickup_to_dropoff_distance_meters - # @return [::Google::Protobuf::Int32Value] - # The vehicle's driving distance (in meters) from the pickup point - # to the drop off point specified in the request. The distance is only - # between the two points and does not include the vehicle location or any - # other points that must be visited before the vehicle visits either the - # pickup point or dropoff point. The value will only be populated when a - # `dropoff_point` is specified in the request. An empty value indicates - # a failure in calculating the distance from the pickup to - # drop off point specified in the request. - # @!attribute [rw] trip_type - # @return [::Google::Maps::FleetEngine::V1::TripType] - # Required. The trip type of the request that was used to calculate the ETA - # to the pickup point. - # @!attribute [rw] vehicle_trips_waypoints - # @return [::Array<::Google::Maps::FleetEngine::V1::Waypoint>] - # The ordered list of waypoints used to calculate the ETA. The list - # includes vehicle location, the pickup points of active - # trips for the vehicle, and the pickup points provided in the - # request. An empty list indicates a failure in calculating ETA for the - # vehicle. - # @!attribute [rw] vehicle_match_type - # @return [::Google::Maps::FleetEngine::V1::VehicleMatch::VehicleMatchType] - # Type of the vehicle match. - # @!attribute [rw] requested_ordered_by - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] - # The order requested for sorting vehicle matches. Equivalent to - # `ordered_by`. - # @!attribute [rw] ordered_by - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] - # The order requested for sorting vehicle matches. Equivalent to - # `requested_ordered_by`. - class VehicleMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of vehicle match. - module VehicleMatchType - # Unknown vehicle match type - UNKNOWN = 0 - - # The vehicle currently has no trip assigned to it and can proceed to the - # pickup point. - EXCLUSIVE = 1 - - # The vehicle is currently assigned to a trip, but can proceed to the - # pickup point after completing the in-progress trip. ETA and distance - # calculations take the existing trip into account. - BACK_TO_BACK = 2 - - # The vehicle has sufficient capacity for a shared ride. - CARPOOL = 3 - - # The vehicle will finish its current, active trip before proceeding to the - # pickup point. ETA and distance calculations take the existing trip into - # account. - CARPOOL_BACK_TO_BACK = 4 - end - end - - # A list-of-lists datatype for vehicle attributes. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] - # A list of attributes in this collection. - class VehicleAttributeList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb deleted file mode 100644 index 59703d2da0b2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb +++ /dev/null @@ -1,365 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # Vehicle metadata. - # @!attribute [r] name - # @return [::String] - # Output only. The unique name for this vehicle. - # The format is `providers/{provider}/vehicles/{vehicle}`. - # @!attribute [rw] vehicle_state - # @return [::Google::Maps::FleetEngine::V1::VehicleState] - # The vehicle state. - # @!attribute [rw] supported_trip_types - # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Trip types supported by this vehicle. - # @!attribute [r] current_trips - # @return [::Array<::String>] - # Output only. List of `trip_id`'s for trips currently assigned to this - # vehicle. - # @!attribute [rw] last_location - # @return [::Google::Maps::FleetEngine::V1::VehicleLocation] - # Last reported location of the vehicle. - # @!attribute [rw] past_locations - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleLocation>] - # Input only. Locations where this vehicle has been in the past that haven't - # yet been reported to Fleet Engine. This is used in `UpdateVehicleRequest` - # to record locations which were previously unable to be sent to the server. - # Typically this happens when the vehicle does not have internet - # connectivity. - # @!attribute [rw] maximum_capacity - # @return [::Integer] - # The total numbers of riders this vehicle can carry. The driver is not - # considered in this value. This value must be greater than or equal to one. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] - # List of vehicle attributes. A vehicle can have at most 100 - # attributes, and each attribute must have a unique key. - # @!attribute [rw] vehicle_type - # @return [::Google::Maps::FleetEngine::V1::Vehicle::VehicleType] - # Required. The type of this vehicle. Can be used to filter vehicles in - # `SearchVehicles` results. Also influences ETA and route calculations. - # @!attribute [rw] license_plate - # @return [::Google::Maps::FleetEngine::V1::LicensePlate] - # License plate information for the vehicle. - # @!attribute [rw] route - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::Google::Maps::FleetEngine::V1::TerminalLocation>] - # Deprecated: Use `Vehicle.waypoints` instead. - # @!attribute [rw] current_route_segment - # @return [::String] - # The polyline specifying the route the driver app intends to take to - # the next waypoint. This list is also returned in - # `Trip.current_route_segment` for all active trips assigned to the vehicle. - # - # Note: This field is intended only for use by the Driver SDK. Decoding is - # not yet supported. - # @!attribute [rw] current_route_segment_traffic - # @return [::Google::Maps::FleetEngine::V1::TrafficPolylineData] - # Input only. Fleet Engine uses this information to improve journey sharing. - # Note: This field is intended only for use by the Driver SDK. - # @!attribute [r] current_route_segment_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when `current_route_segment` was set. It can be stored by - # the client and passed in future `GetVehicle` requests to prevent returning - # routes that haven't changed. - # @!attribute [rw] current_route_segment_end_point - # @return [::Google::Maps::FleetEngine::V1::TripWaypoint] - # The waypoint where `current_route_segment` ends. This can be supplied by - # drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint - # `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet - # Engine will then do its best to interpolate to an actual waypoint if it is - # not fully specified. This field is ignored in `UpdateVehicle` calls unless - # `current_route_segment` is also specified. - # @!attribute [rw] remaining_distance_meters - # @return [::Google::Protobuf::Int32Value] - # The remaining driving distance for the `current_route_segment`. - # This value is also returned in `Trip.remaining_distance_meters` for all - # active trips assigned to the vehicle. The value is unspecified if the - # `current_route_segment` field is empty. - # @!attribute [rw] eta_to_first_waypoint - # @return [::Google::Protobuf::Timestamp] - # The ETA to the first entry in the `waypoints` field. The value is - # unspecified if the `waypoints` field is empty or the - # `Vehicle.current_route_segment` field is empty. - # - # When updating a vehicle, `remaining_time_seconds` takes precedence over - # `eta_to_first_waypoint` in the same request. - # @!attribute [rw] remaining_time_seconds - # @return [::Google::Protobuf::Int32Value] - # Input only. The remaining driving time for the `current_route_segment`. The - # value is unspecified if the `waypoints` field is empty or the - # `Vehicle.current_route_segment` field is empty. This value should match - # `eta_to_first_waypoint` - `current_time` if all parties are using the same - # clock. - # - # When updating a vehicle, `remaining_time_seconds` takes precedence over - # `eta_to_first_waypoint` in the same request. - # @!attribute [rw] waypoints - # @return [::Array<::Google::Maps::FleetEngine::V1::TripWaypoint>] - # The remaining waypoints assigned to this Vehicle. - # @!attribute [r] waypoints_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Last time the `waypoints` field was updated. Clients should - # cache this value and pass it in `GetVehicleRequest` to ensure the - # `waypoints` field is only returned if it is updated. - # @!attribute [rw] back_to_back_enabled - # @return [::Boolean] - # Indicates if the driver accepts back-to-back trips. If `true`, - # `SearchVehicles` may include the vehicle even if it is currently assigned - # to a trip. The default value is `false`. - # @!attribute [rw] navigation_status - # @return [::Google::Maps::FleetEngine::V1::NavigationStatus] - # The vehicle's navigation status. - # @!attribute [rw] device_settings - # @return [::Google::Maps::FleetEngine::V1::DeviceSettings] - # Input only. Information about settings in the mobile device being used by - # the driver. - class Vehicle - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of vehicle. - # @!attribute [rw] category - # @return [::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category] - # Vehicle type category - class VehicleType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Vehicle type categories - module Category - # Default, used for unspecified or unrecognized vehicle categories. - UNKNOWN = 0 - - # An automobile. - AUTO = 1 - - # Any vehicle that acts as a taxi (typically licensed or regulated). - TAXI = 2 - - # Generally, a vehicle with a large storage capacity. - TRUCK = 3 - - # A motorcycle, moped, or other two-wheeled vehicle - TWO_WHEELER = 4 - - # Human-powered transport. - BICYCLE = 5 - - # A human transporter, typically walking or running, traveling along - # pedestrian pathways. - PEDESTRIAN = 6 - end - end - end - - # Information about the device's battery. - # @!attribute [rw] battery_status - # @return [::Google::Maps::FleetEngine::V1::BatteryStatus] - # Status of the battery, whether full or charging etc. - # @!attribute [rw] power_source - # @return [::Google::Maps::FleetEngine::V1::PowerSource] - # Status of battery power source. - # @!attribute [rw] battery_percentage - # @return [::Float] - # Current battery percentage [0-100]. - class BatteryInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about various settings on the mobile device. - # @!attribute [rw] location_power_save_mode - # @return [::Google::Maps::FleetEngine::V1::LocationPowerSaveMode] - # How location features are set to behave on the device when battery saver is - # on. - # @!attribute [rw] is_power_save_mode - # @return [::Boolean] - # Whether the device is currently in power save mode. - # @!attribute [rw] is_interactive - # @return [::Boolean] - # Whether the device is in an interactive state. - # @!attribute [rw] battery_info - # @return [::Google::Maps::FleetEngine::V1::BatteryInfo] - # Information about the battery state. - class DeviceSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The license plate information of the Vehicle. To avoid storing - # personally-identifiable information, only the minimum information - # about the license plate is stored as part of the entity. - # @!attribute [rw] country_code - # @return [::String] - # Required. CLDR Country/Region Code. For example, `US` for United States, - # or `IN` for India. - # @!attribute [rw] last_character - # @return [::String] - # The last digit of the license plate or "-1" to denote no numeric value - # is present in the license plate. - # - # * "ABC 1234" -> "4" - # * "AB 123 CD" -> "3" - # * "ABCDEF" -> "-1" - class LicensePlate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes how clients should color one portion of the polyline along the - # route. - # @!attribute [rw] road_stretch - # @return [::Array<::Google::Maps::FleetEngine::V1::VisualTrafficReportPolylineRendering::RoadStretch>] - # Optional. Road stretches that should be rendered along the polyline. - # Stretches are guaranteed to not overlap, and do not necessarily span the - # full route. - # - # In the absence of a road stretch to style, the client should apply the - # default for the route. - class VisualTrafficReportPolylineRendering - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # One road stretch that should be rendered. - # @!attribute [rw] style - # @return [::Google::Maps::FleetEngine::V1::VisualTrafficReportPolylineRendering::RoadStretch::Style] - # Required. The style to apply. - # @!attribute [rw] offset_meters - # @return [::Integer] - # Required. The style should be applied between `[offset_meters, - # offset_meters + length_meters)`. - # @!attribute [rw] length_meters - # @return [::Integer] - # Required. The length of the path where to apply the style. - class RoadStretch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The traffic style, indicating traffic speed. - module Style - # No style selected. - STYLE_UNSPECIFIED = 0 - - # Traffic is slowing down. - SLOWER_TRAFFIC = 1 - - # There is a traffic jam. - TRAFFIC_JAM = 2 - end - end - end - - # Traffic conditions along the expected vehicle route. - # @!attribute [rw] traffic_rendering - # @return [::Google::Maps::FleetEngine::V1::VisualTrafficReportPolylineRendering] - # A polyline rendering of how fast traffic is for all regions along - # one stretch of a customer ride. - class TrafficPolylineData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The state of a `Vehicle`. - module VehicleState - # Default, used for unspecified or unrecognized vehicle states. - UNKNOWN_VEHICLE_STATE = 0 - - # The vehicle is not accepting new trips. Note: the vehicle may continue to - # operate in this state while completing a trip assigned to it. - OFFLINE = 1 - - # The vehicle is accepting new trips. - ONLINE = 2 - end - - # How location features are configured to behave on the mobile device when the - # devices "battery saver" feature is on. - # (https://developer.android.com/reference/android/os/PowerManager#getLocationPowerSaveMode()) - module LocationPowerSaveMode - # Undefined LocationPowerSaveMode - UNKNOWN_LOCATION_POWER_SAVE_MODE = 0 - - # Either the location providers shouldn't be affected by battery saver, or - # battery saver is off. - LOCATION_MODE_NO_CHANGE = 1 - - # The GPS based location provider should be disabled when battery saver is on - # and the device is non-interactive. - LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF = 2 - - # All location providers should be disabled when battery saver is on and the - # device is non-interactive. - LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF = 3 - - # All the location providers will be kept available, but location fixes - # should only be provided to foreground apps. - LOCATION_MODE_FOREGROUND_ONLY = 4 - - # Location will not be turned off, but LocationManager will throttle all - # requests to providers when the device is non-interactive. - LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF = 5 - end - - # Status of the battery, whether full or charging etc. - module BatteryStatus - # Battery status unknown. - UNKNOWN_BATTERY_STATUS = 0 - - # Battery is being charged. - BATTERY_STATUS_CHARGING = 1 - - # Battery is discharging. - BATTERY_STATUS_DISCHARGING = 2 - - # Battery is full. - BATTERY_STATUS_FULL = 3 - - # Battery is not charging. - BATTERY_STATUS_NOT_CHARGING = 4 - - # Battery is low on power. - BATTERY_STATUS_POWER_LOW = 5 - end - - # Type of the charger being used to charge the battery. - module PowerSource - # Power source unknown. - UNKNOWN_POWER_SOURCE = 0 - - # Power source is an AC charger. - POWER_SOURCE_AC = 1 - - # Power source is a USB port. - POWER_SOURCE_USB = 2 - - # Power source is wireless. - POWER_SOURCE_WIRELESS = 3 - - # Battery is unplugged. - POWER_SOURCE_UNPLUGGED = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb deleted file mode 100644 index c15e78a39a56..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/snippets/Gemfile b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/Gemfile deleted file mode 100644 index 1a35fc6011c5..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1", path: "../" -else - gem "google-maps-fleet_engine-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-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json deleted file mode 100644 index a69f797d658e..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json +++ /dev/null @@ -1,535 +0,0 @@ -{ - "client_library": { - "name": "google-maps-fleet_engine-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "maps.fleetengine.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "fleetengine_v1_generated_TripService_CreateTrip_sync", - "title": "Snippet for the create_trip call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#create_trip.", - "file": "trip_service/create_trip.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_trip", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#create_trip", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::CreateTripRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Trip", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "CreateTrip", - "full_name": "maps.fleetengine.v1.TripService.CreateTrip", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_TripService_GetTrip_sync", - "title": "Snippet for the get_trip call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#get_trip.", - "file": "trip_service/get_trip.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_trip", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#get_trip", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::GetTripRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Trip", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "GetTrip", - "full_name": "maps.fleetengine.v1.TripService.GetTrip", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_TripService_DeleteTrip_sync", - "title": "Snippet for the delete_trip call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#delete_trip.", - "file": "trip_service/delete_trip.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_trip", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#delete_trip", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::DeleteTripRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "DeleteTrip", - "full_name": "maps.fleetengine.v1.TripService.DeleteTrip", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_TripService_ReportBillableTrip_sync", - "title": "Snippet for the report_billable_trip call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#report_billable_trip.", - "file": "trip_service/report_billable_trip.rb", - "language": "RUBY", - "client_method": { - "short_name": "report_billable_trip", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#report_billable_trip", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::ReportBillableTripRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "ReportBillableTrip", - "full_name": "maps.fleetengine.v1.TripService.ReportBillableTrip", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_TripService_SearchTrips_sync", - "title": "Snippet for the search_trips call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#search_trips.", - "file": "trip_service/search_trips.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_trips", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#search_trips", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::SearchTripsRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::SearchTripsResponse", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "SearchTrips", - "full_name": "maps.fleetengine.v1.TripService.SearchTrips", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_TripService_UpdateTrip_sync", - "title": "Snippet for the update_trip call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#update_trip.", - "file": "trip_service/update_trip.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_trip", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#update_trip", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::UpdateTripRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Trip", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "UpdateTrip", - "full_name": "maps.fleetengine.v1.TripService.UpdateTrip", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_CreateVehicle_sync", - "title": "Snippet for the create_vehicle call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#create_vehicle.", - "file": "vehicle_service/create_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_vehicle", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#create_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::CreateVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Vehicle", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "CreateVehicle", - "full_name": "maps.fleetengine.v1.VehicleService.CreateVehicle", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_GetVehicle_sync", - "title": "Snippet for the get_vehicle call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#get_vehicle.", - "file": "vehicle_service/get_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_vehicle", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#get_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::GetVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Vehicle", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "GetVehicle", - "full_name": "maps.fleetengine.v1.VehicleService.GetVehicle", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_DeleteVehicle_sync", - "title": "Snippet for the delete_vehicle call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#delete_vehicle.", - "file": "vehicle_service/delete_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_vehicle", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#delete_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::DeleteVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "DeleteVehicle", - "full_name": "maps.fleetengine.v1.VehicleService.DeleteVehicle", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_UpdateVehicle_sync", - "title": "Snippet for the update_vehicle call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle.", - "file": "vehicle_service/update_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_vehicle", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::UpdateVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Vehicle", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "UpdateVehicle", - "full_name": "maps.fleetengine.v1.VehicleService.UpdateVehicle", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_UpdateVehicleAttributes_sync", - "title": "Snippet for the update_vehicle_attributes call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle_attributes.", - "file": "vehicle_service/update_vehicle_attributes.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_vehicle_attributes", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle_attributes", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "UpdateVehicleAttributes", - "full_name": "maps.fleetengine.v1.VehicleService.UpdateVehicleAttributes", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_ListVehicles_sync", - "title": "Snippet for the list_vehicles call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#list_vehicles.", - "file": "vehicle_service/list_vehicles.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_vehicles", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#list_vehicles", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::ListVehiclesRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::ListVehiclesResponse", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "ListVehicles", - "full_name": "maps.fleetengine.v1.VehicleService.ListVehicles", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_SearchVehicles_sync", - "title": "Snippet for the search_vehicles call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#search_vehicles.", - "file": "vehicle_service/search_vehicles.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_vehicles", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#search_vehicles", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::SearchVehiclesRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::SearchVehiclesResponse", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "SearchVehicles", - "full_name": "maps.fleetengine.v1.VehicleService.SearchVehicles", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "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-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb deleted file mode 100644 index 471ee490d00d..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_CreateTrip_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the create_trip call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#create_trip. -# -def create_trip - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::CreateTripRequest.new - - # Call the create_trip method. - result = client.create_trip request - - # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - p result -end -# [END fleetengine_v1_generated_TripService_CreateTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb deleted file mode 100644 index 892398e76959..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_DeleteTrip_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the delete_trip call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#delete_trip. -# -def delete_trip - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::DeleteTripRequest.new - - # Call the delete_trip method. - result = client.delete_trip request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END fleetengine_v1_generated_TripService_DeleteTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb deleted file mode 100644 index d02ae4f6720c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_GetTrip_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the get_trip call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#get_trip. -# -def get_trip - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::GetTripRequest.new - - # Call the get_trip method. - result = client.get_trip request - - # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - p result -end -# [END fleetengine_v1_generated_TripService_GetTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb deleted file mode 100644 index 66c560dccfb5..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_ReportBillableTrip_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the report_billable_trip call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#report_billable_trip. -# -def report_billable_trip - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new - - # Call the report_billable_trip method. - result = client.report_billable_trip request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END fleetengine_v1_generated_TripService_ReportBillableTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb deleted file mode 100644 index 213ca35edfd8..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.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 fleetengine_v1_generated_TripService_SearchTrips_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the search_trips call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#search_trips. -# -def search_trips - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::SearchTripsRequest.new - - # Call the search_trips method. - result = client.search_trips request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Maps::FleetEngine::V1::Trip. - p item - end -end -# [END fleetengine_v1_generated_TripService_SearchTrips_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb deleted file mode 100644 index caca64f14dad..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_UpdateTrip_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the update_trip call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#update_trip. -# -def update_trip - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::UpdateTripRequest.new - - # Call the update_trip method. - result = client.update_trip request - - # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - p result -end -# [END fleetengine_v1_generated_TripService_UpdateTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb deleted file mode 100644 index 70db086501d6..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_CreateVehicle_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the create_vehicle call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#create_vehicle. -# -def create_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::CreateVehicleRequest.new - - # Call the create_vehicle method. - result = client.create_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - p result -end -# [END fleetengine_v1_generated_VehicleService_CreateVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb deleted file mode 100644 index c040d402cb0b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_DeleteVehicle_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the delete_vehicle call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#delete_vehicle. -# -def delete_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new - - # Call the delete_vehicle method. - result = client.delete_vehicle request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END fleetengine_v1_generated_VehicleService_DeleteVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb deleted file mode 100644 index 4872490fa433..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_GetVehicle_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the get_vehicle call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#get_vehicle. -# -def get_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::GetVehicleRequest.new - - # Call the get_vehicle method. - result = client.get_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - p result -end -# [END fleetengine_v1_generated_VehicleService_GetVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb deleted file mode 100644 index 1119502e68a1..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.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 fleetengine_v1_generated_VehicleService_ListVehicles_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the list_vehicles call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#list_vehicles. -# -def list_vehicles - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::ListVehiclesRequest.new - - # Call the list_vehicles method. - result = client.list_vehicles request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Maps::FleetEngine::V1::Vehicle. - p item - end -end -# [END fleetengine_v1_generated_VehicleService_ListVehicles_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb deleted file mode 100644 index e28a620bb8ef..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_SearchVehicles_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the search_vehicles call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#search_vehicles. -# -def search_vehicles - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new - - # Call the search_vehicles method. - result = client.search_vehicles request - - # The returned object is of type Google::Maps::FleetEngine::V1::SearchVehiclesResponse. - p result -end -# [END fleetengine_v1_generated_VehicleService_SearchVehicles_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb deleted file mode 100644 index 87e5b21b85ad..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_UpdateVehicle_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the update_vehicle call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle. -# -def update_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new - - # Call the update_vehicle method. - result = client.update_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - p result -end -# [END fleetengine_v1_generated_VehicleService_UpdateVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb deleted file mode 100644 index abf97493f162..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_UpdateVehicleAttributes_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the update_vehicle_attributes call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle_attributes. -# -def update_vehicle_attributes - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new - - # Call the update_vehicle_attributes method. - result = client.update_vehicle_attributes request - - # The returned object is of type Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse. - p result -end -# [END fleetengine_v1_generated_VehicleService_UpdateVehicleAttributes_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb deleted file mode 100644 index f1ddb3264a50..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_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/maps/fleet_engine/v1/trip_service" - -class ::Google::Maps::FleetEngine::V1::TripService::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_trip_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.trip_path provider: "value0", trip: "value1" - assert_equal "providers/value0/trips/value1", path - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb deleted file mode 100644 index 8b384ca1bbf5..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb +++ /dev/null @@ -1,447 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/maps/fleetengine/v1/trip_api_pb" -require "google/maps/fleet_engine/v1/trip_service/rest" - - -class ::Google::Maps::FleetEngine::V1::TripService::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_trip - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Trip.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - trip_id = "hello world" - trip = {} - - create_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_create_trip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_trip_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_trip header: header, parent: parent, trip_id: trip_id, trip: trip do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_trip ::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_trip(::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_trip_client_stub.call_count - end - end - end - - def test_get_trip - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Trip.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - view = :TRIP_VIEW_UNSPECIFIED - current_route_segment_version = {} - remaining_waypoints_version = {} - route_format_type = :UNKNOWN_FORMAT_TYPE - current_route_segment_traffic_version = {} - remaining_waypoints_route_version = {} - - get_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_get_trip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_trip_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_trip header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_trip ::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_trip(::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_trip_client_stub.call_count - end - end - end - - def test_delete_trip - # 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. - header = {} - name = "hello world" - - delete_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_delete_trip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_trip_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_trip({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_trip header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_trip ::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_trip({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_trip(::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_trip_client_stub.call_count - end - end - end - - def test_report_billable_trip - # 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" - country_code = "hello world" - platform = :BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED - related_ids = ["hello world"] - solution_type = :SOLUTION_TYPE_UNSPECIFIED - - report_billable_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_report_billable_trip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, report_billable_trip_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.report_billable_trip name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.report_billable_trip ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.report_billable_trip(::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, report_billable_trip_client_stub.call_count - end - end - end - - def test_search_trips - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::SearchTripsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - vehicle_id = "hello world" - active_trips_only = true - page_size = 42 - page_token = "hello world" - minimum_staleness = {} - - search_trips_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_search_trips_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_trips_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_trips header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_trips ::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.search_trips(::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_trips_client_stub.call_count - end - end - end - - def test_update_trip - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Trip.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - trip = {} - update_mask = {} - - update_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_update_trip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_trip_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_trip header: header, name: name, trip: trip, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_trip ::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_trip(::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_trip_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::Maps::FleetEngine::V1::TripService::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::Maps::FleetEngine::V1::TripService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb deleted file mode 100644 index dfb6b14db01b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb +++ /dev/null @@ -1,505 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/maps/fleetengine/v1/trip_api_pb" -require "google/maps/fleet_engine/v1/trip_service" - -class ::Google::Maps::FleetEngine::V1::TripService::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_trip - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Trip.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - trip_id = "hello world" - trip = {} - - create_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_trip, name - assert_kind_of ::Google::Maps::FleetEngine::V1::CreateTripRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["trip_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Trip), request["trip"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_trip_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_trip header: header, parent: parent, trip_id: trip_id, trip: trip do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_trip ::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_trip(::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_trip_client_stub.call_rpc_count - end - end - - def test_get_trip - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Trip.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - view = :TRIP_VIEW_UNSPECIFIED - current_route_segment_version = {} - remaining_waypoints_version = {} - route_format_type = :UNKNOWN_FORMAT_TYPE - current_route_segment_traffic_version = {} - remaining_waypoints_route_version = {} - - get_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_trip, name - assert_kind_of ::Google::Maps::FleetEngine::V1::GetTripRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - assert_equal :TRIP_VIEW_UNSPECIFIED, request["view"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["current_route_segment_version"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["remaining_waypoints_version"] - assert_equal :UNKNOWN_FORMAT_TYPE, request["route_format_type"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["current_route_segment_traffic_version"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["remaining_waypoints_route_version"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_trip_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_trip header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_trip ::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_trip(::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_trip_client_stub.call_rpc_count - end - end - - def test_delete_trip - # 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. - header = {} - name = "hello world" - - delete_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_trip, name - assert_kind_of ::Google::Maps::FleetEngine::V1::DeleteTripRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_trip_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_trip({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_trip header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_trip ::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_trip({ header: header, 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_trip(::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, 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_trip_client_stub.call_rpc_count - end - end - - def test_report_billable_trip - # 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" - country_code = "hello world" - platform = :BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED - related_ids = ["hello world"] - solution_type = :SOLUTION_TYPE_UNSPECIFIED - - report_billable_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :report_billable_trip, name - assert_kind_of ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["country_code"] - assert_equal :BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED, request["platform"] - assert_equal ["hello world"], request["related_ids"] - assert_equal :SOLUTION_TYPE_UNSPECIFIED, request["solution_type"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, report_billable_trip_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.report_billable_trip name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.report_billable_trip ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.report_billable_trip(::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, report_billable_trip_client_stub.call_rpc_count - end - end - - def test_search_trips - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::SearchTripsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - vehicle_id = "hello world" - active_trips_only = true - page_size = 42 - page_token = "hello world" - minimum_staleness = {} - - search_trips_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_trips, name - assert_kind_of ::Google::Maps::FleetEngine::V1::SearchTripsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["vehicle_id"] - assert_equal true, request["active_trips_only"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["minimum_staleness"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_trips_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }) do |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_trips header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness do |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_trips ::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness) do |response, operation| - 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_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }, grpc_options) do |response, operation| - 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_trips(::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness), grpc_options) do |response, operation| - 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_trips_client_stub.call_rpc_count - end - end - - def test_update_trip - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Trip.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - trip = {} - update_mask = {} - - update_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_trip, name - assert_kind_of ::Google::Maps::FleetEngine::V1::UpdateTripRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Trip), request["trip"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_trip_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_trip header: header, name: name, trip: trip, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_trip ::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, 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_trip({ header: header, name: name, trip: trip, 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_trip(::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, 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_trip_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::Maps::FleetEngine::V1::TripService::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::Maps::FleetEngine::V1::TripService::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::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Maps::FleetEngine::V1::TripService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb deleted file mode 100644 index 104283f54a4c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_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/maps/fleet_engine/v1/vehicle_service" - -class ::Google::Maps::FleetEngine::V1::VehicleService::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_vehicle_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.vehicle_path provider: "value0", vehicle: "value1" - assert_equal "providers/value0/vehicles/value1", path - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb deleted file mode 100644 index 636a49f15f63..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb +++ /dev/null @@ -1,520 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/maps/fleetengine/v1/vehicle_api_pb" -require "google/maps/fleet_engine/v1/vehicle_service/rest" - - -class ::Google::Maps::FleetEngine::V1::VehicleService::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_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Vehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - vehicle_id = "hello world" - vehicle = {} - - create_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_create_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_vehicle_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_vehicle header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_vehicle ::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_vehicle(::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_vehicle_client_stub.call_count - end - end - end - - def test_get_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Vehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - current_route_segment_version = {} - waypoints_version = {} - - get_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_get_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_vehicle_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_vehicle header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_vehicle ::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_vehicle(::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_vehicle_client_stub.call_count - end - end - end - - def test_delete_vehicle - # 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. - header = {} - name = "hello world" - - delete_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_delete_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_vehicle_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_vehicle({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_vehicle header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_vehicle ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_vehicle({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_vehicle(::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_vehicle_client_stub.call_count - end - end - end - - def test_update_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Vehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - vehicle = {} - update_mask = {} - - update_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_update_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_vehicle_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_vehicle header: header, name: name, vehicle: vehicle, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_vehicle ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_vehicle(::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_vehicle_client_stub.call_count - end - end - end - - def test_update_vehicle_attributes - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - attributes = [{}] - - update_vehicle_attributes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_update_vehicle_attributes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_vehicle_attributes_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_vehicle_attributes({ header: header, name: name, attributes: attributes }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_vehicle_attributes header: header, name: name, attributes: attributes do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_vehicle_attributes ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_vehicle_attributes({ header: header, name: name, attributes: attributes }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_vehicle_attributes(::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_vehicle_attributes_client_stub.call_count - end - end - end - - def test_list_vehicles - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::ListVehiclesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - minimum_capacity = {} - trip_types = [:UNKNOWN_TRIP_TYPE] - maximum_staleness = {} - vehicle_type_categories = [:UNKNOWN] - required_attributes = ["hello world"] - required_one_of_attributes = ["hello world"] - required_one_of_attribute_sets = ["hello world"] - vehicle_state = :UNKNOWN_VEHICLE_STATE - on_trip_only = true - filter = "hello world" - viewport = {} - - list_vehicles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_list_vehicles_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_vehicles_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_vehicles ::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_vehicles(::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_vehicles_client_stub.call_count - end - end - end - - def test_search_vehicles - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - pickup_point = {} - dropoff_point = {} - pickup_radius_meters = 42 - count = 42 - minimum_capacity = 42 - trip_types = [:UNKNOWN_TRIP_TYPE] - maximum_staleness = {} - vehicle_types = [{}] - required_attributes = [{}] - required_one_of_attributes = [{}] - required_one_of_attribute_sets = [{}] - order_by = :UNKNOWN_VEHICLE_MATCH_ORDER - include_back_to_back = true - trip_id = "hello world" - current_trips_present = :CURRENT_TRIPS_PRESENT_UNSPECIFIED - filter = "hello world" - - search_vehicles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_search_vehicles_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_vehicles_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_vehicles header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_vehicles ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.search_vehicles(::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_vehicles_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::Maps::FleetEngine::V1::VehicleService::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::Maps::FleetEngine::V1::VehicleService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb deleted file mode 100644 index 894d1ceb50d8..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb +++ /dev/null @@ -1,601 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/maps/fleetengine/v1/vehicle_api_pb" -require "google/maps/fleet_engine/v1/vehicle_service" - -class ::Google::Maps::FleetEngine::V1::VehicleService::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_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Vehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - vehicle_id = "hello world" - vehicle = {} - - create_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::V1::CreateVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["vehicle_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Vehicle), request["vehicle"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_vehicle_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_vehicle header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_vehicle ::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_vehicle(::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_vehicle_client_stub.call_rpc_count - end - end - - def test_get_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Vehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - current_route_segment_version = {} - waypoints_version = {} - - get_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::V1::GetVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["current_route_segment_version"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["waypoints_version"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_vehicle_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_vehicle header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_vehicle ::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_vehicle(::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_vehicle_client_stub.call_rpc_count - end - end - - def test_delete_vehicle - # 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. - header = {} - name = "hello world" - - delete_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_vehicle_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_vehicle({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_vehicle header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_vehicle ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_vehicle({ header: header, 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_vehicle(::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, 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_vehicle_client_stub.call_rpc_count - end - end - - def test_update_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Vehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - vehicle = {} - update_mask = {} - - update_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Vehicle), request["vehicle"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_vehicle_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_vehicle header: header, name: name, vehicle: vehicle, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_vehicle ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, 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_vehicle({ header: header, name: name, vehicle: vehicle, 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_vehicle(::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, 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_vehicle_client_stub.call_rpc_count - end - end - - def test_update_vehicle_attributes - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - attributes = [{}] - - update_vehicle_attributes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_vehicle_attributes, name - assert_kind_of ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttribute, request["attributes"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_vehicle_attributes_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_vehicle_attributes({ header: header, name: name, attributes: attributes }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_vehicle_attributes header: header, name: name, attributes: attributes do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_vehicle_attributes ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_vehicle_attributes({ header: header, name: name, attributes: attributes }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_vehicle_attributes(::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_vehicle_attributes_client_stub.call_rpc_count - end - end - - def test_list_vehicles - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::ListVehiclesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - minimum_capacity = {} - trip_types = [:UNKNOWN_TRIP_TYPE] - maximum_staleness = {} - vehicle_type_categories = [:UNKNOWN] - required_attributes = ["hello world"] - required_one_of_attributes = ["hello world"] - required_one_of_attribute_sets = ["hello world"] - vehicle_state = :UNKNOWN_VEHICLE_STATE - on_trip_only = true - filter = "hello world" - viewport = {} - - list_vehicles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_vehicles, name - assert_kind_of ::Google::Maps::FleetEngine::V1::ListVehiclesRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Int32Value), request["minimum_capacity"] - assert_equal [:UNKNOWN_TRIP_TYPE], request["trip_types"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["maximum_staleness"] - assert_equal [:UNKNOWN], request["vehicle_type_categories"] - assert_equal ["hello world"], request["required_attributes"] - assert_equal ["hello world"], request["required_one_of_attributes"] - assert_equal ["hello world"], request["required_one_of_attribute_sets"] - assert_equal :UNKNOWN_VEHICLE_STATE, request["vehicle_state"] - assert_equal true, request["on_trip_only"] - assert_equal "hello world", request["filter"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Geo::Type::Viewport), request["viewport"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_vehicles_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_vehicles ::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_vehicles(::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_vehicles_client_stub.call_rpc_count - end - end - - def test_search_vehicles - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - pickup_point = {} - dropoff_point = {} - pickup_radius_meters = 42 - count = 42 - minimum_capacity = 42 - trip_types = [:UNKNOWN_TRIP_TYPE] - maximum_staleness = {} - vehicle_types = [{}] - required_attributes = [{}] - required_one_of_attributes = [{}] - required_one_of_attribute_sets = [{}] - order_by = :UNKNOWN_VEHICLE_MATCH_ORDER - include_back_to_back = true - trip_id = "hello world" - current_trips_present = :CURRENT_TRIPS_PRESENT_UNSPECIFIED - filter = "hello world" - - search_vehicles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_vehicles, name - assert_kind_of ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::TerminalLocation), request["pickup_point"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::TerminalLocation), request["dropoff_point"] - assert_equal 42, request["pickup_radius_meters"] - assert_equal 42, request["count"] - assert_equal 42, request["minimum_capacity"] - assert_equal [:UNKNOWN_TRIP_TYPE], request["trip_types"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["maximum_staleness"] - assert_kind_of ::Google::Maps::FleetEngine::V1::Vehicle::VehicleType, request["vehicle_types"].first - assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttribute, request["required_attributes"].first - assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttributeList, request["required_one_of_attributes"].first - assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttributeList, request["required_one_of_attribute_sets"].first - assert_equal :UNKNOWN_VEHICLE_MATCH_ORDER, request["order_by"] - assert_equal true, request["include_back_to_back"] - assert_equal "hello world", request["trip_id"] - assert_equal :CURRENT_TRIPS_PRESENT_UNSPECIFIED, request["current_trips_present"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_vehicles_client_stub do - # Create client - client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.search_vehicles header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.search_vehicles ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.search_vehicles(::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_vehicles_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::Maps::FleetEngine::V1::VehicleService::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::Maps::FleetEngine::V1::VehicleService::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::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-shopping-css-v1/.gitignore b/owl-bot-staging/google-shopping-css-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-css-v1/.repo-metadata.json deleted file mode 100644 index 4ce57214d802..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "css.googleapis.com", - "api_shortname": "css", - "client_documentation": "https://rubydoc.info/gems/google-shopping-css-v1", - "distribution_name": "google-shopping-css-v1", - "is_cloud": false, - "language": "ruby", - "name": "css", - "name_pretty": "CSS V1 API", - "product_documentation": "https://developers.google.com/comparison-shopping-services/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Programmatically manage your Comparison Shopping Service (CSS) account data at scale. Note that google-shopping-css-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-css instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/comparison-shopping-services/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-css-v1/.rubocop.yml b/owl-bot-staging/google-shopping-css-v1/.rubocop.yml deleted file mode 100644 index b53d398f0a64..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-css-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-shopping-css-v1.rb" diff --git a/owl-bot-staging/google-shopping-css-v1/.toys.rb b/owl-bot-staging/google-shopping-css-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/.yardopts b/owl-bot-staging/google-shopping-css-v1/.yardopts deleted file mode 100644 index f293265f462f..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="CSS 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-shopping-css-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-css-v1/AUTHENTICATION.md deleted file mode 100644 index bd124d2e6f59..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-css-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-shopping-css-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/shopping/css/v1" - -client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/css/v1" - -::Google::Shopping::Css::V1::AccountsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Css::V1::AccountsService::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-shopping-css-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/shopping/css/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Css::V1::AccountsService::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-shopping-css-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-css-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-css-v1/Gemfile b/owl-bot-staging/google-shopping-css-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/LICENSE.md b/owl-bot-staging/google-shopping-css-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/README.md b/owl-bot-staging/google-shopping-css-v1/README.md deleted file mode 100644 index 08c18457b57e..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the CSS V1 API - -Programmatically manage your Comparison Shopping Service (CSS) account data at scale. - -Programmatically manage your Comparison Shopping Service (CSS) account data at scale. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the CSS V1 API. Most users should consider using -the main client gem, -[google-shopping-css](https://rubygems.org/gems/google-shopping-css). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-css-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/css.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/css/v1" - -client = ::Google::Shopping::Css::V1::AccountsService::Client.new -request = ::Google::Shopping::Css::V1::ListChildAccountsRequest.new # (request fields as keyword arguments...) -response = client.list_child_accounts request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-css-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/comparison-shopping-services/api) -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/shopping/css/v1" -require "logger" - -client = ::Google::Shopping::Css::V1::AccountsService::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-shopping-css`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-css-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-shopping-css`. -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-shopping-css-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-shopping-css-v1/Rakefile b/owl-bot-staging/google-shopping-css-v1/Rakefile deleted file mode 100644 index 635d913938d1..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-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/shopping/css/v1/accounts_service/credentials" - ::Google::Shopping::Css::V1::AccountsService::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-shopping-css-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-shopping-css-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-shopping-css-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-shopping-css-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-css-v1" - header "google-shopping-css-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-css-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-css-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-shopping-css-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-shopping-css-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-shopping-css-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-css-v1/gapic_metadata.json deleted file mode 100644 index 752bb921cc5e..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/gapic_metadata.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.css.v1", - "libraryPackage": "::Google::Shopping::Css::V1", - "services": { - "AccountsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Css::V1::AccountsService::Client", - "rpcs": { - "ListChildAccounts": { - "methods": [ - "list_child_accounts" - ] - }, - "GetAccount": { - "methods": [ - "get_account" - ] - }, - "UpdateLabels": { - "methods": [ - "update_labels" - ] - } - } - } - } - }, - "AccountLabelsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Css::V1::AccountLabelsService::Client", - "rpcs": { - "ListAccountLabels": { - "methods": [ - "list_account_labels" - ] - }, - "CreateAccountLabel": { - "methods": [ - "create_account_label" - ] - }, - "UpdateAccountLabel": { - "methods": [ - "update_account_label" - ] - }, - "DeleteAccountLabel": { - "methods": [ - "delete_account_label" - ] - } - } - } - } - }, - "CssProductInputsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Css::V1::CssProductInputsService::Client", - "rpcs": { - "InsertCssProductInput": { - "methods": [ - "insert_css_product_input" - ] - }, - "UpdateCssProductInput": { - "methods": [ - "update_css_product_input" - ] - }, - "DeleteCssProductInput": { - "methods": [ - "delete_css_product_input" - ] - } - } - } - } - }, - "CssProductsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Css::V1::CssProductsService::Client", - "rpcs": { - "GetCssProduct": { - "methods": [ - "get_css_product" - ] - }, - "ListCssProducts": { - "methods": [ - "list_css_products" - ] - } - } - } - } - }, - "QuotaService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Css::V1::QuotaService::Client", - "rpcs": { - "ListQuotaGroups": { - "methods": [ - "list_quota_groups" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec b/owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec deleted file mode 100644 index 7feb57e56127..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/css/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-css-v1" - gem.version = Google::Shopping::Css::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Comparison Shopping Service (CSS) account data at scale. Note that google-shopping-css-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-css instead. See the readme for more details." - gem.summary = "Programmatically manage your Comparison Shopping Service (CSS) account data at scale." - 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-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-v1.rb b/owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-v1.rb deleted file mode 100644 index a93e9af0be45..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-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/shopping/css/v1" diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb deleted file mode 100644 index d1249eab068b..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.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/shopping/css/v1/accounts_service" -require "google/shopping/css/v1/account_labels_service" -require "google/shopping/css/v1/css_product_inputs_service" -require "google/shopping/css/v1/css_products_service" -require "google/shopping/css/v1/quota_service" -require "google/shopping/css/v1/version" - -module Google - module Shopping - module Css - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/css/v1" - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/css/v1" - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/css/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb deleted file mode 100644 index bd9585d09cc4..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_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/shopping/css/v1/version" - -require "google/shopping/css/v1/account_labels_service/credentials" -require "google/shopping/css/v1/account_labels_service/paths" -require "google/shopping/css/v1/account_labels_service/client" -require "google/shopping/css/v1/account_labels_service/rest" - -module Google - module Shopping - module Css - module V1 - ## - # Manages Merchant Center and CSS accounts labels. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/css/v1/account_labels_service" - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/css/v1/account_labels_service/rest" - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - module AccountLabelsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "account_labels_service", "helpers.rb" -require "google/shopping/css/v1/account_labels_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb deleted file mode 100644 index 10289bc31747..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb +++ /dev/null @@ -1,783 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/css/v1/accounts_labels_pb" - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - ## - # Client for the AccountLabelsService service. - # - # Manages Merchant Center and CSS accounts labels. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_labels_service_stub - - ## - # Configure the AccountLabelsService Client class. - # - # See {::Google::Shopping::Css::V1::AccountLabelsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountLabelsService clients - # ::Google::Shopping::Css::V1::AccountLabelsService::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", "Shopping", "Css", "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_account_labels.timeout = 60.0 - default_config.rpcs.list_account_labels.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_account_label.timeout = 60.0 - - default_config.rpcs.update_account_label.timeout = 60.0 - - default_config.rpcs.delete_account_label.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountLabelsService 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::Shopping::Css::V1::AccountLabelsService::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 - @account_labels_service_stub.universe_domain - end - - ## - # Create a new AccountLabelsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountLabelsService 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/shopping/css/v1/accounts_labels_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 - - @account_labels_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Css::V1::AccountLabelsService::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 - ) - - @account_labels_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 - @account_labels_service_stub.logger - end - - # Service calls - - ## - # Lists the labels owned by an account. - # - # @overload list_account_labels(request, options = nil) - # Pass arguments to `list_account_labels` via a request object, either of type - # {::Google::Shopping::Css::V1::ListAccountLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListAccountLabelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_account_labels(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_account_labels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of labels to return. The service may return fewer than - # this value. - # If unspecified, at most 50 labels will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListAccountLabels` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountLabels` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListAccountLabelsRequest.new - # - # # Call the list_account_labels method. - # result = client.list_account_labels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::AccountLabel. - # p item - # end - # - def list_account_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListAccountLabelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_account_labels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_account_labels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_account_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.call_rpc :list_account_labels, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @account_labels_service_stub, :list_account_labels, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new label, not assigned to any account. - # - # @overload create_account_label(request, options = nil) - # Pass arguments to `create_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::CreateAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::CreateAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_account_label(parent: nil, account_label: nil) - # Pass arguments to `create_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account. - # Format: accounts/\\{account} - # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] - # Required. The label to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::CreateAccountLabelRequest.new - # - # # Call the create_account_label method. - # result = client.create_account_label request - # - # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - # p result - # - def create_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::CreateAccountLabelRequest - - # Converts hash and nil to 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_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_account_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.call_rpc :create_account_label, request, 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 label. - # - # @overload update_account_label(request, options = nil) - # Pass arguments to `update_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_account_label(account_label: nil) - # Pass arguments to `update_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] - # Required. The updated label. All fields must be provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateAccountLabelRequest.new - # - # # Call the update_account_label method. - # result = client.update_account_label request - # - # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - # p result - # - def update_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelRequest - - # Converts hash and nil to 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_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.account_label&.name - header_params["account_label.name"] = request.account_label.name - end - - request_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_account_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.call_rpc :update_account_label, request, 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 label and removes it from all accounts to which it was assigned. - # - # @overload delete_account_label(request, options = nil) - # Pass arguments to `delete_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::DeleteAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::DeleteAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_account_label(name: nil) - # Pass arguments to `delete_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the label to delete. - # Format: accounts/\\{account}/labels/\\{label} - # - # @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/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::DeleteAccountLabelRequest.new - # - # # Call the delete_account_label method. - # result = client.delete_account_label request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteAccountLabelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_account_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.call_rpc :delete_account_label, request, 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 AccountLabelsService API. - # - # This class represents the configuration for AccountLabelsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Css::V1::AccountLabelsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_account_labels to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::AccountLabelsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_labels.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_labels.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Css::V1::AccountLabelsService::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 = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountLabelsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_account_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_labels - ## - # RPC-specific configuration for `create_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :create_account_label - ## - # RPC-specific configuration for `update_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account_label - ## - # RPC-specific configuration for `delete_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_account_label - - # @private - def initialize parent_rpcs = nil - list_account_labels_config = parent_rpcs.list_account_labels if parent_rpcs.respond_to? :list_account_labels - @list_account_labels = ::Gapic::Config::Method.new list_account_labels_config - create_account_label_config = parent_rpcs.create_account_label if parent_rpcs.respond_to? :create_account_label - @create_account_label = ::Gapic::Config::Method.new create_account_label_config - update_account_label_config = parent_rpcs.update_account_label if parent_rpcs.respond_to? :update_account_label - @update_account_label = ::Gapic::Config::Method.new update_account_label_config - delete_account_label_config = parent_rpcs.delete_account_label if parent_rpcs.respond_to? :delete_account_label - @delete_account_label = ::Gapic::Config::Method.new delete_account_label_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb deleted file mode 100644 index 0e7c2cfdd5da..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - # Credentials for the AccountLabelsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb deleted file mode 100644 index 2f421e27577b..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_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 Shopping - module Css - module V1 - module AccountLabelsService - # Path helper methods for the AccountLabelsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified AccountLabel resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/labels/{label}` - # - # @param account [String] - # @param label [String] - # - # @return [::String] - def account_label_path account:, label: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/labels/#{label}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb deleted file mode 100644 index 728b66d6ac46..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_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/shopping/css/v1/version" - -require "google/shopping/css/v1/account_labels_service/credentials" -require "google/shopping/css/v1/account_labels_service/paths" -require "google/shopping/css/v1/account_labels_service/rest/client" - -module Google - module Shopping - module Css - module V1 - ## - # Manages Merchant Center and CSS accounts labels. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/css/v1/account_labels_service/rest" - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - module AccountLabelsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/css/v1/account_labels_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb deleted file mode 100644 index 1881e394243e..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb +++ /dev/null @@ -1,712 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/css/v1/accounts_labels_pb" -require "google/shopping/css/v1/account_labels_service/rest/service_stub" - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - module Rest - ## - # REST client for the AccountLabelsService service. - # - # Manages Merchant Center and CSS accounts labels. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_labels_service_stub - - ## - # Configure the AccountLabelsService Client class. - # - # See {::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountLabelsService clients - # ::Google::Shopping::Css::V1::AccountLabelsService::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", "Shopping", "Css", "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_account_labels.timeout = 60.0 - default_config.rpcs.list_account_labels.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_account_label.timeout = 60.0 - - default_config.rpcs.update_account_label.timeout = 60.0 - - default_config.rpcs.delete_account_label.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountLabelsService 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::Shopping::Css::V1::AccountLabelsService::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 - @account_labels_service_stub.universe_domain - end - - ## - # Create a new AccountLabelsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountLabelsService 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 - - @account_labels_service_stub = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @account_labels_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 - @account_labels_service_stub.logger - end - - # Service calls - - ## - # Lists the labels owned by an account. - # - # @overload list_account_labels(request, options = nil) - # Pass arguments to `list_account_labels` via a request object, either of type - # {::Google::Shopping::Css::V1::ListAccountLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListAccountLabelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_account_labels(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_account_labels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of labels to return. The service may return fewer than - # this value. - # If unspecified, at most 50 labels will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListAccountLabels` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountLabels` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListAccountLabelsRequest.new - # - # # Call the list_account_labels method. - # result = client.list_account_labels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::AccountLabel. - # p item - # end - # - def list_account_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListAccountLabelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_account_labels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_account_labels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_account_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.list_account_labels request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @account_labels_service_stub, :list_account_labels, "account_labels", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new label, not assigned to any account. - # - # @overload create_account_label(request, options = nil) - # Pass arguments to `create_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::CreateAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::CreateAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_account_label(parent: nil, account_label: nil) - # Pass arguments to `create_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account. - # Format: accounts/\\{account} - # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] - # Required. The label to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::CreateAccountLabelRequest.new - # - # # Call the create_account_label method. - # result = client.create_account_label request - # - # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - # p result - # - def create_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::CreateAccountLabelRequest - - # Converts hash and nil to an 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_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_account_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.create_account_label request, 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 label. - # - # @overload update_account_label(request, options = nil) - # Pass arguments to `update_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_account_label(account_label: nil) - # Pass arguments to `update_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] - # Required. The updated label. All fields must be provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateAccountLabelRequest.new - # - # # Call the update_account_label method. - # result = client.update_account_label request - # - # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - # p result - # - def update_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelRequest - - # Converts hash and nil to an 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_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_account_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.update_account_label request, 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 label and removes it from all accounts to which it was assigned. - # - # @overload delete_account_label(request, options = nil) - # Pass arguments to `delete_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::DeleteAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::DeleteAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_account_label(name: nil) - # Pass arguments to `delete_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the label to delete. - # Format: accounts/\\{account}/labels/\\{label} - # @yield [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/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::DeleteAccountLabelRequest.new - # - # # Call the delete_account_label method. - # result = client.delete_account_label request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteAccountLabelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_account_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.delete_account_label request, 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 AccountLabelsService REST API. - # - # This class represents the configuration for AccountLabelsService 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::Shopping::Css::V1::AccountLabelsService::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_account_labels to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_labels.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_labels.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountLabelsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_account_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_labels - ## - # RPC-specific configuration for `create_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :create_account_label - ## - # RPC-specific configuration for `update_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account_label - ## - # RPC-specific configuration for `delete_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_account_label - - # @private - def initialize parent_rpcs = nil - list_account_labels_config = parent_rpcs.list_account_labels if parent_rpcs.respond_to? :list_account_labels - @list_account_labels = ::Gapic::Config::Method.new list_account_labels_config - create_account_label_config = parent_rpcs.create_account_label if parent_rpcs.respond_to? :create_account_label - @create_account_label = ::Gapic::Config::Method.new create_account_label_config - update_account_label_config = parent_rpcs.update_account_label if parent_rpcs.respond_to? :update_account_label - @update_account_label = ::Gapic::Config::Method.new update_account_label_config - delete_account_label_config = parent_rpcs.delete_account_label if parent_rpcs.respond_to? :delete_account_label - @delete_account_label = ::Gapic::Config::Method.new delete_account_label_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb deleted file mode 100644 index a9b8cb91fe84..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb +++ /dev/null @@ -1,327 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/accounts_labels_pb" - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - module Rest - ## - # REST service stub for the AccountLabelsService 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_account_labels REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListAccountLabelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::ListAccountLabelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::ListAccountLabelsResponse] - # A result object deserialized from the server's reply - def list_account_labels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_account_labels_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_account_labels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::ListAccountLabelsResponse.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_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::CreateAccountLabelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # A result object deserialized from the server's reply - def create_account_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_account_label_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_account_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::AccountLabel.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_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # A result object deserialized from the server's reply - def update_account_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_account_label_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_account_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::AccountLabel.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_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::DeleteAccountLabelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_account_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_account_label_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_account_label", - 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_account_labels REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListAccountLabelsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_account_labels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/labels", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::CreateAccountLabelRequest] - # 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_account_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/labels", - body: "account_label", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelRequest] - # 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_account_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{account_label.name}", - body: "account_label", - matches: [ - ["account_label.name", %r{^accounts/[^/]+/labels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::DeleteAccountLabelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_account_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/labels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb deleted file mode 100644 index 91f38e92911a..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/accounts_labels.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n,google/shopping/css/v1/accounts_labels.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x9a\x03\n\x0c\x41\x63\x63ountLabel\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x15\n\x08label_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x17\n\naccount_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tH\x01\x88\x01\x01\x12G\n\nlabel_type\x18\x06 \x01(\x0e\x32..google.shopping.css.v1.AccountLabel.LabelTypeB\x03\xe0\x41\x03\"B\n\tLabelType\x12\x1a\n\x16LABEL_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\r\n\tAUTOMATIC\x10\x02:d\xea\x41\x61\n\x1f\x63ss.googleapis.com/AccountLabel\x12!accounts/{account}/labels/{label}*\raccountLabels2\x0c\x61\x63\x63ountLabelB\x0f\n\r_display_nameB\x0e\n\x0c_description\"z\n\x18ListAccountLabelsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63ss.googleapis.com/AccountLabel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"r\n\x19ListAccountLabelsResponse\x12<\n\x0e\x61\x63\x63ount_labels\x18\x01 \x03(\x0b\x32$.google.shopping.css.v1.AccountLabel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x96\x01\n\x19\x43reateAccountLabelRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63ss.googleapis.com/AccountLabel\x12@\n\raccount_label\x18\x02 \x01(\x0b\x32$.google.shopping.css.v1.AccountLabelB\x03\xe0\x41\x02\"]\n\x19UpdateAccountLabelRequest\x12@\n\raccount_label\x18\x01 \x01(\x0b\x32$.google.shopping.css.v1.AccountLabelB\x03\xe0\x41\x02\"R\n\x19\x44\x65leteAccountLabelRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63ss.googleapis.com/AccountLabel2\x97\x06\n\x14\x41\x63\x63ountLabelsService\x12\xa9\x01\n\x11ListAccountLabels\x12\x30.google.shopping.css.v1.ListAccountLabelsRequest\x1a\x31.google.shopping.css.v1.ListAccountLabelsResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=accounts/*}/labels\x12\xbb\x01\n\x12\x43reateAccountLabel\x12\x31.google.shopping.css.v1.CreateAccountLabelRequest\x1a$.google.shopping.css.v1.AccountLabel\"L\xda\x41\x14parent,account_label\x82\xd3\xe4\x93\x02/\"\x1e/v1/{parent=accounts/*}/labels:\raccount_label\x12\xc2\x01\n\x12UpdateAccountLabel\x12\x31.google.shopping.css.v1.UpdateAccountLabelRequest\x1a$.google.shopping.css.v1.AccountLabel\"S\xda\x41\raccount_label\x82\xd3\xe4\x93\x02=2,/v1/{account_label.name=accounts/*/labels/*}:\raccount_label\x12\x8e\x01\n\x12\x44\x65leteAccountLabel\x12\x31.google.shopping.css.v1.DeleteAccountLabelRequest\x1a\x16.google.protobuf.Empty\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=accounts/*/labels/*}\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xb5\x01\n\x1a\x63om.google.shopping.css.v1B\x13\x41\x63\x63ountsLabelsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - AccountLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.AccountLabel").msgclass - AccountLabel::LabelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.AccountLabel.LabelType").enummodule - ListAccountLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListAccountLabelsRequest").msgclass - ListAccountLabelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListAccountLabelsResponse").msgclass - CreateAccountLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CreateAccountLabelRequest").msgclass - UpdateAccountLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.UpdateAccountLabelRequest").msgclass - DeleteAccountLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.DeleteAccountLabelRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb deleted file mode 100644 index 1d0c4f3552e2..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/css/v1/accounts_labels.proto for package 'Google.Shopping.Css.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/css/v1/accounts_labels_pb' - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - # Manages Merchant Center and CSS accounts labels. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.css.v1.AccountLabelsService' - - # Lists the labels owned by an account. - rpc :ListAccountLabels, ::Google::Shopping::Css::V1::ListAccountLabelsRequest, ::Google::Shopping::Css::V1::ListAccountLabelsResponse - # Creates a new label, not assigned to any account. - rpc :CreateAccountLabel, ::Google::Shopping::Css::V1::CreateAccountLabelRequest, ::Google::Shopping::Css::V1::AccountLabel - # Updates a label. - rpc :UpdateAccountLabel, ::Google::Shopping::Css::V1::UpdateAccountLabelRequest, ::Google::Shopping::Css::V1::AccountLabel - # Deletes a label and removes it from all accounts to which it was assigned. - rpc :DeleteAccountLabel, ::Google::Shopping::Css::V1::DeleteAccountLabelRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb deleted file mode 100644 index 4c0a1eaabeb1..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/accounts.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/shopping/css/v1/accounts.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc9\x01\n\x18ListChildAccountsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/Account\x12\x15\n\x08label_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x16\n\tfull_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x42\x0b\n\t_label_idB\x0c\n\n_full_name\"g\n\x19ListChildAccountsResponse\x12\x31\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x1f.google.shopping.css.v1.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x89\x01\n\x11GetAccountRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/Account\x12\x37\n\x06parent\x18\x02 \x01(\tB\"\xe0\x41\x01\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/AccountH\x00\x88\x01\x01\x42\t\n\x07_parent\"\xa5\x01\n\x1aUpdateAccountLabelsRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/Account\x12\x11\n\tlabel_ids\x18\x02 \x03(\x03\x12\x37\n\x06parent\x18\x03 \x01(\tB\"\xe0\x41\x01\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/AccountH\x00\x88\x01\x01\x42\t\n\x07_parent\"\xbb\x04\n\x07\x41\x63\x63ount\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\tfull_name\x18\x02 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x12!\n\x0chomepage_uri\x18\x04 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05H\x01\x88\x01\x01\x12\x13\n\x06parent\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x11\n\tlabel_ids\x18\x06 \x03(\x03\x12\x1b\n\x13\x61utomatic_label_ids\x18\x07 \x03(\x03\x12\x46\n\x0c\x61\x63\x63ount_type\x18\x08 \x01(\x0e\x32+.google.shopping.css.v1.Account.AccountTypeB\x03\xe0\x41\x03\"\xc6\x01\n\x0b\x41\x63\x63ountType\x12\x1c\n\x18\x41\x43\x43OUNT_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCSS_GROUP\x10\x01\x12\x0e\n\nCSS_DOMAIN\x10\x02\x12\x16\n\x12MC_PRIMARY_CSS_MCA\x10\x03\x12\x0e\n\nMC_CSS_MCA\x10\x04\x12\x16\n\x12MC_MARKETPLACE_MCA\x10\x05\x12\x10\n\x0cMC_OTHER_MCA\x10\x06\x12\x11\n\rMC_STANDALONE\x10\x07\x12\x15\n\x11MC_MCA_SUBACCOUNT\x10\x08:F\xea\x41\x43\n\x1a\x63ss.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}*\x08\x61\x63\x63ounts2\x07\x61\x63\x63ountB\x0f\n\r_display_nameB\x0f\n\r_homepage_uriB\t\n\x07_parent2\xa5\x04\n\x0f\x41\x63\x63ountsService\x12\xb4\x01\n\x11ListChildAccounts\x12\x30.google.shopping.css.v1.ListChildAccountsRequest\x1a\x31.google.shopping.css.v1.ListChildAccountsResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/v1/{parent=accounts/*}:listChildAccounts\x12~\n\nGetAccount\x12).google.shopping.css.v1.GetAccountRequest\x1a\x1f.google.shopping.css.v1.Account\"$\xda\x41\x04name\x82\xd3\xe4\x93\x02\x17\x12\x15/v1/{name=accounts/*}\x12\x99\x01\n\x0cUpdateLabels\x12\x32.google.shopping.css.v1.UpdateAccountLabelsRequest\x1a\x1f.google.shopping.css.v1.Account\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'\"\"/v1/{name=accounts/*}:updateLabels:\x01*\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xaf\x01\n\x1a\x63om.google.shopping.css.v1B\rAccountsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - ListChildAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListChildAccountsRequest").msgclass - ListChildAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListChildAccountsResponse").msgclass - GetAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.GetAccountRequest").msgclass - UpdateAccountLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.UpdateAccountLabelsRequest").msgclass - Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Account").msgclass - Account::AccountType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Account.AccountType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb deleted file mode 100644 index cbe6be04f569..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_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/shopping/css/v1/version" - -require "google/shopping/css/v1/accounts_service/credentials" -require "google/shopping/css/v1/accounts_service/paths" -require "google/shopping/css/v1/accounts_service/client" -require "google/shopping/css/v1/accounts_service/rest" - -module Google - module Shopping - module Css - module V1 - ## - # Service for managing CSS/MC account information. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/css/v1/accounts_service" - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/css/v1/accounts_service/rest" - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - module AccountsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "accounts_service", "helpers.rb" -require "google/shopping/css/v1/accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb deleted file mode 100644 index 4cab825031c9..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb +++ /dev/null @@ -1,707 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/css/v1/accounts_pb" - -module Google - module Shopping - module Css - module V1 - module AccountsService - ## - # Client for the AccountsService service. - # - # Service for managing CSS/MC account information. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :accounts_service_stub - - ## - # Configure the AccountsService Client class. - # - # See {::Google::Shopping::Css::V1::AccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountsService clients - # ::Google::Shopping::Css::V1::AccountsService::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", "Shopping", "Css", "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_child_accounts.timeout = 60.0 - default_config.rpcs.list_child_accounts.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_account.timeout = 60.0 - default_config.rpcs.get_account.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_labels.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountsService 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::Shopping::Css::V1::AccountsService::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 - @accounts_service_stub.universe_domain - end - - ## - # Create a new AccountsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountsService 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/shopping/css/v1/accounts_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 - - @accounts_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Css::V1::AccountsService::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 - ) - - @accounts_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 - @accounts_service_stub.logger - end - - # Service calls - - ## - # Lists all the accounts under the specified CSS account ID, and - # optionally filters by label ID and account name. - # - # @overload list_child_accounts(request, options = nil) - # Pass arguments to `list_child_accounts` via a request object, either of type - # {::Google::Shopping::Css::V1::ListChildAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListChildAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_child_accounts(parent: nil, label_id: nil, full_name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_child_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account. Must be a CSS group or domain. - # Format: accounts/\\{account} - # @param label_id [::Integer] - # If set, only the MC accounts with the given label ID will be returned. - # @param full_name [::String] - # If set, only the MC accounts with the given name (case sensitive) will be - # returned. - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 50 accounts will be - # returned. The maximum value is 100; values above 100 will be coerced to - # 100. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListChildAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListChildAccounts` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::Account>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::Account>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListChildAccountsRequest.new - # - # # Call the list_child_accounts method. - # result = client.list_child_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::Account. - # p item - # end - # - def list_child_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListChildAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_child_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_child_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_child_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :list_child_accounts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_child_accounts, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a single CSS/MC account by ID. - # - # @overload get_account(request, options = nil) - # Pass arguments to `get_account` via a request object, either of type - # {::Google::Shopping::Css::V1::GetAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::GetAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_account(name: nil, parent: nil) - # Pass arguments to `get_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the managed CSS/MC account. - # Format: accounts/\\{account} - # @param parent [::String] - # Optional. Only required when retrieving MC account information. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::GetAccountRequest.new - # - # # Call the get_account method. - # result = client.get_account request - # - # # The returned object is of type Google::Shopping::Css::V1::Account. - # p result - # - def get_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :get_account, request, 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 labels assigned to CSS/MC accounts by a CSS domain. - # - # @overload update_labels(request, options = nil) - # Pass arguments to `update_labels` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateAccountLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_labels(name: nil, label_ids: nil, parent: nil) - # Pass arguments to `update_labels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The label resource name. - # Format: accounts/\\{account} - # @param label_ids [::Array<::Integer>] - # The list of label IDs to overwrite the existing account label IDs. - # If the list is empty, all currently assigned label IDs will be deleted. - # @param parent [::String] - # Optional. Only required when updating MC account labels. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new - # - # # Call the update_labels method. - # result = client.update_labels request - # - # # The returned object is of type Google::Shopping::Css::V1::Account. - # p result - # - def update_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest - - # Converts hash and nil to 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_labels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_labels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :update_labels, request, 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 AccountsService API. - # - # This class represents the configuration for AccountsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Css::V1::AccountsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_child_accounts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::AccountsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_child_accounts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_child_accounts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Css::V1::AccountsService::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 = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_child_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_child_accounts - ## - # RPC-specific configuration for `get_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account - ## - # RPC-specific configuration for `update_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :update_labels - - # @private - def initialize parent_rpcs = nil - list_child_accounts_config = parent_rpcs.list_child_accounts if parent_rpcs.respond_to? :list_child_accounts - @list_child_accounts = ::Gapic::Config::Method.new list_child_accounts_config - get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account - @get_account = ::Gapic::Config::Method.new get_account_config - update_labels_config = parent_rpcs.update_labels if parent_rpcs.respond_to? :update_labels - @update_labels = ::Gapic::Config::Method.new update_labels_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb deleted file mode 100644 index 4584fe4873de..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Css - module V1 - module AccountsService - # Credentials for the AccountsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb deleted file mode 100644 index e069680bdb33..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - module AccountsService - # Path helper methods for the AccountsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb deleted file mode 100644 index 996c51dd8cec..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_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/shopping/css/v1/version" - -require "google/shopping/css/v1/accounts_service/credentials" -require "google/shopping/css/v1/accounts_service/paths" -require "google/shopping/css/v1/accounts_service/rest/client" - -module Google - module Shopping - module Css - module V1 - ## - # Service for managing CSS/MC account information. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/css/v1/accounts_service/rest" - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - module AccountsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/css/v1/accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb deleted file mode 100644 index 7aff86a899b6..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/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/shopping/css/v1/accounts_pb" -require "google/shopping/css/v1/accounts_service/rest/service_stub" - -module Google - module Shopping - module Css - module V1 - module AccountsService - module Rest - ## - # REST client for the AccountsService service. - # - # Service for managing CSS/MC account information. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :accounts_service_stub - - ## - # Configure the AccountsService Client class. - # - # See {::Google::Shopping::Css::V1::AccountsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountsService clients - # ::Google::Shopping::Css::V1::AccountsService::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", "Shopping", "Css", "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_child_accounts.timeout = 60.0 - default_config.rpcs.list_child_accounts.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_account.timeout = 60.0 - default_config.rpcs.get_account.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_labels.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountsService 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::Shopping::Css::V1::AccountsService::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 - @accounts_service_stub.universe_domain - end - - ## - # Create a new AccountsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountsService 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 - - @accounts_service_stub = ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @accounts_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 - @accounts_service_stub.logger - end - - # Service calls - - ## - # Lists all the accounts under the specified CSS account ID, and - # optionally filters by label ID and account name. - # - # @overload list_child_accounts(request, options = nil) - # Pass arguments to `list_child_accounts` via a request object, either of type - # {::Google::Shopping::Css::V1::ListChildAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListChildAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_child_accounts(parent: nil, label_id: nil, full_name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_child_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account. Must be a CSS group or domain. - # Format: accounts/\\{account} - # @param label_id [::Integer] - # If set, only the MC accounts with the given label ID will be returned. - # @param full_name [::String] - # If set, only the MC accounts with the given name (case sensitive) will be - # returned. - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 50 accounts will be - # returned. The maximum value is 100; values above 100 will be coerced to - # 100. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListChildAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListChildAccounts` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::Account>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::Account>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListChildAccountsRequest.new - # - # # Call the list_child_accounts method. - # result = client.list_child_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::Account. - # p item - # end - # - def list_child_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListChildAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_child_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_child_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_child_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.list_child_accounts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_child_accounts, "accounts", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a single CSS/MC account by ID. - # - # @overload get_account(request, options = nil) - # Pass arguments to `get_account` via a request object, either of type - # {::Google::Shopping::Css::V1::GetAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::GetAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_account(name: nil, parent: nil) - # Pass arguments to `get_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the managed CSS/MC account. - # Format: accounts/\\{account} - # @param parent [::String] - # Optional. Only required when retrieving MC account information. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::GetAccountRequest.new - # - # # Call the get_account method. - # result = client.get_account request - # - # # The returned object is of type Google::Shopping::Css::V1::Account. - # p result - # - def get_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.get_account request, 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 labels assigned to CSS/MC accounts by a CSS domain. - # - # @overload update_labels(request, options = nil) - # Pass arguments to `update_labels` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateAccountLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_labels(name: nil, label_ids: nil, parent: nil) - # Pass arguments to `update_labels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The label resource name. - # Format: accounts/\\{account} - # @param label_ids [::Array<::Integer>] - # The list of label IDs to overwrite the existing account label IDs. - # If the list is empty, all currently assigned label IDs will be deleted. - # @param parent [::String] - # Optional. Only required when updating MC account labels. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new - # - # # Call the update_labels method. - # result = client.update_labels request - # - # # The returned object is of type Google::Shopping::Css::V1::Account. - # p result - # - def update_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest - - # Converts hash and nil to an 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_labels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_labels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.update_labels request, 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 AccountsService REST API. - # - # This class represents the configuration for AccountsService 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::Shopping::Css::V1::AccountsService::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_child_accounts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::AccountsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_child_accounts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_child_accounts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_child_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_child_accounts - ## - # RPC-specific configuration for `get_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account - ## - # RPC-specific configuration for `update_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :update_labels - - # @private - def initialize parent_rpcs = nil - list_child_accounts_config = parent_rpcs.list_child_accounts if parent_rpcs.respond_to? :list_child_accounts - @list_child_accounts = ::Gapic::Config::Method.new list_child_accounts_config - get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account - @get_account = ::Gapic::Config::Method.new get_account_config - update_labels_config = parent_rpcs.update_labels if parent_rpcs.respond_to? :update_labels - @update_labels = ::Gapic::Config::Method.new update_labels_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb deleted file mode 100644 index afe5123dbfaa..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb +++ /dev/null @@ -1,265 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/accounts_pb" - -module Google - module Shopping - module Css - module V1 - module AccountsService - module Rest - ## - # REST service stub for the AccountsService 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_child_accounts REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListChildAccountsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::ListChildAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::ListChildAccountsResponse] - # A result object deserialized from the server's reply - def list_child_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_child_accounts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_child_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::ListChildAccountsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_account REST call - # - # @param request_pb [::Google::Shopping::Css::V1::GetAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::Account] - # A result object deserialized from the server's reply - def get_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::Account.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_labels REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::Account] - # A result object deserialized from the server's reply - def update_labels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_labels_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_labels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::Account.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_child_accounts REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListChildAccountsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_child_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}:listChildAccounts", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_account REST call - # - # @param request_pb [::Google::Shopping::Css::V1::GetAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_labels REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest] - # 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_labels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:updateLabels", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb deleted file mode 100644 index 6528ad62148c..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/css/v1/accounts.proto for package 'Google.Shopping.Css.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/css/v1/accounts_pb' - -module Google - module Shopping - module Css - module V1 - module AccountsService - # Service for managing CSS/MC account information. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.css.v1.AccountsService' - - # Lists all the accounts under the specified CSS account ID, and - # optionally filters by label ID and account name. - rpc :ListChildAccounts, ::Google::Shopping::Css::V1::ListChildAccountsRequest, ::Google::Shopping::Css::V1::ListChildAccountsResponse - # Retrieves a single CSS/MC account by ID. - rpc :GetAccount, ::Google::Shopping::Css::V1::GetAccountRequest, ::Google::Shopping::Css::V1::Account - # Updates labels assigned to CSS/MC accounts by a CSS domain. - rpc :UpdateLabels, ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, ::Google::Shopping::Css::V1::Account - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb deleted file mode 100644 index bd5bfbf234cf..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/css_product_common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n/google/shopping/css/v1/css_product_common.proto\x12\x16google.shopping.css.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xbc\x13\n\nAttributes\x12\x15\n\x08\x63pp_link\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63pp_mobile_link\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x10\x63pp_ads_redirect\x18* \x01(\tH\x02\x88\x01\x01\x12.\n\tlow_price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12/\n\nhigh_price\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x1d\n\x10number_of_offers\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12%\n\x18headline_offer_condition\x18\x06 \x01(\tH\x04\x88\x01\x01\x12\x39\n\x14headline_offer_price\x18\x07 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12 \n\x13headline_offer_link\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\'\n\x1aheadline_offer_mobile_link\x18\t \x01(\tH\x06\x88\x01\x01\x12\x42\n\x1dheadline_offer_shipping_price\x18) \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x12\n\x05title\x18\n \x01(\tH\x07\x88\x01\x01\x12\x17\n\nimage_link\x18\x0b \x01(\tH\x08\x88\x01\x01\x12\x1e\n\x16\x61\x64\x64itional_image_links\x18\x0c \x03(\t\x12\x18\n\x0b\x64\x65scription\x18\r \x01(\tH\t\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x0e \x01(\tH\n\x88\x01\x01\x12\x10\n\x03mpn\x18\x0f \x01(\tH\x0b\x88\x01\x01\x12\x11\n\x04gtin\x18\x10 \x01(\tH\x0c\x88\x01\x01\x12\x15\n\rproduct_types\x18$ \x03(\t\x12$\n\x17google_product_category\x18\x11 \x01(\tH\r\x88\x01\x01\x12\x12\n\x05\x61\x64ult\x18\x12 \x01(\x08H\x0e\x88\x01\x01\x12\x16\n\tmultipack\x18\x13 \x01(\x03H\x0f\x88\x01\x01\x12\x16\n\tis_bundle\x18\x14 \x01(\x08H\x10\x88\x01\x01\x12\x16\n\tage_group\x18\x15 \x01(\tH\x11\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x16 \x01(\tH\x12\x88\x01\x01\x12\x13\n\x06gender\x18\x17 \x01(\tH\x13\x88\x01\x01\x12\x15\n\x08material\x18\x18 \x01(\tH\x14\x88\x01\x01\x12\x14\n\x07pattern\x18\x19 \x01(\tH\x15\x88\x01\x01\x12\x11\n\x04size\x18\x1a \x01(\tH\x16\x88\x01\x01\x12\x18\n\x0bsize_system\x18\x1b \x01(\tH\x17\x88\x01\x01\x12\x12\n\nsize_types\x18\x1c \x03(\t\x12\x1a\n\ritem_group_id\x18\x1d \x01(\tH\x18\x88\x01\x01\x12>\n\x0fproduct_details\x18\x1e \x03(\x0b\x32%.google.shopping.css.v1.ProductDetail\x12=\n\x0eproduct_weight\x18\x1f \x01(\x0b\x32%.google.shopping.css.v1.ProductWeight\x12@\n\x0eproduct_length\x18 \x01(\x0b\x32(.google.shopping.css.v1.ProductDimension\x12?\n\rproduct_width\x18! \x01(\x0b\x32(.google.shopping.css.v1.ProductDimension\x12@\n\x0eproduct_height\x18\" \x01(\x0b\x32(.google.shopping.css.v1.ProductDimension\x12\x1a\n\x12product_highlights\x18# \x03(\t\x12=\n\x0e\x63\x65rtifications\x18\' \x03(\x0b\x32%.google.shopping.css.v1.Certification\x12\x33\n\x0f\x65xpiration_date\x18( \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1d\n\x15included_destinations\x18+ \x03(\t\x12\x1d\n\x15\x65xcluded_destinations\x18, \x03(\t\x12\x12\n\x05pause\x18- \x01(\tH\x19\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_0\x18. \x01(\tH\x1a\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_1\x18/ \x01(\tH\x1b\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_2\x18\x30 \x01(\tH\x1c\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_3\x18\x31 \x01(\tH\x1d\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_4\x18\x32 \x01(\tH\x1e\x88\x01\x01\x12T\n\x1aheadline_offer_installment\x18\x33 \x01(\x0b\x32\x30.google.shopping.css.v1.HeadlineOfferInstallment\x12_\n headline_offer_subscription_cost\x18\x34 \x01(\x0b\x32\x35.google.shopping.css.v1.HeadlineOfferSubscriptionCost\x12\x19\n\x0creview_count\x18\x36 \x01(\x03H\x1f\x88\x01\x01\x12\x17\n\nmin_rating\x18\x37 \x01(\x03H \x88\x01\x01\x12\x17\n\nmax_rating\x18\x38 \x01(\x03H!\x88\x01\x01\x12\x13\n\x06rating\x18\x39 \x01(\x01H\"\x88\x01\x01\x42\x0b\n\t_cpp_linkB\x12\n\x10_cpp_mobile_linkB\x13\n\x11_cpp_ads_redirectB\x13\n\x11_number_of_offersB\x1b\n\x19_headline_offer_conditionB\x16\n\x14_headline_offer_linkB\x1d\n\x1b_headline_offer_mobile_linkB\x08\n\x06_titleB\r\n\x0b_image_linkB\x0e\n\x0c_descriptionB\x08\n\x06_brandB\x06\n\x04_mpnB\x07\n\x05_gtinB\x1a\n\x18_google_product_categoryB\x08\n\x06_adultB\x0c\n\n_multipackB\x0c\n\n_is_bundleB\x0c\n\n_age_groupB\x08\n\x06_colorB\t\n\x07_genderB\x0b\n\t_materialB\n\n\x08_patternB\x07\n\x05_sizeB\x0e\n\x0c_size_systemB\x10\n\x0e_item_group_idB\x08\n\x06_pauseB\x11\n\x0f_custom_label_0B\x11\n\x0f_custom_label_1B\x11\n\x0f_custom_label_2B\x11\n\x0f_custom_label_3B\x11\n\x0f_custom_label_4B\x0f\n\r_review_countB\r\n\x0b_min_ratingB\r\n\x0b_max_ratingB\t\n\x07_rating\">\n\rCertification\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tauthority\x18\x02 \x01(\t\x12\x0c\n\x04\x63ode\x18\x03 \x01(\t\"V\n\rProductDetail\x12\x14\n\x0csection_name\x18\x01 \x01(\t\x12\x16\n\x0e\x61ttribute_name\x18\x02 \x01(\t\x12\x17\n\x0f\x61ttribute_value\x18\x03 \x01(\t\"9\n\x10ProductDimension\x12\x12\n\x05value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x02\"6\n\rProductWeight\x12\x12\n\x05value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xb1\x05\n\x10\x43ssProductStatus\x12X\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32:.google.shopping.css.v1.CssProductStatus.DestinationStatus\x12R\n\x11item_level_issues\x18\x04 \x03(\x0b\x32\x37.google.shopping.css.v1.CssProductStatus.ItemLevelIssue\x12\x31\n\rcreation_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_update_date\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x16google_expiration_date\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a~\n\x11\x44\x65stinationStatus\x12\x13\n\x0b\x64\x65stination\x18\x01 \x01(\t\x12\x1a\n\x12\x61pproved_countries\x18\x02 \x03(\t\x12\x19\n\x11pending_countries\x18\x03 \x03(\t\x12\x1d\n\x15\x64isapproved_countries\x18\x04 \x03(\t\x1a\xc9\x01\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x13\n\x0bservability\x18\x02 \x01(\t\x12\x12\n\nresolution\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65stination\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x07 \x01(\t\x12\x15\n\rdocumentation\x18\x08 \x01(\t\x12\x1c\n\x14\x61pplicable_countries\x18\t \x03(\t\"\x9f\x01\n\x1dHeadlineOfferSubscriptionCost\x12:\n\x06period\x18\x01 \x01(\x0e\x32*.google.shopping.css.v1.SubscriptionPeriod\x12\x15\n\rperiod_length\x18\x02 \x01(\x03\x12+\n\x06\x61mount\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\"\x89\x01\n\x18HeadlineOfferInstallment\x12\x0e\n\x06months\x18\x01 \x01(\x03\x12+\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x30\n\x0b\x64ownpayment\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price*N\n\x12SubscriptionPeriod\x12#\n\x1fSUBSCRIPTION_PERIOD_UNSPECIFIED\x10\x00\x12\t\n\x05MONTH\x10\x01\x12\x08\n\x04YEAR\x10\x02\x42\xb7\x01\n\x1a\x63om.google.shopping.css.v1B\x15\x43ssProductCommonProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - Attributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Attributes").msgclass - Certification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Certification").msgclass - ProductDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ProductDetail").msgclass - ProductDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ProductDimension").msgclass - ProductWeight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ProductWeight").msgclass - CssProductStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductStatus").msgclass - CssProductStatus::DestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductStatus.DestinationStatus").msgclass - CssProductStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductStatus.ItemLevelIssue").msgclass - HeadlineOfferSubscriptionCost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.HeadlineOfferSubscriptionCost").msgclass - HeadlineOfferInstallment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.HeadlineOfferInstallment").msgclass - SubscriptionPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.SubscriptionPeriod").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb deleted file mode 100644 index 4b67b42e62d4..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/css_product_inputs.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/css/v1/css_product_common_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n/google/shopping/css/v1/css_product_inputs.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a/google/shopping/css/v1/css_product_common.proto\x1a google/shopping/type/types.proto\"\xa7\x03\n\x0f\x43ssProductInput\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\nfinal_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0fraw_provided_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nfeed_label\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x0e\x66reshness_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x36\n\nattributes\x18\x07 \x01(\x0b\x32\".google.shopping.css.v1.Attributes\x12@\n\x11\x63ustom_attributes\x18\x08 \x03(\x0b\x32%.google.shopping.type.CustomAttribute:`\xea\x41]\n\"css.googleapis.com/CssProductInput\x12\x37\x61\x63\x63ounts/{account}/cssProductInputs/{css_product_input}\"\xbb\x01\n\x1cInsertCssProductInputRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"css.googleapis.com/CssProductInput\x12G\n\x11\x63ss_product_input\x18\x02 \x01(\x0b\x32\'.google.shopping.css.v1.CssProductInputB\x03\xe0\x41\x02\x12\x16\n\x07\x66\x65\x65\x64_id\x18\x03 \x01(\x03\x42\x05\x18\x01\xe0\x41\x01\"\x98\x01\n\x1cUpdateCssProductInputRequest\x12G\n\x11\x63ss_product_input\x18\x01 \x01(\x0b\x32\'.google.shopping.css.v1.CssProductInputB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x94\x01\n\x1c\x44\x65leteCssProductInputRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"css.googleapis.com/CssProductInput\x12!\n\x14supplemental_feed_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x42\x17\n\x15_supplemental_feed_id2\xb0\x05\n\x17\x43ssProductInputsService\x12\xc2\x01\n\x15InsertCssProductInput\x12\x34.google.shopping.css.v1.InsertCssProductInputRequest\x1a\'.google.shopping.css.v1.CssProductInput\"J\x82\xd3\xe4\x93\x02\x44\"//v1/{parent=accounts/*}/cssProductInputs:insert:\x11\x63ss_product_input\x12\xed\x01\n\x15UpdateCssProductInput\x12\x34.google.shopping.css.v1.UpdateCssProductInputRequest\x1a\'.google.shopping.css.v1.CssProductInput\"u\xda\x41\x1d\x63ss_product_input,update_mask\x82\xd3\xe4\x93\x02O2:/v1/{css_product_input.name=accounts/*/cssProductInputs/*}:\x11\x63ss_product_input\x12\x9e\x01\n\x15\x44\x65leteCssProductInput\x12\x34.google.shopping.css.v1.DeleteCssProductInputRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=accounts/*/cssProductInputs/*}\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xb7\x01\n\x1a\x63om.google.shopping.css.v1B\x15\x43ssProductInputsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - CssProductInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductInput").msgclass - InsertCssProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.InsertCssProductInputRequest").msgclass - UpdateCssProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.UpdateCssProductInputRequest").msgclass - DeleteCssProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.DeleteCssProductInputRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb deleted file mode 100644 index d9b82213398f..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_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/shopping/css/v1/version" - -require "google/shopping/css/v1/css_product_inputs_service/credentials" -require "google/shopping/css/v1/css_product_inputs_service/paths" -require "google/shopping/css/v1/css_product_inputs_service/client" -require "google/shopping/css/v1/css_product_inputs_service/rest" - -module Google - module Shopping - module Css - module V1 - ## - # Service to use CssProductInput resource. - # This service helps to insert/update/delete CSS Products. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/css/v1/css_product_inputs_service" - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/css/v1/css_product_inputs_service/rest" - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - module CssProductInputsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "css_product_inputs_service", "helpers.rb" -require "google/shopping/css/v1/css_product_inputs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb deleted file mode 100644 index 03f889520666..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb +++ /dev/null @@ -1,714 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/css/v1/css_product_inputs_pb" - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - ## - # Client for the CssProductInputsService service. - # - # Service to use CssProductInput resource. - # This service helps to insert/update/delete CSS Products. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :css_product_inputs_service_stub - - ## - # Configure the CssProductInputsService Client class. - # - # See {::Google::Shopping::Css::V1::CssProductInputsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CssProductInputsService clients - # ::Google::Shopping::Css::V1::CssProductInputsService::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", "Shopping", "Css", "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.insert_css_product_input.timeout = 60.0 - - default_config.rpcs.update_css_product_input.timeout = 60.0 - - default_config.rpcs.delete_css_product_input.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CssProductInputsService 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::Shopping::Css::V1::CssProductInputsService::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 - @css_product_inputs_service_stub.universe_domain - end - - ## - # Create a new CssProductInputsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CssProductInputsService 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/shopping/css/v1/css_product_inputs_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 - - @css_product_inputs_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Css::V1::CssProductInputsService::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 - ) - - @css_product_inputs_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 - @css_product_inputs_service_stub.logger - end - - # Service calls - - ## - # Uploads a CssProductInput to your CSS Center account. If an - # input with the same contentLanguage, identity, feedLabel and feedId already - # exists, this method replaces that entry. - # - # After inserting, updating, or deleting a CSS Product input, it may - # take several minutes before the processed CSS Product can be retrieved. - # - # @overload insert_css_product_input(request, options = nil) - # Pass arguments to `insert_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::InsertCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::InsertCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_css_product_input(parent: nil, css_product_input: nil, feed_id: nil) - # Pass arguments to `insert_css_product_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 account where this CSS Product will be inserted. - # Format: accounts/\\{account} - # @param css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] - # Required. The CSS Product Input to insert. - # @param feed_id [::Integer] - # Optional. DEPRECATED. Feed id is not required for CSS Products. - # The primary or supplemental feed id. If CSS Product already exists and - # feed id provided is different, then the CSS Product will be moved to a - # new feed. - # Note: For now, CSSs do not need to provide feed ids as we create - # feeds on the fly. - # We do not have supplemental feed support for CSS Products yet. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::InsertCssProductInputRequest.new - # - # # Call the insert_css_product_input method. - # result = client.insert_css_product_input request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - # p result - # - def insert_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::InsertCssProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_css_product_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::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_css_product_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.call_rpc :insert_css_product_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 - - ## - # Updates the existing Css Product input in your CSS Center account. - # - # After inserting, updating, or deleting a CSS Product input, it may take - # several minutes before the processed Css Product can be retrieved. - # - # @overload update_css_product_input(request, options = nil) - # Pass arguments to `update_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_css_product_input(css_product_input: nil, update_mask: nil) - # Pass arguments to `update_css_product_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 css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] - # Required. The CSS product input resource to update. Information you submit - # will be applied to the processed CSS product as well. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of CSS product attributes to be updated. - # - # If the update mask is omitted, then it is treated as implied field mask - # equivalent to all fields that are populated (have a non-empty value). - # - # Attributes specified in the update mask without a value specified in the - # body will be deleted from the CSS product. - # - # Update mask can only be specified for top level fields in - # attributes and custom attributes. - # - # To specify the update mask for custom attributes you need to add the - # `custom_attribute.` prefix. - # - # Providing special "*" value for full CSS product replacement is not - # supported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateCssProductInputRequest.new - # - # # Call the update_css_product_input method. - # result = client.update_css_product_input request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - # p result - # - def update_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateCssProductInputRequest - - # Converts hash and nil to 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_css_product_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::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.css_product_input&.name - header_params["css_product_input.name"] = request.css_product_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_css_product_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.call_rpc :update_css_product_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 a CSS Product input from your CSS Center account. - # - # After a delete it may take several minutes until the input is no longer - # available. - # - # @overload delete_css_product_input(request, options = nil) - # Pass arguments to `delete_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::DeleteCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::DeleteCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_css_product_input(name: nil, supplemental_feed_id: nil) - # Pass arguments to `delete_css_product_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 CSS product input resource to delete. - # Format: accounts/\\{account}/cssProductInputs/\\{css_product_input}, where the - # last section `css_product_input` consists of 3 parts: - # contentLanguage~feedLabel~offerId. Example: - # accounts/123/cssProductInputs/de~DE~rawProvidedId123 - # @param supplemental_feed_id [::Integer] - # The Content API Supplemental Feed ID. - # The field must not be set if the action applies to a primary feed. - # If the field is set, then product action applies to a supplemental feed - # instead of primary Content API feed. - # - # @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/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::DeleteCssProductInputRequest.new - # - # # Call the delete_css_product_input method. - # result = client.delete_css_product_input request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteCssProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_css_product_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::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_css_product_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.call_rpc :delete_css_product_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 - - ## - # Configuration class for the CssProductInputsService API. - # - # This class represents the configuration for CssProductInputsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Css::V1::CssProductInputsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # insert_css_product_input to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::CssProductInputsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_css_product_input.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_css_product_input.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Css::V1::CssProductInputsService::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 = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 CssProductInputsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `insert_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_css_product_input - ## - # RPC-specific configuration for `update_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :update_css_product_input - ## - # RPC-specific configuration for `delete_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_css_product_input - - # @private - def initialize parent_rpcs = nil - insert_css_product_input_config = parent_rpcs.insert_css_product_input if parent_rpcs.respond_to? :insert_css_product_input - @insert_css_product_input = ::Gapic::Config::Method.new insert_css_product_input_config - update_css_product_input_config = parent_rpcs.update_css_product_input if parent_rpcs.respond_to? :update_css_product_input - @update_css_product_input = ::Gapic::Config::Method.new update_css_product_input_config - delete_css_product_input_config = parent_rpcs.delete_css_product_input if parent_rpcs.respond_to? :delete_css_product_input - @delete_css_product_input = ::Gapic::Config::Method.new delete_css_product_input_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb deleted file mode 100644 index 066f5ca9210d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - # Credentials for the CssProductInputsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb deleted file mode 100644 index b71796db1d3e..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_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 Shopping - module Css - module V1 - module CssProductInputsService - # Path helper methods for the CssProductInputsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified CssProductInput resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/cssProductInputs/{css_product_input}` - # - # @param account [String] - # @param css_product_input [String] - # - # @return [::String] - def css_product_input_path account:, css_product_input: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/cssProductInputs/#{css_product_input}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb deleted file mode 100644 index 06be63d42390..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_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/shopping/css/v1/version" - -require "google/shopping/css/v1/css_product_inputs_service/credentials" -require "google/shopping/css/v1/css_product_inputs_service/paths" -require "google/shopping/css/v1/css_product_inputs_service/rest/client" - -module Google - module Shopping - module Css - module V1 - ## - # Service to use CssProductInput resource. - # This service helps to insert/update/delete CSS Products. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/css/v1/css_product_inputs_service/rest" - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - module CssProductInputsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/css/v1/css_product_inputs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb deleted file mode 100644 index 5236bfea7b1e..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb +++ /dev/null @@ -1,650 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/css/v1/css_product_inputs_pb" -require "google/shopping/css/v1/css_product_inputs_service/rest/service_stub" - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - module Rest - ## - # REST client for the CssProductInputsService service. - # - # Service to use CssProductInput resource. - # This service helps to insert/update/delete CSS Products. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :css_product_inputs_service_stub - - ## - # Configure the CssProductInputsService Client class. - # - # See {::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CssProductInputsService clients - # ::Google::Shopping::Css::V1::CssProductInputsService::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", "Shopping", "Css", "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.insert_css_product_input.timeout = 60.0 - - default_config.rpcs.update_css_product_input.timeout = 60.0 - - default_config.rpcs.delete_css_product_input.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CssProductInputsService 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::Shopping::Css::V1::CssProductInputsService::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 - @css_product_inputs_service_stub.universe_domain - end - - ## - # Create a new CssProductInputsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CssProductInputsService 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 - - @css_product_inputs_service_stub = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @css_product_inputs_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 - @css_product_inputs_service_stub.logger - end - - # Service calls - - ## - # Uploads a CssProductInput to your CSS Center account. If an - # input with the same contentLanguage, identity, feedLabel and feedId already - # exists, this method replaces that entry. - # - # After inserting, updating, or deleting a CSS Product input, it may - # take several minutes before the processed CSS Product can be retrieved. - # - # @overload insert_css_product_input(request, options = nil) - # Pass arguments to `insert_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::InsertCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::InsertCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_css_product_input(parent: nil, css_product_input: nil, feed_id: nil) - # Pass arguments to `insert_css_product_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 account where this CSS Product will be inserted. - # Format: accounts/\\{account} - # @param css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] - # Required. The CSS Product Input to insert. - # @param feed_id [::Integer] - # Optional. DEPRECATED. Feed id is not required for CSS Products. - # The primary or supplemental feed id. If CSS Product already exists and - # feed id provided is different, then the CSS Product will be moved to a - # new feed. - # Note: For now, CSSs do not need to provide feed ids as we create - # feeds on the fly. - # We do not have supplemental feed support for CSS Products yet. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::InsertCssProductInputRequest.new - # - # # Call the insert_css_product_input method. - # result = client.insert_css_product_input request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - # p result - # - def insert_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::InsertCssProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_css_product_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::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_css_product_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.insert_css_product_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 - - ## - # Updates the existing Css Product input in your CSS Center account. - # - # After inserting, updating, or deleting a CSS Product input, it may take - # several minutes before the processed Css Product can be retrieved. - # - # @overload update_css_product_input(request, options = nil) - # Pass arguments to `update_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_css_product_input(css_product_input: nil, update_mask: nil) - # Pass arguments to `update_css_product_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 css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] - # Required. The CSS product input resource to update. Information you submit - # will be applied to the processed CSS product as well. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of CSS product attributes to be updated. - # - # If the update mask is omitted, then it is treated as implied field mask - # equivalent to all fields that are populated (have a non-empty value). - # - # Attributes specified in the update mask without a value specified in the - # body will be deleted from the CSS product. - # - # Update mask can only be specified for top level fields in - # attributes and custom attributes. - # - # To specify the update mask for custom attributes you need to add the - # `custom_attribute.` prefix. - # - # Providing special "*" value for full CSS product replacement is not - # supported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateCssProductInputRequest.new - # - # # Call the update_css_product_input method. - # result = client.update_css_product_input request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - # p result - # - def update_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateCssProductInputRequest - - # Converts hash and nil to an 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_css_product_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::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_css_product_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.update_css_product_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 a CSS Product input from your CSS Center account. - # - # After a delete it may take several minutes until the input is no longer - # available. - # - # @overload delete_css_product_input(request, options = nil) - # Pass arguments to `delete_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::DeleteCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::DeleteCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_css_product_input(name: nil, supplemental_feed_id: nil) - # Pass arguments to `delete_css_product_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 CSS product input resource to delete. - # Format: accounts/\\{account}/cssProductInputs/\\{css_product_input}, where the - # last section `css_product_input` consists of 3 parts: - # contentLanguage~feedLabel~offerId. Example: - # accounts/123/cssProductInputs/de~DE~rawProvidedId123 - # @param supplemental_feed_id [::Integer] - # The Content API Supplemental Feed ID. - # The field must not be set if the action applies to a primary feed. - # If the field is set, then product action applies to a supplemental feed - # instead of primary Content API feed. - # @yield [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/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::DeleteCssProductInputRequest.new - # - # # Call the delete_css_product_input method. - # result = client.delete_css_product_input request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteCssProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_css_product_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::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_css_product_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.delete_css_product_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 - - ## - # Configuration class for the CssProductInputsService REST API. - # - # This class represents the configuration for CssProductInputsService 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::Shopping::Css::V1::CssProductInputsService::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 - # # insert_css_product_input to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_css_product_input.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_css_product_input.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 CssProductInputsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `insert_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_css_product_input - ## - # RPC-specific configuration for `update_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :update_css_product_input - ## - # RPC-specific configuration for `delete_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_css_product_input - - # @private - def initialize parent_rpcs = nil - insert_css_product_input_config = parent_rpcs.insert_css_product_input if parent_rpcs.respond_to? :insert_css_product_input - @insert_css_product_input = ::Gapic::Config::Method.new insert_css_product_input_config - update_css_product_input_config = parent_rpcs.update_css_product_input if parent_rpcs.respond_to? :update_css_product_input - @update_css_product_input = ::Gapic::Config::Method.new update_css_product_input_config - delete_css_product_input_config = parent_rpcs.delete_css_product_input if parent_rpcs.respond_to? :delete_css_product_input - @delete_css_product_input = ::Gapic::Config::Method.new delete_css_product_input_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb deleted file mode 100644 index 3eb2aa0f1884..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_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/shopping/css/v1/css_product_inputs_pb" - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - module Rest - ## - # REST service stub for the CssProductInputsService 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 insert_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::InsertCssProductInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # A result object deserialized from the server's reply - def insert_css_product_input request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_css_product_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: "insert_css_product_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::CssProductInput.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_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateCssProductInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # A result object deserialized from the server's reply - def update_css_product_input request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_css_product_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_css_product_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::CssProductInput.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_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::DeleteCssProductInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_css_product_input request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_css_product_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_css_product_input", - 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 insert_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::InsertCssProductInputRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_css_product_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/cssProductInputs:insert", - body: "css_product_input", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateCssProductInputRequest] - # 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_css_product_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{css_product_input.name}", - body: "css_product_input", - matches: [ - ["css_product_input.name", %r{^accounts/[^/]+/cssProductInputs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::DeleteCssProductInputRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_css_product_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/cssProductInputs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb deleted file mode 100644 index a872c72a6951..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/css/v1/css_product_inputs.proto for package 'Google.Shopping.Css.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/css/v1/css_product_inputs_pb' - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - # Service to use CssProductInput resource. - # This service helps to insert/update/delete CSS Products. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.css.v1.CssProductInputsService' - - # Uploads a CssProductInput to your CSS Center account. If an - # input with the same contentLanguage, identity, feedLabel and feedId already - # exists, this method replaces that entry. - # - # After inserting, updating, or deleting a CSS Product input, it may - # take several minutes before the processed CSS Product can be retrieved. - rpc :InsertCssProductInput, ::Google::Shopping::Css::V1::InsertCssProductInputRequest, ::Google::Shopping::Css::V1::CssProductInput - # Updates the existing Css Product input in your CSS Center account. - # - # After inserting, updating, or deleting a CSS Product input, it may take - # several minutes before the processed Css Product can be retrieved. - rpc :UpdateCssProductInput, ::Google::Shopping::Css::V1::UpdateCssProductInputRequest, ::Google::Shopping::Css::V1::CssProductInput - # Deletes a CSS Product input from your CSS Center account. - # - # After a delete it may take several minutes until the input is no longer - # available. - rpc :DeleteCssProductInput, ::Google::Shopping::Css::V1::DeleteCssProductInputRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb deleted file mode 100644 index b23a373fe93d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/css_products.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/shopping/css/v1/css_product_common_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n)google/shopping/css/v1/css_products.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/shopping/css/v1/css_product_common.proto\x1a google/shopping/type/types.proto\"K\n\x14GetCssProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63ss.googleapis.com/CssProduct\"\xaa\x03\n\nCssProduct\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1c\n\x0fraw_provided_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63ontent_language\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12;\n\nattributes\x18\x05 \x01(\x0b\x32\".google.shopping.css.v1.AttributesB\x03\xe0\x41\x03\x12\x45\n\x11\x63ustom_attributes\x18\x06 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x03\x12I\n\x12\x63ss_product_status\x18\x08 \x01(\x0b\x32(.google.shopping.css.v1.CssProductStatusB\x03\xe0\x41\x03:i\xea\x41\x66\n\x1d\x63ss.googleapis.com/CssProduct\x12,accounts/{account}/cssProducts/{css_product}*\x0b\x63ssProducts2\ncssProduct\"v\n\x16ListCssProductsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63ss.googleapis.com/CssProduct\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"l\n\x17ListCssProductsResponse\x12\x38\n\x0c\x63ss_products\x18\x01 \x03(\x0b\x32\".google.shopping.css.v1.CssProduct\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x98\x03\n\x12\x43ssProductsService\x12\x95\x01\n\rGetCssProduct\x12,.google.shopping.css.v1.GetCssProductRequest\x1a\".google.shopping.css.v1.CssProduct\"2\xda\x41\x04name\x82\xd3\xe4\x93\x02%\x12#/v1/{name=accounts/*/cssProducts/*}\x12\xa8\x01\n\x0fListCssProducts\x12..google.shopping.css.v1.ListCssProductsRequest\x1a/.google.shopping.css.v1.ListCssProductsResponse\"4\xda\x41\x06parent\x82\xd3\xe4\x93\x02%\x12#/v1/{parent=accounts/*}/cssProducts\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xb2\x01\n\x1a\x63om.google.shopping.css.v1B\x10\x43ssProductsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - GetCssProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.GetCssProductRequest").msgclass - CssProduct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProduct").msgclass - ListCssProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListCssProductsRequest").msgclass - ListCssProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListCssProductsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb deleted file mode 100644 index ace56839641d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_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/shopping/css/v1/version" - -require "google/shopping/css/v1/css_products_service/credentials" -require "google/shopping/css/v1/css_products_service/paths" -require "google/shopping/css/v1/css_products_service/client" -require "google/shopping/css/v1/css_products_service/rest" - -module Google - module Shopping - module Css - module V1 - ## - # Service for doing get and list on Css Products(a.k.a Aggregate Offers - # internally). - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/css/v1/css_products_service" - # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/css/v1/css_products_service/rest" - # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new - # - module CssProductsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "css_products_service", "helpers.rb" -require "google/shopping/css/v1/css_products_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb deleted file mode 100644 index 9bf1eb3a514c..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.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 "google/cloud/errors" -require "google/shopping/css/v1/css_products_pb" - -module Google - module Shopping - module Css - module V1 - module CssProductsService - ## - # Client for the CssProductsService service. - # - # Service for doing get and list on Css Products(a.k.a Aggregate Offers - # internally). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :css_products_service_stub - - ## - # Configure the CssProductsService Client class. - # - # See {::Google::Shopping::Css::V1::CssProductsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CssProductsService clients - # ::Google::Shopping::Css::V1::CssProductsService::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", "Shopping", "Css", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_css_product.timeout = 60.0 - default_config.rpcs.get_css_product.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_css_products.timeout = 60.0 - default_config.rpcs.list_css_products.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CssProductsService 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::Shopping::Css::V1::CssProductsService::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 - @css_products_service_stub.universe_domain - end - - ## - # Create a new CssProductsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CssProductsService 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/shopping/css/v1/css_products_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @css_products_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Css::V1::CssProductsService::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 - ) - - @css_products_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 - @css_products_service_stub.logger - end - - # Service calls - - ## - # Retrieves the processed CSS Product from your CSS Center account. After - # inserting, updating, or deleting a product input, it may take several - # minutes before the updated final product can be retrieved. - # - # @overload get_css_product(request, options = nil) - # Pass arguments to `get_css_product` via a request object, either of type - # {::Google::Shopping::Css::V1::GetCssProductRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::GetCssProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_css_product(name: nil) - # Pass arguments to `get_css_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the CSS product to retrieve. - # Format: `accounts/{account}/cssProducts/{css_product}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::CssProduct] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::CssProduct] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::GetCssProductRequest.new - # - # # Call the get_css_product method. - # result = client.get_css_product request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProduct. - # p result - # - def get_css_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetCssProductRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_css_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::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_css_product.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_css_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_products_service_stub.call_rpc :get_css_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 the processed CSS Products in your CSS Center account. The response - # might contain fewer items than specified by pageSize. Rely on pageToken to - # determine if there are more items to be requested. - # - # After inserting, updating, or deleting a CSS product input, it may - # take several minutes before the updated processed CSS product can be - # retrieved. - # - # @overload list_css_products(request, options = nil) - # Pass arguments to `list_css_products` via a request object, either of type - # {::Google::Shopping::Css::V1::ListCssProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListCssProductsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_css_products(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_css_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 account/domain to list processed CSS Products for. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of CSS Products to return. The service may return - # fewer than this value. - # The maximum value is 1000; values above 1000 will be coerced to 1000. If - # unspecified, the maximum number of CSS products will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListCssProducts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListCssProducts` - # must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListCssProductsRequest.new - # - # # Call the list_css_products method. - # result = client.list_css_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::Shopping::Css::V1::CssProduct. - # p item - # end - # - def list_css_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListCssProductsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_css_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::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_css_products.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_css_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_products_service_stub.call_rpc :list_css_products, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @css_products_service_stub, :list_css_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 - - ## - # Configuration class for the CssProductsService API. - # - # This class represents the configuration for CssProductsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Css::V1::CssProductsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_css_product to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::CssProductsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_css_product.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_css_product.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Css::V1::CssProductsService::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 = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 CssProductsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_css_product` - # @return [::Gapic::Config::Method] - # - attr_reader :get_css_product - ## - # RPC-specific configuration for `list_css_products` - # @return [::Gapic::Config::Method] - # - attr_reader :list_css_products - - # @private - def initialize parent_rpcs = nil - get_css_product_config = parent_rpcs.get_css_product if parent_rpcs.respond_to? :get_css_product - @get_css_product = ::Gapic::Config::Method.new get_css_product_config - list_css_products_config = parent_rpcs.list_css_products if parent_rpcs.respond_to? :list_css_products - @list_css_products = ::Gapic::Config::Method.new list_css_products_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb deleted file mode 100644 index 5656f955c92c..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Css - module V1 - module CssProductsService - # Credentials for the CssProductsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb deleted file mode 100644 index e311ef6467e0..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_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 Shopping - module Css - module V1 - module CssProductsService - # Path helper methods for the CssProductsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified CssProduct resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/cssProducts/{css_product}` - # - # @param account [String] - # @param css_product [String] - # - # @return [::String] - def css_product_path account:, css_product: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/cssProducts/#{css_product}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb deleted file mode 100644 index 6c5a8ef0a46d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_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/shopping/css/v1/version" - -require "google/shopping/css/v1/css_products_service/credentials" -require "google/shopping/css/v1/css_products_service/paths" -require "google/shopping/css/v1/css_products_service/rest/client" - -module Google - module Shopping - module Css - module V1 - ## - # Service for doing get and list on Css Products(a.k.a Aggregate Offers - # internally). - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/css/v1/css_products_service/rest" - # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new - # - module CssProductsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/css/v1/css_products_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb deleted file mode 100644 index c9794b0bc92e..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb +++ /dev/null @@ -1,547 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/css/v1/css_products_pb" -require "google/shopping/css/v1/css_products_service/rest/service_stub" - -module Google - module Shopping - module Css - module V1 - module CssProductsService - module Rest - ## - # REST client for the CssProductsService service. - # - # Service for doing get and list on Css Products(a.k.a Aggregate Offers - # internally). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :css_products_service_stub - - ## - # Configure the CssProductsService Client class. - # - # See {::Google::Shopping::Css::V1::CssProductsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CssProductsService clients - # ::Google::Shopping::Css::V1::CssProductsService::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", "Shopping", "Css", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_css_product.timeout = 60.0 - default_config.rpcs.get_css_product.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_css_products.timeout = 60.0 - default_config.rpcs.list_css_products.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CssProductsService 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::Shopping::Css::V1::CssProductsService::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 - @css_products_service_stub.universe_domain - end - - ## - # Create a new CssProductsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CssProductsService 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 - - @css_products_service_stub = ::Google::Shopping::Css::V1::CssProductsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @css_products_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 - @css_products_service_stub.logger - end - - # Service calls - - ## - # Retrieves the processed CSS Product from your CSS Center account. After - # inserting, updating, or deleting a product input, it may take several - # minutes before the updated final product can be retrieved. - # - # @overload get_css_product(request, options = nil) - # Pass arguments to `get_css_product` via a request object, either of type - # {::Google::Shopping::Css::V1::GetCssProductRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::GetCssProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_css_product(name: nil) - # Pass arguments to `get_css_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the CSS product to retrieve. - # Format: `accounts/{account}/cssProducts/{css_product}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProduct] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProduct] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::GetCssProductRequest.new - # - # # Call the get_css_product method. - # result = client.get_css_product request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProduct. - # p result - # - def get_css_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetCssProductRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_css_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::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_css_product.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_css_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_products_service_stub.get_css_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 the processed CSS Products in your CSS Center account. The response - # might contain fewer items than specified by pageSize. Rely on pageToken to - # determine if there are more items to be requested. - # - # After inserting, updating, or deleting a CSS product input, it may - # take several minutes before the updated processed CSS product can be - # retrieved. - # - # @overload list_css_products(request, options = nil) - # Pass arguments to `list_css_products` via a request object, either of type - # {::Google::Shopping::Css::V1::ListCssProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListCssProductsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_css_products(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_css_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 account/domain to list processed CSS Products for. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of CSS Products to return. The service may return - # fewer than this value. - # The maximum value is 1000; values above 1000 will be coerced to 1000. If - # unspecified, the maximum number of CSS products will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListCssProducts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListCssProducts` - # must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListCssProductsRequest.new - # - # # Call the list_css_products method. - # result = client.list_css_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::Shopping::Css::V1::CssProduct. - # p item - # end - # - def list_css_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListCssProductsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_css_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::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_css_products.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_css_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_products_service_stub.list_css_products request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @css_products_service_stub, :list_css_products, "css_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 - - ## - # Configuration class for the CssProductsService REST API. - # - # This class represents the configuration for CssProductsService 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::Shopping::Css::V1::CssProductsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_css_product to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_css_product.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_css_product.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 CssProductsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_css_product` - # @return [::Gapic::Config::Method] - # - attr_reader :get_css_product - ## - # RPC-specific configuration for `list_css_products` - # @return [::Gapic::Config::Method] - # - attr_reader :list_css_products - - # @private - def initialize parent_rpcs = nil - get_css_product_config = parent_rpcs.get_css_product if parent_rpcs.respond_to? :get_css_product - @get_css_product = ::Gapic::Config::Method.new get_css_product_config - list_css_products_config = parent_rpcs.list_css_products if parent_rpcs.respond_to? :list_css_products - @list_css_products = ::Gapic::Config::Method.new list_css_products_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb deleted file mode 100644 index d7eea4bfc0da..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb +++ /dev/null @@ -1,203 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/css_products_pb" - -module Google - module Shopping - module Css - module V1 - module CssProductsService - module Rest - ## - # REST service stub for the CssProductsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_css_product REST call - # - # @param request_pb [::Google::Shopping::Css::V1::GetCssProductRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProduct] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProduct] - # A result object deserialized from the server's reply - def get_css_product request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_css_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_css_product", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::CssProduct.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_css_products REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListCssProductsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::ListCssProductsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::ListCssProductsResponse] - # A result object deserialized from the server's reply - def list_css_products request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_css_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_css_products", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::ListCssProductsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_css_product REST call - # - # @param request_pb [::Google::Shopping::Css::V1::GetCssProductRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_css_product_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/cssProducts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_css_products REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListCssProductsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_css_products_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/cssProducts", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb deleted file mode 100644 index 50ec396539bb..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/css/v1/css_products.proto for package 'Google.Shopping.Css.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/css/v1/css_products_pb' - -module Google - module Shopping - module Css - module V1 - module CssProductsService - # Service for doing get and list on Css Products(a.k.a Aggregate Offers - # internally). - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.css.v1.CssProductsService' - - # Retrieves the processed CSS Product from your CSS Center account. After - # inserting, updating, or deleting a product input, it may take several - # minutes before the updated final product can be retrieved. - rpc :GetCssProduct, ::Google::Shopping::Css::V1::GetCssProductRequest, ::Google::Shopping::Css::V1::CssProduct - # Lists the processed CSS Products in your CSS Center account. The response - # might contain fewer items than specified by pageSize. Rely on pageToken to - # determine if there are more items to be requested. - # - # After inserting, updating, or deleting a CSS product input, it may - # take several minutes before the updated processed CSS product can be - # retrieved. - rpc :ListCssProducts, ::Google::Shopping::Css::V1::ListCssProductsRequest, ::Google::Shopping::Css::V1::ListCssProductsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb deleted file mode 100644 index 6f35b13b6859..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/quota.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/shopping/css/v1/quota.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa3\x02\n\nQuotaGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bquota_usage\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bquota_limit\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1f\n\x12quota_minute_limit\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x42\n\x0emethod_details\x18\x04 \x03(\x0b\x32%.google.shopping.css.v1.MethodDetailsB\x03\xe0\x41\x03:i\xea\x41\x66\n\x1d\x63ss.googleapis.com/QuotaGroup\x12,accounts/{account}/quotaGroups/{quota_group}*\x0bquotaGroups2\nquotaGroup\"b\n\rMethodDetails\x12\x13\n\x06method\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06subapi\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\x80\x01\n\x16ListQuotaGroupsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63ss.googleapis.com/QuotaGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"l\n\x17ListQuotaGroupsResponse\x12\x38\n\x0cquota_groups\x18\x01 \x03(\x0b\x32\".google.shopping.css.v1.QuotaGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf5\x01\n\x0cQuotaService\x12\xa3\x01\n\x0fListQuotaGroups\x12..google.shopping.css.v1.ListQuotaGroupsRequest\x1a/.google.shopping.css.v1.ListQuotaGroupsResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=accounts/*}/quotas\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xac\x01\n\x1a\x63om.google.shopping.css.v1B\nQuotaProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - QuotaGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.QuotaGroup").msgclass - MethodDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.MethodDetails").msgclass - ListQuotaGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListQuotaGroupsRequest").msgclass - ListQuotaGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListQuotaGroupsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb deleted file mode 100644 index 8318f2e1b7a3..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_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/shopping/css/v1/version" - -require "google/shopping/css/v1/quota_service/credentials" -require "google/shopping/css/v1/quota_service/paths" -require "google/shopping/css/v1/quota_service/client" -require "google/shopping/css/v1/quota_service/rest" - -module Google - module Shopping - module Css - module V1 - ## - # Service to get method call quota information per CSS API method. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/css/v1/quota_service" - # client = ::Google::Shopping::Css::V1::QuotaService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/css/v1/quota_service/rest" - # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new - # - module QuotaService - end - end - end - end -end - -helper_path = ::File.join __dir__, "quota_service", "helpers.rb" -require "google/shopping/css/v1/quota_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb deleted file mode 100644 index 187b69820639..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb +++ /dev/null @@ -1,493 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/css/v1/quota_pb" - -module Google - module Shopping - module Css - module V1 - module QuotaService - ## - # Client for the QuotaService service. - # - # Service to get method call quota information per CSS API method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :quota_service_stub - - ## - # Configure the QuotaService Client class. - # - # See {::Google::Shopping::Css::V1::QuotaService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all QuotaService clients - # ::Google::Shopping::Css::V1::QuotaService::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", "Shopping", "Css", "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_quota_groups.timeout = 60.0 - default_config.rpcs.list_quota_groups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the QuotaService 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::Shopping::Css::V1::QuotaService::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 - @quota_service_stub.universe_domain - end - - ## - # Create a new QuotaService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::QuotaService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the QuotaService 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/shopping/css/v1/quota_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 - - @quota_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Css::V1::QuotaService::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 - ) - - @quota_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 - @quota_service_stub.logger - end - - # Service calls - - ## - # Lists the daily call quota and usage per group for your CSS Center account. - # - # @overload list_quota_groups(request, options = nil) - # Pass arguments to `list_quota_groups` via a request object, either of type - # {::Google::Shopping::Css::V1::ListQuotaGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListQuotaGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_quota_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The CSS account that owns the collection of method quotas and - # resources. In most cases, this is the CSS domain. Format: - # accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of quotas to return in the response, used - # for paging. Defaults to 500; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Token (if provided) to retrieve the subsequent page. All other - # parameters must match the original call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::QuotaService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListQuotaGroupsRequest.new - # - # # Call the list_quota_groups method. - # result = client.list_quota_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::QuotaGroup. - # p item - # end - # - def list_quota_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListQuotaGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_quota_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_quota_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @quota_service_stub.call_rpc :list_quota_groups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @quota_service_stub, :list_quota_groups, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the QuotaService API. - # - # This class represents the configuration for QuotaService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Css::V1::QuotaService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_quota_groups to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::QuotaService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Css::V1::QuotaService::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 = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 QuotaService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_quota_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_quota_groups - - # @private - def initialize parent_rpcs = nil - list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups - @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb deleted file mode 100644 index 300c3137cdf6..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Css - module V1 - module QuotaService - # Credentials for the QuotaService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb deleted file mode 100644 index d6952334dd8d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - module QuotaService - # Path helper methods for the QuotaService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb deleted file mode 100644 index d008263afad8..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_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/shopping/css/v1/version" - -require "google/shopping/css/v1/quota_service/credentials" -require "google/shopping/css/v1/quota_service/paths" -require "google/shopping/css/v1/quota_service/rest/client" - -module Google - module Shopping - module Css - module V1 - ## - # Service to get method call quota information per CSS API method. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/css/v1/quota_service/rest" - # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new - # - module QuotaService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/css/v1/quota_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb deleted file mode 100644 index 1275fabc6b8b..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb +++ /dev/null @@ -1,443 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/css/v1/quota_pb" -require "google/shopping/css/v1/quota_service/rest/service_stub" - -module Google - module Shopping - module Css - module V1 - module QuotaService - module Rest - ## - # REST client for the QuotaService service. - # - # Service to get method call quota information per CSS API method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :quota_service_stub - - ## - # Configure the QuotaService Client class. - # - # See {::Google::Shopping::Css::V1::QuotaService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all QuotaService clients - # ::Google::Shopping::Css::V1::QuotaService::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", "Shopping", "Css", "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_quota_groups.timeout = 60.0 - default_config.rpcs.list_quota_groups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the QuotaService 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::Shopping::Css::V1::QuotaService::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 - @quota_service_stub.universe_domain - end - - ## - # Create a new QuotaService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the QuotaService 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 - - @quota_service_stub = ::Google::Shopping::Css::V1::QuotaService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @quota_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 - @quota_service_stub.logger - end - - # Service calls - - ## - # Lists the daily call quota and usage per group for your CSS Center account. - # - # @overload list_quota_groups(request, options = nil) - # Pass arguments to `list_quota_groups` via a request object, either of type - # {::Google::Shopping::Css::V1::ListQuotaGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListQuotaGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_quota_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The CSS account that owns the collection of method quotas and - # resources. In most cases, this is the CSS domain. Format: - # accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of quotas to return in the response, used - # for paging. Defaults to 500; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Token (if provided) to retrieve the subsequent page. All other - # parameters must match the original call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::QuotaService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListQuotaGroupsRequest.new - # - # # Call the list_quota_groups method. - # result = client.list_quota_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::QuotaGroup. - # p item - # end - # - def list_quota_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListQuotaGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_quota_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_quota_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @quota_service_stub.list_quota_groups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @quota_service_stub, :list_quota_groups, "quota_groups", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the QuotaService REST API. - # - # This class represents the configuration for QuotaService 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::Shopping::Css::V1::QuotaService::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_quota_groups to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::QuotaService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 QuotaService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_quota_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_quota_groups - - # @private - def initialize parent_rpcs = nil - list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups - @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb deleted file mode 100644 index 0104aec48d94..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/quota_pb" - -module Google - module Shopping - module Css - module V1 - module QuotaService - module Rest - ## - # REST service stub for the QuotaService 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_quota_groups REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListQuotaGroupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::ListQuotaGroupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::ListQuotaGroupsResponse] - # A result object deserialized from the server's reply - def list_quota_groups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_quota_groups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_quota_groups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::ListQuotaGroupsResponse.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_quota_groups REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListQuotaGroupsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_quota_groups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/quotas", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb deleted file mode 100644 index 2176f57358bf..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/css/v1/quota.proto for package 'Google.Shopping.Css.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/css/v1/quota_pb' - -module Google - module Shopping - module Css - module V1 - module QuotaService - # Service to get method call quota information per CSS API method. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.css.v1.QuotaService' - - # Lists the daily call quota and usage per group for your CSS Center account. - rpc :ListQuotaGroups, ::Google::Shopping::Css::V1::ListQuotaGroupsRequest, ::Google::Shopping::Css::V1::ListQuotaGroupsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb deleted file mode 100644 index 2cc3b855b50d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/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/shopping/css/v1/accounts_service/rest" -require "google/shopping/css/v1/account_labels_service/rest" -require "google/shopping/css/v1/css_product_inputs_service/rest" -require "google/shopping/css/v1/css_products_service/rest" -require "google/shopping/css/v1/quota_service/rest" -require "google/shopping/css/v1/version" - -module Google - module Shopping - module Css - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/css/v1/rest" - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/version.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/version.rb deleted file mode 100644 index d1011ac40878..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/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 Shopping - module Css - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-css-v1/proto_docs/README.md deleted file mode 100644 index d5bb47472267..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# CSS 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-shopping-css-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb deleted file mode 100644 index eba13c9a7aad..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb +++ /dev/null @@ -1,171 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - # The request message for the `ListChildAccounts` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent account. Must be a CSS group or domain. - # Format: accounts/\\{account} - # @!attribute [rw] label_id - # @return [::Integer] - # If set, only the MC accounts with the given label ID will be returned. - # @!attribute [rw] full_name - # @return [::String] - # If set, only the MC accounts with the given name (case sensitive) will be - # returned. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 50 accounts will be - # returned. The maximum value is 100; values above 100 will be coerced to - # 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListChildAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListChildAccounts` must - # match the call that provided the page token. - class ListChildAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListChildAccounts` method. - # @!attribute [rw] accounts - # @return [::Array<::Google::Shopping::Css::V1::Account>] - # The CSS/MC accounts returned for the specified CSS parent account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListChildAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the `GetAccount` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the managed CSS/MC account. - # Format: accounts/\\{account} - # @!attribute [rw] parent - # @return [::String] - # Optional. Only required when retrieving MC account information. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - class GetAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the `UpdateLabels` method. - # @!attribute [rw] name - # @return [::String] - # Required. The label resource name. - # Format: accounts/\\{account} - # @!attribute [rw] label_ids - # @return [::Array<::Integer>] - # The list of label IDs to overwrite the existing account label IDs. - # If the list is empty, all currently assigned label IDs will be deleted. - # @!attribute [rw] parent - # @return [::String] - # Optional. Only required when updating MC account labels. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - class UpdateAccountLabelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about CSS/MC account. - # @!attribute [rw] name - # @return [::String] - # The label resource name. - # Format: accounts/\\{account} - # @!attribute [r] full_name - # @return [::String] - # Output only. Immutable. The CSS/MC account's full name. - # @!attribute [rw] display_name - # @return [::String] - # The CSS/MC account's short display name. - # @!attribute [r] homepage_uri - # @return [::String] - # Output only. Immutable. The CSS/MC account's homepage. - # @!attribute [rw] parent - # @return [::String] - # The CSS/MC account's parent resource. CSS group for CSS domains; CSS - # domain for MC accounts. Returned only if the user has access to the - # parent account. - # Note: For MC sub-accounts, this is also the CSS domain that is the parent - # resource of the MCA account, since we are effectively flattening the - # hierarchy." - # @!attribute [rw] label_ids - # @return [::Array<::Integer>] - # Manually created label IDs assigned to the CSS/MC account by a CSS parent - # account. - # @!attribute [rw] automatic_label_ids - # @return [::Array<::Integer>] - # Automatically created label IDs assigned to the MC account by - # CSS Center. - # @!attribute [r] account_type - # @return [::Google::Shopping::Css::V1::Account::AccountType] - # Output only. The type of this account. - class Account - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The account type. - module AccountType - # Unknown account type. - ACCOUNT_TYPE_UNSPECIFIED = 0 - - # CSS group account. - CSS_GROUP = 1 - - # CSS domain account. - CSS_DOMAIN = 2 - - # MC Primary CSS MCA account. - MC_PRIMARY_CSS_MCA = 3 - - # MC CSS MCA account. - MC_CSS_MCA = 4 - - # MC Marketplace MCA account. - MC_MARKETPLACE_MCA = 5 - - # MC Other MCA account. - MC_OTHER_MCA = 6 - - # MC Standalone account. - MC_STANDALONE = 7 - - # MC MCA sub-account. - MC_MCA_SUBACCOUNT = 8 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb deleted file mode 100644 index 055f23e04511..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb +++ /dev/null @@ -1,131 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - # Label assigned by CSS domain or CSS group to one of its sub-accounts. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the label. - # Format: accounts/\\{account}/labels/\\{label} - # @!attribute [r] label_id - # @return [::Integer] - # Output only. The ID of the label. - # @!attribute [r] account_id - # @return [::Integer] - # Output only. The ID of account this label belongs to. - # @!attribute [rw] display_name - # @return [::String] - # The display name of this label. - # @!attribute [rw] description - # @return [::String] - # The description of this label. - # @!attribute [r] label_type - # @return [::Google::Shopping::Css::V1::AccountLabel::LabelType] - # Output only. The type of this label. - class AccountLabel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The label type. - module LabelType - # Unknown label type. - LABEL_TYPE_UNSPECIFIED = 0 - - # Indicates that the label was created manually. - MANUAL = 1 - - # Indicates that the label was created automatically by CSS Center. - AUTOMATIC = 2 - end - end - - # Request message for the `ListAccountLabels` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent account. - # Format: accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of labels to return. The service may return fewer than - # this value. - # If unspecified, at most 50 labels will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListAccountLabels` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountLabels` must - # match the call that provided the page token. - class ListAccountLabelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListAccountLabels` method. - # @!attribute [rw] account_labels - # @return [::Array<::Google::Shopping::Css::V1::AccountLabel>] - # The labels from the specified account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListAccountLabelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the 'CreateAccountLanel' method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent account. - # Format: accounts/\\{account} - # @!attribute [rw] account_label - # @return [::Google::Shopping::Css::V1::AccountLabel] - # Required. The label to create. - class CreateAccountLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateAccountLabel` method. - # @!attribute [rw] account_label - # @return [::Google::Shopping::Css::V1::AccountLabel] - # Required. The updated label. All fields must be provided. - class UpdateAccountLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the 'DeleteAccountLabel' method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the label to delete. - # Format: accounts/\\{account}/labels/\\{label} - class DeleteAccountLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb deleted file mode 100644 index c00f0c3460d5..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb +++ /dev/null @@ -1,436 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - # Attributes for CSS Product. - # @!attribute [rw] cpp_link - # @return [::String] - # URL directly linking to your the Product Detail Page of the CSS. - # @!attribute [rw] cpp_mobile_link - # @return [::String] - # URL for the mobile-optimized version of the Product Detail Page of the CSS. - # @!attribute [rw] cpp_ads_redirect - # @return [::String] - # Allows advertisers to override the item URL when the product is shown - # within the context of Product Ads. - # @!attribute [rw] low_price - # @return [::Google::Shopping::Type::Price] - # Low Price of the CSS Product. - # @!attribute [rw] high_price - # @return [::Google::Shopping::Type::Price] - # High Price of the CSS Product. - # @!attribute [rw] number_of_offers - # @return [::Integer] - # The number of CSS Products. - # @!attribute [rw] headline_offer_condition - # @return [::String] - # Condition of the headline offer. - # @!attribute [rw] headline_offer_price - # @return [::Google::Shopping::Type::Price] - # Headline Price of the CSS Product. - # @!attribute [rw] headline_offer_link - # @return [::String] - # Link to the headline offer. - # @!attribute [rw] headline_offer_mobile_link - # @return [::String] - # Mobile Link to the headline offer. - # @!attribute [rw] headline_offer_shipping_price - # @return [::Google::Shopping::Type::Price] - # Headline Price of the CSS Product. - # @!attribute [rw] title - # @return [::String] - # Title of the item. - # @!attribute [rw] image_link - # @return [::String] - # URL of an image of the item. - # @!attribute [rw] additional_image_links - # @return [::Array<::String>] - # Additional URL of images of the item. - # @!attribute [rw] description - # @return [::String] - # Description of the item. - # @!attribute [rw] brand - # @return [::String] - # Product Related Attributes.[14-36] - # Brand of the item. - # @!attribute [rw] mpn - # @return [::String] - # Manufacturer Part Number - # ([MPN](https://support.google.com/merchants/answer/188494#mpn)) of the - # item. - # @!attribute [rw] gtin - # @return [::String] - # Global Trade Item Number - # ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the - # item. - # @!attribute [rw] product_types - # @return [::Array<::String>] - # Categories of the item (formatted as in [products data - # specification](https://support.google.com/merchants/answer/6324406)). - # @!attribute [rw] google_product_category - # @return [::String] - # Google's category of the item (see [Google product - # taxonomy](https://support.google.com/merchants/answer/1705911)). When - # querying products, this field will contain the user provided value. There - # is currently no way to get back the auto assigned google product - # categories through the API. - # @!attribute [rw] adult - # @return [::Boolean] - # Set to true if the item is targeted towards adults. - # @!attribute [rw] multipack - # @return [::Integer] - # The number of identical products in a merchant-defined multipack. - # @!attribute [rw] is_bundle - # @return [::Boolean] - # Whether the item is a merchant-defined bundle. A bundle is a custom - # grouping of different products sold by a merchant for a single price. - # @!attribute [rw] age_group - # @return [::String] - # Target age group of the item. - # @!attribute [rw] color - # @return [::String] - # Color of the item. - # @!attribute [rw] gender - # @return [::String] - # Target gender of the item. - # @!attribute [rw] material - # @return [::String] - # The material of which the item is made. - # @!attribute [rw] pattern - # @return [::String] - # The item's pattern (e.g. polka dots). - # @!attribute [rw] size - # @return [::String] - # Size of the item. Only one value is allowed. For variants with different - # sizes, insert a separate product for each size with the same - # `itemGroupId` value (see - # [https://support.google.com/merchants/answer/6324492](size definition)). - # @!attribute [rw] size_system - # @return [::String] - # System in which the size is specified. Recommended for apparel items. - # @!attribute [rw] size_types - # @return [::Array<::String>] - # The cut of the item. It can be used to represent combined size types for - # apparel items. Maximum two of size types can be provided (see - # [size type](https://support.google.com/merchants/answer/6324497). - # @!attribute [rw] item_group_id - # @return [::String] - # Shared identifier for all variants of the same product. - # @!attribute [rw] product_details - # @return [::Array<::Google::Shopping::Css::V1::ProductDetail>] - # Technical specification or additional product details. - # @!attribute [rw] product_weight - # @return [::Google::Shopping::Css::V1::ProductWeight] - # The weight of the product in the units provided. The value must be - # between 0 (exclusive) and 2000 (inclusive). - # @!attribute [rw] product_length - # @return [::Google::Shopping::Css::V1::ProductDimension] - # The length of the product in the units provided. The value must be - # between 0 (exclusive) and 3000 (inclusive). - # @!attribute [rw] product_width - # @return [::Google::Shopping::Css::V1::ProductDimension] - # The width of the product in the units provided. The value must be between - # 0 (exclusive) and 3000 (inclusive). - # @!attribute [rw] product_height - # @return [::Google::Shopping::Css::V1::ProductDimension] - # The height of the product in the units provided. The value must be - # between - # 0 (exclusive) and 3000 (inclusive). - # @!attribute [rw] product_highlights - # @return [::Array<::String>] - # Bullet points describing the most relevant highlights of a product. - # @!attribute [rw] certifications - # @return [::Array<::Google::Shopping::Css::V1::Certification>] - # A list of certificates claimed by the CSS for the given product. - # @!attribute [rw] expiration_date - # @return [::Google::Protobuf::Timestamp] - # Date on which the item should expire, as specified upon insertion, in - # [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. The actual - # expiration date is exposed in `productstatuses` as - # [googleExpirationDate](https://support.google.com/merchants/answer/6324499) - # and might be earlier if `expirationDate` is too far in the future. - # Note: It may take 2+ days from the expiration date for the item to - # actually get deleted. - # @!attribute [rw] included_destinations - # @return [::Array<::String>] - # The list of destinations to include for this target (corresponds to - # checked check boxes in Merchant Center). Default destinations are always - # included unless provided in `excludedDestinations`. - # @!attribute [rw] excluded_destinations - # @return [::Array<::String>] - # The list of destinations to exclude for this target (corresponds to - # unchecked check boxes in Merchant Center). - # @!attribute [rw] pause - # @return [::String] - # Publication of this item will be temporarily paused. - # @!attribute [rw] custom_label_0 - # @return [::String] - # Custom label 0 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_1 - # @return [::String] - # Custom label 1 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_2 - # @return [::String] - # Custom label 2 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_3 - # @return [::String] - # Custom label 3 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_4 - # @return [::String] - # Custom label 4 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] headline_offer_installment - # @return [::Google::Shopping::Css::V1::HeadlineOfferInstallment] - # Number and amount of installments to pay for an item. - # @!attribute [rw] headline_offer_subscription_cost - # @return [::Google::Shopping::Css::V1::HeadlineOfferSubscriptionCost] - # Number of periods (months or years) and amount of payment per period - # for an item with an associated subscription contract. - # @!attribute [rw] review_count - # @return [::Integer] - # Number of reviews of the product. Required if - # {::Google::Shopping::Css::V1::Attributes#rating `rating`} is provided. - # This field is for an upcoming feature and is not yet used. - # @!attribute [rw] min_rating - # @return [::Integer] - # Minimum rating score of the product. Required if - # {::Google::Shopping::Css::V1::Attributes#rating `rating`} is provided. - # This field is for an upcoming feature and is not yet used. - # @!attribute [rw] max_rating - # @return [::Integer] - # Maximum rating score of the product. Required if - # {::Google::Shopping::Css::V1::Attributes#rating `rating`} is provided. - # This field is for an upcoming feature and is not yet used. - # @!attribute [rw] rating - # @return [::Float] - # Average rating score of the product. The value must be within the - # range of [`min_rating`, `max_rating`], inclusive. When displayed on the - # product page, this rating is normalized to a scale of [1, 5] with one - # decimal place. If provided, - # {::Google::Shopping::Css::V1::Attributes#review_count `review_count`}, - # {::Google::Shopping::Css::V1::Attributes#min_rating `min_rating`}, and - # {::Google::Shopping::Css::V1::Attributes#max_rating `max_rating`} are also - # required. This field is for an upcoming feature and is not yet used. - class Attributes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The certification for the product. Use the this attribute to describe - # certifications, such as energy efficiency ratings, associated with a product. - # @!attribute [rw] name - # @return [::String] - # The name of the certification. At this time, the most common value is - # "EPREL", which represents energy efficiency certifications in the EU - # European Registry for Energy Labeling (EPREL) database. - # @!attribute [rw] authority - # @return [::String] - # The authority or certification body responsible for issuing the - # certification. At this time, the most common value is "EC" or - # “European_Commission” for energy labels in the EU. - # @!attribute [rw] code - # @return [::String] - # The code of the certification. For example, for the EPREL certificate with - # the link https://eprel.ec.europa.eu/screen/product/dishwashers2019/123456 - # the code is 123456. The code is required for European Energy Labels. - class Certification - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The product details. - # @!attribute [rw] section_name - # @return [::String] - # The section header used to group a set of product details. - # @!attribute [rw] attribute_name - # @return [::String] - # The name of the product detail. - # @!attribute [rw] attribute_value - # @return [::String] - # The value of the product detail. - class ProductDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dimension of the product. - # @!attribute [rw] value - # @return [::Float] - # Required. The dimension value represented as a number. The value can have a - # maximum precision of four decimal places. - # @!attribute [rw] unit - # @return [::String] - # Required. The dimension units. - # Acceptable values are: - # * "`in`" - # * "`cm`" - class ProductDimension - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The weight of the product. - # @!attribute [rw] value - # @return [::Float] - # Required. The weight represented as a number. The weight can have a maximum - # precision of four decimal places. - # @!attribute [rw] unit - # @return [::String] - # Required. The weight unit. - # Acceptable values are: - # * "`g`" - # * "`kg`" - # * "`oz`" - # * "`lb`" - class ProductWeight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The status of the Css Product, data validation issues, that is, - # information about the Css Product computed asynchronously. - # @!attribute [rw] destination_statuses - # @return [::Array<::Google::Shopping::Css::V1::CssProductStatus::DestinationStatus>] - # The intended destinations for the product. - # @!attribute [rw] item_level_issues - # @return [::Array<::Google::Shopping::Css::V1::CssProductStatus::ItemLevelIssue>] - # A list of all issues associated with the product. - # @!attribute [rw] creation_date - # @return [::Google::Protobuf::Timestamp] - # Date on which the item has been created, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - # @!attribute [rw] last_update_date - # @return [::Google::Protobuf::Timestamp] - # Date on which the item has been last updated, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - # @!attribute [rw] google_expiration_date - # @return [::Google::Protobuf::Timestamp] - # Date on which the item expires, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - class CssProductStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The destination status of the product status. - # @!attribute [rw] destination - # @return [::String] - # The name of the destination - # @!attribute [rw] approved_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where the CSS Product is - # approved. - # @!attribute [rw] pending_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where the CSS Product is - # pending approval. - # @!attribute [rw] disapproved_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where the CSS Product is - # disapproved. - class DestinationStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The ItemLevelIssue of the product status. - # @!attribute [rw] code - # @return [::String] - # The error code of the issue. - # @!attribute [rw] servability - # @return [::String] - # How this issue affects serving of the CSS Product. - # @!attribute [rw] resolution - # @return [::String] - # Whether the issue can be resolved by the merchant. - # @!attribute [rw] attribute - # @return [::String] - # The attribute's name, if the issue is caused by a single attribute. - # @!attribute [rw] destination - # @return [::String] - # The destination the issue applies to. - # @!attribute [rw] description - # @return [::String] - # A short issue description in English. - # @!attribute [rw] detail - # @return [::String] - # A detailed issue description in English. - # @!attribute [rw] documentation - # @return [::String] - # The URL of a web page to help with resolving this issue. - # @!attribute [rw] applicable_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where issue applies to the - # CSS Product. - class ItemLevelIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The SubscriptionCost of the product. - # @!attribute [rw] period - # @return [::Google::Shopping::Css::V1::SubscriptionPeriod] - # The type of subscription period. - # Supported values are: - # * "`month`" - # * "`year`" - # @!attribute [rw] period_length - # @return [::Integer] - # The number of subscription periods the buyer has to pay. - # @!attribute [rw] amount - # @return [::Google::Shopping::Type::Price] - # The amount the buyer has to pay per subscription period. - class HeadlineOfferSubscriptionCost - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents installment. - # @!attribute [rw] months - # @return [::Integer] - # The number of installments the buyer has to pay. - # @!attribute [rw] amount - # @return [::Google::Shopping::Type::Price] - # The amount the buyer has to pay per month. - # @!attribute [rw] downpayment - # @return [::Google::Shopping::Type::Price] - # The up-front down payment amount the buyer has to pay. - class HeadlineOfferInstallment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The subscription period of the product. - module SubscriptionPeriod - # Indicates that the subscription period is unspecified. - SUBSCRIPTION_PERIOD_UNSPECIFIED = 0 - - # Indicates that the subscription period is month. - MONTH = 1 - - # Indicates that the subscription period is year. - YEAR = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb deleted file mode 100644 index c6945a0046a9..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb +++ /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! - - -module Google - module Shopping - module Css - module V1 - # This resource represents input data you submit for a CSS Product, not - # the processed CSS Product that you see in CSS Center, in Shopping Ads, or - # across Google surfaces. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the CSS Product input. - # Format: - # `accounts/{account}/cssProductInputs/{css_product_input}`, where the - # last section `css_product_input` consists of 3 parts: - # contentLanguage~feedLabel~offerId. Example: - # accounts/123/cssProductInputs/de~DE~rawProvidedId123 - # @!attribute [r] final_name - # @return [::String] - # Output only. The name of the processed CSS Product. - # Format: - # `accounts/{account}/cssProducts/{css_product}` - # " - # @!attribute [rw] raw_provided_id - # @return [::String] - # Required. Your unique identifier for the CSS Product. This is the same for - # the CSS Product input and processed CSS Product. We only allow ids with - # alphanumerics, underscores and dashes. See the [products feed - # specification](https://support.google.com/merchants/answer/188494#id) for - # details. - # @!attribute [rw] content_language - # @return [::String] - # Required. The two-letter [ISO - # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the CSS - # Product. - # @!attribute [rw] feed_label - # @return [::String] - # Required. The [feed - # label](https://developers.google.com/shopping-content/guides/products/feed-labels) - # for the CSS Product. - # Feed Label is synonymous to "target country" and hence should always be a - # valid region code. For example: 'DE' for Germany, 'FR' for France. - # @!attribute [rw] freshness_time - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Timestamp] - # DEPRECATED. Use expiration_date instead. - # Represents the existing version (freshness) of the CSS Product, which - # can be used to preserve the right order when multiple updates are done at - # the same time. - # - # This field must not be set to the future time. - # - # If set, the update is prevented if a newer version of the item already - # exists in our system (that is the last update time of the existing - # CSS products is later than the freshness time set in the update). If - # the update happens, the last update time is then set to this freshness - # time. - # - # If not set, the update will not be prevented and the last update time will - # default to when this request was received by the CSS API. - # - # If the operation is prevented, the aborted exception will be - # thrown. - # @!attribute [rw] attributes - # @return [::Google::Shopping::Css::V1::Attributes] - # A list of CSS Product attributes. - # @!attribute [rw] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # A list of custom (CSS-provided) attributes. It can also be used for - # submitting any attribute of the feed specification in its generic - # form (for example: - # `{ "name": "size type", "value": "regular" }`). - # This is useful for submitting attributes not explicitly exposed by the - # API, such as additional attributes used for Buy on Google. - class CssProductInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the InsertCssProductInput method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account where this CSS Product will be inserted. - # Format: accounts/\\{account} - # @!attribute [rw] css_product_input - # @return [::Google::Shopping::Css::V1::CssProductInput] - # Required. The CSS Product Input to insert. - # @!attribute [rw] feed_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # Optional. DEPRECATED. Feed id is not required for CSS Products. - # The primary or supplemental feed id. If CSS Product already exists and - # feed id provided is different, then the CSS Product will be moved to a - # new feed. - # Note: For now, CSSs do not need to provide feed ids as we create - # feeds on the fly. - # We do not have supplemental feed support for CSS Products yet. - class InsertCssProductInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateCssProductInput method. - # @!attribute [rw] css_product_input - # @return [::Google::Shopping::Css::V1::CssProductInput] - # Required. The CSS product input resource to update. Information you submit - # will be applied to the processed CSS product as well. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of CSS product attributes to be updated. - # - # If the update mask is omitted, then it is treated as implied field mask - # equivalent to all fields that are populated (have a non-empty value). - # - # Attributes specified in the update mask without a value specified in the - # body will be deleted from the CSS product. - # - # Update mask can only be specified for top level fields in - # attributes and custom attributes. - # - # To specify the update mask for custom attributes you need to add the - # `custom_attribute.` prefix. - # - # Providing special "*" value for full CSS product replacement is not - # supported. - class UpdateCssProductInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteCssProductInput method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the CSS product input resource to delete. - # Format: accounts/\\{account}/cssProductInputs/\\{css_product_input}, where the - # last section `css_product_input` consists of 3 parts: - # contentLanguage~feedLabel~offerId. Example: - # accounts/123/cssProductInputs/de~DE~rawProvidedId123 - # @!attribute [rw] supplemental_feed_id - # @return [::Integer] - # The Content API Supplemental Feed ID. - # The field must not be set if the action applies to a primary feed. - # If the field is set, then product action applies to a supplemental feed - # instead of primary Content API feed. - class DeleteCssProductInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb deleted file mode 100644 index d61414008787..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb +++ /dev/null @@ -1,110 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - # The request message for the `GetCssProduct` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the CSS product to retrieve. - # Format: `accounts/{account}/cssProducts/{css_product}` - class GetCssProductRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The processed CSS Product. - # @!attribute [rw] name - # @return [::String] - # The name of the CSS Product. - # Format: - # `"accounts/{account}/cssProducts/{css_product}"` - # @!attribute [r] raw_provided_id - # @return [::String] - # Output only. Your unique raw identifier for the product. - # @!attribute [r] content_language - # @return [::String] - # Output only. The two-letter [ISO - # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the - # product. - # @!attribute [r] feed_label - # @return [::String] - # Output only. The feed label for the product. - # @!attribute [r] attributes - # @return [::Google::Shopping::Css::V1::Attributes] - # Output only. A list of product attributes. - # @!attribute [r] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Output only. A list of custom (CSS-provided) attributes. It can also be - # used to submit any attribute of the feed specification in its generic form - # (for example, - # `{ "name": "size type", "value": "regular" }`). - # This is useful for submitting attributes not explicitly exposed by the - # API, such as additional attributes used for Buy on Google. - # @!attribute [r] css_product_status - # @return [::Google::Shopping::Css::V1::CssProductStatus] - # Output only. The status of a product, data validation issues, that is, - # information about a product computed asynchronously. - class CssProduct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListCssProducts method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account/domain to list processed CSS Products for. - # Format: accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of CSS Products to return. The service may return - # fewer than this value. - # The maximum value is 1000; values above 1000 will be coerced to 1000. If - # unspecified, the maximum number of CSS products will be returned. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListCssProducts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListCssProducts` - # must match the call that provided the page token. - class ListCssProductsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListCssProducts method. - # @!attribute [rw] css_products - # @return [::Array<::Google::Shopping::Css::V1::CssProduct>] - # The processed CSS products from the specified account. These are your - # processed CSS products after applying rules and supplemental feeds. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListCssProductsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb deleted file mode 100644 index d0d83c380b21..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb +++ /dev/null @@ -1,110 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - # The group information for methods in the CSS API. The quota is shared - # between all methods in the group. Even if none of the methods within the - # group have usage the information for the group is returned. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the quota group. - # Format: accounts/\\{account}/quotas/\\{group} - # Example: `accounts/12345678/quotas/css-products-insert` - # Note: The \\{group} part is not guaranteed to follow a specific pattern. - # @!attribute [r] quota_usage - # @return [::Integer] - # Output only. The current quota usage, meaning the number of calls already - # made on a given day to the methods in the group. The daily quota limits - # reset at at 12:00 PM midday UTC. - # @!attribute [r] quota_limit - # @return [::Integer] - # Output only. The maximum number of calls allowed per day for the group. - # @!attribute [r] quota_minute_limit - # @return [::Integer] - # Output only. The maximum number of calls allowed per minute for the group. - # @!attribute [r] method_details - # @return [::Array<::Google::Shopping::Css::V1::MethodDetails>] - # Output only. List of all methods group quota applies to. - class QuotaGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The method details per method in the CSS API. - # @!attribute [r] method - # @return [::String] - # Output only. The name of the method for example - # `cssproductsservice.listcssproducts`. - # @!attribute [r] version - # @return [::String] - # Output only. The API version that the method belongs to. - # @!attribute [r] subapi - # @return [::String] - # Output only. The sub-API that the method belongs to. In the CSS API, this - # is always `css`. - # @!attribute [r] path - # @return [::String] - # Output only. The path for the method such as - # `v1/cssproductsservice.listcssproducts`. - class MethodDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListQuotaGroups method. - # @!attribute [rw] parent - # @return [::String] - # Required. The CSS account that owns the collection of method quotas and - # resources. In most cases, this is the CSS domain. Format: - # accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of quotas to return in the response, used - # for paging. Defaults to 500; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Token (if provided) to retrieve the subsequent page. All other - # parameters must match the original call that provided the page token. - class ListQuotaGroupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListMethodGroups method. - # @!attribute [rw] quota_groups - # @return [::Array<::Google::Shopping::Css::V1::QuotaGroup>] - # The methods, current quota usage and limits per each group. The quota is - # shared between all methods in the group. The groups are sorted in - # descending order based on - # {::Google::Shopping::Css::V1::QuotaGroup#quota_usage quota_usage}. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListQuotaGroupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.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! - - -module Google - module Shopping - module Type - # The weight represented as the value in string and the unit. - # @!attribute [rw] amount_micros - # @return [::Integer] - # Required. The weight represented as a number in micros (1 million micros is - # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 - # micros). - # This field can also be set as infinity by setting to -1. - # This field only support -1 and positive value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Type::Weight::WeightUnit] - # Required. The weight unit. - # Acceptable values are: kg and lb - class Weight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The weight unit. - module WeightUnit - # unit unspecified - WEIGHT_UNIT_UNSPECIFIED = 0 - - # lb unit. - POUND = 1 - - # kg unit. - KILOGRAM = 2 - end - end - - # The price represented as a number and currency. - # @!attribute [rw] amount_micros - # @return [::Integer] - # The price represented as a number in micros (1 million micros is an - # equivalent to one's currency standard unit, for example, 1 USD = 1000000 - # micros). - # @!attribute [rw] currency_code - # @return [::String] - # The currency of the price using three-letter acronyms according to [ISO - # 4217](http://en.wikipedia.org/wiki/ISO_4217). - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents custom attributes. Exactly one of `value` or - # `group_values` must not be empty. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute. - # @!attribute [rw] value - # @return [::String] - # The value of the attribute. If `value` is not empty, `group_values` must be - # empty. - # @!attribute [rw] group_values - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Subattributes within this attribute group. If - # `group_values` is not empty, `value` must be empty. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations available for a product. - # - # Destinations are used in Merchant Center to allow you to control where the - # products from your data feed should be displayed. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Destination values. - module DestinationEnum - # Not specified. - DESTINATION_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/google-ads/answer/2454022). - SHOPPING_ADS = 1 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 2 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3057972). - LOCAL_INVENTORY_ADS = 3 - - # [Free listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 4 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 5 - - # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). - YOUTUBE_SHOPPING = 6 - - # Youtube shopping checkout. - YOUTUBE_SHOPPING_CHECKOUT = 7 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 8 - - # [Free vehicle - # listings](https://support.google.com/merchants/answer/11189169). - FREE_VEHICLE_LISTINGS = 9 - - # [Vehicle ads](https://support.google.com/merchants/answer/11189169). - VEHICLE_ADS = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - end - end - - # Reporting contexts that your account and product issues apply to. - # - # Reporting contexts are groups of surfaces and formats for product results on - # Google. They can represent the entire destination (for example, [Shopping - # ads](https://support.google.com/merchants/answer/6149970)) or a subset of - # formats within a destination (for example, [Demand Gen - # ads](https://support.google.com/merchants/answer/13389785)). - class ReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reporting context values. - module ReportingContextEnum - # Not specified. - REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/merchants/answer/6149970). - SHOPPING_ADS = 1 - - # Deprecated: Use `DEMAND_GEN_ADS` instead. - # [Discovery and Demand Gen - # ads](https://support.google.com/merchants/answer/13389785). - DISCOVERY_ADS = 2 - - # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS = 13 - - # [Demand Gen ads on Discover - # surface](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 - - # [Video ads](https://support.google.com/google-ads/answer/6340491). - VIDEO_ADS = 3 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 4 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3271956). - LOCAL_INVENTORY_ADS = 5 - - # [Vehicle inventory - # ads](https://support.google.com/merchants/answer/11544533). - VEHICLE_INVENTORY_ADS = 6 - - # [Free product - # listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 7 - - # [Free product listings on UCP - # checkout](https://developers.google.com/merchant/ucp). - FREE_LISTINGS_UCP_CHECKOUT = 19 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 8 - - # [Free local vehicle - # listings](https://support.google.com/merchants/answer/11544533). - FREE_LOCAL_VEHICLE_LISTINGS = 9 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 18 - - # [YouTube - # Shopping](https://support.google.com/merchants/answer/13478370). - YOUTUBE_SHOPPING = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - - # [Product - # Reviews](https://support.google.com/merchants/answer/14620732). - PRODUCT_REVIEWS = 15 - - # [Merchant - # Reviews](https://developers.google.com/merchant-review-feeds). - MERCHANT_REVIEWS = 16 - - # YouTube Checkout - # . - YOUTUBE_CHECKOUT = 17 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-css-v1/snippets/Gemfile deleted file mode 100644 index 64af0f406f42..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1", path: "../" -else - gem "google-shopping-css-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-shopping-css-v1/snippets/account_labels_service/create_account_label.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb deleted file mode 100644 index 3e0da7936320..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountLabelsService_CreateAccountLabel_sync] -require "google/shopping/css/v1" - -## -# Snippet for the create_account_label call in the AccountLabelsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountLabelsService::Client#create_account_label. -# -def create_account_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::CreateAccountLabelRequest.new - - # Call the create_account_label method. - result = client.create_account_label request - - # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - p result -end -# [END css_v1_generated_AccountLabelsService_CreateAccountLabel_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb deleted file mode 100644 index 37acf2da6b88..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountLabelsService_DeleteAccountLabel_sync] -require "google/shopping/css/v1" - -## -# Snippet for the delete_account_label call in the AccountLabelsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountLabelsService::Client#delete_account_label. -# -def delete_account_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::DeleteAccountLabelRequest.new - - # Call the delete_account_label method. - result = client.delete_account_label request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END css_v1_generated_AccountLabelsService_DeleteAccountLabel_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb deleted file mode 100644 index b6e45b80ec3f..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.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 css_v1_generated_AccountLabelsService_ListAccountLabels_sync] -require "google/shopping/css/v1" - -## -# Snippet for the list_account_labels call in the AccountLabelsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountLabelsService::Client#list_account_labels. -# -def list_account_labels - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::ListAccountLabelsRequest.new - - # Call the list_account_labels method. - result = client.list_account_labels request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Css::V1::AccountLabel. - p item - end -end -# [END css_v1_generated_AccountLabelsService_ListAccountLabels_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb deleted file mode 100644 index 3a87e7d4688c..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountLabelsService_UpdateAccountLabel_sync] -require "google/shopping/css/v1" - -## -# Snippet for the update_account_label call in the AccountLabelsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountLabelsService::Client#update_account_label. -# -def update_account_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::UpdateAccountLabelRequest.new - - # Call the update_account_label method. - result = client.update_account_label request - - # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - p result -end -# [END css_v1_generated_AccountLabelsService_UpdateAccountLabel_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb deleted file mode 100644 index 99a758913d47..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountsService_GetAccount_sync] -require "google/shopping/css/v1" - -## -# Snippet for the get_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountsService::Client#get_account. -# -def get_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::GetAccountRequest.new - - # Call the get_account method. - result = client.get_account request - - # The returned object is of type Google::Shopping::Css::V1::Account. - p result -end -# [END css_v1_generated_AccountsService_GetAccount_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb deleted file mode 100644 index 56b92aa4cccf..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.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 css_v1_generated_AccountsService_ListChildAccounts_sync] -require "google/shopping/css/v1" - -## -# Snippet for the list_child_accounts call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountsService::Client#list_child_accounts. -# -def list_child_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::ListChildAccountsRequest.new - - # Call the list_child_accounts method. - result = client.list_child_accounts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Css::V1::Account. - p item - end -end -# [END css_v1_generated_AccountsService_ListChildAccounts_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb deleted file mode 100644 index d5f667ab066e..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountsService_UpdateLabels_sync] -require "google/shopping/css/v1" - -## -# Snippet for the update_labels call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountsService::Client#update_labels. -# -def update_labels - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new - - # Call the update_labels method. - result = client.update_labels request - - # The returned object is of type Google::Shopping::Css::V1::Account. - p result -end -# [END css_v1_generated_AccountsService_UpdateLabels_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb deleted file mode 100644 index 006857df17cf..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_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 css_v1_generated_CssProductInputsService_DeleteCssProductInput_sync] -require "google/shopping/css/v1" - -## -# Snippet for the delete_css_product_input call in the CssProductInputsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::CssProductInputsService::Client#delete_css_product_input. -# -def delete_css_product_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::DeleteCssProductInputRequest.new - - # Call the delete_css_product_input method. - result = client.delete_css_product_input request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END css_v1_generated_CssProductInputsService_DeleteCssProductInput_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb deleted file mode 100644 index 1acf0e41e05a..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_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 css_v1_generated_CssProductInputsService_InsertCssProductInput_sync] -require "google/shopping/css/v1" - -## -# Snippet for the insert_css_product_input call in the CssProductInputsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::CssProductInputsService::Client#insert_css_product_input. -# -def insert_css_product_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::InsertCssProductInputRequest.new - - # Call the insert_css_product_input method. - result = client.insert_css_product_input request - - # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - p result -end -# [END css_v1_generated_CssProductInputsService_InsertCssProductInput_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb deleted file mode 100644 index b0f42257db06..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_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 css_v1_generated_CssProductInputsService_UpdateCssProductInput_sync] -require "google/shopping/css/v1" - -## -# Snippet for the update_css_product_input call in the CssProductInputsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::CssProductInputsService::Client#update_css_product_input. -# -def update_css_product_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::UpdateCssProductInputRequest.new - - # Call the update_css_product_input method. - result = client.update_css_product_input request - - # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - p result -end -# [END css_v1_generated_CssProductInputsService_UpdateCssProductInput_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb deleted file mode 100644 index 859163887d62..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_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 css_v1_generated_CssProductsService_GetCssProduct_sync] -require "google/shopping/css/v1" - -## -# Snippet for the get_css_product call in the CssProductsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::CssProductsService::Client#get_css_product. -# -def get_css_product - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::CssProductsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::GetCssProductRequest.new - - # Call the get_css_product method. - result = client.get_css_product request - - # The returned object is of type Google::Shopping::Css::V1::CssProduct. - p result -end -# [END css_v1_generated_CssProductsService_GetCssProduct_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb deleted file mode 100644 index e65a9a1d0a0a..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_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 css_v1_generated_CssProductsService_ListCssProducts_sync] -require "google/shopping/css/v1" - -## -# Snippet for the list_css_products call in the CssProductsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::CssProductsService::Client#list_css_products. -# -def list_css_products - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::CssProductsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::ListCssProductsRequest.new - - # Call the list_css_products method. - result = client.list_css_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::Shopping::Css::V1::CssProduct. - p item - end -end -# [END css_v1_generated_CssProductsService_ListCssProducts_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb b/owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb deleted file mode 100644 index 3efd74d00a2a..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_QuotaService_ListQuotaGroups_sync] -require "google/shopping/css/v1" - -## -# Snippet for the list_quota_groups call in the QuotaService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::QuotaService::Client#list_quota_groups. -# -def list_quota_groups - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::QuotaService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::ListQuotaGroupsRequest.new - - # Call the list_quota_groups method. - result = client.list_quota_groups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Css::V1::QuotaGroup. - p item - end -end -# [END css_v1_generated_QuotaService_ListQuotaGroups_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json b/owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json deleted file mode 100644 index eef1fd62fe59..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json +++ /dev/null @@ -1,535 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-css-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.css.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "css_v1_generated_AccountsService_ListChildAccounts_sync", - "title": "Snippet for the list_child_accounts call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountsService::Client#list_child_accounts.", - "file": "accounts_service/list_child_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_child_accounts", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client#list_child_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::ListChildAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::ListChildAccountsResponse", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client" - }, - "method": { - "short_name": "ListChildAccounts", - "full_name": "google.shopping.css.v1.AccountsService.ListChildAccounts", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.css.v1.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountsService_GetAccount_sync", - "title": "Snippet for the get_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountsService::Client#get_account.", - "file": "accounts_service/get_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_account", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client#get_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::GetAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client" - }, - "method": { - "short_name": "GetAccount", - "full_name": "google.shopping.css.v1.AccountsService.GetAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.css.v1.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountsService_UpdateLabels_sync", - "title": "Snippet for the update_labels call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountsService::Client#update_labels.", - "file": "accounts_service/update_labels.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_labels", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client#update_labels", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::UpdateAccountLabelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client" - }, - "method": { - "short_name": "UpdateLabels", - "full_name": "google.shopping.css.v1.AccountsService.UpdateLabels", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.css.v1.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountLabelsService_ListAccountLabels_sync", - "title": "Snippet for the list_account_labels call in the AccountLabelsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#list_account_labels.", - "file": "account_labels_service/list_account_labels.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_account_labels", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#list_account_labels", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::ListAccountLabelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::ListAccountLabelsResponse", - "client": { - "short_name": "AccountLabelsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" - }, - "method": { - "short_name": "ListAccountLabels", - "full_name": "google.shopping.css.v1.AccountLabelsService.ListAccountLabels", - "service": { - "short_name": "AccountLabelsService", - "full_name": "google.shopping.css.v1.AccountLabelsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountLabelsService_CreateAccountLabel_sync", - "title": "Snippet for the create_account_label call in the AccountLabelsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#create_account_label.", - "file": "account_labels_service/create_account_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_account_label", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#create_account_label", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::CreateAccountLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::AccountLabel", - "client": { - "short_name": "AccountLabelsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" - }, - "method": { - "short_name": "CreateAccountLabel", - "full_name": "google.shopping.css.v1.AccountLabelsService.CreateAccountLabel", - "service": { - "short_name": "AccountLabelsService", - "full_name": "google.shopping.css.v1.AccountLabelsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountLabelsService_UpdateAccountLabel_sync", - "title": "Snippet for the update_account_label call in the AccountLabelsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#update_account_label.", - "file": "account_labels_service/update_account_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_account_label", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#update_account_label", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::UpdateAccountLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::AccountLabel", - "client": { - "short_name": "AccountLabelsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" - }, - "method": { - "short_name": "UpdateAccountLabel", - "full_name": "google.shopping.css.v1.AccountLabelsService.UpdateAccountLabel", - "service": { - "short_name": "AccountLabelsService", - "full_name": "google.shopping.css.v1.AccountLabelsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountLabelsService_DeleteAccountLabel_sync", - "title": "Snippet for the delete_account_label call in the AccountLabelsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#delete_account_label.", - "file": "account_labels_service/delete_account_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_account_label", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#delete_account_label", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::DeleteAccountLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AccountLabelsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" - }, - "method": { - "short_name": "DeleteAccountLabel", - "full_name": "google.shopping.css.v1.AccountLabelsService.DeleteAccountLabel", - "service": { - "short_name": "AccountLabelsService", - "full_name": "google.shopping.css.v1.AccountLabelsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_CssProductInputsService_InsertCssProductInput_sync", - "title": "Snippet for the insert_css_product_input call in the CssProductInputsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductInputsService::Client#insert_css_product_input.", - "file": "css_product_inputs_service/insert_css_product_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_css_product_input", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client#insert_css_product_input", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::InsertCssProductInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::CssProductInput", - "client": { - "short_name": "CssProductInputsService::Client", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client" - }, - "method": { - "short_name": "InsertCssProductInput", - "full_name": "google.shopping.css.v1.CssProductInputsService.InsertCssProductInput", - "service": { - "short_name": "CssProductInputsService", - "full_name": "google.shopping.css.v1.CssProductInputsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_CssProductInputsService_UpdateCssProductInput_sync", - "title": "Snippet for the update_css_product_input call in the CssProductInputsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductInputsService::Client#update_css_product_input.", - "file": "css_product_inputs_service/update_css_product_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_css_product_input", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client#update_css_product_input", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::UpdateCssProductInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::CssProductInput", - "client": { - "short_name": "CssProductInputsService::Client", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client" - }, - "method": { - "short_name": "UpdateCssProductInput", - "full_name": "google.shopping.css.v1.CssProductInputsService.UpdateCssProductInput", - "service": { - "short_name": "CssProductInputsService", - "full_name": "google.shopping.css.v1.CssProductInputsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_CssProductInputsService_DeleteCssProductInput_sync", - "title": "Snippet for the delete_css_product_input call in the CssProductInputsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductInputsService::Client#delete_css_product_input.", - "file": "css_product_inputs_service/delete_css_product_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_css_product_input", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client#delete_css_product_input", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::DeleteCssProductInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CssProductInputsService::Client", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client" - }, - "method": { - "short_name": "DeleteCssProductInput", - "full_name": "google.shopping.css.v1.CssProductInputsService.DeleteCssProductInput", - "service": { - "short_name": "CssProductInputsService", - "full_name": "google.shopping.css.v1.CssProductInputsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_CssProductsService_GetCssProduct_sync", - "title": "Snippet for the get_css_product call in the CssProductsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductsService::Client#get_css_product.", - "file": "css_products_service/get_css_product.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_css_product", - "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client#get_css_product", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::GetCssProductRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::CssProduct", - "client": { - "short_name": "CssProductsService::Client", - "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client" - }, - "method": { - "short_name": "GetCssProduct", - "full_name": "google.shopping.css.v1.CssProductsService.GetCssProduct", - "service": { - "short_name": "CssProductsService", - "full_name": "google.shopping.css.v1.CssProductsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_CssProductsService_ListCssProducts_sync", - "title": "Snippet for the list_css_products call in the CssProductsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductsService::Client#list_css_products.", - "file": "css_products_service/list_css_products.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_css_products", - "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client#list_css_products", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::ListCssProductsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::ListCssProductsResponse", - "client": { - "short_name": "CssProductsService::Client", - "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client" - }, - "method": { - "short_name": "ListCssProducts", - "full_name": "google.shopping.css.v1.CssProductsService.ListCssProducts", - "service": { - "short_name": "CssProductsService", - "full_name": "google.shopping.css.v1.CssProductsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_QuotaService_ListQuotaGroups_sync", - "title": "Snippet for the list_quota_groups call in the QuotaService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::QuotaService::Client#list_quota_groups.", - "file": "quota_service/list_quota_groups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_quota_groups", - "full_name": "::Google::Shopping::Css::V1::QuotaService::Client#list_quota_groups", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::ListQuotaGroupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::ListQuotaGroupsResponse", - "client": { - "short_name": "QuotaService::Client", - "full_name": "::Google::Shopping::Css::V1::QuotaService::Client" - }, - "method": { - "short_name": "ListQuotaGroups", - "full_name": "google.shopping.css.v1.QuotaService.ListQuotaGroups", - "service": { - "short_name": "QuotaService", - "full_name": "google.shopping.css.v1.QuotaService" - } - } - }, - "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-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb deleted file mode 100644 index 06be5bd23520..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_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/shopping/css/v1/account_labels_service" - -class ::Google::Shopping::Css::V1::AccountLabelsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_account_label_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_label_path account: "value0", label: "value1" - assert_equal "accounts/value0/labels/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb deleted file mode 100644 index a5f9e49b2d62..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_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/rest" -require "google/shopping/css/v1/accounts_labels_pb" -require "google/shopping/css/v1/account_labels_service/rest" - - -class ::Google::Shopping::Css::V1::AccountLabelsService::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_account_labels - # Create test objects. - client_result = ::Google::Shopping::Css::V1::ListAccountLabelsResponse.new - http_response = OpenStruct.new 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_account_labels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_list_account_labels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_account_labels_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_account_labels({ 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_account_labels 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_account_labels ::Google::Shopping::Css::V1::ListAccountLabelsRequest.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_account_labels({ 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_account_labels(::Google::Shopping::Css::V1::ListAccountLabelsRequest.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_account_labels_client_stub.call_count - end - end - end - - def test_create_account_label - # Create test objects. - client_result = ::Google::Shopping::Css::V1::AccountLabel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - account_label = {} - - create_account_label_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_create_account_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_account_label_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_account_label({ parent: parent, account_label: account_label }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_account_label parent: parent, account_label: account_label do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_account_label ::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_account_label({ parent: parent, account_label: account_label }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_account_label(::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_account_label_client_stub.call_count - end - end - end - - def test_update_account_label - # Create test objects. - client_result = ::Google::Shopping::Css::V1::AccountLabel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account_label = {} - - update_account_label_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_update_account_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_account_label_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_account_label({ account_label: account_label }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_account_label account_label: account_label do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_account_label ::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_account_label({ account_label: account_label }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_account_label(::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_account_label_client_stub.call_count - end - end - end - - def test_delete_account_label - # 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_account_label_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_delete_account_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_account_label_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_account_label({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_account_label name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_account_label ::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_account_label({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_account_label(::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_account_label_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::Shopping::Css::V1::AccountLabelsService::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::Shopping::Css::V1::AccountLabelsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb deleted file mode 100644 index 5d4bb84187d2..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb +++ /dev/null @@ -1,347 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/css/v1/accounts_labels_pb" -require "google/shopping/css/v1/account_labels_service" - -class ::Google::Shopping::Css::V1::AccountLabelsService::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_account_labels - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::ListAccountLabelsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_account_labels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_account_labels, name - assert_kind_of ::Google::Shopping::Css::V1::ListAccountLabelsRequest, 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_account_labels_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_account_labels({ 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_account_labels 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_account_labels ::Google::Shopping::Css::V1::ListAccountLabelsRequest.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_account_labels({ 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_account_labels(::Google::Shopping::Css::V1::ListAccountLabelsRequest.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_account_labels_client_stub.call_rpc_count - end - end - - def test_create_account_label - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::AccountLabel.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - account_label = {} - - create_account_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_account_label, name - assert_kind_of ::Google::Shopping::Css::V1::CreateAccountLabelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::AccountLabel), request["account_label"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_account_label_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_account_label({ parent: parent, account_label: account_label }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_account_label parent: parent, account_label: account_label do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_account_label ::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_account_label({ parent: parent, account_label: account_label }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_account_label(::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_account_label_client_stub.call_rpc_count - end - end - - def test_update_account_label - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::AccountLabel.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account_label = {} - - update_account_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_account_label, name - assert_kind_of ::Google::Shopping::Css::V1::UpdateAccountLabelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::AccountLabel), request["account_label"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_account_label_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_account_label({ account_label: account_label }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_account_label account_label: account_label do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_account_label ::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_account_label({ account_label: account_label }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_account_label(::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_account_label_client_stub.call_rpc_count - end - end - - def test_delete_account_label - # 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_account_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_account_label, name - assert_kind_of ::Google::Shopping::Css::V1::DeleteAccountLabelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_account_label_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_account_label({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_account_label name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_account_label ::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_account_label({ 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_account_label(::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(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_account_label_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::Shopping::Css::V1::AccountLabelsService::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::Shopping::Css::V1::AccountLabelsService::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::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Css::V1::AccountLabelsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb deleted file mode 100644 index 5958f212e0cf..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_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/shopping/css/v1/accounts_service" - -class ::Google::Shopping::Css::V1::AccountsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb deleted file mode 100644 index 6dafecea18ab..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb +++ /dev/null @@ -1,268 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/css/v1/accounts_pb" -require "google/shopping/css/v1/accounts_service/rest" - - -class ::Google::Shopping::Css::V1::AccountsService::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_child_accounts - # Create test objects. - client_result = ::Google::Shopping::Css::V1::ListChildAccountsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - label_id = 42 - full_name = "hello world" - page_size = 42 - page_token = "hello world" - - list_child_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.stub :transcode_list_child_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_child_accounts_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_child_accounts({ parent: parent, label_id: label_id, full_name: full_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_child_accounts parent: parent, label_id: label_id, full_name: full_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_child_accounts ::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_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_child_accounts({ parent: parent, label_id: label_id, full_name: full_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_child_accounts(::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_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_child_accounts_client_stub.call_count - end - end - end - - def test_get_account - # Create test objects. - client_result = ::Google::Shopping::Css::V1::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - parent = "hello world" - - get_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.stub :transcode_get_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_account_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_account({ name: name, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_account name: name, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_account ::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_account({ name: name, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_account(::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_account_client_stub.call_count - end - end - end - - def test_update_labels - # Create test objects. - client_result = ::Google::Shopping::Css::V1::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - label_ids = [42] - parent = "hello world" - - update_labels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.stub :transcode_update_labels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_labels_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_labels({ name: name, label_ids: label_ids, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_labels name: name, label_ids: label_ids, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_labels ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_labels({ name: name, label_ids: label_ids, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_labels(::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_labels_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::Shopping::Css::V1::AccountsService::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::Shopping::Css::V1::AccountsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb deleted file mode 100644 index cc332acd4e2d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_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/shopping/css/v1/accounts_pb" -require "google/shopping/css/v1/accounts_service" - -class ::Google::Shopping::Css::V1::AccountsService::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_child_accounts - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::ListChildAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - label_id = 42 - full_name = "hello world" - page_size = 42 - page_token = "hello world" - - list_child_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_child_accounts, name - assert_kind_of ::Google::Shopping::Css::V1::ListChildAccountsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["label_id"] - assert request.has_label_id? - assert_equal "hello world", request["full_name"] - assert request.has_full_name? - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_child_accounts_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_child_accounts({ parent: parent, label_id: label_id, full_name: full_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_child_accounts parent: parent, label_id: label_id, full_name: full_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_child_accounts ::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_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_child_accounts({ parent: parent, label_id: label_id, full_name: full_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_child_accounts(::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_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_child_accounts_client_stub.call_rpc_count - end - end - - def test_get_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - parent = "hello world" - - get_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_account, name - assert_kind_of ::Google::Shopping::Css::V1::GetAccountRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["parent"] - assert request.has_parent? - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_account_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_account({ name: name, parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_account name: name, parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_account ::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_account({ name: name, parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_account(::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_account_client_stub.call_rpc_count - end - end - - def test_update_labels - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - label_ids = [42] - parent = "hello world" - - update_labels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_labels, name - assert_kind_of ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, request - assert_equal "hello world", request["name"] - assert_equal [42], request["label_ids"] - assert_equal "hello world", request["parent"] - assert request.has_parent? - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_labels_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_labels({ name: name, label_ids: label_ids, parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_labels name: name, label_ids: label_ids, parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_labels ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_labels({ name: name, label_ids: label_ids, parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_labels(::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_labels_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::Shopping::Css::V1::AccountsService::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::Shopping::Css::V1::AccountsService::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::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Css::V1::AccountsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb deleted file mode 100644 index 6f08e5fdf404..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_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/shopping/css/v1/css_product_inputs_service" - -class ::Google::Shopping::Css::V1::CssProductInputsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_css_product_input_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.css_product_input_path account: "value0", css_product_input: "value1" - assert_equal "accounts/value0/cssProductInputs/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb deleted file mode 100644 index 51442a8b89bd..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb +++ /dev/null @@ -1,265 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/css/v1/css_product_inputs_pb" -require "google/shopping/css/v1/css_product_inputs_service/rest" - - -class ::Google::Shopping::Css::V1::CssProductInputsService::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_insert_css_product_input - # Create test objects. - client_result = ::Google::Shopping::Css::V1::CssProductInput.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - css_product_input = {} - feed_id = 42 - - insert_css_product_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::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.stub :transcode_insert_css_product_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_css_product_input_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_css_product_input parent: parent, css_product_input: css_product_input, feed_id: feed_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_css_product_input ::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_css_product_input(::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_css_product_input_client_stub.call_count - end - end - end - - def test_update_css_product_input - # Create test objects. - client_result = ::Google::Shopping::Css::V1::CssProductInput.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - css_product_input = {} - update_mask = {} - - update_css_product_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::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.stub :transcode_update_css_product_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_css_product_input_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_css_product_input css_product_input: css_product_input, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_css_product_input ::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_css_product_input(::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_css_product_input_client_stub.call_count - end - end - end - - def test_delete_css_product_input - # 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" - supplemental_feed_id = 42 - - delete_css_product_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::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.stub :transcode_delete_css_product_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_css_product_input_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_css_product_input name: name, supplemental_feed_id: supplemental_feed_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_css_product_input ::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_css_product_input(::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_css_product_input_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::Shopping::Css::V1::CssProductInputsService::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::Shopping::Css::V1::CssProductInputsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb deleted file mode 100644 index d9807f60a100..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/css/v1/css_product_inputs_pb" -require "google/shopping/css/v1/css_product_inputs_service" - -class ::Google::Shopping::Css::V1::CssProductInputsService::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_insert_css_product_input - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::CssProductInput.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - css_product_input = {} - feed_id = 42 - - insert_css_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_css_product_input, name - assert_kind_of ::Google::Shopping::Css::V1::InsertCssProductInputRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::CssProductInput), request["css_product_input"] - assert_equal 42, request["feed_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_css_product_input_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_css_product_input parent: parent, css_product_input: css_product_input, feed_id: feed_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_css_product_input ::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_css_product_input(::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_css_product_input_client_stub.call_rpc_count - end - end - - def test_update_css_product_input - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::CssProductInput.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - css_product_input = {} - update_mask = {} - - update_css_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_css_product_input, name - assert_kind_of ::Google::Shopping::Css::V1::UpdateCssProductInputRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::CssProductInput), request["css_product_input"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_css_product_input_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_css_product_input css_product_input: css_product_input, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_css_product_input ::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, 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_css_product_input({ css_product_input: css_product_input, 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_css_product_input(::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, 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_css_product_input_client_stub.call_rpc_count - end - end - - def test_delete_css_product_input - # 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" - supplemental_feed_id = 42 - - delete_css_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_css_product_input, name - assert_kind_of ::Google::Shopping::Css::V1::DeleteCssProductInputRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["supplemental_feed_id"] - assert request.has_supplemental_feed_id? - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_css_product_input_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_css_product_input name: name, supplemental_feed_id: supplemental_feed_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_css_product_input ::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_css_product_input(::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_css_product_input_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::Shopping::Css::V1::CssProductInputsService::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::Shopping::Css::V1::CssProductInputsService::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::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Css::V1::CssProductInputsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb deleted file mode 100644 index 7e9ac41a013e..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_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/shopping/css/v1/css_products_service" - -class ::Google::Shopping::Css::V1::CssProductsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_css_product_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.css_product_path account: "value0", css_product: "value1" - assert_equal "accounts/value0/cssProducts/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb deleted file mode 100644 index cb45e1d2e641..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb +++ /dev/null @@ -1,209 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/css/v1/css_products_pb" -require "google/shopping/css/v1/css_products_service/rest" - - -class ::Google::Shopping::Css::V1::CssProductsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_css_product - # Create test objects. - client_result = ::Google::Shopping::Css::V1::CssProduct.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_css_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::Shopping::Css::V1::CssProductsService::Rest::ServiceStub.stub :transcode_get_css_product_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_css_product_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_css_product({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_css_product name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_css_product ::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_css_product({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_css_product(::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_css_product_client_stub.call_count - end - end - end - - def test_list_css_products - # Create test objects. - client_result = ::Google::Shopping::Css::V1::ListCssProductsResponse.new - http_response = OpenStruct.new 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_css_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::Shopping::Css::V1::CssProductsService::Rest::ServiceStub.stub :transcode_list_css_products_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_css_products_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_css_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_css_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_css_products ::Google::Shopping::Css::V1::ListCssProductsRequest.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_css_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_css_products(::Google::Shopping::Css::V1::ListCssProductsRequest.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_css_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::Shopping::Css::V1::CssProductsService::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::Shopping::Css::V1::CssProductsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb deleted file mode 100644 index f1ac51bd6e60..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/css/v1/css_products_pb" -require "google/shopping/css/v1/css_products_service" - -class ::Google::Shopping::Css::V1::CssProductsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_css_product - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::CssProduct.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_css_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_css_product, name - assert_kind_of ::Google::Shopping::Css::V1::GetCssProductRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_css_product_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_css_product({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_css_product name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_css_product ::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_css_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_css_product(::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_css_product_client_stub.call_rpc_count - end - end - - def test_list_css_products - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::ListCssProductsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_css_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_css_products, name - assert_kind_of ::Google::Shopping::Css::V1::ListCssProductsRequest, 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_css_products_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_css_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_css_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_css_products ::Google::Shopping::Css::V1::ListCssProductsRequest.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_css_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_css_products(::Google::Shopping::Css::V1::ListCssProductsRequest.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_css_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::Shopping::Css::V1::CssProductsService::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::Shopping::Css::V1::CssProductsService::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::Shopping::Css::V1::CssProductsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Css::V1::CssProductsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb deleted file mode 100644 index ebdbed9d44c1..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_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/shopping/css/v1/quota_service" - -class ::Google::Shopping::Css::V1::QuotaService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb deleted file mode 100644 index 8de539d7e195..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb +++ /dev/null @@ -1,155 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/css/v1/quota_pb" -require "google/shopping/css/v1/quota_service/rest" - - -class ::Google::Shopping::Css::V1::QuotaService::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_quota_groups - # Create test objects. - client_result = ::Google::Shopping::Css::V1::ListQuotaGroupsResponse.new - http_response = OpenStruct.new 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_quota_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::QuotaService::Rest::ServiceStub.stub :transcode_list_quota_groups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_quota_groups_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_quota_groups({ 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_quota_groups 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_quota_groups ::Google::Shopping::Css::V1::ListQuotaGroupsRequest.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_quota_groups({ 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_quota_groups(::Google::Shopping::Css::V1::ListQuotaGroupsRequest.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_quota_groups_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::Shopping::Css::V1::QuotaService::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::Shopping::Css::V1::QuotaService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb deleted file mode 100644 index b2461d360df5..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb +++ /dev/null @@ -1,171 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/css/v1/quota_pb" -require "google/shopping/css/v1/quota_service" - -class ::Google::Shopping::Css::V1::QuotaService::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_quota_groups - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::ListQuotaGroupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_quota_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_quota_groups, name - assert_kind_of ::Google::Shopping::Css::V1::ListQuotaGroupsRequest, 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_quota_groups_client_stub do - # Create client - client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_quota_groups({ 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_quota_groups 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_quota_groups ::Google::Shopping::Css::V1::ListQuotaGroupsRequest.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_quota_groups({ 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_quota_groups(::Google::Shopping::Css::V1::ListQuotaGroupsRequest.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_quota_groups_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::Shopping::Css::V1::QuotaService::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::Shopping::Css::V1::QuotaService::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::Shopping::Css::V1::QuotaService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Css::V1::QuotaService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/helper.rb b/owl-bot-staging/google-shopping-css-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-merchant-accounts-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-accounts-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-accounts-v1/.repo-metadata.json deleted file mode 100644 index 5b45e687009c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-accounts-v1", - "distribution_name": "google-shopping-merchant-accounts-v1", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1 API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-accounts-v1/.rubocop.yml deleted file mode 100644 index ea4191fb75d1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-accounts-v1/.yardopts deleted file mode 100644 index dc7bbc10ae29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant 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-shopping-merchant-accounts-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-accounts-v1/AUTHENTICATION.md deleted file mode 100644 index 8f0d9be65324..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-accounts-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-shopping-merchant-accounts-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/shopping/merchant/accounts/v1" - -client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/accounts/v1" - -::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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-shopping-merchant-accounts-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/shopping/merchant/accounts/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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-shopping-merchant-accounts-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-accounts-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-accounts-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/README.md b/owl-bot-staging/google-shopping-merchant-accounts-v1/README.md deleted file mode 100644 index e2d181aa5863..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Merchant V1 API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1 API. Most users should consider using -the main client gem, -[google-shopping-merchant-accounts](https://rubygems.org/gems/google-shopping-merchant-accounts). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-accounts-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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/accounts/v1" - -client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new -request = ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new # (request fields as keyword arguments...) -response = client.list_account_issues request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/accounts/v1" -require "logger" - -client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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-shopping-merchant-accounts`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-accounts-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-shopping-merchant-accounts`. -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-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-accounts-v1/Rakefile deleted file mode 100644 index 5a9e20ab1576..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-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/shopping/merchant/accounts/v1/account_issue_service/credentials" - ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-accounts-v1" - header "google-shopping-merchant-accounts-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-accounts-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-accounts-v1/gapic_metadata.json deleted file mode 100644 index e5fcaeb505d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/gapic_metadata.json +++ /dev/null @@ -1,587 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.accounts.v1", - "libraryPackage": "::Google::Shopping::Merchant::Accounts::V1", - "services": { - "AccountIssueService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client", - "rpcs": { - "ListAccountIssues": { - "methods": [ - "list_account_issues" - ] - } - } - } - } - }, - "AccountRelationshipsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client", - "rpcs": { - "GetAccountRelationship": { - "methods": [ - "get_account_relationship" - ] - }, - "UpdateAccountRelationship": { - "methods": [ - "update_account_relationship" - ] - }, - "ListAccountRelationships": { - "methods": [ - "list_account_relationships" - ] - } - } - } - } - }, - "AccountServicesService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client", - "rpcs": { - "GetAccountService": { - "methods": [ - "get_account_service" - ] - }, - "ListAccountServices": { - "methods": [ - "list_account_services" - ] - }, - "ProposeAccountService": { - "methods": [ - "propose_account_service" - ] - }, - "ApproveAccountService": { - "methods": [ - "approve_account_service" - ] - }, - "RejectAccountService": { - "methods": [ - "reject_account_service" - ] - } - } - } - } - }, - "UserService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client", - "rpcs": { - "GetUser": { - "methods": [ - "get_user" - ] - }, - "CreateUser": { - "methods": [ - "create_user" - ] - }, - "DeleteUser": { - "methods": [ - "delete_user" - ] - }, - "UpdateUser": { - "methods": [ - "update_user" - ] - }, - "ListUsers": { - "methods": [ - "list_users" - ] - }, - "VerifySelf": { - "methods": [ - "verify_self" - ] - } - } - } - } - }, - "AccountsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client", - "rpcs": { - "GetAccount": { - "methods": [ - "get_account" - ] - }, - "CreateAndConfigureAccount": { - "methods": [ - "create_and_configure_account" - ] - }, - "CreateTestAccount": { - "methods": [ - "create_test_account" - ] - }, - "DeleteAccount": { - "methods": [ - "delete_account" - ] - }, - "UpdateAccount": { - "methods": [ - "update_account" - ] - }, - "ListAccounts": { - "methods": [ - "list_accounts" - ] - }, - "ListSubAccounts": { - "methods": [ - "list_sub_accounts" - ] - } - } - } - } - }, - "AutofeedSettingsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client", - "rpcs": { - "GetAutofeedSettings": { - "methods": [ - "get_autofeed_settings" - ] - }, - "UpdateAutofeedSettings": { - "methods": [ - "update_autofeed_settings" - ] - } - } - } - } - }, - "AutomaticImprovementsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client", - "rpcs": { - "GetAutomaticImprovements": { - "methods": [ - "get_automatic_improvements" - ] - }, - "UpdateAutomaticImprovements": { - "methods": [ - "update_automatic_improvements" - ] - } - } - } - } - }, - "BusinessIdentityService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client", - "rpcs": { - "GetBusinessIdentity": { - "methods": [ - "get_business_identity" - ] - }, - "UpdateBusinessIdentity": { - "methods": [ - "update_business_identity" - ] - } - } - } - } - }, - "BusinessInfoService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client", - "rpcs": { - "GetBusinessInfo": { - "methods": [ - "get_business_info" - ] - }, - "UpdateBusinessInfo": { - "methods": [ - "update_business_info" - ] - } - } - } - } - }, - "CheckoutSettingsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client", - "rpcs": { - "GetCheckoutSettings": { - "methods": [ - "get_checkout_settings" - ] - }, - "CreateCheckoutSettings": { - "methods": [ - "create_checkout_settings" - ] - }, - "UpdateCheckoutSettings": { - "methods": [ - "update_checkout_settings" - ] - }, - "DeleteCheckoutSettings": { - "methods": [ - "delete_checkout_settings" - ] - } - } - } - } - }, - "DeveloperRegistrationService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client", - "rpcs": { - "RegisterGcp": { - "methods": [ - "register_gcp" - ] - }, - "GetDeveloperRegistration": { - "methods": [ - "get_developer_registration" - ] - }, - "UnregisterGcp": { - "methods": [ - "unregister_gcp" - ] - }, - "GetAccountForGcpRegistration": { - "methods": [ - "get_account_for_gcp_registration" - ] - } - } - } - } - }, - "EmailPreferencesService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client", - "rpcs": { - "GetEmailPreferences": { - "methods": [ - "get_email_preferences" - ] - }, - "UpdateEmailPreferences": { - "methods": [ - "update_email_preferences" - ] - } - } - } - } - }, - "GbpAccountsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client", - "rpcs": { - "ListGbpAccounts": { - "methods": [ - "list_gbp_accounts" - ] - }, - "LinkGbpAccount": { - "methods": [ - "link_gbp_account" - ] - } - } - } - } - }, - "HomepageService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client", - "rpcs": { - "GetHomepage": { - "methods": [ - "get_homepage" - ] - }, - "UpdateHomepage": { - "methods": [ - "update_homepage" - ] - }, - "ClaimHomepage": { - "methods": [ - "claim_homepage" - ] - }, - "UnclaimHomepage": { - "methods": [ - "unclaim_homepage" - ] - } - } - } - } - }, - "LfpProvidersService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client", - "rpcs": { - "FindLfpProviders": { - "methods": [ - "find_lfp_providers" - ] - }, - "LinkLfpProvider": { - "methods": [ - "link_lfp_provider" - ] - } - } - } - } - }, - "OmnichannelSettingsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client", - "rpcs": { - "GetOmnichannelSetting": { - "methods": [ - "get_omnichannel_setting" - ] - }, - "ListOmnichannelSettings": { - "methods": [ - "list_omnichannel_settings" - ] - }, - "CreateOmnichannelSetting": { - "methods": [ - "create_omnichannel_setting" - ] - }, - "UpdateOmnichannelSetting": { - "methods": [ - "update_omnichannel_setting" - ] - }, - "RequestInventoryVerification": { - "methods": [ - "request_inventory_verification" - ] - } - } - } - } - }, - "OnlineReturnPolicyService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client", - "rpcs": { - "GetOnlineReturnPolicy": { - "methods": [ - "get_online_return_policy" - ] - }, - "ListOnlineReturnPolicies": { - "methods": [ - "list_online_return_policies" - ] - }, - "CreateOnlineReturnPolicy": { - "methods": [ - "create_online_return_policy" - ] - }, - "DeleteOnlineReturnPolicy": { - "methods": [ - "delete_online_return_policy" - ] - } - } - } - } - }, - "ProgramsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client", - "rpcs": { - "GetProgram": { - "methods": [ - "get_program" - ] - }, - "ListPrograms": { - "methods": [ - "list_programs" - ] - }, - "EnableProgram": { - "methods": [ - "enable_program" - ] - }, - "DisableProgram": { - "methods": [ - "disable_program" - ] - } - } - } - } - }, - "RegionsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client", - "rpcs": { - "GetRegion": { - "methods": [ - "get_region" - ] - }, - "CreateRegion": { - "methods": [ - "create_region" - ] - }, - "BatchCreateRegions": { - "methods": [ - "batch_create_regions" - ] - }, - "UpdateRegion": { - "methods": [ - "update_region" - ] - }, - "BatchUpdateRegions": { - "methods": [ - "batch_update_regions" - ] - }, - "DeleteRegion": { - "methods": [ - "delete_region" - ] - }, - "BatchDeleteRegions": { - "methods": [ - "batch_delete_regions" - ] - }, - "ListRegions": { - "methods": [ - "list_regions" - ] - } - } - } - } - }, - "ShippingSettingsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client", - "rpcs": { - "GetShippingSettings": { - "methods": [ - "get_shipping_settings" - ] - }, - "InsertShippingSettings": { - "methods": [ - "insert_shipping_settings" - ] - } - } - } - } - }, - "TermsOfServiceAgreementStateService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client", - "rpcs": { - "GetTermsOfServiceAgreementState": { - "methods": [ - "get_terms_of_service_agreement_state" - ] - }, - "RetrieveForApplicationTermsOfServiceAgreementState": { - "methods": [ - "retrieve_for_application_terms_of_service_agreement_state" - ] - } - } - } - } - }, - "TermsOfServiceService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client", - "rpcs": { - "GetTermsOfService": { - "methods": [ - "get_terms_of_service" - ] - }, - "RetrieveLatestTermsOfService": { - "methods": [ - "retrieve_latest_terms_of_service" - ] - }, - "AcceptTermsOfService": { - "methods": [ - "accept_terms_of_service" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/google-shopping-merchant-accounts-v1.gemspec b/owl-bot-staging/google-shopping-merchant-accounts-v1/google-shopping-merchant-accounts-v1.gemspec deleted file mode 100644 index b1f1f53d2b8e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/google-shopping-merchant-accounts-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/accounts/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-accounts-v1" - gem.version = Google::Shopping::Merchant::Accounts::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center Accounts." - 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-shopping-type", "~> 1.0" -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google-shopping-merchant-accounts-v1.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google-shopping-merchant-accounts-v1.rb deleted file mode 100644 index 4b03981d4244..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google-shopping-merchant-accounts-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/shopping/merchant/accounts/v1" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1.rb deleted file mode 100644 index 74b3a214ea31..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1.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 "google/shopping/merchant/accounts/v1/account_issue_service" -require "google/shopping/merchant/accounts/v1/account_relationships_service" -require "google/shopping/merchant/accounts/v1/account_services_service" -require "google/shopping/merchant/accounts/v1/user_service" -require "google/shopping/merchant/accounts/v1/accounts_service" -require "google/shopping/merchant/accounts/v1/autofeed_settings_service" -require "google/shopping/merchant/accounts/v1/automatic_improvements_service" -require "google/shopping/merchant/accounts/v1/business_identity_service" -require "google/shopping/merchant/accounts/v1/business_info_service" -require "google/shopping/merchant/accounts/v1/checkout_settings_service" -require "google/shopping/merchant/accounts/v1/developer_registration_service" -require "google/shopping/merchant/accounts/v1/email_preferences_service" -require "google/shopping/merchant/accounts/v1/gbp_accounts_service" -require "google/shopping/merchant/accounts/v1/homepage_service" -require "google/shopping/merchant/accounts/v1/lfp_providers_service" -require "google/shopping/merchant/accounts/v1/omnichannel_settings_service" -require "google/shopping/merchant/accounts/v1/online_return_policy_service" -require "google/shopping/merchant/accounts/v1/programs_service" -require "google/shopping/merchant/accounts/v1/regions_service" -require "google/shopping/merchant/accounts/v1/shipping_settings_service" -require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service" -require "google/shopping/merchant/accounts/v1/terms_of_service_service" -require "google/shopping/merchant/accounts/v1/version" - -module Google - module Shopping - module Merchant - module Accounts - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1" - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1" - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/merchant/accounts/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accessright_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accessright_pb.rb deleted file mode 100644 index b7c9521c8eb4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accessright_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/accessright.proto - -require 'google/protobuf' - - -descriptor_data = "\n6google/shopping/merchant/accounts/v1/accessright.proto\x12$google.shopping.merchant.accounts.v1*\x81\x01\n\x0b\x41\x63\x63\x65ssRight\x12\x1c\n\x18\x41\x43\x43\x45SS_RIGHT_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\r\n\tREAD_ONLY\x10\x04\x12\t\n\x05\x41\x44MIN\x10\x02\x12\x19\n\x15PERFORMANCE_REPORTING\x10\x03\x12\x11\n\rAPI_DEVELOPER\x10\x05\x42\x83\x02\n(com.google.shopping.merchant.accounts.v1B\x10\x41\x63\x63\x65ssRightProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - AccessRight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccessRight").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service.rb deleted file mode 100644 index ac431d602f8c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/account_issue_service/credentials" -require "google/shopping/merchant/accounts/v1/account_issue_service/paths" -require "google/shopping/merchant/accounts/v1/account_issue_service/client" -require "google/shopping/merchant/accounts/v1/account_issue_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support `AccountIssueService` API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/account_issue_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/account_issue_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new - # - module AccountIssueService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "account_issue_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/account_issue_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/client.rb deleted file mode 100644 index 1c95a0303451..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/client.rb +++ /dev/null @@ -1,514 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/accountissue_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AccountIssueService - ## - # Client for the AccountIssueService service. - # - # Service to support `AccountIssueService` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_issue_service_stub - - ## - # Configure the AccountIssueService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountIssueService clients - # ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountIssueService 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::Shopping::Merchant::Accounts::V1::AccountIssueService::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 - @account_issue_service_stub.universe_domain - end - - ## - # Create a new AccountIssueService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountIssueService 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/shopping/merchant/accounts/v1/accountissue_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 - - @account_issue_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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 - ) - - @account_issue_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 - @account_issue_service_stub.logger - end - - # Service calls - - ## - # Lists all account issues of a Merchant Center account. - # - # When called on a multi-client account, this method only returns issues - # belonging to that account, not its sub-accounts. To retrieve issues for - # sub-accounts, you must first call the - # {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_sub_accounts accounts.listSubaccounts} - # method to obtain a list of sub-accounts, and then call - # `accounts.issues.list` for each sub-account individually. - # - # @overload list_account_issues(request, options = nil) - # Pass arguments to `list_account_issues` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil) - # Pass arguments to `list_account_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of issues. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of issues to return. The service may return - # fewer than this value. If unspecified, at most 50 issues will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccountIssues` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountIssues` must - # match the call that provided the page token. - # @param language_code [::String] - # Optional. The issues in the response will have human-readable fields in the - # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), - # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be - # used. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in human-readable fields. For example 'America/Los_Angeles'. - # If not set, 'America/Los_Angeles' will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountIssue>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountIssue>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new - # - # # Call the list_account_issues method. - # result = client.list_account_issues request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountIssue. - # p item - # end - # - def list_account_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_account_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_account_issues.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_account_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_issue_service_stub.call_rpc :list_account_issues, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, 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 AccountIssueService API. - # - # This class represents the configuration for AccountIssueService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_account_issues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_issues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_issues.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::AccountIssueService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountIssueService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_account_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_issues - - # @private - def initialize parent_rpcs = nil - list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues - @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/credentials.rb deleted file mode 100644 index 4f6ed53d9ee4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_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 Shopping - module Merchant - module Accounts - module V1 - module AccountIssueService - # Credentials for the AccountIssueService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/paths.rb deleted file mode 100644 index 5d46838c9457..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/paths.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 Shopping - module Merchant - module Accounts - module V1 - module AccountIssueService - # Path helper methods for the AccountIssueService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest.rb deleted file mode 100644 index 22206bc273f6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/account_issue_service/credentials" -require "google/shopping/merchant/accounts/v1/account_issue_service/paths" -require "google/shopping/merchant/accounts/v1/account_issue_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support `AccountIssueService` API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/account_issue_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new - # - module AccountIssueService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/account_issue_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/client.rb deleted file mode 100644 index b27f66db400b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/client.rb +++ /dev/null @@ -1,464 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/accountissue_pb" -require "google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AccountIssueService - module Rest - ## - # REST client for the AccountIssueService service. - # - # Service to support `AccountIssueService` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_issue_service_stub - - ## - # Configure the AccountIssueService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountIssueService clients - # ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountIssueService 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::Shopping::Merchant::Accounts::V1::AccountIssueService::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 - @account_issue_service_stub.universe_domain - end - - ## - # Create a new AccountIssueService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountIssueService 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 - - @account_issue_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @account_issue_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 - @account_issue_service_stub.logger - end - - # Service calls - - ## - # Lists all account issues of a Merchant Center account. - # - # When called on a multi-client account, this method only returns issues - # belonging to that account, not its sub-accounts. To retrieve issues for - # sub-accounts, you must first call the - # {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client#list_sub_accounts accounts.listSubaccounts} - # method to obtain a list of sub-accounts, and then call - # `accounts.issues.list` for each sub-account individually. - # - # @overload list_account_issues(request, options = nil) - # Pass arguments to `list_account_issues` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil) - # Pass arguments to `list_account_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of issues. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of issues to return. The service may return - # fewer than this value. If unspecified, at most 50 issues will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccountIssues` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountIssues` must - # match the call that provided the page token. - # @param language_code [::String] - # Optional. The issues in the response will have human-readable fields in the - # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), - # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be - # used. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in human-readable fields. For example 'America/Los_Angeles'. - # If not set, 'America/Los_Angeles' will be used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountIssue>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountIssue>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new - # - # # Call the list_account_issues method. - # result = client.list_account_issues request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountIssue. - # p item - # end - # - def list_account_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_account_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_account_issues.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_account_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_issue_service_stub.list_account_issues request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, "account_issues", request, result, 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 AccountIssueService REST API. - # - # This class represents the configuration for AccountIssueService 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::Shopping::Merchant::Accounts::V1::AccountIssueService::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_account_issues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_issues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_issues.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountIssueService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_account_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_issues - - # @private - def initialize parent_rpcs = nil - list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues - @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub.rb deleted file mode 100644 index f3ae29a7ab11..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub.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! - -require "google/shopping/merchant/accounts/v1/accountissue_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AccountIssueService - module Rest - ## - # REST service stub for the AccountIssueService 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_account_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse] - # A result object deserialized from the server's reply - def list_account_issues request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_account_issues_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_account_issues", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse.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_account_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_account_issues_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{parent}/issues", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service.rb deleted file mode 100644 index 65aa7386d5f8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/account_relationships_service/credentials" -require "google/shopping/merchant/accounts/v1/account_relationships_service/paths" -require "google/shopping/merchant/accounts/v1/account_relationships_service/client" -require "google/shopping/merchant/accounts/v1/account_relationships_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support AccountRelationship API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/account_relationships_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/account_relationships_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new - # - module AccountRelationshipsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "account_relationships_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/account_relationships_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/client.rb deleted file mode 100644 index 4339f4ea4141..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/client.rb +++ /dev/null @@ -1,688 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/accountrelationships_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AccountRelationshipsService - ## - # Client for the AccountRelationshipsService service. - # - # Service to support AccountRelationship API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_relationships_service_stub - - ## - # Configure the AccountRelationshipsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountRelationshipsService clients - # ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountRelationshipsService 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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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 - @account_relationships_service_stub.universe_domain - end - - ## - # Create a new AccountRelationshipsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountRelationshipsService 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/shopping/merchant/accounts/v1/accountrelationships_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 - - @account_relationships_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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 - ) - - @account_relationships_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 - @account_relationships_service_stub.logger - end - - # Service calls - - ## - # Retrieve an account relationship. - # - # @overload get_account_relationship(request, options = nil) - # Pass arguments to `get_account_relationship` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_account_relationship(name: nil) - # Pass arguments to `get_account_relationship` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the account relationship to get. - # Format: `accounts/{account}/relationships/{relationship}`. For example, - # `accounts/123456/relationships/567890`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new - # - # # Call the get_account_relationship method. - # result = client.get_account_relationship request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. - # p result - # - def get_account_relationship request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_account_relationship.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_account_relationship.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_account_relationship.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_relationships_service_stub.call_rpc :get_account_relationship, request, 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 account relationship. Executing this method requires admin - # access. - # - # @overload update_account_relationship(request, options = nil) - # Pass arguments to `update_account_relationship` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_account_relationship(account_relationship: nil, update_mask: nil) - # Pass arguments to `update_account_relationship` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_relationship [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship, ::Hash] - # Required. The new version of the account relationship. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `account_id_alias` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new - # - # # Call the update_account_relationship method. - # result = client.update_account_relationship request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. - # p result - # - def update_account_relationship request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest - - # Converts hash and nil to 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_account_relationship.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.account_relationship&.name - header_params["account_relationship.name"] = request.account_relationship.name - end - - request_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_account_relationship.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_account_relationship.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_relationships_service_stub.call_rpc :update_account_relationship, request, 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 account relationships for the specified account. - # - # @overload list_account_relationships(request, options = nil) - # Pass arguments to `list_account_relationships` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_account_relationships(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_account_relationships` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account of the account relationship to filter by. - # Format: `accounts/{account}` - # @param page_token [::String] - # Optional. The token returned by the previous `list` request. - # @param page_size [::Integer] - # Optional. The maximum number of elements to return in the response. Use for - # paging. If no `page_size` is specified, `100` is used as the default value. - # The maximum allowed value is `1000`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountRelationship>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountRelationship>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.new - # - # # Call the list_account_relationships method. - # result = client.list_account_relationships request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship. - # p item - # end - # - def list_account_relationships request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_account_relationships.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_account_relationships.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_account_relationships.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_relationships_service_stub.call_rpc :list_account_relationships, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @account_relationships_service_stub, :list_account_relationships, 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 AccountRelationshipsService API. - # - # This class represents the configuration for AccountRelationshipsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_account_relationship to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_relationship.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_relationship.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountRelationshipsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account_relationship` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account_relationship - ## - # RPC-specific configuration for `update_account_relationship` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account_relationship - ## - # RPC-specific configuration for `list_account_relationships` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_relationships - - # @private - def initialize parent_rpcs = nil - get_account_relationship_config = parent_rpcs.get_account_relationship if parent_rpcs.respond_to? :get_account_relationship - @get_account_relationship = ::Gapic::Config::Method.new get_account_relationship_config - update_account_relationship_config = parent_rpcs.update_account_relationship if parent_rpcs.respond_to? :update_account_relationship - @update_account_relationship = ::Gapic::Config::Method.new update_account_relationship_config - list_account_relationships_config = parent_rpcs.list_account_relationships if parent_rpcs.respond_to? :list_account_relationships - @list_account_relationships = ::Gapic::Config::Method.new list_account_relationships_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/credentials.rb deleted file mode 100644 index d04c0be362cf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_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 Shopping - module Merchant - module Accounts - module V1 - module AccountRelationshipsService - # Credentials for the AccountRelationshipsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/paths.rb deleted file mode 100644 index 27b34756df36..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_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 Shopping - module Merchant - module Accounts - module V1 - module AccountRelationshipsService - # Path helper methods for the AccountRelationshipsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified AccountRelationship resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/relationships/{relationship}` - # - # @param account [String] - # @param relationship [String] - # - # @return [::String] - def account_relationship_path account:, relationship: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/relationships/#{relationship}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest.rb deleted file mode 100644 index 31b61fc059d4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/account_relationships_service/credentials" -require "google/shopping/merchant/accounts/v1/account_relationships_service/paths" -require "google/shopping/merchant/accounts/v1/account_relationships_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support AccountRelationship API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/account_relationships_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new - # - module AccountRelationshipsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/account_relationships_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/client.rb deleted file mode 100644 index eabb41838775..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/client.rb +++ /dev/null @@ -1,624 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1/accountrelationships_pb" -require "google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AccountRelationshipsService - module Rest - ## - # REST client for the AccountRelationshipsService service. - # - # Service to support AccountRelationship API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_relationships_service_stub - - ## - # Configure the AccountRelationshipsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountRelationshipsService clients - # ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountRelationshipsService 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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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 - @account_relationships_service_stub.universe_domain - end - - ## - # Create a new AccountRelationshipsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountRelationshipsService 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 - - @account_relationships_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @account_relationships_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 - @account_relationships_service_stub.logger - end - - # Service calls - - ## - # Retrieve an account relationship. - # - # @overload get_account_relationship(request, options = nil) - # Pass arguments to `get_account_relationship` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_account_relationship(name: nil) - # Pass arguments to `get_account_relationship` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the account relationship to get. - # Format: `accounts/{account}/relationships/{relationship}`. For example, - # `accounts/123456/relationships/567890`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new - # - # # Call the get_account_relationship method. - # result = client.get_account_relationship request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. - # p result - # - def get_account_relationship request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_account_relationship.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_account_relationship.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_account_relationship.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_relationships_service_stub.get_account_relationship request, 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 account relationship. Executing this method requires admin - # access. - # - # @overload update_account_relationship(request, options = nil) - # Pass arguments to `update_account_relationship` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_account_relationship(account_relationship: nil, update_mask: nil) - # Pass arguments to `update_account_relationship` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_relationship [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship, ::Hash] - # Required. The new version of the account relationship. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `account_id_alias` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new - # - # # Call the update_account_relationship method. - # result = client.update_account_relationship request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. - # p result - # - def update_account_relationship request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest - - # Converts hash and nil to an 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_account_relationship.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_account_relationship.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_account_relationship.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_relationships_service_stub.update_account_relationship request, 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 account relationships for the specified account. - # - # @overload list_account_relationships(request, options = nil) - # Pass arguments to `list_account_relationships` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_account_relationships(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_account_relationships` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account of the account relationship to filter by. - # Format: `accounts/{account}` - # @param page_token [::String] - # Optional. The token returned by the previous `list` request. - # @param page_size [::Integer] - # Optional. The maximum number of elements to return in the response. Use for - # paging. If no `page_size` is specified, `100` is used as the default value. - # The maximum allowed value is `1000`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountRelationship>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountRelationship>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.new - # - # # Call the list_account_relationships method. - # result = client.list_account_relationships request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship. - # p item - # end - # - def list_account_relationships request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_account_relationships.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_account_relationships.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_account_relationships.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_relationships_service_stub.list_account_relationships request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @account_relationships_service_stub, :list_account_relationships, "account_relationships", request, result, 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 AccountRelationshipsService REST API. - # - # This class represents the configuration for AccountRelationshipsService 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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_account_relationship to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_relationship.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_relationship.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountRelationshipsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account_relationship` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account_relationship - ## - # RPC-specific configuration for `update_account_relationship` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account_relationship - ## - # RPC-specific configuration for `list_account_relationships` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_relationships - - # @private - def initialize parent_rpcs = nil - get_account_relationship_config = parent_rpcs.get_account_relationship if parent_rpcs.respond_to? :get_account_relationship - @get_account_relationship = ::Gapic::Config::Method.new get_account_relationship_config - update_account_relationship_config = parent_rpcs.update_account_relationship if parent_rpcs.respond_to? :update_account_relationship - @update_account_relationship = ::Gapic::Config::Method.new update_account_relationship_config - list_account_relationships_config = parent_rpcs.list_account_relationships if parent_rpcs.respond_to? :list_account_relationships - @list_account_relationships = ::Gapic::Config::Method.new list_account_relationships_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub.rb deleted file mode 100644 index 065aeaccd145..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub.rb +++ /dev/null @@ -1,267 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/accountrelationships_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AccountRelationshipsService - module Rest - ## - # REST service stub for the AccountRelationshipsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_account_relationship REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] - # A result object deserialized from the server's reply - def get_account_relationship request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_account_relationship_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_account_relationship", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.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_account_relationship REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] - # A result object deserialized from the server's reply - def update_account_relationship request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_account_relationship_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_account_relationship", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.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_account_relationships REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse] - # A result object deserialized from the server's reply - def list_account_relationships request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_account_relationships_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_account_relationships", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_account_relationship REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_account_relationship_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/relationships/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_account_relationship REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest] - # 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_account_relationship_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1/{account_relationship.name}", - body: "account_relationship", - matches: [ - ["account_relationship.name", %r{^accounts/[^/]+/relationships/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_account_relationships REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_account_relationships_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{parent}/relationships", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service.rb deleted file mode 100644 index ea6e4ab4f5da..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/account_services_service/credentials" -require "google/shopping/merchant/accounts/v1/account_services_service/paths" -require "google/shopping/merchant/accounts/v1/account_services_service/client" -require "google/shopping/merchant/accounts/v1/account_services_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support AccountService API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/account_services_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/account_services_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new - # - module AccountServicesService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "account_services_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/account_services_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/client.rb deleted file mode 100644 index c407d9c5d2e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/client.rb +++ /dev/null @@ -1,873 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/accountservices_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AccountServicesService - ## - # Client for the AccountServicesService service. - # - # Service to support AccountService API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_services_service_stub - - ## - # Configure the AccountServicesService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountServicesService clients - # ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountServicesService 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::Shopping::Merchant::Accounts::V1::AccountServicesService::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 - @account_services_service_stub.universe_domain - end - - ## - # Create a new AccountServicesService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountServicesService 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/shopping/merchant/accounts/v1/accountservices_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 - - @account_services_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::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 - ) - - @account_services_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 - @account_services_service_stub.logger - end - - # Service calls - - ## - # Retrieve an account service. - # - # @overload get_account_service(request, options = nil) - # Pass arguments to `get_account_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_account_service(name: nil) - # Pass arguments to `get_account_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the account service to get. - # Format: `accounts/{account}/services/{service}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new - # - # # Call the get_account_service method. - # result = client.get_account_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. - # p result - # - def get_account_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_account_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_account_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_account_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_services_service_stub.call_rpc :get_account_service, request, 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 account services for the specified accounts. Supports filtering. - # - # @overload list_account_services(request, options = nil) - # Pass arguments to `list_account_services` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_account_services(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_account_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account of the account service to filter by. - # Format: `accounts/{account}` - # @param page_token [::String] - # Optional. The token returned by the previous `list` request. - # @param page_size [::Integer] - # Optional. The maximum number of elements to return in the response. Use for - # paging. If no `page_size` is specified, `100` is used as the default value. - # The maximum allowed value is `1000`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountService>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountService>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.new - # - # # Call the list_account_services method. - # result = client.list_account_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountService. - # p item - # end - # - def list_account_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_account_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_account_services.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_account_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_services_service_stub.call_rpc :list_account_services, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @account_services_service_stub, :list_account_services, 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 - - ## - # Propose an account service. - # - # @overload propose_account_service(request, options = nil) - # Pass arguments to `propose_account_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_account_service(parent: nil, provider: nil, account_service: nil) - # Pass arguments to `propose_account_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent account for the service. - # Format: `accounts/{account}` - # @param provider [::String] - # Required. The provider of the service. Either the reference to an account - # such as `providers/123` or a well-known service provider (one of - # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). - # @param account_service [::Google::Shopping::Merchant::Accounts::V1::AccountService, ::Hash] - # Required. The account service to propose. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new - # - # # Call the propose_account_service method. - # result = client.propose_account_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. - # p result - # - def propose_account_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest - - # Converts hash and nil to 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_account_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_account_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.propose_account_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_services_service_stub.call_rpc :propose_account_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Approve an account service proposal. - # - # @overload approve_account_service(request, options = nil) - # Pass arguments to `approve_account_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_account_service(name: nil) - # Pass arguments to `approve_account_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the account service to approve. - # Format: `accounts/{account}/services/{service}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new - # - # # Call the approve_account_service method. - # result = client.approve_account_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. - # p result - # - def approve_account_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest - - # Converts hash and nil to 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_account_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_account_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.approve_account_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_services_service_stub.call_rpc :approve_account_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Reject an account service (both proposed and approve services can be - # rejected). - # - # @overload reject_account_service(request, options = nil) - # Pass arguments to `reject_account_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_account_service(name: nil) - # Pass arguments to `reject_account_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the account service to reject. - # Format: `accounts/{account}/services/{service}` - # - # @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/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new - # - # # Call the reject_account_service method. - # result = client.reject_account_service request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def reject_account_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest - - # Converts hash and nil to 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_account_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_account_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.reject_account_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_services_service_stub.call_rpc :reject_account_service, request, 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 AccountServicesService API. - # - # This class represents the configuration for AccountServicesService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_account_service to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_service.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_service.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::AccountServicesService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountServicesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account_service - ## - # RPC-specific configuration for `list_account_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_services - ## - # RPC-specific configuration for `propose_account_service` - # @return [::Gapic::Config::Method] - # - attr_reader :propose_account_service - ## - # RPC-specific configuration for `approve_account_service` - # @return [::Gapic::Config::Method] - # - attr_reader :approve_account_service - ## - # RPC-specific configuration for `reject_account_service` - # @return [::Gapic::Config::Method] - # - attr_reader :reject_account_service - - # @private - def initialize parent_rpcs = nil - get_account_service_config = parent_rpcs.get_account_service if parent_rpcs.respond_to? :get_account_service - @get_account_service = ::Gapic::Config::Method.new get_account_service_config - list_account_services_config = parent_rpcs.list_account_services if parent_rpcs.respond_to? :list_account_services - @list_account_services = ::Gapic::Config::Method.new list_account_services_config - propose_account_service_config = parent_rpcs.propose_account_service if parent_rpcs.respond_to? :propose_account_service - @propose_account_service = ::Gapic::Config::Method.new propose_account_service_config - approve_account_service_config = parent_rpcs.approve_account_service if parent_rpcs.respond_to? :approve_account_service - @approve_account_service = ::Gapic::Config::Method.new approve_account_service_config - reject_account_service_config = parent_rpcs.reject_account_service if parent_rpcs.respond_to? :reject_account_service - @reject_account_service = ::Gapic::Config::Method.new reject_account_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/credentials.rb deleted file mode 100644 index 0c18a2e4fc2c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_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 Shopping - module Merchant - module Accounts - module V1 - module AccountServicesService - # Credentials for the AccountServicesService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/paths.rb deleted file mode 100644 index b172ae1ce8d2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_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 Shopping - module Merchant - module Accounts - module V1 - module AccountServicesService - # Path helper methods for the AccountServicesService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified AccountService resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/services/{service}` - # - # @param account [String] - # @param service [String] - # - # @return [::String] - def account_service_path account:, service: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/services/#{service}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest.rb deleted file mode 100644 index 60328359fc48..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/account_services_service/credentials" -require "google/shopping/merchant/accounts/v1/account_services_service/paths" -require "google/shopping/merchant/accounts/v1/account_services_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support AccountService API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/account_services_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new - # - module AccountServicesService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/account_services_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/client.rb deleted file mode 100644 index c874f5c51cdd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/client.rb +++ /dev/null @@ -1,795 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/accountservices_pb" -require "google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AccountServicesService - module Rest - ## - # REST client for the AccountServicesService service. - # - # Service to support AccountService API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_services_service_stub - - ## - # Configure the AccountServicesService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountServicesService clients - # ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountServicesService 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::Shopping::Merchant::Accounts::V1::AccountServicesService::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 - @account_services_service_stub.universe_domain - end - - ## - # Create a new AccountServicesService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountServicesService 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 - - @account_services_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @account_services_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 - @account_services_service_stub.logger - end - - # Service calls - - ## - # Retrieve an account service. - # - # @overload get_account_service(request, options = nil) - # Pass arguments to `get_account_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_account_service(name: nil) - # Pass arguments to `get_account_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the account service to get. - # Format: `accounts/{account}/services/{service}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new - # - # # Call the get_account_service method. - # result = client.get_account_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. - # p result - # - def get_account_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_account_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_account_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_account_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_services_service_stub.get_account_service request, 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 account services for the specified accounts. Supports filtering. - # - # @overload list_account_services(request, options = nil) - # Pass arguments to `list_account_services` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_account_services(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_account_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account of the account service to filter by. - # Format: `accounts/{account}` - # @param page_token [::String] - # Optional. The token returned by the previous `list` request. - # @param page_size [::Integer] - # Optional. The maximum number of elements to return in the response. Use for - # paging. If no `page_size` is specified, `100` is used as the default value. - # The maximum allowed value is `1000`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountService>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountService>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.new - # - # # Call the list_account_services method. - # result = client.list_account_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountService. - # p item - # end - # - def list_account_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_account_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_account_services.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_account_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_services_service_stub.list_account_services request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @account_services_service_stub, :list_account_services, "account_services", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Propose an account service. - # - # @overload propose_account_service(request, options = nil) - # Pass arguments to `propose_account_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_account_service(parent: nil, provider: nil, account_service: nil) - # Pass arguments to `propose_account_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent account for the service. - # Format: `accounts/{account}` - # @param provider [::String] - # Required. The provider of the service. Either the reference to an account - # such as `providers/123` or a well-known service provider (one of - # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). - # @param account_service [::Google::Shopping::Merchant::Accounts::V1::AccountService, ::Hash] - # Required. The account service to propose. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new - # - # # Call the propose_account_service method. - # result = client.propose_account_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. - # p result - # - def propose_account_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest - - # Converts hash and nil to an 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_account_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_account_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.propose_account_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_services_service_stub.propose_account_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Approve an account service proposal. - # - # @overload approve_account_service(request, options = nil) - # Pass arguments to `approve_account_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_account_service(name: nil) - # Pass arguments to `approve_account_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the account service to approve. - # Format: `accounts/{account}/services/{service}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new - # - # # Call the approve_account_service method. - # result = client.approve_account_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. - # p result - # - def approve_account_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest - - # Converts hash and nil to an 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_account_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_account_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.approve_account_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_services_service_stub.approve_account_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Reject an account service (both proposed and approve services can be - # rejected). - # - # @overload reject_account_service(request, options = nil) - # Pass arguments to `reject_account_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_account_service(name: nil) - # Pass arguments to `reject_account_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the account service to reject. - # Format: `accounts/{account}/services/{service}` - # @yield [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/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new - # - # # Call the reject_account_service method. - # result = client.reject_account_service request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def reject_account_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest - - # Converts hash and nil to an 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_account_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_account_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.reject_account_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_services_service_stub.reject_account_service request, 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 AccountServicesService REST API. - # - # This class represents the configuration for AccountServicesService 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::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_account_service to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_service.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_service.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountServicesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account_service - ## - # RPC-specific configuration for `list_account_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_services - ## - # RPC-specific configuration for `propose_account_service` - # @return [::Gapic::Config::Method] - # - attr_reader :propose_account_service - ## - # RPC-specific configuration for `approve_account_service` - # @return [::Gapic::Config::Method] - # - attr_reader :approve_account_service - ## - # RPC-specific configuration for `reject_account_service` - # @return [::Gapic::Config::Method] - # - attr_reader :reject_account_service - - # @private - def initialize parent_rpcs = nil - get_account_service_config = parent_rpcs.get_account_service if parent_rpcs.respond_to? :get_account_service - @get_account_service = ::Gapic::Config::Method.new get_account_service_config - list_account_services_config = parent_rpcs.list_account_services if parent_rpcs.respond_to? :list_account_services - @list_account_services = ::Gapic::Config::Method.new list_account_services_config - propose_account_service_config = parent_rpcs.propose_account_service if parent_rpcs.respond_to? :propose_account_service - @propose_account_service = ::Gapic::Config::Method.new propose_account_service_config - approve_account_service_config = parent_rpcs.approve_account_service if parent_rpcs.respond_to? :approve_account_service - @approve_account_service = ::Gapic::Config::Method.new approve_account_service_config - reject_account_service_config = parent_rpcs.reject_account_service if parent_rpcs.respond_to? :reject_account_service - @reject_account_service = ::Gapic::Config::Method.new reject_account_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub.rb deleted file mode 100644 index f3ea2091c866..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub.rb +++ /dev/null @@ -1,391 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/accountservices_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AccountServicesService - module Rest - ## - # REST service stub for the AccountServicesService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_account_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # A result object deserialized from the server's reply - def get_account_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_account_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_account_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.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_account_services REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse] - # A result object deserialized from the server's reply - def list_account_services request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_account_services_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_account_services", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse.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_account_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # A result object deserialized from the server's reply - def propose_account_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_propose_account_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_account_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.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_account_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # A result object deserialized from the server's reply - def approve_account_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_approve_account_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_account_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.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_account_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 reject_account_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_reject_account_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_account_service", - 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 get_account_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_account_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_account_services REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_account_services_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{parent}/services", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the propose_account_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest] - # 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_account_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{parent}/services:propose", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the approve_account_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest] - # 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_account_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{name}:approve", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the reject_account_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest] - # 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_account_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{name}:reject", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_pb.rb deleted file mode 100644 index 7ea511319ff4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/accountissue.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/shopping/type/types_pb' - - -descriptor_data = "\n7google/shopping/merchant/accounts/v1/accountissue.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xa7\x06\n\x0c\x41\x63\x63ountIssue\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\r\n\x05title\x18\x02 \x01(\t\x12M\n\x08severity\x18\x03 \x01(\x0e\x32;.google.shopping.merchant.accounts.v1.AccountIssue.Severity\x12\x65\n\x15impacted_destinations\x18\x04 \x03(\x0b\x32\x46.google.shopping.merchant.accounts.v1.AccountIssue.ImpactedDestination\x12\x0e\n\x06\x64\x65tail\x18\x05 \x01(\t\x12\x19\n\x11\x64ocumentation_uri\x18\x06 \x01(\t\x1a\xd6\x02\n\x13ImpactedDestination\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x00\x88\x01\x01\x12^\n\x07impacts\x18\x02 \x03(\x0b\x32M.google.shopping.merchant.accounts.v1.AccountIssue.ImpactedDestination.Impact\x1al\n\x06Impact\x12\x13\n\x0bregion_code\x18\x01 \x01(\t\x12M\n\x08severity\x18\x02 \x01(\x0e\x32;.google.shopping.merchant.accounts.v1.AccountIssue.SeverityB\x14\n\x12_reporting_context\"M\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x12\x0e\n\nSUGGESTION\x10\x03:l\xea\x41i\n\'merchantapi.googleapis.com/AccountIssue\x12!accounts/{account}/issues/{issue}*\raccountIssues2\x0c\x61\x63\x63ountIssue\"\xbb\x01\n\x18ListAccountIssuesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\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\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x80\x01\n\x19ListAccountIssuesResponse\x12J\n\x0e\x61\x63\x63ount_issues\x18\x01 \x03(\x0b\x32\x32.google.shopping.merchant.accounts.v1.AccountIssue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xaf\x02\n\x13\x41\x63\x63ountIssueService\x12\xce\x01\n\x11ListAccountIssues\x12>.google.shopping.merchant.accounts.v1.ListAccountIssuesRequest\x1a?.google.shopping.merchant.accounts.v1.ListAccountIssuesResponse\"8\xda\x41\x06parent\x82\xd3\xe4\x93\x02)\x12\'/accounts/v1/{parent=accounts/*}/issues\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x84\x02\n(com.google.shopping.merchant.accounts.v1B\x11\x41\x63\x63ountIssueProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - AccountIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountIssue").msgclass - AccountIssue::ImpactedDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountIssue.ImpactedDestination").msgclass - AccountIssue::ImpactedDestination::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountIssue.ImpactedDestination.Impact").msgclass - AccountIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountIssue.Severity").enummodule - ListAccountIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountIssuesRequest").msgclass - ListAccountIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountIssuesResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_services_pb.rb deleted file mode 100644 index b9b9c0eb0d4b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_services_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/accountissue.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/accountissue_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AccountIssueService - # Service to support `AccountIssueService` API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.AccountIssueService' - - # Lists all account issues of a Merchant Center account. - # - # When called on a multi-client account, this method only returns issues - # belonging to that account, not its sub-accounts. To retrieve issues for - # sub-accounts, you must first call the - # [accounts.listSubaccounts][google.shopping.merchant.accounts.v1.AccountsService.ListSubAccounts] - # method to obtain a list of sub-accounts, and then call - # `accounts.issues.list` for each sub-account individually. - rpc :ListAccountIssues, ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest, ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_pb.rb deleted file mode 100644 index 0b47b6dd46f7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/accountrelationships.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n?google/shopping/merchant/accounts/v1/accountrelationships.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa7\x02\n\x13\x41\x63\x63ountRelationship\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\x08provider\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x88\x01\x01\x12\"\n\x15provider_display_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x61\x63\x63ount_id_alias\x18\x04 \x01(\tB\x03\xe0\x41\x01:\x90\x01\xea\x41\x8c\x01\n.merchantapi.googleapis.com/AccountRelationship\x12/accounts/{account}/relationships/{relationship}*\x14\x61\x63\x63ountRelationships2\x13\x61\x63\x63ountRelationshipB\x0b\n\t_provider\"e\n\x1dGetAccountRelationshipRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.merchantapi.googleapis.com/AccountRelationship\"\xb6\x01\n UpdateAccountRelationshipRequest\x12\\\n\x14\x61\x63\x63ount_relationship\x18\x01 \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1.AccountRelationshipB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x8e\x01\n\x1fListAccountRelationshipsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\"\x95\x01\n ListAccountRelationshipsResponse\x12X\n\x15\x61\x63\x63ount_relationships\x18\x01 \x03(\x0b\x32\x39.google.shopping.merchant.accounts.v1.AccountRelationship\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xd5\x06\n\x1b\x41\x63\x63ountRelationshipsService\x12\xd7\x01\n\x16GetAccountRelationship\x12\x43.google.shopping.merchant.accounts.v1.GetAccountRelationshipRequest\x1a\x39.google.shopping.merchant.accounts.v1.AccountRelationship\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./accounts/v1/{name=accounts/*/relationships/*}\x12\xa5\x02\n\x19UpdateAccountRelationship\x12\x46.google.shopping.merchant.accounts.v1.UpdateAccountRelationshipRequest\x1a\x39.google.shopping.merchant.accounts.v1.AccountRelationship\"\x84\x01\xda\x41 account_relationship,update_mask\x82\xd3\xe4\x93\x02[2C/accounts/v1/{account_relationship.name=accounts/*/relationships/*}:\x14\x61\x63\x63ount_relationship\x12\xea\x01\n\x18ListAccountRelationships\x12\x45.google.shopping.merchant.accounts.v1.ListAccountRelationshipsRequest\x1a\x46.google.shopping.merchant.accounts.v1.ListAccountRelationshipsResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./accounts/v1/{parent=accounts/*}/relationships\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8c\x02\n(com.google.shopping.merchant.accounts.v1B\x19\x41\x63\x63ountRelationshipsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - AccountRelationship = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountRelationship").msgclass - GetAccountRelationshipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAccountRelationshipRequest").msgclass - UpdateAccountRelationshipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateAccountRelationshipRequest").msgclass - ListAccountRelationshipsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountRelationshipsRequest").msgclass - ListAccountRelationshipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountRelationshipsResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_services_pb.rb deleted file mode 100644 index 3ad0f2ad6ef7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_services_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/accountrelationships.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/accountrelationships_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AccountRelationshipsService - # Service to support AccountRelationship API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.AccountRelationshipsService' - - # Retrieve an account relationship. - rpc :GetAccountRelationship, ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest, ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship - # Updates the account relationship. Executing this method requires admin - # access. - rpc :UpdateAccountRelationship, ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest, ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship - # List account relationships for the specified account. - rpc :ListAccountRelationships, ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_pb.rb deleted file mode 100644 index 12098930ce0e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/accounts.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/accounts/v1/accountservices_pb' -require 'google/shopping/merchant/accounts/v1/user_pb' -require 'google/shopping/merchant/accounts/v1/verificationmailsettings_pb' -require 'google/type/datetime_pb' - - -descriptor_data = "\n3google/shopping/merchant/accounts/v1/accounts.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a:google/shopping/merchant/accounts/v1/accountservices.proto\x1a/google/shopping/merchant/accounts/v1/user.proto\x1a\x43google/shopping/merchant/accounts/v1/verificationmailsettings.proto\x1a\x1agoogle/type/datetime.proto\"\xb9\x02\n\x07\x41\x63\x63ount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\naccount_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x61\x63\x63ount_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\radult_content\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x19\n\x0ctest_account\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12-\n\ttime_zone\x18\x06 \x01(\x0b\x32\x15.google.type.TimeZoneB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x07 \x01(\tB\x03\xe0\x41\x02:N\xea\x41K\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}*\x08\x61\x63\x63ounts2\x07\x61\x63\x63ountB\x10\n\x0e_adult_content\"M\n\x11GetAccountRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\"\xfb\t\n CreateAndConfigureAccountRequest\x12\x43\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.AccountB\x03\xe0\x41\x02\x12\x61\n\x04user\x18\x03 \x03(\x0b\x32N.google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest.AddUserB\x03\xe0\x41\x01\x12n\n\x07service\x18\x04 \x03(\x0b\x32X.google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest.AddAccountServiceB\x03\xe0\x41\x02\x12v\n\tset_alias\x18\x05 \x03(\x0b\x32^.google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest.SetAliasForRelationshipB\x03\xe0\x41\x01\x1a\xc7\x01\n\x07\x41\x64\x64User\x12\x14\n\x07user_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12=\n\x04user\x18\x02 \x01(\x0b\x32*.google.shopping.merchant.accounts.v1.UserB\x03\xe0\x41\x01\x12g\n\x1averification_mail_settings\x18\x03 \x01(\x0b\x32>.google.shopping.merchant.accounts.v1.VerificationMailSettingsB\x03\xe0\x41\x01\x1a\xab\x04\n\x11\x41\x64\x64\x41\x63\x63ountService\x12W\n\x13\x61\x63\x63ount_aggregation\x18g \x01(\x0b\x32\x38.google.shopping.merchant.accounts.v1.AccountAggregationH\x00\x12U\n\x12\x61\x63\x63ount_management\x18h \x01(\x0b\x32\x37.google.shopping.merchant.accounts.v1.AccountManagementH\x00\x12W\n\x13\x63omparison_shopping\x18i \x01(\x0b\x32\x38.google.shopping.merchant.accounts.v1.ComparisonShoppingH\x00\x12W\n\x13products_management\x18j \x01(\x0b\x32\x38.google.shopping.merchant.accounts.v1.ProductsManagementH\x00\x12Y\n\x14\x63\x61mpaigns_management\x18k \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1.CampaignsManagementH\x00\x12\x1a\n\x08provider\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12 \n\x13\x65xternal_account_id\x18\x03 \x01(\tB\x03\xe0\x41\x05\x42\x0e\n\x0cservice_typeB\x0b\n\t_provider\x1aO\n\x17SetAliasForRelationship\x12\x15\n\x08provider\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x61\x63\x63ount_id_alias\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x9b\x01\n\x18\x43reateTestAccountRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x43\n\x07\x61\x63\x63ount\x18\x02 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.AccountB\x03\xe0\x41\x02\"d\n\x14\x44\x65leteAccountRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x91\x01\n\x14UpdateAccountRequest\x12\x43\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.AccountB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"[\n\x13ListAccountsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"p\n\x14ListAccountsResponse\x12?\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x87\x01\n\x16ListSubAccountsRequest\x12<\n\x08provider\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"s\n\x17ListSubAccountsResponse\x12?\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x85\x0b\n\x0f\x41\x63\x63ountsService\x12\xa3\x01\n\nGetAccount\x12\x37.google.shopping.merchant.accounts.v1.GetAccountRequest\x1a-.google.shopping.merchant.accounts.v1.Account\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 \x12\x1e/accounts/v1/{name=accounts/*}\x12\xc7\x01\n\x19\x43reateAndConfigureAccount\x12\x46.google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest\x1a-.google.shopping.merchant.accounts.v1.Account\"3\x82\xd3\xe4\x93\x02-\"(/accounts/v1/accounts:createAndConfigure:\x01*\x12\xd8\x01\n\x11\x43reateTestAccount\x12>.google.shopping.merchant.accounts.v1.CreateTestAccountRequest\x1a-.google.shopping.merchant.accounts.v1.Account\"T\xda\x41\x0eparent,account\x82\xd3\xe4\x93\x02=\"2/accounts/v1/{parent=accounts/*}:createTestAccount:\x07\x61\x63\x63ount\x12\x92\x01\n\rDeleteAccount\x12:.google.shopping.merchant.accounts.v1.DeleteAccountRequest\x1a\x16.google.protobuf.Empty\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/accounts/v1/{name=accounts/*}\x12\xc9\x01\n\rUpdateAccount\x12:.google.shopping.merchant.accounts.v1.UpdateAccountRequest\x1a-.google.shopping.merchant.accounts.v1.Account\"M\xda\x41\x13\x61\x63\x63ount,update_mask\x82\xd3\xe4\x93\x02\x31\x32&/accounts/v1/{account.name=accounts/*}:\x07\x61\x63\x63ount\x12\xa4\x01\n\x0cListAccounts\x12\x39.google.shopping.merchant.accounts.v1.ListAccountsRequest\x1a:.google.shopping.merchant.accounts.v1.ListAccountsResponse\"\x1d\x82\xd3\xe4\x93\x02\x17\x12\x15/accounts/v1/accounts\x12\xd5\x01\n\x0fListSubAccounts\x12<.google.shopping.merchant.accounts.v1.ListSubAccountsRequest\x1a=.google.shopping.merchant.accounts.v1.ListSubAccountsResponse\"E\xda\x41\x08provider\x82\xd3\xe4\x93\x02\x34\x12\x32/accounts/v1/{provider=accounts/*}:listSubaccounts\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x80\x02\n(com.google.shopping.merchant.accounts.v1B\rAccountsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Account").msgclass - GetAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAccountRequest").msgclass - CreateAndConfigureAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest").msgclass - CreateAndConfigureAccountRequest::AddUser = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest.AddUser").msgclass - CreateAndConfigureAccountRequest::AddAccountService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest.AddAccountService").msgclass - CreateAndConfigureAccountRequest::SetAliasForRelationship = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest.SetAliasForRelationship").msgclass - CreateTestAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateTestAccountRequest").msgclass - DeleteAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DeleteAccountRequest").msgclass - UpdateAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateAccountRequest").msgclass - ListAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountsRequest").msgclass - ListAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountsResponse").msgclass - ListSubAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListSubAccountsRequest").msgclass - ListSubAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListSubAccountsResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service.rb deleted file mode 100644 index 14dea6438ab6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/accounts_service/credentials" -require "google/shopping/merchant/accounts/v1/accounts_service/paths" -require "google/shopping/merchant/accounts/v1/accounts_service/client" -require "google/shopping/merchant/accounts/v1/accounts_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support Accounts API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/accounts_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/accounts_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new - # - module AccountsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "accounts_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/client.rb deleted file mode 100644 index 388743591b06..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/client.rb +++ /dev/null @@ -1,1119 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/accounts_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AccountsService - ## - # Client for the AccountsService service. - # - # Service to support Accounts API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :accounts_service_stub - - ## - # Configure the AccountsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountsService clients - # ::Google::Shopping::Merchant::Accounts::V1::AccountsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountsService 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::Shopping::Merchant::Accounts::V1::AccountsService::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 - @accounts_service_stub.universe_domain - end - - ## - # Create a new AccountsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountsService 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/shopping/merchant/accounts/v1/accounts_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 - - @accounts_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::AccountsService::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 - ) - - @accounts_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 - @accounts_service_stub.logger - end - - # Service calls - - ## - # Retrieves an account from your Merchant Center account. - # After inserting, updating, or deleting an account, it may take several - # minutes before changes take effect. - # - # @overload get_account(request, options = nil) - # Pass arguments to `get_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_account(name: nil) - # Pass arguments to `get_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the account to retrieve. - # Format: `accounts/{account}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new - # - # # Call the get_account method. - # result = client.get_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. - # p result - # - def get_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :get_account, request, 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 Merchant Center account with additional configuration. Adds the - # user that makes the request as an admin for the new account. - # - # @overload create_and_configure_account(request, options = nil) - # Pass arguments to `create_and_configure_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_and_configure_account(account: nil, user: nil, service: nil, set_alias: nil) - # Pass arguments to `create_and_configure_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash] - # Required. The account to be created. - # @param user [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddUser, ::Hash>] - # Optional. Users to be added to the account. - # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>] - # Required. An account service between the account to be created and the - # provider account is initialized as part of the creation. At least one such - # service needs to be provided. Currently exactly one of these needs to be - # `account_aggregation` and `accounts.createAndConfigure` method can be - # used to create a sub-account under an existing advanced account through - # this method. Additional `account_management` or - # `products_management` services may be provided. - # @param set_alias [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::SetAliasForRelationship, ::Hash>] - # Optional. If a relationship is created with a provider, you can set an - # alias for it with this field. The calling user must be an admin on the - # provider to be able to set an alias. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new - # - # # Call the create_and_configure_account method. - # result = client.create_and_configure_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. - # p result - # - def create_and_configure_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest - - # Converts hash and nil to 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_and_configure_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::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.create_and_configure_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_and_configure_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :create_and_configure_account, request, 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 Merchant Center test account. - # - # Test accounts are intended for development and testing purposes, such as - # validating API integrations or new feature behavior. - # - # Key characteristics and limitations of test accounts: - # - Immutable Type: A test account cannot be converted into a regular - # (live) Merchant Center account. Likewise, a regular account cannot be - # converted into a test account. - # - Non-Serving Products: Any products, offers, or data created within a - # test account will not be published or made visible to end-users on any - # Google surfaces. They are strictly for testing environments. - # - Separate Environment: Test accounts operate in a sandbox-like manner, - # isolated from live serving and real user traffic. - # - # @overload create_test_account(request, options = nil) - # Pass arguments to `create_test_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_test_account(parent: nil, account: nil) - # Pass arguments to `create_test_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account resource name to create the test account under. - # Format: accounts/\\{account} - # @param account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash] - # Required. The account to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest.new - # - # # Call the create_test_account method. - # result = client.create_test_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. - # p result - # - def create_test_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest - - # Converts hash and nil to 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_test_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_test_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_test_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :create_test_account, request, 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 account regardless of its type: standalone, advanced - # account or sub-account. Deleting an advanced account leads to the deletion - # of all of its sub-accounts. This also deletes the account's [developer - # registration - # entity](/merchant/api/reference/rest/accounts_v1/accounts.developerRegistration) - # and any associated GCP project to the account. Executing this method - # requires admin access. The deletion succeeds only if the account does not - # provide services to any other account and has no processed offers. You can - # use the `force` parameter to override this. - # - # @overload delete_account(request, options = nil) - # Pass arguments to `delete_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_account(name: nil, force: nil) - # Pass arguments to `delete_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the account to delete. - # Format: `accounts/{account}` - # @param force [::Boolean] - # Optional. If set to `true`, the account is deleted even if it provides - # services to other accounts or has processed offers. - # - # @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/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new - # - # # Call the delete_account method. - # result = client.delete_account request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :delete_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an account regardless of its type: standalone, advanced account or - # sub-account. Executing this method requires admin access. - # - # @overload update_account(request, options = nil) - # Pass arguments to `update_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_account(account: nil, update_mask: nil) - # Pass arguments to `update_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash] - # Required. The new version of the account. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `account_name` - # - `adult_content` - # - `language_code` - # - `time_zone` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new - # - # # Call the update_account method. - # result = client.update_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. - # p result - # - def update_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest - - # Converts hash and nil to 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_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.account&.name - header_params["account.name"] = request.account.name - end - - request_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_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :update_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Note: For the `accounts.list` method, quota and limits usage are charged - # for each user, and not for the Merchant Center ID or the advanced account - # ID. To list several sub-accounts, you should use the - # `accounts.listSubaccounts` method, which is more suitable for advanced - # accounts use case. - # - # @overload list_accounts(request, options = nil) - # Pass arguments to `list_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_accounts(page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `accounts.list` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided in the `accounts.list` - # request must match the call that provided the page token. - # @param filter [::String] - # Optional. Returns only accounts that match the - # [filter](https://developers.google.com/merchant/api/guides/accounts/filter). - # For more details, see the - # [filter syntax - # reference](https://developers.google.com/merchant/api/guides/accounts/filter-syntax). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new - # - # # Call the list_accounts method. - # result = client.list_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Account. - # p item - # end - # - def list_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::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_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :list_accounts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_accounts, 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 all sub-accounts for a given advanced account. This is a - # convenience wrapper for the more powerful `accounts.list` method. This - # method will produce the same results as calling `ListsAccounts` with the - # following filter: - # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` - # - # @overload list_sub_accounts(request, options = nil) - # Pass arguments to `list_sub_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_sub_accounts(provider: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_sub_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param provider [::String] - # Required. The aggregation service provider. - # Format: `accounts/{accountId}` - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `accounts.list` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided in the `accounts.list` - # request must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new - # - # # Call the list_sub_accounts method. - # result = client.list_sub_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Account. - # p item - # end - # - def list_sub_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_sub_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.provider - header_params["provider"] = request.provider - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_sub_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_sub_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :list_sub_accounts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, 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 AccountsService API. - # - # This class represents the configuration for AccountsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_account to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::AccountsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account - ## - # RPC-specific configuration for `create_and_configure_account` - # @return [::Gapic::Config::Method] - # - attr_reader :create_and_configure_account - ## - # RPC-specific configuration for `create_test_account` - # @return [::Gapic::Config::Method] - # - attr_reader :create_test_account - ## - # RPC-specific configuration for `delete_account` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_account - ## - # RPC-specific configuration for `update_account` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account - ## - # RPC-specific configuration for `list_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_accounts - ## - # RPC-specific configuration for `list_sub_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sub_accounts - - # @private - def initialize parent_rpcs = nil - get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account - @get_account = ::Gapic::Config::Method.new get_account_config - create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account - @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config - create_test_account_config = parent_rpcs.create_test_account if parent_rpcs.respond_to? :create_test_account - @create_test_account = ::Gapic::Config::Method.new create_test_account_config - delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account - @delete_account = ::Gapic::Config::Method.new delete_account_config - update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account - @update_account = ::Gapic::Config::Method.new update_account_config - list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts - @list_accounts = ::Gapic::Config::Method.new list_accounts_config - list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts - @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/credentials.rb deleted file mode 100644 index c8ec3ff6d0a0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_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 Shopping - module Merchant - module Accounts - module V1 - module AccountsService - # Credentials for the AccountsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/paths.rb deleted file mode 100644 index 7b812673e211..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_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 Shopping - module Merchant - module Accounts - module V1 - module AccountsService - # Path helper methods for the AccountsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified User resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/users/{email}` - # - # @param account [String] - # @param email [String] - # - # @return [::String] - def user_path account:, email: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/users/#{email}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest.rb deleted file mode 100644 index 972c9397b83c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/accounts_service/credentials" -require "google/shopping/merchant/accounts/v1/accounts_service/paths" -require "google/shopping/merchant/accounts/v1/accounts_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support Accounts API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/accounts_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new - # - module AccountsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/client.rb deleted file mode 100644 index 5084ce21d777..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/client.rb +++ /dev/null @@ -1,1043 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/accounts_pb" -require "google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AccountsService - module Rest - ## - # REST client for the AccountsService service. - # - # Service to support Accounts API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :accounts_service_stub - - ## - # Configure the AccountsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountsService clients - # ::Google::Shopping::Merchant::Accounts::V1::AccountsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountsService 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::Shopping::Merchant::Accounts::V1::AccountsService::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 - @accounts_service_stub.universe_domain - end - - ## - # Create a new AccountsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountsService 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 - - @accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @accounts_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 - @accounts_service_stub.logger - end - - # Service calls - - ## - # Retrieves an account from your Merchant Center account. - # After inserting, updating, or deleting an account, it may take several - # minutes before changes take effect. - # - # @overload get_account(request, options = nil) - # Pass arguments to `get_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_account(name: nil) - # Pass arguments to `get_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the account to retrieve. - # Format: `accounts/{account}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new - # - # # Call the get_account method. - # result = client.get_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. - # p result - # - def get_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.get_account request, 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 Merchant Center account with additional configuration. Adds the - # user that makes the request as an admin for the new account. - # - # @overload create_and_configure_account(request, options = nil) - # Pass arguments to `create_and_configure_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_and_configure_account(account: nil, user: nil, service: nil, set_alias: nil) - # Pass arguments to `create_and_configure_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash] - # Required. The account to be created. - # @param user [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddUser, ::Hash>] - # Optional. Users to be added to the account. - # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>] - # Required. An account service between the account to be created and the - # provider account is initialized as part of the creation. At least one such - # service needs to be provided. Currently exactly one of these needs to be - # `account_aggregation` and `accounts.createAndConfigure` method can be - # used to create a sub-account under an existing advanced account through - # this method. Additional `account_management` or - # `products_management` services may be provided. - # @param set_alias [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::SetAliasForRelationship, ::Hash>] - # Optional. If a relationship is created with a provider, you can set an - # alias for it with this field. The calling user must be an admin on the - # provider to be able to set an alias. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new - # - # # Call the create_and_configure_account method. - # result = client.create_and_configure_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. - # p result - # - def create_and_configure_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest - - # Converts hash and nil to an 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_and_configure_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_and_configure_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_and_configure_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.create_and_configure_account request, 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 Merchant Center test account. - # - # Test accounts are intended for development and testing purposes, such as - # validating API integrations or new feature behavior. - # - # Key characteristics and limitations of test accounts: - # - Immutable Type: A test account cannot be converted into a regular - # (live) Merchant Center account. Likewise, a regular account cannot be - # converted into a test account. - # - Non-Serving Products: Any products, offers, or data created within a - # test account will not be published or made visible to end-users on any - # Google surfaces. They are strictly for testing environments. - # - Separate Environment: Test accounts operate in a sandbox-like manner, - # isolated from live serving and real user traffic. - # - # @overload create_test_account(request, options = nil) - # Pass arguments to `create_test_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_test_account(parent: nil, account: nil) - # Pass arguments to `create_test_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account resource name to create the test account under. - # Format: accounts/\\{account} - # @param account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash] - # Required. The account to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest.new - # - # # Call the create_test_account method. - # result = client.create_test_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. - # p result - # - def create_test_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest - - # Converts hash and nil to an 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_test_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_test_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_test_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.create_test_account request, 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 account regardless of its type: standalone, advanced - # account or sub-account. Deleting an advanced account leads to the deletion - # of all of its sub-accounts. This also deletes the account's [developer - # registration - # entity](/merchant/api/reference/rest/accounts_v1/accounts.developerRegistration) - # and any associated GCP project to the account. Executing this method - # requires admin access. The deletion succeeds only if the account does not - # provide services to any other account and has no processed offers. You can - # use the `force` parameter to override this. - # - # @overload delete_account(request, options = nil) - # Pass arguments to `delete_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_account(name: nil, force: nil) - # Pass arguments to `delete_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the account to delete. - # Format: `accounts/{account}` - # @param force [::Boolean] - # Optional. If set to `true`, the account is deleted even if it provides - # services to other accounts or has processed offers. - # @yield [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/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new - # - # # Call the delete_account method. - # result = client.delete_account request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.delete_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an account regardless of its type: standalone, advanced account or - # sub-account. Executing this method requires admin access. - # - # @overload update_account(request, options = nil) - # Pass arguments to `update_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_account(account: nil, update_mask: nil) - # Pass arguments to `update_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash] - # Required. The new version of the account. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `account_name` - # - `adult_content` - # - `language_code` - # - `time_zone` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new - # - # # Call the update_account method. - # result = client.update_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. - # p result - # - def update_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest - - # Converts hash and nil to an 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_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.update_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Note: For the `accounts.list` method, quota and limits usage are charged - # for each user, and not for the Merchant Center ID or the advanced account - # ID. To list several sub-accounts, you should use the - # `accounts.listSubaccounts` method, which is more suitable for advanced - # accounts use case. - # - # @overload list_accounts(request, options = nil) - # Pass arguments to `list_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_accounts(page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `accounts.list` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided in the `accounts.list` - # request must match the call that provided the page token. - # @param filter [::String] - # Optional. Returns only accounts that match the - # [filter](https://developers.google.com/merchant/api/guides/accounts/filter). - # For more details, see the - # [filter syntax - # reference](https://developers.google.com/merchant/api/guides/accounts/filter-syntax). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new - # - # # Call the list_accounts method. - # result = client.list_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Account. - # p item - # end - # - def list_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.list_accounts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_accounts, "accounts", request, result, 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 all sub-accounts for a given advanced account. This is a - # convenience wrapper for the more powerful `accounts.list` method. This - # method will produce the same results as calling `ListsAccounts` with the - # following filter: - # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` - # - # @overload list_sub_accounts(request, options = nil) - # Pass arguments to `list_sub_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_sub_accounts(provider: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_sub_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param provider [::String] - # Required. The aggregation service provider. - # Format: `accounts/{accountId}` - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `accounts.list` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided in the `accounts.list` - # request must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new - # - # # Call the list_sub_accounts method. - # result = client.list_sub_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Account. - # p item - # end - # - def list_sub_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_sub_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_sub_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_sub_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.list_sub_accounts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, "accounts", request, result, 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 AccountsService REST API. - # - # This class represents the configuration for AccountsService 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::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_account to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account - ## - # RPC-specific configuration for `create_and_configure_account` - # @return [::Gapic::Config::Method] - # - attr_reader :create_and_configure_account - ## - # RPC-specific configuration for `create_test_account` - # @return [::Gapic::Config::Method] - # - attr_reader :create_test_account - ## - # RPC-specific configuration for `delete_account` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_account - ## - # RPC-specific configuration for `update_account` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account - ## - # RPC-specific configuration for `list_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_accounts - ## - # RPC-specific configuration for `list_sub_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sub_accounts - - # @private - def initialize parent_rpcs = nil - get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account - @get_account = ::Gapic::Config::Method.new get_account_config - create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account - @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config - create_test_account_config = parent_rpcs.create_test_account if parent_rpcs.respond_to? :create_test_account - @create_test_account = ::Gapic::Config::Method.new create_test_account_config - delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account - @delete_account = ::Gapic::Config::Method.new delete_account_config - update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account - @update_account = ::Gapic::Config::Method.new update_account_config - list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts - @list_accounts = ::Gapic::Config::Method.new list_accounts_config - list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts - @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub.rb deleted file mode 100644 index 95cd6be45b12..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub.rb +++ /dev/null @@ -1,509 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/accounts_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AccountsService - module Rest - ## - # REST service stub for the AccountsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Account] - # A result object deserialized from the server's reply - def get_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::Account.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_and_configure_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Account] - # A result object deserialized from the server's reply - def create_and_configure_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_and_configure_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_and_configure_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::Account.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_test_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Account] - # A result object deserialized from the server's reply - def create_test_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_test_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_test_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::Account.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_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_account", - 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 update_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Account] - # A result object deserialized from the server's reply - def update_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::Account.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_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse] - # A result object deserialized from the server's reply - def list_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_accounts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse.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_sub_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse] - # A result object deserialized from the server's reply - def list_sub_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_sub_accounts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_sub_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_and_configure_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest] - # 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_and_configure_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/accounts:createAndConfigure", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_test_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest] - # 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_test_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{parent}:createTestAccount", - body: "account", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest] - # 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_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1/{account.name}", - body: "account", - matches: [ - ["account.name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/accounts", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_sub_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_sub_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{provider}:listSubaccounts", - matches: [ - ["provider", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_services_pb.rb deleted file mode 100644 index 2be0d4a8d89f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_services_pb.rb +++ /dev/null @@ -1,92 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/accounts.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/accounts_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AccountsService - # Service to support Accounts API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.AccountsService' - - # Retrieves an account from your Merchant Center account. - # After inserting, updating, or deleting an account, it may take several - # minutes before changes take effect. - rpc :GetAccount, ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest, ::Google::Shopping::Merchant::Accounts::V1::Account - # Creates a Merchant Center account with additional configuration. Adds the - # user that makes the request as an admin for the new account. - rpc :CreateAndConfigureAccount, ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest, ::Google::Shopping::Merchant::Accounts::V1::Account - # Creates a Merchant Center test account. - # - # Test accounts are intended for development and testing purposes, such as - # validating API integrations or new feature behavior. - # - # Key characteristics and limitations of test accounts: - # - Immutable Type: A test account cannot be converted into a regular - # (live) Merchant Center account. Likewise, a regular account cannot be - # converted into a test account. - # - Non-Serving Products: Any products, offers, or data created within a - # test account will not be published or made visible to end-users on any - # Google surfaces. They are strictly for testing environments. - # - Separate Environment: Test accounts operate in a sandbox-like manner, - # isolated from live serving and real user traffic. - rpc :CreateTestAccount, ::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest, ::Google::Shopping::Merchant::Accounts::V1::Account - # Deletes the specified account regardless of its type: standalone, advanced - # account or sub-account. Deleting an advanced account leads to the deletion - # of all of its sub-accounts. This also deletes the account's [developer - # registration - # entity](/merchant/api/reference/rest/accounts_v1/accounts.developerRegistration) - # and any associated GCP project to the account. Executing this method - # requires admin access. The deletion succeeds only if the account does not - # provide services to any other account and has no processed offers. You can - # use the `force` parameter to override this. - rpc :DeleteAccount, ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest, ::Google::Protobuf::Empty - # Updates an account regardless of its type: standalone, advanced account or - # sub-account. Executing this method requires admin access. - rpc :UpdateAccount, ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest, ::Google::Shopping::Merchant::Accounts::V1::Account - # Note: For the `accounts.list` method, quota and limits usage are charged - # for each user, and not for the Merchant Center ID or the advanced account - # ID. To list several sub-accounts, you should use the - # `accounts.listSubaccounts` method, which is more suitable for advanced - # accounts use case. - rpc :ListAccounts, ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse - # List all sub-accounts for a given advanced account. This is a - # convenience wrapper for the more powerful `accounts.list` method. This - # method will produce the same results as calling `ListsAccounts` with the - # following filter: - # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` - rpc :ListSubAccounts, ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_pb.rb deleted file mode 100644 index 5ce86e7a0b0d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/accountservices.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n:google/shopping/merchant/accounts/v1/accountservices.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xa2\x08\n\x0e\x41\x63\x63ountService\x12W\n\x13products_management\x18\x64 \x01(\x0b\x32\x38.google.shopping.merchant.accounts.v1.ProductsManagementH\x00\x12Y\n\x14\x63\x61mpaigns_management\x18\x65 \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1.CampaignsManagementH\x00\x12U\n\x12\x61\x63\x63ount_management\x18\x66 \x01(\x0b\x32\x37.google.shopping.merchant.accounts.v1.AccountManagementH\x00\x12W\n\x13\x61\x63\x63ount_aggregation\x18g \x01(\x0b\x32\x38.google.shopping.merchant.accounts.v1.AccountAggregationH\x00\x12`\n\x18local_listing_management\x18h \x01(\x0b\x32<.google.shopping.merchant.accounts.v1.LocalListingManagementH\x00\x12W\n\x13\x63omparison_shopping\x18i \x01(\x0b\x32\x38.google.shopping.merchant.accounts.v1.ComparisonShoppingH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\x08provider\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\"\n\x15provider_display_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12G\n\thandshake\x18\x04 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1.HandshakeB\x03\xe0\x41\x03\x12X\n\nmutability\x18\x05 \x01(\x0e\x32?.google.shopping.merchant.accounts.v1.AccountService.MutabilityB\x03\xe0\x41\x03\x12 \n\x13\x65xternal_account_id\x18\x06 \x01(\tB\x03\xe0\x41\x05\"D\n\nMutability\x12\x1a\n\x16MUTABILITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07MUTABLE\x10\x01\x12\r\n\tIMMUTABLE\x10\x02:v\xea\x41s\n)merchantapi.googleapis.com/AccountService\x12%accounts/{account}/services/{service}*\x0f\x61\x63\x63ountServices2\x0e\x61\x63\x63ountServiceB\x0e\n\x0cservice_typeB\x0b\n\t_provider\"[\n\x18GetAccountServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/AccountService\"\x89\x01\n\x1aListAccountServicesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\"\x86\x01\n\x1bListAccountServicesResponse\x12N\n\x10\x61\x63\x63ount_services\x18\x01 \x03(\x0b\x32\x34.google.shopping.merchant.accounts.v1.AccountService\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc5\x01\n\x1cProposeAccountServiceRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x15\n\x08provider\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x0f\x61\x63\x63ount_service\x18\x04 \x01(\x0b\x32\x34.google.shopping.merchant.accounts.v1.AccountServiceB\x03\xe0\x41\x02\"_\n\x1c\x41pproveAccountServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/AccountService\"^\n\x1bRejectAccountServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/AccountService\"\x14\n\x12ProductsManagement\"\x15\n\x13\x43\x61mpaignsManagement\"\x13\n\x11\x41\x63\x63ountManagement\"\x14\n\x12\x41\x63\x63ountAggregation\"\x18\n\x16LocalListingManagement\"\x14\n\x12\x43omparisonShopping\"\xcd\x02\n\tHandshake\x12Z\n\x0e\x61pproval_state\x18\x01 \x01(\x0e\x32=.google.shopping.merchant.accounts.v1.Handshake.ApprovalStateB\x03\xe0\x41\x03\x12I\n\x05\x61\x63tor\x18\x02 \x01(\x0e\x32\x35.google.shopping.merchant.accounts.v1.Handshake.ActorB\x03\xe0\x41\x03\"[\n\rApprovalState\x12\x1e\n\x1a\x41PPROVAL_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0f\n\x0b\x45STABLISHED\x10\x02\x12\x0c\n\x08REJECTED\x10\x03\"<\n\x05\x41\x63tor\x12\x15\n\x11\x41\x43TOR_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41\x43\x43OUNT\x10\x01\x12\x0f\n\x0bOTHER_PARTY\x10\x02\x32\x85\t\n\x16\x41\x63\x63ountServicesService\x12\xc3\x01\n\x11GetAccountService\x12>.google.shopping.merchant.accounts.v1.GetAccountServiceRequest\x1a\x34.google.shopping.merchant.accounts.v1.AccountService\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/accounts/v1/{name=accounts/*/services/*}\x12\xd6\x01\n\x13ListAccountServices\x12@.google.shopping.merchant.accounts.v1.ListAccountServicesRequest\x1a\x41.google.shopping.merchant.accounts.v1.ListAccountServicesResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/accounts/v1/{parent=accounts/*}/services\x12\xf1\x01\n\x15ProposeAccountService\x12\x42.google.shopping.merchant.accounts.v1.ProposeAccountServiceRequest\x1a\x34.google.shopping.merchant.accounts.v1.AccountService\"^\xda\x41\x1fparent,provider,account_service\x82\xd3\xe4\x93\x02\x36\"1/accounts/v1/{parent=accounts/*}/services:propose:\x01*\x12\xd6\x01\n\x15\x41pproveAccountService\x12\x42.google.shopping.merchant.accounts.v1.ApproveAccountServiceRequest\x1a\x34.google.shopping.merchant.accounts.v1.AccountService\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/accounts/v1/{name=accounts/*/services/*}:approve:\x01*\x12\xb5\x01\n\x14RejectAccountService\x12\x41.google.shopping.merchant.accounts.v1.RejectAccountServiceRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\"0/accounts/v1/{name=accounts/*/services/*}:reject:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x87\x02\n(com.google.shopping.merchant.accounts.v1B\x14\x41\x63\x63ountServicesProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - AccountService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountService").msgclass - AccountService::Mutability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountService.Mutability").enummodule - GetAccountServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAccountServiceRequest").msgclass - ListAccountServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountServicesRequest").msgclass - ListAccountServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountServicesResponse").msgclass - ProposeAccountServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ProposeAccountServiceRequest").msgclass - ApproveAccountServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ApproveAccountServiceRequest").msgclass - RejectAccountServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.RejectAccountServiceRequest").msgclass - ProductsManagement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ProductsManagement").msgclass - CampaignsManagement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CampaignsManagement").msgclass - AccountManagement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountManagement").msgclass - AccountAggregation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountAggregation").msgclass - LocalListingManagement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LocalListingManagement").msgclass - ComparisonShopping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ComparisonShopping").msgclass - Handshake = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Handshake").msgclass - Handshake::ApprovalState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Handshake.ApprovalState").enummodule - Handshake::Actor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Handshake.Actor").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_services_pb.rb deleted file mode 100644 index 20f36bddf4c9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_services_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/accountservices.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/accountservices_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AccountServicesService - # Service to support AccountService API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.AccountServicesService' - - # Retrieve an account service. - rpc :GetAccountService, ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::AccountService - # List account services for the specified accounts. Supports filtering. - rpc :ListAccountServices, ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest, ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse - # Propose an account service. - rpc :ProposeAccountService, ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::AccountService - # Approve an account service proposal. - rpc :ApproveAccountService, ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::AccountService - # Reject an account service (both proposed and approve services can be - # rejected). - rpc :RejectAccountService, ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service.rb deleted file mode 100644 index 7ef491076577..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials" -require "google/shopping/merchant/accounts/v1/autofeed_settings_service/paths" -require "google/shopping/merchant/accounts/v1/autofeed_settings_service/client" -require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/autofeed_settings_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new - # - module AutofeedSettingsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "autofeed_settings_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/autofeed_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/client.rb deleted file mode 100644 index 6c4691ab4695..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/client.rb +++ /dev/null @@ -1,577 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/autofeedsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AutofeedSettingsService - ## - # Client for the AutofeedSettingsService service. - # - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :autofeed_settings_service_stub - - ## - # Configure the AutofeedSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutofeedSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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 - @autofeed_settings_service_stub.universe_domain - end - - ## - # Create a new AutofeedSettingsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutofeedSettingsService 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/shopping/merchant/accounts/v1/autofeedsettings_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 - - @autofeed_settings_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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 - ) - - @autofeed_settings_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 - @autofeed_settings_service_stub.logger - end - - # Service calls - - ## - # Retrieves the autofeed settings of an account. - # - # @overload get_autofeed_settings(request, options = nil) - # Pass arguments to `get_autofeed_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_autofeed_settings(name: nil) - # Pass arguments to `get_autofeed_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the autofeed settings. - # Format: `accounts/{account}/autofeedSettings` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new - # - # # Call the get_autofeed_settings method. - # result = client.get_autofeed_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. - # p result - # - def get_autofeed_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_autofeed_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_autofeed_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_autofeed_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @autofeed_settings_service_stub.call_rpc :get_autofeed_settings, request, 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 autofeed settings of an account. - # - # @overload update_autofeed_settings(request, options = nil) - # Pass arguments to `update_autofeed_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_autofeed_settings(autofeed_settings: nil, update_mask: nil) - # Pass arguments to `update_autofeed_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param autofeed_settings [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings, ::Hash] - # Required. The new version of the autofeed setting. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new - # - # # Call the update_autofeed_settings method. - # result = client.update_autofeed_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. - # p result - # - def update_autofeed_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest - - # Converts hash and nil to 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_autofeed_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.autofeed_settings&.name - header_params["autofeed_settings.name"] = request.autofeed_settings.name - end - - request_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_autofeed_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_autofeed_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @autofeed_settings_service_stub.call_rpc :update_autofeed_settings, request, 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 AutofeedSettingsService API. - # - # This class represents the configuration for AutofeedSettingsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_autofeed_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_autofeed_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_autofeed_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AutofeedSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_autofeed_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_autofeed_settings - ## - # RPC-specific configuration for `update_autofeed_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_autofeed_settings - - # @private - def initialize parent_rpcs = nil - get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings - @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config - update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings - @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials.rb deleted file mode 100644 index 2d1ff39c0d60..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_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 Shopping - module Merchant - module Accounts - module V1 - module AutofeedSettingsService - # Credentials for the AutofeedSettingsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/paths.rb deleted file mode 100644 index a83da4cff7a4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/paths.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 Shopping - module Merchant - module Accounts - module V1 - module AutofeedSettingsService - # Path helper methods for the AutofeedSettingsService API. - module Paths - ## - # Create a fully-qualified AutofeedSettings resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/autofeedSettings` - # - # @param account [String] - # - # @return [::String] - def autofeed_settings_path account: - "accounts/#{account}/autofeedSettings" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest.rb deleted file mode 100644 index daf710746084..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials" -require "google/shopping/merchant/accounts/v1/autofeed_settings_service/paths" -require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new - # - module AutofeedSettingsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client.rb deleted file mode 100644 index 15a8f28da8b0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client.rb +++ /dev/null @@ -1,520 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/autofeedsettings_pb" -require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AutofeedSettingsService - module Rest - ## - # REST client for the AutofeedSettingsService service. - # - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :autofeed_settings_service_stub - - ## - # Configure the AutofeedSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutofeedSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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 - @autofeed_settings_service_stub.universe_domain - end - - ## - # Create a new AutofeedSettingsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutofeedSettingsService 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 - - @autofeed_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @autofeed_settings_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 - @autofeed_settings_service_stub.logger - end - - # Service calls - - ## - # Retrieves the autofeed settings of an account. - # - # @overload get_autofeed_settings(request, options = nil) - # Pass arguments to `get_autofeed_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_autofeed_settings(name: nil) - # Pass arguments to `get_autofeed_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the autofeed settings. - # Format: `accounts/{account}/autofeedSettings` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new - # - # # Call the get_autofeed_settings method. - # result = client.get_autofeed_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. - # p result - # - def get_autofeed_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_autofeed_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_autofeed_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_autofeed_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @autofeed_settings_service_stub.get_autofeed_settings request, 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 autofeed settings of an account. - # - # @overload update_autofeed_settings(request, options = nil) - # Pass arguments to `update_autofeed_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_autofeed_settings(autofeed_settings: nil, update_mask: nil) - # Pass arguments to `update_autofeed_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param autofeed_settings [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings, ::Hash] - # Required. The new version of the autofeed setting. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new - # - # # Call the update_autofeed_settings method. - # result = client.update_autofeed_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. - # p result - # - def update_autofeed_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest - - # Converts hash and nil to an 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_autofeed_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_autofeed_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_autofeed_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @autofeed_settings_service_stub.update_autofeed_settings request, 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 AutofeedSettingsService REST API. - # - # This class represents the configuration for AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_autofeed_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_autofeed_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_autofeed_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AutofeedSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_autofeed_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_autofeed_settings - ## - # RPC-specific configuration for `update_autofeed_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_autofeed_settings - - # @private - def initialize parent_rpcs = nil - get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings - @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config - update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings - @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub.rb deleted file mode 100644 index 01a2e1b90097..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/autofeedsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AutofeedSettingsService - module Rest - ## - # REST service stub for the AutofeedSettingsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_autofeed_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] - # A result object deserialized from the server's reply - def get_autofeed_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_autofeed_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_autofeed_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.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_autofeed_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] - # A result object deserialized from the server's reply - def update_autofeed_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_autofeed_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_autofeed_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_autofeed_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_autofeed_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/autofeedSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_autofeed_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest] - # 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_autofeed_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1/{autofeed_settings.name}", - body: "autofeed_settings", - matches: [ - ["autofeed_settings.name", %r{^accounts/[^/]+/autofeedSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_pb.rb deleted file mode 100644 index 43e4343c0b3b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/autofeedsettings.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n;google/shopping/merchant/accounts/v1/autofeedsettings.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xd5\x01\n\x10\x41utofeedSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0f\x65nable_products\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02\x12\x15\n\x08\x65ligible\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03:y\xea\x41v\n+merchantapi.googleapis.com/AutofeedSettings\x12#accounts/{account}/autofeedSettings*\x10\x61utofeedSettings2\x10\x61utofeedSettings\"_\n\x1aGetAutofeedSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/AutofeedSettings\"\xad\x01\n\x1dUpdateAutofeedSettingsRequest\x12V\n\x11\x61utofeed_settings\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.AutofeedSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xca\x04\n\x17\x41utofeedSettingsService\x12\xcf\x01\n\x13GetAutofeedSettings\x12@.google.shopping.merchant.accounts.v1.GetAutofeedSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.AutofeedSettings\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1/{name=accounts/*/autofeedSettings}\x12\x93\x02\n\x16UpdateAutofeedSettings\x12\x43.google.shopping.merchant.accounts.v1.UpdateAutofeedSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.AutofeedSettings\"|\xda\x41\x1d\x61utofeed_settings,update_mask\x82\xd3\xe4\x93\x02V2A/accounts/v1/{autofeed_settings.name=accounts/*/autofeedSettings}:\x11\x61utofeed_settings\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x88\x02\n(com.google.shopping.merchant.accounts.v1B\x15\x41utofeedSettingsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - AutofeedSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutofeedSettings").msgclass - GetAutofeedSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAutofeedSettingsRequest").msgclass - UpdateAutofeedSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateAutofeedSettingsRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_services_pb.rb deleted file mode 100644 index 0ab395d19681..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/autofeedsettings.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/autofeedsettings_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AutofeedSettingsService - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.AutofeedSettingsService' - - # Retrieves the autofeed settings of an account. - rpc :GetAutofeedSettings, ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings - # Updates the autofeed settings of an account. - rpc :UpdateAutofeedSettings, ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service.rb deleted file mode 100644 index 4ba082f3e4bc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials" -require "google/shopping/merchant/accounts/v1/automatic_improvements_service/paths" -require "google/shopping/merchant/accounts/v1/automatic_improvements_service/client" -require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/automatic_improvements_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new - # - module AutomaticImprovementsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "automatic_improvements_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/automatic_improvements_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/client.rb deleted file mode 100644 index 6bcfb8b76430..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/client.rb +++ /dev/null @@ -1,587 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/automaticimprovements_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AutomaticImprovementsService - ## - # Client for the AutomaticImprovementsService service. - # - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :automatic_improvements_service_stub - - ## - # Configure the AutomaticImprovementsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutomaticImprovementsService clients - # ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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 - @automatic_improvements_service_stub.universe_domain - end - - ## - # Create a new AutomaticImprovementsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutomaticImprovementsService 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/shopping/merchant/accounts/v1/automaticimprovements_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 - - @automatic_improvements_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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 - ) - - @automatic_improvements_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 - @automatic_improvements_service_stub.logger - end - - # Service calls - - ## - # Retrieves the automatic improvements of an account. - # - # @overload get_automatic_improvements(request, options = nil) - # Pass arguments to `get_automatic_improvements` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_automatic_improvements(name: nil) - # Pass arguments to `get_automatic_improvements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the automatic improvements. - # Format: `accounts/{account}/automaticImprovements` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new - # - # # Call the get_automatic_improvements method. - # result = client.get_automatic_improvements request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. - # p result - # - def get_automatic_improvements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_automatic_improvements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_automatic_improvements.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_automatic_improvements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @automatic_improvements_service_stub.call_rpc :get_automatic_improvements, request, 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 automatic improvements of an account. - # - # @overload update_automatic_improvements(request, options = nil) - # Pass arguments to `update_automatic_improvements` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_automatic_improvements(automatic_improvements: nil, update_mask: nil) - # Pass arguments to `update_automatic_improvements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param automatic_improvements [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements, ::Hash] - # Required. The new version of the automatic imrovements. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `item_updates` - # - `item_updates.account_level_settings` - # - `image_improvements` - # - `image_improvements.account_level_settings` - # - `shipping_improvements` - # - `shipping_improvements.allow_shipping_improvements` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new - # - # # Call the update_automatic_improvements method. - # result = client.update_automatic_improvements request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. - # p result - # - def update_automatic_improvements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest - - # Converts hash and nil to 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_automatic_improvements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.automatic_improvements&.name - header_params["automatic_improvements.name"] = request.automatic_improvements.name - end - - request_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_automatic_improvements.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_automatic_improvements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @automatic_improvements_service_stub.call_rpc :update_automatic_improvements, request, 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 AutomaticImprovementsService API. - # - # This class represents the configuration for AutomaticImprovementsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_automatic_improvements to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_automatic_improvements.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_automatic_improvements.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AutomaticImprovementsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_automatic_improvements` - # @return [::Gapic::Config::Method] - # - attr_reader :get_automatic_improvements - ## - # RPC-specific configuration for `update_automatic_improvements` - # @return [::Gapic::Config::Method] - # - attr_reader :update_automatic_improvements - - # @private - def initialize parent_rpcs = nil - get_automatic_improvements_config = parent_rpcs.get_automatic_improvements if parent_rpcs.respond_to? :get_automatic_improvements - @get_automatic_improvements = ::Gapic::Config::Method.new get_automatic_improvements_config - update_automatic_improvements_config = parent_rpcs.update_automatic_improvements if parent_rpcs.respond_to? :update_automatic_improvements - @update_automatic_improvements = ::Gapic::Config::Method.new update_automatic_improvements_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials.rb deleted file mode 100644 index c23f10a77faa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_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 Shopping - module Merchant - module Accounts - module V1 - module AutomaticImprovementsService - # Credentials for the AutomaticImprovementsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/paths.rb deleted file mode 100644 index 4ceb1ee9a029..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/paths.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 Shopping - module Merchant - module Accounts - module V1 - module AutomaticImprovementsService - # Path helper methods for the AutomaticImprovementsService API. - module Paths - ## - # Create a fully-qualified AutomaticImprovements resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/automaticImprovements` - # - # @param account [String] - # - # @return [::String] - def automatic_improvements_path account: - "accounts/#{account}/automaticImprovements" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest.rb deleted file mode 100644 index e87170af9a83..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials" -require "google/shopping/merchant/accounts/v1/automatic_improvements_service/paths" -require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new - # - module AutomaticImprovementsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/client.rb deleted file mode 100644 index a81cda5c6cc9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/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/shopping/merchant/accounts/v1/automaticimprovements_pb" -require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AutomaticImprovementsService - module Rest - ## - # REST client for the AutomaticImprovementsService service. - # - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :automatic_improvements_service_stub - - ## - # Configure the AutomaticImprovementsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutomaticImprovementsService clients - # ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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 - @automatic_improvements_service_stub.universe_domain - end - - ## - # Create a new AutomaticImprovementsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutomaticImprovementsService 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 - - @automatic_improvements_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @automatic_improvements_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 - @automatic_improvements_service_stub.logger - end - - # Service calls - - ## - # Retrieves the automatic improvements of an account. - # - # @overload get_automatic_improvements(request, options = nil) - # Pass arguments to `get_automatic_improvements` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_automatic_improvements(name: nil) - # Pass arguments to `get_automatic_improvements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the automatic improvements. - # Format: `accounts/{account}/automaticImprovements` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new - # - # # Call the get_automatic_improvements method. - # result = client.get_automatic_improvements request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. - # p result - # - def get_automatic_improvements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_automatic_improvements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_automatic_improvements.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_automatic_improvements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @automatic_improvements_service_stub.get_automatic_improvements request, 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 automatic improvements of an account. - # - # @overload update_automatic_improvements(request, options = nil) - # Pass arguments to `update_automatic_improvements` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_automatic_improvements(automatic_improvements: nil, update_mask: nil) - # Pass arguments to `update_automatic_improvements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param automatic_improvements [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements, ::Hash] - # Required. The new version of the automatic imrovements. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `item_updates` - # - `item_updates.account_level_settings` - # - `image_improvements` - # - `image_improvements.account_level_settings` - # - `shipping_improvements` - # - `shipping_improvements.allow_shipping_improvements` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new - # - # # Call the update_automatic_improvements method. - # result = client.update_automatic_improvements request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. - # p result - # - def update_automatic_improvements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest - - # Converts hash and nil to an 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_automatic_improvements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_automatic_improvements.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_automatic_improvements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @automatic_improvements_service_stub.update_automatic_improvements request, 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 AutomaticImprovementsService REST API. - # - # This class represents the configuration for AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_automatic_improvements to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_automatic_improvements.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_automatic_improvements.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AutomaticImprovementsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_automatic_improvements` - # @return [::Gapic::Config::Method] - # - attr_reader :get_automatic_improvements - ## - # RPC-specific configuration for `update_automatic_improvements` - # @return [::Gapic::Config::Method] - # - attr_reader :update_automatic_improvements - - # @private - def initialize parent_rpcs = nil - get_automatic_improvements_config = parent_rpcs.get_automatic_improvements if parent_rpcs.respond_to? :get_automatic_improvements - @get_automatic_improvements = ::Gapic::Config::Method.new get_automatic_improvements_config - update_automatic_improvements_config = parent_rpcs.update_automatic_improvements if parent_rpcs.respond_to? :update_automatic_improvements - @update_automatic_improvements = ::Gapic::Config::Method.new update_automatic_improvements_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub.rb deleted file mode 100644 index daa5590d0443..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/automaticimprovements_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AutomaticImprovementsService - module Rest - ## - # REST service stub for the AutomaticImprovementsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_automatic_improvements REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] - # A result object deserialized from the server's reply - def get_automatic_improvements request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_automatic_improvements_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_automatic_improvements", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.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_automatic_improvements REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] - # A result object deserialized from the server's reply - def update_automatic_improvements request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_automatic_improvements_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_automatic_improvements", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_automatic_improvements REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_automatic_improvements_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/automaticImprovements/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_automatic_improvements REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest] - # 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_automatic_improvements_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1/{automatic_improvements.name}", - body: "automatic_improvements", - matches: [ - ["automatic_improvements.name", %r{^accounts/[^/]+/automaticImprovements/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_pb.rb deleted file mode 100644 index b6035609a228..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/automaticimprovements.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n@google/shopping/merchant/accounts/v1/automaticimprovements.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa0\x04\n\x15\x41utomaticImprovements\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12U\n\x0citem_updates\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1.AutomaticItemUpdatesH\x00\x88\x01\x01\x12\x61\n\x12image_improvements\x18\x03 \x01(\x0b\x32@.google.shopping.merchant.accounts.v1.AutomaticImageImprovementsH\x01\x88\x01\x01\x12g\n\x15shipping_improvements\x18\x04 \x01(\x0b\x32\x43.google.shopping.merchant.accounts.v1.AutomaticShippingImprovementsH\x02\x88\x01\x01:\x8e\x01\xea\x41\x8a\x01\n0merchantapi.googleapis.com/AutomaticImprovements\x12(accounts/{account}/automaticImprovements*\x15\x61utomaticImprovements2\x15\x61utomaticImprovementsB\x0f\n\r_item_updatesB\x15\n\x13_image_improvementsB\x18\n\x16_shipping_improvements\"\xa6\x05\n\x14\x41utomaticItemUpdates\x12\x86\x01\n\x1d\x61\x63\x63ount_item_updates_settings\x18\x01 \x01(\x0b\x32Z.google.shopping.merchant.accounts.v1.AutomaticItemUpdates.ItemUpdatesAccountLevelSettingsB\x03\xe0\x41\x01\x12*\n\x1d\x65\x66\x66\x65\x63tive_allow_price_updates\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\x31\n$effective_allow_availability_updates\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12\x38\n+effective_allow_strict_availability_updates\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12.\n!effective_allow_condition_updates\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x1a\xbb\x02\n\x1fItemUpdatesAccountLevelSettings\x12 \n\x13\x61llow_price_updates\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\'\n\x1a\x61llow_availability_updates\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12.\n!allow_strict_availability_updates\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12$\n\x17\x61llow_condition_updates\x18\x04 \x01(\x08H\x03\x88\x01\x01\x42\x16\n\x14_allow_price_updatesB\x1d\n\x1b_allow_availability_updatesB$\n\"_allow_strict_availability_updatesB\x1a\n\x18_allow_condition_updates\"\xa0\x03\n\x1a\x41utomaticImageImprovements\x12\x9d\x01\n#account_image_improvements_settings\x18\x01 \x01(\x0b\x32\x66.google.shopping.merchant.accounts.v1.AutomaticImageImprovements.ImageImprovementsAccountLevelSettingsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x39\n,effective_allow_automatic_image_improvements\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x1a\x7f\n%ImageImprovementsAccountLevelSettings\x12/\n\"allow_automatic_image_improvements\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42%\n#_allow_automatic_image_improvementsB&\n$_account_image_improvements_settings\"i\n\x1d\x41utomaticShippingImprovements\x12(\n\x1b\x61llow_shipping_improvements\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x1e\n\x1c_allow_shipping_improvements\"i\n\x1fGetAutomaticImprovementsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/AutomaticImprovements\"\xbc\x01\n\"UpdateAutomaticImprovementsRequest\x12`\n\x16\x61utomatic_improvements\x18\x01 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1.AutomaticImprovementsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\x87\x05\n\x1c\x41utomaticImprovementsService\x12\xe3\x01\n\x18GetAutomaticImprovements\x12\x45.google.shopping.merchant.accounts.v1.GetAutomaticImprovementsRequest\x1a;.google.shopping.merchant.accounts.v1.AutomaticImprovements\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/accounts/v1/{name=accounts/*/automaticImprovements}\x12\xb7\x02\n\x1bUpdateAutomaticImprovements\x12H.google.shopping.merchant.accounts.v1.UpdateAutomaticImprovementsRequest\x1a;.google.shopping.merchant.accounts.v1.AutomaticImprovements\"\x90\x01\xda\x41\"automatic_improvements,update_mask\x82\xd3\xe4\x93\x02\x65\x32K/accounts/v1/{automatic_improvements.name=accounts/*/automaticImprovements}:\x16\x61utomatic_improvements\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8d\x02\n(com.google.shopping.merchant.accounts.v1B\x1a\x41utomaticImprovementsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - AutomaticImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticImprovements").msgclass - AutomaticItemUpdates = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticItemUpdates").msgclass - AutomaticItemUpdates::ItemUpdatesAccountLevelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings").msgclass - AutomaticImageImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticImageImprovements").msgclass - AutomaticImageImprovements::ImageImprovementsAccountLevelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings").msgclass - AutomaticShippingImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticShippingImprovements").msgclass - GetAutomaticImprovementsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAutomaticImprovementsRequest").msgclass - UpdateAutomaticImprovementsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateAutomaticImprovementsRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_services_pb.rb deleted file mode 100644 index 44a1730d0c3b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/automaticimprovements.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/automaticimprovements_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module AutomaticImprovementsService - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.AutomaticImprovementsService' - - # Retrieves the automatic improvements of an account. - rpc :GetAutomaticImprovements, ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest, ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements - # Updates the automatic improvements of an account. - rpc :UpdateAutomaticImprovements, ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest, ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service.rb deleted file mode 100644 index 5c83ec0b659b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/business_identity_service/credentials" -require "google/shopping/merchant/accounts/v1/business_identity_service/paths" -require "google/shopping/merchant/accounts/v1/business_identity_service/client" -require "google/shopping/merchant/accounts/v1/business_identity_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/business_identity_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/business_identity_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new - # - module BusinessIdentityService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "business_identity_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/business_identity_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/client.rb deleted file mode 100644 index 907261226e52..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/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! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1/businessidentity_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module BusinessIdentityService - ## - # Client for the BusinessIdentityService service. - # - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_identity_service_stub - - ## - # Configure the BusinessIdentityService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessIdentityService clients - # ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessIdentityService 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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @business_identity_service_stub.universe_domain - end - - ## - # Create a new BusinessIdentityService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessIdentityService 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/shopping/merchant/accounts/v1/businessidentity_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 - - @business_identity_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @business_identity_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 - @business_identity_service_stub.logger - end - - # Service calls - - ## - # Retrieves the business identity of an account. - # - # @overload get_business_identity(request, options = nil) - # Pass arguments to `get_business_identity` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_business_identity(name: nil) - # Pass arguments to `get_business_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the business identity. - # Format: `accounts/{account}/businessIdentity`. For example, - # `accounts/123456/businessIdentity`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new - # - # # Call the get_business_identity method. - # result = client.get_business_identity request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. - # p result - # - def get_business_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_business_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_business_identity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_business_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_identity_service_stub.call_rpc :get_business_identity, request, 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 business identity of an account. Executing this method requires - # admin access. - # - # @overload update_business_identity(request, options = nil) - # Pass arguments to `update_business_identity` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_business_identity(business_identity: nil, update_mask: nil) - # Pass arguments to `update_business_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param business_identity [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity, ::Hash] - # Required. The new version of the business identity. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `black_owned` - # - `latino_owned` - # - `promotions_consent` - # - `small_business` - # - `veteran_owned` - # - `women_owned` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new - # - # # Call the update_business_identity method. - # result = client.update_business_identity request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. - # p result - # - def update_business_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest - - # Converts hash and nil to 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_business_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.business_identity&.name - header_params["business_identity.name"] = request.business_identity.name - end - - request_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_business_identity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_business_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_identity_service_stub.call_rpc :update_business_identity, request, 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 BusinessIdentityService API. - # - # This class represents the configuration for BusinessIdentityService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_business_identity to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_identity.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_identity.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 BusinessIdentityService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_business_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :get_business_identity - ## - # RPC-specific configuration for `update_business_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :update_business_identity - - # @private - def initialize parent_rpcs = nil - get_business_identity_config = parent_rpcs.get_business_identity if parent_rpcs.respond_to? :get_business_identity - @get_business_identity = ::Gapic::Config::Method.new get_business_identity_config - update_business_identity_config = parent_rpcs.update_business_identity if parent_rpcs.respond_to? :update_business_identity - @update_business_identity = ::Gapic::Config::Method.new update_business_identity_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/credentials.rb deleted file mode 100644 index 29b28c46fdb0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_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 Shopping - module Merchant - module Accounts - module V1 - module BusinessIdentityService - # Credentials for the BusinessIdentityService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/paths.rb deleted file mode 100644 index 7ad99f28e0c6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/paths.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 Shopping - module Merchant - module Accounts - module V1 - module BusinessIdentityService - # Path helper methods for the BusinessIdentityService API. - module Paths - ## - # Create a fully-qualified BusinessIdentity resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/businessIdentity` - # - # @param account [String] - # - # @return [::String] - def business_identity_path account: - "accounts/#{account}/businessIdentity" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest.rb deleted file mode 100644 index d1b21d4f1004..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/business_identity_service/credentials" -require "google/shopping/merchant/accounts/v1/business_identity_service/paths" -require "google/shopping/merchant/accounts/v1/business_identity_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/business_identity_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new - # - module BusinessIdentityService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/business_identity_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/client.rb deleted file mode 100644 index a973d6631647..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/client.rb +++ /dev/null @@ -1,532 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/businessidentity_pb" -require "google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module BusinessIdentityService - module Rest - ## - # REST client for the BusinessIdentityService service. - # - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_identity_service_stub - - ## - # Configure the BusinessIdentityService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessIdentityService clients - # ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessIdentityService 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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @business_identity_service_stub.universe_domain - end - - ## - # Create a new BusinessIdentityService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessIdentityService 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 - - @business_identity_service_stub = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @business_identity_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 - @business_identity_service_stub.logger - end - - # Service calls - - ## - # Retrieves the business identity of an account. - # - # @overload get_business_identity(request, options = nil) - # Pass arguments to `get_business_identity` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_business_identity(name: nil) - # Pass arguments to `get_business_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the business identity. - # Format: `accounts/{account}/businessIdentity`. For example, - # `accounts/123456/businessIdentity`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new - # - # # Call the get_business_identity method. - # result = client.get_business_identity request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. - # p result - # - def get_business_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_business_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_business_identity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_business_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_identity_service_stub.get_business_identity request, 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 business identity of an account. Executing this method requires - # admin access. - # - # @overload update_business_identity(request, options = nil) - # Pass arguments to `update_business_identity` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_business_identity(business_identity: nil, update_mask: nil) - # Pass arguments to `update_business_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param business_identity [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity, ::Hash] - # Required. The new version of the business identity. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `black_owned` - # - `latino_owned` - # - `promotions_consent` - # - `small_business` - # - `veteran_owned` - # - `women_owned` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new - # - # # Call the update_business_identity method. - # result = client.update_business_identity request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. - # p result - # - def update_business_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest - - # Converts hash and nil to an 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_business_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_business_identity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_business_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_identity_service_stub.update_business_identity request, 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 BusinessIdentityService REST API. - # - # This class represents the configuration for BusinessIdentityService 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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_business_identity to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_identity.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_identity.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 BusinessIdentityService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_business_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :get_business_identity - ## - # RPC-specific configuration for `update_business_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :update_business_identity - - # @private - def initialize parent_rpcs = nil - get_business_identity_config = parent_rpcs.get_business_identity if parent_rpcs.respond_to? :get_business_identity - @get_business_identity = ::Gapic::Config::Method.new get_business_identity_config - update_business_identity_config = parent_rpcs.update_business_identity if parent_rpcs.respond_to? :update_business_identity - @update_business_identity = ::Gapic::Config::Method.new update_business_identity_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub.rb deleted file mode 100644 index 7fe004ede755..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/businessidentity_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module BusinessIdentityService - module Rest - ## - # REST service stub for the BusinessIdentityService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_business_identity REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] - # A result object deserialized from the server's reply - def get_business_identity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_business_identity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_business_identity", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.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_business_identity REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] - # A result object deserialized from the server's reply - def update_business_identity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_business_identity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_business_identity", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_business_identity REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_business_identity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/businessIdentity/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_business_identity REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest] - # 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_business_identity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1/{business_identity.name}", - body: "business_identity", - matches: [ - ["business_identity.name", %r{^accounts/[^/]+/businessIdentity/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service.rb deleted file mode 100644 index e6c6c80c875d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/business_info_service/credentials" -require "google/shopping/merchant/accounts/v1/business_info_service/paths" -require "google/shopping/merchant/accounts/v1/business_info_service/client" -require "google/shopping/merchant/accounts/v1/business_info_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support business info API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/business_info_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/business_info_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new - # - module BusinessInfoService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "business_info_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/business_info_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/client.rb deleted file mode 100644 index e9e7b76900fa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/client.rb +++ /dev/null @@ -1,585 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/businessinfo_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module BusinessInfoService - ## - # Client for the BusinessInfoService service. - # - # Service to support business info API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_info_service_stub - - ## - # Configure the BusinessInfoService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessInfoService clients - # ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessInfoService 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::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @business_info_service_stub.universe_domain - end - - ## - # Create a new BusinessInfoService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessInfoService 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/shopping/merchant/accounts/v1/businessinfo_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 - - @business_info_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @business_info_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 - @business_info_service_stub.logger - end - - # Service calls - - ## - # Retrieves the business info of an account. - # - # @overload get_business_info(request, options = nil) - # Pass arguments to `get_business_info` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_business_info(name: nil) - # Pass arguments to `get_business_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the business info. - # Format: `accounts/{account}/businessInfo`. For example, - # `accounts/123456/businessInfo`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new - # - # # Call the get_business_info method. - # result = client.get_business_info request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. - # p result - # - def get_business_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_business_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_business_info.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_business_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_info_service_stub.call_rpc :get_business_info, request, 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 business info of an account. Executing this method requires - # admin access. - # - # @overload update_business_info(request, options = nil) - # Pass arguments to `update_business_info` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_business_info(business_info: nil, update_mask: nil) - # Pass arguments to `update_business_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param business_info [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo, ::Hash] - # Required. The new version of the business info. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `address` - # - `customer_service` - # - `korean_business_registration_number` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new - # - # # Call the update_business_info method. - # result = client.update_business_info request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. - # p result - # - def update_business_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest - - # Converts hash and nil to 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_business_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.business_info&.name - header_params["business_info.name"] = request.business_info.name - end - - request_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_business_info.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_business_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_info_service_stub.call_rpc :update_business_info, request, 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 BusinessInfoService API. - # - # This class represents the configuration for BusinessInfoService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_business_info to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_info.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_info.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::BusinessInfoService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 BusinessInfoService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_business_info` - # @return [::Gapic::Config::Method] - # - attr_reader :get_business_info - ## - # RPC-specific configuration for `update_business_info` - # @return [::Gapic::Config::Method] - # - attr_reader :update_business_info - - # @private - def initialize parent_rpcs = nil - get_business_info_config = parent_rpcs.get_business_info if parent_rpcs.respond_to? :get_business_info - @get_business_info = ::Gapic::Config::Method.new get_business_info_config - update_business_info_config = parent_rpcs.update_business_info if parent_rpcs.respond_to? :update_business_info - @update_business_info = ::Gapic::Config::Method.new update_business_info_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/credentials.rb deleted file mode 100644 index f24916f13271..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_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 Shopping - module Merchant - module Accounts - module V1 - module BusinessInfoService - # Credentials for the BusinessInfoService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/paths.rb deleted file mode 100644 index f7bfa247a852..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/paths.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 Shopping - module Merchant - module Accounts - module V1 - module BusinessInfoService - # Path helper methods for the BusinessInfoService API. - module Paths - ## - # Create a fully-qualified BusinessInfo resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/businessInfo` - # - # @param account [String] - # - # @return [::String] - def business_info_path account: - "accounts/#{account}/businessInfo" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest.rb deleted file mode 100644 index da771cb896f3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/business_info_service/credentials" -require "google/shopping/merchant/accounts/v1/business_info_service/paths" -require "google/shopping/merchant/accounts/v1/business_info_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support business info API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/business_info_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new - # - module BusinessInfoService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/business_info_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/client.rb deleted file mode 100644 index 5b74b6a26ee1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/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/shopping/merchant/accounts/v1/businessinfo_pb" -require "google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module BusinessInfoService - module Rest - ## - # REST client for the BusinessInfoService service. - # - # Service to support business info API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_info_service_stub - - ## - # Configure the BusinessInfoService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessInfoService clients - # ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessInfoService 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::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @business_info_service_stub.universe_domain - end - - ## - # Create a new BusinessInfoService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessInfoService 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 - - @business_info_service_stub = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @business_info_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 - @business_info_service_stub.logger - end - - # Service calls - - ## - # Retrieves the business info of an account. - # - # @overload get_business_info(request, options = nil) - # Pass arguments to `get_business_info` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_business_info(name: nil) - # Pass arguments to `get_business_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the business info. - # Format: `accounts/{account}/businessInfo`. For example, - # `accounts/123456/businessInfo`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new - # - # # Call the get_business_info method. - # result = client.get_business_info request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. - # p result - # - def get_business_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_business_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_business_info.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_business_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_info_service_stub.get_business_info request, 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 business info of an account. Executing this method requires - # admin access. - # - # @overload update_business_info(request, options = nil) - # Pass arguments to `update_business_info` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_business_info(business_info: nil, update_mask: nil) - # Pass arguments to `update_business_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param business_info [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo, ::Hash] - # Required. The new version of the business info. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `address` - # - `customer_service` - # - `korean_business_registration_number` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new - # - # # Call the update_business_info method. - # result = client.update_business_info request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. - # p result - # - def update_business_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest - - # Converts hash and nil to an 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_business_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_business_info.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_business_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_info_service_stub.update_business_info request, 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 BusinessInfoService REST API. - # - # This class represents the configuration for BusinessInfoService 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::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_business_info to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_info.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_info.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 BusinessInfoService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_business_info` - # @return [::Gapic::Config::Method] - # - attr_reader :get_business_info - ## - # RPC-specific configuration for `update_business_info` - # @return [::Gapic::Config::Method] - # - attr_reader :update_business_info - - # @private - def initialize parent_rpcs = nil - get_business_info_config = parent_rpcs.get_business_info if parent_rpcs.respond_to? :get_business_info - @get_business_info = ::Gapic::Config::Method.new get_business_info_config - update_business_info_config = parent_rpcs.update_business_info if parent_rpcs.respond_to? :update_business_info - @update_business_info = ::Gapic::Config::Method.new update_business_info_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub.rb deleted file mode 100644 index 72079f907b04..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/businessinfo_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module BusinessInfoService - module Rest - ## - # REST service stub for the BusinessInfoService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_business_info REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] - # A result object deserialized from the server's reply - def get_business_info request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_business_info_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_business_info", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.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_business_info REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] - # A result object deserialized from the server's reply - def update_business_info request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_business_info_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_business_info", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_business_info REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_business_info_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/businessInfo/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_business_info REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest] - # 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_business_info_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1/{business_info.name}", - body: "business_info", - matches: [ - ["business_info.name", %r{^accounts/[^/]+/businessInfo/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_pb.rb deleted file mode 100644 index 6490e52c930f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/businessidentity.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n;google/shopping/merchant/accounts/v1/businessidentity.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x88\t\n\x10\x42usinessIdentity\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12i\n\x12promotions_consent\x18\x02 \x01(\x0e\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.PromotionsConsentB\x03\xe0\x41\x02\x12\x62\n\x0b\x62lack_owned\x18\x03 \x01(\x0b\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x62\n\x0bwomen_owned\x18\x04 \x01(\x0b\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x64\n\rveteran_owned\x18\x05 \x01(\x0b\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x63\n\x0clatino_owned\x18\x06 \x01(\x0b\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x65\n\x0esmall_business\x18\x07 \x01(\x0b\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x1a\x88\x02\n\x11IdentityAttribute\x12\x7f\n\x14identity_declaration\x18\x01 \x01(\x0e\x32\\.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttribute.IdentityDeclarationB\x03\xe0\x41\x02\"r\n\x13IdentityDeclaration\x12$\n IDENTITY_DECLARATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SELF_IDENTIFIES_AS\x10\x01\x12\x1d\n\x19\x44OES_NOT_SELF_IDENTIFY_AS\x10\x02\"t\n\x11PromotionsConsent\x12\"\n\x1ePROMOTIONS_CONSENT_UNSPECIFIED\x10\x00\x12\x1c\n\x18PROMOTIONS_CONSENT_GIVEN\x10\x01\x12\x1d\n\x19PROMOTIONS_CONSENT_DENIED\x10\x02:{\xea\x41x\n+merchantapi.googleapis.com/BusinessIdentity\x12#accounts/{account}/businessIdentity*\x12\x62usinessIdentities2\x10\x62usinessIdentity\"_\n\x1aGetBusinessIdentityRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/BusinessIdentity\"\xad\x01\n\x1dUpdateBusinessIdentityRequest\x12V\n\x11\x62usiness_identity\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.BusinessIdentityB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x32\xca\x04\n\x17\x42usinessIdentityService\x12\xcf\x01\n\x13GetBusinessIdentity\x12@.google.shopping.merchant.accounts.v1.GetBusinessIdentityRequest\x1a\x36.google.shopping.merchant.accounts.v1.BusinessIdentity\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1/{name=accounts/*/businessIdentity}\x12\x93\x02\n\x16UpdateBusinessIdentity\x12\x43.google.shopping.merchant.accounts.v1.UpdateBusinessIdentityRequest\x1a\x36.google.shopping.merchant.accounts.v1.BusinessIdentity\"|\xda\x41\x1d\x62usiness_identity,update_mask\x82\xd3\xe4\x93\x02V2A/accounts/v1/{business_identity.name=accounts/*/businessIdentity}:\x11\x62usiness_identity\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x88\x02\n(com.google.shopping.merchant.accounts.v1B\x15\x42usinessIdentityProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - BusinessIdentity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessIdentity").msgclass - BusinessIdentity::IdentityAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttribute").msgclass - BusinessIdentity::IdentityAttribute::IdentityDeclaration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttribute.IdentityDeclaration").enummodule - BusinessIdentity::PromotionsConsent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessIdentity.PromotionsConsent").enummodule - GetBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetBusinessIdentityRequest").msgclass - UpdateBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateBusinessIdentityRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_services_pb.rb deleted file mode 100644 index 3a7682122855..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/businessidentity.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/businessidentity_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module BusinessIdentityService - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.BusinessIdentityService' - - # Retrieves the business identity of an account. - rpc :GetBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity - # Updates the business identity of an account. Executing this method requires - # admin access. - rpc :UpdateBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_pb.rb deleted file mode 100644 index 55190ae34711..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/businessinfo.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/accounts/v1/customerservice_pb' -require 'google/shopping/merchant/accounts/v1/phoneverificationstate_pb' -require 'google/type/phone_number_pb' -require 'google/type/postal_address_pb' - - -descriptor_data = "\n7google/shopping/merchant/accounts/v1/businessinfo.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a:google/shopping/merchant/accounts/v1/customerservice.proto\x1a\x41google/shopping/merchant/accounts/v1/phoneverificationstate.proto\x1a\x1egoogle/type/phone_number.proto\x1a google/type/postal_address.proto\"\xe3\x04\n\x0c\x42usinessInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x35\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x1a.google.type.PostalAddressB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x31\n\x05phone\x18\x03 \x01(\x0b\x32\x18.google.type.PhoneNumberB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12h\n\x18phone_verification_state\x18\x04 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1.PhoneVerificationStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12Y\n\x10\x63ustomer_service\x18\x05 \x01(\x0b\x32\x35.google.shopping.merchant.accounts.v1.CustomerServiceB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x35\n#korean_business_registration_number\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01:j\xea\x41g\n\'merchantapi.googleapis.com/BusinessInfo\x12\x1f\x61\x63\x63ounts/{account}/businessInfo*\rbusinessInfos2\x0c\x62usinessInfoB\n\n\x08_addressB\x08\n\x06_phoneB\x1b\n\x19_phone_verification_stateB\x13\n\x11_customer_serviceB&\n$_korean_business_registration_number\"W\n\x16GetBusinessInfoRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/BusinessInfo\"\xa1\x01\n\x19UpdateBusinessInfoRequest\x12N\n\rbusiness_info\x18\x01 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1.BusinessInfoB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x32\x9a\x04\n\x13\x42usinessInfoService\x12\xbf\x01\n\x0fGetBusinessInfo\x12<.google.shopping.merchant.accounts.v1.GetBusinessInfoRequest\x1a\x32.google.shopping.merchant.accounts.v1.BusinessInfo\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/accounts/v1/{name=accounts/*/businessInfo}\x12\xf7\x01\n\x12UpdateBusinessInfo\x12?.google.shopping.merchant.accounts.v1.UpdateBusinessInfoRequest\x1a\x32.google.shopping.merchant.accounts.v1.BusinessInfo\"l\xda\x41\x19\x62usiness_info,update_mask\x82\xd3\xe4\x93\x02J29/accounts/v1/{business_info.name=accounts/*/businessInfo}:\rbusiness_info\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x84\x02\n(com.google.shopping.merchant.accounts.v1B\x11\x42usinessInfoProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - BusinessInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessInfo").msgclass - GetBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetBusinessInfoRequest").msgclass - UpdateBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateBusinessInfoRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_services_pb.rb deleted file mode 100644 index 8032b196afc5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/businessinfo.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/businessinfo_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module BusinessInfoService - # Service to support business info API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.BusinessInfoService' - - # Retrieves the business info of an account. - rpc :GetBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo - # Updates the business info of an account. Executing this method requires - # admin access. - rpc :UpdateBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service.rb deleted file mode 100644 index b37169ae6c24..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/checkout_settings_service/credentials" -require "google/shopping/merchant/accounts/v1/checkout_settings_service/paths" -require "google/shopping/merchant/accounts/v1/checkout_settings_service/client" -require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/checkout_settings_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new - # - module CheckoutSettingsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "checkout_settings_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/checkout_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/client.rb deleted file mode 100644 index cccf3ed13680..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/client.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/errors" -require "google/shopping/merchant/accounts/v1/checkoutsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module CheckoutSettingsService - ## - # Client for the CheckoutSettingsService service. - # - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :checkout_settings_service_stub - - ## - # Configure the CheckoutSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CheckoutSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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 - @checkout_settings_service_stub.universe_domain - end - - ## - # Create a new CheckoutSettingsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CheckoutSettingsService 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/shopping/merchant/accounts/v1/checkoutsettings_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 - - @checkout_settings_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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 - ) - - @checkout_settings_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 - @checkout_settings_service_stub.logger - end - - # Service calls - - ## - # Gets `CheckoutSettings` for the given merchant. This includes - # information about review state, enrollment state and URL settings. - # - # @overload get_checkout_settings(request, options = nil) - # Pass arguments to `get_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_checkout_settings(name: nil) - # Pass arguments to `get_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new - # - # # Call the get_checkout_settings method. - # result = client.get_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. - # p result - # - def get_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_checkout_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.call_rpc :get_checkout_settings, request, 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 `CheckoutSettings` for the given merchant. - # - # @overload create_checkout_settings(request, options = nil) - # Pass arguments to `create_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_checkout_settings(parent: nil, checkout_settings: nil) - # Pass arguments to `create_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which the `CheckoutSettings` will be - # created. - # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings, ::Hash] - # Required. The `CheckoutSettings` object to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new - # - # # Call the create_checkout_settings method. - # result = client.create_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. - # p result - # - def create_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest - - # Converts hash and nil to 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_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_checkout_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.call_rpc :create_checkout_settings, request, 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 `CheckoutSettings` for the given merchant. - # - # @overload update_checkout_settings(request, options = nil) - # Pass arguments to `update_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_checkout_settings(checkout_settings: nil, update_mask: nil) - # Pass arguments to `update_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings, ::Hash] - # Required. The updated version of the `CheckoutSettings`. - # The `name` field is used to identify the `CheckoutSettings`. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `eligible_destinations` - # - `uri_settings` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new - # - # # Call the update_checkout_settings method. - # result = client.update_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. - # p result - # - def update_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest - - # Converts hash and nil to 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_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.checkout_settings&.name - header_params["checkout_settings.name"] = request.checkout_settings.name - end - - request_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_checkout_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.call_rpc :update_checkout_settings, request, 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 `CheckoutSettings` and unenrolls merchant from - # `Checkout` program. - # - # @overload delete_checkout_settings(request, options = nil) - # Pass arguments to `delete_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_checkout_settings(name: nil) - # Pass arguments to `delete_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # - # @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/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new - # - # # Call the delete_checkout_settings method. - # result = client.delete_checkout_settings request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_checkout_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.call_rpc :delete_checkout_settings, request, 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 CheckoutSettingsService API. - # - # This class represents the configuration for CheckoutSettingsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_checkout_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_checkout_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_checkout_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 CheckoutSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_checkout_settings - ## - # RPC-specific configuration for `create_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :create_checkout_settings - ## - # RPC-specific configuration for `update_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_checkout_settings - ## - # RPC-specific configuration for `delete_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_checkout_settings - - # @private - def initialize parent_rpcs = nil - get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings - @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config - create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings - @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config - update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings - @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config - delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings - @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/credentials.rb deleted file mode 100644 index 8fcaae10247b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_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 Shopping - module Merchant - module Accounts - module V1 - module CheckoutSettingsService - # Credentials for the CheckoutSettingsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/paths.rb deleted file mode 100644 index 475823b2eea7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/paths.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module CheckoutSettingsService - # Path helper methods for the CheckoutSettingsService API. - module Paths - ## - # Create a fully-qualified CheckoutSettings resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/programs/{program}/checkoutSettings` - # - # @param account [String] - # @param program [String] - # - # @return [::String] - def checkout_settings_path account:, program: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/programs/#{program}/checkoutSettings" - end - - ## - # Create a fully-qualified Program resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/programs/{program}` - # - # @param account [String] - # @param program [String] - # - # @return [::String] - def program_path account:, program: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/programs/#{program}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest.rb deleted file mode 100644 index 9f311c8681c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/checkout_settings_service/credentials" -require "google/shopping/merchant/accounts/v1/checkout_settings_service/paths" -require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new - # - module CheckoutSettingsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client.rb deleted file mode 100644 index 52e49e41960c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client.rb +++ /dev/null @@ -1,703 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/checkoutsettings_pb" -require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module CheckoutSettingsService - module Rest - ## - # REST client for the CheckoutSettingsService service. - # - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :checkout_settings_service_stub - - ## - # Configure the CheckoutSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CheckoutSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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 - @checkout_settings_service_stub.universe_domain - end - - ## - # Create a new CheckoutSettingsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CheckoutSettingsService 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 - - @checkout_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @checkout_settings_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 - @checkout_settings_service_stub.logger - end - - # Service calls - - ## - # Gets `CheckoutSettings` for the given merchant. This includes - # information about review state, enrollment state and URL settings. - # - # @overload get_checkout_settings(request, options = nil) - # Pass arguments to `get_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_checkout_settings(name: nil) - # Pass arguments to `get_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new - # - # # Call the get_checkout_settings method. - # result = client.get_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. - # p result - # - def get_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_checkout_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.get_checkout_settings request, 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 `CheckoutSettings` for the given merchant. - # - # @overload create_checkout_settings(request, options = nil) - # Pass arguments to `create_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_checkout_settings(parent: nil, checkout_settings: nil) - # Pass arguments to `create_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which the `CheckoutSettings` will be - # created. - # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings, ::Hash] - # Required. The `CheckoutSettings` object to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new - # - # # Call the create_checkout_settings method. - # result = client.create_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. - # p result - # - def create_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest - - # Converts hash and nil to an 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_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_checkout_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.create_checkout_settings request, 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 `CheckoutSettings` for the given merchant. - # - # @overload update_checkout_settings(request, options = nil) - # Pass arguments to `update_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_checkout_settings(checkout_settings: nil, update_mask: nil) - # Pass arguments to `update_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings, ::Hash] - # Required. The updated version of the `CheckoutSettings`. - # The `name` field is used to identify the `CheckoutSettings`. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `eligible_destinations` - # - `uri_settings` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new - # - # # Call the update_checkout_settings method. - # result = client.update_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. - # p result - # - def update_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest - - # Converts hash and nil to an 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_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_checkout_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.update_checkout_settings request, 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 `CheckoutSettings` and unenrolls merchant from - # `Checkout` program. - # - # @overload delete_checkout_settings(request, options = nil) - # Pass arguments to `delete_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_checkout_settings(name: nil) - # Pass arguments to `delete_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @yield [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/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new - # - # # Call the delete_checkout_settings method. - # result = client.delete_checkout_settings request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_checkout_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.delete_checkout_settings request, 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 CheckoutSettingsService REST API. - # - # This class represents the configuration for CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_checkout_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_checkout_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_checkout_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 CheckoutSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_checkout_settings - ## - # RPC-specific configuration for `create_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :create_checkout_settings - ## - # RPC-specific configuration for `update_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_checkout_settings - ## - # RPC-specific configuration for `delete_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_checkout_settings - - # @private - def initialize parent_rpcs = nil - get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings - @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config - create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings - @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config - update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings - @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config - delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings - @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub.rb deleted file mode 100644 index c4543b706979..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub.rb +++ /dev/null @@ -1,329 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/checkoutsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module CheckoutSettingsService - module Rest - ## - # REST service stub for the CheckoutSettingsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # A result object deserialized from the server's reply - def get_checkout_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_checkout_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_checkout_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.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_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # A result object deserialized from the server's reply - def create_checkout_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_checkout_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_checkout_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.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_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # A result object deserialized from the server's reply - def update_checkout_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_checkout_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_checkout_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.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_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_checkout_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_checkout_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_checkout_settings", - 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 get_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_checkout_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest] - # 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_checkout_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{parent}/checkoutSettings", - body: "checkout_settings", - matches: [ - ["parent", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest] - # 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_checkout_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1/{checkout_settings.name}", - body: "checkout_settings", - matches: [ - ["checkout_settings.name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_checkout_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkoutsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkoutsettings_pb.rb deleted file mode 100644 index ee608f015a7a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkoutsettings_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/checkoutsettings.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n;google/shopping/merchant/accounts/v1/checkoutsettings.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a google/shopping/type/types.proto\"_\n\x1aGetCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xbc\x01\n\x1d\x43reateCheckoutSettingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/CheckoutSettings\x12V\n\x11\x63heckout_settings\x18\x02 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.CheckoutSettingsB\x03\xe0\x41\x02\"\xad\x01\n\x1dUpdateCheckoutSettingsRequest\x12V\n\x11\x63heckout_settings\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.CheckoutSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"b\n\x1d\x44\x65leteCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xcc\t\n\x10\x43heckoutSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12L\n\x0curi_settings\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1.UriSettingsH\x00\x88\x01\x01\x12U\n\x15\x65ligible_destinations\x18\x08 \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnumB\x03\xe0\x41\x01\x12r\n\x10\x65nrollment_state\x18\x03 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12j\n\x0creview_state\x18\x04 \x01(\x0e\x32J.google.shopping.merchant.accounts.v1.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12V\n\x16\x65\x66\x66\x65\x63tive_uri_settings\x18\x05 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1.UriSettingsB\x03\xe0\x41\x03\x12|\n\x1a\x65\x66\x66\x65\x63tive_enrollment_state\x18\x06 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12t\n\x16\x65\x66\x66\x65\x63tive_review_state\x18\x07 \x01(\x0e\x32J.google.shopping.merchant.accounts.v1.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x04\x88\x01\x01\"o\n\x17\x43heckoutEnrollmentState\x12)\n%CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INACTIVE\x10\x01\x12\x0c\n\x08\x45NROLLED\x10\x02\x12\r\n\tOPTED_OUT\x10\x03\"j\n\x13\x43heckoutReviewState\x12%\n!CHECKOUT_REVIEW_STATE_UNSPECIFIED\x10\x00\x12\r\n\tIN_REVIEW\x10\x01\x12\x0c\n\x08\x41PPROVED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03:\x85\x01\xea\x41\x81\x01\n+merchantapi.googleapis.com/CheckoutSettings\x12\x36\x61\x63\x63ounts/{account}/programs/{program}/checkoutSettings*\x08settings2\x10\x63heckoutSettingsB\x0f\n\r_uri_settingsB\x13\n\x11_enrollment_stateB\x0f\n\r_review_stateB\x1d\n\x1b_effective_enrollment_stateB\x19\n\x17_effective_review_state\"[\n\x0bUriSettings\x12\x1f\n\x15\x63heckout_uri_template\x18\x01 \x01(\tH\x00\x12\x1b\n\x11\x63\x61rt_uri_template\x18\x02 \x01(\tH\x00\x42\x0e\n\x0curi_template2\xb0\x08\n\x17\x43heckoutSettingsService\x12\xda\x01\n\x13GetCheckoutSettings\x12@.google.shopping.merchant.accounts.v1.GetCheckoutSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.CheckoutSettings\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/accounts/v1/{name=accounts/*/programs/*/checkoutSettings}\x12\x89\x02\n\x16\x43reateCheckoutSettings\x12\x43.google.shopping.merchant.accounts.v1.CreateCheckoutSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.CheckoutSettings\"r\xda\x41\x18parent,checkout_settings\x82\xd3\xe4\x93\x02Q\" e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a developer registration for a merchant. - # - # @overload get_developer_registration(request, options = nil) - # Pass arguments to `get_developer_registration` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_developer_registration(name: nil) - # Pass arguments to `get_developer_registration` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` (ID) of the developer registration. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new - # - # # Call the get_developer_registration method. - # result = client.get_developer_registration request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration. - # p result - # - def get_developer_registration request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_developer_registration.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_developer_registration.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_developer_registration.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_registration_service_stub.call_rpc :get_developer_registration, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Unregister the calling GCP from the calling shopping account. Note that the - # GCP will still be able to access the API for at most 1 day from the - # unregister succussful call. - # - # @overload unregister_gcp(request, options = nil) - # Pass arguments to `unregister_gcp` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload unregister_gcp(name: nil) - # Pass arguments to `unregister_gcp` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the developer registration to be created for the - # merchant account that the GCP will be registered with. Format: - # `accounts/{account}/developerRegistration` - # - # @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/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new - # - # # Call the unregister_gcp method. - # result = client.unregister_gcp request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def unregister_gcp request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.unregister_gcp.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.unregister_gcp.timeout, - metadata: metadata, - retry_policy: @config.rpcs.unregister_gcp.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_registration_service_stub.call_rpc :unregister_gcp, request, 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 the merchant account that the calling GCP is registered with. - # - # @overload get_account_for_gcp_registration(request, options = nil) - # Pass arguments to `get_account_for_gcp_registration` via a request object, either of type - # {::Google::Protobuf::Empty} or an equivalent Hash. - # - # @param request [::Google::Protobuf::Empty, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @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 [::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Protobuf::Empty.new - # - # # Call the get_account_for_gcp_registration method. - # result = client.get_account_for_gcp_registration request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse. - # p result - # - def get_account_for_gcp_registration request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Protobuf::Empty - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_account_for_gcp_registration.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::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.get_account_for_gcp_registration.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_account_for_gcp_registration.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_registration_service_stub.call_rpc :get_account_for_gcp_registration, request, 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 DeveloperRegistrationService API. - # - # This class represents the configuration for DeveloperRegistrationService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # register_gcp to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.register_gcp.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.register_gcp.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 DeveloperRegistrationService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `register_gcp` - # @return [::Gapic::Config::Method] - # - attr_reader :register_gcp - ## - # RPC-specific configuration for `get_developer_registration` - # @return [::Gapic::Config::Method] - # - attr_reader :get_developer_registration - ## - # RPC-specific configuration for `unregister_gcp` - # @return [::Gapic::Config::Method] - # - attr_reader :unregister_gcp - ## - # RPC-specific configuration for `get_account_for_gcp_registration` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account_for_gcp_registration - - # @private - def initialize parent_rpcs = nil - register_gcp_config = parent_rpcs.register_gcp if parent_rpcs.respond_to? :register_gcp - @register_gcp = ::Gapic::Config::Method.new register_gcp_config - get_developer_registration_config = parent_rpcs.get_developer_registration if parent_rpcs.respond_to? :get_developer_registration - @get_developer_registration = ::Gapic::Config::Method.new get_developer_registration_config - unregister_gcp_config = parent_rpcs.unregister_gcp if parent_rpcs.respond_to? :unregister_gcp - @unregister_gcp = ::Gapic::Config::Method.new unregister_gcp_config - get_account_for_gcp_registration_config = parent_rpcs.get_account_for_gcp_registration if parent_rpcs.respond_to? :get_account_for_gcp_registration - @get_account_for_gcp_registration = ::Gapic::Config::Method.new get_account_for_gcp_registration_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/credentials.rb deleted file mode 100644 index b47bb882f862..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_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 Shopping - module Merchant - module Accounts - module V1 - module DeveloperRegistrationService - # Credentials for the DeveloperRegistrationService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/paths.rb deleted file mode 100644 index d88bf1a146bf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/paths.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 Shopping - module Merchant - module Accounts - module V1 - module DeveloperRegistrationService - # Path helper methods for the DeveloperRegistrationService API. - module Paths - ## - # Create a fully-qualified DeveloperRegistration resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/developerRegistration` - # - # @param account [String] - # - # @return [::String] - def developer_registration_path account: - "accounts/#{account}/developerRegistration" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest.rb deleted file mode 100644 index 8c16722273bb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/developer_registration_service/credentials" -require "google/shopping/merchant/accounts/v1/developer_registration_service/paths" -require "google/shopping/merchant/accounts/v1/developer_registration_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to access Developer Registration. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/developer_registration_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new - # - module DeveloperRegistrationService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/developer_registration_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/client.rb deleted file mode 100644 index 56605c0d6986..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/client.rb +++ /dev/null @@ -1,698 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/developerregistration_pb" -require "google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module DeveloperRegistrationService - module Rest - ## - # REST client for the DeveloperRegistrationService service. - # - # Service to access Developer Registration. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :developer_registration_service_stub - - ## - # Configure the DeveloperRegistrationService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DeveloperRegistrationService clients - # ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DeveloperRegistrationService 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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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 - @developer_registration_service_stub.universe_domain - end - - ## - # Create a new DeveloperRegistrationService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DeveloperRegistrationService 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 - - @developer_registration_service_stub = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @developer_registration_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 - @developer_registration_service_stub.logger - end - - # Service calls - - ## - # Registers the GCP used for the API call to the shopping account passed in - # the request. Will create a user with an "API developer" and add the - # "developer_email" as a contact with "API notifications" email preference - # on. - # - # @overload register_gcp(request, options = nil) - # Pass arguments to `register_gcp` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload register_gcp(name: nil, developer_email: nil) - # Pass arguments to `register_gcp` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the developer registration to be created for the - # merchant account that the GCP will be registered with. Format: - # `accounts/{account}/developerRegistration` - # @param developer_email [::String] - # Immutable. Optional field. Developer role can be also added by using - # `users.update` method. If the developer email provided is associated with a - # user in the provided merchant account, the user will be updated to have - # `API_DEVELOPER` `access_rights` and the email preference corresponding to - # that user will be updated to have the new API notifications preference. If - # the developer email provided is not associated with any user, it is added - # as a contact. The email preference corresponding to that contact will have - # the new API notifications preference. Make sure the email used is - # associated with a Google Account and is not a service account as service - # accounts can't receive emails. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new - # - # # Call the register_gcp method. - # result = client.register_gcp request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration. - # p result - # - def register_gcp request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.register_gcp.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.register_gcp.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.register_gcp.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_registration_service_stub.register_gcp request, 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 a developer registration for a merchant. - # - # @overload get_developer_registration(request, options = nil) - # Pass arguments to `get_developer_registration` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_developer_registration(name: nil) - # Pass arguments to `get_developer_registration` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` (ID) of the developer registration. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new - # - # # Call the get_developer_registration method. - # result = client.get_developer_registration request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration. - # p result - # - def get_developer_registration request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_developer_registration.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_developer_registration.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_developer_registration.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_registration_service_stub.get_developer_registration request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Unregister the calling GCP from the calling shopping account. Note that the - # GCP will still be able to access the API for at most 1 day from the - # unregister succussful call. - # - # @overload unregister_gcp(request, options = nil) - # Pass arguments to `unregister_gcp` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload unregister_gcp(name: nil) - # Pass arguments to `unregister_gcp` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the developer registration to be created for the - # merchant account that the GCP will be registered with. Format: - # `accounts/{account}/developerRegistration` - # @yield [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/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new - # - # # Call the unregister_gcp method. - # result = client.unregister_gcp request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def unregister_gcp request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.unregister_gcp.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.unregister_gcp.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.unregister_gcp.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_registration_service_stub.unregister_gcp request, 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 the merchant account that the calling GCP is registered with. - # - # @overload get_account_for_gcp_registration(request, options = nil) - # Pass arguments to `get_account_for_gcp_registration` via a request object, either of type - # {::Google::Protobuf::Empty} or an equivalent Hash. - # - # @param request [::Google::Protobuf::Empty, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Protobuf::Empty.new - # - # # Call the get_account_for_gcp_registration method. - # result = client.get_account_for_gcp_registration request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse. - # p result - # - def get_account_for_gcp_registration request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Protobuf::Empty - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_account_for_gcp_registration.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_account_for_gcp_registration.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_account_for_gcp_registration.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_registration_service_stub.get_account_for_gcp_registration request, 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 DeveloperRegistrationService REST API. - # - # This class represents the configuration for DeveloperRegistrationService 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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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 - # # register_gcp to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.register_gcp.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.register_gcp.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 DeveloperRegistrationService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `register_gcp` - # @return [::Gapic::Config::Method] - # - attr_reader :register_gcp - ## - # RPC-specific configuration for `get_developer_registration` - # @return [::Gapic::Config::Method] - # - attr_reader :get_developer_registration - ## - # RPC-specific configuration for `unregister_gcp` - # @return [::Gapic::Config::Method] - # - attr_reader :unregister_gcp - ## - # RPC-specific configuration for `get_account_for_gcp_registration` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account_for_gcp_registration - - # @private - def initialize parent_rpcs = nil - register_gcp_config = parent_rpcs.register_gcp if parent_rpcs.respond_to? :register_gcp - @register_gcp = ::Gapic::Config::Method.new register_gcp_config - get_developer_registration_config = parent_rpcs.get_developer_registration if parent_rpcs.respond_to? :get_developer_registration - @get_developer_registration = ::Gapic::Config::Method.new get_developer_registration_config - unregister_gcp_config = parent_rpcs.unregister_gcp if parent_rpcs.respond_to? :unregister_gcp - @unregister_gcp = ::Gapic::Config::Method.new unregister_gcp_config - get_account_for_gcp_registration_config = parent_rpcs.get_account_for_gcp_registration if parent_rpcs.respond_to? :get_account_for_gcp_registration - @get_account_for_gcp_registration = ::Gapic::Config::Method.new get_account_for_gcp_registration_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub.rb deleted file mode 100644 index 3d20adc7d262..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub.rb +++ /dev/null @@ -1,327 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/developerregistration_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module DeveloperRegistrationService - module Rest - ## - # REST service stub for the DeveloperRegistrationService 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 register_gcp REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] - # A result object deserialized from the server's reply - def register_gcp request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_register_gcp_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "register_gcp", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_developer_registration REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] - # A result object deserialized from the server's reply - def get_developer_registration request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_developer_registration_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_developer_registration", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the unregister_gcp REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 unregister_gcp request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_unregister_gcp_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "unregister_gcp", - 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_account_for_gcp_registration REST call - # - # @param request_pb [::Google::Protobuf::Empty] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse] - # A result object deserialized from the server's reply - def get_account_for_gcp_registration request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_account_for_gcp_registration_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_account_for_gcp_registration", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse.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 register_gcp REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_register_gcp_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{name}:registerGcp", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/developerRegistration/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_developer_registration REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_developer_registration_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/developerRegistration/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the unregister_gcp REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_unregister_gcp_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{name}:unregisterGcp", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/developerRegistration/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_account_for_gcp_registration REST call - # - # @param request_pb [::Google::Protobuf::Empty] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_account_for_gcp_registration_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/accounts:getAccountForGcpRegistration", - matches: [] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_pb.rb deleted file mode 100644 index b8290227687b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/developerregistration.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n@google/shopping/merchant/accounts/v1/developerregistration.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xd1\x01\n\x15\x44\x65veloperRegistration\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07gcp_ids\x18\x02 \x03(\tB\x03\xe0\x41\x03:\x8e\x01\xea\x41\x8a\x01\n0merchantapi.googleapis.com/DeveloperRegistration\x12(accounts/{account}/developerRegistration*\x15\x64\x65veloperRegistration2\x15\x64\x65veloperRegistration\"z\n\x12RegisterGcpRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/DeveloperRegistration\x12\x1c\n\x0f\x64\x65veloper_email\x18\x02 \x01(\tB\x03\xe0\x41\x05\"^\n\x14UnregisterGcpRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/DeveloperRegistration\"i\n\x1fGetDeveloperRegistrationRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/DeveloperRegistration\"4\n$GetAccountForGcpRegistrationResponse\x12\x0c\n\x04name\x18\x01 \x01(\t2\x97\x07\n\x1c\x44\x65veloperRegistrationService\x12\xd1\x01\n\x0bRegisterGcp\x12\x38.google.shopping.merchant.accounts.v1.RegisterGcpRequest\x1a;.google.shopping.merchant.accounts.v1.DeveloperRegistration\"K\x82\xd3\xe4\x93\x02\x45\"@/accounts/v1/{name=accounts/*/developerRegistration}:registerGcp:\x01*\x12\xe3\x01\n\x18GetDeveloperRegistration\x12\x45.google.shopping.merchant.accounts.v1.GetDeveloperRegistrationRequest\x1a;.google.shopping.merchant.accounts.v1.DeveloperRegistration\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/accounts/v1/{name=accounts/*/developerRegistration}\x12\xb2\x01\n\rUnregisterGcp\x12:.google.shopping.merchant.accounts.v1.UnregisterGcpRequest\x1a\x16.google.protobuf.Empty\"M\x82\xd3\xe4\x93\x02G\"B/accounts/v1/{name=accounts/*/developerRegistration}:unregisterGcp:\x01*\x12\xbe\x01\n\x1cGetAccountForGcpRegistration\x12\x16.google.protobuf.Empty\x1aJ.google.shopping.merchant.accounts.v1.GetAccountForGcpRegistrationResponse\":\x82\xd3\xe4\x93\x02\x34\x12\x32/accounts/v1/accounts:getAccountForGcpRegistration\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8d\x02\n(com.google.shopping.merchant.accounts.v1B\x1a\x44\x65veloperRegistrationProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - DeveloperRegistration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DeveloperRegistration").msgclass - RegisterGcpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.RegisterGcpRequest").msgclass - UnregisterGcpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UnregisterGcpRequest").msgclass - GetDeveloperRegistrationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetDeveloperRegistrationRequest").msgclass - GetAccountForGcpRegistrationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAccountForGcpRegistrationResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_services_pb.rb deleted file mode 100644 index d08d9b6e8dfb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_services_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/developerregistration.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/developerregistration_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module DeveloperRegistrationService - # Service to access Developer Registration. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.DeveloperRegistrationService' - - # Registers the GCP used for the API call to the shopping account passed in - # the request. Will create a user with an "API developer" and add the - # "developer_email" as a contact with "API notifications" email preference - # on. - rpc :RegisterGcp, ::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest, ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration - # Retrieves a developer registration for a merchant. - rpc :GetDeveloperRegistration, ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest, ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration - # Unregister the calling GCP from the calling shopping account. Note that the - # GCP will still be able to access the API for at most 1 day from the - # unregister succussful call. - rpc :UnregisterGcp, ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest, ::Google::Protobuf::Empty - # Retrieves the merchant account that the calling GCP is registered with. - rpc :GetAccountForGcpRegistration, ::Google::Protobuf::Empty, ::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service.rb deleted file mode 100644 index 260618d16303..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/email_preferences_service/credentials" -require "google/shopping/merchant/accounts/v1/email_preferences_service/paths" -require "google/shopping/merchant/accounts/v1/email_preferences_service/client" -require "google/shopping/merchant/accounts/v1/email_preferences_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support the `EmailPreferences` API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/email_preferences_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/email_preferences_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new - # - module EmailPreferencesService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "email_preferences_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/email_preferences_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/client.rb deleted file mode 100644 index 672354a4b568..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/client.rb +++ /dev/null @@ -1,596 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/emailpreferences_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module EmailPreferencesService - ## - # Client for the EmailPreferencesService service. - # - # Service to support the `EmailPreferences` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :email_preferences_service_stub - - ## - # Configure the EmailPreferencesService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EmailPreferencesService clients - # ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EmailPreferencesService 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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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 - @email_preferences_service_stub.universe_domain - end - - ## - # Create a new EmailPreferencesService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EmailPreferencesService 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/shopping/merchant/accounts/v1/emailpreferences_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 - - @email_preferences_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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 - ) - - @email_preferences_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 - @email_preferences_service_stub.logger - end - - # Service calls - - ## - # Returns the email preferences for a Merchant Center account user. - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # Use the name=accounts/*/users/me/emailPreferences alias to get preferences - # for the authenticated user. - # - # @overload get_email_preferences(request, options = nil) - # Pass arguments to `get_email_preferences` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_email_preferences(name: nil) - # Pass arguments to `get_email_preferences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `EmailPreferences` resource. - # Format: `accounts/{account}/users/{email}/emailPreferences` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new - # - # # Call the get_email_preferences method. - # result = client.get_email_preferences request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. - # p result - # - def get_email_preferences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_email_preferences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_email_preferences.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_email_preferences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @email_preferences_service_stub.call_rpc :get_email_preferences, request, 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 email preferences for a Merchant Center account user. Advanced - # account users should specify the advanced account rather than a sub-account - # of the advanced account. - # - # Preferences which are not explicitly selected in the update mask will not - # be updated. - # - # It is invalid for updates to specify an UNCONFIRMED opt-in status value. - # - # Use the name=accounts/*/users/me/emailPreferences alias to update - # preferences - # for the authenticated user. - # - # @overload update_email_preferences(request, options = nil) - # Pass arguments to `update_email_preferences` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_email_preferences(email_preferences: nil, update_mask: nil) - # Pass arguments to `update_email_preferences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param email_preferences [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences, ::Hash] - # Required. Email Preferences to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `news_and_tips` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new - # - # # Call the update_email_preferences method. - # result = client.update_email_preferences request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. - # p result - # - def update_email_preferences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest - - # Converts hash and nil to 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_email_preferences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.email_preferences&.name - header_params["email_preferences.name"] = request.email_preferences.name - end - - request_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_email_preferences.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_email_preferences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @email_preferences_service_stub.call_rpc :update_email_preferences, request, 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 EmailPreferencesService API. - # - # This class represents the configuration for EmailPreferencesService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_email_preferences to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_email_preferences.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_email_preferences.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 EmailPreferencesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_email_preferences` - # @return [::Gapic::Config::Method] - # - attr_reader :get_email_preferences - ## - # RPC-specific configuration for `update_email_preferences` - # @return [::Gapic::Config::Method] - # - attr_reader :update_email_preferences - - # @private - def initialize parent_rpcs = nil - get_email_preferences_config = parent_rpcs.get_email_preferences if parent_rpcs.respond_to? :get_email_preferences - @get_email_preferences = ::Gapic::Config::Method.new get_email_preferences_config - update_email_preferences_config = parent_rpcs.update_email_preferences if parent_rpcs.respond_to? :update_email_preferences - @update_email_preferences = ::Gapic::Config::Method.new update_email_preferences_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/credentials.rb deleted file mode 100644 index 15d792218b91..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_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 Shopping - module Merchant - module Accounts - module V1 - module EmailPreferencesService - # Credentials for the EmailPreferencesService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/paths.rb deleted file mode 100644 index 2f6437fe5b2c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/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 Shopping - module Merchant - module Accounts - module V1 - module EmailPreferencesService - # Path helper methods for the EmailPreferencesService API. - module Paths - ## - # Create a fully-qualified EmailPreferences resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/users/{email}/emailPreferences` - # - # @param account [String] - # @param email [String] - # - # @return [::String] - def email_preferences_path account:, email: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/users/#{email}/emailPreferences" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest.rb deleted file mode 100644 index 00293d072efa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/email_preferences_service/credentials" -require "google/shopping/merchant/accounts/v1/email_preferences_service/paths" -require "google/shopping/merchant/accounts/v1/email_preferences_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support the `EmailPreferences` API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/email_preferences_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new - # - module EmailPreferencesService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/email_preferences_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/client.rb deleted file mode 100644 index 7adbf1c8b3fa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/client.rb +++ /dev/null @@ -1,539 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/emailpreferences_pb" -require "google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module EmailPreferencesService - module Rest - ## - # REST client for the EmailPreferencesService service. - # - # Service to support the `EmailPreferences` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :email_preferences_service_stub - - ## - # Configure the EmailPreferencesService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EmailPreferencesService clients - # ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EmailPreferencesService 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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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 - @email_preferences_service_stub.universe_domain - end - - ## - # Create a new EmailPreferencesService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EmailPreferencesService 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 - - @email_preferences_service_stub = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @email_preferences_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 - @email_preferences_service_stub.logger - end - - # Service calls - - ## - # Returns the email preferences for a Merchant Center account user. - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # Use the name=accounts/*/users/me/emailPreferences alias to get preferences - # for the authenticated user. - # - # @overload get_email_preferences(request, options = nil) - # Pass arguments to `get_email_preferences` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_email_preferences(name: nil) - # Pass arguments to `get_email_preferences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `EmailPreferences` resource. - # Format: `accounts/{account}/users/{email}/emailPreferences` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new - # - # # Call the get_email_preferences method. - # result = client.get_email_preferences request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. - # p result - # - def get_email_preferences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_email_preferences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_email_preferences.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_email_preferences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @email_preferences_service_stub.get_email_preferences request, 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 email preferences for a Merchant Center account user. Advanced - # account users should specify the advanced account rather than a sub-account - # of the advanced account. - # - # Preferences which are not explicitly selected in the update mask will not - # be updated. - # - # It is invalid for updates to specify an UNCONFIRMED opt-in status value. - # - # Use the name=accounts/*/users/me/emailPreferences alias to update - # preferences - # for the authenticated user. - # - # @overload update_email_preferences(request, options = nil) - # Pass arguments to `update_email_preferences` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_email_preferences(email_preferences: nil, update_mask: nil) - # Pass arguments to `update_email_preferences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param email_preferences [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences, ::Hash] - # Required. Email Preferences to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `news_and_tips` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new - # - # # Call the update_email_preferences method. - # result = client.update_email_preferences request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. - # p result - # - def update_email_preferences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest - - # Converts hash and nil to an 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_email_preferences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_email_preferences.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_email_preferences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @email_preferences_service_stub.update_email_preferences request, 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 EmailPreferencesService REST API. - # - # This class represents the configuration for EmailPreferencesService 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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_email_preferences to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_email_preferences.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_email_preferences.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 EmailPreferencesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_email_preferences` - # @return [::Gapic::Config::Method] - # - attr_reader :get_email_preferences - ## - # RPC-specific configuration for `update_email_preferences` - # @return [::Gapic::Config::Method] - # - attr_reader :update_email_preferences - - # @private - def initialize parent_rpcs = nil - get_email_preferences_config = parent_rpcs.get_email_preferences if parent_rpcs.respond_to? :get_email_preferences - @get_email_preferences = ::Gapic::Config::Method.new get_email_preferences_config - update_email_preferences_config = parent_rpcs.update_email_preferences if parent_rpcs.respond_to? :update_email_preferences - @update_email_preferences = ::Gapic::Config::Method.new update_email_preferences_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub.rb deleted file mode 100644 index b3796dc285a3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/emailpreferences_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module EmailPreferencesService - module Rest - ## - # REST service stub for the EmailPreferencesService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_email_preferences REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] - # A result object deserialized from the server's reply - def get_email_preferences request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_email_preferences_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_email_preferences", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.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_email_preferences REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] - # A result object deserialized from the server's reply - def update_email_preferences request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_email_preferences_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_email_preferences", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_email_preferences REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_email_preferences_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/users/[^/]+/emailPreferences/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_email_preferences REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest] - # 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_email_preferences_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1/{email_preferences.name}", - body: "email_preferences", - matches: [ - ["email_preferences.name", %r{^accounts/[^/]+/users/[^/]+/emailPreferences/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_pb.rb deleted file mode 100644 index 5fa69b2e6387..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/emailpreferences.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n;google/shopping/merchant/accounts/v1/emailpreferences.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xe9\x02\n\x10\x45mailPreferences\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12]\n\rnews_and_tips\x18\x02 \x01(\x0e\x32\x41.google.shopping.merchant.accounts.v1.EmailPreferences.OptInStateB\x03\xe0\x41\x01\"X\n\nOptInState\x12\x1c\n\x18OPT_IN_STATE_UNSPECIFIED\x10\x00\x12\r\n\tOPTED_OUT\x10\x01\x12\x0c\n\x08OPTED_IN\x10\x02\x12\x0f\n\x0bUNCONFIRMED\x10\x03:\x88\x01\xea\x41\x84\x01\n+merchantapi.googleapis.com/EmailPreferences\x12\x31\x61\x63\x63ounts/{account}/users/{email}/emailPreferences*\x10\x65mailPreferences2\x10\x65mailPreferences\"_\n\x1aGetEmailPreferencesRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/EmailPreferences\"\xad\x01\n\x1dUpdateEmailPreferencesRequest\x12V\n\x11\x65mail_preferences\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.EmailPreferencesB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xdb\x04\n\x17\x45mailPreferencesService\x12\xd7\x01\n\x13GetEmailPreferences\x12@.google.shopping.merchant.accounts.v1.GetEmailPreferencesRequest\x1a\x36.google.shopping.merchant.accounts.v1.EmailPreferences\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/accounts/v1/{name=accounts/*/users/*/emailPreferences}\x12\x9c\x02\n\x16UpdateEmailPreferences\x12\x43.google.shopping.merchant.accounts.v1.UpdateEmailPreferencesRequest\x1a\x36.google.shopping.merchant.accounts.v1.EmailPreferences\"\x84\x01\xda\x41\x1d\x65mail_preferences,update_mask\x82\xd3\xe4\x93\x02^2I/accounts/v1/{email_preferences.name=accounts/*/users/*/emailPreferences}:\x11\x65mail_preferences\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x88\x02\n(com.google.shopping.merchant.accounts.v1B\x15\x45mailPreferencesProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - EmailPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.EmailPreferences").msgclass - EmailPreferences::OptInState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.EmailPreferences.OptInState").enummodule - GetEmailPreferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetEmailPreferencesRequest").msgclass - UpdateEmailPreferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateEmailPreferencesRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_services_pb.rb deleted file mode 100644 index a5f007dd29e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_services_pb.rb +++ /dev/null @@ -1,64 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/emailpreferences.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/emailpreferences_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module EmailPreferencesService - # Service to support the `EmailPreferences` API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.EmailPreferencesService' - - # Returns the email preferences for a Merchant Center account user. - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # Use the name=accounts/*/users/me/emailPreferences alias to get preferences - # for the authenticated user. - rpc :GetEmailPreferences, ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest, ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences - # Updates the email preferences for a Merchant Center account user. Advanced - # account users should specify the advanced account rather than a sub-account - # of the advanced account. - # - # Preferences which are not explicitly selected in the update mask will not - # be updated. - # - # It is invalid for updates to specify an UNCONFIRMED opt-in status value. - # - # Use the name=accounts/*/users/me/emailPreferences alias to update - # preferences - # for the authenticated user. - rpc :UpdateEmailPreferences, ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest, ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service.rb deleted file mode 100644 index d118d1f05be0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials" -require "google/shopping/merchant/accounts/v1/gbp_accounts_service/paths" -require "google/shopping/merchant/accounts/v1/gbp_accounts_service/client" -require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - {::Google::Shopping::Merchant::Accounts::V1::GbpAccount GbpAccount} - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/gbp_accounts_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new - # - module GbpAccountsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "gbp_accounts_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/gbp_accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/client.rb deleted file mode 100644 index 9f6980ce46ca..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/client.rb +++ /dev/null @@ -1,602 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/gbpaccounts_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module GbpAccountsService - ## - # Client for the GbpAccountsService service. - # - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - {::Google::Shopping::Merchant::Accounts::V1::GbpAccount GbpAccount} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :gbp_accounts_service_stub - - ## - # Configure the GbpAccountsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all GbpAccountsService clients - # ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the GbpAccountsService 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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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 - @gbp_accounts_service_stub.universe_domain - end - - ## - # Create a new GbpAccountsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the GbpAccountsService 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/shopping/merchant/accounts/v1/gbpaccounts_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 - - @gbp_accounts_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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 - ) - - @gbp_accounts_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 - @gbp_accounts_service_stub.logger - end - - # Service calls - - ## - # List the GBP accounts for a given merchant. - # - # @overload list_gbp_accounts(request, options = nil) - # Pass arguments to `list_gbp_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_gbp_accounts(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gbp_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 parent resource under which the GBP accounts are - # listed. Format: `accounts/{account}`. - # @param page_size [::Integer] - # Optional. The maximum number of `GbpAccount` resources to return. The - # service returns fewer than this value if the number of gbp accounts is less - # that than the `pageSize`. The default value is 50. The maximum value is - # 1000; If a value higher than the maximum is specified, then the `pageSize` - # will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListGbpAccounts` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListGbpAccounts` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::GbpAccount>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::GbpAccount>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.new - # - # # Call the list_gbp_accounts method. - # result = client.list_gbp_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::GbpAccount. - # p item - # end - # - def list_gbp_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_gbp_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_gbp_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_gbp_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gbp_accounts_service_stub.call_rpc :list_gbp_accounts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gbp_accounts_service_stub, :list_gbp_accounts, 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 - - ## - # Link the specified merchant to a GBP account for all countries. - # - # To run this method, you must have admin access to the Merchant Center - # account. If you don't have admin access, the request fails with the error - # message `User is not an administrator of account {ACCOUNT_ID}`. - # - # @overload link_gbp_account(request, options = nil) - # Pass arguments to `link_gbp_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload link_gbp_account(parent: nil, gbp_email: nil) - # Pass arguments to `link_gbp_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 parent resource to which the GBP account is - # linked. Format: `accounts/{account}`. - # @param gbp_email [::String] - # Required. The email address of the Business Profile account. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new - # - # # Call the link_gbp_account method. - # result = client.link_gbp_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse. - # p result - # - def link_gbp_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.link_gbp_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.link_gbp_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.link_gbp_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gbp_accounts_service_stub.call_rpc :link_gbp_account, request, 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 GbpAccountsService API. - # - # This class represents the configuration for GbpAccountsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_gbp_accounts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_gbp_accounts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_gbp_accounts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 GbpAccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_gbp_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gbp_accounts - ## - # RPC-specific configuration for `link_gbp_account` - # @return [::Gapic::Config::Method] - # - attr_reader :link_gbp_account - - # @private - def initialize parent_rpcs = nil - list_gbp_accounts_config = parent_rpcs.list_gbp_accounts if parent_rpcs.respond_to? :list_gbp_accounts - @list_gbp_accounts = ::Gapic::Config::Method.new list_gbp_accounts_config - link_gbp_account_config = parent_rpcs.link_gbp_account if parent_rpcs.respond_to? :link_gbp_account - @link_gbp_account = ::Gapic::Config::Method.new link_gbp_account_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials.rb deleted file mode 100644 index 6a603b611016..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_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 Shopping - module Merchant - module Accounts - module V1 - module GbpAccountsService - # Credentials for the GbpAccountsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/paths.rb deleted file mode 100644 index df9bed06fde0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/paths.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 Shopping - module Merchant - module Accounts - module V1 - module GbpAccountsService - # Path helper methods for the GbpAccountsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest.rb deleted file mode 100644 index 350bccfeadbb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials" -require "google/shopping/merchant/accounts/v1/gbp_accounts_service/paths" -require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - {::Google::Shopping::Merchant::Accounts::V1::GbpAccount GbpAccount} - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new - # - module GbpAccountsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client.rb deleted file mode 100644 index 1c360a84d45a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client.rb +++ /dev/null @@ -1,545 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/gbpaccounts_pb" -require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module GbpAccountsService - module Rest - ## - # REST client for the GbpAccountsService service. - # - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - {::Google::Shopping::Merchant::Accounts::V1::GbpAccount GbpAccount} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :gbp_accounts_service_stub - - ## - # Configure the GbpAccountsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all GbpAccountsService clients - # ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the GbpAccountsService 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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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 - @gbp_accounts_service_stub.universe_domain - end - - ## - # Create a new GbpAccountsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the GbpAccountsService 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 - - @gbp_accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @gbp_accounts_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 - @gbp_accounts_service_stub.logger - end - - # Service calls - - ## - # List the GBP accounts for a given merchant. - # - # @overload list_gbp_accounts(request, options = nil) - # Pass arguments to `list_gbp_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_gbp_accounts(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gbp_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 parent resource under which the GBP accounts are - # listed. Format: `accounts/{account}`. - # @param page_size [::Integer] - # Optional. The maximum number of `GbpAccount` resources to return. The - # service returns fewer than this value if the number of gbp accounts is less - # that than the `pageSize`. The default value is 50. The maximum value is - # 1000; If a value higher than the maximum is specified, then the `pageSize` - # will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListGbpAccounts` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListGbpAccounts` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::GbpAccount>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::GbpAccount>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.new - # - # # Call the list_gbp_accounts method. - # result = client.list_gbp_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::GbpAccount. - # p item - # end - # - def list_gbp_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_gbp_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_gbp_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_gbp_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gbp_accounts_service_stub.list_gbp_accounts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gbp_accounts_service_stub, :list_gbp_accounts, "gbp_accounts", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Link the specified merchant to a GBP account for all countries. - # - # To run this method, you must have admin access to the Merchant Center - # account. If you don't have admin access, the request fails with the error - # message `User is not an administrator of account {ACCOUNT_ID}`. - # - # @overload link_gbp_account(request, options = nil) - # Pass arguments to `link_gbp_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload link_gbp_account(parent: nil, gbp_email: nil) - # Pass arguments to `link_gbp_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 parent resource to which the GBP account is - # linked. Format: `accounts/{account}`. - # @param gbp_email [::String] - # Required. The email address of the Business Profile account. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new - # - # # Call the link_gbp_account method. - # result = client.link_gbp_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse. - # p result - # - def link_gbp_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.link_gbp_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.link_gbp_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.link_gbp_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gbp_accounts_service_stub.link_gbp_account request, 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 GbpAccountsService REST API. - # - # This class represents the configuration for GbpAccountsService 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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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_gbp_accounts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_gbp_accounts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_gbp_accounts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 GbpAccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_gbp_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gbp_accounts - ## - # RPC-specific configuration for `link_gbp_account` - # @return [::Gapic::Config::Method] - # - attr_reader :link_gbp_account - - # @private - def initialize parent_rpcs = nil - list_gbp_accounts_config = parent_rpcs.list_gbp_accounts if parent_rpcs.respond_to? :list_gbp_accounts - @list_gbp_accounts = ::Gapic::Config::Method.new list_gbp_accounts_config - link_gbp_account_config = parent_rpcs.link_gbp_account if parent_rpcs.respond_to? :link_gbp_account - @link_gbp_account = ::Gapic::Config::Method.new link_gbp_account_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub.rb deleted file mode 100644 index 48bb92b3f0c6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/gbpaccounts_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module GbpAccountsService - module Rest - ## - # REST service stub for the GbpAccountsService 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_gbp_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse] - # A result object deserialized from the server's reply - def list_gbp_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_gbp_accounts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_gbp_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the link_gbp_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] - # A result object deserialized from the server's reply - def link_gbp_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_link_gbp_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "link_gbp_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse.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_gbp_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_gbp_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{parent}/gbpAccounts", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the link_gbp_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_link_gbp_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{parent}/gbpAccounts:linkGbpAccount", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_pb.rb deleted file mode 100644 index d19682bba088..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/gbpaccounts.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n6google/shopping/merchant/accounts/v1/gbpaccounts.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xde\x02\n\nGbpAccount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\x0egbp_account_id\x18\x02 \x01(\t\x12\x43\n\x04type\x18\x03 \x01(\x0e\x32\x35.google.shopping.merchant.accounts.v1.GbpAccount.Type\x12\x18\n\x10gbp_account_name\x18\x05 \x01(\t\x12\x15\n\rlisting_count\x18\x06 \x01(\x03\"<\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x14\n\x10\x42USINESS_ACCOUNT\x10\x02:q\xea\x41n\n%merchantapi.googleapis.com/GbpAccount\x12,accounts/{account}/gbpAccounts/{gbp_account}*\x0bgbpAccounts2\ngbpAccount\"\x85\x01\n\x16ListGbpAccountsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"z\n\x17ListGbpAccountsResponse\x12\x46\n\x0cgbp_accounts\x18\x01 \x03(\x0b\x32\x30.google.shopping.merchant.accounts.v1.GbpAccount\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"k\n\x15LinkGbpAccountRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tgbp_email\x18\x02 \x01(\tB\x03\xe0\x41\x02\"B\n\x16LinkGbpAccountResponse\x12(\n\x08response\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Empty2\x8c\x04\n\x12GbpAccountsService\x12\xcd\x01\n\x0fListGbpAccounts\x12<.google.shopping.merchant.accounts.v1.ListGbpAccountsRequest\x1a=.google.shopping.merchant.accounts.v1.ListGbpAccountsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/accounts/v1/{parent=accounts/*}/gbpAccounts\x12\xdc\x01\n\x0eLinkGbpAccount\x12;.google.shopping.merchant.accounts.v1.LinkGbpAccountRequest\x1a<.google.shopping.merchant.accounts.v1.LinkGbpAccountResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\";/accounts/v1/{parent=accounts/*}/gbpAccounts:linkGbpAccount:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x83\x02\n(com.google.shopping.merchant.accounts.v1B\x10GbpAccountsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - GbpAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GbpAccount").msgclass - GbpAccount::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GbpAccount.Type").enummodule - ListGbpAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListGbpAccountsRequest").msgclass - ListGbpAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListGbpAccountsResponse").msgclass - LinkGbpAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LinkGbpAccountRequest").msgclass - LinkGbpAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LinkGbpAccountResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_services_pb.rb deleted file mode 100644 index 1b507b506fae..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_services_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/gbpaccounts.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/gbpaccounts_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module GbpAccountsService - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.GbpAccountsService' - - # List the GBP accounts for a given merchant. - rpc :ListGbpAccounts, ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse - # Link the specified merchant to a GBP account for all countries. - # - # To run this method, you must have admin access to the Merchant Center - # account. If you don't have admin access, the request fails with the error - # message `User is not an administrator of account {ACCOUNT_ID}`. - rpc :LinkGbpAccount, ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest, ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_pb.rb deleted file mode 100644 index dc2a670c6dcb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/homepage.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n3google/shopping/merchant/accounts/v1/homepage.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xae\x01\n\x08Homepage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x15\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x14\n\x07\x63laimed\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03:Z\xea\x41W\n#merchantapi.googleapis.com/Homepage\x12\x1b\x61\x63\x63ounts/{account}/homepage*\thomepages2\x08homepageB\x06\n\x04_uri\"O\n\x12GetHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage\"\x94\x01\n\x15UpdateHomepageRequest\x12\x45\n\x08homepage\x18\x01 \x01(\x0b\x32..google.shopping.merchant.accounts.v1.HomepageB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"i\n\x14\x43laimHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage\x12\x16\n\toverwrite\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"S\n\x16UnclaimHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage2\xdd\x06\n\x0fHomepageService\x12\xaf\x01\n\x0bGetHomepage\x12\x38.google.shopping.merchant.accounts.v1.GetHomepageRequest\x1a..google.shopping.merchant.accounts.v1.Homepage\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)\x12\'/accounts/v1/{name=accounts/*/homepage}\x12\xd8\x01\n\x0eUpdateHomepage\x12;.google.shopping.merchant.accounts.v1.UpdateHomepageRequest\x1a..google.shopping.merchant.accounts.v1.Homepage\"Y\xda\x41\x14homepage,update_mask\x82\xd3\xe4\x93\x02<20/accounts/v1/{homepage.name=accounts/*/homepage}:\x08homepage\x12\xb5\x01\n\rClaimHomepage\x12:.google.shopping.merchant.accounts.v1.ClaimHomepageRequest\x1a..google.shopping.merchant.accounts.v1.Homepage\"8\x82\xd3\xe4\x93\x02\x32\"-/accounts/v1/{name=accounts/*/homepage}:claim:\x01*\x12\xbb\x01\n\x0fUnclaimHomepage\x12<.google.shopping.merchant.accounts.v1.UnclaimHomepageRequest\x1a..google.shopping.merchant.accounts.v1.Homepage\":\x82\xd3\xe4\x93\x02\x34\"//accounts/v1/{name=accounts/*/homepage}:unclaim:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x80\x02\n(com.google.shopping.merchant.accounts.v1B\rHomepageProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - Homepage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Homepage").msgclass - GetHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetHomepageRequest").msgclass - UpdateHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateHomepageRequest").msgclass - ClaimHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ClaimHomepageRequest").msgclass - UnclaimHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UnclaimHomepageRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service.rb deleted file mode 100644 index a4cfc220507d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/homepage_service/credentials" -require "google/shopping/merchant/accounts/v1/homepage_service/paths" -require "google/shopping/merchant/accounts/v1/homepage_service/client" -require "google/shopping/merchant/accounts/v1/homepage_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support an API for a store's homepage. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/homepage_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/homepage_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new - # - module HomepageService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "homepage_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/homepage_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/client.rb deleted file mode 100644 index 076a29c20ab1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/client.rb +++ /dev/null @@ -1,791 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/homepage_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module HomepageService - ## - # Client for the HomepageService service. - # - # Service to support an API for a store's homepage. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :homepage_service_stub - - ## - # Configure the HomepageService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all HomepageService clients - # ::Google::Shopping::Merchant::Accounts::V1::HomepageService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the HomepageService 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::Shopping::Merchant::Accounts::V1::HomepageService::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 - @homepage_service_stub.universe_domain - end - - ## - # Create a new HomepageService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the HomepageService 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/shopping/merchant/accounts/v1/homepage_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 - - @homepage_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::HomepageService::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 - ) - - @homepage_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 - @homepage_service_stub.logger - end - - # Service calls - - ## - # Retrieves a store's homepage. - # - # @overload get_homepage(request, options = nil) - # Pass arguments to `get_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_homepage(name: nil) - # Pass arguments to `get_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to retrieve. - # Format: `accounts/{account}/homepage` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new - # - # # Call the get_homepage method. - # result = client.get_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. - # p result - # - def get_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_homepage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.call_rpc :get_homepage, request, 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 store's homepage. Executing this method requires admin access. - # - # @overload update_homepage(request, options = nil) - # Pass arguments to `update_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_homepage(homepage: nil, update_mask: nil) - # Pass arguments to `update_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param homepage [::Google::Shopping::Merchant::Accounts::V1::Homepage, ::Hash] - # Required. The new version of the homepage. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `uri` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new - # - # # Call the update_homepage method. - # result = client.update_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. - # p result - # - def update_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest - - # Converts hash and nil to 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_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.homepage&.name - header_params["homepage.name"] = request.homepage.name - end - - request_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_homepage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.call_rpc :update_homepage, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Claims a store's homepage. Executing this method requires admin access. - # - # If the homepage is already claimed, this will recheck the - # verification (unless the business is exempted from claiming, which also - # exempts from verification) and return a successful response. If ownership - # can no longer be verified, it will return an error, but it won't clear the - # claim. - # - # In case of failure, a canonical error message is returned: - # - # * PERMISSION_DENIED: User doesn't have the necessary permissions on this - # Merchant Center account. - # - # * FAILED_PRECONDITION: - # - # - The account is not a Merchant Center account. - # - # - Merchant Center account doesn't have a homepage. - # - # - Claiming failed (in this case the error message contains more - # details). - # - # @overload claim_homepage(request, options = nil) - # Pass arguments to `claim_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload claim_homepage(name: nil, overwrite: nil) - # Pass arguments to `claim_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to claim. - # Format: `accounts/{account}/homepage` - # @param overwrite [::Boolean] - # Optional. When set to `true`, this option removes any existing claim on the - # requested website from any other account to the account making the request, - # effectively replacing the previous claim. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new - # - # # Call the claim_homepage method. - # result = client.claim_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. - # p result - # - def claim_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.claim_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.claim_homepage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.claim_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.call_rpc :claim_homepage, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Unclaims a store's homepage. Executing this method requires admin access. - # - # @overload unclaim_homepage(request, options = nil) - # Pass arguments to `unclaim_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload unclaim_homepage(name: nil) - # Pass arguments to `unclaim_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to unclaim. - # Format: `accounts/{account}/homepage` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new - # - # # Call the unclaim_homepage method. - # result = client.unclaim_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. - # p result - # - def unclaim_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.unclaim_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.unclaim_homepage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.unclaim_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.call_rpc :unclaim_homepage, request, 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 HomepageService API. - # - # This class represents the configuration for HomepageService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_homepage to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_homepage.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_homepage.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::HomepageService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 HomepageService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :get_homepage - ## - # RPC-specific configuration for `update_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :update_homepage - ## - # RPC-specific configuration for `claim_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :claim_homepage - ## - # RPC-specific configuration for `unclaim_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :unclaim_homepage - - # @private - def initialize parent_rpcs = nil - get_homepage_config = parent_rpcs.get_homepage if parent_rpcs.respond_to? :get_homepage - @get_homepage = ::Gapic::Config::Method.new get_homepage_config - update_homepage_config = parent_rpcs.update_homepage if parent_rpcs.respond_to? :update_homepage - @update_homepage = ::Gapic::Config::Method.new update_homepage_config - claim_homepage_config = parent_rpcs.claim_homepage if parent_rpcs.respond_to? :claim_homepage - @claim_homepage = ::Gapic::Config::Method.new claim_homepage_config - unclaim_homepage_config = parent_rpcs.unclaim_homepage if parent_rpcs.respond_to? :unclaim_homepage - @unclaim_homepage = ::Gapic::Config::Method.new unclaim_homepage_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/credentials.rb deleted file mode 100644 index 61ceec6c39a1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_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 Shopping - module Merchant - module Accounts - module V1 - module HomepageService - # Credentials for the HomepageService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/paths.rb deleted file mode 100644 index 7d9d4f07af62..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/paths.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 Shopping - module Merchant - module Accounts - module V1 - module HomepageService - # Path helper methods for the HomepageService API. - module Paths - ## - # Create a fully-qualified Homepage resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/homepage` - # - # @param account [String] - # - # @return [::String] - def homepage_path account: - "accounts/#{account}/homepage" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest.rb deleted file mode 100644 index 7ea19263ba06..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/homepage_service/credentials" -require "google/shopping/merchant/accounts/v1/homepage_service/paths" -require "google/shopping/merchant/accounts/v1/homepage_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support an API for a store's homepage. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/homepage_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new - # - module HomepageService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/homepage_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/client.rb deleted file mode 100644 index b5cd4a5666c1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/client.rb +++ /dev/null @@ -1,720 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/homepage_pb" -require "google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module HomepageService - module Rest - ## - # REST client for the HomepageService service. - # - # Service to support an API for a store's homepage. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :homepage_service_stub - - ## - # Configure the HomepageService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all HomepageService clients - # ::Google::Shopping::Merchant::Accounts::V1::HomepageService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the HomepageService 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::Shopping::Merchant::Accounts::V1::HomepageService::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 - @homepage_service_stub.universe_domain - end - - ## - # Create a new HomepageService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the HomepageService 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 - - @homepage_service_stub = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @homepage_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 - @homepage_service_stub.logger - end - - # Service calls - - ## - # Retrieves a store's homepage. - # - # @overload get_homepage(request, options = nil) - # Pass arguments to `get_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_homepage(name: nil) - # Pass arguments to `get_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to retrieve. - # Format: `accounts/{account}/homepage` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new - # - # # Call the get_homepage method. - # result = client.get_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. - # p result - # - def get_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_homepage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.get_homepage request, 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 store's homepage. Executing this method requires admin access. - # - # @overload update_homepage(request, options = nil) - # Pass arguments to `update_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_homepage(homepage: nil, update_mask: nil) - # Pass arguments to `update_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param homepage [::Google::Shopping::Merchant::Accounts::V1::Homepage, ::Hash] - # Required. The new version of the homepage. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `uri` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new - # - # # Call the update_homepage method. - # result = client.update_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. - # p result - # - def update_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest - - # Converts hash and nil to an 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_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_homepage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.update_homepage request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Claims a store's homepage. Executing this method requires admin access. - # - # If the homepage is already claimed, this will recheck the - # verification (unless the business is exempted from claiming, which also - # exempts from verification) and return a successful response. If ownership - # can no longer be verified, it will return an error, but it won't clear the - # claim. - # - # In case of failure, a canonical error message is returned: - # - # * PERMISSION_DENIED: User doesn't have the necessary permissions on this - # Merchant Center account. - # - # * FAILED_PRECONDITION: - # - # - The account is not a Merchant Center account. - # - # - Merchant Center account doesn't have a homepage. - # - # - Claiming failed (in this case the error message contains more - # details). - # - # @overload claim_homepage(request, options = nil) - # Pass arguments to `claim_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload claim_homepage(name: nil, overwrite: nil) - # Pass arguments to `claim_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to claim. - # Format: `accounts/{account}/homepage` - # @param overwrite [::Boolean] - # Optional. When set to `true`, this option removes any existing claim on the - # requested website from any other account to the account making the request, - # effectively replacing the previous claim. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new - # - # # Call the claim_homepage method. - # result = client.claim_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. - # p result - # - def claim_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.claim_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.claim_homepage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.claim_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.claim_homepage request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Unclaims a store's homepage. Executing this method requires admin access. - # - # @overload unclaim_homepage(request, options = nil) - # Pass arguments to `unclaim_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload unclaim_homepage(name: nil) - # Pass arguments to `unclaim_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to unclaim. - # Format: `accounts/{account}/homepage` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new - # - # # Call the unclaim_homepage method. - # result = client.unclaim_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. - # p result - # - def unclaim_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.unclaim_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.unclaim_homepage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.unclaim_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.unclaim_homepage request, 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 HomepageService REST API. - # - # This class represents the configuration for HomepageService 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::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_homepage to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_homepage.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_homepage.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 HomepageService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :get_homepage - ## - # RPC-specific configuration for `update_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :update_homepage - ## - # RPC-specific configuration for `claim_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :claim_homepage - ## - # RPC-specific configuration for `unclaim_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :unclaim_homepage - - # @private - def initialize parent_rpcs = nil - get_homepage_config = parent_rpcs.get_homepage if parent_rpcs.respond_to? :get_homepage - @get_homepage = ::Gapic::Config::Method.new get_homepage_config - update_homepage_config = parent_rpcs.update_homepage if parent_rpcs.respond_to? :update_homepage - @update_homepage = ::Gapic::Config::Method.new update_homepage_config - claim_homepage_config = parent_rpcs.claim_homepage if parent_rpcs.respond_to? :claim_homepage - @claim_homepage = ::Gapic::Config::Method.new claim_homepage_config - unclaim_homepage_config = parent_rpcs.unclaim_homepage if parent_rpcs.respond_to? :unclaim_homepage - @unclaim_homepage = ::Gapic::Config::Method.new unclaim_homepage_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub.rb deleted file mode 100644 index 8a4823ca13a7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub.rb +++ /dev/null @@ -1,330 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/homepage_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module HomepageService - module Rest - ## - # REST service stub for the HomepageService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # A result object deserialized from the server's reply - def get_homepage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_homepage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_homepage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.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_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # A result object deserialized from the server's reply - def update_homepage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_homepage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_homepage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the claim_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # A result object deserialized from the server's reply - def claim_homepage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_claim_homepage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "claim_homepage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the unclaim_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # A result object deserialized from the server's reply - def unclaim_homepage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_unclaim_homepage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "unclaim_homepage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_homepage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/homepage/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest] - # 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_homepage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1/{homepage.name}", - body: "homepage", - matches: [ - ["homepage.name", %r{^accounts/[^/]+/homepage/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the claim_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_claim_homepage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{name}:claim", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/homepage/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the unclaim_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_unclaim_homepage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{name}:unclaim", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/homepage/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_services_pb.rb deleted file mode 100644 index 7b286df0e30c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_services_pb.rb +++ /dev/null @@ -1,73 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/homepage.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/homepage_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module HomepageService - # Service to support an API for a store's homepage. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.HomepageService' - - # Retrieves a store's homepage. - rpc :GetHomepage, ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1::Homepage - # Updates a store's homepage. Executing this method requires admin access. - rpc :UpdateHomepage, ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1::Homepage - # Claims a store's homepage. Executing this method requires admin access. - # - # If the homepage is already claimed, this will recheck the - # verification (unless the business is exempted from claiming, which also - # exempts from verification) and return a successful response. If ownership - # can no longer be verified, it will return an error, but it won't clear the - # claim. - # - # In case of failure, a canonical error message is returned: - # - # * PERMISSION_DENIED: User doesn't have the necessary permissions on this - # Merchant Center account. - # - # * FAILED_PRECONDITION: - # - # - The account is not a Merchant Center account. - # - # - Merchant Center account doesn't have a homepage. - # - # - Claiming failed (in this case the error message contains more - # details). - rpc :ClaimHomepage, ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1::Homepage - # Unclaims a store's homepage. Executing this method requires admin access. - rpc :UnclaimHomepage, ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1::Homepage - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service.rb deleted file mode 100644 index e00d95dd7c34..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/lfp_providers_service/credentials" -require "google/shopping/merchant/accounts/v1/lfp_providers_service/paths" -require "google/shopping/merchant/accounts/v1/lfp_providers_service/client" -require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - {::Google::Shopping::Merchant::Accounts::V1::LfpProvider LfpProvider} - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/lfp_providers_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new - # - module LfpProvidersService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "lfp_providers_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/lfp_providers_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/client.rb deleted file mode 100644 index 41df020407f6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/client.rb +++ /dev/null @@ -1,601 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/lfpproviders_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module LfpProvidersService - ## - # Client for the LfpProvidersService service. - # - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - {::Google::Shopping::Merchant::Accounts::V1::LfpProvider LfpProvider} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_providers_service_stub - - ## - # Configure the LfpProvidersService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpProvidersService clients - # ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpProvidersService 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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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 - @lfp_providers_service_stub.universe_domain - end - - ## - # Create a new LfpProvidersService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpProvidersService 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/shopping/merchant/accounts/v1/lfpproviders_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 - - @lfp_providers_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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 - ) - - @lfp_providers_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 - @lfp_providers_service_stub.logger - end - - # Service calls - - ## - # Find the LFP provider candidates in a given country. - # - # @overload find_lfp_providers(request, options = nil) - # Pass arguments to `find_lfp_providers` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload find_lfp_providers(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `find_lfp_providers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource under which the LFP providers are - # found. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. - # @param page_size [::Integer] - # Optional. The maximum number of `LfpProvider` resources to return. The - # service returns fewer than this value if the number of lfp providers is - # less that than the `pageSize`. The default value is 50. The maximum value - # is 1000; If a value higher than the maximum is specified, then the - # `pageSize` will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `FindLfpProviders` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `FindLfpProviders` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::LfpProvider>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::LfpProvider>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.new - # - # # Call the find_lfp_providers method. - # result = client.find_lfp_providers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::LfpProvider. - # p item - # end - # - def find_lfp_providers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.find_lfp_providers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.find_lfp_providers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.find_lfp_providers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_providers_service_stub.call_rpc :find_lfp_providers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Link the specified merchant to a LFP provider for the specified country. - # - # @overload link_lfp_provider(request, options = nil) - # Pass arguments to `link_lfp_provider` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload link_lfp_provider(name: nil, external_account_id: nil) - # Pass arguments to `link_lfp_provider` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the LFP provider resource to link. - # Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. - # The `lfp_provider` is the LFP provider ID. - # @param external_account_id [::String] - # Required. The external account ID by which this merchant is known to the - # LFP provider. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new - # - # # Call the link_lfp_provider method. - # result = client.link_lfp_provider request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse. - # p result - # - def link_lfp_provider request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.link_lfp_provider.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.link_lfp_provider.timeout, - metadata: metadata, - retry_policy: @config.rpcs.link_lfp_provider.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_providers_service_stub.call_rpc :link_lfp_provider, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the LfpProvidersService API. - # - # This class represents the configuration for LfpProvidersService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # find_lfp_providers to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.find_lfp_providers.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.find_lfp_providers.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpProvidersService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `find_lfp_providers` - # @return [::Gapic::Config::Method] - # - attr_reader :find_lfp_providers - ## - # RPC-specific configuration for `link_lfp_provider` - # @return [::Gapic::Config::Method] - # - attr_reader :link_lfp_provider - - # @private - def initialize parent_rpcs = nil - find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers - @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config - link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider - @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/credentials.rb deleted file mode 100644 index 312b978d0c4c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_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 Shopping - module Merchant - module Accounts - module V1 - module LfpProvidersService - # Credentials for the LfpProvidersService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/paths.rb deleted file mode 100644 index ff66fc5ca214..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/paths.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 Shopping - module Merchant - module Accounts - module V1 - module LfpProvidersService - # Path helper methods for the LfpProvidersService API. - module Paths - ## - # Create a fully-qualified LfpProvider resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}` - # - # @param account [String] - # @param omnichannel_setting [String] - # @param lfp_provider [String] - # - # @return [::String] - def lfp_provider_path account:, omnichannel_setting:, lfp_provider: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "omnichannel_setting cannot contain /" if omnichannel_setting.to_s.include? "/" - - "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}/lfpProviders/#{lfp_provider}" - end - - ## - # Create a fully-qualified OmnichannelSetting resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # - # @param account [String] - # @param omnichannel_setting [String] - # - # @return [::String] - def omnichannel_setting_path account:, omnichannel_setting: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest.rb deleted file mode 100644 index d4024d5f1881..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/lfp_providers_service/credentials" -require "google/shopping/merchant/accounts/v1/lfp_providers_service/paths" -require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - {::Google::Shopping::Merchant::Accounts::V1::LfpProvider LfpProvider} - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new - # - module LfpProvidersService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client.rb deleted file mode 100644 index cf1c1fa441f3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client.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 "google/cloud/errors" -require "google/shopping/merchant/accounts/v1/lfpproviders_pb" -require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module LfpProvidersService - module Rest - ## - # REST client for the LfpProvidersService service. - # - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - {::Google::Shopping::Merchant::Accounts::V1::LfpProvider LfpProvider} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_providers_service_stub - - ## - # Configure the LfpProvidersService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpProvidersService clients - # ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpProvidersService 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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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 - @lfp_providers_service_stub.universe_domain - end - - ## - # Create a new LfpProvidersService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpProvidersService 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 - - @lfp_providers_service_stub = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @lfp_providers_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 - @lfp_providers_service_stub.logger - end - - # Service calls - - ## - # Find the LFP provider candidates in a given country. - # - # @overload find_lfp_providers(request, options = nil) - # Pass arguments to `find_lfp_providers` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload find_lfp_providers(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `find_lfp_providers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource under which the LFP providers are - # found. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. - # @param page_size [::Integer] - # Optional. The maximum number of `LfpProvider` resources to return. The - # service returns fewer than this value if the number of lfp providers is - # less that than the `pageSize`. The default value is 50. The maximum value - # is 1000; If a value higher than the maximum is specified, then the - # `pageSize` will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `FindLfpProviders` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `FindLfpProviders` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::LfpProvider>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::LfpProvider>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.new - # - # # Call the find_lfp_providers method. - # result = client.find_lfp_providers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::LfpProvider. - # p item - # end - # - def find_lfp_providers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.find_lfp_providers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.find_lfp_providers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.find_lfp_providers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_providers_service_stub.find_lfp_providers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, "lfp_providers", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Link the specified merchant to a LFP provider for the specified country. - # - # @overload link_lfp_provider(request, options = nil) - # Pass arguments to `link_lfp_provider` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload link_lfp_provider(name: nil, external_account_id: nil) - # Pass arguments to `link_lfp_provider` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the LFP provider resource to link. - # Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. - # The `lfp_provider` is the LFP provider ID. - # @param external_account_id [::String] - # Required. The external account ID by which this merchant is known to the - # LFP provider. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new - # - # # Call the link_lfp_provider method. - # result = client.link_lfp_provider request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse. - # p result - # - def link_lfp_provider request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.link_lfp_provider.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.link_lfp_provider.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.link_lfp_provider.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_providers_service_stub.link_lfp_provider request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the LfpProvidersService REST API. - # - # This class represents the configuration for LfpProvidersService 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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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 - # # find_lfp_providers to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.find_lfp_providers.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.find_lfp_providers.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpProvidersService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `find_lfp_providers` - # @return [::Gapic::Config::Method] - # - attr_reader :find_lfp_providers - ## - # RPC-specific configuration for `link_lfp_provider` - # @return [::Gapic::Config::Method] - # - attr_reader :link_lfp_provider - - # @private - def initialize parent_rpcs = nil - find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers - @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config - link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider - @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub.rb deleted file mode 100644 index 8af6dcf79a28..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/lfpproviders_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module LfpProvidersService - module Rest - ## - # REST service stub for the LfpProvidersService 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 find_lfp_providers REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse] - # A result object deserialized from the server's reply - def find_lfp_providers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_find_lfp_providers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "find_lfp_providers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the link_lfp_provider REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] - # A result object deserialized from the server's reply - def link_lfp_provider request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_link_lfp_provider_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "link_lfp_provider", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse.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 find_lfp_providers REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_find_lfp_providers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{parent}/lfpProviders:find", - matches: [ - ["parent", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the link_lfp_provider REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_link_lfp_provider_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{name}:linkLfpProvider", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/lfpProviders/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_pb.rb deleted file mode 100644 index 7d09ac504f63..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/lfpproviders.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n7google/shopping/merchant/accounts/v1/lfpproviders.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xf4\x01\n\x0bLfpProvider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t:\xa1\x01\xea\x41\x9d\x01\n&merchantapi.googleapis.com/LfpProvider\x12Xaccounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}*\x0clfpProviders2\x0blfpProvider\"\x91\x01\n\x17\x46indLfpProvidersRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-merchantapi.googleapis.com/OmnichannelSetting\x12\x16\n\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\x18\x46indLfpProvidersResponse\x12H\n\rlfp_providers\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1.LfpProvider\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n\x16LinkLfpProviderRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&merchantapi.googleapis.com/LfpProvider\x12 \n\x13\x65xternal_account_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"C\n\x17LinkLfpProviderResponse\x12(\n\x08response\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Empty2\xc5\x04\n\x13LfpProvidersService\x12\xec\x01\n\x10\x46indLfpProviders\x12=.google.shopping.merchant.accounts.v1.FindLfpProvidersRequest\x1a>.google.shopping.merchant.accounts.v1.FindLfpProvidersResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/accounts/v1/{parent=accounts/*/omnichannelSettings/*}/lfpProviders:find\x12\xf5\x01\n\x0fLinkLfpProvider\x12<.google.shopping.merchant.accounts.v1.LinkLfpProviderRequest\x1a=.google.shopping.merchant.accounts.v1.LinkLfpProviderResponse\"e\xda\x41\x04name\x82\xd3\xe4\x93\x02X\"S/accounts/v1/{name=accounts/*/omnichannelSettings/*/lfpProviders/*}:linkLfpProvider:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x84\x02\n(com.google.shopping.merchant.accounts.v1B\x11LfpProvidersProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - LfpProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LfpProvider").msgclass - FindLfpProvidersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.FindLfpProvidersRequest").msgclass - FindLfpProvidersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.FindLfpProvidersResponse").msgclass - LinkLfpProviderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LinkLfpProviderRequest").msgclass - LinkLfpProviderResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LinkLfpProviderResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_services_pb.rb deleted file mode 100644 index ebaef2f2a80c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/lfpproviders.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/lfpproviders_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module LfpProvidersService - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.LfpProvidersService' - - # Find the LFP provider candidates in a given country. - rpc :FindLfpProviders, ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest, ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse - # Link the specified merchant to a LFP provider for the specified country. - rpc :LinkLfpProvider, ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest, ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service.rb deleted file mode 100644 index ba327907e601..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials" -require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths" -require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/client" -require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # The service facilitates the management of a merchant's omnichannel settings. - # ## This API defines the following resource model: - # - # {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting OmnichannelSetting} - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/omnichannel_settings_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new - # - module OmnichannelSettingsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "omnichannel_settings_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/client.rb deleted file mode 100644 index 744932c8931f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/client.rb +++ /dev/null @@ -1,892 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1/omnichannelsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module OmnichannelSettingsService - ## - # Client for the OmnichannelSettingsService service. - # - # The service facilitates the management of a merchant's omnichannel settings. - # ## This API defines the following resource model: - # - # {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting OmnichannelSetting} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :omnichannel_settings_service_stub - - ## - # Configure the OmnichannelSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OmnichannelSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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 - @omnichannel_settings_service_stub.universe_domain - end - - ## - # Create a new OmnichannelSettingsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OmnichannelSettingsService 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/shopping/merchant/accounts/v1/omnichannelsettings_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 - - @omnichannel_settings_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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 - ) - - @omnichannel_settings_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 - @omnichannel_settings_service_stub.logger - end - - # Service calls - - ## - # Get the omnichannel settings for a given merchant. - # - # @overload get_omnichannel_setting(request, options = nil) - # Pass arguments to `get_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_omnichannel_setting(name: nil) - # Pass arguments to `get_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the omnichannel setting to retrieve. - # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new - # - # # Call the get_omnichannel_setting method. - # result = client.get_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. - # p result - # - def get_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_omnichannel_setting.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :get_omnichannel_setting, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all the omnichannel settings for a given merchant. - # - # @overload list_omnichannel_settings(request, options = nil) - # Pass arguments to `list_omnichannel_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_omnichannel_settings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_omnichannel_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of omnichannel settings. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of omnichannel settings to return. The service - # may return fewer than this value. If unspecified, at most 50 omnichannel - # settings will be returned. The maximum value is 1000; values above 1000 - # will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListOmnichannelSettings` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListOmnichannelSettings` - # must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.new - # - # # Call the list_omnichannel_settings method. - # result = client.list_omnichannel_settings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. - # p item - # end - # - def list_omnichannel_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_omnichannel_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_omnichannel_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :list_omnichannel_settings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create the omnichannel settings for a given merchant. - # - # @overload create_omnichannel_setting(request, options = nil) - # Pass arguments to `create_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_omnichannel_setting(parent: nil, omnichannel_setting: nil) - # Pass arguments to `create_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this omnichannel setting will be - # created. Format: `accounts/{account}` - # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting, ::Hash] - # Required. The omnichannel setting to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new - # - # # Call the create_omnichannel_setting method. - # result = client.create_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. - # p result - # - def create_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest - - # Converts hash and nil to 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_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_omnichannel_setting.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :create_omnichannel_setting, request, 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 the omnichannel setting for a given merchant in a given country. - # - # @overload update_omnichannel_setting(request, options = nil) - # Pass arguments to `update_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil) - # Pass arguments to `update_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting, ::Hash] - # Required. The omnichannel setting to update. - # - # The omnichannel setting's `name` field is used to identify the - # omnichannel setting to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to be updated. - # - # The following fields are supported in snake_case only: - # - `lsf_type` - # - `in_stock` - # - `pickup` - # - `odo` - # - `about` - # - `inventory_verification` - # - # Full replacement with wildcard `*`is supported, while empty/implied update - # mask is not. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new - # - # # Call the update_omnichannel_setting method. - # result = client.update_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. - # p result - # - def update_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest - - # Converts hash and nil to 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_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.omnichannel_setting&.name - header_params["omnichannel_setting.name"] = request.omnichannel_setting.name - end - - request_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_omnichannel_setting.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :update_omnichannel_setting, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Requests inventory verification for a given merchant in a given country. - # - # @overload request_inventory_verification(request, options = nil) - # Pass arguments to `request_inventory_verification` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload request_inventory_verification(name: nil) - # Pass arguments to `request_inventory_verification` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the omnichannel setting to request inventory - # verification. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new - # - # # Call the request_inventory_verification method. - # result = client.request_inventory_verification request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse. - # p result - # - def request_inventory_verification request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.request_inventory_verification.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.request_inventory_verification.timeout, - metadata: metadata, - retry_policy: @config.rpcs.request_inventory_verification.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :request_inventory_verification, request, 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 OmnichannelSettingsService API. - # - # This class represents the configuration for OmnichannelSettingsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_omnichannel_setting to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_omnichannel_setting.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_omnichannel_setting.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 OmnichannelSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :get_omnichannel_setting - ## - # RPC-specific configuration for `list_omnichannel_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_omnichannel_settings - ## - # RPC-specific configuration for `create_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :create_omnichannel_setting - ## - # RPC-specific configuration for `update_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :update_omnichannel_setting - ## - # RPC-specific configuration for `request_inventory_verification` - # @return [::Gapic::Config::Method] - # - attr_reader :request_inventory_verification - - # @private - def initialize parent_rpcs = nil - get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting - @get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config - list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings - @list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config - create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting - @create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config - update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting - @update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config - request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification - @request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials.rb deleted file mode 100644 index 1e5bc2dae7c2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_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 Shopping - module Merchant - module Accounts - module V1 - module OmnichannelSettingsService - # Credentials for the OmnichannelSettingsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths.rb deleted file mode 100644 index 86e26a25f299..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_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 Shopping - module Merchant - module Accounts - module V1 - module OmnichannelSettingsService - # Path helper methods for the OmnichannelSettingsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified OmnichannelSetting resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # - # @param account [String] - # @param omnichannel_setting [String] - # - # @return [::String] - def omnichannel_setting_path account:, omnichannel_setting: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest.rb deleted file mode 100644 index fa22f84b9678..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials" -require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths" -require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # The service facilitates the management of a merchant's omnichannel settings. - # ## This API defines the following resource model: - # - # {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting OmnichannelSetting} - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new - # - module OmnichannelSettingsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client.rb deleted file mode 100644 index 9aab023fc63a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client.rb +++ /dev/null @@ -1,814 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/omnichannelsettings_pb" -require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module OmnichannelSettingsService - module Rest - ## - # REST client for the OmnichannelSettingsService service. - # - # The service facilitates the management of a merchant's omnichannel settings. - # ## This API defines the following resource model: - # - # {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting OmnichannelSetting} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :omnichannel_settings_service_stub - - ## - # Configure the OmnichannelSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OmnichannelSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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 - @omnichannel_settings_service_stub.universe_domain - end - - ## - # Create a new OmnichannelSettingsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OmnichannelSettingsService 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 - - @omnichannel_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @omnichannel_settings_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 - @omnichannel_settings_service_stub.logger - end - - # Service calls - - ## - # Get the omnichannel settings for a given merchant. - # - # @overload get_omnichannel_setting(request, options = nil) - # Pass arguments to `get_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_omnichannel_setting(name: nil) - # Pass arguments to `get_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the omnichannel setting to retrieve. - # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new - # - # # Call the get_omnichannel_setting method. - # result = client.get_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. - # p result - # - def get_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_omnichannel_setting.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.get_omnichannel_setting request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all the omnichannel settings for a given merchant. - # - # @overload list_omnichannel_settings(request, options = nil) - # Pass arguments to `list_omnichannel_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_omnichannel_settings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_omnichannel_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of omnichannel settings. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of omnichannel settings to return. The service - # may return fewer than this value. If unspecified, at most 50 omnichannel - # settings will be returned. The maximum value is 1000; values above 1000 - # will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListOmnichannelSettings` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListOmnichannelSettings` - # must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.new - # - # # Call the list_omnichannel_settings method. - # result = client.list_omnichannel_settings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. - # p item - # end - # - def list_omnichannel_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_omnichannel_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_omnichannel_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.list_omnichannel_settings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, "omnichannel_settings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create the omnichannel settings for a given merchant. - # - # @overload create_omnichannel_setting(request, options = nil) - # Pass arguments to `create_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_omnichannel_setting(parent: nil, omnichannel_setting: nil) - # Pass arguments to `create_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this omnichannel setting will be - # created. Format: `accounts/{account}` - # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting, ::Hash] - # Required. The omnichannel setting to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new - # - # # Call the create_omnichannel_setting method. - # result = client.create_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. - # p result - # - def create_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest - - # Converts hash and nil to an 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_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_omnichannel_setting.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.create_omnichannel_setting request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update the omnichannel setting for a given merchant in a given country. - # - # @overload update_omnichannel_setting(request, options = nil) - # Pass arguments to `update_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil) - # Pass arguments to `update_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting, ::Hash] - # Required. The omnichannel setting to update. - # - # The omnichannel setting's `name` field is used to identify the - # omnichannel setting to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to be updated. - # - # The following fields are supported in snake_case only: - # - `lsf_type` - # - `in_stock` - # - `pickup` - # - `odo` - # - `about` - # - `inventory_verification` - # - # Full replacement with wildcard `*`is supported, while empty/implied update - # mask is not. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new - # - # # Call the update_omnichannel_setting method. - # result = client.update_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. - # p result - # - def update_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest - - # Converts hash and nil to an 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_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_omnichannel_setting.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.update_omnichannel_setting request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Requests inventory verification for a given merchant in a given country. - # - # @overload request_inventory_verification(request, options = nil) - # Pass arguments to `request_inventory_verification` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload request_inventory_verification(name: nil) - # Pass arguments to `request_inventory_verification` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the omnichannel setting to request inventory - # verification. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new - # - # # Call the request_inventory_verification method. - # result = client.request_inventory_verification request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse. - # p result - # - def request_inventory_verification request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.request_inventory_verification.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.request_inventory_verification.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.request_inventory_verification.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.request_inventory_verification request, 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 OmnichannelSettingsService REST API. - # - # This class represents the configuration for OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_omnichannel_setting to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_omnichannel_setting.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_omnichannel_setting.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 OmnichannelSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :get_omnichannel_setting - ## - # RPC-specific configuration for `list_omnichannel_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_omnichannel_settings - ## - # RPC-specific configuration for `create_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :create_omnichannel_setting - ## - # RPC-specific configuration for `update_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :update_omnichannel_setting - ## - # RPC-specific configuration for `request_inventory_verification` - # @return [::Gapic::Config::Method] - # - attr_reader :request_inventory_verification - - # @private - def initialize parent_rpcs = nil - get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting - @get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config - list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings - @list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config - create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting - @create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config - update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting - @update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config - request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification - @request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub.rb deleted file mode 100644 index c25ce12cee60..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub.rb +++ /dev/null @@ -1,391 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/omnichannelsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module OmnichannelSettingsService - module Rest - ## - # REST service stub for the OmnichannelSettingsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # A result object deserialized from the server's reply - def get_omnichannel_setting request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_omnichannel_setting_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_omnichannel_setting", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.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_omnichannel_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse] - # A result object deserialized from the server's reply - def list_omnichannel_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_omnichannel_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_omnichannel_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse.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_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # A result object deserialized from the server's reply - def create_omnichannel_setting request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_omnichannel_setting_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_omnichannel_setting", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.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_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # A result object deserialized from the server's reply - def update_omnichannel_setting request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_omnichannel_setting_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_omnichannel_setting", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the request_inventory_verification REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] - # A result object deserialized from the server's reply - def request_inventory_verification request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_request_inventory_verification_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "request_inventory_verification", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_omnichannel_setting_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_omnichannel_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_omnichannel_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{parent}/omnichannelSettings", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest] - # 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_omnichannel_setting_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{parent}/omnichannelSettings", - body: "omnichannel_setting", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest] - # 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_omnichannel_setting_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1/{omnichannel_setting.name}", - body: "omnichannel_setting", - matches: [ - ["omnichannel_setting.name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the request_inventory_verification REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_request_inventory_verification_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{name}:requestInventoryVerification", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_pb.rb deleted file mode 100644 index 7325e9c54c30..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/omnichannelsettings.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n>google/shopping/merchant/accounts/v1/omnichannelsettings.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xc7\x06\n\x12OmnichannelSetting\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0bregion_code\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12W\n\x08lsf_type\x18\x0c \x01(\x0e\x32@.google.shopping.merchant.accounts.v1.OmnichannelSetting.LsfTypeB\x03\xe0\x41\x02\x12\x44\n\x08in_stock\x18\r \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.InStockB\x03\xe0\x41\x01\x12\x41\n\x06pickup\x18\x0e \x01(\x0b\x32,.google.shopping.merchant.accounts.v1.PickupB\x03\xe0\x41\x01\x12\x44\n\x08lfp_link\x18\x05 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.LfpLinkB\x03\xe0\x41\x03\x12H\n\x03odo\x18\x06 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.OnDisplayToOrderB\x03\xe0\x41\x01\x12?\n\x05\x61\x62out\x18\x07 \x01(\x0b\x32+.google.shopping.merchant.accounts.v1.AboutB\x03\xe0\x41\x01\x12`\n\x16inventory_verification\x18\x08 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1.InventoryVerificationB\x03\xe0\x41\x01\"O\n\x07LsfType\x12\x18\n\x14LSF_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05GHLSF\x10\x01\x12\x0f\n\x0bMHLSF_BASIC\x10\x02\x12\x0e\n\nMHLSF_FULL\x10\x03:\x9a\x01\xea\x41\x96\x01\n-merchantapi.googleapis.com/OmnichannelSetting\x12 e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all existing return policies for a given business. - # - # @overload list_online_return_policies(request, options = nil) - # Pass arguments to `list_online_return_policies` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_online_return_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_online_return_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The Merchant Center account for which to list return policies. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of `OnlineReturnPolicy` resources to return. - # The service returns fewer than this value if the number of return policies - # for the given business is less that than the `pageSize`. The default value - # is 10. The maximum value is 100; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum - # @param page_token [::String] - # Optional. A page token, received from a previous `ListOnlineReturnPolicies` - # call. Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListOnlineReturnPolicies` must match the call that provided the page - # token. The token returned as - # {::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.new - # - # # Call the list_online_return_policies method. - # result = client.list_online_return_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. - # p item - # end - # - def list_online_return_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_online_return_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_online_return_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_online_return_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.call_rpc :list_online_return_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @online_return_policy_service_stub, :list_online_return_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new return policy for a given business. - # - # @overload create_online_return_policy(request, options = nil) - # Pass arguments to `create_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_online_return_policy(parent: nil, online_return_policy: nil) - # Pass arguments to `create_online_return_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 parent [::String] - # Required. The Merchant Center account for which the return policy will be - # created. Format: `accounts/{account}` - # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy, ::Hash] - # Required. The return policy object to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new - # - # # Call the create_online_return_policy method. - # result = client.create_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. - # p result - # - def create_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest - - # Converts hash and nil to 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_online_return_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::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_online_return_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.call_rpc :create_online_return_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 - - ## - # Deletes an existing return policy. - # - # @overload delete_online_return_policy(request, options = nil) - # Pass arguments to `delete_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_online_return_policy(name: nil) - # Pass arguments to `delete_online_return_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 name [::String] - # Required. The name of the return policy to delete. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - # - # @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/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new - # - # # Call the delete_online_return_policy method. - # result = client.delete_online_return_policy request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_online_return_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::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_online_return_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.call_rpc :delete_online_return_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 - - ## - # Configuration class for the OnlineReturnPolicyService API. - # - # This class represents the configuration for OnlineReturnPolicyService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_online_return_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_online_return_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_online_return_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 OnlineReturnPolicyService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_online_return_policy - ## - # RPC-specific configuration for `list_online_return_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_online_return_policies - ## - # RPC-specific configuration for `create_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_online_return_policy - ## - # RPC-specific configuration for `delete_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_online_return_policy - - # @private - def initialize parent_rpcs = nil - get_online_return_policy_config = parent_rpcs.get_online_return_policy if parent_rpcs.respond_to? :get_online_return_policy - @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config - list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies - @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config - create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy - @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config - delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy - @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/credentials.rb deleted file mode 100644 index c3c6be712f49..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_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 Shopping - module Merchant - module Accounts - module V1 - module OnlineReturnPolicyService - # Credentials for the OnlineReturnPolicyService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/paths.rb deleted file mode 100644 index ae6f0b183c04..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_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 Shopping - module Merchant - module Accounts - module V1 - module OnlineReturnPolicyService - # Path helper methods for the OnlineReturnPolicyService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified OnlineReturnPolicy resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/onlineReturnPolicies/{return_policy}` - # - # @param account [String] - # @param return_policy [String] - # - # @return [::String] - def online_return_policy_path account:, return_policy: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/onlineReturnPolicies/#{return_policy}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest.rb deleted file mode 100644 index a053361f3919..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/online_return_policy_service/credentials" -require "google/shopping/merchant/accounts/v1/online_return_policy_service/paths" -require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # The service facilitates the management of a business's remorse return policy - # configuration, encompassing return policies for both ads and free listings - # ## programs. This API defines the following resource model: - # - # {::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy OnlineReturnPolicy} - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new - # - module OnlineReturnPolicyService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb deleted file mode 100644 index c99c85bf2418..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb +++ /dev/null @@ -1,717 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/online_return_policy_pb" -require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module OnlineReturnPolicyService - module Rest - ## - # REST client for the OnlineReturnPolicyService service. - # - # The service facilitates the management of a business's remorse return policy - # configuration, encompassing return policies for both ads and free listings - # ## programs. This API defines the following resource model: - # - # {::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy OnlineReturnPolicy} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :online_return_policy_service_stub - - ## - # Configure the OnlineReturnPolicyService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OnlineReturnPolicyService clients - # ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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 - @online_return_policy_service_stub.universe_domain - end - - ## - # Create a new OnlineReturnPolicyService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OnlineReturnPolicyService 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 - - @online_return_policy_service_stub = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @online_return_policy_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 - @online_return_policy_service_stub.logger - end - - # Service calls - - ## - # Gets an existing return policy for a given business. - # - # @overload get_online_return_policy(request, options = nil) - # Pass arguments to `get_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_online_return_policy(name: nil) - # Pass arguments to `get_online_return_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 name [::String] - # Required. The name of the return policy to retrieve. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new - # - # # Call the get_online_return_policy method. - # result = client.get_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. - # p result - # - def get_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_online_return_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::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_online_return_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.get_online_return_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 - - ## - # Lists all existing return policies for a given business. - # - # @overload list_online_return_policies(request, options = nil) - # Pass arguments to `list_online_return_policies` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_online_return_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_online_return_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The Merchant Center account for which to list return policies. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of `OnlineReturnPolicy` resources to return. - # The service returns fewer than this value if the number of return policies - # for the given business is less that than the `pageSize`. The default value - # is 10. The maximum value is 100; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum - # @param page_token [::String] - # Optional. A page token, received from a previous `ListOnlineReturnPolicies` - # call. Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListOnlineReturnPolicies` must match the call that provided the page - # token. The token returned as - # {::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.new - # - # # Call the list_online_return_policies method. - # result = client.list_online_return_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. - # p item - # end - # - def list_online_return_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_online_return_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_online_return_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_online_return_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.list_online_return_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @online_return_policy_service_stub, :list_online_return_policies, "online_return_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new return policy for a given business. - # - # @overload create_online_return_policy(request, options = nil) - # Pass arguments to `create_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_online_return_policy(parent: nil, online_return_policy: nil) - # Pass arguments to `create_online_return_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 parent [::String] - # Required. The Merchant Center account for which the return policy will be - # created. Format: `accounts/{account}` - # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy, ::Hash] - # Required. The return policy object to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new - # - # # Call the create_online_return_policy method. - # result = client.create_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. - # p result - # - def create_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest - - # Converts hash and nil to an 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_online_return_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::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_online_return_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.create_online_return_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 - - ## - # Deletes an existing return policy. - # - # @overload delete_online_return_policy(request, options = nil) - # Pass arguments to `delete_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_online_return_policy(name: nil) - # Pass arguments to `delete_online_return_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 name [::String] - # Required. The name of the return policy to delete. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - # @yield [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/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new - # - # # Call the delete_online_return_policy method. - # result = client.delete_online_return_policy request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_online_return_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::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_online_return_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.delete_online_return_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 - - ## - # Configuration class for the OnlineReturnPolicyService REST API. - # - # This class represents the configuration for OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_online_return_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_online_return_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_online_return_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 OnlineReturnPolicyService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_online_return_policy - ## - # RPC-specific configuration for `list_online_return_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_online_return_policies - ## - # RPC-specific configuration for `create_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_online_return_policy - ## - # RPC-specific configuration for `delete_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_online_return_policy - - # @private - def initialize parent_rpcs = nil - get_online_return_policy_config = parent_rpcs.get_online_return_policy if parent_rpcs.respond_to? :get_online_return_policy - @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config - list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies - @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config - create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy - @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config - delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy - @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub.rb deleted file mode 100644 index 37d42c71e602..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub.rb +++ /dev/null @@ -1,328 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/online_return_policy_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module OnlineReturnPolicyService - module Rest - ## - # REST service stub for the OnlineReturnPolicyService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] - # A result object deserialized from the server's reply - def get_online_return_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_online_return_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_online_return_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.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_online_return_policies REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse] - # A result object deserialized from the server's reply - def list_online_return_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_online_return_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_online_return_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse.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_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] - # A result object deserialized from the server's reply - def create_online_return_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_online_return_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: "create_online_return_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.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_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_online_return_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_online_return_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: "delete_online_return_policy", - 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 get_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_online_return_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_online_return_policies REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_online_return_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{parent}/onlineReturnPolicies", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest] - # 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_online_return_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{parent}/onlineReturnPolicies", - body: "online_return_policy", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_online_return_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb deleted file mode 100644 index c76d7bd0b200..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb +++ /dev/null @@ -1,57 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/online_return_policy.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/online_return_policy_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module OnlineReturnPolicyService - # The service facilitates the management of a business's remorse return policy - # configuration, encompassing return policies for both ads and free listings - # ## programs. This API defines the following resource model: - # - # [OnlineReturnPolicy][google.shopping.merchant.accounts.v1.OnlineReturnPolicy] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.OnlineReturnPolicyService' - - # Gets an existing return policy for a given business. - rpc :GetOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy - # Lists all existing return policies for a given business. - rpc :ListOnlineReturnPolicies, ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest, ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse - # Creates a new return policy for a given business. - rpc :CreateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy - # Deletes an existing return policy. - rpc :DeleteOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/phoneverificationstate_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/phoneverificationstate_pb.rb deleted file mode 100644 index d9f97296594b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/phoneverificationstate_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/phoneverificationstate.proto - -require 'google/protobuf' - - -descriptor_data = "\nAgoogle/shopping/merchant/accounts/v1/phoneverificationstate.proto\x12$google.shopping.merchant.accounts.v1*\x92\x01\n\x16PhoneVerificationState\x12(\n$PHONE_VERIFICATION_STATE_UNSPECIFIED\x10\x00\x12%\n!PHONE_VERIFICATION_STATE_VERIFIED\x10\x01\x12\'\n#PHONE_VERIFICATION_STATE_UNVERIFIED\x10\x02\x42\x8e\x02\n(com.google.shopping.merchant.accounts.v1B\x1bPhoneVerificationStateProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - PhoneVerificationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.PhoneVerificationState").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_pb.rb deleted file mode 100644 index 1cc5963ccb73..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/programs.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 = "\n3google/shopping/merchant/accounts/v1/programs.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x9a\x04\n\x07Program\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x11\x64ocumentation_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12G\n\x05state\x18\x03 \x01(\x0e\x32\x33.google.shopping.merchant.accounts.v1.Program.StateB\x03\xe0\x41\x03\x12 \n\x13\x61\x63tive_region_codes\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12Z\n\x12unmet_requirements\x18\x05 \x03(\x0b\x32\x39.google.shopping.merchant.accounts.v1.Program.RequirementB\x03\xe0\x41\x03\x1a\x65\n\x0bRequirement\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1e\n\x11\x64ocumentation_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15\x61\x66\x66\x65\x63ted_region_codes\x18\x03 \x03(\tB\x03\xe0\x41\x03\"K\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_ELIGIBLE\x10\x01\x12\x0c\n\x08\x45LIGIBLE\x10\x02\x12\x0b\n\x07\x45NABLED\x10\x03:a\xea\x41^\n\"merchantapi.googleapis.com/Program\x12%accounts/{account}/programs/{program}*\x08programs2\x07program\"M\n\x11GetProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program\"\x82\x01\n\x13ListProgramsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Program\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"p\n\x14ListProgramsResponse\x12?\n\x08programs\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1.Program\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x14\x45nableProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program\"Q\n\x15\x44isableProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program2\xd4\x06\n\x0fProgramsService\x12\xae\x01\n\nGetProgram\x12\x37.google.shopping.merchant.accounts.v1.GetProgramRequest\x1a-.google.shopping.merchant.accounts.v1.Program\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/accounts/v1/{name=accounts/*/programs/*}\x12\xc1\x01\n\x0cListPrograms\x12\x39.google.shopping.merchant.accounts.v1.ListProgramsRequest\x1a:.google.shopping.merchant.accounts.v1.ListProgramsResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/accounts/v1/{parent=accounts/*}/programs\x12\xbe\x01\n\rEnableProgram\x12:.google.shopping.merchant.accounts.v1.EnableProgramRequest\x1a-.google.shopping.merchant.accounts.v1.Program\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\"0/accounts/v1/{name=accounts/*/programs/*}:enable:\x01*\x12\xc1\x01\n\x0e\x44isableProgram\x12;.google.shopping.merchant.accounts.v1.DisableProgramRequest\x1a-.google.shopping.merchant.accounts.v1.Program\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/accounts/v1/{name=accounts/*/programs/*}:disable:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x80\x02\n(com.google.shopping.merchant.accounts.v1B\rProgramsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - Program = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Program").msgclass - Program::Requirement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Program.Requirement").msgclass - Program::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Program.State").enummodule - GetProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetProgramRequest").msgclass - ListProgramsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListProgramsRequest").msgclass - ListProgramsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListProgramsResponse").msgclass - EnableProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.EnableProgramRequest").msgclass - DisableProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DisableProgramRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service.rb deleted file mode 100644 index cdb11e3556e1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service.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 "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/programs_service/credentials" -require "google/shopping/merchant/accounts/v1/programs_service/paths" -require "google/shopping/merchant/accounts/v1/programs_service/client" -require "google/shopping/merchant/accounts/v1/programs_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/answer/13889434) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a business's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/programs_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/programs_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new - # - module ProgramsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "programs_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/programs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/client.rb deleted file mode 100644 index a058ff66b072..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/client.rb +++ /dev/null @@ -1,787 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/programs_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module ProgramsService - ## - # Client for the ProgramsService service. - # - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/answer/13889434) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a business's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :programs_service_stub - - ## - # Configure the ProgramsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProgramsService clients - # ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ProgramsService 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::Shopping::Merchant::Accounts::V1::ProgramsService::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 - @programs_service_stub.universe_domain - end - - ## - # Create a new ProgramsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProgramsService 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/shopping/merchant/accounts/v1/programs_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 - - @programs_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::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 - ) - - @programs_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 - @programs_service_stub.logger - end - - # Service calls - - ## - # Retrieves the specified program for the account. - # - # @overload get_program(request, options = nil) - # Pass arguments to `get_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_program(name: nil) - # Pass arguments to `get_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program to retrieve. - # Format: `accounts/{account}/programs/{program}`. For example, - # `accounts/123456/programs/free-listings`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Program] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Program] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new - # - # # Call the get_program method. - # result = client.get_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. - # p result - # - def get_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_program.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.call_rpc :get_program, request, 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 all programs for the account. - # - # @overload list_programs(request, options = nil) - # Pass arguments to `list_programs` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_programs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_programs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account for which to retrieve all programs. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of programs to return in a single response. If - # unspecified (or 0), a default size of 1000 is used. The maximum value is - # 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A continuation token, received from a previous `ListPrograms` - # call. Provide this to retrieve the next page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Program>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Program>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.new - # - # # Call the list_programs method. - # result = client.list_programs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Program. - # p item - # end - # - def list_programs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_programs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_programs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_programs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.call_rpc :list_programs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @programs_service_stub, :list_programs, 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 - - ## - # Enable participation in the specified program for the account. - # - # @overload enable_program(request, options = nil) - # Pass arguments to `enable_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload enable_program(name: nil) - # Pass arguments to `enable_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program for which to enable participation for the - # given account. Format: `accounts/{account}/programs/{program}`. For - # example, `accounts/123456/programs/free-listings`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Program] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Program] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new - # - # # Call the enable_program method. - # result = client.enable_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. - # p result - # - def enable_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.enable_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.enable_program.timeout, - metadata: metadata, - retry_policy: @config.rpcs.enable_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.call_rpc :enable_program, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disable participation in the specified program for the account. - # - # @overload disable_program(request, options = nil) - # Pass arguments to `disable_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload disable_program(name: nil) - # Pass arguments to `disable_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program for which to disable participation for - # the given account. Format: `accounts/{account}/programs/{program}`. For - # example, `accounts/123456/programs/free-listings`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Program] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Program] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new - # - # # Call the disable_program method. - # result = client.disable_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. - # p result - # - def disable_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.disable_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.disable_program.timeout, - metadata: metadata, - retry_policy: @config.rpcs.disable_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.call_rpc :disable_program, request, 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 ProgramsService API. - # - # This class represents the configuration for ProgramsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_program to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_program.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_program.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::ProgramsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ProgramsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_program` - # @return [::Gapic::Config::Method] - # - attr_reader :get_program - ## - # RPC-specific configuration for `list_programs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_programs - ## - # RPC-specific configuration for `enable_program` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_program - ## - # RPC-specific configuration for `disable_program` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_program - - # @private - def initialize parent_rpcs = nil - get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program - @get_program = ::Gapic::Config::Method.new get_program_config - list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs - @list_programs = ::Gapic::Config::Method.new list_programs_config - enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program - @enable_program = ::Gapic::Config::Method.new enable_program_config - disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program - @disable_program = ::Gapic::Config::Method.new disable_program_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/credentials.rb deleted file mode 100644 index 2de0d4a2a1ef..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_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 Shopping - module Merchant - module Accounts - module V1 - module ProgramsService - # Credentials for the ProgramsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/paths.rb deleted file mode 100644 index d792cd571b86..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_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 Shopping - module Merchant - module Accounts - module V1 - module ProgramsService - # Path helper methods for the ProgramsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified Program resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/programs/{program}` - # - # @param account [String] - # @param program [String] - # - # @return [::String] - def program_path account:, program: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/programs/#{program}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest.rb deleted file mode 100644 index d7d6f98fe0c8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/programs_service/credentials" -require "google/shopping/merchant/accounts/v1/programs_service/paths" -require "google/shopping/merchant/accounts/v1/programs_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/answer/13889434) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a business's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/programs_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new - # - module ProgramsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/programs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/client.rb deleted file mode 100644 index 121724fc05af..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/client.rb +++ /dev/null @@ -1,716 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/programs_pb" -require "google/shopping/merchant/accounts/v1/programs_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module ProgramsService - module Rest - ## - # REST client for the ProgramsService service. - # - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/answer/13889434) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a business's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :programs_service_stub - - ## - # Configure the ProgramsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProgramsService clients - # ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ProgramsService 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::Shopping::Merchant::Accounts::V1::ProgramsService::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 - @programs_service_stub.universe_domain - end - - ## - # Create a new ProgramsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProgramsService 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 - - @programs_service_stub = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @programs_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 - @programs_service_stub.logger - end - - # Service calls - - ## - # Retrieves the specified program for the account. - # - # @overload get_program(request, options = nil) - # Pass arguments to `get_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_program(name: nil) - # Pass arguments to `get_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program to retrieve. - # Format: `accounts/{account}/programs/{program}`. For example, - # `accounts/123456/programs/free-listings`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Program] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new - # - # # Call the get_program method. - # result = client.get_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. - # p result - # - def get_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_program.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.get_program request, 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 all programs for the account. - # - # @overload list_programs(request, options = nil) - # Pass arguments to `list_programs` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_programs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_programs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account for which to retrieve all programs. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of programs to return in a single response. If - # unspecified (or 0), a default size of 1000 is used. The maximum value is - # 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A continuation token, received from a previous `ListPrograms` - # call. Provide this to retrieve the next page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Program>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Program>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.new - # - # # Call the list_programs method. - # result = client.list_programs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Program. - # p item - # end - # - def list_programs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_programs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_programs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_programs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.list_programs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @programs_service_stub, :list_programs, "programs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enable participation in the specified program for the account. - # - # @overload enable_program(request, options = nil) - # Pass arguments to `enable_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload enable_program(name: nil) - # Pass arguments to `enable_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program for which to enable participation for the - # given account. Format: `accounts/{account}/programs/{program}`. For - # example, `accounts/123456/programs/free-listings`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Program] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new - # - # # Call the enable_program method. - # result = client.enable_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. - # p result - # - def enable_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.enable_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.enable_program.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.enable_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.enable_program request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disable participation in the specified program for the account. - # - # @overload disable_program(request, options = nil) - # Pass arguments to `disable_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload disable_program(name: nil) - # Pass arguments to `disable_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program for which to disable participation for - # the given account. Format: `accounts/{account}/programs/{program}`. For - # example, `accounts/123456/programs/free-listings`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Program] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new - # - # # Call the disable_program method. - # result = client.disable_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. - # p result - # - def disable_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.disable_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.disable_program.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.disable_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.disable_program request, 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 ProgramsService REST API. - # - # This class represents the configuration for ProgramsService 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::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_program to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_program.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_program.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ProgramsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_program` - # @return [::Gapic::Config::Method] - # - attr_reader :get_program - ## - # RPC-specific configuration for `list_programs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_programs - ## - # RPC-specific configuration for `enable_program` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_program - ## - # RPC-specific configuration for `disable_program` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_program - - # @private - def initialize parent_rpcs = nil - get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program - @get_program = ::Gapic::Config::Method.new get_program_config - list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs - @list_programs = ::Gapic::Config::Method.new list_programs_config - enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program - @enable_program = ::Gapic::Config::Method.new enable_program_config - disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program - @disable_program = ::Gapic::Config::Method.new disable_program_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/service_stub.rb deleted file mode 100644 index 25330a6f4cee..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/service_stub.rb +++ /dev/null @@ -1,329 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/programs_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module ProgramsService - module Rest - ## - # REST service stub for the ProgramsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Program] - # A result object deserialized from the server's reply - def get_program request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_program_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_program", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::Program.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_programs REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse] - # A result object deserialized from the server's reply - def list_programs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_programs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_programs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the enable_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Program] - # A result object deserialized from the server's reply - def enable_program request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_enable_program_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "enable_program", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::Program.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the disable_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Program] - # A result object deserialized from the server's reply - def disable_program request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_disable_program_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "disable_program", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::Program.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_program_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_programs REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_programs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{parent}/programs", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the enable_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_enable_program_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{name}:enable", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the disable_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_disable_program_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{name}:disable", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_services_pb.rb deleted file mode 100644 index afaf41dd0abb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_services_pb.rb +++ /dev/null @@ -1,63 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/programs.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/programs_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module ProgramsService - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/answer/13889434) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a business's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.ProgramsService' - - # Retrieves the specified program for the account. - rpc :GetProgram, ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest, ::Google::Shopping::Merchant::Accounts::V1::Program - # Retrieves all programs for the account. - rpc :ListPrograms, ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse - # Enable participation in the specified program for the account. - rpc :EnableProgram, ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1::Program - # Disable participation in the specified program for the account. - rpc :DisableProgram, ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1::Program - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_pb.rb deleted file mode 100644 index fee3993ca9e6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_pb.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/regions.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/wrappers_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n2google/shopping/merchant/accounts/v1/regions.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"K\n\x10GetRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\xac\x01\n\x13\x43reateRegionRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tregion_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x06region\x18\x03 \x01(\x0b\x32,.google.shopping.merchant.accounts.v1.RegionB\x03\xe0\x41\x02\"\xa9\x01\n\x19\x42\x61tchCreateRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12P\n\x08requests\x18\x02 \x03(\x0b\x32\x39.google.shopping.merchant.accounts.v1.CreateRegionRequestB\x03\xe0\x41\x02\"[\n\x1a\x42\x61tchCreateRegionsResponse\x12=\n\x07regions\x18\x01 \x03(\x0b\x32,.google.shopping.merchant.accounts.v1.Region\"\x8e\x01\n\x13UpdateRegionRequest\x12\x41\n\x06region\x18\x01 \x01(\x0b\x32,.google.shopping.merchant.accounts.v1.RegionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xa9\x01\n\x19\x42\x61tchUpdateRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12P\n\x08requests\x18\x02 \x03(\x0b\x32\x39.google.shopping.merchant.accounts.v1.UpdateRegionRequestB\x03\xe0\x41\x02\"[\n\x1a\x42\x61tchUpdateRegionsResponse\x12=\n\x07regions\x18\x01 \x03(\x0b\x32,.google.shopping.merchant.accounts.v1.Region\"N\n\x13\x44\x65leteRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\xa9\x01\n\x19\x42\x61tchDeleteRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12P\n\x08requests\x18\x02 \x03(\x0b\x32\x39.google.shopping.merchant.accounts.v1.DeleteRegionRequestB\x03\xe0\x41\x02\"\x81\x01\n\x12ListRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"m\n\x13ListRegionsResponse\x12=\n\x07regions\x18\x01 \x03(\x0b\x32,.google.shopping.merchant.accounts.v1.Region\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc9\x08\n\x06Region\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12Z\n\x10postal_code_area\x18\x03 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1.Region.PostalCodeAreaB\x03\xe0\x41\x01\x12W\n\x0egeotarget_area\x18\x04 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1.Region.GeoTargetAreaB\x03\xe0\x41\x01\x12\x44\n\x1bregional_inventory_eligible\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12:\n\x11shipping_eligible\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12Q\n\x0bradius_area\x18\x07 \x01(\x0b\x32\x37.google.shopping.merchant.accounts.v1.Region.RadiusAreaB\x03\xe0\x41\x01\x1a\xcb\x01\n\x0ePostalCodeArea\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x66\n\x0cpostal_codes\x18\x02 \x03(\x0b\x32K.google.shopping.merchant.accounts.v1.Region.PostalCodeArea.PostalCodeRangeB\x03\xe0\x41\x02\x1a\x37\n\x0fPostalCodeRange\x12\x12\n\x05\x62\x65gin\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03\x65nd\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x34\n\rGeoTargetArea\x12#\n\x16geotarget_criteria_ids\x18\x01 \x03(\x03\x42\x03\xe0\x41\x02\x1a\x8e\x02\n\nRadiusArea\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12)\n\x07lat_lng\x18\x02 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12\x13\n\x06radius\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12^\n\x0cradius_units\x18\x04 \x01(\x0e\x32\x43.google.shopping.merchant.accounts.v1.Region.RadiusArea.RadiusUnitsB\x03\xe0\x41\x01\"F\n\x0bRadiusUnits\x12\x1c\n\x18RADIUS_UNITS_UNSPECIFIED\x10\x00\x12\t\n\x05MILES\x10\x01\x12\x0e\n\nKILOMETERS\x10\x02:\\\xea\x41Y\n!merchantapi.googleapis.com/Region\x12#accounts/{account}/regions/{region}*\x07regions2\x06regionB\x0f\n\r_display_name2\xe8\x0c\n\x0eRegionsService\x12\xaa\x01\n\tGetRegion\x12\x36.google.shopping.merchant.accounts.v1.GetRegionRequest\x1a,.google.shopping.merchant.accounts.v1.Region\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/accounts/v1/{name=accounts/*/regions/*}\x12\xcb\x01\n\x0c\x43reateRegion\x12\x39.google.shopping.merchant.accounts.v1.CreateRegionRequest\x1a,.google.shopping.merchant.accounts.v1.Region\"R\xda\x41\x17parent,region,region_id\x82\xd3\xe4\x93\x02\x32\"(/accounts/v1/{parent=accounts/*}/regions:\x06region\x12\xd8\x01\n\x12\x42\x61tchCreateRegions\x12?.google.shopping.merchant.accounts.v1.BatchCreateRegionsRequest\x1a@.google.shopping.merchant.accounts.v1.BatchCreateRegionsResponse\"?\x82\xd3\xe4\x93\x02\x39\"4/accounts/v1/{parent=accounts/*}/regions:batchCreate:\x01*\x12\xcd\x01\n\x0cUpdateRegion\x12\x39.google.shopping.merchant.accounts.v1.UpdateRegionRequest\x1a,.google.shopping.merchant.accounts.v1.Region\"T\xda\x41\x12region,update_mask\x82\xd3\xe4\x93\x02\x39\x32//accounts/v1/{region.name=accounts/*/regions/*}:\x06region\x12\xd8\x01\n\x12\x42\x61tchUpdateRegions\x12?.google.shopping.merchant.accounts.v1.BatchUpdateRegionsRequest\x1a@.google.shopping.merchant.accounts.v1.BatchUpdateRegionsResponse\"?\x82\xd3\xe4\x93\x02\x39\"4/accounts/v1/{parent=accounts/*}/regions:batchUpdate:\x01*\x12\x9a\x01\n\x0c\x44\x65leteRegion\x12\x39.google.shopping.merchant.accounts.v1.DeleteRegionRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/accounts/v1/{name=accounts/*/regions/*}\x12\xae\x01\n\x12\x42\x61tchDeleteRegions\x12?.google.shopping.merchant.accounts.v1.BatchDeleteRegionsRequest\x1a\x16.google.protobuf.Empty\"?\x82\xd3\xe4\x93\x02\x39\"4/accounts/v1/{parent=accounts/*}/regions:batchDelete:\x01*\x12\xbd\x01\n\x0bListRegions\x12\x38.google.shopping.merchant.accounts.v1.ListRegionsRequest\x1a\x39.google.shopping.merchant.accounts.v1.ListRegionsResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/accounts/v1/{parent=accounts/*}/regions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xff\x01\n(com.google.shopping.merchant.accounts.v1B\x0cRegionsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - GetRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetRegionRequest").msgclass - CreateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateRegionRequest").msgclass - BatchCreateRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BatchCreateRegionsRequest").msgclass - BatchCreateRegionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BatchCreateRegionsResponse").msgclass - UpdateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateRegionRequest").msgclass - BatchUpdateRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BatchUpdateRegionsRequest").msgclass - BatchUpdateRegionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BatchUpdateRegionsResponse").msgclass - DeleteRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DeleteRegionRequest").msgclass - BatchDeleteRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BatchDeleteRegionsRequest").msgclass - ListRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListRegionsRequest").msgclass - ListRegionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListRegionsResponse").msgclass - Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region").msgclass - Region::PostalCodeArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region.PostalCodeArea").msgclass - Region::PostalCodeArea::PostalCodeRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region.PostalCodeArea.PostalCodeRange").msgclass - Region::GeoTargetArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region.GeoTargetArea").msgclass - Region::RadiusArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region.RadiusArea").msgclass - Region::RadiusArea::RadiusUnits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region.RadiusArea.RadiusUnits").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service.rb deleted file mode 100644 index f83f9ec525af..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/regions_service/credentials" -require "google/shopping/merchant/accounts/v1/regions_service/paths" -require "google/shopping/merchant/accounts/v1/regions_service/client" -require "google/shopping/merchant/accounts/v1/regions_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - {::Google::Shopping::Merchant::Accounts::V1::Region Region} - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/regions_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/regions_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new - # - module RegionsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "regions_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/regions_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/client.rb deleted file mode 100644 index 8bb34891de7d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/client.rb +++ /dev/null @@ -1,1177 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/regions_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module RegionsService - ## - # Client for the RegionsService service. - # - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - {::Google::Shopping::Merchant::Accounts::V1::Region Region} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :regions_service_stub - - ## - # Configure the RegionsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RegionsService clients - # ::Google::Shopping::Merchant::Accounts::V1::RegionsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RegionsService 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::Shopping::Merchant::Accounts::V1::RegionsService::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 - @regions_service_stub.universe_domain - end - - ## - # Create a new RegionsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RegionsService 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/shopping/merchant/accounts/v1/regions_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 - - @regions_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::RegionsService::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 - ) - - @regions_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 - @regions_service_stub.logger - end - - # Service calls - - ## - # Retrieves a region defined in your Merchant Center account. - # - # @overload get_region(request, options = nil) - # Pass arguments to `get_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_region(name: nil) - # Pass arguments to `get_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the region to retrieve. - # Format: `accounts/{account}/regions/{region}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Region] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Region] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new - # - # # Call the get_region method. - # result = client.get_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. - # p result - # - def get_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_region.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :get_region, request, 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 region definition in your Merchant Center account. Executing this - # method requires admin access. - # - # @overload create_region(request, options = nil) - # Pass arguments to `create_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_region(parent: nil, region_id: nil, region: nil) - # Pass arguments to `create_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to create a region for. - # Format: `accounts/{account}` - # @param region_id [::String] - # Required. The identifier for the region, unique over all regions of the - # same account. - # @param region [::Google::Shopping::Merchant::Accounts::V1::Region, ::Hash] - # Required. The region to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Region] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Region] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new - # - # # Call the create_region method. - # result = client.create_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. - # p result - # - def create_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest - - # Converts hash and nil to 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_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_region.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :create_region, request, 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 one or more regions in your Merchant Center account. - # Executing this method requires admin access. - # - # @overload batch_create_regions(request, options = nil) - # Pass arguments to `batch_create_regions` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_regions(parent: nil, requests: nil) - # Pass arguments to `batch_create_regions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to create one or more regions for. - # Format: `accounts/{account}` - # @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, ::Hash>] - # Required. The region(s) to create. - # The maximum number of regions that can be created in a batch is 100. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest.new - # - # # Call the batch_create_regions method. - # result = client.batch_create_regions request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse. - # p result - # - def batch_create_regions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest - - # Converts hash and nil to 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_regions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_regions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_create_regions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :batch_create_regions, request, 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 region definition in your Merchant Center account. - # Executing this method requires admin access. - # - # @overload update_region(request, options = nil) - # Pass arguments to `update_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_region(region: nil, update_mask: nil) - # Pass arguments to `update_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param region [::Google::Shopping::Merchant::Accounts::V1::Region, ::Hash] - # Required. The updated region. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The comma-separated field mask indicating the fields to update. - # Example: - # `"displayName,postalCodeArea.regionCode"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Region] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Region] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new - # - # # Call the update_region method. - # result = client.update_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. - # p result - # - def update_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest - - # Converts hash and nil to 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_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.region&.name - header_params["region.name"] = request.region.name - end - - request_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_region.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :update_region, request, 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 one or more regions in your Merchant Center account. - # Executing this method requires admin access. - # - # @overload batch_update_regions(request, options = nil) - # Pass arguments to `batch_update_regions` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_regions(parent: nil, requests: nil) - # Pass arguments to `batch_update_regions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to update one or more regions for. - # Format: `accounts/{account}` - # @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, ::Hash>] - # Required. The region(s) to update. - # The maximum number of regions that can be updated in a batch is 100. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest.new - # - # # Call the batch_update_regions method. - # result = client.batch_update_regions request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse. - # p result - # - def batch_update_regions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest - - # Converts hash and nil to 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_regions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_regions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_update_regions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :batch_update_regions, request, 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 region definition from your Merchant Center account. Executing - # this method requires admin access. - # - # @overload delete_region(request, options = nil) - # Pass arguments to `delete_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_region(name: nil) - # Pass arguments to `delete_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the region to delete. - # Format: `accounts/{account}/regions/{region}` - # - # @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/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new - # - # # Call the delete_region method. - # result = client.delete_region request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_region.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :delete_region, request, 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 multiple regions by name from your Merchant Center account. - # Executing this method requires admin access. - # - # @overload batch_delete_regions(request, options = nil) - # Pass arguments to `batch_delete_regions` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_regions(parent: nil, requests: nil) - # Pass arguments to `batch_delete_regions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to delete one or more regions from. - # Format: `accounts/{account}` - # @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, ::Hash>] - # Required. The names of the regions to delete. - # A maximum of 100 regions can be deleted in a batch. - # - # @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/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest.new - # - # # Call the batch_delete_regions method. - # result = client.batch_delete_regions request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def batch_delete_regions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest - - # Converts hash and nil to 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_regions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_regions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_delete_regions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :batch_delete_regions, request, 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 regions in your Merchant Center account. - # - # @overload list_regions(request, options = nil) - # Pass arguments to `list_regions` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_regions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_regions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list regions for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of regions to return. The service may return - # fewer than this value. - # If unspecified, at most 50 regions will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListRegions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegions` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Region>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Region>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.new - # - # # Call the list_regions method. - # result = client.list_regions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Region. - # p item - # end - # - def list_regions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_regions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_regions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_regions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :list_regions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @regions_service_stub, :list_regions, 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 RegionsService API. - # - # This class represents the configuration for RegionsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_region to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_region.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_region.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::RegionsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 RegionsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_region` - # @return [::Gapic::Config::Method] - # - attr_reader :get_region - ## - # RPC-specific configuration for `create_region` - # @return [::Gapic::Config::Method] - # - attr_reader :create_region - ## - # RPC-specific configuration for `batch_create_regions` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_regions - ## - # RPC-specific configuration for `update_region` - # @return [::Gapic::Config::Method] - # - attr_reader :update_region - ## - # RPC-specific configuration for `batch_update_regions` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_update_regions - ## - # RPC-specific configuration for `delete_region` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_region - ## - # RPC-specific configuration for `batch_delete_regions` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_delete_regions - ## - # RPC-specific configuration for `list_regions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_regions - - # @private - def initialize parent_rpcs = nil - get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region - @get_region = ::Gapic::Config::Method.new get_region_config - create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region - @create_region = ::Gapic::Config::Method.new create_region_config - batch_create_regions_config = parent_rpcs.batch_create_regions if parent_rpcs.respond_to? :batch_create_regions - @batch_create_regions = ::Gapic::Config::Method.new batch_create_regions_config - update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region - @update_region = ::Gapic::Config::Method.new update_region_config - batch_update_regions_config = parent_rpcs.batch_update_regions if parent_rpcs.respond_to? :batch_update_regions - @batch_update_regions = ::Gapic::Config::Method.new batch_update_regions_config - delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region - @delete_region = ::Gapic::Config::Method.new delete_region_config - batch_delete_regions_config = parent_rpcs.batch_delete_regions if parent_rpcs.respond_to? :batch_delete_regions - @batch_delete_regions = ::Gapic::Config::Method.new batch_delete_regions_config - list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions - @list_regions = ::Gapic::Config::Method.new list_regions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/credentials.rb deleted file mode 100644 index a1dc21a6355b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_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 Shopping - module Merchant - module Accounts - module V1 - module RegionsService - # Credentials for the RegionsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/paths.rb deleted file mode 100644 index aae7ee6dfe96..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_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 Shopping - module Merchant - module Accounts - module V1 - module RegionsService - # Path helper methods for the RegionsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified Region resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/regions/{region}` - # - # @param account [String] - # @param region [String] - # - # @return [::String] - def region_path account:, region: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/regions/#{region}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest.rb deleted file mode 100644 index 2f8d5ff753d1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/regions_service/credentials" -require "google/shopping/merchant/accounts/v1/regions_service/paths" -require "google/shopping/merchant/accounts/v1/regions_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - {::Google::Shopping::Merchant::Accounts::V1::Region Region} - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/regions_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new - # - module RegionsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/regions_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/client.rb deleted file mode 100644 index 9563857a6fbf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/client.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 "google/cloud/errors" -require "google/shopping/merchant/accounts/v1/regions_pb" -require "google/shopping/merchant/accounts/v1/regions_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module RegionsService - module Rest - ## - # REST client for the RegionsService service. - # - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - {::Google::Shopping::Merchant::Accounts::V1::Region Region} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :regions_service_stub - - ## - # Configure the RegionsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RegionsService clients - # ::Google::Shopping::Merchant::Accounts::V1::RegionsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RegionsService 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::Shopping::Merchant::Accounts::V1::RegionsService::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 - @regions_service_stub.universe_domain - end - - ## - # Create a new RegionsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RegionsService 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 - - @regions_service_stub = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @regions_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 - @regions_service_stub.logger - end - - # Service calls - - ## - # Retrieves a region defined in your Merchant Center account. - # - # @overload get_region(request, options = nil) - # Pass arguments to `get_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_region(name: nil) - # Pass arguments to `get_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the region to retrieve. - # Format: `accounts/{account}/regions/{region}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Region] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new - # - # # Call the get_region method. - # result = client.get_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. - # p result - # - def get_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_region.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.get_region request, 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 region definition in your Merchant Center account. Executing this - # method requires admin access. - # - # @overload create_region(request, options = nil) - # Pass arguments to `create_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_region(parent: nil, region_id: nil, region: nil) - # Pass arguments to `create_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to create a region for. - # Format: `accounts/{account}` - # @param region_id [::String] - # Required. The identifier for the region, unique over all regions of the - # same account. - # @param region [::Google::Shopping::Merchant::Accounts::V1::Region, ::Hash] - # Required. The region to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Region] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new - # - # # Call the create_region method. - # result = client.create_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. - # p result - # - def create_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest - - # Converts hash and nil to an 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_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_region.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.create_region request, 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 one or more regions in your Merchant Center account. - # Executing this method requires admin access. - # - # @overload batch_create_regions(request, options = nil) - # Pass arguments to `batch_create_regions` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_regions(parent: nil, requests: nil) - # Pass arguments to `batch_create_regions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to create one or more regions for. - # Format: `accounts/{account}` - # @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, ::Hash>] - # Required. The region(s) to create. - # The maximum number of regions that can be created in a batch is 100. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest.new - # - # # Call the batch_create_regions method. - # result = client.batch_create_regions request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse. - # p result - # - def batch_create_regions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest - - # Converts hash and nil to an 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_regions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_regions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_create_regions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.batch_create_regions request, 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 region definition in your Merchant Center account. - # Executing this method requires admin access. - # - # @overload update_region(request, options = nil) - # Pass arguments to `update_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_region(region: nil, update_mask: nil) - # Pass arguments to `update_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param region [::Google::Shopping::Merchant::Accounts::V1::Region, ::Hash] - # Required. The updated region. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The comma-separated field mask indicating the fields to update. - # Example: - # `"displayName,postalCodeArea.regionCode"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Region] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new - # - # # Call the update_region method. - # result = client.update_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. - # p result - # - def update_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest - - # Converts hash and nil to an 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_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_region.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.update_region request, 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 one or more regions in your Merchant Center account. - # Executing this method requires admin access. - # - # @overload batch_update_regions(request, options = nil) - # Pass arguments to `batch_update_regions` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_regions(parent: nil, requests: nil) - # Pass arguments to `batch_update_regions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to update one or more regions for. - # Format: `accounts/{account}` - # @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, ::Hash>] - # Required. The region(s) to update. - # The maximum number of regions that can be updated in a batch is 100. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest.new - # - # # Call the batch_update_regions method. - # result = client.batch_update_regions request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse. - # p result - # - def batch_update_regions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest - - # Converts hash and nil to an 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_regions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_regions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_update_regions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.batch_update_regions request, 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 region definition from your Merchant Center account. Executing - # this method requires admin access. - # - # @overload delete_region(request, options = nil) - # Pass arguments to `delete_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_region(name: nil) - # Pass arguments to `delete_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the region to delete. - # Format: `accounts/{account}/regions/{region}` - # @yield [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/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new - # - # # Call the delete_region method. - # result = client.delete_region request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_region.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.delete_region request, 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 multiple regions by name from your Merchant Center account. - # Executing this method requires admin access. - # - # @overload batch_delete_regions(request, options = nil) - # Pass arguments to `batch_delete_regions` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_regions(parent: nil, requests: nil) - # Pass arguments to `batch_delete_regions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to delete one or more regions from. - # Format: `accounts/{account}` - # @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, ::Hash>] - # Required. The names of the regions to delete. - # A maximum of 100 regions can be deleted in a batch. - # @yield [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/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest.new - # - # # Call the batch_delete_regions method. - # result = client.batch_delete_regions request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def batch_delete_regions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest - - # Converts hash and nil to an 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_regions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_regions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_delete_regions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.batch_delete_regions request, 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 regions in your Merchant Center account. - # - # @overload list_regions(request, options = nil) - # Pass arguments to `list_regions` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_regions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_regions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list regions for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of regions to return. The service may return - # fewer than this value. - # If unspecified, at most 50 regions will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListRegions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegions` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Region>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Region>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.new - # - # # Call the list_regions method. - # result = client.list_regions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Region. - # p item - # end - # - def list_regions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_regions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_regions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_regions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.list_regions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @regions_service_stub, :list_regions, "regions", request, result, 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 RegionsService REST API. - # - # This class represents the configuration for RegionsService 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::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_region to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_region.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_region.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 RegionsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_region` - # @return [::Gapic::Config::Method] - # - attr_reader :get_region - ## - # RPC-specific configuration for `create_region` - # @return [::Gapic::Config::Method] - # - attr_reader :create_region - ## - # RPC-specific configuration for `batch_create_regions` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_regions - ## - # RPC-specific configuration for `update_region` - # @return [::Gapic::Config::Method] - # - attr_reader :update_region - ## - # RPC-specific configuration for `batch_update_regions` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_update_regions - ## - # RPC-specific configuration for `delete_region` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_region - ## - # RPC-specific configuration for `batch_delete_regions` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_delete_regions - ## - # RPC-specific configuration for `list_regions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_regions - - # @private - def initialize parent_rpcs = nil - get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region - @get_region = ::Gapic::Config::Method.new get_region_config - create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region - @create_region = ::Gapic::Config::Method.new create_region_config - batch_create_regions_config = parent_rpcs.batch_create_regions if parent_rpcs.respond_to? :batch_create_regions - @batch_create_regions = ::Gapic::Config::Method.new batch_create_regions_config - update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region - @update_region = ::Gapic::Config::Method.new update_region_config - batch_update_regions_config = parent_rpcs.batch_update_regions if parent_rpcs.respond_to? :batch_update_regions - @batch_update_regions = ::Gapic::Config::Method.new batch_update_regions_config - delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region - @delete_region = ::Gapic::Config::Method.new delete_region_config - batch_delete_regions_config = parent_rpcs.batch_delete_regions if parent_rpcs.respond_to? :batch_delete_regions - @batch_delete_regions = ::Gapic::Config::Method.new batch_delete_regions_config - list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions - @list_regions = ::Gapic::Config::Method.new list_regions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/service_stub.rb deleted file mode 100644 index 1b255bef97d4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/service_stub.rb +++ /dev/null @@ -1,576 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/regions_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module RegionsService - module Rest - ## - # REST service stub for the RegionsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Region] - # A result object deserialized from the server's reply - def get_region request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_region_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_region", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::Region.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_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Region] - # A result object deserialized from the server's reply - def create_region request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_region_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_region", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::Region.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_regions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse] - # A result object deserialized from the server's reply - def batch_create_regions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_regions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_regions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse.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_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::Region] - # A result object deserialized from the server's reply - def update_region request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_region_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_region", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::Region.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_regions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse] - # A result object deserialized from the server's reply - def batch_update_regions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_update_regions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_regions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse.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_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_region request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_region_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_region", - 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_regions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_regions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_delete_regions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_regions", - 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_regions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse] - # A result object deserialized from the server's reply - def list_regions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_regions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_regions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_region_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest] - # 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_region_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{parent}/regions", - body: "region", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_create_regions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest] - # 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_regions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{parent}/regions:batchCreate", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest] - # 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_region_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1/{region.name}", - body: "region", - matches: [ - ["region.name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_update_regions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest] - # 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_regions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{parent}/regions:batchUpdate", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_region_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_delete_regions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest] - # 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_regions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{parent}/regions:batchDelete", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_regions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_regions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{parent}/regions", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_services_pb.rb deleted file mode 100644 index b8835aa5d9bb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_services_pb.rb +++ /dev/null @@ -1,71 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/regions.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/regions_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module RegionsService - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1.Region] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.RegionsService' - - # Retrieves a region defined in your Merchant Center account. - rpc :GetRegion, ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest, ::Google::Shopping::Merchant::Accounts::V1::Region - # Creates a region definition in your Merchant Center account. Executing this - # method requires admin access. - rpc :CreateRegion, ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1::Region - # Creates one or more regions in your Merchant Center account. - # Executing this method requires admin access. - rpc :BatchCreateRegions, ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest, ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse - # Updates a region definition in your Merchant Center account. - # Executing this method requires admin access. - rpc :UpdateRegion, ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1::Region - # Updates one or more regions in your Merchant Center account. - # Executing this method requires admin access. - rpc :BatchUpdateRegions, ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest, ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse - # Deletes a region definition from your Merchant Center account. Executing - # this method requires admin access. - rpc :DeleteRegion, ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, ::Google::Protobuf::Empty - # Deletes multiple regions by name from your Merchant Center account. - # Executing this method requires admin access. - rpc :BatchDeleteRegions, ::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest, ::Google::Protobuf::Empty - # Lists the regions in your Merchant Center account. - rpc :ListRegions, ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/rest.rb deleted file mode 100644 index 7c8dc735d03e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/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 "google/shopping/merchant/accounts/v1/account_issue_service/rest" -require "google/shopping/merchant/accounts/v1/account_relationships_service/rest" -require "google/shopping/merchant/accounts/v1/account_services_service/rest" -require "google/shopping/merchant/accounts/v1/user_service/rest" -require "google/shopping/merchant/accounts/v1/accounts_service/rest" -require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest" -require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest" -require "google/shopping/merchant/accounts/v1/business_identity_service/rest" -require "google/shopping/merchant/accounts/v1/business_info_service/rest" -require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest" -require "google/shopping/merchant/accounts/v1/developer_registration_service/rest" -require "google/shopping/merchant/accounts/v1/email_preferences_service/rest" -require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest" -require "google/shopping/merchant/accounts/v1/homepage_service/rest" -require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest" -require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest" -require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest" -require "google/shopping/merchant/accounts/v1/programs_service/rest" -require "google/shopping/merchant/accounts/v1/regions_service/rest" -require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest" -require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest" -require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest" -require "google/shopping/merchant/accounts/v1/version" - -module Google - module Shopping - module Merchant - module Accounts - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/accounts/v1/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service.rb deleted file mode 100644 index 63be3ac76824..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/shipping_settings_service/credentials" -require "google/shopping/merchant/accounts/v1/shipping_settings_service/paths" -require "google/shopping/merchant/accounts/v1/shipping_settings_service/client" -require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to get method call shipping setting information per Merchant API - # method. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/shipping_settings_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new - # - module ShippingSettingsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "shipping_settings_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/shipping_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/client.rb deleted file mode 100644 index abfba1e3a1b8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/client.rb +++ /dev/null @@ -1,581 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/shippingsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module ShippingSettingsService - ## - # Client for the ShippingSettingsService service. - # - # Service to get method call shipping setting information per Merchant API - # method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :shipping_settings_service_stub - - ## - # Configure the ShippingSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ShippingSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ShippingSettingsService 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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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 - @shipping_settings_service_stub.universe_domain - end - - ## - # Create a new ShippingSettingsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ShippingSettingsService 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/shopping/merchant/accounts/v1/shippingsettings_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 - - @shipping_settings_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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 - ) - - @shipping_settings_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 - @shipping_settings_service_stub.logger - end - - # Service calls - - ## - # Retrieve shipping setting information. - # - # @overload get_shipping_settings(request, options = nil) - # Pass arguments to `get_shipping_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_shipping_settings(name: nil) - # Pass arguments to `get_shipping_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the shipping setting to retrieve. - # Format: `accounts/{account}/shippingsettings` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new - # - # # Call the get_shipping_settings method. - # result = client.get_shipping_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. - # p result - # - def get_shipping_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_shipping_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_shipping_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_shipping_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @shipping_settings_service_stub.call_rpc :get_shipping_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replace the shipping setting of a business with the request shipping - # setting. Executing this method requires admin access. - # - # @overload insert_shipping_settings(request, options = nil) - # Pass arguments to `insert_shipping_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_shipping_settings(parent: nil, shipping_setting: nil) - # Pass arguments to `insert_shipping_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account for which this shipping setting will be inserted. If - # you are using an advanced account, you must specify the unique identifier - # of the sub-account for which you want to insert the shipping setting. - # Format: `accounts/{ACCOUNT_ID}` - # @param shipping_setting [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings, ::Hash] - # Required. The new version of the account. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new - # - # # Call the insert_shipping_settings method. - # result = client.insert_shipping_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. - # p result - # - def insert_shipping_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_shipping_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_shipping_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_shipping_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @shipping_settings_service_stub.call_rpc :insert_shipping_settings, request, 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 ShippingSettingsService API. - # - # This class represents the configuration for ShippingSettingsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_shipping_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_shipping_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_shipping_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ShippingSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_shipping_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_shipping_settings - ## - # RPC-specific configuration for `insert_shipping_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_shipping_settings - - # @private - def initialize parent_rpcs = nil - get_shipping_settings_config = parent_rpcs.get_shipping_settings if parent_rpcs.respond_to? :get_shipping_settings - @get_shipping_settings = ::Gapic::Config::Method.new get_shipping_settings_config - insert_shipping_settings_config = parent_rpcs.insert_shipping_settings if parent_rpcs.respond_to? :insert_shipping_settings - @insert_shipping_settings = ::Gapic::Config::Method.new insert_shipping_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/credentials.rb deleted file mode 100644 index 9b864efbf96a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_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 Shopping - module Merchant - module Accounts - module V1 - module ShippingSettingsService - # Credentials for the ShippingSettingsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/paths.rb deleted file mode 100644 index 20fefc55698a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/paths.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module ShippingSettingsService - # Path helper methods for the ShippingSettingsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified ShippingSettings resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/shippingSettings` - # - # @param account [String] - # - # @return [::String] - def shipping_settings_path account: - "accounts/#{account}/shippingSettings" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest.rb deleted file mode 100644 index f6bd48787330..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/shipping_settings_service/credentials" -require "google/shopping/merchant/accounts/v1/shipping_settings_service/paths" -require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to get method call shipping setting information per Merchant API - # method. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new - # - module ShippingSettingsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client.rb deleted file mode 100644 index 7ecab5d3c95b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client.rb +++ /dev/null @@ -1,524 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/shippingsettings_pb" -require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module ShippingSettingsService - module Rest - ## - # REST client for the ShippingSettingsService service. - # - # Service to get method call shipping setting information per Merchant API - # method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :shipping_settings_service_stub - - ## - # Configure the ShippingSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ShippingSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ShippingSettingsService 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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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 - @shipping_settings_service_stub.universe_domain - end - - ## - # Create a new ShippingSettingsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ShippingSettingsService 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 - - @shipping_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @shipping_settings_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 - @shipping_settings_service_stub.logger - end - - # Service calls - - ## - # Retrieve shipping setting information. - # - # @overload get_shipping_settings(request, options = nil) - # Pass arguments to `get_shipping_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_shipping_settings(name: nil) - # Pass arguments to `get_shipping_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the shipping setting to retrieve. - # Format: `accounts/{account}/shippingsettings` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new - # - # # Call the get_shipping_settings method. - # result = client.get_shipping_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. - # p result - # - def get_shipping_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_shipping_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_shipping_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_shipping_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @shipping_settings_service_stub.get_shipping_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replace the shipping setting of a business with the request shipping - # setting. Executing this method requires admin access. - # - # @overload insert_shipping_settings(request, options = nil) - # Pass arguments to `insert_shipping_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_shipping_settings(parent: nil, shipping_setting: nil) - # Pass arguments to `insert_shipping_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account for which this shipping setting will be inserted. If - # you are using an advanced account, you must specify the unique identifier - # of the sub-account for which you want to insert the shipping setting. - # Format: `accounts/{ACCOUNT_ID}` - # @param shipping_setting [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings, ::Hash] - # Required. The new version of the account. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new - # - # # Call the insert_shipping_settings method. - # result = client.insert_shipping_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. - # p result - # - def insert_shipping_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_shipping_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_shipping_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_shipping_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @shipping_settings_service_stub.insert_shipping_settings request, 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 ShippingSettingsService REST API. - # - # This class represents the configuration for ShippingSettingsService 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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_shipping_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_shipping_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_shipping_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ShippingSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_shipping_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_shipping_settings - ## - # RPC-specific configuration for `insert_shipping_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_shipping_settings - - # @private - def initialize parent_rpcs = nil - get_shipping_settings_config = parent_rpcs.get_shipping_settings if parent_rpcs.respond_to? :get_shipping_settings - @get_shipping_settings = ::Gapic::Config::Method.new get_shipping_settings_config - insert_shipping_settings_config = parent_rpcs.insert_shipping_settings if parent_rpcs.respond_to? :insert_shipping_settings - @insert_shipping_settings = ::Gapic::Config::Method.new insert_shipping_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub.rb deleted file mode 100644 index ec5a6f4d1de1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/shippingsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module ShippingSettingsService - module Rest - ## - # REST service stub for the ShippingSettingsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_shipping_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] - # A result object deserialized from the server's reply - def get_shipping_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_shipping_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_shipping_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the insert_shipping_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] - # A result object deserialized from the server's reply - def insert_shipping_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_shipping_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "insert_shipping_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_shipping_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_shipping_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/shippingSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_shipping_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_shipping_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{parent}/shippingSettings:insert", - body: "shipping_setting", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_pb.rb deleted file mode 100644 index d48a50f10e3d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/shippingsettings.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/shopping/type/types_pb' - - -descriptor_data = "\n;google/shopping/merchant/accounts/v1/shippingsettings.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xc3\x02\n\x10ShippingSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x44\n\x08services\x18\x02 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1.ServiceB\x03\xe0\x41\x01\x12H\n\nwarehouses\x18\x03 \x03(\x0b\x32/.google.shopping.merchant.accounts.v1.WarehouseB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x02:y\xea\x41v\n+merchantapi.googleapis.com/ShippingSettings\x12#accounts/{account}/shippingSettings*\x10shippingSettings2\x10shippingSettings\"\xaf\x10\n\x07Service\x12\x1e\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06\x61\x63tive\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1f\n\x12\x64\x65livery_countries\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12\x1f\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12S\n\rdelivery_time\x18\x05 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1.DeliveryTimeB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12I\n\x0brate_groups\x18\x06 \x03(\x0b\x32/.google.shopping.merchant.accounts.v1.RateGroupB\x03\xe0\x41\x01\x12[\n\rshipment_type\x18\x07 \x01(\x0e\x32:.google.shopping.merchant.accounts.v1.Service.ShipmentTypeB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x42\n\x13minimum_order_value\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12i\n\x19minimum_order_value_table\x18\t \x01(\x0b\x32<.google.shopping.merchant.accounts.v1.MinimumOrderValueTableB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12T\n\x0cstore_config\x18\n \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1.Service.StoreConfigH\x07\x88\x01\x01\x12[\n\x10loyalty_programs\x18\x0b \x03(\x0b\x32<.google.shopping.merchant.accounts.v1.Service.LoyaltyProgramB\x03\xe0\x41\x01\x1a\xd2\x06\n\x0bStoreConfig\x12k\n\x12store_service_type\x18\x01 \x01(\x0e\x32J.google.shopping.merchant.accounts.v1.Service.StoreConfig.StoreServiceTypeH\x00\x88\x01\x01\x12\x18\n\x0bstore_codes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x62\n\rcutoff_config\x18\x03 \x01(\x0b\x32\x46.google.shopping.merchant.accounts.v1.Service.StoreConfig.CutoffConfigH\x01\x88\x01\x01\x12K\n\x0eservice_radius\x18\x04 \x01(\x0b\x32..google.shopping.merchant.accounts.v1.DistanceH\x02\x88\x01\x01\x1a\xf1\x02\n\x0c\x43utoffConfig\x12v\n\x11local_cutoff_time\x18\x01 \x01(\x0b\x32V.google.shopping.merchant.accounts.v1.Service.StoreConfig.CutoffConfig.LocalCutoffTimeH\x00\x88\x01\x01\x12%\n\x18store_close_offset_hours\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12$\n\x17no_delivery_post_cutoff\x18\x03 \x01(\x08H\x02\x88\x01\x01\x1aM\n\x0fLocalCutoffTime\x12\x11\n\x04hour\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x13\n\x06minute\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minuteB\x14\n\x12_local_cutoff_timeB\x1b\n\x19_store_close_offset_hoursB\x1a\n\x18_no_delivery_post_cutoff\"[\n\x10StoreServiceType\x12\"\n\x1eSTORE_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nALL_STORES\x10\x01\x12\x13\n\x0fSELECTED_STORES\x10\x02\x42\x15\n\x13_store_service_typeB\x10\n\x0e_cutoff_configB\x11\n\x0f_service_radius\x1a\xf3\x01\n\x0eLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12t\n\x15loyalty_program_tiers\x18\x02 \x03(\x0b\x32P.google.shopping.merchant.accounts.v1.Service.LoyaltyProgram.LoyaltyProgramTiersB\x03\xe0\x41\x01\x1a=\n\x13LoyaltyProgramTiers\x12\x17\n\ntier_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_tier_labelB\x10\n\x0e_program_label\"e\n\x0cShipmentType\x12\x1d\n\x19SHIPMENT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45LIVERY\x10\x01\x12\x12\n\x0eLOCAL_DELIVERY\x10\x02\x12\x14\n\x10\x43OLLECTION_POINT\x10\x03\x42\x0f\n\r_service_nameB\t\n\x07_activeB\x10\n\x0e_currency_codeB\x10\n\x0e_delivery_timeB\x10\n\x0e_shipment_typeB\x16\n\x14_minimum_order_valueB\x1c\n\x1a_minimum_order_value_tableB\x0f\n\r_store_config\"\xb2\x01\n\x08\x44istance\x12\x12\n\x05value\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x46\n\x04unit\x18\x02 \x01(\x0e\x32\x33.google.shopping.merchant.accounts.v1.Distance.UnitH\x01\x88\x01\x01\"7\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\t\n\x05MILES\x10\x01\x12\x0e\n\nKILOMETERS\x10\x02\x42\x08\n\x06_valueB\x07\n\x05_unit\"\xa4\x03\n\tWarehouse\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12Q\n\x10shipping_address\x18\x02 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.AddressB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12X\n\x0b\x63utoff_time\x18\x03 \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1.WarehouseCutoffTimeB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x1f\n\rhandling_days\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02H\x03\x88\x01\x01\x12Y\n\x13\x62usiness_day_config\x18\x05 \x01(\x0b\x32\x37.google.shopping.merchant.accounts.v1.BusinessDayConfigH\x04\x88\x01\x01\x42\x07\n\x05_nameB\x13\n\x11_shipping_addressB\x0e\n\x0c_cutoff_timeB\x10\n\x0e_handling_daysB\x16\n\x14_business_day_config\"[\n\x13WarehouseCutoffTime\x12\x16\n\x04hour\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06minute\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minute\"\xf7\x01\n\x07\x41\x64\x64ress\x12\x1b\n\x0estreet_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x04\x63ity\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12%\n\x13\x61\x64ministrative_area\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x1d\n\x0bpostal_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\x1d\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02H\x04\x88\x01\x01\x42\x11\n\x0f_street_addressB\x07\n\x05_cityB\x16\n\x14_administrative_areaB\x0e\n\x0c_postal_codeB\x0e\n\x0c_region_code\"\xa1\x06\n\x0c\x44\x65liveryTime\x12\x1d\n\x10min_transit_days\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_transit_days\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12J\n\x0b\x63utoff_time\x18\x03 \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1.CutoffTimeH\x02\x88\x01\x01\x12\x1e\n\x11min_handling_days\x18\x04 \x01(\x05H\x03\x88\x01\x01\x12\x1e\n\x11max_handling_days\x18\x05 \x01(\x05H\x04\x88\x01\x01\x12S\n\x12transit_time_table\x18\x06 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1.TransitTableH\x05\x88\x01\x01\x12\x62\n\x1chandling_business_day_config\x18\x07 \x01(\x0b\x32\x37.google.shopping.merchant.accounts.v1.BusinessDayConfigH\x06\x88\x01\x01\x12\x61\n\x1btransit_business_day_config\x18\x08 \x01(\x0b\x32\x37.google.shopping.merchant.accounts.v1.BusinessDayConfigH\x07\x88\x01\x01\x12m\n\x1ewarehouse_based_delivery_times\x18\t \x03(\x0b\x32@.google.shopping.merchant.accounts.v1.WarehouseBasedDeliveryTimeB\x03\xe0\x41\x01\x42\x13\n\x11_min_transit_daysB\x13\n\x11_max_transit_daysB\x0e\n\x0c_cutoff_timeB\x14\n\x12_min_handling_daysB\x14\n\x12_max_handling_daysB\x15\n\x13_transit_time_tableB\x1f\n\x1d_handling_business_day_configB\x1e\n\x1c_transit_business_day_config\"}\n\nCutoffTime\x12\x16\n\x04hour\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06minute\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1b\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minuteB\x0c\n\n_time_zone\"\xf0\x01\n\x11\x42usinessDayConfig\x12[\n\rbusiness_days\x18\x01 \x03(\x0e\x32?.google.shopping.merchant.accounts.v1.BusinessDayConfig.WeekdayB\x03\xe0\x41\x02\"~\n\x07Weekday\x12\x17\n\x13WEEKDAY_UNSPECIFIED\x10\x00\x12\n\n\x06MONDAY\x10\x01\x12\x0b\n\x07TUESDAY\x10\x02\x12\r\n\tWEDNESDAY\x10\x03\x12\x0c\n\x08THURSDAY\x10\x04\x12\n\n\x06\x46RIDAY\x10\x05\x12\x0c\n\x08SATURDAY\x10\x06\x12\n\n\x06SUNDAY\x10\x07\"\xa5\x01\n\x1aWarehouseBasedDeliveryTime\x12\x19\n\x07\x63\x61rrier\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12!\n\x0f\x63\x61rrier_service\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1b\n\twarehouse\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\n\n\x08_carrierB\x12\n\x10_carrier_serviceB\x0c\n\n_warehouse\"\x97\x03\n\tRateGroup\x12\'\n\x1a\x61pplicable_shipping_labels\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x46\n\x0csingle_value\x18\x02 \x01(\x0b\x32+.google.shopping.merchant.accounts.v1.ValueH\x00\x88\x01\x01\x12\x44\n\nmain_table\x18\x03 \x01(\x0b\x32+.google.shopping.merchant.accounts.v1.TableH\x01\x88\x01\x01\x12\x43\n\tsubtables\x18\x04 \x03(\x0b\x32+.google.shopping.merchant.accounts.v1.TableB\x03\xe0\x41\x01\x12M\n\rcarrier_rates\x18\x05 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1.CarrierRateB\x03\xe0\x41\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x0f\n\r_single_valueB\r\n\x0b_main_tableB\x07\n\x05_name\"\x9e\x02\n\x05Table\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12L\n\x0brow_headers\x18\x02 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.HeadersB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12J\n\x0e\x63olumn_headers\x18\x03 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.HeadersH\x02\x88\x01\x01\x12<\n\x04rows\x18\x04 \x03(\x0b\x32).google.shopping.merchant.accounts.v1.RowB\x03\xe0\x41\x02\x42\x07\n\x05_nameB\x0e\n\x0c_row_headersB\x11\n\x0f_column_headers\"\xa4\x03\n\x0cTransitTable\x12$\n\x17postal_code_group_names\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12 \n\x13transit_time_labels\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12T\n\x04rows\x18\x03 \x03(\x0b\x32\x41.google.shopping.merchant.accounts.v1.TransitTable.TransitTimeRowB\x03\xe0\x41\x02\x1a\xf5\x01\n\x0eTransitTimeRow\x12g\n\x06values\x18\x01 \x03(\x0b\x32R.google.shopping.merchant.accounts.v1.TransitTable.TransitTimeRow.TransitTimeValueB\x03\xe0\x41\x02\x1az\n\x10TransitTimeValue\x12\x1d\n\x10min_transit_days\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_transit_days\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x13\n\x11_min_transit_daysB\x13\n\x11_max_transit_days\"\xfd\x01\n\x16MinimumOrderValueTable\x12w\n\x18store_code_set_with_movs\x18\x01 \x03(\x0b\x32P.google.shopping.merchant.accounts.v1.MinimumOrderValueTable.StoreCodeSetWithMovB\x03\xe0\x41\x02\x1aj\n\x13StoreCodeSetWithMov\x12\x18\n\x0bstore_codes\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12/\n\x05value\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x88\x01\x01\x42\x08\n\x06_value\"\x80\x02\n\x07Headers\x12\x30\n\x06prices\x18\x01 \x03(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02\x12\x32\n\x07weights\x18\x02 \x03(\x0b\x32\x1c.google.shopping.type.WeightB\x03\xe0\x41\x02\x12\x1c\n\x0fnumber_of_items\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12$\n\x17postal_code_group_names\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12K\n\tlocations\x18\x05 \x03(\x0b\x32\x33.google.shopping.merchant.accounts.v1.LocationIdSetB\x03\xe0\x41\x02\"*\n\rLocationIdSet\x12\x19\n\x0clocation_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02\"F\n\x03Row\x12?\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32+.google.shopping.merchant.accounts.v1.ValueB\x03\xe0\x41\x02\"\xf8\x01\n\x05Value\x12\x18\n\x0bno_shipping\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x33\n\tflat_rate\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x01\x88\x01\x01\x12\x1d\n\x10price_percentage\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0c\x63\x61rrier_rate\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08subtable\x18\x05 \x01(\tH\x04\x88\x01\x01\x42\x0e\n\x0c_no_shippingB\x0c\n\n_flat_rateB\x13\n\x11_price_percentageB\x0f\n\r_carrier_rateB\x0b\n\t_subtable\"\xe0\x02\n\x0b\x43\x61rrierRate\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x19\n\x07\x63\x61rrier\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12!\n\x0f\x63\x61rrier_service\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12$\n\x12origin_postal_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\'\n\x15percentage_adjustment\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12>\n\x0f\x66lat_adjustment\x18\x06 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x05\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_carrierB\x12\n\x10_carrier_serviceB\x15\n\x13_origin_postal_codeB\x18\n\x16_percentage_adjustmentB\x12\n\x10_flat_adjustment\"_\n\x1aGetShippingSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ShippingSettings\"\xb2\x01\n\x1dInsertShippingSettingsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12U\n\x10shipping_setting\x18\x02 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.ShippingSettingsB\x03\xe0\x41\x02\x32\xa0\x04\n\x17ShippingSettingsService\x12\xcf\x01\n\x13GetShippingSettings\x12@.google.shopping.merchant.accounts.v1.GetShippingSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.ShippingSettings\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1/{name=accounts/*/shippingSettings}\x12\xe9\x01\n\x16InsertShippingSettings\x12\x43.google.shopping.merchant.accounts.v1.InsertShippingSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.ShippingSettings\"R\x82\xd3\xe4\x93\x02L\"8/accounts/v1/{parent=accounts/*}/shippingSettings:insert:\x10shipping_setting\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x88\x02\n(com.google.shopping.merchant.accounts.v1B\x15ShippingSettingsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ShippingSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ShippingSettings").msgclass - Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service").msgclass - Service::StoreConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.StoreConfig").msgclass - Service::StoreConfig::CutoffConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.StoreConfig.CutoffConfig").msgclass - Service::StoreConfig::CutoffConfig::LocalCutoffTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.StoreConfig.CutoffConfig.LocalCutoffTime").msgclass - Service::StoreConfig::StoreServiceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.StoreConfig.StoreServiceType").enummodule - Service::LoyaltyProgram = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.LoyaltyProgram").msgclass - Service::LoyaltyProgram::LoyaltyProgramTiers = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.LoyaltyProgram.LoyaltyProgramTiers").msgclass - Service::ShipmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.ShipmentType").enummodule - Distance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Distance").msgclass - Distance::Unit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Distance.Unit").enummodule - Warehouse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Warehouse").msgclass - WarehouseCutoffTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.WarehouseCutoffTime").msgclass - Address = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Address").msgclass - DeliveryTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DeliveryTime").msgclass - CutoffTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CutoffTime").msgclass - BusinessDayConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessDayConfig").msgclass - BusinessDayConfig::Weekday = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessDayConfig.Weekday").enummodule - WarehouseBasedDeliveryTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.WarehouseBasedDeliveryTime").msgclass - RateGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.RateGroup").msgclass - Table = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Table").msgclass - TransitTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TransitTable").msgclass - TransitTable::TransitTimeRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TransitTable.TransitTimeRow").msgclass - TransitTable::TransitTimeRow::TransitTimeValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TransitTable.TransitTimeRow.TransitTimeValue").msgclass - MinimumOrderValueTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.MinimumOrderValueTable").msgclass - MinimumOrderValueTable::StoreCodeSetWithMov = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.MinimumOrderValueTable.StoreCodeSetWithMov").msgclass - Headers = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Headers").msgclass - LocationIdSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LocationIdSet").msgclass - Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Row").msgclass - Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Value").msgclass - CarrierRate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CarrierRate").msgclass - GetShippingSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetShippingSettingsRequest").msgclass - InsertShippingSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.InsertShippingSettingsRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_services_pb.rb deleted file mode 100644 index 27a01058a35a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/shippingsettings.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/shippingsettings_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module ShippingSettingsService - # Service to get method call shipping setting information per Merchant API - # method. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.ShippingSettingsService' - - # Retrieve shipping setting information. - rpc :GetShippingSettings, ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings - # Replace the shipping setting of a business with the request shipping - # setting. Executing this method requires admin access. - rpc :InsertShippingSettings, ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service.rb deleted file mode 100644 index 55ae739527f4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials" -require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths" -require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client" -require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support `TermsOfServiceAgreementState` API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new - # - module TermsOfServiceAgreementStateService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "terms_of_service_agreement_state_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client.rb deleted file mode 100644 index ad8702ecded4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client.rb +++ /dev/null @@ -1,580 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module TermsOfServiceAgreementStateService - ## - # Client for the TermsOfServiceAgreementStateService service. - # - # Service to support `TermsOfServiceAgreementState` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :terms_of_service_agreement_state_service_stub - - ## - # Configure the TermsOfServiceAgreementStateService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TermsOfServiceAgreementStateService clients - # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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 - @terms_of_service_agreement_state_service_stub.universe_domain - end - - ## - # Create a new TermsOfServiceAgreementStateService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TermsOfServiceAgreementStateService 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/shopping/merchant/accounts/v1/termsofserviceagreementstate_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 - - @terms_of_service_agreement_state_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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 - ) - - @terms_of_service_agreement_state_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 - @terms_of_service_agreement_state_service_stub.logger - end - - # Service calls - - ## - # Returns the state of a terms of service agreement. - # - # @overload get_terms_of_service_agreement_state(request, options = nil) - # Pass arguments to `get_terms_of_service_agreement_state` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_terms_of_service_agreement_state(name: nil) - # Pass arguments to `get_terms_of_service_agreement_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `accounts/{account}/termsOfServiceAgreementStates/{identifier}` - # The identifier format is: `{TermsOfServiceKind}-{country}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new - # - # # Call the get_terms_of_service_agreement_state method. - # result = client.get_terms_of_service_agreement_state request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. - # p result - # - def get_terms_of_service_agreement_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_terms_of_service_agreement_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_terms_of_service_agreement_state.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_terms_of_service_agreement_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_agreement_state_service_stub.call_rpc :get_terms_of_service_agreement_state, request, 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 the state of the agreement for the application terms of service. - # - # Application terms of service covers permissions related to the usage of - # data provided through Merchant Center, CSS Center, Manufacturer Center, and - # more. - # - # @overload retrieve_for_application_terms_of_service_agreement_state(request, options = nil) - # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload retrieve_for_application_terms_of_service_agreement_state(parent: nil) - # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account for which to get a TermsOfServiceAgreementState - # Format: `accounts/{account}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new - # - # # Call the retrieve_for_application_terms_of_service_agreement_state method. - # result = client.retrieve_for_application_terms_of_service_agreement_state request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. - # p result - # - def retrieve_for_application_terms_of_service_agreement_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.timeout, - metadata: metadata, - retry_policy: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_agreement_state_service_stub.call_rpc :retrieve_for_application_terms_of_service_agreement_state, request, 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 TermsOfServiceAgreementStateService API. - # - # This class represents the configuration for TermsOfServiceAgreementStateService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_terms_of_service_agreement_state to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 TermsOfServiceAgreementStateService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_terms_of_service_agreement_state` - # @return [::Gapic::Config::Method] - # - attr_reader :get_terms_of_service_agreement_state - ## - # RPC-specific configuration for `retrieve_for_application_terms_of_service_agreement_state` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_for_application_terms_of_service_agreement_state - - # @private - def initialize parent_rpcs = nil - get_terms_of_service_agreement_state_config = parent_rpcs.get_terms_of_service_agreement_state if parent_rpcs.respond_to? :get_terms_of_service_agreement_state - @get_terms_of_service_agreement_state = ::Gapic::Config::Method.new get_terms_of_service_agreement_state_config - retrieve_for_application_terms_of_service_agreement_state_config = parent_rpcs.retrieve_for_application_terms_of_service_agreement_state if parent_rpcs.respond_to? :retrieve_for_application_terms_of_service_agreement_state - @retrieve_for_application_terms_of_service_agreement_state = ::Gapic::Config::Method.new retrieve_for_application_terms_of_service_agreement_state_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials.rb deleted file mode 100644 index 429858db9677..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_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 Shopping - module Merchant - module Accounts - module V1 - module TermsOfServiceAgreementStateService - # Credentials for the TermsOfServiceAgreementStateService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths.rb deleted file mode 100644 index 9047b288be94..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_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 Shopping - module Merchant - module Accounts - module V1 - module TermsOfServiceAgreementStateService - # Path helper methods for the TermsOfServiceAgreementStateService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified TermsOfServiceAgreementState resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/termsOfServiceAgreementStates/{identifier}` - # - # @param account [String] - # @param identifier [String] - # - # @return [::String] - def terms_of_service_agreement_state_path account:, identifier: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/termsOfServiceAgreementStates/#{identifier}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest.rb deleted file mode 100644 index 6cca99c02938..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials" -require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths" -require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support `TermsOfServiceAgreementState` API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new - # - module TermsOfServiceAgreementStateService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/client.rb deleted file mode 100644 index aef7302ffcc1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb" -require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module TermsOfServiceAgreementStateService - module Rest - ## - # REST client for the TermsOfServiceAgreementStateService service. - # - # Service to support `TermsOfServiceAgreementState` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :terms_of_service_agreement_state_service_stub - - ## - # Configure the TermsOfServiceAgreementStateService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TermsOfServiceAgreementStateService clients - # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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 - @terms_of_service_agreement_state_service_stub.universe_domain - end - - ## - # Create a new TermsOfServiceAgreementStateService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TermsOfServiceAgreementStateService 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 - - @terms_of_service_agreement_state_service_stub = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @terms_of_service_agreement_state_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 - @terms_of_service_agreement_state_service_stub.logger - end - - # Service calls - - ## - # Returns the state of a terms of service agreement. - # - # @overload get_terms_of_service_agreement_state(request, options = nil) - # Pass arguments to `get_terms_of_service_agreement_state` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_terms_of_service_agreement_state(name: nil) - # Pass arguments to `get_terms_of_service_agreement_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `accounts/{account}/termsOfServiceAgreementStates/{identifier}` - # The identifier format is: `{TermsOfServiceKind}-{country}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new - # - # # Call the get_terms_of_service_agreement_state method. - # result = client.get_terms_of_service_agreement_state request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. - # p result - # - def get_terms_of_service_agreement_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_terms_of_service_agreement_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_terms_of_service_agreement_state.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_terms_of_service_agreement_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_agreement_state_service_stub.get_terms_of_service_agreement_state request, 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 the state of the agreement for the application terms of service. - # - # Application terms of service covers permissions related to the usage of - # data provided through Merchant Center, CSS Center, Manufacturer Center, and - # more. - # - # @overload retrieve_for_application_terms_of_service_agreement_state(request, options = nil) - # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload retrieve_for_application_terms_of_service_agreement_state(parent: nil) - # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account for which to get a TermsOfServiceAgreementState - # Format: `accounts/{account}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new - # - # # Call the retrieve_for_application_terms_of_service_agreement_state method. - # result = client.retrieve_for_application_terms_of_service_agreement_state request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. - # p result - # - def retrieve_for_application_terms_of_service_agreement_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_agreement_state_service_stub.retrieve_for_application_terms_of_service_agreement_state request, 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 TermsOfServiceAgreementStateService REST API. - # - # This class represents the configuration for TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_terms_of_service_agreement_state to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 TermsOfServiceAgreementStateService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_terms_of_service_agreement_state` - # @return [::Gapic::Config::Method] - # - attr_reader :get_terms_of_service_agreement_state - ## - # RPC-specific configuration for `retrieve_for_application_terms_of_service_agreement_state` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_for_application_terms_of_service_agreement_state - - # @private - def initialize parent_rpcs = nil - get_terms_of_service_agreement_state_config = parent_rpcs.get_terms_of_service_agreement_state if parent_rpcs.respond_to? :get_terms_of_service_agreement_state - @get_terms_of_service_agreement_state = ::Gapic::Config::Method.new get_terms_of_service_agreement_state_config - retrieve_for_application_terms_of_service_agreement_state_config = parent_rpcs.retrieve_for_application_terms_of_service_agreement_state if parent_rpcs.respond_to? :retrieve_for_application_terms_of_service_agreement_state - @retrieve_for_application_terms_of_service_agreement_state = ::Gapic::Config::Method.new retrieve_for_application_terms_of_service_agreement_state_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/service_stub.rb deleted file mode 100644 index 2aa342364908..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module TermsOfServiceAgreementStateService - module Rest - ## - # REST service stub for the TermsOfServiceAgreementStateService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_terms_of_service_agreement_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] - # A result object deserialized from the server's reply - def get_terms_of_service_agreement_state request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_terms_of_service_agreement_state_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_terms_of_service_agreement_state", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the retrieve_for_application_terms_of_service_agreement_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] - # A result object deserialized from the server's reply - def retrieve_for_application_terms_of_service_agreement_state request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_for_application_terms_of_service_agreement_state_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "retrieve_for_application_terms_of_service_agreement_state", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_terms_of_service_agreement_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_terms_of_service_agreement_state_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/termsOfServiceAgreementStates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the retrieve_for_application_terms_of_service_agreement_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_retrieve_for_application_terms_of_service_agreement_state_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{parent}/termsOfServiceAgreementStates:retrieveForApplication", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service.rb deleted file mode 100644 index 422b05ba415d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/terms_of_service_service/credentials" -require "google/shopping/merchant/accounts/v1/terms_of_service_service/paths" -require "google/shopping/merchant/accounts/v1/terms_of_service_service/client" -require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support `TermsOfService` API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/terms_of_service_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new - # - module TermsOfServiceService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "terms_of_service_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/terms_of_service_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/client.rb deleted file mode 100644 index 9247645c44ea..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/client.rb +++ /dev/null @@ -1,671 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/termsofservice_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module TermsOfServiceService - ## - # Client for the TermsOfServiceService service. - # - # Service to support `TermsOfService` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :terms_of_service_service_stub - - ## - # Configure the TermsOfServiceService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TermsOfServiceService clients - # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TermsOfServiceService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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 - @terms_of_service_service_stub.universe_domain - end - - ## - # Create a new TermsOfServiceService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TermsOfServiceService 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/shopping/merchant/accounts/v1/termsofservice_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 - - @terms_of_service_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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 - ) - - @terms_of_service_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 - @terms_of_service_service_stub.logger - end - - # Service calls - - ## - # Retrieves the `TermsOfService` associated with the provided version. - # - # @overload get_terms_of_service(request, options = nil) - # Pass arguments to `get_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_terms_of_service(name: nil) - # Pass arguments to `get_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new - # - # # Call the get_terms_of_service method. - # result = client.get_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. - # p result - # - def get_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_terms_of_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.call_rpc :get_terms_of_service, request, 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 the latest version of the `TermsOfService` for a given `kind` and - # `region_code`. - # - # @overload retrieve_latest_terms_of_service(request, options = nil) - # Pass arguments to `retrieve_latest_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload retrieve_latest_terms_of_service(region_code: nil, kind: nil) - # Pass arguments to `retrieve_latest_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param region_code [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # @param kind [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceKind] - # Required. The Kind this terms of service version applies to. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new - # - # # Call the retrieve_latest_terms_of_service method. - # result = client.retrieve_latest_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. - # p result - # - def retrieve_latest_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.retrieve_latest_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::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.retrieve_latest_terms_of_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.retrieve_latest_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.call_rpc :retrieve_latest_terms_of_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Accepts a `TermsOfService`. Executing this method requires admin access. - # - # @overload accept_terms_of_service(request, options = nil) - # Pass arguments to `accept_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload accept_terms_of_service(name: nil, account: nil, region_code: nil) - # Pass arguments to `accept_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @param account [::String] - # Required. The account for which to accept the ToS. - # Format: `accounts/{account}` - # @param region_code [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new - # - # # Call the accept_terms_of_service method. - # result = client.accept_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse. - # p result - # - def accept_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.accept_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.accept_terms_of_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.accept_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.call_rpc :accept_terms_of_service, request, 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 TermsOfServiceService API. - # - # This class represents the configuration for TermsOfServiceService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_terms_of_service to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 TermsOfServiceService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_terms_of_service - ## - # RPC-specific configuration for `retrieve_latest_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_latest_terms_of_service - ## - # RPC-specific configuration for `accept_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :accept_terms_of_service - - # @private - def initialize parent_rpcs = nil - get_terms_of_service_config = parent_rpcs.get_terms_of_service if parent_rpcs.respond_to? :get_terms_of_service - @get_terms_of_service = ::Gapic::Config::Method.new get_terms_of_service_config - retrieve_latest_terms_of_service_config = parent_rpcs.retrieve_latest_terms_of_service if parent_rpcs.respond_to? :retrieve_latest_terms_of_service - @retrieve_latest_terms_of_service = ::Gapic::Config::Method.new retrieve_latest_terms_of_service_config - accept_terms_of_service_config = parent_rpcs.accept_terms_of_service if parent_rpcs.respond_to? :accept_terms_of_service - @accept_terms_of_service = ::Gapic::Config::Method.new accept_terms_of_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/credentials.rb deleted file mode 100644 index b63015a95da6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_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 Shopping - module Merchant - module Accounts - module V1 - module TermsOfServiceService - # Credentials for the TermsOfServiceService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/paths.rb deleted file mode 100644 index ec12d7511aed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/paths.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module TermsOfServiceService - # Path helper methods for the TermsOfServiceService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified TermsOfService resource string. - # - # The resource will be in the following format: - # - # `termsOfService/{version}` - # - # @param version [String] - # - # @return [::String] - def terms_of_service_path version: - "termsOfService/#{version}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest.rb deleted file mode 100644 index 3c45a6e4de3a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/terms_of_service_service/credentials" -require "google/shopping/merchant/accounts/v1/terms_of_service_service/paths" -require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support `TermsOfService` API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new - # - module TermsOfServiceService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client.rb deleted file mode 100644 index ec3484a05430..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client.rb +++ /dev/null @@ -1,615 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/termsofservice_pb" -require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module TermsOfServiceService - module Rest - ## - # REST client for the TermsOfServiceService service. - # - # Service to support `TermsOfService` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :terms_of_service_service_stub - - ## - # Configure the TermsOfServiceService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TermsOfServiceService clients - # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TermsOfServiceService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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 - @terms_of_service_service_stub.universe_domain - end - - ## - # Create a new TermsOfServiceService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TermsOfServiceService 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 - - @terms_of_service_service_stub = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @terms_of_service_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 - @terms_of_service_service_stub.logger - end - - # Service calls - - ## - # Retrieves the `TermsOfService` associated with the provided version. - # - # @overload get_terms_of_service(request, options = nil) - # Pass arguments to `get_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_terms_of_service(name: nil) - # Pass arguments to `get_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new - # - # # Call the get_terms_of_service method. - # result = client.get_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. - # p result - # - def get_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_terms_of_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.get_terms_of_service request, 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 the latest version of the `TermsOfService` for a given `kind` and - # `region_code`. - # - # @overload retrieve_latest_terms_of_service(request, options = nil) - # Pass arguments to `retrieve_latest_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload retrieve_latest_terms_of_service(region_code: nil, kind: nil) - # Pass arguments to `retrieve_latest_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param region_code [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # @param kind [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceKind] - # Required. The Kind this terms of service version applies to. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new - # - # # Call the retrieve_latest_terms_of_service method. - # result = client.retrieve_latest_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. - # p result - # - def retrieve_latest_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.retrieve_latest_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.retrieve_latest_terms_of_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.retrieve_latest_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.retrieve_latest_terms_of_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Accepts a `TermsOfService`. Executing this method requires admin access. - # - # @overload accept_terms_of_service(request, options = nil) - # Pass arguments to `accept_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload accept_terms_of_service(name: nil, account: nil, region_code: nil) - # Pass arguments to `accept_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @param account [::String] - # Required. The account for which to accept the ToS. - # Format: `accounts/{account}` - # @param region_code [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new - # - # # Call the accept_terms_of_service method. - # result = client.accept_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse. - # p result - # - def accept_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.accept_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.accept_terms_of_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.accept_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.accept_terms_of_service request, 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 TermsOfServiceService REST API. - # - # This class represents the configuration for TermsOfServiceService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_terms_of_service to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 TermsOfServiceService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_terms_of_service - ## - # RPC-specific configuration for `retrieve_latest_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_latest_terms_of_service - ## - # RPC-specific configuration for `accept_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :accept_terms_of_service - - # @private - def initialize parent_rpcs = nil - get_terms_of_service_config = parent_rpcs.get_terms_of_service if parent_rpcs.respond_to? :get_terms_of_service - @get_terms_of_service = ::Gapic::Config::Method.new get_terms_of_service_config - retrieve_latest_terms_of_service_config = parent_rpcs.retrieve_latest_terms_of_service if parent_rpcs.respond_to? :retrieve_latest_terms_of_service - @retrieve_latest_terms_of_service = ::Gapic::Config::Method.new retrieve_latest_terms_of_service_config - accept_terms_of_service_config = parent_rpcs.accept_terms_of_service if parent_rpcs.respond_to? :accept_terms_of_service - @accept_terms_of_service = ::Gapic::Config::Method.new accept_terms_of_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub.rb deleted file mode 100644 index bef043b6d879..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub.rb +++ /dev/null @@ -1,264 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/termsofservice_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module TermsOfServiceService - module Rest - ## - # REST service stub for the TermsOfServiceService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] - # A result object deserialized from the server's reply - def get_terms_of_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_terms_of_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_terms_of_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the retrieve_latest_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] - # A result object deserialized from the server's reply - def retrieve_latest_terms_of_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_latest_terms_of_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "retrieve_latest_terms_of_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the accept_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] - # A result object deserialized from the server's reply - def accept_terms_of_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_accept_terms_of_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "accept_terms_of_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_terms_of_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^termsOfService/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the retrieve_latest_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_retrieve_latest_terms_of_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/termsOfService:retrieveLatest", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the accept_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_accept_terms_of_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{name}:accept", - matches: [ - ["name", %r{^termsOfService/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_pb.rb deleted file mode 100644 index 49d8d9549b21..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/termsofservice.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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb' -require 'google/shopping/merchant/accounts/v1/termsofservicekind_pb' - - -descriptor_data = "\n9google/shopping/merchant/accounts/v1/termsofservice.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1aGgoogle/shopping/merchant/accounts/v1/termsofserviceagreementstate.proto\x1a=google/shopping/merchant/accounts/v1/termsofservicekind.proto\"\xae\x02\n\x0eTermsOfService\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x08\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x46\n\x04kind\x18\x03 \x01(\x0e\x32\x38.google.shopping.merchant.accounts.v1.TermsOfServiceKind\x12\x15\n\x08\x66ile_uri\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08\x65xternal\x18\x05 \x01(\x08:H\xea\x41\x45\n)merchantapi.googleapis.com/TermsOfService\x12\x18termsOfService/{version}B\x0b\n\t_file_uri\"[\n\x18GetTermsOfServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\"\x8c\x01\n#RetrieveLatestTermsOfServiceRequest\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x04kind\x18\x02 \x01(\x0e\x32\x38.google.shopping.merchant.accounts.v1.TermsOfServiceKindB\x03\xe0\x41\x02\"\xb5\x01\n\x1b\x41\x63\x63\x65ptTermsOfServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12;\n\x07\x61\x63\x63ount\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x18\n\x0bregion_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x8c\x01\n\x1c\x41\x63\x63\x65ptTermsOfServiceResponse\x12l\n terms_of_service_agreement_state\x18\x01 \x01(\x0b\x32\x42.google.shopping.merchant.accounts.v1.TermsOfServiceAgreementState2\xd3\x05\n\x15TermsOfServiceService\x12\xbe\x01\n\x11GetTermsOfService\x12>.google.shopping.merchant.accounts.v1.GetTermsOfServiceRequest\x1a\x34.google.shopping.merchant.accounts.v1.TermsOfService\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/accounts/v1/{name=termsOfService/*}\x12\xd3\x01\n\x1cRetrieveLatestTermsOfService\x12I.google.shopping.merchant.accounts.v1.RetrieveLatestTermsOfServiceRequest\x1a\x34.google.shopping.merchant.accounts.v1.TermsOfService\"2\x82\xd3\xe4\x93\x02,\x12*/accounts/v1/termsOfService:retrieveLatest\x12\xd9\x01\n\x14\x41\x63\x63\x65ptTermsOfService\x12\x41.google.shopping.merchant.accounts.v1.AcceptTermsOfServiceRequest\x1a\x42.google.shopping.merchant.accounts.v1.AcceptTermsOfServiceResponse\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\"+/accounts/v1/{name=termsOfService/*}:accept\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x86\x02\n(com.google.shopping.merchant.accounts.v1B\x13TermsOfServiceProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - TermsOfService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TermsOfService").msgclass - GetTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetTermsOfServiceRequest").msgclass - RetrieveLatestTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.RetrieveLatestTermsOfServiceRequest").msgclass - AcceptTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AcceptTermsOfServiceRequest").msgclass - AcceptTermsOfServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AcceptTermsOfServiceResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_services_pb.rb deleted file mode 100644 index 8e7dc8d99c55..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_services_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/termsofservice.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/termsofservice_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module TermsOfServiceService - # Service to support `TermsOfService` API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.TermsOfServiceService' - - # Retrieves the `TermsOfService` associated with the provided version. - rpc :GetTermsOfService, ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::TermsOfService - # Retrieves the latest version of the `TermsOfService` for a given `kind` and - # `region_code`. - rpc :RetrieveLatestTermsOfService, ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::TermsOfService - # Accepts a `TermsOfService`. Executing this method requires admin access. - rpc :AcceptTermsOfService, ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb.rb deleted file mode 100644 index b5eb6b3d4e38..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/termsofserviceagreementstate.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/shopping/merchant/accounts/v1/termsofservicekind_pb' -require 'google/type/date_pb' - - -descriptor_data = "\nGgoogle/shopping/merchant/accounts/v1/termsofserviceagreementstate.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a=google/shopping/merchant/accounts/v1/termsofservicekind.proto\x1a\x16google/type/date.proto\"\x97\x04\n\x1cTermsOfServiceAgreementState\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x15terms_of_service_kind\x18\x03 \x01(\x0e\x32\x38.google.shopping.merchant.accounts.v1.TermsOfServiceKindB\x03\xe0\x41\x02\x12J\n\x08\x61\x63\x63\x65pted\x18\x04 \x01(\x0b\x32..google.shopping.merchant.accounts.v1.AcceptedB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12J\n\x08required\x18\x05 \x01(\x0b\x32..google.shopping.merchant.accounts.v1.RequiredB\x03\xe0\x41\x01H\x01\x88\x01\x01:\xb9\x01\xea\x41\xb5\x01\n7merchantapi.googleapis.com/TermsOfServiceAgreementState\x12=accounts/{account}/termsOfServiceAgreementStates/{identifier}*\x1dtermsOfServiceAgreementStates2\x1ctermsOfServiceAgreementStateB\x0b\n\t_acceptedB\x0b\n\t_required\"\xda\x01\n\x08\x41\x63\x63\x65pted\x12K\n\x10terms_of_service\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12?\n\x0b\x61\x63\x63\x65pted_by\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x30\n\x0bvalid_until\x18\x03 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0e\n\x0c_valid_until\"r\n\x08Required\x12K\n\x10terms_of_service\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x19\n\x0ctos_file_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\"w\n&GetTermsOfServiceAgreementStateRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7merchantapi.googleapis.com/TermsOfServiceAgreementState\"\x8c\x01\n9RetrieveForApplicationTermsOfServiceAgreementStateRequest\x12O\n\x06parent\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\x12\x37merchantapi.googleapis.com/TermsOfServiceAgreementState2\xb7\x05\n#TermsOfServiceAgreementStateService\x12\x82\x02\n\x1fGetTermsOfServiceAgreementState\x12L.google.shopping.merchant.accounts.v1.GetTermsOfServiceAgreementStateRequest\x1a\x42.google.shopping.merchant.accounts.v1.TermsOfServiceAgreementState\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/accounts/v1/{name=accounts/*/termsOfServiceAgreementStates/*}\x12\xc1\x02\n2RetrieveForApplicationTermsOfServiceAgreementState\x12_.google.shopping.merchant.accounts.v1.RetrieveForApplicationTermsOfServiceAgreementStateRequest\x1a\x42.google.shopping.merchant.accounts.v1.TermsOfServiceAgreementState\"f\xda\x41\x06parent\x82\xd3\xe4\x93\x02W\x12U/accounts/v1/{parent=accounts/*}/termsOfServiceAgreementStates:retrieveForApplication\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x94\x02\n(com.google.shopping.merchant.accounts.v1B!TermsOfServiceAgreementStateProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - TermsOfServiceAgreementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TermsOfServiceAgreementState").msgclass - Accepted = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Accepted").msgclass - Required = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Required").msgclass - GetTermsOfServiceAgreementStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetTermsOfServiceAgreementStateRequest").msgclass - RetrieveForApplicationTermsOfServiceAgreementStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.RetrieveForApplicationTermsOfServiceAgreementStateRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_services_pb.rb deleted file mode 100644 index 5a541ab0f07e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_services_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/termsofserviceagreementstate.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module TermsOfServiceAgreementStateService - # Service to support `TermsOfServiceAgreementState` API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.TermsOfServiceAgreementStateService' - - # Returns the state of a terms of service agreement. - rpc :GetTermsOfServiceAgreementState, ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest, ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState - # Retrieves the state of the agreement for the application terms of service. - # - # Application terms of service covers permissions related to the usage of - # data provided through Merchant Center, CSS Center, Manufacturer Center, and - # more. - rpc :RetrieveForApplicationTermsOfServiceAgreementState, ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservicekind_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservicekind_pb.rb deleted file mode 100644 index 24e6714b938e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservicekind_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/termsofservicekind.proto - -require 'google/protobuf' - - -descriptor_data = "\n=google/shopping/merchant/accounts/v1/termsofservicekind.proto\x12$google.shopping.merchant.accounts.v1*P\n\x12TermsOfServiceKind\x12%\n!TERMS_OF_SERVICE_KIND_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_CENTER\x10\x01\x42\x8a\x02\n(com.google.shopping.merchant.accounts.v1B\x17TermsOfServiceKindProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - TermsOfServiceKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TermsOfServiceKind").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_pb.rb deleted file mode 100644 index d68d4789d5b5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/user.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/accounts/v1/accessright_pb' - - -descriptor_data = "\n/google/shopping/merchant/accounts/v1/user.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x36google/shopping/merchant/accounts/v1/accessright.proto\"\xbe\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x44\n\x05state\x18\x02 \x01(\x0e\x32\x30.google.shopping.merchant.accounts.v1.User.StateB\x03\xe0\x41\x03\x12M\n\raccess_rights\x18\x04 \x03(\x0e\x32\x31.google.shopping.merchant.accounts.v1.AccessRightB\x03\xe0\x41\x02\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08VERIFIED\x10\x02:S\xea\x41P\n\x1fmerchantapi.googleapis.com/User\x12 accounts/{account}/users/{email}*\x05users2\x04user\"G\n\x0eGetUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\xa4\x01\n\x11\x43reateUserRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x14\n\x07user_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x04user\x18\x03 \x01(\x0b\x32*.google.shopping.merchant.accounts.v1.UserB\x03\xe0\x41\x01\"J\n\x11\x44\x65leteUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\x88\x01\n\x11UpdateUserRequest\x12=\n\x04user\x18\x01 \x01(\x0b\x32*.google.shopping.merchant.accounts.v1.UserB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x7f\n\x10ListUsersRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\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\x11ListUsersResponse\x12\x39\n\x05users\x18\x01 \x03(\x0b\x32*.google.shopping.merchant.accounts.v1.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x11VerifySelfRequest\x12;\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account2\x8c\t\n\x0bUserService\x12\xa2\x01\n\x07GetUser\x12\x34.google.shopping.merchant.accounts.v1.GetUserRequest\x1a*.google.shopping.merchant.accounts.v1.User\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(\x12&/accounts/v1/{name=accounts/*/users/*}\x12\xbd\x01\n\nCreateUser\x12\x37.google.shopping.merchant.accounts.v1.CreateUserRequest\x1a*.google.shopping.merchant.accounts.v1.User\"J\xda\x41\x13parent,user,user_id\x82\xd3\xe4\x93\x02.\"&/accounts/v1/{parent=accounts/*}/users:\x04user\x12\x94\x01\n\nDeleteUser\x12\x37.google.shopping.merchant.accounts.v1.DeleteUserRequest\x1a\x16.google.protobuf.Empty\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(*&/accounts/v1/{name=accounts/*/users/*}\x12\xbf\x01\n\nUpdateUser\x12\x37.google.shopping.merchant.accounts.v1.UpdateUserRequest\x1a*.google.shopping.merchant.accounts.v1.User\"L\xda\x41\x10user,update_mask\x82\xd3\xe4\x93\x02\x33\x32+/accounts/v1/{user.name=accounts/*/users/*}:\x04user\x12\xb5\x01\n\tListUsers\x12\x36.google.shopping.merchant.accounts.v1.ListUsersRequest\x1a\x37.google.shopping.merchant.accounts.v1.ListUsersResponse\"7\xda\x41\x06parent\x82\xd3\xe4\x93\x02(\x12&/accounts/v1/{parent=accounts/*}/users\x12\xbd\x01\n\nVerifySelf\x12\x37.google.shopping.merchant.accounts.v1.VerifySelfRequest\x1a*.google.shopping.merchant.accounts.v1.User\"J\xda\x41\x07\x61\x63\x63ount\x82\xd3\xe4\x93\x02:25/accounts/v1/{account=accounts/*}/users/me:verifySelf:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xfc\x01\n(com.google.shopping.merchant.accounts.v1B\tUserProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - User = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.User").msgclass - User::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.User.State").enummodule - GetUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetUserRequest").msgclass - CreateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateUserRequest").msgclass - DeleteUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DeleteUserRequest").msgclass - UpdateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateUserRequest").msgclass - ListUsersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListUsersRequest").msgclass - ListUsersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListUsersResponse").msgclass - VerifySelfRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.VerifySelfRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service.rb deleted file mode 100644 index 2406b49d1f08..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/user_service/credentials" -require "google/shopping/merchant/accounts/v1/user_service/paths" -require "google/shopping/merchant/accounts/v1/user_service/client" -require "google/shopping/merchant/accounts/v1/user_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support user API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1/user_service" - # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1/user_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new - # - module UserService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "user_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1/user_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/client.rb deleted file mode 100644 index 755a45921f1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/client.rb +++ /dev/null @@ -1,989 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/user_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module UserService - ## - # Client for the UserService service. - # - # Service to support user API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :user_service_stub - - ## - # Configure the UserService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::UserService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all UserService clients - # ::Google::Shopping::Merchant::Accounts::V1::UserService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the UserService 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::Shopping::Merchant::Accounts::V1::UserService::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 - @user_service_stub.universe_domain - end - - ## - # Create a new UserService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the UserService 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/shopping/merchant/accounts/v1/user_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 - - @user_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1::UserService::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 - ) - - @user_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 - @user_service_stub.logger - end - - # Service calls - - ## - # Retrieves a Merchant Center account user. - # - # @overload get_user(request, options = nil) - # Pass arguments to `get_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_user(name: nil) - # Pass arguments to `get_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the user to retrieve. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to retrieve the user corresponding to the caller by - # using `me` rather than an email address as in - # `accounts/{account}/users/me`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::User] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::User] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new - # - # # Call the get_user method. - # result = client.get_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. - # p result - # - def get_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :get_user, request, 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 Merchant Center account user. Executing this method requires - # admin access. - # - # @overload create_user(request, options = nil) - # Pass arguments to `create_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_user(parent: nil, user_id: nil, user: nil) - # Pass arguments to `create_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the account for which a user will be - # created. Format: `accounts/{account}` - # @param user_id [::String] - # Required. The email address of the user (for example, - # `john.doe@gmail.com`). - # @param user [::Google::Shopping::Merchant::Accounts::V1::User, ::Hash] - # Optional. The user to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::User] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::User] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new - # - # # Call the create_user method. - # result = client.create_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. - # p result - # - def create_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :create_user, request, 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 Merchant Center account user. Executing this method requires - # admin access. The user to be deleted can't be the last admin user of that - # account. - # - # @overload delete_user(request, options = nil) - # Pass arguments to `delete_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_user(name: nil) - # Pass arguments to `delete_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the user to delete. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to delete the user corresponding to the caller by using - # `me` rather than an email address as in `accounts/{account}/users/me`. - # - # @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/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new - # - # # Call the delete_user method. - # result = client.delete_user request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :delete_user, request, 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 Merchant Center account user. Executing this method requires - # admin access. - # - # @overload update_user(request, options = nil) - # Pass arguments to `update_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_user(user: nil, update_mask: nil) - # Pass arguments to `update_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param user [::Google::Shopping::Merchant::Accounts::V1::User, ::Hash] - # Required. The new version of the user. - # - # Use `me` to refer to your own email address, for example - # `accounts/{account}/users/me`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `access_rights` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::User] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::User] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new - # - # # Call the update_user method. - # result = client.update_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. - # p result - # - def update_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest - - # Converts hash and nil to 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_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.user&.name - header_params["user.name"] = request.user.name - end - - request_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_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :update_user, request, 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 users of a Merchant Center account. - # - # @overload list_users(request, options = nil) - # Pass arguments to `list_users` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_users(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_users` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of users. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of users to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @param page_token [::String] - # Optional. A page token, received from a previous `ListUsers` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListUsers` must match - # the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::User>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::User>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.new - # - # # Call the list_users method. - # result = client.list_users request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::User. - # p item - # end - # - def list_users request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_users.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_users.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_users.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :list_users, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @user_service_stub, :list_users, 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 the user that is represented by the caller from pending to - # verified. - # - # @overload verify_self(request, options = nil) - # Pass arguments to `verify_self` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload verify_self(account: nil) - # Pass arguments to `verify_self` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::String] - # Required. The name of the account under which the caller is a user. - # Format: `accounts/{account}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::User] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::User] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest.new - # - # # Call the verify_self method. - # result = client.verify_self request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. - # p result - # - def verify_self request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.verify_self.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.account - header_params["account"] = request.account - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.verify_self.timeout, - metadata: metadata, - retry_policy: @config.rpcs.verify_self.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :verify_self, request, 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 UserService API. - # - # This class represents the configuration for UserService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1::UserService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_user to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_user.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_user.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1::UserService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 UserService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_user` - # @return [::Gapic::Config::Method] - # - attr_reader :get_user - ## - # RPC-specific configuration for `create_user` - # @return [::Gapic::Config::Method] - # - attr_reader :create_user - ## - # RPC-specific configuration for `delete_user` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_user - ## - # RPC-specific configuration for `update_user` - # @return [::Gapic::Config::Method] - # - attr_reader :update_user - ## - # RPC-specific configuration for `list_users` - # @return [::Gapic::Config::Method] - # - attr_reader :list_users - ## - # RPC-specific configuration for `verify_self` - # @return [::Gapic::Config::Method] - # - attr_reader :verify_self - - # @private - def initialize parent_rpcs = nil - get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user - @get_user = ::Gapic::Config::Method.new get_user_config - create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user - @create_user = ::Gapic::Config::Method.new create_user_config - delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user - @delete_user = ::Gapic::Config::Method.new delete_user_config - update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user - @update_user = ::Gapic::Config::Method.new update_user_config - list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users - @list_users = ::Gapic::Config::Method.new list_users_config - verify_self_config = parent_rpcs.verify_self if parent_rpcs.respond_to? :verify_self - @verify_self = ::Gapic::Config::Method.new verify_self_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/credentials.rb deleted file mode 100644 index c10c862a695e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_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 Shopping - module Merchant - module Accounts - module V1 - module UserService - # Credentials for the UserService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/paths.rb deleted file mode 100644 index d39ab1cf7e27..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_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 Shopping - module Merchant - module Accounts - module V1 - module UserService - # Path helper methods for the UserService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified User resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/users/{email}` - # - # @param account [String] - # @param email [String] - # - # @return [::String] - def user_path account:, email: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/users/#{email}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest.rb deleted file mode 100644 index 90b94d47c5c7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_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/shopping/merchant/accounts/v1/version" - -require "google/shopping/merchant/accounts/v1/user_service/credentials" -require "google/shopping/merchant/accounts/v1/user_service/paths" -require "google/shopping/merchant/accounts/v1/user_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - ## - # Service to support user API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1/user_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new - # - module UserService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1/user_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/client.rb deleted file mode 100644 index 6c7665cbea61..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/client.rb +++ /dev/null @@ -1,904 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1/user_pb" -require "google/shopping/merchant/accounts/v1/user_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module UserService - module Rest - ## - # REST client for the UserService service. - # - # Service to support user API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :user_service_stub - - ## - # Configure the UserService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all UserService clients - # ::Google::Shopping::Merchant::Accounts::V1::UserService::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", "Shopping", "Merchant", "Accounts", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the UserService 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::Shopping::Merchant::Accounts::V1::UserService::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 - @user_service_stub.universe_domain - end - - ## - # Create a new UserService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the UserService 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 - - @user_service_stub = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @user_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 - @user_service_stub.logger - end - - # Service calls - - ## - # Retrieves a Merchant Center account user. - # - # @overload get_user(request, options = nil) - # Pass arguments to `get_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::GetUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::GetUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_user(name: nil) - # Pass arguments to `get_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the user to retrieve. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to retrieve the user corresponding to the caller by - # using `me` rather than an email address as in - # `accounts/{account}/users/me`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::User] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new - # - # # Call the get_user method. - # result = client.get_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. - # p result - # - def get_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.get_user request, 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 Merchant Center account user. Executing this method requires - # admin access. - # - # @overload create_user(request, options = nil) - # Pass arguments to `create_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_user(parent: nil, user_id: nil, user: nil) - # Pass arguments to `create_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the account for which a user will be - # created. Format: `accounts/{account}` - # @param user_id [::String] - # Required. The email address of the user (for example, - # `john.doe@gmail.com`). - # @param user [::Google::Shopping::Merchant::Accounts::V1::User, ::Hash] - # Optional. The user to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::User] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new - # - # # Call the create_user method. - # result = client.create_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. - # p result - # - def create_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.create_user request, 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 Merchant Center account user. Executing this method requires - # admin access. The user to be deleted can't be the last admin user of that - # account. - # - # @overload delete_user(request, options = nil) - # Pass arguments to `delete_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_user(name: nil) - # Pass arguments to `delete_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the user to delete. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to delete the user corresponding to the caller by using - # `me` rather than an email address as in `accounts/{account}/users/me`. - # @yield [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/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new - # - # # Call the delete_user method. - # result = client.delete_user request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.delete_user request, 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 Merchant Center account user. Executing this method requires - # admin access. - # - # @overload update_user(request, options = nil) - # Pass arguments to `update_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_user(user: nil, update_mask: nil) - # Pass arguments to `update_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param user [::Google::Shopping::Merchant::Accounts::V1::User, ::Hash] - # Required. The new version of the user. - # - # Use `me` to refer to your own email address, for example - # `accounts/{account}/users/me`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `access_rights` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::User] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new - # - # # Call the update_user method. - # result = client.update_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. - # p result - # - def update_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest - - # Converts hash and nil to an 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_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.update_user request, 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 users of a Merchant Center account. - # - # @overload list_users(request, options = nil) - # Pass arguments to `list_users` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_users(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_users` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of users. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of users to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @param page_token [::String] - # Optional. A page token, received from a previous `ListUsers` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListUsers` must match - # the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::User>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::User>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.new - # - # # Call the list_users method. - # result = client.list_users request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::User. - # p item - # end - # - def list_users request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_users.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_users.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_users.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.list_users request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @user_service_stub, :list_users, "users", request, result, 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 user that is represented by the caller from pending to - # verified. - # - # @overload verify_self(request, options = nil) - # Pass arguments to `verify_self` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload verify_self(account: nil) - # Pass arguments to `verify_self` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::String] - # Required. The name of the account under which the caller is a user. - # Format: `accounts/{account}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::User] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest.new - # - # # Call the verify_self method. - # result = client.verify_self request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. - # p result - # - def verify_self request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.verify_self.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.verify_self.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.verify_self.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.verify_self request, 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 UserService REST API. - # - # This class represents the configuration for UserService 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::Shopping::Merchant::Accounts::V1::UserService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_user to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_user.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_user.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 UserService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_user` - # @return [::Gapic::Config::Method] - # - attr_reader :get_user - ## - # RPC-specific configuration for `create_user` - # @return [::Gapic::Config::Method] - # - attr_reader :create_user - ## - # RPC-specific configuration for `delete_user` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_user - ## - # RPC-specific configuration for `update_user` - # @return [::Gapic::Config::Method] - # - attr_reader :update_user - ## - # RPC-specific configuration for `list_users` - # @return [::Gapic::Config::Method] - # - attr_reader :list_users - ## - # RPC-specific configuration for `verify_self` - # @return [::Gapic::Config::Method] - # - attr_reader :verify_self - - # @private - def initialize parent_rpcs = nil - get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user - @get_user = ::Gapic::Config::Method.new get_user_config - create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user - @create_user = ::Gapic::Config::Method.new create_user_config - delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user - @delete_user = ::Gapic::Config::Method.new delete_user_config - update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user - @update_user = ::Gapic::Config::Method.new update_user_config - list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users - @list_users = ::Gapic::Config::Method.new list_users_config - verify_self_config = parent_rpcs.verify_self if parent_rpcs.respond_to? :verify_self - @verify_self = ::Gapic::Config::Method.new verify_self_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/service_stub.rb deleted file mode 100644 index 62e46437fc31..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/service_stub.rb +++ /dev/null @@ -1,452 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1/user_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module UserService - module Rest - ## - # REST service stub for the UserService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::User] - # A result object deserialized from the server's reply - def get_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_user", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::User.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::User] - # A result object deserialized from the server's reply - def create_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_user", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::User.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_user", - 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 update_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::User] - # A result object deserialized from the server's reply - def update_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_user", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::User.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_users REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse] - # A result object deserialized from the server's reply - def list_users request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_users_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_users", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the verify_self REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1::User] - # A result object deserialized from the server's reply - def verify_self request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_verify_self_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "verify_self", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1::User.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetUserRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1/{parent}/users", - body: "user", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest] - # 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_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1/{user.name}", - body: "user", - matches: [ - ["user.name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_users REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_users_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{parent}/users", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the verify_self REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_verify_self_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1/{account}/users/me:verifySelf", - body: "*", - matches: [ - ["account", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_services_pb.rb deleted file mode 100644 index 7b9892454aa4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_services_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1/user.proto for package 'Google.Shopping.Merchant.Accounts.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/accounts/v1/user_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1 - module UserService - # Service to support user API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1.UserService' - - # Retrieves a Merchant Center account user. - rpc :GetUser, ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest, ::Google::Shopping::Merchant::Accounts::V1::User - # Creates a Merchant Center account user. Executing this method requires - # admin access. - rpc :CreateUser, ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest, ::Google::Shopping::Merchant::Accounts::V1::User - # Deletes a Merchant Center account user. Executing this method requires - # admin access. The user to be deleted can't be the last admin user of that - # account. - rpc :DeleteUser, ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest, ::Google::Protobuf::Empty - # Updates a Merchant Center account user. Executing this method requires - # admin access. - rpc :UpdateUser, ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest, ::Google::Shopping::Merchant::Accounts::V1::User - # Lists all users of a Merchant Center account. - rpc :ListUsers, ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest, ::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse - # Updates the user that is represented by the caller from pending to - # verified. - rpc :VerifySelf, ::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest, ::Google::Shopping::Merchant::Accounts::V1::User - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/verificationmailsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/verificationmailsettings_pb.rb deleted file mode 100644 index 09f17261f63c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/verificationmailsettings_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1/verificationmailsettings.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\nCgoogle/shopping/merchant/accounts/v1/verificationmailsettings.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1fgoogle/api/field_behavior.proto\"\x90\x02\n\x18VerificationMailSettings\x12x\n\x16verification_mail_mode\x18\x01 \x01(\x0e\x32S.google.shopping.merchant.accounts.v1.VerificationMailSettings.VerificationMailModeB\x03\xe0\x41\x01\"z\n\x14VerificationMailMode\x12&\n\"VERIFICATION_MAIL_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SEND_VERIFICATION_MAIL\x10\x01\x12\x1e\n\x1aSUPPRESS_VERIFICATION_MAIL\x10\x02\x42\x90\x02\n(com.google.shopping.merchant.accounts.v1B\x1dVerificationMailSettingsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1 - VerificationMailSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.VerificationMailSettings").msgclass - VerificationMailSettings::VerificationMailMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.VerificationMailSettings.VerificationMailMode").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb deleted file mode 100644 index dec30c28b651..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/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 Shopping - module Merchant - module Accounts - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/README.md deleted file mode 100644 index 110adc2cf42e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant 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-shopping-merchant-accounts-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accessright.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accessright.rb deleted file mode 100644 index 3efe85ec310d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accessright.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # The access right defines the level of permission a - # user has within a Merchant Center account. - module AccessRight - # Default value. This value is unused. - ACCESS_RIGHT_UNSPECIFIED = 0 - - # Standard access rights. - STANDARD = 1 - - # Has access to the same read-only methods as STANDARD, but no access to - # any mutating methods. - READ_ONLY = 4 - - # Admin access rights. - ADMIN = 2 - - # Users with this right have access to performance and insights. - PERFORMANCE_REPORTING = 3 - - # Users with this right have access to Merchant API and its notifications. - # This role is only accessible to accounts that have a developer - # registration. - API_DEVELOPER = 5 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountissue.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountissue.rb deleted file mode 100644 index abd406a034ba..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountissue.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 Shopping - module Merchant - module Accounts - module V1 - # Issues with your Merchant Center account that can impact all your products. - # For more information, see [Account-level issues in Merchant - # Center](https://support.google.com/merchants/answer/12153802?sjid=17798438912526418908-EU#account). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the account issue. - # Format: `accounts/{account}/issues/{id}`. For example, - # `accounts/123456/issues/misrepresentation-of-self-or-products-unacceptable-business-practice-policy`. - # @!attribute [rw] title - # @return [::String] - # The localized title of the issue. - # @!attribute [rw] severity - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountIssue::Severity] - # The overall severity of the issue. - # @!attribute [rw] impacted_destinations - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccountIssue::ImpactedDestination>] - # The impact this issue has on various destinations. - # @!attribute [rw] detail - # @return [::String] - # Further localized details about the issue. - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to Merchant Center Help Center providing further information about the - # issue and how to fix it. - class AccountIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The impact of the issue on a destination. - # @!attribute [rw] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # The impacted reporting context. - # @!attribute [rw] impacts - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccountIssue::ImpactedDestination::Impact>] - # The (negative) impact for various regions on the given destination. - class ImpactedDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The impact of the issue on a region. - # @!attribute [rw] region_code - # @return [::String] - # The [CLDR region code](https://cldr.unicode.org/) where this issue - # applies. - # @!attribute [rw] severity - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountIssue::Severity] - # The severity of the issue on the destination and region. - class Impact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # All possible issue severities. - module Severity - # The severity is unknown. - SEVERITY_UNSPECIFIED = 0 - - # The issue causes offers to not serve. - CRITICAL = 1 - - # The issue might affect offers (in the future) or might be an - # indicator of issues with offers. - ERROR = 2 - - # The issue is a suggestion for improvement. - SUGGESTION = 3 - end - end - - # Request message for the `ListAccountIssues` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of issues. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of issues to return. The service may return - # fewer than this value. If unspecified, at most 50 issues will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListAccountIssues` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountIssues` must - # match the call that provided the page token. - # @!attribute [rw] language_code - # @return [::String] - # Optional. The issues in the response will have human-readable fields in the - # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), - # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be - # used. - # @!attribute [rw] time_zone - # @return [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in human-readable fields. For example 'America/Los_Angeles'. - # If not set, 'America/Los_Angeles' will be used. - class ListAccountIssuesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListAccountIssues` method. - # @!attribute [rw] account_issues - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccountIssue>] - # The issues from the specified account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListAccountIssuesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountrelationships.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountrelationships.rb deleted file mode 100644 index d5227510fa2a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountrelationships.rb +++ /dev/null @@ -1,124 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # The `AccountRelationship` message defines a formal connection between a - # merchant's account and a service provider's account. This relationship - # enables the provider to offer specific services to the business, such as - # product management or campaign management. It specifies the access rights - # and permissions to the business's data relevant to those services. - # - # Establishing an account relationship involves linking the merchant's account - # with a provider's account. The provider could be another Google account (like - # Google Ads or Google My Business) or a third-party platform (such as Shopify - # or WooCommerce). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the account relationship. - # Format: `accounts/{account}/relationships/{relationship}`. For example, - # `accounts/123456/relationships/567890`. - # @!attribute [rw] provider - # @return [::String] - # Immutable. The provider of the service. Either the reference to an account - # such as `providers/123` or a well-known service provider (one of - # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). - # @!attribute [r] provider_display_name - # @return [::String] - # Output only. The human-readable display name of the provider account. - # @!attribute [rw] account_id_alias - # @return [::String] - # Optional. An optional alias you can assign to this account relationship. - # This alias acts as a convenient identifier for your own reference and - # management. It must be unique among all your account relationships with the - # same provider. - # - # For example, you might use `account_id_alias` to assign a friendly name - # to this relationship for easier identification in your systems. - class AccountRelationship - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get an account relationship. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the account relationship to get. - # Format: `accounts/{account}/relationships/{relationship}`. For example, - # `accounts/123456/relationships/567890`. - class GetAccountRelationshipRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateAccountRelationship` method. - # @!attribute [rw] account_relationship - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] - # Required. The new version of the account relationship. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `account_id_alias` - class UpdateAccountRelationshipRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list account relationships. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent account of the account relationship to filter by. - # Format: `accounts/{account}` - # @!attribute [rw] page_token - # @return [::String] - # Optional. The token returned by the previous `list` request. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of elements to return in the response. Use for - # paging. If no `page_size` is specified, `100` is used as the default value. - # The maximum allowed value is `1000`. - class ListAccountRelationshipsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response after trying to list account relationships. - # @!attribute [rw] account_relationships - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccountRelationship>] - # The account relationships that match your filter. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token. You can send the `page_token` to get the next page. - # Only included in the `list` response if there are more pages. - class ListAccountRelationshipsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accounts.rb deleted file mode 100644 index 31fe70fbf2ed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accounts.rb +++ /dev/null @@ -1,337 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # The `Account` message represents a business's account within Shopping - # Ads. It's the primary entity for managing product data, settings, and - # interactions with Google's services and external providers. - # - # Accounts can operate as standalone entities or be part of a advanced account - # structure. In an advanced account setup the parent account manages multiple - # sub-accounts. - # - # Establishing an account involves configuring attributes like the account - # name, time zone, and language preferences. - # - # The `Account` message is the parent entity for many other resources, for - # example, `AccountRelationship`, `Homepage`, `BusinessInfo` and so on. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the account. - # Format: `accounts/{account}` - # @!attribute [r] account_id - # @return [::Integer] - # Output only. The ID of the account. - # @!attribute [rw] account_name - # @return [::String] - # Required. A human-readable name of the account. Don't use punctuation, - # capitalization, or non-alphanumeric symbols such as the "/" or "_" symbols. - # See - # [Adding a business - # name](https://support.google.com/merchants/answer/12159159) for more - # information. - # @!attribute [rw] adult_content - # @return [::Boolean] - # Optional. Whether this account contains adult content. - # @!attribute [r] test_account - # @return [::Boolean] - # Output only. Whether this is a test account. - # @!attribute [rw] time_zone - # @return [::Google::Type::TimeZone] - # Required. The time zone of the account. - # - # On writes, `time_zone` sets both the `reporting_time_zone` and the - # `display_time_zone`. - # - # For reads, `time_zone` always returns the `display_time_zone`. If - # `display_time_zone` doesn't exist for your account, `time_zone` is empty. - # - # The `version` field is not supported, won't be set in responses and will be - # silently ignored if specified in requests. - # @!attribute [rw] language_code - # @return [::String] - # Required. The account's [BCP-47 language - # code](https://tools.ietf.org/html/bcp47), such as `en-US` or `sr-Latn`. - class Account - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetAccount` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the account to retrieve. - # Format: `accounts/{account}` - class GetAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateAndConfigureAccount` method. - # @!attribute [rw] account - # @return [::Google::Shopping::Merchant::Accounts::V1::Account] - # Required. The account to be created. - # @!attribute [rw] user - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddUser>] - # Optional. Users to be added to the account. - # @!attribute [rw] service - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddAccountService>] - # Required. An account service between the account to be created and the - # provider account is initialized as part of the creation. At least one such - # service needs to be provided. Currently exactly one of these needs to be - # `account_aggregation` and `accounts.createAndConfigure` method can be - # used to create a sub-account under an existing advanced account through - # this method. Additional `account_management` or - # `products_management` services may be provided. - # @!attribute [rw] set_alias - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::SetAliasForRelationship>] - # Optional. If a relationship is created with a provider, you can set an - # alias for it with this field. The calling user must be an admin on the - # provider to be able to set an alias. - class CreateAndConfigureAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Instruction for adding a user to the account during creation. - # @!attribute [rw] user_id - # @return [::String] - # Required. The email address of the user (for example, - # `john.doe@gmail.com`). - # @!attribute [rw] user - # @return [::Google::Shopping::Merchant::Accounts::V1::User] - # Optional. Details about the user to be added. At the moment, only access - # rights may be specified. - # @!attribute [rw] verification_mail_settings - # @return [::Google::Shopping::Merchant::Accounts::V1::VerificationMailSettings] - # Optional. Settings related to configuring the verification email that is - # sent after adding a user. - class AddUser - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Additional instructions to add account services during creation of the - # account. - # @!attribute [rw] account_aggregation - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountAggregation] - # The provider is an - # [aggregator](https://support.google.com/merchants/answer/188487) for - # the account. Payload for service type Account Aggregation. - # - # Note: The following fields are mutually exclusive: `account_aggregation`, `account_management`, `comparison_shopping`, `products_management`, `campaigns_management`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] account_management - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountManagement] - # The provider manages this account. Payload for service type Account - # Management. - # - # Note: The following fields are mutually exclusive: `account_management`, `account_aggregation`, `comparison_shopping`, `products_management`, `campaigns_management`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] comparison_shopping - # @return [::Google::Shopping::Merchant::Accounts::V1::ComparisonShopping] - # The provider is a CSS (Comparison Shopping Service) of this account. - # Payload for service type Comparison Shopping. - # - # Note: The following fields are mutually exclusive: `comparison_shopping`, `account_aggregation`, `account_management`, `products_management`, `campaigns_management`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] products_management - # @return [::Google::Shopping::Merchant::Accounts::V1::ProductsManagement] - # The provider manages products for this account. Payload for service - # type products management. - # - # Note: The following fields are mutually exclusive: `products_management`, `account_aggregation`, `account_management`, `comparison_shopping`, `campaigns_management`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] campaigns_management - # @return [::Google::Shopping::Merchant::Accounts::V1::CampaignsManagement] - # The provider manages campaigns for this account. Payload for service - # type campaigns management. - # - # Note: The following fields are mutually exclusive: `campaigns_management`, `account_aggregation`, `account_management`, `comparison_shopping`, `products_management`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] provider - # @return [::String] - # Required. The provider of the service. Either the reference to an account - # such as `providers/123` or a well-known service provider (one of - # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). - # @!attribute [rw] external_account_id - # @return [::String] - # Immutable. An optional, immutable identifier that Google uses to refer to - # this account when communicating with the provider. This should be the - # unique account ID within the provider's system (for example, your shop ID - # in Shopify). - # - # If you have multiple accounts with the same provider - for instance, - # different accounts for various regions — the `external_account_id` - # differentiates between them, ensuring accurate linking and integration - # between Google and the provider. - # - # The external account ID must be specified for the campaigns management - # service type. - # - # The external account ID must not be specified for the account aggregation - # service type. - # - # The external account ID is optional / may be specified for all other - # service types. - class AddAccountService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Set an alias for a relationship between a provider and the account to - # be created. - # @!attribute [rw] provider - # @return [::String] - # Required. The provider of the service. This is a reference to an account - # such as `providers/123` or `accounts/123`. The same provider must be - # specified in at least one of the `service` fields. - # @!attribute [rw] account_id_alias - # @return [::String] - # Required. The unique ID of this account in the provider's system. - # The value must be unique across all accounts on the platform for this - # provider. - class SetAliasForRelationship - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for the CreateTestAccount RPC - # @!attribute [rw] parent - # @return [::String] - # Required. The account resource name to create the test account under. - # Format: accounts/\\{account} - # @!attribute [rw] account - # @return [::Google::Shopping::Merchant::Accounts::V1::Account] - # Required. The account to be created. - class CreateTestAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteAccount` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the account to delete. - # Format: `accounts/{account}` - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to `true`, the account is deleted even if it provides - # services to other accounts or has processed offers. - class DeleteAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateAccount` method. - # @!attribute [rw] account - # @return [::Google::Shopping::Merchant::Accounts::V1::Account] - # Required. The new version of the account. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `account_name` - # - `adult_content` - # - `language_code` - # - `time_zone` - class UpdateAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `accounts.list` method. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `accounts.list` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided in the `accounts.list` - # request must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Returns only accounts that match the - # [filter](https://developers.google.com/merchant/api/guides/accounts/filter). - # For more details, see the - # [filter syntax - # reference](https://developers.google.com/merchant/api/guides/accounts/filter-syntax). - class ListAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `accounts.list` method. - # @!attribute [rw] accounts - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Account>] - # The accounts matching the `ListAccountsRequest`. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListSubAccounts` method. - # @!attribute [rw] provider - # @return [::String] - # Required. The aggregation service provider. - # Format: `accounts/{accountId}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `accounts.list` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided in the `accounts.list` - # request must match the call that provided the page token. - class ListSubAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListSubAccounts` method. - # @!attribute [rw] accounts - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Account>] - # The accounts for which the given parent account is an aggregator. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListSubAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountservices.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountservices.rb deleted file mode 100644 index 525817035c5e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountservices.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! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # The `AccountService` message represents a specific service that a provider - # account offers to a Merchant Center account. - # - # `AccountService` defines the permissions and capabilities granted to the - # provider, allowing for operations such as product management or campaign - # management. - # - # The lifecycle of an `AccountService` involves a proposal phase, where one - # party suggests the service, and an approval phase, where the other party - # accepts or rejects it. This handshake mechanism ensures mutual consent before - # any access is granted. This mechanism safeguards both parties by ensuring - # that access rights are granted appropriately and that both the business and - # provider are aware of the services enabled. In scenarios where a user is an - # admin of both accounts, the approval can happen automatically. - # - # The mutability of a service is also managed through `AccountService`. Some - # services might be immutable, for example, if they were established through - # other systems or APIs, and you cannot alter them through this API. - # @!attribute [rw] products_management - # @return [::Google::Shopping::Merchant::Accounts::V1::ProductsManagement] - # Service type for managing products. This allows the provider to handle - # product data on behalf of the business, including reading and writing - # product listings. It's commonly used when the provider offers inventory - # management or catalog synchronization services to keep the business's - # product information up-to-date across platforms. - # - # Note: The following fields are mutually exclusive: `products_management`, `campaigns_management`, `account_management`, `account_aggregation`, `local_listing_management`, `comparison_shopping`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] campaigns_management - # @return [::Google::Shopping::Merchant::Accounts::V1::CampaignsManagement] - # Service type for managing advertising campaigns. Grants the provider - # access to create and manage the business's ad campaigns, including - # setting up campaigns, adjusting bids, and optimizing performance. - # - # Note: The following fields are mutually exclusive: `campaigns_management`, `products_management`, `account_management`, `account_aggregation`, `local_listing_management`, `comparison_shopping`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] account_management - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountManagement] - # Service type for account management. Enables the provider to perform - # administrative actions on the business's account, such as - # configuring account settings, managing users, or updating business - # information. - # - # Note: The following fields are mutually exclusive: `account_management`, `products_management`, `campaigns_management`, `account_aggregation`, `local_listing_management`, `comparison_shopping`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] account_aggregation - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountAggregation] - # Service type for account aggregation. This enables the provider, which is - # an advanced account, to manage multiple sub-accounts (client - # accounts). Through this service, the advanced account provider can - # perform administrative and operational tasks across all linked - # sub-accounts. - # - # This is useful for agencies, aggregators, or large retailers that need - # centralized control over many Merchant Center accounts. - # - # Note: The following fields are mutually exclusive: `account_aggregation`, `products_management`, `campaigns_management`, `account_management`, `local_listing_management`, `comparison_shopping`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] local_listing_management - # @return [::Google::Shopping::Merchant::Accounts::V1::LocalListingManagement] - # Service type for local listings management. The business group associated - # with the external account id will be used to provide local inventory to - # this Merchant Center account. - # - # Note: The following fields are mutually exclusive: `local_listing_management`, `products_management`, `campaigns_management`, `account_management`, `account_aggregation`, `comparison_shopping`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] comparison_shopping - # @return [::Google::Shopping::Merchant::Accounts::V1::ComparisonShopping] - # Service type for comparison shopping. The provider is a CSS (Comparison - # Shopping Service) managing the account. See - # https://support.google.com/merchants/answer/12653197 - # - # Note: The following fields are mutually exclusive: `comparison_shopping`, `products_management`, `campaigns_management`, `account_management`, `account_aggregation`, `local_listing_management`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the account service. - # Format: `accounts/{account}/services/{service}` - # @!attribute [r] provider - # @return [::String] - # Output only. The provider of the service. Either the reference to an - # account such as `providers/123` or a well-known service provider (one of - # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). - # @!attribute [r] provider_display_name - # @return [::String] - # Output only. The human-readable display name of the provider account. - # @!attribute [r] handshake - # @return [::Google::Shopping::Merchant::Accounts::V1::Handshake] - # Output only. Information about the state of the service in terms of - # establishing it (e.g. is it pending approval or approved). - # @!attribute [r] mutability - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService::Mutability] - # Output only. Whether the service is mutable (e.g. through Approve / Reject - # RPCs). A service that was created through another system or API might be - # immutable. - # @!attribute [rw] external_account_id - # @return [::String] - # Immutable. An optional, immutable identifier that Google uses to refer to - # this account when communicating with the provider. This should be the - # unique account ID within the provider's system (for example, your shop ID - # in Shopify). - # - # If you have multiple accounts with the same provider - for instance, - # different accounts for various regions — the `external_account_id` - # differentiates between them, ensuring accurate linking and integration - # between Google and the provider. - class AccountService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of mutability option settings a service can have. - module Mutability - # Unused default value - MUTABILITY_UNSPECIFIED = 0 - - # The service can be mutated without restrictions. - MUTABLE = 1 - - # The service is read-only and must not be mutated. - IMMUTABLE = 2 - end - end - - # Request to get an account service. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the account service to get. - # Format: `accounts/{account}/services/{service}` - class GetAccountServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list account services. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent account of the account service to filter by. - # Format: `accounts/{account}` - # @!attribute [rw] page_token - # @return [::String] - # Optional. The token returned by the previous `list` request. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of elements to return in the response. Use for - # paging. If no `page_size` is specified, `100` is used as the default value. - # The maximum allowed value is `1000`. - class ListAccountServicesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response after trying to list account services. - # @!attribute [rw] account_services - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccountService>] - # The account services that match your filter. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token. You can send the `page_token` to get the next page. - # Only included in the `list` response if there are more pages. - class ListAccountServicesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to propose an account service. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent account for the service. - # Format: `accounts/{account}` - # @!attribute [rw] provider - # @return [::String] - # Required. The provider of the service. Either the reference to an account - # such as `providers/123` or a well-known service provider (one of - # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). - # @!attribute [rw] account_service - # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] - # Required. The account service to propose. - class ProposeAccountServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to approve an account service. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the account service to approve. - # Format: `accounts/{account}/services/{service}` - class ApproveAccountServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to reject an account service. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the account service to reject. - # Format: `accounts/{account}/services/{service}` - class RejectAccountServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ProductsManagement` payload. - class ProductsManagement - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `CampaignManagement` payload. - class CampaignsManagement - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `AccountManagement` payload. - class AccountManagement - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `AccountAggregation` payload. - class AccountAggregation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `LocalListingManagement` payload. - class LocalListingManagement - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ComparisonShopping` payload. - class ComparisonShopping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The current status of establishing of the service. - # (for example, pending approval or approved). - # @!attribute [r] approval_state - # @return [::Google::Shopping::Merchant::Accounts::V1::Handshake::ApprovalState] - # Output only. The approval state of this handshake. - # @!attribute [r] actor - # @return [::Google::Shopping::Merchant::Accounts::V1::Handshake::Actor] - # Output only. The most recent account to modify the account service's - # `approval_status`. - class Handshake - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The approal state of a handshake. - module ApprovalState - # Unspecified approval status. - APPROVAL_STATE_UNSPECIFIED = 0 - - # The service was proposed and is waiting to be confirmed. - PENDING = 1 - - # Both parties have confirmed the service. - ESTABLISHED = 2 - - # The service proposal was rejected. - REJECTED = 3 - end - - # The various actors that can be involved in a handshake. - module Actor - # Unspecified actor. - ACTOR_UNSPECIFIED = 0 - - # The last change was done by the account who has this service. - ACCOUNT = 1 - - # The last change was done by the other party who this service points to. - OTHER_PARTY = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/autofeedsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/autofeedsettings.rb deleted file mode 100644 index 021b8510b837..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/autofeedsettings.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 Shopping - module Merchant - module Accounts - module V1 - # Collection of information related to the - # [autofeed](https://support.google.com/merchants/answer/7538732) settings. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the autofeed settings. - # Format: `accounts/{account}/autofeedSettings`. - # @!attribute [rw] enable_products - # @return [::Boolean] - # Required. Enables or disables product crawling through the autofeed for the - # given account. Autofeed accounts must meet [certain - # conditions](https://support.google.com/merchants/answer/7538732#Configure_automated_feeds_Standard_Experience), - # which can be checked through the `eligible` field. - # The account must **not** be a marketplace. - # When the autofeed is enabled for the first time, the products usually - # appear instantly. When re-enabling, it might take up to 24 hours for - # products to appear. - # @!attribute [r] eligible - # @return [::Boolean] - # Output only. Determines whether the business is eligible for being enrolled - # into an autofeed. - class AutofeedSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetAutofeedSettings` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the autofeed settings. - # Format: `accounts/{account}/autofeedSettings` - class GetAutofeedSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateAutofeedSettings` method. - # @!attribute [rw] autofeed_settings - # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] - # Required. The new version of the autofeed setting. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateAutofeedSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/automaticimprovements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/automaticimprovements.rb deleted file mode 100644 index 18047a5292cd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/automaticimprovements.rb +++ /dev/null @@ -1,235 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # Collection of information related to the [automatic - # improvements](https://developers.google.com/shopping-content/guides/automatic-improvements) - # of an account. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the automatic improvements. - # Format: `accounts/{account}/automaticImprovements`. - # @!attribute [rw] item_updates - # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticItemUpdates] - # Turning on [item - # updates](https://support.google.com/merchants/answer/3246284) allows - # Google to automatically update items for you. When item updates are on, - # Google uses the structured data markup on the website and advanced data - # extractors to update the price and availability of the items. When the item - # updates are off, items with mismatched data aren't shown. - # This field is only updated (cleared) if provided in the update mask. - # @!attribute [rw] image_improvements - # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImageImprovements] - # This improvement will attempt to automatically correct submitted images if - # they don't meet the [image - # requirements](https://support.google.com/merchants/answer/6324350), for - # example, removing overlays. If successful, the image will be replaced and - # approved. This improvement is only applied to images of disapproved offers. - # For more information see: [Automatic image - # improvements](https://support.google.com/merchants/answer/9242973) - # This field is only updated (cleared) if provided in the update mask. - # @!attribute [rw] shipping_improvements - # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticShippingImprovements] - # Not available for [advanced - # accounts](https://support.google.com/merchants/answer/188487). By turning - # on [automatic shipping - # improvements](https://support.google.com/merchants/answer/10027038), you - # are allowing Google to improve the accuracy of your delivery times shown to - # shoppers using Google. More accurate delivery times, especially when - # faster, typically lead to better conversion rates. Google will improve your - # estimated delivery times based on various factors: - # * Delivery address of an order - # * Current handling time and shipping time settings - # * Estimated weekdays or business days - # * Parcel tracking data - # This field is only updated (cleared) if provided in the update mask. - class AutomaticImprovements - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Turning on [item - # updates](https://support.google.com/merchants/answer/3246284) allows - # Google to automatically update items for you. When item updates are on, - # Google uses the structured data markup on the website and advanced data - # extractors to update the price and availability of the items. When the item - # updates are off, items with mismatched data aren't shown. - # @!attribute [rw] account_item_updates_settings - # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticItemUpdates::ItemUpdatesAccountLevelSettings] - # Optional. Determines which attributes of the items should be automatically - # updated. If this field is not present and provided in the update mask, then - # the settings will be deleted. If there are no settings for subaccount, they - # are inherited from aggregator. - # @!attribute [r] effective_allow_price_updates - # @return [::Boolean] - # Output only. The effective value of allow_price_updates. - # If account_item_updates_settings is present, then this value is the same. - # Otherwise, it represents the inherited value of the parent account. - # The default value is true if no settings are present. - # Read-only. - # @!attribute [r] effective_allow_availability_updates - # @return [::Boolean] - # Output only. The effective value of allow_availability_updates. - # If account_item_updates_settings is present, then this value is the same. - # Otherwise, it represents the inherited value of the parent account. - # The default value is true if no settings are present. - # Read-only. - # @!attribute [r] effective_allow_strict_availability_updates - # @return [::Boolean] - # Output only. The effective value of - # allow_strict_availability_updates. - # If account_item_updates_settings is present, then this value is the same. - # Otherwise, it represents the inherited value of the parent account. - # The default value is true if no settings are present. - # Read-only. - # @!attribute [r] effective_allow_condition_updates - # @return [::Boolean] - # Output only. The effective value of allow_condition_updates. - # If account_item_updates_settings is present, then this value is the same. - # Otherwise, it represents the inherited value of the parent account. - # The default value is true if no settings are present. - # Read-only. - class AutomaticItemUpdates - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Settings for the Automatic Item Updates. - # @!attribute [rw] allow_price_updates - # @return [::Boolean] - # If price updates are enabled, Google always updates the active price with - # the crawled information. - # @!attribute [rw] allow_availability_updates - # @return [::Boolean] - # If availability updates are enabled, any previous availability values - # get overwritten if Google finds an out-of-stock annotation on the offer's - # page. - # If additionally `allow_strict_availability_updates` field is set to - # true, values get overwritten if Google finds an in-stock annotation on - # the offer’s page. - # @!attribute [rw] allow_strict_availability_updates - # @return [::Boolean] - # If `allow_availability_updates` is enabled, items are automatically - # updated in all your Shopping target countries. By default, availability - # updates will only be applied to items that are 'out of stock' on your - # website but 'in stock' on Shopping. Set this to true to also update items - # that are 'in stock' on your website, but 'out of stock' on Google - # Shopping. In order for this field to have an effect, you must also set - # `allow_availability_updates`. - # @!attribute [rw] allow_condition_updates - # @return [::Boolean] - # If condition updates are enabled, Google always updates item condition - # with the condition detected from the details of your product. - class ItemUpdatesAccountLevelSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This improvement will attempt to automatically correct submitted images if - # they don't meet the [image - # requirements](https://support.google.com/merchants/answer/6324350), for - # example, removing overlays. If successful, the image will be replaced and - # approved. This improvement is only applied to images of disapproved offers. - # For more information see: [Automatic image - # improvements](https://support.google.com/merchants/answer/9242973) - # @!attribute [rw] account_image_improvements_settings - # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImageImprovements::ImageImprovementsAccountLevelSettings] - # Optional. Determines how the images should be automatically updated. - # If this field is not present and provided in the update mask, then the - # settings will be deleted. If there are no settings for subaccount, they are - # inherited from aggregator. - # @!attribute [r] effective_allow_automatic_image_improvements - # @return [::Boolean] - # Output only. The effective value of allow_automatic_image_improvements. - # If account_image_improvements_settings is present, then this value is the - # same. Otherwise, it represents the inherited value of the parent account. - # Read-only. - class AutomaticImageImprovements - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Settings for the Automatic Image Improvements. - # @!attribute [rw] allow_automatic_image_improvements - # @return [::Boolean] - # Enables automatic image improvements. - class ImageImprovementsAccountLevelSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Not available for [advanced - # accounts](https://support.google.com/merchants/answer/188487). By turning on - # [automatic shipping - # improvements](https://support.google.com/merchants/answer/10027038), - # you are allowing Google to improve the accuracy of your delivery times shown - # to shoppers using Google. More accurate delivery times, especially when - # faster, typically lead to better conversion rates. Google will improve your - # estimated delivery times based on various factors: - # * Delivery address of an order - # * Current handling time and shipping time settings - # * Estimated weekdays or business days - # * Parcel tracking data - # @!attribute [rw] allow_shipping_improvements - # @return [::Boolean] - # Enables automatic shipping improvements. - class AutomaticShippingImprovements - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetAutomaticImprovements` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the automatic improvements. - # Format: `accounts/{account}/automaticImprovements` - class GetAutomaticImprovementsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateAutomaticImprovements` method. - # @!attribute [rw] automatic_improvements - # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] - # Required. The new version of the automatic imrovements. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `item_updates` - # - `item_updates.account_level_settings` - # - `image_improvements` - # - `image_improvements.account_level_settings` - # - `shipping_improvements` - # - `shipping_improvements.allow_shipping_improvements` - class UpdateAutomaticImprovementsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessidentity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessidentity.rb deleted file mode 100644 index 35d89b006536..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessidentity.rb +++ /dev/null @@ -1,140 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # Collection of information related to the [identity of a - # business](https://support.google.com/merchants/answer/12564247). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the business identity. - # Format: `accounts/{account}/businessIdentity` - # @!attribute [rw] promotions_consent - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::PromotionsConsent] - # Required. Whether the identity attributes may be used for promotions. - # @!attribute [rw] black_owned - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as being - # black-owned. This optional field will only be available for businesses with - # the business country set to `US`. It is also not applicable for - # marketplaces or marketplace sellers. - # @!attribute [rw] women_owned - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as being - # women-owned. This optional field will only be available for businesses with - # a business country set to `US`. It is also not applicable for marketplaces - # or marketplace sellers. - # @!attribute [rw] veteran_owned - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as being - # veteran-owned. This optional field will only be available for businesses - # with a business country set to `US`. It is also not applicable for - # marketplaces or marketplace sellers. - # @!attribute [rw] latino_owned - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as being - # latino-owned. This optional field will only be available for businesses - # with the business country set to `US`. It is also not applicable for - # marketplaces or marketplace sellers. - # @!attribute [rw] small_business - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as a small - # business. This optional field will only be available for businesses with a - # business country set to `US`. It is also not applicable for marketplaces. - class BusinessIdentity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # All information related to an identity attribute. - # @!attribute [rw] identity_declaration - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute::IdentityDeclaration] - # Required. The declaration of identity for this attribute. - class IdentityAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # All possible settings regarding the declaration of an identity. - module IdentityDeclaration - # Default value indicating that no selection was made. - IDENTITY_DECLARATION_UNSPECIFIED = 0 - - # Indicates that the account identifies with the attribute. - SELF_IDENTIFIES_AS = 1 - - # Indicates that the account does not identify with the attribute. - DOES_NOT_SELF_IDENTIFY_AS = 2 - end - end - - # All possible settings regarding promotions related to the business - # identity. - module PromotionsConsent - # Default value indicating that no selection was made. - PROMOTIONS_CONSENT_UNSPECIFIED = 0 - - # Indicates that the account consented to having their business identity - # used for promotions. - PROMOTIONS_CONSENT_GIVEN = 1 - - # Indicates that the account did not consent to having their business - # identity used for promotions. - PROMOTIONS_CONSENT_DENIED = 2 - end - end - - # Request message for the `GetBusinessIdentity` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the business identity. - # Format: `accounts/{account}/businessIdentity`. For example, - # `accounts/123456/businessIdentity`. - class GetBusinessIdentityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateBusinessIdentity` method. - # @!attribute [rw] business_identity - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] - # Required. The new version of the business identity. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `black_owned` - # - `latino_owned` - # - `promotions_consent` - # - `small_business` - # - `veteran_owned` - # - `women_owned` - class UpdateBusinessIdentityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessinfo.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessinfo.rb deleted file mode 100644 index 0ef717f5804f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessinfo.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! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # The `BusinessInfo` message contains essential information about a - # business. - # - # This message captures key business details such as physical address, - # customer service contacts, and region-specific identifiers. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the business info. - # Format: `accounts/{account}/businessInfo` - # @!attribute [rw] address - # @return [::Google::Type::PostalAddress] - # Optional. The address of the business. Only `region_code`, `address_lines`, - # `postal_code`, `administrative_area` and `locality` fields are supported. - # All other fields are ignored. - # @!attribute [r] phone - # @return [::Google::Type::PhoneNumber] - # Output only. The phone number of the business. - # @!attribute [r] phone_verification_state - # @return [::Google::Shopping::Merchant::Accounts::V1::PhoneVerificationState] - # Output only. The phone verification state of the business. - # @!attribute [rw] customer_service - # @return [::Google::Shopping::Merchant::Accounts::V1::CustomerService] - # Optional. The customer service of the business. - # @!attribute [rw] korean_business_registration_number - # @return [::String] - # Optional. The 10-digit [Korean business registration - # number](https://support.google.com/merchants/answer/9037766) separated with - # dashes in the format: XXX-XX-XXXXX. - class BusinessInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetBusinessInfo` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the business info. - # Format: `accounts/{account}/businessInfo`. For example, - # `accounts/123456/businessInfo`. - class GetBusinessInfoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateBusinessInfo` method. - # @!attribute [rw] business_info - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] - # Required. The new version of the business info. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `address` - # - `customer_service` - # - `korean_business_registration_number` - class UpdateBusinessInfoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/checkoutsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/checkoutsettings.rb deleted file mode 100644 index 9d189d02dd35..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/checkoutsettings.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 Shopping - module Merchant - module Accounts - module V1 - # Request message for `GetCheckoutSettings` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - class GetCheckoutSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateCheckoutSettings` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account for which the `CheckoutSettings` will be - # created. - # @!attribute [rw] checkout_settings - # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # Required. The `CheckoutSettings` object to create. - class CreateCheckoutSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateCheckoutSettings` method. - # @!attribute [rw] checkout_settings - # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] - # Required. The updated version of the `CheckoutSettings`. - # The `name` field is used to identify the `CheckoutSettings`. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `eligible_destinations` - # - `uri_settings` - class UpdateCheckoutSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteCheckoutSettings` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - class DeleteCheckoutSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # [CheckoutSettings](https://support.google.com/merchants/answer/13945960) for - # a specific merchant. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the program configuration settings. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @!attribute [rw] uri_settings - # @return [::Google::Shopping::Merchant::Accounts::V1::UriSettings] - # URI settings for cart or checkout URL. - # @!attribute [rw] eligible_destinations - # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] - # Optional. Required for the create operation. The destinations (also known - # as [Marketing - # methods](https://support.google.com/merchants/answer/15130232)) to which - # the checkout program applies. Valid destination values are `SHOPPING_ADS` - # and `FREE_LISTINGS`. - # @!attribute [r] enrollment_state - # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings::CheckoutEnrollmentState] - # Output only. Reflects the merchant enrollment state in `Checkout` program. - # @!attribute [r] review_state - # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings::CheckoutReviewState] - # Output only. Reflects the merchant review state in `Checkout` program. - # This is set based on the data quality reviews of the URL provided by - # the merchant. - # A merchant with enrollment state - # as `ENROLLED` can be in the following review states: `IN_REVIEW`, - # `APPROVED` or `DISAPPROVED`. A merchant must be in an `enrollment_state` of - # `ENROLLED` before a review can begin for the merchant.For more details, - # check the help center doc. - # @!attribute [r] effective_uri_settings - # @return [::Google::Shopping::Merchant::Accounts::V1::UriSettings] - # Output only. The effective value of `uri_settings` for a given merchant. If - # account level settings are present then this value will be a copy of url - # settings. Otherwise, it will have the value of the parent account (for only - # marketplace sellers). - # @!attribute [r] effective_enrollment_state - # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings::CheckoutEnrollmentState] - # Output only. The effective value of enrollment_state for a given merchant - # ID. If account level settings are present then this value will be a copy of - # the account level settings. Otherwise, it will have the value of the parent - # account (for only marketplace sellers). - # @!attribute [r] effective_review_state - # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings::CheckoutReviewState] - # Output only. The effective value of `review_state` for a given merchant ID. - # If account level settings are present then this value will be a copy of the - # account level settings. Otherwise, it will have the value of the parent - # account (for only marketplace sellers). - class CheckoutSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum indicating the enrollment state of merchant in `Checkout` - # program. - module CheckoutEnrollmentState - # Default enrollment state when enrollment state is not specified. - CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED = 0 - - # Merchant has not enrolled into the program. - INACTIVE = 1 - - # Merchant has enrolled into the program by providing either an - # account level URL or checkout URLs as part of their feed. - ENROLLED = 2 - - # Merchant has previously enrolled but opted out of the program. - OPTED_OUT = 3 - end - - # Enum indicating the review state of merchant in `Checkout` - # program. - module CheckoutReviewState - # Default review state when review state is not specified. - CHECKOUT_REVIEW_STATE_UNSPECIFIED = 0 - - # Merchant provided URLs are being reviewed for data quality issues. - IN_REVIEW = 1 - - # Merchant account has been approved. Indicates the data quality checks - # have passed. - APPROVED = 2 - - # Merchant account has been disapproved due to data quality issues. - DISAPPROVED = 3 - end - end - - # URL settings for cart or checkout URL. - # @!attribute [rw] checkout_uri_template - # @return [::String] - # Checkout URL template. When the placeholders are expanded will redirect - # the buyer to the merchant checkout page with the item in the cart. For - # more details, check the [help center - # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) - # - # Note: The following fields are mutually exclusive: `checkout_uri_template`, `cart_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cart_uri_template - # @return [::String] - # Cart URL template. When the placeholders are expanded will redirect the - # buyer to the cart page on the merchant website with the selected - # item in cart. For more details, check the [help center - # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) - # - # Note: The following fields are mutually exclusive: `cart_uri_template`, `checkout_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class UriSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/customerservice.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/customerservice.rb deleted file mode 100644 index 65b91705c33d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/customerservice.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 Shopping - module Merchant - module Accounts - module V1 - # Customer service information. - # @!attribute [rw] uri - # @return [::String] - # Optional. The URI where customer service may be found. - # @!attribute [rw] email - # @return [::String] - # Optional. The email address where customer service may be reached. - # @!attribute [rw] phone - # @return [::Google::Type::PhoneNumber] - # Optional. The phone number where customer service may be called. - class CustomerService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/developerregistration.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/developerregistration.rb deleted file mode 100644 index aaa571127439..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/developerregistration.rb +++ /dev/null @@ -1,94 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # Represents a developer registration owned by a Merchant account. - # @!attribute [rw] name - # @return [::String] - # Identifier. The `name` (ID) of the developer registration. Generated by the - # Content API upon creation of a new `DeveloperRegistration`. The `account` - # represents the merchant ID of the merchant that owns the registration. - # @!attribute [r] gcp_ids - # @return [::Array<::String>] - # Output only. The GCP ids attached to this developer registration - class DeveloperRegistration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the RegisterGCP method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the developer registration to be created for the - # merchant account that the GCP will be registered with. Format: - # `accounts/{account}/developerRegistration` - # @!attribute [rw] developer_email - # @return [::String] - # Immutable. Optional field. Developer role can be also added by using - # `users.update` method. If the developer email provided is associated with a - # user in the provided merchant account, the user will be updated to have - # `API_DEVELOPER` `access_rights` and the email preference corresponding to - # that user will be updated to have the new API notifications preference. If - # the developer email provided is not associated with any user, it is added - # as a contact. The email preference corresponding to that contact will have - # the new API notifications preference. Make sure the email used is - # associated with a Google Account and is not a service account as service - # accounts can't receive emails. - class RegisterGcpRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UnregisterGCP method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the developer registration to be created for the - # merchant account that the GCP will be registered with. Format: - # `accounts/{account}/developerRegistration` - class UnregisterGcpRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the GetDeveloperRegistration method. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` (ID) of the developer registration. - class GetDeveloperRegistrationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the GetAccountForGcpRegistration method. - # @!attribute [rw] name - # @return [::String] - # The name of the merchant account id that the GCP is registered with. - class GetAccountForGcpRegistrationResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/emailpreferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/emailpreferences.rb deleted file mode 100644 index 7bc4eb56ef56..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/emailpreferences.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 Shopping - module Merchant - module Accounts - module V1 - # The categories of notifications the user opted into / opted out of. The email - # preferences do not include mandatory announcements as users can't opt out of - # them. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the EmailPreferences. The endpoint is only - # supported for the authenticated user. - # @!attribute [rw] news_and_tips - # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences::OptInState] - # Optional. Updates on new features, tips and best practices. - class EmailPreferences - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Opt in state of the email preference. - module OptInState - # Opt-in status is not specified. - OPT_IN_STATE_UNSPECIFIED = 0 - - # User has opted out of receiving this type of email. - OPTED_OUT = 1 - - # User has opted in to receiving this type of email. - OPTED_IN = 2 - - # User has opted in to receiving this type of email and the confirmation - # email has been sent, but user has not yet confirmed the opt in (applies - # only to certain countries). - UNCONFIRMED = 3 - end - end - - # Request message for GetEmailPreferences method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `EmailPreferences` resource. - # Format: `accounts/{account}/users/{email}/emailPreferences` - class GetEmailPreferencesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateEmailPreferences method. - # @!attribute [rw] email_preferences - # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] - # Required. Email Preferences to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `news_and_tips` - class UpdateEmailPreferencesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/gbpaccounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/gbpaccounts.rb deleted file mode 100644 index eefd5dec9351..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/gbpaccounts.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 Shopping - module Merchant - module Accounts - module V1 - # Collection of information related to a Google Business Profile (GBP) account. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the GBP account. Format: - # `accounts/{account}/gbpAccount/{gbp_account}` - # @!attribute [rw] gbp_account_id - # @return [::String] - # The id of the GBP account. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Accounts::V1::GbpAccount::Type] - # The type of the Business Profile. - # @!attribute [rw] gbp_account_name - # @return [::String] - # The name of the Business Profile. - # For personal accounts: Email id of the owner. - # For Business accounts: Name of the Business Account. - # @!attribute [rw] listing_count - # @return [::Integer] - # Number of listings under this account. - class GbpAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the GBP account. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # The GBP account is a user account. - USER = 1 - - # The GBP account is a business account. - BUSINESS_ACCOUNT = 2 - end - end - - # Request message for the ListGbpAccounts method. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource under which the GBP accounts are - # listed. Format: `accounts/{account}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `GbpAccount` resources to return. The - # service returns fewer than this value if the number of gbp accounts is less - # that than the `pageSize`. The default value is 50. The maximum value is - # 1000; If a value higher than the maximum is specified, then the `pageSize` - # will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListGbpAccounts` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListGbpAccounts` must - # match the call that provided the page token. - class ListGbpAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListGbpAccounts method. - # @!attribute [rw] gbp_accounts - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::GbpAccount>] - # The GBP accounts from the specified merchant in the specified country. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListGbpAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the LinkGbpAccount method. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource to which the GBP account is - # linked. Format: `accounts/{account}`. - # @!attribute [rw] gbp_email - # @return [::String] - # Required. The email address of the Business Profile account. - class LinkGbpAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the LinkGbpAccount method. - # @!attribute [rw] response - # @return [::Google::Protobuf::Empty] - # Empty response. - class LinkGbpAccountResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/homepage.rb deleted file mode 100644 index 272a22c8cf60..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/homepage.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 Shopping - module Merchant - module Accounts - module V1 - # The `Homepage` message represents a business's store homepage within the - # system. - # - # A business's homepage is the primary domain where customers interact with - # their store. - # - # The homepage can be claimed and verified as a proof of ownership and allows - # the business to unlock features that require a verified website. For more - # information, see [Understanding online store URL - # verification](//support.google.com/merchants/answer/176793). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the store's homepage. - # Format: `accounts/{account}/homepage` - # @!attribute [rw] uri - # @return [::String] - # Required. The URI (typically a URL) of the store's homepage. - # @!attribute [r] claimed - # @return [::Boolean] - # Output only. Whether the homepage is claimed. See - # https://support.google.com/merchants/answer/176793. - class Homepage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetHomepage` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the homepage to retrieve. - # Format: `accounts/{account}/homepage` - class GetHomepageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateHomepage` method. - # @!attribute [rw] homepage - # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] - # Required. The new version of the homepage. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `uri` - class UpdateHomepageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ClaimHomepage` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the homepage to claim. - # Format: `accounts/{account}/homepage` - # @!attribute [rw] overwrite - # @return [::Boolean] - # Optional. When set to `true`, this option removes any existing claim on the - # requested website from any other account to the account making the request, - # effectively replacing the previous claim. - class ClaimHomepageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UnclaimHomepage` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the homepage to unclaim. - # Format: `accounts/{account}/homepage` - class UnclaimHomepageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/lfpproviders.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/lfpproviders.rb deleted file mode 100644 index 48d974792168..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/lfpproviders.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 Shopping - module Merchant - module Accounts - module V1 - # Collection of information related to a Local Feed Partnership (LFP) provider. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the LFP provider. - # Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}` - # @!attribute [r] region_code - # @return [::String] - # Output only. Region code defined by [CLDR](https://cldr.unicode.org/). - # @!attribute [rw] display_name - # @return [::String] - # The display name of the LFP provider. - class LfpProvider - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the FindLfpProviders method. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource under which the LFP providers are - # found. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `LfpProvider` resources to return. The - # service returns fewer than this value if the number of lfp providers is - # less that than the `pageSize`. The default value is 50. The maximum value - # is 1000; If a value higher than the maximum is specified, then the - # `pageSize` will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `FindLfpProviders` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `FindLfpProviders` must - # match the call that provided the page token. - class FindLfpProvidersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the FindLfpProviders method. - # @!attribute [rw] lfp_providers - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::LfpProvider>] - # The LFP providers from the specified merchant in the specified country. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class FindLfpProvidersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the LinkLfpProvider method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the LFP provider resource to link. - # Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. - # The `lfp_provider` is the LFP provider ID. - # @!attribute [rw] external_account_id - # @return [::String] - # Required. The external account ID by which this merchant is known to the - # LFP provider. - class LinkLfpProviderRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the LinkLfpProvider method. - # @!attribute [rw] response - # @return [::Google::Protobuf::Empty] - # Empty response. - class LinkLfpProviderResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/omnichannelsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/omnichannelsettings.rb deleted file mode 100644 index 80f3cde7bfd9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/omnichannelsettings.rb +++ /dev/null @@ -1,336 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # Collection of information related to the omnichannel settings of a merchant. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the omnichannel setting. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # @!attribute [rw] region_code - # @return [::String] - # Required. Immutable. Region code defined by - # [CLDR](https://cldr.unicode.org/). Must be provided in the Create method, - # and is immutable. - # @!attribute [rw] lsf_type - # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting::LsfType] - # Required. The Local Store Front type for this country. - # @!attribute [rw] in_stock - # @return [::Google::Shopping::Merchant::Accounts::V1::InStock] - # Optional. The InStock URI and state for this country. - # @!attribute [rw] pickup - # @return [::Google::Shopping::Merchant::Accounts::V1::Pickup] - # Optional. The Pickup URI and state for this country. - # @!attribute [r] lfp_link - # @return [::Google::Shopping::Merchant::Accounts::V1::LfpLink] - # Output only. The established link to a LFP provider. - # @!attribute [rw] odo - # @return [::Google::Shopping::Merchant::Accounts::V1::OnDisplayToOrder] - # Optional. The On Display to Order (ODO) policy URI and state for this - # country. - # @!attribute [rw] about - # @return [::Google::Shopping::Merchant::Accounts::V1::About] - # Optional. The about page URI and state for this country. - # @!attribute [rw] inventory_verification - # @return [::Google::Shopping::Merchant::Accounts::V1::InventoryVerification] - # Optional. The inventory verification contact and state for this country. - class OmnichannelSetting - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The product page experience type, which is also called the Local Store - # Front (LSF) type. Check the [HC - # article](https://support.google.com/merchants/answer/7178526) for more - # details. - module LsfType - # Default value. This value is unused. - LSF_TYPE_UNSPECIFIED = 0 - - # Google-Hosted Local Store Front. Check the [HC - # article](https://support.google.com/merchants/answer/14869424) for more - # details. - GHLSF = 1 - - # Merchant-Hosted Local Store Front Basic. Check the [HC - # article](https://support.google.com/merchants/answer/14615867) for more - # details. - MHLSF_BASIC = 2 - - # Merchant-Hosted Local Store Front Full. Check the [HC - # article](https://support.google.com/merchants/answer/14617076) for more - # details. - MHLSF_FULL = 3 - end - end - - # The state of a omnichannel setting related review process. - class ReviewState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the review process. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The review process has concluded successfully. The reviewed item is - # active. - ACTIVE = 1 - - # The review process failed. - FAILED = 2 - - # The review process is running. - RUNNING = 3 - - # The review process is waiting for the merchant to take action. - ACTION_REQUIRED = 4 - end - end - - # Collection of information related to InStock. - # @!attribute [rw] uri - # @return [::String] - # Optional. Product landing page URI. It is only used for the review of MHLSF - # in-stock serving. This URI domain should match with the business's - # homepage. Required to be empty if the lsf_type is GHLSF, and required when - # the lsf_type is MHLSF_FULL or MHLSF_BASIC. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] - # Output only. The state of the in-stock serving. - class InStock - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to Pickup. - # @!attribute [rw] uri - # @return [::String] - # Required. Pickup product page URI. It is only used for the review of pickup - # serving. This URI domain should match with the business's homepage. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] - # Output only. The state of the pickup serving. - class Pickup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to the LFP link. - # @!attribute [rw] lfp_provider - # @return [::String] - # Required. The resource name of the LFP provider. - # Format: `lfpProviders/{lfp_provider}` - # @!attribute [rw] external_account_id - # @return [::String] - # Required. The account ID by which this merchant is known to the LFP - # provider. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] - # Output only. The state of the LFP link. - class LfpLink - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to the on display to order - # ([ODO](https://support.google.com/merchants/answer/14615056?ref_topic=15145747&sjid=6892280366904591178-NC)). - # @!attribute [rw] uri - # @return [::String] - # Required. The on display to order (ODO) policy URI. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] - # Output only. The state of the URI. - class OnDisplayToOrder - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to the about page - # ([impressum](https://support.google.com/merchants/answer/14675634?ref_topic=15145634&sjid=6892280366904591178-NC)). - # @!attribute [rw] uri - # @return [::String] - # Required. The about page URI. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] - # Output only. The state of the URI. - class About - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to [inventory - # verification](https://support.google.com/merchants/answer/14684499?ref_topic=15145634&sjid=6892280366904591178-NC). - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1::InventoryVerification::State] - # Output only. The state of the inventory verification process. - # @!attribute [rw] contact - # @return [::String] - # Required. The name of the contact for the inventory verification process. - # @!attribute [rw] contact_email - # @return [::String] - # Required. The email address of the contact for the inventory verification - # process. - # @!attribute [r] contact_state - # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] - # Output only. The state of the contact verification. - class InventoryVerification - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the [inventory - # verification](https://support.google.com/merchants/answer/14684499?ref_topic=15145634&sjid=6892280366904591178-NC) - # process. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # When the merchant needs to initiate the inventory - # verification process. The next state is INACTIVE. - ACTION_REQUIRED = 1 - - # When the merchant is ready to request inventory verification. - INACTIVE = 5 - - # The inventory verification process is running. If the merchant is - # rejected, the next state is INACTIVE. - RUNNING = 2 - - # The inventory verification process succeeded. - SUCCEEDED = 3 - - # When merchant fails the inventory verification process and all attempts - # are exhausted. - SUSPENDED = 4 - end - end - - # Request message for the GetOmnichannelSettings method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the omnichannel setting to retrieve. - # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - class GetOmnichannelSettingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListOmnichannelSettings method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of omnichannel settings. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of omnichannel settings to return. The service - # may return fewer than this value. If unspecified, at most 50 omnichannel - # settings will be returned. The maximum value is 1000; values above 1000 - # will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListOmnichannelSettings` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListOmnichannelSettings` - # must match the call that provided the page token. - class ListOmnichannelSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListOmnichannelSettings method. - # @!attribute [rw] omnichannel_settings - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting>] - # The omnichannel settings from the specified merchant. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListOmnichannelSettingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateOmnichannelSetting method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this omnichannel setting will be - # created. Format: `accounts/{account}` - # @!attribute [rw] omnichannel_setting - # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # Required. The omnichannel setting to create. - class CreateOmnichannelSettingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateOmnichannelSetting method. - # @!attribute [rw] omnichannel_setting - # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # Required. The omnichannel setting to update. - # - # The omnichannel setting's `name` field is used to identify the - # omnichannel setting to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to be updated. - # - # The following fields are supported in snake_case only: - # - `lsf_type` - # - `in_stock` - # - `pickup` - # - `odo` - # - `about` - # - `inventory_verification` - # - # Full replacement with wildcard `*`is supported, while empty/implied update - # mask is not. - class UpdateOmnichannelSettingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the RequestInventoryVerification method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the omnichannel setting to request inventory - # verification. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - class RequestInventoryVerificationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the RequestInventoryVerification method. - # @!attribute [rw] omnichannel_setting - # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] - # The omnichannel setting that was updated. - class RequestInventoryVerificationResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/online_return_policy.rb deleted file mode 100644 index f82f2029f00f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/online_return_policy.rb +++ /dev/null @@ -1,317 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # Request message for the `GetOnlineReturnPolicy` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the return policy to retrieve. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - class GetOnlineReturnPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateOnlineReturnPolicy` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The Merchant Center account for which the return policy will be - # created. Format: `accounts/{account}` - # @!attribute [rw] online_return_policy - # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] - # Required. The return policy object to create. - class CreateOnlineReturnPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteOnlineReturnPolicy` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the return policy to delete. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - class DeleteOnlineReturnPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListOnlineReturnPolicies` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The Merchant Center account for which to list return policies. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `OnlineReturnPolicy` resources to return. - # The service returns fewer than this value if the number of return policies - # for the given business is less that than the `pageSize`. The default value - # is 10. The maximum value is 100; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListOnlineReturnPolicies` - # call. Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListOnlineReturnPolicies` must match the call that provided the page - # token. The token returned as - # {::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} - # in the response to the previous request. - class ListOnlineReturnPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListOnlineReturnPolicies` method. - # @!attribute [rw] online_return_policies - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy>] - # The retrieved return policies. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `pageToken` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListOnlineReturnPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # [Online return policy](https://support.google.com/merchants/answer/10220642) - # object. This is currently used to represent return policies for ads and free - # listings programs. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the `OnlineReturnPolicy` resource. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - # @!attribute [r] return_policy_id - # @return [::String] - # Output only. Return policy ID generated by Google. - # @!attribute [rw] label - # @return [::String] - # Optional. Immutable. This field represents the unique user-defined label of - # the return policy for the given country. It is important to note that the - # same label cannot be used in different return policies for the same - # country. If not given, policies will be automatically treated as the - # 'default' for the country. When using label, you are creating an exception - # policy in that country to assign a custom return policy to certain product - # groups, follow the instructions provided in the [Return policy label] - # (https://support.google.com/merchants/answer/9445425). The label can - # contain up to 50 characters. - # @!attribute [rw] countries - # @return [::Array<::String>] - # Required. Immutable. The countries of sale where the return policy applies. - # The values must be a valid 2 letter ISO 3166 code. - # @!attribute [rw] policy - # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::Policy] - # Optional. The return policy. - # @!attribute [rw] seasonal_overrides - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::SeasonalOverride>] - # Optional. Overrides to the general policy for orders placed during a - # specific set of time intervals. - # @!attribute [rw] restocking_fee - # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::RestockingFee] - # Optional. The restocking fee that applies to all return reason categories. - # This would be treated as a free restocking fee if the value is not set. - # @!attribute [rw] return_methods - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::ReturnMethod>] - # Optional. The return methods of how customers can return an item. This - # value is required to not be empty unless the type of return policy is - # noReturns. - # @!attribute [rw] item_conditions - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::ItemCondition>] - # Optional. The item conditions accepted for returns must not be empty unless - # the type of return policy is 'noReturns'. - # @!attribute [rw] return_shipping_fee - # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::ReturnShippingFee] - # Optional. The return shipping fee. Should be set only when customer need to - # download and print the return label. - # @!attribute [rw] return_policy_uri - # @return [::String] - # Required. The return policy uri. This can used by Google to do a sanity - # check for the policy. It must be a valid URL. - # @!attribute [rw] accept_defective_only - # @return [::Boolean] - # Optional. This field specifies if business - # only accepts defective products for returns. - # @!attribute [rw] process_refund_days - # @return [::Integer] - # Optional. The field specifies the number of - # days it takes for business to process refunds. - # @!attribute [rw] accept_exchange - # @return [::Boolean] - # Optional. This field specifies if business - # allows customers to exchange products. - # @!attribute [rw] return_label_source - # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::ReturnLabelSource] - # Optional. The field specifies the return - # label source. - class OnlineReturnPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The return shipping fee. This can either be a fixed fee or a boolean to - # indicate that the customer pays the actual shipping cost. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::ReturnShippingFee::Type] - # Required. Type of return shipping fee. - # @!attribute [rw] fixed_fee - # @return [::Google::Shopping::Type::Price] - # Fixed return shipping fee amount. This value is only applicable when type - # is `FIXED`. We will treat the return shipping fee as free if type is - # `FIXED` and this value is not set. - class ReturnShippingFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Return shipping fee types. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # The return shipping fee is a fixed value. - FIXED = 1 - - # Customers will pay the actual return shipping fee. - CUSTOMER_PAYING_ACTUAL_FEE = 2 - end - end - - # The restocking fee. This can be a flat fee or a micro percent. - # @!attribute [rw] fixed_fee - # @return [::Google::Shopping::Type::Price] - # Fixed restocking fee. - # - # Note: The following fields are mutually exclusive: `fixed_fee`, `micro_percent`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] micro_percent - # @return [::Integer] - # Percent of total price in micros. 15,000,000 means 15% of the total - # price would be charged. - # - # Note: The following fields are mutually exclusive: `micro_percent`, `fixed_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class RestockingFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The available policies. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::Policy::Type] - # Policy type. - # @!attribute [rw] days - # @return [::Integer] - # The number of days items can be returned after delivery, where one day - # is defined as 24 hours after the delivery timestamp. Required for - # `NUMBER_OF_DAYS_AFTER_DELIVERY` returns. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Return policy types. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # The number of days within which a return is valid after delivery. - NUMBER_OF_DAYS_AFTER_DELIVERY = 1 - - # No returns. - NO_RETURNS = 2 - - # Life time returns. - LIFETIME_RETURNS = 3 - end - end - - # @!attribute [rw] return_days - # @return [::Integer] - # Number of days (from the delivery date) that the product can be - # returned. - # - # Note: The following fields are mutually exclusive: `return_days`, `return_until_date`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] return_until_date - # @return [::Google::Type::Date] - # Fixed end date until which the product can be returned. - # - # Note: The following fields are mutually exclusive: `return_until_date`, `return_days`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] label - # @return [::String] - # Required. Display name of this seasonal override in Merchant Center. - # @!attribute [rw] start_date - # @return [::Google::Type::Date] - # Required. Defines the date range when this seasonal override applies. - # Both start_date and end_date are inclusive. - # The dates of the seasonal overrides should not overlap. - # @!attribute [rw] end_date - # @return [::Google::Type::Date] - # Required. seasonal override end date (inclusive). - class SeasonalOverride - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The available return methods. - module ReturnMethod - # Default value. This value is unused. - RETURN_METHOD_UNSPECIFIED = 0 - - # Return by mail. - BY_MAIL = 1 - - # Return in store. - IN_STORE = 2 - - # Return at a kiosk. - AT_A_KIOSK = 3 - end - - # The available item conditions. - module ItemCondition - # Default value. This value is unused. - ITEM_CONDITION_UNSPECIFIED = 0 - - # New. - NEW = 1 - - # Used. - USED = 2 - end - - # The available return label sources. - module ReturnLabelSource - # Default value. This value is unused. - RETURN_LABEL_SOURCE_UNSPECIFIED = 0 - - # Download and print. - DOWNLOAD_AND_PRINT = 1 - - # Label include in the package. - IN_THE_PACKAGE = 2 - - # Customer to provide. - CUSTOMER_RESPONSIBILITY = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/phoneverificationstate.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/phoneverificationstate.rb deleted file mode 100644 index 94432f48b8ed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/phoneverificationstate.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 Shopping - module Merchant - module Accounts - module V1 - # The phone verification state. - module PhoneVerificationState - # Default value. This value is unused. - PHONE_VERIFICATION_STATE_UNSPECIFIED = 0 - - # The phone is verified. - PHONE_VERIFICATION_STATE_VERIFIED = 1 - - # The phone is unverified. - PHONE_VERIFICATION_STATE_UNVERIFIED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/programs.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/programs.rb deleted file mode 100644 index fc47869540ec..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/programs.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 Shopping - module Merchant - module Accounts - module V1 - # Defines participation in a given program for the specified account. - # - # Programs provide a mechanism for adding functionality to a Merchant Center - # accounts. A typical example of this is the [Free product - # listings](https://support.google.com/merchants/answer/13889434) - # program, which enables products from a business's store to be shown across - # Google for free. - # - # The following list is the available set of program resource IDs accessible - # through the API: - # - # * `checkout` - # * `free-listings` - # * `product-ratings` - # * `shopping-ads` - # * `youtube-shopping-checkout` - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the program. - # Format: `accounts/{account}/programs/{program}` - # @!attribute [r] documentation_uri - # @return [::String] - # Output only. The URL of a Merchant Center help page describing the program. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1::Program::State] - # Output only. The participation state of the account in the program. - # @!attribute [r] active_region_codes - # @return [::Array<::String>] - # Output only. The regions in which the account is actively participating in - # the program. Active regions are defined as those where all program - # requirements affecting the regions have been met. - # - # Region codes are defined by [CLDR](https://cldr.unicode.org/). This is - # either a country where the program applies specifically to that country or - # `001` when the program applies globally. - # @!attribute [r] unmet_requirements - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Program::Requirement>] - # Output only. The requirements that the account has not yet satisfied that - # are affecting participation in the program. - class Program - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines a requirement specified for participation in the program. - # @!attribute [r] title - # @return [::String] - # Output only. Name of the requirement. - # @!attribute [r] documentation_uri - # @return [::String] - # Output only. The URL of a help page describing the requirement. - # @!attribute [r] affected_region_codes - # @return [::Array<::String>] - # Output only. The regions that are currently affected by this requirement - # not being met. - # - # Region codes are defined by [CLDR](https://cldr.unicode.org/). This is - # either a country where the program applies specifically to that country - # or `001` when the program applies globally. - class Requirement - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible program participation states for the account. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The account is not eligible to participate in the program. - NOT_ELIGIBLE = 1 - - # The account is eligible to participate in the program. - ELIGIBLE = 2 - - # The program is enabled for the account. - ENABLED = 3 - end - end - - # Request message for the GetProgram method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the program to retrieve. - # Format: `accounts/{account}/programs/{program}`. For example, - # `accounts/123456/programs/free-listings`. - class GetProgramRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListPrograms method. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the account for which to retrieve all programs. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of programs to return in a single response. If - # unspecified (or 0), a default size of 1000 is used. The maximum value is - # 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A continuation token, received from a previous `ListPrograms` - # call. Provide this to retrieve the next page. - class ListProgramsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListPrograms method. - # @!attribute [rw] programs - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Program>] - # The programs for the given account. - # @!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 ListProgramsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the EnableProgram method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the program for which to enable participation for the - # given account. Format: `accounts/{account}/programs/{program}`. For - # example, `accounts/123456/programs/free-listings`. - class EnableProgramRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DisableProgram method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the program for which to disable participation for - # the given account. Format: `accounts/{account}/programs/{program}`. For - # example, `accounts/123456/programs/free-listings`. - class DisableProgramRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/regions.rb deleted file mode 100644 index 9f1e20033932..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/regions.rb +++ /dev/null @@ -1,296 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # Request message for the `GetRegion` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the region to retrieve. - # Format: `accounts/{account}/regions/{region}` - class GetRegionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateRegion` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to create a region for. - # Format: `accounts/{account}` - # @!attribute [rw] region_id - # @return [::String] - # Required. The identifier for the region, unique over all regions of the - # same account. - # @!attribute [rw] region - # @return [::Google::Shopping::Merchant::Accounts::V1::Region] - # Required. The region to create. - class CreateRegionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `BatchCreateRegions` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to create one or more regions for. - # Format: `accounts/{account}` - # @!attribute [rw] requests - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest>] - # Required. The region(s) to create. - # The maximum number of regions that can be created in a batch is 100. - class BatchCreateRegionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `BatchCreateRegions` method. - # @!attribute [rw] regions - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Region>] - # The created region(s). - class BatchCreateRegionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateRegion` method. - # @!attribute [rw] region - # @return [::Google::Shopping::Merchant::Accounts::V1::Region] - # Required. The updated region. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The comma-separated field mask indicating the fields to update. - # Example: - # `"displayName,postalCodeArea.regionCode"`. - class UpdateRegionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `BatchUpdateRegions` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to update one or more regions for. - # Format: `accounts/{account}` - # @!attribute [rw] requests - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest>] - # Required. The region(s) to update. - # The maximum number of regions that can be updated in a batch is 100. - class BatchUpdateRegionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `BatchUpdateRegions` method. - # @!attribute [rw] regions - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Region>] - # The updated region(s). - class BatchUpdateRegionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteRegion` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the region to delete. - # Format: `accounts/{account}/regions/{region}` - class DeleteRegionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `BatchDeleteRegions` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to delete one or more regions from. - # Format: `accounts/{account}` - # @!attribute [rw] requests - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest>] - # Required. The names of the regions to delete. - # A maximum of 100 regions can be deleted in a batch. - class BatchDeleteRegionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListRegions` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to list regions for. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of regions to return. The service may return - # fewer than this value. - # If unspecified, at most 50 regions will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListRegions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegions` must - # match the call that provided the page token. - class ListRegionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListRegions` method. - # @!attribute [rw] regions - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Region>] - # The regions from the specified business. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRegionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a geographic region that you can use as a target with both the - # `RegionalInventory` and `ShippingSettings` services. You can define regions - # as collections of either postal codes, radius areas or, in some countries, - # using predefined geotargets. - # - # A region must be defined by specifying exactly one of `postal_code_area`, - # `geotarget_area`, or `radius_area`. - # - # For more information, see [Set up regions - # ](https://support.google.com/merchants/answer/7410946#zippy=%2Ccreate-a-new-region) - # for more information. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the region. - # Format: `accounts/{account}/regions/{region}` - # @!attribute [rw] display_name - # @return [::String] - # Optional. The display name of the region. - # @!attribute [rw] postal_code_area - # @return [::Google::Shopping::Merchant::Accounts::V1::Region::PostalCodeArea] - # Optional. A list of postal codes that defines the region area. - # @!attribute [rw] geotarget_area - # @return [::Google::Shopping::Merchant::Accounts::V1::Region::GeoTargetArea] - # Optional. A list of geotargets that defines the region area. - # @!attribute [r] regional_inventory_eligible - # @return [::Google::Protobuf::BoolValue] - # Output only. Indicates if the region is eligible for use in the Regional - # Inventory configuration. - # @!attribute [r] shipping_eligible - # @return [::Google::Protobuf::BoolValue] - # Output only. Indicates if the region is eligible for use in the Shipping - # Services configuration. - # @!attribute [rw] radius_area - # @return [::Google::Shopping::Merchant::Accounts::V1::Region::RadiusArea] - # Optional. A radius area that defines the region area. - class Region - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A list of postal codes that defines the region area. - # Note: All regions defined using postal codes are accessible through the - # account's `ShippingSettings.postalCodeGroups` resource. - # @!attribute [rw] region_code - # @return [::String] - # Required. [CLDR territory - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # or the country the postal code group applies to. - # @!attribute [rw] postal_codes - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Region::PostalCodeArea::PostalCodeRange>] - # Required. A range of postal codes. - class PostalCodeArea - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A range of postal codes that defines the region area. - # @!attribute [rw] begin - # @return [::String] - # Required. A postal code or a pattern of the form prefix* denoting the - # inclusive lower bound of the range defining the area. Examples values: - # `94108`, `9410*`, `9*`. - # @!attribute [rw] end - # @return [::String] - # Optional. A postal code or a pattern of the form `prefix*` denoting the - # inclusive upper bound of the range defining the area. It must have the - # same length as postalCodeRangeBegin: if postalCodeRangeBegin is a - # postal code then postalCodeRangeEnd must be a postal code too; if - # postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a - # pattern with the same prefix length. Optional: if not set, then the - # area is defined as being all the postal codes matching - # postalCodeRangeBegin. - class PostalCodeRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A list of geotargets that defines the region area. - # @!attribute [rw] geotarget_criteria_ids - # @return [::Array<::Integer>] - # Required. A non-empty list of [location - # IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). - # They must all be of the same location type (for example, state). - class GeoTargetArea - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A radius area that defines the region area. - # @!attribute [rw] region_code - # @return [::String] - # Required. [CLDR territory - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # or the country the radius area applies to. - # @!attribute [rw] lat_lng - # @return [::Google::Type::LatLng] - # Required. The center of the radius area. It represents a - # latitude/longitude pair in decimal degrees format. - # @!attribute [rw] radius - # @return [::Float] - # Required. The radius distance of the area. - # @!attribute [rw] radius_units - # @return [::Google::Shopping::Merchant::Accounts::V1::Region::RadiusArea::RadiusUnits] - # Optional. The unit of the radius. - class RadiusArea - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The unit of measurement of the radius. Default is KILOMETERS. - module RadiusUnits - # Unused default value - RADIUS_UNITS_UNSPECIFIED = 0 - - # The distance is measured in miles. - MILES = 1 - - # The distance is measured in kilometers. - KILOMETERS = 2 - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/shippingsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/shippingsettings.rb deleted file mode 100644 index a7c66d8a48b1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/shippingsettings.rb +++ /dev/null @@ -1,757 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # The Merchant Center account's [shipping - # settings](https://support.google.com/merchants/answer/6069284). The - # `ShippingSettings` resource lets you retrieve and update the shipping - # settings of your advanced account and all its associated sub-accounts. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the shipping settings. - # Format: `accounts/{account}/shippingSettings`. For example, - # `accounts/123456/shippingSettings`. - # @!attribute [rw] services - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Service>] - # Optional. The target account's list of services. - # @!attribute [rw] warehouses - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Warehouse>] - # Optional. A list of warehouses which can be referred to in `services`. - # @!attribute [rw] etag - # @return [::String] - # Required. This field helps avoid async issues. It ensures that the shipping - # setting - # data doesn't change between the `get` call and the `insert` call. The user - # should follow these steps: - # - # 1. Set the etag field as an empty string for the initial shipping setting - # creation. - # - # 2. After the initial creation, call the `get` method to obtain an etag and - # the current shipping setting data before calling `insert`. - # - # 3. Modify the shipping setting information. - # - # 4. Call the `insert` method with the shipping setting information - # and the etag obtained in step 2. - # - # 5. If the shipping setting data changes between step 2 and step 4, the - # insert request will fail because the etag changes every time the shipping - # setting data changes. In this case, the user should repeat steps 2-4 with - # the new etag. - class ShippingSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Shipping service. - # @!attribute [rw] service_name - # @return [::String] - # Required. Free-form name of the service. Must be unique within target - # account. - # @!attribute [rw] active - # @return [::Boolean] - # Required. A boolean exposing the active status of the shipping service. - # @!attribute [rw] delivery_countries - # @return [::Array<::String>] - # Required. The CLDR territory code of the countries to which the service - # applies. - # @!attribute [rw] currency_code - # @return [::String] - # Required. The CLDR code of the currency to which this service applies. Must - # match that of the prices in rate groups. - # @!attribute [rw] delivery_time - # @return [::Google::Shopping::Merchant::Accounts::V1::DeliveryTime] - # Required. Time spent in various aspects from order to the delivery of the - # product. - # @!attribute [rw] rate_groups - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::RateGroup>] - # Optional. Shipping rate group definitions. Only the last one is allowed to - # have an empty `applicable_shipping_labels`, which means "everything else". - # The other `applicable_shipping_labels` must not overlap. - # @!attribute [rw] shipment_type - # @return [::Google::Shopping::Merchant::Accounts::V1::Service::ShipmentType] - # Optional. Type of locations this service ships orders to. - # @!attribute [rw] minimum_order_value - # @return [::Google::Shopping::Type::Price] - # Optional. Minimum order value for this service. If set, indicates that - # customers will have to spend at least this amount. All prices within a - # service must have the same currency. Cannot be set together with - # `minimum_order_value_table`. - # @!attribute [rw] minimum_order_value_table - # @return [::Google::Shopping::Merchant::Accounts::V1::MinimumOrderValueTable] - # Optional. Table of per store minimum order values for the pickup - # fulfillment type. Cannot be set together with `minimum_order_value`. - # @!attribute [rw] store_config - # @return [::Google::Shopping::Merchant::Accounts::V1::Service::StoreConfig] - # A list of stores your products are delivered from. - # This is only valid for the local delivery shipment type. - # @!attribute [rw] loyalty_programs - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Service::LoyaltyProgram>] - # Optional. Loyalty programs that this shipping service is limited to. - class Service - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A list of stores your products are delivered from. This is only valid for - # the local delivery shipment type. - # @!attribute [rw] store_service_type - # @return [::Google::Shopping::Merchant::Accounts::V1::Service::StoreConfig::StoreServiceType] - # Indicates whether all stores, or selected stores, listed by this - # business provide local delivery. - # @!attribute [rw] store_codes - # @return [::Array<::String>] - # Optional. A list of store codes that provide local delivery. - # If empty, then `all_stores` must be true. - # @!attribute [rw] cutoff_config - # @return [::Google::Shopping::Merchant::Accounts::V1::Service::StoreConfig::CutoffConfig] - # Configs related to local delivery ends for the day. - # @!attribute [rw] service_radius - # @return [::Google::Shopping::Merchant::Accounts::V1::Distance] - # Maximum delivery radius. - # This is only required for the local delivery shipment type. - class StoreConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configs related to local delivery ends for the day. - # @!attribute [rw] local_cutoff_time - # @return [::Google::Shopping::Merchant::Accounts::V1::Service::StoreConfig::CutoffConfig::LocalCutoffTime] - # Time that local delivery ends for the day. - # @!attribute [rw] store_close_offset_hours - # @return [::Integer] - # Only valid with local delivery fulfillment. Represents cutoff time - # as the number of hours before store closing. Mutually exclusive - # with `local_cutoff_time`. - # @!attribute [rw] no_delivery_post_cutoff - # @return [::Boolean] - # Businesses can opt-out of showing n+1 day local delivery when they have - # a shipping service configured to n day local delivery. For example, if - # the shipping service defines same-day delivery, and it's past the - # cut-off, setting this field to `true` results in the calculated - # shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the - # same example, setting this field to `false` results in the calculated - # shipping time being one day. This is only for local delivery. - class CutoffConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Time that local delivery ends for the day. - # @!attribute [rw] hour - # @return [::Integer] - # Hour local delivery orders must be placed by to process the same - # day. - # @!attribute [rw] minute - # @return [::Integer] - # Minute local delivery orders must be placed by to process the same - # day. - class LocalCutoffTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Indicates whether all stores, or selected stores, listed by the - # business provide local delivery. - module StoreServiceType - # Did not specify store service type. - STORE_SERVICE_TYPE_UNSPECIFIED = 0 - - # Indicates whether all stores, current and future, listed by this - # business provide local delivery. - ALL_STORES = 1 - - # Indicates that only the stores listed in `store_codes` are eligible - # for local delivery. - SELECTED_STORES = 2 - end - end - - # [Loyalty program](https://support.google.com/merchants/answer/12922446) - # provided by a business. - # @!attribute [rw] program_label - # @return [::String] - # This is the loyalty program label set in your loyalty program settings in - # Merchant Center. This sub-attribute allows Google to map your loyalty - # program to eligible offers. - # @!attribute [rw] loyalty_program_tiers - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Service::LoyaltyProgram::LoyaltyProgramTiers>] - # Optional. Loyalty program tier of this shipping service. - class LoyaltyProgram - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Subset of a business's loyalty program. - # @!attribute [rw] tier_label - # @return [::String] - # The tier label [tier_label] sub-attribute differentiates offer level - # benefits between each tier. This value is also set in your program - # settings in Merchant Center, and is required for data source changes - # even if your loyalty program only has 1 tier. - class LoyaltyProgramTiers - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Shipment type of shipping service. - module ShipmentType - # This service did not specify shipment type. - SHIPMENT_TYPE_UNSPECIFIED = 0 - - # This service ships orders to an address chosen by the customer. - DELIVERY = 1 - - # This service ships orders to an address chosen by the customer. - # The order is shipped from a local store near by. - LOCAL_DELIVERY = 2 - - # This service ships orders to an address chosen by the customer. - # The order is shipped from a collection point. - COLLECTION_POINT = 3 - end - end - - # Maximum delivery radius. - # This is only required for the local delivery shipment type. - # @!attribute [rw] value - # @return [::Integer] - # Integer value of distance. - # @!attribute [rw] unit - # @return [::Google::Shopping::Merchant::Accounts::V1::Distance::Unit] - # Unit can differ based on country, it is parameterized to include miles - # and kilometers. - class Distance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Unit can differ based on country, it is parameterized to include miles - # and kilometers. - module Unit - # Unit unspecified - UNIT_UNSPECIFIED = 0 - - # Unit in miles - MILES = 1 - - # Unit in kilometers - KILOMETERS = 2 - end - end - - # A fulfillment warehouse, which stores and handles inventory. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the warehouse. Must be unique within account. - # @!attribute [rw] shipping_address - # @return [::Google::Shopping::Merchant::Accounts::V1::Address] - # Required. Shipping address of the warehouse. - # @!attribute [rw] cutoff_time - # @return [::Google::Shopping::Merchant::Accounts::V1::WarehouseCutoffTime] - # Required. The latest time of day that an order can be accepted and begin - # processing. Later orders will be processed in the next day. The time is - # based on the warehouse postal code. - # @!attribute [rw] handling_days - # @return [::Integer] - # Required. The number of days it takes for this warehouse to pack up and - # ship an item. This is on the warehouse level, but can be overridden on the - # offer level based on the attributes of an item. - # @!attribute [rw] business_day_config - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessDayConfig] - # Business days of the warehouse. - # If not set, will be Monday to Friday by default. - class Warehouse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The latest time of day that an order can be accepted and begin processing. - # Later orders will be processed in the next day. The time is based on the - # warehouse postal code. - # @!attribute [rw] hour - # @return [::Integer] - # Required. Hour of the cutoff time until which an order has to be placed to - # be processed in the same day by the warehouse. Hour is based on the - # timezone of warehouse. - # @!attribute [rw] minute - # @return [::Integer] - # Required. Minute of the cutoff time until which an order has to be placed - # to be processed in the same day by the warehouse. Minute is based on the - # timezone of warehouse. - class WarehouseCutoffTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Shipping address of the warehouse. - # @!attribute [rw] street_address - # @return [::String] - # Street-level part of the address. For example: `111w 31st Street`. - # @!attribute [rw] city - # @return [::String] - # Required. City, town or commune. May also include dependent localities or - # sublocalities (For example neighborhoods or suburbs). - # @!attribute [rw] administrative_area - # @return [::String] - # Required. Top-level administrative subdivision of the country. For example, - # a state like California ("CA") or a province like Quebec ("QC"). - # @!attribute [rw] postal_code - # @return [::String] - # Required. Postal code or ZIP (For example "94043"). - # @!attribute [rw] region_code - # @return [::String] - # Required. [CLDR country - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # (For example "US"). - class Address - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Time spent in various aspects from order to the delivery of the product. - # @!attribute [rw] min_transit_days - # @return [::Integer] - # Minimum number of business days that is spent in transit. 0 means same - # day delivery, 1 means next day delivery. - # Either `min_transit_days`, `max_transit_days` or - # `transit_time_table` must be set, but not both. - # @!attribute [rw] max_transit_days - # @return [::Integer] - # Maximum number of business days that is spent in transit. 0 means same - # day delivery, 1 means next day delivery. Must be greater than or equal - # to `min_transit_days`. - # @!attribute [rw] cutoff_time - # @return [::Google::Shopping::Merchant::Accounts::V1::CutoffTime] - # Business days cutoff time definition. - # If not configured the cutoff time will be defaulted to 8AM PST. - # @!attribute [rw] min_handling_days - # @return [::Integer] - # Minimum number of business days spent before an order is shipped. - # 0 means same day shipped, 1 means next day shipped. - # 'min_handling_days' and 'max_handling_days' should be either set or not set - # at the same time. - # @!attribute [rw] max_handling_days - # @return [::Integer] - # Maximum number of business days spent before an order is shipped. - # 0 means same day shipped, 1 means next day shipped. - # Must be greater than or equal to `min_handling_days`. - # 'min_handling_days' and 'max_handling_days' should be either set or not set - # at the same time. - # @!attribute [rw] transit_time_table - # @return [::Google::Shopping::Merchant::Accounts::V1::TransitTable] - # Transit time table, number of business days spent in transit based on row - # and column dimensions. Either `min_transit_days`, `max_transit_days` or - # `transit_time_table` can be set, but not both. - # @!attribute [rw] handling_business_day_config - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessDayConfig] - # The business days during which orders can be handled. - # If not provided, Monday to Friday business days will be assumed. - # @!attribute [rw] transit_business_day_config - # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessDayConfig] - # The business days during which orders can be in-transit. - # If not provided, Monday to Friday business days will be assumed. - # @!attribute [rw] warehouse_based_delivery_times - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::WarehouseBasedDeliveryTime>] - # Optional. Indicates that the delivery time should be calculated per - # warehouse (shipping origin location) based on the settings of the selected - # carrier. When set, no other transit time related field in [delivery - # time][google.shopping.merchant.accounts.v1.DeliveryTime] should - # be set. - class DeliveryTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Business days cutoff time definition. - # @!attribute [rw] hour - # @return [::Integer] - # Required. Hour of the cutoff time until which an order has to be placed to - # be processed in the same day. - # @!attribute [rw] minute - # @return [::Integer] - # Required. Minute of the cutoff time until which an order has to be placed - # to be processed in the same day. - # @!attribute [rw] time_zone - # @return [::String] - # Required. [Timezone - # identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids) - # For example "Europe/Zurich". - class CutoffTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Business days of the warehouse. - # @!attribute [rw] business_days - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::BusinessDayConfig::Weekday>] - # Required. Regular business days. - # May not be empty. - class BusinessDayConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - module Weekday - WEEKDAY_UNSPECIFIED = 0 - - MONDAY = 1 - - TUESDAY = 2 - - WEDNESDAY = 3 - - THURSDAY = 4 - - FRIDAY = 5 - - SATURDAY = 6 - - SUNDAY = 7 - end - end - - # Indicates that the delivery time should be calculated per warehouse - # (shipping origin location) based on the settings of the selected carrier. - # When set, no other transit time related field in `delivery_time` should be - # set. - # @!attribute [rw] carrier - # @return [::String] - # Required. Carrier, such as `"UPS"` or `"Fedex"`. - # [supported - # carriers](https://support.google.com/merchants/answer/7050921#zippy=%2Ccarrier-rates-au-de-uk-and-us-only) - # @!attribute [rw] carrier_service - # @return [::String] - # Required. Carrier service, such as `"ground"` or `"2 days"`. The name of - # the service must be in the eddSupportedServices list. - # @!attribute [rw] warehouse - # @return [::String] - # Required. Warehouse name. This should match - # {::Google::Shopping::Merchant::Accounts::V1::Warehouse warehouse}. - class WarehouseBasedDeliveryTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Shipping rate group definitions. Only the last one is allowed to have an - # empty `applicable_shipping_labels`, which means - # "everything else". The other `applicable_shipping_labels` must - # not overlap. - # @!attribute [rw] applicable_shipping_labels - # @return [::Array<::String>] - # Required. A list of [shipping - # labels](https://support.google.com/merchants/answer/6324504) defining the - # products to which this rate group applies to. This is a disjunction: only - # one of the labels has to match for the rate group to apply. May only be - # empty for the last rate group of a service. - # @!attribute [rw] single_value - # @return [::Google::Shopping::Merchant::Accounts::V1::Value] - # The value of the rate group (For example flat rate $10). Can only be set - # if `main_table` and `subtables` are not set. - # @!attribute [rw] main_table - # @return [::Google::Shopping::Merchant::Accounts::V1::Table] - # A table defining the rate group, when `single_value` is not - # expressive enough. Can only be set if `single_value` is not - # set. - # @!attribute [rw] subtables - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Table>] - # Optional. A list of subtables referred to by `main_table`. Can only - # be set if `main_table` is set. - # @!attribute [rw] carrier_rates - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::CarrierRate>] - # Optional. A list of carrier rates that can be referred to by - # `main_table` or `single_value`. - # @!attribute [rw] name - # @return [::String] - # Optional. Name of the rate group. - # If set has to be unique within shipping service. - class RateGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A table defining the rate group, when `single_value` is not - # expressive enough. - # @!attribute [rw] name - # @return [::String] - # Name of the table. Required for subtables, ignored for the main table. - # @!attribute [rw] row_headers - # @return [::Google::Shopping::Merchant::Accounts::V1::Headers] - # Required. Headers of the table's rows. - # @!attribute [rw] column_headers - # @return [::Google::Shopping::Merchant::Accounts::V1::Headers] - # Headers of the table's columns. Optional: if not set then the table has - # only one dimension. - # @!attribute [rw] rows - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Row>] - # Required. The list of rows that constitute the table. Must have the same - # length as `row_headers`. - class Table - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Transit time table, number of business days spent in transit based on row - # and column dimensions. Either `min_transit_days`, `max_transit_days` or - # `transit_time_table` can be set, but not both. - # @!attribute [rw] postal_code_group_names - # @return [::Array<::String>] - # Required. A list of region names - # {::Google::Shopping::Merchant::Accounts::V1::Region#name Region.name} . The last - # value can be - # `"all other locations"`. Example: - # `["zone 1", "zone 2", "all other locations"]`. The referred - # postal code groups must match the delivery country of the service. - # @!attribute [rw] transit_time_labels - # @return [::Array<::String>] - # Required. A list of transit time labels. The last value can be - # `"all other labels"`. Example: - # `["food", "electronics", "all other labels"]`. - # @!attribute [rw] rows - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::TransitTable::TransitTimeRow>] - # Required. If there's only one dimension set of `postal_code_group_names` or - # `transit_time_labels`, there are multiple rows each with one value - # for that dimension. If there are two dimensions, each row corresponds to a - # `postal_code_group_names`, and columns (values) to a - # `transit_time_labels`. - class TransitTable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # If there's only one dimension set of `postal_code_group_names` or - # `transit_time_labels`, there are multiple rows each with one value - # for that dimension. If there are two dimensions, each row corresponds to a - # `postal_code_group_names`, and columns (values) to a - # `transit_time_labels`. - # @!attribute [rw] values - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::TransitTable::TransitTimeRow::TransitTimeValue>] - # Required. Transit time range (min-max) in business days. - class TransitTimeRow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Transit time range (min-max) in business days. - # @!attribute [rw] min_transit_days - # @return [::Integer] - # Minimum transit time range in business days. 0 means same - # day delivery, 1 means next day delivery. - # @!attribute [rw] max_transit_days - # @return [::Integer] - # Must be greater than or equal to `min_transit_days`. - class TransitTimeValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Table of per store minimum order values for the pickup fulfillment type. - # @!attribute [rw] store_code_set_with_movs - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::MinimumOrderValueTable::StoreCodeSetWithMov>] - # Required. A list of store code sets sharing the same minimum order value - # (MOV). At least two sets are required and the last one must be empty, which - # signifies 'MOV for all other stores'. Each store code can only appear once - # across all the sets. All prices within a service must have the same - # currency. - class MinimumOrderValueTable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A list of store code sets sharing the same minimum order value. At least - # two sets are required and the last one must be empty, which signifies - # 'MOV for all other stores'. - # Each store code can only appear once across all the sets. - # All prices within a service must have the same currency. - # @!attribute [rw] store_codes - # @return [::Array<::String>] - # Optional. A list of unique store codes or empty for the catch all. - # @!attribute [rw] value - # @return [::Google::Shopping::Type::Price] - # The minimum order value for the given stores. - class StoreCodeSetWithMov - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A non-empty list of row or column headers for a table. - # Exactly one of `prices`, `weights`, - # `num_items`, `postal_code_group_names`, or - # `location` must be set. - # @!attribute [rw] prices - # @return [::Array<::Google::Shopping::Type::Price>] - # Required. A list of inclusive order price upper bounds. The last price's - # value can be infinity by setting price amount_micros = -1. For example - # `[{"amount_micros": 10000000, "currency_code": "USD"}, - # \\{"amount_micros": 500000000, "currency_code": "USD"}, - # \\{"amount_micros": -1, "currency_code": "USD"}]` represents the headers - # "<= $10", "<= $500", and "> $500". All prices within a service must have - # the same currency. Must be non-empty. Must be positive except -1. Can only - # be set if all other fields are not set. - # @!attribute [rw] weights - # @return [::Array<::Google::Shopping::Type::Weight>] - # Required. A list of inclusive order weight upper bounds. The last weight's - # value can be infinity by setting price amount_micros = -1. For example - # `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, - # "unit": "kg"}, - # \\{"amount_micros": -1, "unit": "kg"}]` represents the headers - # "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have - # the same unit. Must be non-empty. Must be positive except -1. Can only be - # set if all other fields are not set. - # @!attribute [rw] number_of_items - # @return [::Array<::String>] - # Required. A list of inclusive number of items upper bounds. The last value - # can be - # `"infinity"`. For example - # `["10", "50", "infinity"]` represents the headers - # "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can - # only be set if all other fields are not set. - # @!attribute [rw] postal_code_group_names - # @return [::Array<::String>] - # Required. A list of postal group names. The last value can be - # `"all other locations"`. Example: - # `["zone 1", "zone 2", "all other locations"]`. The referred - # postal code groups must match the delivery country of the service. Must - # be non-empty. Can only be set if all other fields are not set. - # @!attribute [rw] locations - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::LocationIdSet>] - # Required. A list of location ID sets. Must be non-empty. Can only be set if - # all other fields are not set. - class Headers - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of location ID sets. Must be non-empty. Can only be set if all - # other fields are not set. - # @!attribute [rw] location_ids - # @return [::Array<::String>] - # Required. A non-empty list of - # [location - # IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). - # They must all be of the same location type (For - # example, state). - class LocationIdSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Include a list of cells. - # @!attribute [rw] cells - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Value>] - # Required. The list of cells that constitute the row. Must have the same - # length as `columnHeaders` for two-dimensional tables, a length of 1 for - # one-dimensional tables. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The single value of a rate group or the value of a rate group table's cell. - # Exactly one of `no_shipping`, `flat_rate`, - # `price_percentage`, `carrier_rateName`, - # `subtable_name` must be set. - # @!attribute [rw] no_shipping - # @return [::Boolean] - # If true, then the product can't be shipped. Must be true when set, can only - # be set if all other fields are not set. - # @!attribute [rw] flat_rate - # @return [::Google::Shopping::Type::Price] - # A flat rate. Can only be set if all other fields are not set. - # @!attribute [rw] price_percentage - # @return [::String] - # A percentage of the price represented as a number in decimal notation - # (For example, `"5.4"`). Can only be set if all other fields are not - # set. - # @!attribute [rw] carrier_rate - # @return [::String] - # The name of a carrier rate referring to a carrier rate defined in the - # same rate group. Can only be set if all other fields are not set. - # @!attribute [rw] subtable - # @return [::String] - # The name of a subtable. Can only be set in table cells (For example, not - # for single values), and only if all other fields are not set. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of carrier rates that can be referred to by - # `main_table` or `single_value`. - # Supported carrier services are defined in - # https://support.google.com/merchants/answer/12577710?ref_topic=12570808&sjid=10662598224319463032-NC#zippy=%2Cdelivery-cost-rate-type%2Ccarrier-rate-au-de-uk-and-us-only. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the carrier rate. Must be unique per rate group. - # @!attribute [rw] carrier - # @return [::String] - # Required. Carrier service, such as `"UPS"` or `"Fedex"`. - # @!attribute [rw] carrier_service - # @return [::String] - # Required. Carrier service, such as `"ground"` or `"2 days"`. - # @!attribute [rw] origin_postal_code - # @return [::String] - # Required. Shipping origin for this carrier rate. - # @!attribute [rw] percentage_adjustment - # @return [::String] - # Optional. Multiplicative shipping rate modifier as a number in decimal - # notation. Can be negative. For example `"5.4"` increases the rate by 5.4%, - # `"-3"` decreases the rate by 3%. - # @!attribute [rw] flat_adjustment - # @return [::Google::Shopping::Type::Price] - # Optional. Additive shipping rate modifier. Can be negative. For example - # `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate, - # `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the - # rate. - class CarrierRate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetShippingSetting` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the shipping setting to retrieve. - # Format: `accounts/{account}/shippingsettings` - class GetShippingSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertShippingSetting` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account for which this shipping setting will be inserted. If - # you are using an advanced account, you must specify the unique identifier - # of the sub-account for which you want to insert the shipping setting. - # Format: `accounts/{ACCOUNT_ID}` - # @!attribute [rw] shipping_setting - # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] - # Required. The new version of the account. - class InsertShippingSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservice.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservice.rb deleted file mode 100644 index d07a41cee44c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservice.rb +++ /dev/null @@ -1,118 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # The `TermsOfService` message represents a specific version of the terms of - # service that merchants must accept to access certain features or services. - # For more information, see [Terms of - # Service](https://support.google.com/merchants/answer/160173). - # - # This message is important for the onboarding process, ensuring that merchants - # agree to the necessary legal agreements for using the service. Merchants can - # retrieve the latest terms of service for a given `kind` and `region` through - # `RetrieveLatestTermsOfService`, and accept them as required through - # `AcceptTermsOfService`. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @!attribute [rw] region_code - # @return [::String] - # Region code as defined by [CLDR](https://cldr.unicode.org/). This is either - # a country where the ToS applies specifically to that country or `001` when - # the same `TermsOfService` can be signed in any country. However note that - # when signing a ToS that applies globally we still expect that a specific - # country is provided (this should be merchant business country or program - # country of participation). - # @!attribute [rw] kind - # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceKind] - # The Kind this terms of service version applies to. - # @!attribute [rw] file_uri - # @return [::String] - # URI for terms of service file that needs to be displayed to signing users. - # @!attribute [rw] external - # @return [::Boolean] - # Whether this terms of service version is external. External terms of - # service versions can only be agreed through external processes and not - # directly by the merchant through UI or API. - class TermsOfService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetTermsOfService` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - class GetTermsOfServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `RetrieveLatestTermsOfService` method. - # @!attribute [rw] region_code - # @return [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # @!attribute [rw] kind - # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceKind] - # Required. The Kind this terms of service version applies to. - class RetrieveLatestTermsOfServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `AcceptTermsOfService` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @!attribute [rw] account - # @return [::String] - # Required. The account for which to accept the ToS. - # Format: `accounts/{account}` - # @!attribute [rw] region_code - # @return [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - class AcceptTermsOfServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `AcceptTermsOfService` method. - # @!attribute [rw] terms_of_service_agreement_state - # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] - # The agreement state after accepting the ToS. - class AcceptTermsOfServiceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofserviceagreementstate.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofserviceagreementstate.rb deleted file mode 100644 index 1f4550761503..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofserviceagreementstate.rb +++ /dev/null @@ -1,136 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # This resource represents the agreement state for a given account and terms of - # service kind. - # The state is as follows: - # - # * If the business has accepted a terms of service, - # {::Google::Shopping::Merchant::Accounts::V1::Accepted `accepted`} - # will be populated, otherwise it will be empty - # * If the business must sign a terms of service, - # {::Google::Shopping::Merchant::Accounts::V1::Required `required`} - # will be populated, otherwise it will be empty. - # - # Note that both `required` and `accepted` can be present. In this case the - # `accepted` terms of services will have an expiration date set in the - # {::Google::Shopping::Merchant::Accounts::V1::Accepted#valid_until `valid_until`} - # field. The `required` terms of services need to be accepted before - # `valid_until` in order for the account to continue having a valid agreement. - # When accepting new terms of services we expect third-party providers to - # display the text associated with the given terms of service agreement (the - # url to the file containing the text is added in the Required message below as - # {::Google::Shopping::Merchant::Accounts::V1::Required#tos_file_uri `tos_file_uri`}). - # The actual acceptance of the terms of service is done by calling accept on - # the - # {::Google::Shopping::Merchant::Accounts::V1::Accepted#terms_of_service `TermsOfService`} - # resource. - # `valid_until` field. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the terms of service version. - # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` - # The identifier format is: - # `{[TermsOfServiceKind][google.shopping.merchant.accounts.v1.TermsOfServiceKind]}-{country}` - # For example, an identifier could be: `MERCHANT_CENTER-EU` or - # `MERCHANT_CENTER-US`. - # @!attribute [rw] region_code - # @return [::String] - # Required. Region code as defined by https://cldr.unicode.org/. This is the - # country the current state applies to. - # @!attribute [rw] terms_of_service_kind - # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceKind] - # Required. Terms of Service kind associated with the particular version. - # @!attribute [rw] accepted - # @return [::Google::Shopping::Merchant::Accounts::V1::Accepted] - # Optional. The accepted terms of service of this kind and for the associated - # region_code - # @!attribute [rw] required - # @return [::Google::Shopping::Merchant::Accounts::V1::Required] - # Optional. The required terms of service - class TermsOfServiceAgreementState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the [accepted terms of - # service](https://developers.google.com/merchant/api/guides/accounts/create-and-configure#accept_the_merchant_center_terms_of_service). - # @!attribute [rw] terms_of_service - # @return [::String] - # Required. The accepted - # {::Google::Shopping::Merchant::Accounts::V1::TermsOfService termsOfService}. - # @!attribute [rw] accepted_by - # @return [::String] - # Required. The account where the acceptance was recorded. This can be the - # account itself or, in the case of subaccounts, the advanced account. - # @!attribute [rw] valid_until - # @return [::Google::Type::Date] - # Optional. When set, it states that the accepted `TermsOfService` is only - # valid until the end of this date (in UTC). A new one must be accepted - # before then. The information of the required `TermsOfService` is found in - # the `Required` message. - class Accepted - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the terms of service which are required to be accepted. - # @!attribute [rw] terms_of_service - # @return [::String] - # Required. The `TermsOfService` that need to be accepted. - # @!attribute [rw] tos_file_uri - # @return [::String] - # Required. Full URL to the terms of service file. This field is the same as - # `TermsOfService.file_uri`, it is added here for convenience only. - class Required - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetTermsOfServiceAgreementState` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the terms of service version. - # Format: `accounts/{account}/termsOfServiceAgreementStates/{identifier}` - # The identifier format is: `{TermsOfServiceKind}-{country}` - class GetTermsOfServiceAgreementStateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `RetrieveForApplicationTermsOfServiceAgreementState` - # method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account for which to get a TermsOfServiceAgreementState - # Format: `accounts/{account}` - class RetrieveForApplicationTermsOfServiceAgreementStateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservicekind.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservicekind.rb deleted file mode 100644 index e00fa7f79ae1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservicekind.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # The TermsOfService Kind. - module TermsOfServiceKind - # Default value. This value is unused. - TERMS_OF_SERVICE_KIND_UNSPECIFIED = 0 - - # Terms of service for the Merchant Center application. - MERCHANT_CENTER = 1 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/user.rb deleted file mode 100644 index c2a256030cd2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/user.rb +++ /dev/null @@ -1,176 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # The `User` resource represents a user associated with a Merchant Center - # account. It is used to manage user permissions and access rights within the - # account. For more information, see [Frequently asked questions about people - # and access levels](//support.google.com/merchants/answer/12160472). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the user. - # Format: `accounts/{account}/user/{email}` - # - # Use `me` to refer to your own email address, for example - # `accounts/{account}/users/me`. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1::User::State] - # Output only. The state of the user. - # @!attribute [rw] access_rights - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccessRight>] - # Required. The [access - # rights](https://support.google.com/merchants/answer/12160472?sjid=6789834943175119429-EU#accesstypes) - # the user has. - class User - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state represents the possible statuses of a user. It is an output-only - # field that is set to `PENDING` when a user is invited to an account and - # changes to `VERIFIED` once the user accepts the invitation. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The user is pending confirmation. In this state, the user first needs to - # accept the invitation before performing other actions. - PENDING = 1 - - # The user is verified. - VERIFIED = 2 - end - end - - # Request message for the `GetUser` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the user to retrieve. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to retrieve the user corresponding to the caller by - # using `me` rather than an email address as in - # `accounts/{account}/users/me`. - class GetUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateUser` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the account for which a user will be - # created. Format: `accounts/{account}` - # @!attribute [rw] user_id - # @return [::String] - # Required. The email address of the user (for example, - # `john.doe@gmail.com`). - # @!attribute [rw] user - # @return [::Google::Shopping::Merchant::Accounts::V1::User] - # Optional. The user to create. - class CreateUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteUser` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the user to delete. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to delete the user corresponding to the caller by using - # `me` rather than an email address as in `accounts/{account}/users/me`. - class DeleteUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateUser` method. - # @!attribute [rw] user - # @return [::Google::Shopping::Merchant::Accounts::V1::User] - # Required. The new version of the user. - # - # Use `me` to refer to your own email address, for example - # `accounts/{account}/users/me`. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `access_rights` - class UpdateUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListUsers` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of users. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of users to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListUsers` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListUsers` must match - # the call that provided the page token. - class ListUsersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListUsers` method. - # @!attribute [rw] users - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::User>] - # The users from the specified account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListUsersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `VerifySelf` method. - # @!attribute [rw] account - # @return [::String] - # Required. The name of the account under which the caller is a user. - # Format: `accounts/{account}` - class VerifySelfRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/verificationmailsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/verificationmailsettings.rb deleted file mode 100644 index 7c19a0ca8f38..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/verificationmailsettings.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1 - # Settings related to the verification email that is sent after adding a user. - # @!attribute [rw] verification_mail_mode - # @return [::Google::Shopping::Merchant::Accounts::V1::VerificationMailSettings::VerificationMailMode] - # Optional. Mode of the verification mail. If not set, the default is - # `SEND_VERIFICATION_MAIL`. - class VerificationMailSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The different configuration options for sending a verification email - # when adding a user. - module VerificationMailMode - # Default first member of every enum. Do not use. - VERIFICATION_MAIL_MODE_UNSPECIFIED = 0 - - # An invitation email is sent to the user added shortly after. - SEND_VERIFICATION_MAIL = 1 - - # No invitation email is sent. This can be useful if the user is - # expected to accept the invitation through the API without needing - # another notification. - SUPPRESS_VERIFICATION_MAIL = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/type/types.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! - - -module Google - module Shopping - module Type - # The weight represented as the value in string and the unit. - # @!attribute [rw] amount_micros - # @return [::Integer] - # Required. The weight represented as a number in micros (1 million micros is - # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 - # micros). - # This field can also be set as infinity by setting to -1. - # This field only support -1 and positive value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Type::Weight::WeightUnit] - # Required. The weight unit. - # Acceptable values are: kg and lb - class Weight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The weight unit. - module WeightUnit - # unit unspecified - WEIGHT_UNIT_UNSPECIFIED = 0 - - # lb unit. - POUND = 1 - - # kg unit. - KILOGRAM = 2 - end - end - - # The price represented as a number and currency. - # @!attribute [rw] amount_micros - # @return [::Integer] - # The price represented as a number in micros (1 million micros is an - # equivalent to one's currency standard unit, for example, 1 USD = 1000000 - # micros). - # @!attribute [rw] currency_code - # @return [::String] - # The currency of the price using three-letter acronyms according to [ISO - # 4217](http://en.wikipedia.org/wiki/ISO_4217). - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents custom attributes. Exactly one of `value` or - # `group_values` must not be empty. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute. - # @!attribute [rw] value - # @return [::String] - # The value of the attribute. If `value` is not empty, `group_values` must be - # empty. - # @!attribute [rw] group_values - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Subattributes within this attribute group. If - # `group_values` is not empty, `value` must be empty. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations available for a product. - # - # Destinations are used in Merchant Center to allow you to control where the - # products from your data feed should be displayed. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Destination values. - module DestinationEnum - # Not specified. - DESTINATION_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/google-ads/answer/2454022). - SHOPPING_ADS = 1 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 2 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3057972). - LOCAL_INVENTORY_ADS = 3 - - # [Free listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 4 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 5 - - # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). - YOUTUBE_SHOPPING = 6 - - # Youtube shopping checkout. - YOUTUBE_SHOPPING_CHECKOUT = 7 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 8 - - # [Free vehicle - # listings](https://support.google.com/merchants/answer/11189169). - FREE_VEHICLE_LISTINGS = 9 - - # [Vehicle ads](https://support.google.com/merchants/answer/11189169). - VEHICLE_ADS = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - end - end - - # Reporting contexts that your account and product issues apply to. - # - # Reporting contexts are groups of surfaces and formats for product results on - # Google. They can represent the entire destination (for example, [Shopping - # ads](https://support.google.com/merchants/answer/6149970)) or a subset of - # formats within a destination (for example, [Demand Gen - # ads](https://support.google.com/merchants/answer/13389785)). - class ReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reporting context values. - module ReportingContextEnum - # Not specified. - REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/merchants/answer/6149970). - SHOPPING_ADS = 1 - - # Deprecated: Use `DEMAND_GEN_ADS` instead. - # [Discovery and Demand Gen - # ads](https://support.google.com/merchants/answer/13389785). - DISCOVERY_ADS = 2 - - # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS = 13 - - # [Demand Gen ads on Discover - # surface](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 - - # [Video ads](https://support.google.com/google-ads/answer/6340491). - VIDEO_ADS = 3 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 4 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3271956). - LOCAL_INVENTORY_ADS = 5 - - # [Vehicle inventory - # ads](https://support.google.com/merchants/answer/11544533). - VEHICLE_INVENTORY_ADS = 6 - - # [Free product - # listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 7 - - # [Free product listings on UCP - # checkout](https://developers.google.com/merchant/ucp). - FREE_LISTINGS_UCP_CHECKOUT = 19 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 8 - - # [Free local vehicle - # listings](https://support.google.com/merchants/answer/11544533). - FREE_LOCAL_VEHICLE_LISTINGS = 9 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 18 - - # [YouTube - # Shopping](https://support.google.com/merchants/answer/13478370). - YOUTUBE_SHOPPING = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - - # [Product - # Reviews](https://support.google.com/merchants/answer/14620732). - PRODUCT_REVIEWS = 15 - - # [Merchant - # Reviews](https://developers.google.com/merchant-review-feeds). - MERCHANT_REVIEWS = 16 - - # YouTube Checkout - # . - YOUTUBE_CHECKOUT = 17 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/date.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/date.rb deleted file mode 100644 index 1d0a9780457f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/date.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a whole or partial calendar date, such as a birthday. The time of - # day and time zone are either specified elsewhere or are insignificant. The - # date is relative to the Gregorian Calendar. This can represent one of the - # following: - # - # * A full date, with non-zero year, month, and day values - # * A month and day value, with a zero year, such as an anniversary - # * A year on its own, with zero month and day values - # * A year and month value, with a zero day, such as a credit card expiration - # date - # - # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and - # `google.protobuf.Timestamp`. - # @!attribute [rw] year - # @return [::Integer] - # Year of the date. Must be from 1 to 9999, or 0 to specify a date without - # a year. - # @!attribute [rw] month - # @return [::Integer] - # Month of a year. Must be from 1 to 12, or 0 to specify a year without a - # month and day. - # @!attribute [rw] day - # @return [::Integer] - # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 - # to specify a year by itself or a year and month where the day isn't - # significant. - class Date - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/datetime.rb deleted file mode 100644 index d15ba7af54e4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/latlng.rb deleted file mode 100644 index c15e78a39a56..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/proto_docs/google/type/phone_number.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/phone_number.rb deleted file mode 100644 index 41b7c4af138c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/phone_number.rb +++ /dev/null @@ -1,116 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 representing a phone number, suitable as an API wire format. - # - # This representation: - # - # - should not be used for locale-specific formatting of a phone number, such - # as "+1 (650) 253-0000 ext. 123" - # - # - is not designed for efficient storage - # - may not be suitable for dialing - specialized libraries (see references) - # should be used to parse the number for that purpose - # - # To do something meaningful with this number, such as format it for various - # use-cases, convert it to an `i18n.phonenumbers.PhoneNumber` object first. - # - # For instance, in Java this would be: - # - # com.google.type.PhoneNumber wireProto = - # com.google.type.PhoneNumber.newBuilder().build(); - # com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber = - # PhoneNumberUtil.getInstance().parse(wireProto.getE164Number(), "ZZ"); - # if (!wireProto.getExtension().isEmpty()) { - # phoneNumber.setExtension(wireProto.getExtension()); - # } - # - # Reference(s): - # - https://github.com/google/libphonenumber - # @!attribute [rw] e164_number - # @return [::String] - # The phone number, represented as a leading plus sign ('+'), followed by a - # phone number that uses a relaxed ITU E.164 format consisting of the - # country calling code (1 to 3 digits) and the subscriber number, with no - # additional spaces or formatting, e.g.: - # - correct: "+15552220123" - # - incorrect: "+1 (555) 222-01234 x123". - # - # The ITU E.164 format limits the latter to 12 digits, but in practice not - # all countries respect that, so we relax that restriction here. - # National-only numbers are not allowed. - # - # References: - # - https://www.itu.int/rec/T-REC-E.164-201011-I - # - https://en.wikipedia.org/wiki/E.164. - # - https://en.wikipedia.org/wiki/List_of_country_calling_codes - # - # Note: The following fields are mutually exclusive: `e164_number`, `short_code`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] short_code - # @return [::Google::Type::PhoneNumber::ShortCode] - # A short code. - # - # Reference(s): - # - https://en.wikipedia.org/wiki/Short_code - # - # Note: The following fields are mutually exclusive: `short_code`, `e164_number`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] extension - # @return [::String] - # The phone number's extension. The extension is not standardized in ITU - # recommendations, except for being defined as a series of numbers with a - # maximum length of 40 digits. Other than digits, some other dialing - # characters such as ',' (indicating a wait) or '#' may be stored here. - # - # Note that no regions currently use extensions with short codes, so this - # field is normally only set in conjunction with an E.164 number. It is held - # separately from the E.164 number to allow for short code extensions in the - # future. - class PhoneNumber - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An object representing a short code, which is a phone number that is - # typically much shorter than regular phone numbers and can be used to - # address messages in MMS and SMS systems, as well as for abbreviated dialing - # (e.g. "Text 611 to see how many minutes you have remaining on your plan."). - # - # Short codes are restricted to a region and are not internationally - # dialable, which means the same short code can exist in different regions, - # with different usage and pricing, even if those regions share the same - # country calling code (e.g. US and CA). - # @!attribute [rw] region_code - # @return [::String] - # Required. The BCP-47 region code of the location where calls to this - # short code can be made, such as "US" and "BB". - # - # Reference(s): - # - http://www.unicode.org/reports/tr35/#unicode_region_subtag - # @!attribute [rw] number - # @return [::String] - # Required. The short code digits, without a leading plus ('+') or country - # calling code, e.g. "611". - class ShortCode - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/postal_address.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/proto_docs/google/type/postal_address.rb deleted file mode 100644 index 9cd0c16495dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/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-shopping-merchant-accounts-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/Gemfile deleted file mode 100644 index 9dc0e8edd5b7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1", path: "../" -else - gem "google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1/snippets/account_issue_service/list_account_issues.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_issue_service/list_account_issues.rb deleted file mode 100644 index e5b36a281fa8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_issue_service/list_account_issues.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 merchantapi_v1_generated_AccountIssueService_ListAccountIssues_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the list_account_issues call in the AccountIssueService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client#list_account_issues. -# -def list_account_issues - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new - - # Call the list_account_issues method. - result = client.list_account_issues request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountIssue. - p item - end -end -# [END merchantapi_v1_generated_AccountIssueService_ListAccountIssues_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/get_account_relationship.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/get_account_relationship.rb deleted file mode 100644 index 553b02096e33..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/get_account_relationship.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_AccountRelationshipsService_GetAccountRelationship_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_account_relationship call in the AccountRelationshipsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#get_account_relationship. -# -def get_account_relationship - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new - - # Call the get_account_relationship method. - result = client.get_account_relationship request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. - p result -end -# [END merchantapi_v1_generated_AccountRelationshipsService_GetAccountRelationship_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/list_account_relationships.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/list_account_relationships.rb deleted file mode 100644 index ba6ade6cc82d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/list_account_relationships.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 merchantapi_v1_generated_AccountRelationshipsService_ListAccountRelationships_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the list_account_relationships call in the AccountRelationshipsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#list_account_relationships. -# -def list_account_relationships - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.new - - # Call the list_account_relationships method. - result = client.list_account_relationships request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship. - p item - end -end -# [END merchantapi_v1_generated_AccountRelationshipsService_ListAccountRelationships_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/update_account_relationship.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/update_account_relationship.rb deleted file mode 100644 index bd293a5ec954..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/update_account_relationship.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_AccountRelationshipsService_UpdateAccountRelationship_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the update_account_relationship call in the AccountRelationshipsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#update_account_relationship. -# -def update_account_relationship - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new - - # Call the update_account_relationship method. - result = client.update_account_relationship request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. - p result -end -# [END merchantapi_v1_generated_AccountRelationshipsService_UpdateAccountRelationship_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/approve_account_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/approve_account_service.rb deleted file mode 100644 index 15bb0a60e7fb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/approve_account_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_AccountServicesService_ApproveAccountService_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the approve_account_service call in the AccountServicesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#approve_account_service. -# -def approve_account_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new - - # Call the approve_account_service method. - result = client.approve_account_service request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. - p result -end -# [END merchantapi_v1_generated_AccountServicesService_ApproveAccountService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/get_account_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/get_account_service.rb deleted file mode 100644 index efde548c8d3a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/get_account_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_AccountServicesService_GetAccountService_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_account_service call in the AccountServicesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#get_account_service. -# -def get_account_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new - - # Call the get_account_service method. - result = client.get_account_service request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. - p result -end -# [END merchantapi_v1_generated_AccountServicesService_GetAccountService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/list_account_services.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/list_account_services.rb deleted file mode 100644 index 7f3bc9400305..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/list_account_services.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 merchantapi_v1_generated_AccountServicesService_ListAccountServices_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the list_account_services call in the AccountServicesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#list_account_services. -# -def list_account_services - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.new - - # Call the list_account_services method. - result = client.list_account_services request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::AccountService. - p item - end -end -# [END merchantapi_v1_generated_AccountServicesService_ListAccountServices_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/propose_account_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/propose_account_service.rb deleted file mode 100644 index c8817e7bf93f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/propose_account_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_AccountServicesService_ProposeAccountService_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the propose_account_service call in the AccountServicesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#propose_account_service. -# -def propose_account_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new - - # Call the propose_account_service method. - result = client.propose_account_service request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. - p result -end -# [END merchantapi_v1_generated_AccountServicesService_ProposeAccountService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/reject_account_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/reject_account_service.rb deleted file mode 100644 index 336b00dc83a0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/account_services_service/reject_account_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_AccountServicesService_RejectAccountService_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the reject_account_service call in the AccountServicesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#reject_account_service. -# -def reject_account_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new - - # Call the reject_account_service method. - result = client.reject_account_service request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_AccountServicesService_RejectAccountService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_and_configure_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_and_configure_account.rb deleted file mode 100644 index 015810cb732a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_and_configure_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_AccountsService_CreateAndConfigureAccount_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the create_and_configure_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#create_and_configure_account. -# -def create_and_configure_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new - - # Call the create_and_configure_account method. - result = client.create_and_configure_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. - p result -end -# [END merchantapi_v1_generated_AccountsService_CreateAndConfigureAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_test_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_test_account.rb deleted file mode 100644 index 2e2bebb12c1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_test_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_AccountsService_CreateTestAccount_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the create_test_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#create_test_account. -# -def create_test_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest.new - - # Call the create_test_account method. - result = client.create_test_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. - p result -end -# [END merchantapi_v1_generated_AccountsService_CreateTestAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/delete_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/delete_account.rb deleted file mode 100644 index ea4c1cfb2331..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/delete_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_AccountsService_DeleteAccount_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the delete_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#delete_account. -# -def delete_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new - - # Call the delete_account method. - result = client.delete_account request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_AccountsService_DeleteAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/get_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/get_account.rb deleted file mode 100644 index 48a9b68de530..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/get_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_AccountsService_GetAccount_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#get_account. -# -def get_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new - - # Call the get_account method. - result = client.get_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. - p result -end -# [END merchantapi_v1_generated_AccountsService_GetAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_accounts.rb deleted file mode 100644 index d7b9b4aa7e6d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_accounts.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 merchantapi_v1_generated_AccountsService_ListAccounts_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the list_accounts call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_accounts. -# -def list_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new - - # Call the list_accounts method. - result = client.list_accounts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Account. - p item - end -end -# [END merchantapi_v1_generated_AccountsService_ListAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_sub_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_sub_accounts.rb deleted file mode 100644 index 48d5feea370c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_sub_accounts.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 merchantapi_v1_generated_AccountsService_ListSubAccounts_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the list_sub_accounts call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_sub_accounts. -# -def list_sub_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new - - # Call the list_sub_accounts method. - result = client.list_sub_accounts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Account. - p item - end -end -# [END merchantapi_v1_generated_AccountsService_ListSubAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/update_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/update_account.rb deleted file mode 100644 index 2f82e5dc2fcb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/accounts_service/update_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_AccountsService_UpdateAccount_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the update_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#update_account. -# -def update_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new - - # Call the update_account method. - result = client.update_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. - p result -end -# [END merchantapi_v1_generated_AccountsService_UpdateAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/get_autofeed_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/get_autofeed_settings.rb deleted file mode 100644 index 63c77b09af59..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/get_autofeed_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_AutofeedSettingsService_GetAutofeedSettings_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_autofeed_settings call in the AutofeedSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#get_autofeed_settings. -# -def get_autofeed_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new - - # Call the get_autofeed_settings method. - result = client.get_autofeed_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. - p result -end -# [END merchantapi_v1_generated_AutofeedSettingsService_GetAutofeedSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/update_autofeed_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/update_autofeed_settings.rb deleted file mode 100644 index a9e87bf5c182..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/update_autofeed_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the update_autofeed_settings call in the AutofeedSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#update_autofeed_settings. -# -def update_autofeed_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new - - # Call the update_autofeed_settings method. - result = client.update_autofeed_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. - p result -end -# [END merchantapi_v1_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/get_automatic_improvements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/get_automatic_improvements.rb deleted file mode 100644 index 49e950ba9557..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/get_automatic_improvements.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_automatic_improvements call in the AutomaticImprovementsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#get_automatic_improvements. -# -def get_automatic_improvements - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new - - # Call the get_automatic_improvements method. - result = client.get_automatic_improvements request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. - p result -end -# [END merchantapi_v1_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/update_automatic_improvements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/update_automatic_improvements.rb deleted file mode 100644 index 19aa2b6818e9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/update_automatic_improvements.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the update_automatic_improvements call in the AutomaticImprovementsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#update_automatic_improvements. -# -def update_automatic_improvements - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new - - # Call the update_automatic_improvements method. - result = client.update_automatic_improvements request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. - p result -end -# [END merchantapi_v1_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_identity_service/get_business_identity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_identity_service/get_business_identity.rb deleted file mode 100644 index a44263807bcd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_identity_service/get_business_identity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_BusinessIdentityService_GetBusinessIdentity_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_business_identity call in the BusinessIdentityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#get_business_identity. -# -def get_business_identity - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new - - # Call the get_business_identity method. - result = client.get_business_identity request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. - p result -end -# [END merchantapi_v1_generated_BusinessIdentityService_GetBusinessIdentity_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_identity_service/update_business_identity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_identity_service/update_business_identity.rb deleted file mode 100644 index de6373fb24c6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_identity_service/update_business_identity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_BusinessIdentityService_UpdateBusinessIdentity_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the update_business_identity call in the BusinessIdentityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#update_business_identity. -# -def update_business_identity - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new - - # Call the update_business_identity method. - result = client.update_business_identity request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. - p result -end -# [END merchantapi_v1_generated_BusinessIdentityService_UpdateBusinessIdentity_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_info_service/get_business_info.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_info_service/get_business_info.rb deleted file mode 100644 index 7b5dcdbb2be9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_info_service/get_business_info.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_BusinessInfoService_GetBusinessInfo_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_business_info call in the BusinessInfoService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#get_business_info. -# -def get_business_info - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new - - # Call the get_business_info method. - result = client.get_business_info request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. - p result -end -# [END merchantapi_v1_generated_BusinessInfoService_GetBusinessInfo_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_info_service/update_business_info.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_info_service/update_business_info.rb deleted file mode 100644 index 63809bf76f3c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/business_info_service/update_business_info.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_BusinessInfoService_UpdateBusinessInfo_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the update_business_info call in the BusinessInfoService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#update_business_info. -# -def update_business_info - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new - - # Call the update_business_info method. - result = client.update_business_info request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. - p result -end -# [END merchantapi_v1_generated_BusinessInfoService_UpdateBusinessInfo_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/create_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/create_checkout_settings.rb deleted file mode 100644 index ff3625872d53..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/create_checkout_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the create_checkout_settings call in the CheckoutSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#create_checkout_settings. -# -def create_checkout_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new - - # Call the create_checkout_settings method. - result = client.create_checkout_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. - p result -end -# [END merchantapi_v1_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/delete_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/delete_checkout_settings.rb deleted file mode 100644 index 8654d4de4910..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/delete_checkout_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the delete_checkout_settings call in the CheckoutSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#delete_checkout_settings. -# -def delete_checkout_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new - - # Call the delete_checkout_settings method. - result = client.delete_checkout_settings request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/get_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/get_checkout_settings.rb deleted file mode 100644 index e7e531bc9d80..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/get_checkout_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_CheckoutSettingsService_GetCheckoutSettings_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_checkout_settings call in the CheckoutSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#get_checkout_settings. -# -def get_checkout_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new - - # Call the get_checkout_settings method. - result = client.get_checkout_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. - p result -end -# [END merchantapi_v1_generated_CheckoutSettingsService_GetCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/update_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/update_checkout_settings.rb deleted file mode 100644 index 5c3b5965bafa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/update_checkout_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the update_checkout_settings call in the CheckoutSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#update_checkout_settings. -# -def update_checkout_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new - - # Call the update_checkout_settings method. - result = client.update_checkout_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. - p result -end -# [END merchantapi_v1_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_account_for_gcp_registration.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_account_for_gcp_registration.rb deleted file mode 100644 index 457412177841..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_account_for_gcp_registration.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_DeveloperRegistrationService_GetAccountForGcpRegistration_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_account_for_gcp_registration call in the DeveloperRegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#get_account_for_gcp_registration. -# -def get_account_for_gcp_registration - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Protobuf::Empty.new - - # Call the get_account_for_gcp_registration method. - result = client.get_account_for_gcp_registration request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse. - p result -end -# [END merchantapi_v1_generated_DeveloperRegistrationService_GetAccountForGcpRegistration_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_developer_registration.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_developer_registration.rb deleted file mode 100644 index 0e03fc905a8f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_developer_registration.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_DeveloperRegistrationService_GetDeveloperRegistration_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_developer_registration call in the DeveloperRegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#get_developer_registration. -# -def get_developer_registration - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new - - # Call the get_developer_registration method. - result = client.get_developer_registration request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration. - p result -end -# [END merchantapi_v1_generated_DeveloperRegistrationService_GetDeveloperRegistration_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/register_gcp.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/register_gcp.rb deleted file mode 100644 index 8d3df36efa7c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/register_gcp.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_DeveloperRegistrationService_RegisterGcp_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the register_gcp call in the DeveloperRegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#register_gcp. -# -def register_gcp - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new - - # Call the register_gcp method. - result = client.register_gcp request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration. - p result -end -# [END merchantapi_v1_generated_DeveloperRegistrationService_RegisterGcp_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/unregister_gcp.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/unregister_gcp.rb deleted file mode 100644 index a912f2e25933..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/unregister_gcp.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_DeveloperRegistrationService_UnregisterGcp_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the unregister_gcp call in the DeveloperRegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#unregister_gcp. -# -def unregister_gcp - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new - - # Call the unregister_gcp method. - result = client.unregister_gcp request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_DeveloperRegistrationService_UnregisterGcp_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/get_email_preferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/get_email_preferences.rb deleted file mode 100644 index ed7e795f20ca..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/get_email_preferences.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_EmailPreferencesService_GetEmailPreferences_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_email_preferences call in the EmailPreferencesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#get_email_preferences. -# -def get_email_preferences - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new - - # Call the get_email_preferences method. - result = client.get_email_preferences request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. - p result -end -# [END merchantapi_v1_generated_EmailPreferencesService_GetEmailPreferences_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/update_email_preferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/update_email_preferences.rb deleted file mode 100644 index be8e100a92c2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/update_email_preferences.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_EmailPreferencesService_UpdateEmailPreferences_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the update_email_preferences call in the EmailPreferencesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#update_email_preferences. -# -def update_email_preferences - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new - - # Call the update_email_preferences method. - result = client.update_email_preferences request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. - p result -end -# [END merchantapi_v1_generated_EmailPreferencesService_UpdateEmailPreferences_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/link_gbp_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/link_gbp_account.rb deleted file mode 100644 index 66d6a9e13037..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/link_gbp_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_GbpAccountsService_LinkGbpAccount_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the link_gbp_account call in the GbpAccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#link_gbp_account. -# -def link_gbp_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new - - # Call the link_gbp_account method. - result = client.link_gbp_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse. - p result -end -# [END merchantapi_v1_generated_GbpAccountsService_LinkGbpAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/list_gbp_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/list_gbp_accounts.rb deleted file mode 100644 index 55b507f95e1f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/list_gbp_accounts.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 merchantapi_v1_generated_GbpAccountsService_ListGbpAccounts_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the list_gbp_accounts call in the GbpAccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#list_gbp_accounts. -# -def list_gbp_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.new - - # Call the list_gbp_accounts method. - result = client.list_gbp_accounts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::GbpAccount. - p item - end -end -# [END merchantapi_v1_generated_GbpAccountsService_ListGbpAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/claim_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/claim_homepage.rb deleted file mode 100644 index 9a759d791ca8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/claim_homepage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_HomepageService_ClaimHomepage_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the claim_homepage call in the HomepageService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#claim_homepage. -# -def claim_homepage - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new - - # Call the claim_homepage method. - result = client.claim_homepage request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. - p result -end -# [END merchantapi_v1_generated_HomepageService_ClaimHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/get_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/get_homepage.rb deleted file mode 100644 index 68b8b983a590..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/get_homepage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_HomepageService_GetHomepage_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_homepage call in the HomepageService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#get_homepage. -# -def get_homepage - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new - - # Call the get_homepage method. - result = client.get_homepage request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. - p result -end -# [END merchantapi_v1_generated_HomepageService_GetHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/unclaim_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/unclaim_homepage.rb deleted file mode 100644 index b8ce229741a2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/unclaim_homepage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_HomepageService_UnclaimHomepage_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the unclaim_homepage call in the HomepageService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#unclaim_homepage. -# -def unclaim_homepage - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new - - # Call the unclaim_homepage method. - result = client.unclaim_homepage request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. - p result -end -# [END merchantapi_v1_generated_HomepageService_UnclaimHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/update_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/update_homepage.rb deleted file mode 100644 index 6a3b8bf4bb66..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/homepage_service/update_homepage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_HomepageService_UpdateHomepage_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the update_homepage call in the HomepageService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#update_homepage. -# -def update_homepage - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new - - # Call the update_homepage method. - result = client.update_homepage request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. - p result -end -# [END merchantapi_v1_generated_HomepageService_UpdateHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/find_lfp_providers.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/find_lfp_providers.rb deleted file mode 100644 index e78aac0ac59b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/find_lfp_providers.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_LfpProvidersService_FindLfpProviders_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the find_lfp_providers call in the LfpProvidersService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#find_lfp_providers. -# -def find_lfp_providers - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.new - - # Call the find_lfp_providers method. - result = client.find_lfp_providers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::LfpProvider. - p item - end -end -# [END merchantapi_v1_generated_LfpProvidersService_FindLfpProviders_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/link_lfp_provider.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/link_lfp_provider.rb deleted file mode 100644 index 277192f3a8de..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/link_lfp_provider.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_LfpProvidersService_LinkLfpProvider_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the link_lfp_provider call in the LfpProvidersService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#link_lfp_provider. -# -def link_lfp_provider - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new - - # Call the link_lfp_provider method. - result = client.link_lfp_provider request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse. - p result -end -# [END merchantapi_v1_generated_LfpProvidersService_LinkLfpProvider_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/create_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/create_omnichannel_setting.rb deleted file mode 100644 index 78dd2a732a40..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/create_omnichannel_setting.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the create_omnichannel_setting call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#create_omnichannel_setting. -# -def create_omnichannel_setting - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new - - # Call the create_omnichannel_setting method. - result = client.create_omnichannel_setting request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. - p result -end -# [END merchantapi_v1_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/get_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/get_omnichannel_setting.rb deleted file mode 100644 index fd593f4b258b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/get_omnichannel_setting.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_omnichannel_setting call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#get_omnichannel_setting. -# -def get_omnichannel_setting - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new - - # Call the get_omnichannel_setting method. - result = client.get_omnichannel_setting request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. - p result -end -# [END merchantapi_v1_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/list_omnichannel_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/list_omnichannel_settings.rb deleted file mode 100644 index 0a8ba4b80dda..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/list_omnichannel_settings.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 merchantapi_v1_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the list_omnichannel_settings call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#list_omnichannel_settings. -# -def list_omnichannel_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.new - - # Call the list_omnichannel_settings method. - result = client.list_omnichannel_settings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. - p item - end -end -# [END merchantapi_v1_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/request_inventory_verification.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/request_inventory_verification.rb deleted file mode 100644 index 076ba53393ea..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/request_inventory_verification.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_OmnichannelSettingsService_RequestInventoryVerification_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the request_inventory_verification call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#request_inventory_verification. -# -def request_inventory_verification - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new - - # Call the request_inventory_verification method. - result = client.request_inventory_verification request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse. - p result -end -# [END merchantapi_v1_generated_OmnichannelSettingsService_RequestInventoryVerification_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/update_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/update_omnichannel_setting.rb deleted file mode 100644 index c0fa5b526acc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/update_omnichannel_setting.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the update_omnichannel_setting call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#update_omnichannel_setting. -# -def update_omnichannel_setting - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new - - # Call the update_omnichannel_setting method. - result = client.update_omnichannel_setting request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. - p result -end -# [END merchantapi_v1_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/create_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/create_online_return_policy.rb deleted file mode 100644 index 6531fd8ef92d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/create_online_return_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 merchantapi_v1_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the create_online_return_policy call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#create_online_return_policy. -# -def create_online_return_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new - - # Call the create_online_return_policy method. - result = client.create_online_return_policy request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. - p result -end -# [END merchantapi_v1_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/delete_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/delete_online_return_policy.rb deleted file mode 100644 index 89dff99eaa44..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/delete_online_return_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 merchantapi_v1_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the delete_online_return_policy call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#delete_online_return_policy. -# -def delete_online_return_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new - - # Call the delete_online_return_policy method. - result = client.delete_online_return_policy request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/get_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/get_online_return_policy.rb deleted file mode 100644 index bd78b08d148c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/get_online_return_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 merchantapi_v1_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_online_return_policy call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#get_online_return_policy. -# -def get_online_return_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new - - # Call the get_online_return_policy method. - result = client.get_online_return_policy request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. - p result -end -# [END merchantapi_v1_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/list_online_return_policies.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/list_online_return_policies.rb deleted file mode 100644 index 94be76732d31..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/list_online_return_policies.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 merchantapi_v1_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the list_online_return_policies call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#list_online_return_policies. -# -def list_online_return_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.new - - # Call the list_online_return_policies method. - result = client.list_online_return_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. - p item - end -end -# [END merchantapi_v1_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/disable_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/disable_program.rb deleted file mode 100644 index f6b6f781e1bf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/disable_program.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ProgramsService_DisableProgram_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the disable_program call in the ProgramsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#disable_program. -# -def disable_program - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new - - # Call the disable_program method. - result = client.disable_program request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. - p result -end -# [END merchantapi_v1_generated_ProgramsService_DisableProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/enable_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/enable_program.rb deleted file mode 100644 index 900090789c06..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/enable_program.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ProgramsService_EnableProgram_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the enable_program call in the ProgramsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#enable_program. -# -def enable_program - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new - - # Call the enable_program method. - result = client.enable_program request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. - p result -end -# [END merchantapi_v1_generated_ProgramsService_EnableProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/get_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/get_program.rb deleted file mode 100644 index 1a675b41a36f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/get_program.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ProgramsService_GetProgram_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_program call in the ProgramsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#get_program. -# -def get_program - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new - - # Call the get_program method. - result = client.get_program request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. - p result -end -# [END merchantapi_v1_generated_ProgramsService_GetProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/list_programs.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/list_programs.rb deleted file mode 100644 index 271b0572f3fb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/programs_service/list_programs.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 merchantapi_v1_generated_ProgramsService_ListPrograms_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the list_programs call in the ProgramsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#list_programs. -# -def list_programs - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.new - - # Call the list_programs method. - result = client.list_programs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Program. - p item - end -end -# [END merchantapi_v1_generated_ProgramsService_ListPrograms_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_create_regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_create_regions.rb deleted file mode 100644 index cd65362fe413..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_create_regions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_RegionsService_BatchCreateRegions_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the batch_create_regions call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_create_regions. -# -def batch_create_regions - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest.new - - # Call the batch_create_regions method. - result = client.batch_create_regions request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse. - p result -end -# [END merchantapi_v1_generated_RegionsService_BatchCreateRegions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_delete_regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_delete_regions.rb deleted file mode 100644 index bc2309b6a1e9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_delete_regions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_RegionsService_BatchDeleteRegions_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the batch_delete_regions call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_delete_regions. -# -def batch_delete_regions - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest.new - - # Call the batch_delete_regions method. - result = client.batch_delete_regions request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_RegionsService_BatchDeleteRegions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_update_regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_update_regions.rb deleted file mode 100644 index 93b5d2883b0f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/batch_update_regions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_RegionsService_BatchUpdateRegions_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the batch_update_regions call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_update_regions. -# -def batch_update_regions - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest.new - - # Call the batch_update_regions method. - result = client.batch_update_regions request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse. - p result -end -# [END merchantapi_v1_generated_RegionsService_BatchUpdateRegions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/create_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/create_region.rb deleted file mode 100644 index 97da61cc61a4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/create_region.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_RegionsService_CreateRegion_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the create_region call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#create_region. -# -def create_region - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new - - # Call the create_region method. - result = client.create_region request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. - p result -end -# [END merchantapi_v1_generated_RegionsService_CreateRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/delete_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/delete_region.rb deleted file mode 100644 index 043ff24d67a7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/delete_region.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_RegionsService_DeleteRegion_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the delete_region call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#delete_region. -# -def delete_region - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new - - # Call the delete_region method. - result = client.delete_region request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_RegionsService_DeleteRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/get_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/get_region.rb deleted file mode 100644 index 88544ad8b5c2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/get_region.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_RegionsService_GetRegion_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_region call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#get_region. -# -def get_region - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new - - # Call the get_region method. - result = client.get_region request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. - p result -end -# [END merchantapi_v1_generated_RegionsService_GetRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/list_regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/list_regions.rb deleted file mode 100644 index bd30bcd2027c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/list_regions.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 merchantapi_v1_generated_RegionsService_ListRegions_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the list_regions call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#list_regions. -# -def list_regions - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.new - - # Call the list_regions method. - result = client.list_regions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Region. - p item - end -end -# [END merchantapi_v1_generated_RegionsService_ListRegions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/update_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/update_region.rb deleted file mode 100644 index a170234982c5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/regions_service/update_region.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_RegionsService_UpdateRegion_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the update_region call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#update_region. -# -def update_region - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new - - # Call the update_region method. - result = client.update_region request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. - p result -end -# [END merchantapi_v1_generated_RegionsService_UpdateRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/get_shipping_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/get_shipping_settings.rb deleted file mode 100644 index a8c386d3517c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/get_shipping_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ShippingSettingsService_GetShippingSettings_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_shipping_settings call in the ShippingSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#get_shipping_settings. -# -def get_shipping_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new - - # Call the get_shipping_settings method. - result = client.get_shipping_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. - p result -end -# [END merchantapi_v1_generated_ShippingSettingsService_GetShippingSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/insert_shipping_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/insert_shipping_settings.rb deleted file mode 100644 index 75e5c60eb8ec..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/insert_shipping_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ShippingSettingsService_InsertShippingSettings_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the insert_shipping_settings call in the ShippingSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#insert_shipping_settings. -# -def insert_shipping_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new - - # Call the insert_shipping_settings method. - result = client.insert_shipping_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. - p result -end -# [END merchantapi_v1_generated_ShippingSettingsService_InsertShippingSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json deleted file mode 100644 index eae9344032a0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json +++ /dev/null @@ -1,3055 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-accounts-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.accounts.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1_generated_AccountIssueService_ListAccountIssues_sync", - "title": "Snippet for the list_account_issues call in the AccountIssueService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client#list_account_issues.", - "file": "account_issue_service/list_account_issues.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_account_issues", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client#list_account_issues", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse", - "client": { - "short_name": "AccountIssueService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client" - }, - "method": { - "short_name": "ListAccountIssues", - "full_name": "google.shopping.merchant.accounts.v1.AccountIssueService.ListAccountIssues", - "service": { - "short_name": "AccountIssueService", - "full_name": "google.shopping.merchant.accounts.v1.AccountIssueService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AccountRelationshipsService_GetAccountRelationship_sync", - "title": "Snippet for the get_account_relationship call in the AccountRelationshipsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#get_account_relationship.", - "file": "account_relationships_service/get_account_relationship.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_account_relationship", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#get_account_relationship", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationship", - "client": { - "short_name": "AccountRelationshipsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client" - }, - "method": { - "short_name": "GetAccountRelationship", - "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService.GetAccountRelationship", - "service": { - "short_name": "AccountRelationshipsService", - "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AccountRelationshipsService_UpdateAccountRelationship_sync", - "title": "Snippet for the update_account_relationship call in the AccountRelationshipsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#update_account_relationship.", - "file": "account_relationships_service/update_account_relationship.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_account_relationship", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#update_account_relationship", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationship", - "client": { - "short_name": "AccountRelationshipsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client" - }, - "method": { - "short_name": "UpdateAccountRelationship", - "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService.UpdateAccountRelationship", - "service": { - "short_name": "AccountRelationshipsService", - "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AccountRelationshipsService_ListAccountRelationships_sync", - "title": "Snippet for the list_account_relationships call in the AccountRelationshipsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#list_account_relationships.", - "file": "account_relationships_service/list_account_relationships.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_account_relationships", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#list_account_relationships", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse", - "client": { - "short_name": "AccountRelationshipsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client" - }, - "method": { - "short_name": "ListAccountRelationships", - "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService.ListAccountRelationships", - "service": { - "short_name": "AccountRelationshipsService", - "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AccountServicesService_GetAccountService_sync", - "title": "Snippet for the get_account_service call in the AccountServicesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#get_account_service.", - "file": "account_services_service/get_account_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_account_service", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#get_account_service", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::AccountService", - "client": { - "short_name": "AccountServicesService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client" - }, - "method": { - "short_name": "GetAccountService", - "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService.GetAccountService", - "service": { - "short_name": "AccountServicesService", - "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AccountServicesService_ListAccountServices_sync", - "title": "Snippet for the list_account_services call in the AccountServicesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#list_account_services.", - "file": "account_services_service/list_account_services.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_account_services", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#list_account_services", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse", - "client": { - "short_name": "AccountServicesService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client" - }, - "method": { - "short_name": "ListAccountServices", - "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService.ListAccountServices", - "service": { - "short_name": "AccountServicesService", - "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AccountServicesService_ProposeAccountService_sync", - "title": "Snippet for the propose_account_service call in the AccountServicesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#propose_account_service.", - "file": "account_services_service/propose_account_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "propose_account_service", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#propose_account_service", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::AccountService", - "client": { - "short_name": "AccountServicesService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client" - }, - "method": { - "short_name": "ProposeAccountService", - "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService.ProposeAccountService", - "service": { - "short_name": "AccountServicesService", - "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AccountServicesService_ApproveAccountService_sync", - "title": "Snippet for the approve_account_service call in the AccountServicesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#approve_account_service.", - "file": "account_services_service/approve_account_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "approve_account_service", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#approve_account_service", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::AccountService", - "client": { - "short_name": "AccountServicesService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client" - }, - "method": { - "short_name": "ApproveAccountService", - "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService.ApproveAccountService", - "service": { - "short_name": "AccountServicesService", - "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AccountServicesService_RejectAccountService_sync", - "title": "Snippet for the reject_account_service call in the AccountServicesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#reject_account_service.", - "file": "account_services_service/reject_account_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "reject_account_service", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#reject_account_service", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AccountServicesService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client" - }, - "method": { - "short_name": "RejectAccountService", - "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService.RejectAccountService", - "service": { - "short_name": "AccountServicesService", - "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_UserService_GetUser_sync", - "title": "Snippet for the get_user call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#get_user.", - "file": "user_service/get_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_user", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#get_user", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::User", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" - }, - "method": { - "short_name": "GetUser", - "full_name": "google.shopping.merchant.accounts.v1.UserService.GetUser", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_UserService_CreateUser_sync", - "title": "Snippet for the create_user call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#create_user.", - "file": "user_service/create_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_user", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#create_user", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::User", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" - }, - "method": { - "short_name": "CreateUser", - "full_name": "google.shopping.merchant.accounts.v1.UserService.CreateUser", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_UserService_DeleteUser_sync", - "title": "Snippet for the delete_user call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#delete_user.", - "file": "user_service/delete_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_user", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#delete_user", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" - }, - "method": { - "short_name": "DeleteUser", - "full_name": "google.shopping.merchant.accounts.v1.UserService.DeleteUser", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_UserService_UpdateUser_sync", - "title": "Snippet for the update_user call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#update_user.", - "file": "user_service/update_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_user", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#update_user", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::User", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" - }, - "method": { - "short_name": "UpdateUser", - "full_name": "google.shopping.merchant.accounts.v1.UserService.UpdateUser", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_UserService_ListUsers_sync", - "title": "Snippet for the list_users call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#list_users.", - "file": "user_service/list_users.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_users", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#list_users", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" - }, - "method": { - "short_name": "ListUsers", - "full_name": "google.shopping.merchant.accounts.v1.UserService.ListUsers", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_UserService_VerifySelf_sync", - "title": "Snippet for the verify_self call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#verify_self.", - "file": "user_service/verify_self.rb", - "language": "RUBY", - "client_method": { - "short_name": "verify_self", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#verify_self", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::User", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" - }, - "method": { - "short_name": "VerifySelf", - "full_name": "google.shopping.merchant.accounts.v1.UserService.VerifySelf", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AccountsService_GetAccount_sync", - "title": "Snippet for the get_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#get_account.", - "file": "accounts_service/get_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#get_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" - }, - "method": { - "short_name": "GetAccount", - "full_name": "google.shopping.merchant.accounts.v1.AccountsService.GetAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AccountsService_CreateAndConfigureAccount_sync", - "title": "Snippet for the create_and_configure_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#create_and_configure_account.", - "file": "accounts_service/create_and_configure_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_and_configure_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#create_and_configure_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" - }, - "method": { - "short_name": "CreateAndConfigureAccount", - "full_name": "google.shopping.merchant.accounts.v1.AccountsService.CreateAndConfigureAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AccountsService_CreateTestAccount_sync", - "title": "Snippet for the create_test_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#create_test_account.", - "file": "accounts_service/create_test_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_test_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#create_test_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" - }, - "method": { - "short_name": "CreateTestAccount", - "full_name": "google.shopping.merchant.accounts.v1.AccountsService.CreateTestAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AccountsService_DeleteAccount_sync", - "title": "Snippet for the delete_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#delete_account.", - "file": "accounts_service/delete_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#delete_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" - }, - "method": { - "short_name": "DeleteAccount", - "full_name": "google.shopping.merchant.accounts.v1.AccountsService.DeleteAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AccountsService_UpdateAccount_sync", - "title": "Snippet for the update_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#update_account.", - "file": "accounts_service/update_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#update_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" - }, - "method": { - "short_name": "UpdateAccount", - "full_name": "google.shopping.merchant.accounts.v1.AccountsService.UpdateAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AccountsService_ListAccounts_sync", - "title": "Snippet for the list_accounts call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_accounts.", - "file": "accounts_service/list_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_accounts", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" - }, - "method": { - "short_name": "ListAccounts", - "full_name": "google.shopping.merchant.accounts.v1.AccountsService.ListAccounts", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AccountsService_ListSubAccounts_sync", - "title": "Snippet for the list_sub_accounts call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_sub_accounts.", - "file": "accounts_service/list_sub_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_sub_accounts", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_sub_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" - }, - "method": { - "short_name": "ListSubAccounts", - "full_name": "google.shopping.merchant.accounts.v1.AccountsService.ListSubAccounts", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AutofeedSettingsService_GetAutofeedSettings_sync", - "title": "Snippet for the get_autofeed_settings call in the AutofeedSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#get_autofeed_settings.", - "file": "autofeed_settings_service/get_autofeed_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_autofeed_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#get_autofeed_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings", - "client": { - "short_name": "AutofeedSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client" - }, - "method": { - "short_name": "GetAutofeedSettings", - "full_name": "google.shopping.merchant.accounts.v1.AutofeedSettingsService.GetAutofeedSettings", - "service": { - "short_name": "AutofeedSettingsService", - "full_name": "google.shopping.merchant.accounts.v1.AutofeedSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync", - "title": "Snippet for the update_autofeed_settings call in the AutofeedSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#update_autofeed_settings.", - "file": "autofeed_settings_service/update_autofeed_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_autofeed_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#update_autofeed_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings", - "client": { - "short_name": "AutofeedSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client" - }, - "method": { - "short_name": "UpdateAutofeedSettings", - "full_name": "google.shopping.merchant.accounts.v1.AutofeedSettingsService.UpdateAutofeedSettings", - "service": { - "short_name": "AutofeedSettingsService", - "full_name": "google.shopping.merchant.accounts.v1.AutofeedSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync", - "title": "Snippet for the get_automatic_improvements call in the AutomaticImprovementsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#get_automatic_improvements.", - "file": "automatic_improvements_service/get_automatic_improvements.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_automatic_improvements", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#get_automatic_improvements", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements", - "client": { - "short_name": "AutomaticImprovementsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client" - }, - "method": { - "short_name": "GetAutomaticImprovements", - "full_name": "google.shopping.merchant.accounts.v1.AutomaticImprovementsService.GetAutomaticImprovements", - "service": { - "short_name": "AutomaticImprovementsService", - "full_name": "google.shopping.merchant.accounts.v1.AutomaticImprovementsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync", - "title": "Snippet for the update_automatic_improvements call in the AutomaticImprovementsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#update_automatic_improvements.", - "file": "automatic_improvements_service/update_automatic_improvements.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_automatic_improvements", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#update_automatic_improvements", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements", - "client": { - "short_name": "AutomaticImprovementsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client" - }, - "method": { - "short_name": "UpdateAutomaticImprovements", - "full_name": "google.shopping.merchant.accounts.v1.AutomaticImprovementsService.UpdateAutomaticImprovements", - "service": { - "short_name": "AutomaticImprovementsService", - "full_name": "google.shopping.merchant.accounts.v1.AutomaticImprovementsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_BusinessIdentityService_GetBusinessIdentity_sync", - "title": "Snippet for the get_business_identity call in the BusinessIdentityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#get_business_identity.", - "file": "business_identity_service/get_business_identity.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_business_identity", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#get_business_identity", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity", - "client": { - "short_name": "BusinessIdentityService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client" - }, - "method": { - "short_name": "GetBusinessIdentity", - "full_name": "google.shopping.merchant.accounts.v1.BusinessIdentityService.GetBusinessIdentity", - "service": { - "short_name": "BusinessIdentityService", - "full_name": "google.shopping.merchant.accounts.v1.BusinessIdentityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_BusinessIdentityService_UpdateBusinessIdentity_sync", - "title": "Snippet for the update_business_identity call in the BusinessIdentityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#update_business_identity.", - "file": "business_identity_service/update_business_identity.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_business_identity", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#update_business_identity", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity", - "client": { - "short_name": "BusinessIdentityService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client" - }, - "method": { - "short_name": "UpdateBusinessIdentity", - "full_name": "google.shopping.merchant.accounts.v1.BusinessIdentityService.UpdateBusinessIdentity", - "service": { - "short_name": "BusinessIdentityService", - "full_name": "google.shopping.merchant.accounts.v1.BusinessIdentityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_BusinessInfoService_GetBusinessInfo_sync", - "title": "Snippet for the get_business_info call in the BusinessInfoService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#get_business_info.", - "file": "business_info_service/get_business_info.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_business_info", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#get_business_info", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfo", - "client": { - "short_name": "BusinessInfoService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client" - }, - "method": { - "short_name": "GetBusinessInfo", - "full_name": "google.shopping.merchant.accounts.v1.BusinessInfoService.GetBusinessInfo", - "service": { - "short_name": "BusinessInfoService", - "full_name": "google.shopping.merchant.accounts.v1.BusinessInfoService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_BusinessInfoService_UpdateBusinessInfo_sync", - "title": "Snippet for the update_business_info call in the BusinessInfoService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#update_business_info.", - "file": "business_info_service/update_business_info.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_business_info", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#update_business_info", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfo", - "client": { - "short_name": "BusinessInfoService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client" - }, - "method": { - "short_name": "UpdateBusinessInfo", - "full_name": "google.shopping.merchant.accounts.v1.BusinessInfoService.UpdateBusinessInfo", - "service": { - "short_name": "BusinessInfoService", - "full_name": "google.shopping.merchant.accounts.v1.BusinessInfoService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_CheckoutSettingsService_GetCheckoutSettings_sync", - "title": "Snippet for the get_checkout_settings call in the CheckoutSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#get_checkout_settings.", - "file": "checkout_settings_service/get_checkout_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_checkout_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#get_checkout_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings", - "client": { - "short_name": "CheckoutSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client" - }, - "method": { - "short_name": "GetCheckoutSettings", - "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService.GetCheckoutSettings", - "service": { - "short_name": "CheckoutSettingsService", - "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_CheckoutSettingsService_CreateCheckoutSettings_sync", - "title": "Snippet for the create_checkout_settings call in the CheckoutSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#create_checkout_settings.", - "file": "checkout_settings_service/create_checkout_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_checkout_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#create_checkout_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings", - "client": { - "short_name": "CheckoutSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client" - }, - "method": { - "short_name": "CreateCheckoutSettings", - "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService.CreateCheckoutSettings", - "service": { - "short_name": "CheckoutSettingsService", - "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync", - "title": "Snippet for the update_checkout_settings call in the CheckoutSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#update_checkout_settings.", - "file": "checkout_settings_service/update_checkout_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_checkout_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#update_checkout_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings", - "client": { - "short_name": "CheckoutSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client" - }, - "method": { - "short_name": "UpdateCheckoutSettings", - "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService.UpdateCheckoutSettings", - "service": { - "short_name": "CheckoutSettingsService", - "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync", - "title": "Snippet for the delete_checkout_settings call in the CheckoutSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#delete_checkout_settings.", - "file": "checkout_settings_service/delete_checkout_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_checkout_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#delete_checkout_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CheckoutSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client" - }, - "method": { - "short_name": "DeleteCheckoutSettings", - "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService.DeleteCheckoutSettings", - "service": { - "short_name": "CheckoutSettingsService", - "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_DeveloperRegistrationService_RegisterGcp_sync", - "title": "Snippet for the register_gcp call in the DeveloperRegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#register_gcp.", - "file": "developer_registration_service/register_gcp.rb", - "language": "RUBY", - "client_method": { - "short_name": "register_gcp", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#register_gcp", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration", - "client": { - "short_name": "DeveloperRegistrationService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client" - }, - "method": { - "short_name": "RegisterGcp", - "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService.RegisterGcp", - "service": { - "short_name": "DeveloperRegistrationService", - "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_DeveloperRegistrationService_GetDeveloperRegistration_sync", - "title": "Snippet for the get_developer_registration call in the DeveloperRegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#get_developer_registration.", - "file": "developer_registration_service/get_developer_registration.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_developer_registration", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#get_developer_registration", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration", - "client": { - "short_name": "DeveloperRegistrationService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client" - }, - "method": { - "short_name": "GetDeveloperRegistration", - "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService.GetDeveloperRegistration", - "service": { - "short_name": "DeveloperRegistrationService", - "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_DeveloperRegistrationService_UnregisterGcp_sync", - "title": "Snippet for the unregister_gcp call in the DeveloperRegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#unregister_gcp.", - "file": "developer_registration_service/unregister_gcp.rb", - "language": "RUBY", - "client_method": { - "short_name": "unregister_gcp", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#unregister_gcp", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DeveloperRegistrationService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client" - }, - "method": { - "short_name": "UnregisterGcp", - "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService.UnregisterGcp", - "service": { - "short_name": "DeveloperRegistrationService", - "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_DeveloperRegistrationService_GetAccountForGcpRegistration_sync", - "title": "Snippet for the get_account_for_gcp_registration call in the DeveloperRegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#get_account_for_gcp_registration.", - "file": "developer_registration_service/get_account_for_gcp_registration.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_account_for_gcp_registration", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#get_account_for_gcp_registration", - "async": false, - "parameters": [ - { - "type": "::Google::Protobuf::Empty", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse", - "client": { - "short_name": "DeveloperRegistrationService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client" - }, - "method": { - "short_name": "GetAccountForGcpRegistration", - "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService.GetAccountForGcpRegistration", - "service": { - "short_name": "DeveloperRegistrationService", - "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_EmailPreferencesService_GetEmailPreferences_sync", - "title": "Snippet for the get_email_preferences call in the EmailPreferencesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#get_email_preferences.", - "file": "email_preferences_service/get_email_preferences.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_email_preferences", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#get_email_preferences", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferences", - "client": { - "short_name": "EmailPreferencesService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client" - }, - "method": { - "short_name": "GetEmailPreferences", - "full_name": "google.shopping.merchant.accounts.v1.EmailPreferencesService.GetEmailPreferences", - "service": { - "short_name": "EmailPreferencesService", - "full_name": "google.shopping.merchant.accounts.v1.EmailPreferencesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_EmailPreferencesService_UpdateEmailPreferences_sync", - "title": "Snippet for the update_email_preferences call in the EmailPreferencesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#update_email_preferences.", - "file": "email_preferences_service/update_email_preferences.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_email_preferences", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#update_email_preferences", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferences", - "client": { - "short_name": "EmailPreferencesService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client" - }, - "method": { - "short_name": "UpdateEmailPreferences", - "full_name": "google.shopping.merchant.accounts.v1.EmailPreferencesService.UpdateEmailPreferences", - "service": { - "short_name": "EmailPreferencesService", - "full_name": "google.shopping.merchant.accounts.v1.EmailPreferencesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_GbpAccountsService_ListGbpAccounts_sync", - "title": "Snippet for the list_gbp_accounts call in the GbpAccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#list_gbp_accounts.", - "file": "gbp_accounts_service/list_gbp_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_gbp_accounts", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#list_gbp_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse", - "client": { - "short_name": "GbpAccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client" - }, - "method": { - "short_name": "ListGbpAccounts", - "full_name": "google.shopping.merchant.accounts.v1.GbpAccountsService.ListGbpAccounts", - "service": { - "short_name": "GbpAccountsService", - "full_name": "google.shopping.merchant.accounts.v1.GbpAccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_GbpAccountsService_LinkGbpAccount_sync", - "title": "Snippet for the link_gbp_account call in the GbpAccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#link_gbp_account.", - "file": "gbp_accounts_service/link_gbp_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "link_gbp_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#link_gbp_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse", - "client": { - "short_name": "GbpAccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client" - }, - "method": { - "short_name": "LinkGbpAccount", - "full_name": "google.shopping.merchant.accounts.v1.GbpAccountsService.LinkGbpAccount", - "service": { - "short_name": "GbpAccountsService", - "full_name": "google.shopping.merchant.accounts.v1.GbpAccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_HomepageService_GetHomepage_sync", - "title": "Snippet for the get_homepage call in the HomepageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#get_homepage.", - "file": "homepage_service/get_homepage.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_homepage", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#get_homepage", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::Homepage", - "client": { - "short_name": "HomepageService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client" - }, - "method": { - "short_name": "GetHomepage", - "full_name": "google.shopping.merchant.accounts.v1.HomepageService.GetHomepage", - "service": { - "short_name": "HomepageService", - "full_name": "google.shopping.merchant.accounts.v1.HomepageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_HomepageService_UpdateHomepage_sync", - "title": "Snippet for the update_homepage call in the HomepageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#update_homepage.", - "file": "homepage_service/update_homepage.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_homepage", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#update_homepage", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::Homepage", - "client": { - "short_name": "HomepageService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client" - }, - "method": { - "short_name": "UpdateHomepage", - "full_name": "google.shopping.merchant.accounts.v1.HomepageService.UpdateHomepage", - "service": { - "short_name": "HomepageService", - "full_name": "google.shopping.merchant.accounts.v1.HomepageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_HomepageService_ClaimHomepage_sync", - "title": "Snippet for the claim_homepage call in the HomepageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#claim_homepage.", - "file": "homepage_service/claim_homepage.rb", - "language": "RUBY", - "client_method": { - "short_name": "claim_homepage", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#claim_homepage", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::Homepage", - "client": { - "short_name": "HomepageService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client" - }, - "method": { - "short_name": "ClaimHomepage", - "full_name": "google.shopping.merchant.accounts.v1.HomepageService.ClaimHomepage", - "service": { - "short_name": "HomepageService", - "full_name": "google.shopping.merchant.accounts.v1.HomepageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_HomepageService_UnclaimHomepage_sync", - "title": "Snippet for the unclaim_homepage call in the HomepageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#unclaim_homepage.", - "file": "homepage_service/unclaim_homepage.rb", - "language": "RUBY", - "client_method": { - "short_name": "unclaim_homepage", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#unclaim_homepage", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::Homepage", - "client": { - "short_name": "HomepageService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client" - }, - "method": { - "short_name": "UnclaimHomepage", - "full_name": "google.shopping.merchant.accounts.v1.HomepageService.UnclaimHomepage", - "service": { - "short_name": "HomepageService", - "full_name": "google.shopping.merchant.accounts.v1.HomepageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_LfpProvidersService_FindLfpProviders_sync", - "title": "Snippet for the find_lfp_providers call in the LfpProvidersService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#find_lfp_providers.", - "file": "lfp_providers_service/find_lfp_providers.rb", - "language": "RUBY", - "client_method": { - "short_name": "find_lfp_providers", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#find_lfp_providers", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse", - "client": { - "short_name": "LfpProvidersService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client" - }, - "method": { - "short_name": "FindLfpProviders", - "full_name": "google.shopping.merchant.accounts.v1.LfpProvidersService.FindLfpProviders", - "service": { - "short_name": "LfpProvidersService", - "full_name": "google.shopping.merchant.accounts.v1.LfpProvidersService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_LfpProvidersService_LinkLfpProvider_sync", - "title": "Snippet for the link_lfp_provider call in the LfpProvidersService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#link_lfp_provider.", - "file": "lfp_providers_service/link_lfp_provider.rb", - "language": "RUBY", - "client_method": { - "short_name": "link_lfp_provider", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#link_lfp_provider", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse", - "client": { - "short_name": "LfpProvidersService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client" - }, - "method": { - "short_name": "LinkLfpProvider", - "full_name": "google.shopping.merchant.accounts.v1.LfpProvidersService.LinkLfpProvider", - "service": { - "short_name": "LfpProvidersService", - "full_name": "google.shopping.merchant.accounts.v1.LfpProvidersService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync", - "title": "Snippet for the get_omnichannel_setting call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#get_omnichannel_setting.", - "file": "omnichannel_settings_service/get_omnichannel_setting.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_omnichannel_setting", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#get_omnichannel_setting", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "GetOmnichannelSetting", - "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService.GetOmnichannelSetting", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync", - "title": "Snippet for the list_omnichannel_settings call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#list_omnichannel_settings.", - "file": "omnichannel_settings_service/list_omnichannel_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_omnichannel_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#list_omnichannel_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "ListOmnichannelSettings", - "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService.ListOmnichannelSettings", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync", - "title": "Snippet for the create_omnichannel_setting call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#create_omnichannel_setting.", - "file": "omnichannel_settings_service/create_omnichannel_setting.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_omnichannel_setting", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#create_omnichannel_setting", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "CreateOmnichannelSetting", - "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService.CreateOmnichannelSetting", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync", - "title": "Snippet for the update_omnichannel_setting call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#update_omnichannel_setting.", - "file": "omnichannel_settings_service/update_omnichannel_setting.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_omnichannel_setting", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#update_omnichannel_setting", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "UpdateOmnichannelSetting", - "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService.UpdateOmnichannelSetting", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_OmnichannelSettingsService_RequestInventoryVerification_sync", - "title": "Snippet for the request_inventory_verification call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#request_inventory_verification.", - "file": "omnichannel_settings_service/request_inventory_verification.rb", - "language": "RUBY", - "client_method": { - "short_name": "request_inventory_verification", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#request_inventory_verification", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "RequestInventoryVerification", - "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService.RequestInventoryVerification", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync", - "title": "Snippet for the get_online_return_policy call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#get_online_return_policy.", - "file": "online_return_policy_service/get_online_return_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_online_return_policy", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#get_online_return_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "GetOnlineReturnPolicy", - "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService.GetOnlineReturnPolicy", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync", - "title": "Snippet for the list_online_return_policies call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#list_online_return_policies.", - "file": "online_return_policy_service/list_online_return_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_online_return_policies", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#list_online_return_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "ListOnlineReturnPolicies", - "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService.ListOnlineReturnPolicies", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync", - "title": "Snippet for the create_online_return_policy call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#create_online_return_policy.", - "file": "online_return_policy_service/create_online_return_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_online_return_policy", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#create_online_return_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "CreateOnlineReturnPolicy", - "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService.CreateOnlineReturnPolicy", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync", - "title": "Snippet for the delete_online_return_policy call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#delete_online_return_policy.", - "file": "online_return_policy_service/delete_online_return_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_online_return_policy", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#delete_online_return_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "DeleteOnlineReturnPolicy", - "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService.DeleteOnlineReturnPolicy", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ProgramsService_GetProgram_sync", - "title": "Snippet for the get_program call in the ProgramsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#get_program.", - "file": "programs_service/get_program.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_program", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#get_program", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::Program", - "client": { - "short_name": "ProgramsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client" - }, - "method": { - "short_name": "GetProgram", - "full_name": "google.shopping.merchant.accounts.v1.ProgramsService.GetProgram", - "service": { - "short_name": "ProgramsService", - "full_name": "google.shopping.merchant.accounts.v1.ProgramsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ProgramsService_ListPrograms_sync", - "title": "Snippet for the list_programs call in the ProgramsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#list_programs.", - "file": "programs_service/list_programs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_programs", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#list_programs", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse", - "client": { - "short_name": "ProgramsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client" - }, - "method": { - "short_name": "ListPrograms", - "full_name": "google.shopping.merchant.accounts.v1.ProgramsService.ListPrograms", - "service": { - "short_name": "ProgramsService", - "full_name": "google.shopping.merchant.accounts.v1.ProgramsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ProgramsService_EnableProgram_sync", - "title": "Snippet for the enable_program call in the ProgramsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#enable_program.", - "file": "programs_service/enable_program.rb", - "language": "RUBY", - "client_method": { - "short_name": "enable_program", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#enable_program", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::Program", - "client": { - "short_name": "ProgramsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client" - }, - "method": { - "short_name": "EnableProgram", - "full_name": "google.shopping.merchant.accounts.v1.ProgramsService.EnableProgram", - "service": { - "short_name": "ProgramsService", - "full_name": "google.shopping.merchant.accounts.v1.ProgramsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ProgramsService_DisableProgram_sync", - "title": "Snippet for the disable_program call in the ProgramsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#disable_program.", - "file": "programs_service/disable_program.rb", - "language": "RUBY", - "client_method": { - "short_name": "disable_program", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#disable_program", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::Program", - "client": { - "short_name": "ProgramsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client" - }, - "method": { - "short_name": "DisableProgram", - "full_name": "google.shopping.merchant.accounts.v1.ProgramsService.DisableProgram", - "service": { - "short_name": "ProgramsService", - "full_name": "google.shopping.merchant.accounts.v1.ProgramsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_RegionsService_GetRegion_sync", - "title": "Snippet for the get_region call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#get_region.", - "file": "regions_service/get_region.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_region", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#get_region", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::Region", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" - }, - "method": { - "short_name": "GetRegion", - "full_name": "google.shopping.merchant.accounts.v1.RegionsService.GetRegion", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_RegionsService_CreateRegion_sync", - "title": "Snippet for the create_region call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#create_region.", - "file": "regions_service/create_region.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_region", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#create_region", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::Region", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" - }, - "method": { - "short_name": "CreateRegion", - "full_name": "google.shopping.merchant.accounts.v1.RegionsService.CreateRegion", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_RegionsService_BatchCreateRegions_sync", - "title": "Snippet for the batch_create_regions call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_create_regions.", - "file": "regions_service/batch_create_regions.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_create_regions", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_create_regions", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" - }, - "method": { - "short_name": "BatchCreateRegions", - "full_name": "google.shopping.merchant.accounts.v1.RegionsService.BatchCreateRegions", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_RegionsService_UpdateRegion_sync", - "title": "Snippet for the update_region call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#update_region.", - "file": "regions_service/update_region.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_region", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#update_region", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::Region", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" - }, - "method": { - "short_name": "UpdateRegion", - "full_name": "google.shopping.merchant.accounts.v1.RegionsService.UpdateRegion", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_RegionsService_BatchUpdateRegions_sync", - "title": "Snippet for the batch_update_regions call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_update_regions.", - "file": "regions_service/batch_update_regions.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_update_regions", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_update_regions", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" - }, - "method": { - "short_name": "BatchUpdateRegions", - "full_name": "google.shopping.merchant.accounts.v1.RegionsService.BatchUpdateRegions", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_RegionsService_DeleteRegion_sync", - "title": "Snippet for the delete_region call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#delete_region.", - "file": "regions_service/delete_region.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_region", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#delete_region", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" - }, - "method": { - "short_name": "DeleteRegion", - "full_name": "google.shopping.merchant.accounts.v1.RegionsService.DeleteRegion", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_RegionsService_BatchDeleteRegions_sync", - "title": "Snippet for the batch_delete_regions call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_delete_regions.", - "file": "regions_service/batch_delete_regions.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_delete_regions", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#batch_delete_regions", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" - }, - "method": { - "short_name": "BatchDeleteRegions", - "full_name": "google.shopping.merchant.accounts.v1.RegionsService.BatchDeleteRegions", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_RegionsService_ListRegions_sync", - "title": "Snippet for the list_regions call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#list_regions.", - "file": "regions_service/list_regions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_regions", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#list_regions", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" - }, - "method": { - "short_name": "ListRegions", - "full_name": "google.shopping.merchant.accounts.v1.RegionsService.ListRegions", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ShippingSettingsService_GetShippingSettings_sync", - "title": "Snippet for the get_shipping_settings call in the ShippingSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#get_shipping_settings.", - "file": "shipping_settings_service/get_shipping_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_shipping_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#get_shipping_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettings", - "client": { - "short_name": "ShippingSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client" - }, - "method": { - "short_name": "GetShippingSettings", - "full_name": "google.shopping.merchant.accounts.v1.ShippingSettingsService.GetShippingSettings", - "service": { - "short_name": "ShippingSettingsService", - "full_name": "google.shopping.merchant.accounts.v1.ShippingSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ShippingSettingsService_InsertShippingSettings_sync", - "title": "Snippet for the insert_shipping_settings call in the ShippingSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#insert_shipping_settings.", - "file": "shipping_settings_service/insert_shipping_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_shipping_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#insert_shipping_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettings", - "client": { - "short_name": "ShippingSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client" - }, - "method": { - "short_name": "InsertShippingSettings", - "full_name": "google.shopping.merchant.accounts.v1.ShippingSettingsService.InsertShippingSettings", - "service": { - "short_name": "ShippingSettingsService", - "full_name": "google.shopping.merchant.accounts.v1.ShippingSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync", - "title": "Snippet for the get_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state.", - "file": "terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_terms_of_service_agreement_state", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState", - "client": { - "short_name": "TermsOfServiceAgreementStateService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client" - }, - "method": { - "short_name": "GetTermsOfServiceAgreementState", - "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceAgreementStateService.GetTermsOfServiceAgreementState", - "service": { - "short_name": "TermsOfServiceAgreementStateService", - "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceAgreementStateService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync", - "title": "Snippet for the retrieve_for_application_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state.", - "file": "terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb", - "language": "RUBY", - "client_method": { - "short_name": "retrieve_for_application_terms_of_service_agreement_state", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState", - "client": { - "short_name": "TermsOfServiceAgreementStateService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client" - }, - "method": { - "short_name": "RetrieveForApplicationTermsOfServiceAgreementState", - "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceAgreementStateService.RetrieveForApplicationTermsOfServiceAgreementState", - "service": { - "short_name": "TermsOfServiceAgreementStateService", - "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceAgreementStateService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_TermsOfServiceService_GetTermsOfService_sync", - "title": "Snippet for the get_terms_of_service call in the TermsOfServiceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#get_terms_of_service.", - "file": "terms_of_service_service/get_terms_of_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_terms_of_service", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#get_terms_of_service", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::TermsOfService", - "client": { - "short_name": "TermsOfServiceService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client" - }, - "method": { - "short_name": "GetTermsOfService", - "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService.GetTermsOfService", - "service": { - "short_name": "TermsOfServiceService", - "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync", - "title": "Snippet for the retrieve_latest_terms_of_service call in the TermsOfServiceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#retrieve_latest_terms_of_service.", - "file": "terms_of_service_service/retrieve_latest_terms_of_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "retrieve_latest_terms_of_service", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#retrieve_latest_terms_of_service", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::TermsOfService", - "client": { - "short_name": "TermsOfServiceService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client" - }, - "method": { - "short_name": "RetrieveLatestTermsOfService", - "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService.RetrieveLatestTermsOfService", - "service": { - "short_name": "TermsOfServiceService", - "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_TermsOfServiceService_AcceptTermsOfService_sync", - "title": "Snippet for the accept_terms_of_service call in the TermsOfServiceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#accept_terms_of_service.", - "file": "terms_of_service_service/accept_terms_of_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "accept_terms_of_service", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#accept_terms_of_service", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse", - "client": { - "short_name": "TermsOfServiceService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client" - }, - "method": { - "short_name": "AcceptTermsOfService", - "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService.AcceptTermsOfService", - "service": { - "short_name": "TermsOfServiceService", - "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService" - } - } - }, - "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-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb deleted file mode 100644 index 5736868f6958..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state. -# -def get_terms_of_service_agreement_state - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new - - # Call the get_terms_of_service_agreement_state method. - result = client.get_terms_of_service_agreement_state request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. - p result -end -# [END merchantapi_v1_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb deleted file mode 100644 index 7a76e3bc4e6e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the retrieve_for_application_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state. -# -def retrieve_for_application_terms_of_service_agreement_state - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new - - # Call the retrieve_for_application_terms_of_service_agreement_state method. - result = client.retrieve_for_application_terms_of_service_agreement_state request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. - p result -end -# [END merchantapi_v1_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/accept_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/accept_terms_of_service.rb deleted file mode 100644 index 70521bb55cbd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/accept_terms_of_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_TermsOfServiceService_AcceptTermsOfService_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the accept_terms_of_service call in the TermsOfServiceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#accept_terms_of_service. -# -def accept_terms_of_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new - - # Call the accept_terms_of_service method. - result = client.accept_terms_of_service request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse. - p result -end -# [END merchantapi_v1_generated_TermsOfServiceService_AcceptTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/get_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/get_terms_of_service.rb deleted file mode 100644 index 4dfd73193222..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/get_terms_of_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_TermsOfServiceService_GetTermsOfService_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_terms_of_service call in the TermsOfServiceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#get_terms_of_service. -# -def get_terms_of_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new - - # Call the get_terms_of_service method. - result = client.get_terms_of_service request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. - p result -end -# [END merchantapi_v1_generated_TermsOfServiceService_GetTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb deleted file mode 100644 index 3ef98a559d35..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the retrieve_latest_terms_of_service call in the TermsOfServiceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#retrieve_latest_terms_of_service. -# -def retrieve_latest_terms_of_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new - - # Call the retrieve_latest_terms_of_service method. - result = client.retrieve_latest_terms_of_service request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. - p result -end -# [END merchantapi_v1_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/create_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/create_user.rb deleted file mode 100644 index d146dc230aa7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/create_user.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_UserService_CreateUser_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the create_user call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::UserService::Client#create_user. -# -def create_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new - - # Call the create_user method. - result = client.create_user request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. - p result -end -# [END merchantapi_v1_generated_UserService_CreateUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/delete_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/delete_user.rb deleted file mode 100644 index 5633c90cd640..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/delete_user.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_UserService_DeleteUser_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the delete_user call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::UserService::Client#delete_user. -# -def delete_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new - - # Call the delete_user method. - result = client.delete_user request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_UserService_DeleteUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/get_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/get_user.rb deleted file mode 100644 index d67669c7ecbc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/get_user.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_UserService_GetUser_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the get_user call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::UserService::Client#get_user. -# -def get_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new - - # Call the get_user method. - result = client.get_user request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. - p result -end -# [END merchantapi_v1_generated_UserService_GetUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/list_users.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/list_users.rb deleted file mode 100644 index 57e5942b531b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/list_users.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 merchantapi_v1_generated_UserService_ListUsers_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the list_users call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::UserService::Client#list_users. -# -def list_users - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.new - - # Call the list_users method. - result = client.list_users request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::User. - p item - end -end -# [END merchantapi_v1_generated_UserService_ListUsers_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/update_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/update_user.rb deleted file mode 100644 index 40bd7bda2f6a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/update_user.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_UserService_UpdateUser_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the update_user call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::UserService::Client#update_user. -# -def update_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new - - # Call the update_user method. - result = client.update_user request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. - p result -end -# [END merchantapi_v1_generated_UserService_UpdateUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/verify_self.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/verify_self.rb deleted file mode 100644 index e00e78809c6a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/snippets/user_service/verify_self.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_UserService_VerifySelf_sync] -require "google/shopping/merchant/accounts/v1" - -## -# Snippet for the verify_self call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1::UserService::Client#verify_self. -# -def verify_self - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest.new - - # Call the verify_self method. - result = client.verify_self request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. - p result -end -# [END merchantapi_v1_generated_UserService_VerifySelf_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_paths_test.rb deleted file mode 100644 index 4d5e8fc9c564..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_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/shopping/merchant/accounts/v1/account_issue_service" - -class ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_rest_test.rb deleted file mode 100644 index 25c7e17cbc7f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_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/shopping/merchant/accounts/v1/accountissue_pb" -require "google/shopping/merchant/accounts/v1/account_issue_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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_account_issues - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - time_zone = "hello world" - - list_account_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::ServiceStub.stub :transcode_list_account_issues_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_account_issues_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_account_issues parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_account_issues ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_account_issues(::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_account_issues_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::Shopping::Merchant::Accounts::V1::AccountIssueService::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::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb deleted file mode 100644 index 983983373775..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb +++ /dev/null @@ -1,175 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/accountissue_pb" -require "google/shopping/merchant/accounts/v1/account_issue_service" - -class ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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_account_issues - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - time_zone = "hello world" - - list_account_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_account_issues, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest, 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["language_code"] - assert_equal "hello world", request["time_zone"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_account_issues_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_account_issues parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_account_issues ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_account_issues(::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_account_issues_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::Shopping::Merchant::Accounts::V1::AccountIssueService::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::Shopping::Merchant::Accounts::V1::AccountIssueService::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::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_paths_test.rb deleted file mode 100644 index f83647bb4c69..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_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/shopping/merchant/accounts/v1/account_relationships_service" - -class ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_account_relationship_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_relationship_path account: "value0", relationship: "value1" - assert_equal "accounts/value0/relationships/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_rest_test.rb deleted file mode 100644 index 49ac7583555d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_rest_test.rb +++ /dev/null @@ -1,264 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1/accountrelationships_pb" -require "google/shopping/merchant/accounts/v1/account_relationships_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_account_relationship - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_relationship_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::ServiceStub.stub :transcode_get_account_relationship_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_account_relationship_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_account_relationship({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_account_relationship name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_account_relationship ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_account_relationship({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_account_relationship(::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_account_relationship_client_stub.call_count - end - end - end - - def test_update_account_relationship - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account_relationship = {} - update_mask = {} - - update_account_relationship_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::ServiceStub.stub :transcode_update_account_relationship_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_account_relationship_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_account_relationship({ account_relationship: account_relationship, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_account_relationship account_relationship: account_relationship, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_account_relationship ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new(account_relationship: account_relationship, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_account_relationship({ account_relationship: account_relationship, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_account_relationship(::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new(account_relationship: account_relationship, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_account_relationship_client_stub.call_count - end - end - end - - def test_list_account_relationships - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse.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_account_relationships_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::ServiceStub.stub :transcode_list_account_relationships_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_account_relationships_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_account_relationships({ 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_account_relationships 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_account_relationships ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.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_account_relationships({ 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_account_relationships(::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.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_account_relationships_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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb deleted file mode 100644 index bce8d87c1f91..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb +++ /dev/null @@ -1,289 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/accountrelationships_pb" -require "google/shopping/merchant/accounts/v1/account_relationships_service" - -class ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_account_relationship - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_relationship_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_account_relationship, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_account_relationship_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_account_relationship({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_account_relationship name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_account_relationship ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_account_relationship({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_account_relationship(::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_account_relationship_client_stub.call_rpc_count - end - end - - def test_update_account_relationship - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account_relationship = {} - update_mask = {} - - update_account_relationship_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_account_relationship, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship), request["account_relationship"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_account_relationship_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_account_relationship({ account_relationship: account_relationship, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_account_relationship account_relationship: account_relationship, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_account_relationship ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new(account_relationship: account_relationship, 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_account_relationship({ account_relationship: account_relationship, 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_account_relationship(::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new(account_relationship: account_relationship, 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_account_relationship_client_stub.call_rpc_count - end - end - - def test_list_account_relationships - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = 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_account_relationships_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_account_relationships, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest, 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_account_relationships_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_account_relationships({ 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_account_relationships 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_account_relationships ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.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_account_relationships({ 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_account_relationships(::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.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_account_relationships_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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_paths_test.rb deleted file mode 100644 index 1a4ae4767c91..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_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/shopping/merchant/accounts/v1/account_services_service" - -class ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_account_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_service_path account: "value0", service: "value1" - assert_equal "accounts/value0/services/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_rest_test.rb deleted file mode 100644 index a6bd359aa85f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_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/shopping/merchant/accounts/v1/accountservices_pb" -require "google/shopping/merchant/accounts/v1/account_services_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_account_service - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.stub :transcode_get_account_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_account_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_account_service({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_account_service name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_account_service ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_account_service({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_account_service(::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_account_service_client_stub.call_count - end - end - end - - def test_list_account_services - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse.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_account_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.stub :transcode_list_account_services_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_account_services_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_account_services({ 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_account_services 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_account_services ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.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_account_services({ 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_account_services(::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.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_account_services_client_stub.call_count - end - end - end - - def test_propose_account_service - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - provider = "hello world" - account_service = {} - - propose_account_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.stub :transcode_propose_account_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, propose_account_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.propose_account_service({ parent: parent, provider: provider, account_service: account_service }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.propose_account_service parent: parent, provider: provider, account_service: account_service do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.propose_account_service ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new(parent: parent, provider: provider, account_service: account_service) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.propose_account_service({ parent: parent, provider: provider, account_service: account_service }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.propose_account_service(::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new(parent: parent, provider: provider, account_service: account_service), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, propose_account_service_client_stub.call_count - end - end - end - - def test_approve_account_service - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - approve_account_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.stub :transcode_approve_account_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, approve_account_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.approve_account_service({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.approve_account_service name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.approve_account_service ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.approve_account_service({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.approve_account_service(::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, approve_account_service_client_stub.call_count - end - end - end - - def test_reject_account_service - # 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" - - reject_account_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.stub :transcode_reject_account_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, reject_account_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.reject_account_service({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.reject_account_service name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.reject_account_service ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.reject_account_service({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.reject_account_service(::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, reject_account_service_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::Shopping::Merchant::Accounts::V1::AccountServicesService::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::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_test.rb deleted file mode 100644 index ca41d7d091cb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_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/shopping/merchant/accounts/v1/accountservices_pb" -require "google/shopping/merchant/accounts/v1/account_services_service" - -class ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_account_service - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AccountService.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_account_service, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_account_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_account_service({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_account_service name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_account_service ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_account_service({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_account_service(::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_account_service_client_stub.call_rpc_count - end - end - - def test_list_account_services - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = 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_account_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_account_services, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest, 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_account_services_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_account_services({ 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_account_services 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_account_services ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.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_account_services({ 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_account_services(::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.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_account_services_client_stub.call_rpc_count - end - end - - def test_propose_account_service - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AccountService.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - provider = "hello world" - account_service = {} - - propose_account_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :propose_account_service, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["provider"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::AccountService), request["account_service"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, propose_account_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.propose_account_service({ parent: parent, provider: provider, account_service: account_service }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.propose_account_service parent: parent, provider: provider, account_service: account_service do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.propose_account_service ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new(parent: parent, provider: provider, account_service: account_service) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.propose_account_service({ parent: parent, provider: provider, account_service: account_service }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.propose_account_service(::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new(parent: parent, provider: provider, account_service: account_service), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, propose_account_service_client_stub.call_rpc_count - end - end - - def test_approve_account_service - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AccountService.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_account_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :approve_account_service, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, approve_account_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.approve_account_service({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.approve_account_service name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.approve_account_service ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.approve_account_service({ 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_account_service(::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new(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_account_service_client_stub.call_rpc_count - end - end - - def test_reject_account_service - # 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" - - reject_account_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :reject_account_service, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, reject_account_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.reject_account_service({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.reject_account_service name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.reject_account_service ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.reject_account_service({ 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_account_service(::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new(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_account_service_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::Shopping::Merchant::Accounts::V1::AccountServicesService::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::Shopping::Merchant::Accounts::V1::AccountServicesService::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::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_paths_test.rb deleted file mode 100644 index 8d044ba0ebc7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_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/shopping/merchant/accounts/v1/accounts_service" - -class ::Google::Shopping::Merchant::Accounts::V1::AccountsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_user_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.user_path account: "value0", email: "value1" - assert_equal "accounts/value0/users/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_rest_test.rb deleted file mode 100644 index 36410e0ae86a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1/accounts_pb" -require "google/shopping/merchant/accounts/v1/accounts_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_get_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_account({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_account name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_account ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_account({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_account(::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_account_client_stub.call_count - end - end - end - - def test_create_and_configure_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account = {} - user = [{}] - service = [{}] - set_alias = [{}] - - create_and_configure_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_create_and_configure_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_and_configure_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_and_configure_account({ account: account, user: user, service: service, set_alias: set_alias }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_and_configure_account account: account, user: user, service: service, set_alias: set_alias do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_and_configure_account ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new(account: account, user: user, service: service, set_alias: set_alias) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_and_configure_account({ account: account, user: user, service: service, set_alias: set_alias }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_and_configure_account(::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new(account: account, user: user, service: service, set_alias: set_alias), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_and_configure_account_client_stub.call_count - end - end - end - - def test_create_test_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - account = {} - - create_test_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_create_test_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_test_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_test_account({ parent: parent, account: account }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_test_account parent: parent, account: account do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_test_account ::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest.new(parent: parent, account: account) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_test_account({ parent: parent, account: account }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_test_account(::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest.new(parent: parent, account: account), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_test_account_client_stub.call_count - end - end - end - - def test_delete_account - # 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" - force = true - - delete_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_delete_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_account({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_account name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_account ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_account({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_account(::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_account_client_stub.call_count - end - end - end - - def test_update_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account = {} - update_mask = {} - - update_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_update_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_account({ account: account, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_account account: account, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_account ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new(account: account, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_account({ account: account, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_account(::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new(account: account, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_account_client_stub.call_count - end - end - end - - def test_list_accounts - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_list_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_accounts_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_accounts({ 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_accounts 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_accounts ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new(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_accounts({ 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_accounts(::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new(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_accounts_client_stub.call_count - end - end - end - - def test_list_sub_accounts - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - provider = "hello world" - page_size = 42 - page_token = "hello world" - - list_sub_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_list_sub_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_sub_accounts_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_sub_accounts provider: provider, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_sub_accounts ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts({ provider: provider, 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_sub_accounts(::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts_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::Shopping::Merchant::Accounts::V1::AccountsService::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::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_test.rb deleted file mode 100644 index 8ae5697b61c3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_test.rb +++ /dev/null @@ -1,540 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/accounts_pb" -require "google/shopping/merchant/accounts/v1/accounts_service" - -class ::Google::Shopping::Merchant::Accounts::V1::AccountsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_account({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_account name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_account ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_account({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_account(::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_account_client_stub.call_rpc_count - end - end - - def test_create_and_configure_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account = {} - user = [{}] - service = [{}] - set_alias = [{}] - - create_and_configure_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_and_configure_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Account), request["account"] - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddUser, request["user"].first - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddAccountService, request["service"].first - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::SetAliasForRelationship, request["set_alias"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_and_configure_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_and_configure_account({ account: account, user: user, service: service, set_alias: set_alias }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_and_configure_account account: account, user: user, service: service, set_alias: set_alias do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_and_configure_account ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new(account: account, user: user, service: service, set_alias: set_alias) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_and_configure_account({ account: account, user: user, service: service, set_alias: set_alias }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_and_configure_account(::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new(account: account, user: user, service: service, set_alias: set_alias), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_and_configure_account_client_stub.call_rpc_count - end - end - - def test_create_test_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - account = {} - - create_test_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_test_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Account), request["account"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_test_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_test_account({ parent: parent, account: account }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_test_account parent: parent, account: account do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_test_account ::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest.new(parent: parent, account: account) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_test_account({ parent: parent, account: account }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_test_account(::Google::Shopping::Merchant::Accounts::V1::CreateTestAccountRequest.new(parent: parent, account: account), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_test_account_client_stub.call_rpc_count - end - end - - def test_delete_account - # 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" - force = true - - delete_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_account({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_account name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_account ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_account({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_account(::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_account_client_stub.call_rpc_count - end - end - - def test_update_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account = {} - update_mask = {} - - update_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Account), request["account"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_account({ account: account, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_account account: account, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_account ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new(account: account, 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_account({ account: account, 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_account(::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new(account: account, 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_account_client_stub.call_rpc_count - end - end - - def test_list_accounts - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_accounts, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest, request - 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_accounts_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_accounts({ 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_accounts 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_accounts ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new(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_accounts({ 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_accounts(::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new(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_accounts_client_stub.call_rpc_count - end - end - - def test_list_sub_accounts - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - provider = "hello world" - page_size = 42 - page_token = "hello world" - - list_sub_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_sub_accounts, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest, request - assert_equal "hello world", request["provider"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_sub_accounts_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_sub_accounts({ provider: provider, page_size: page_size, page_token: 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_sub_accounts provider: provider, page_size: page_size, page_token: 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_sub_accounts ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new(provider: provider, page_size: page_size, page_token: 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_sub_accounts({ provider: provider, 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_sub_accounts(::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts_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::Shopping::Merchant::Accounts::V1::AccountsService::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::Shopping::Merchant::Accounts::V1::AccountsService::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::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_paths_test.rb deleted file mode 100644 index 2d413f5c1328..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_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/shopping/merchant/accounts/v1/autofeed_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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_autofeed_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.autofeed_settings_path account: "value0" - assert_equal "accounts/value0/autofeedSettings", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_rest_test.rb deleted file mode 100644 index 48b61682a1d7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1/autofeedsettings_pb" -require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_autofeed_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_autofeed_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::ServiceStub.stub :transcode_get_autofeed_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_autofeed_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_autofeed_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_autofeed_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_autofeed_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_autofeed_settings_client_stub.call_count - end - end - end - - def test_update_autofeed_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - autofeed_settings = {} - update_mask = {} - - update_autofeed_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::ServiceStub.stub :transcode_update_autofeed_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_autofeed_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_autofeed_settings autofeed_settings: autofeed_settings, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_autofeed_settings_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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb deleted file mode 100644 index f691921a8369..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/autofeedsettings_pb" -require "google/shopping/merchant/accounts/v1/autofeed_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_autofeed_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_autofeed_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_autofeed_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_autofeed_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_autofeed_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_autofeed_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_autofeed_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_autofeed_settings_client_stub.call_rpc_count - end - end - - def test_update_autofeed_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - autofeed_settings = {} - update_mask = {} - - update_autofeed_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_autofeed_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings), request["autofeed_settings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_autofeed_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_autofeed_settings autofeed_settings: autofeed_settings, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, 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_autofeed_settings({ autofeed_settings: autofeed_settings, 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_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, 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_autofeed_settings_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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_paths_test.rb deleted file mode 100644 index 8f54b71f567c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_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/shopping/merchant/accounts/v1/automatic_improvements_service" - -class ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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_automatic_improvements_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.automatic_improvements_path account: "value0" - assert_equal "accounts/value0/automaticImprovements", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_rest_test.rb deleted file mode 100644 index 5255dda6e690..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1/automaticimprovements_pb" -require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_automatic_improvements - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_automatic_improvements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::ServiceStub.stub :transcode_get_automatic_improvements_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_automatic_improvements_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_automatic_improvements({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_automatic_improvements name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_automatic_improvements({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_automatic_improvements_client_stub.call_count - end - end - end - - def test_update_automatic_improvements - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - automatic_improvements = {} - update_mask = {} - - update_automatic_improvements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::ServiceStub.stub :transcode_update_automatic_improvements_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_automatic_improvements_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_automatic_improvements automatic_improvements: automatic_improvements, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_automatic_improvements_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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb deleted file mode 100644 index e275de5ed73f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/automaticimprovements_pb" -require "google/shopping/merchant/accounts/v1/automatic_improvements_service" - -class ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_automatic_improvements - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_automatic_improvements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_automatic_improvements, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_automatic_improvements_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_automatic_improvements({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_automatic_improvements name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_automatic_improvements({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_automatic_improvements_client_stub.call_rpc_count - end - end - - def test_update_automatic_improvements - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - automatic_improvements = {} - update_mask = {} - - update_automatic_improvements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_automatic_improvements, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements), request["automatic_improvements"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_automatic_improvements_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_automatic_improvements automatic_improvements: automatic_improvements, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, 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_automatic_improvements({ automatic_improvements: automatic_improvements, 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_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, 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_automatic_improvements_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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_paths_test.rb deleted file mode 100644 index 0ed76c5a9835..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_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/shopping/merchant/accounts/v1/business_identity_service" - -class ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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_business_identity_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.business_identity_path account: "value0" - assert_equal "accounts/value0/businessIdentity", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_rest_test.rb deleted file mode 100644 index 95abc830e393..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1/businessidentity_pb" -require "google/shopping/merchant/accounts/v1/business_identity_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_business_identity - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_business_identity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::ServiceStub.stub :transcode_get_business_identity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_business_identity_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_business_identity({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_business_identity name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_business_identity ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_business_identity({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_business_identity(::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_business_identity_client_stub.call_count - end - end - end - - def test_update_business_identity - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - business_identity = {} - update_mask = {} - - update_business_identity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::ServiceStub.stub :transcode_update_business_identity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_business_identity_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_business_identity({ business_identity: business_identity, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_business_identity business_identity: business_identity, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_business_identity ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_business_identity({ business_identity: business_identity, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_business_identity(::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_business_identity_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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb deleted file mode 100644 index 63d3efcd0846..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/businessidentity_pb" -require "google/shopping/merchant/accounts/v1/business_identity_service" - -class ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_business_identity - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_business_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_business_identity, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_business_identity_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_business_identity({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_business_identity name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_business_identity ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_business_identity({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_business_identity(::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_business_identity_client_stub.call_rpc_count - end - end - - def test_update_business_identity - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - business_identity = {} - update_mask = {} - - update_business_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_business_identity, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity), request["business_identity"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_business_identity_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_business_identity({ business_identity: business_identity, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_business_identity business_identity: business_identity, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_business_identity ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new(business_identity: business_identity, 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_business_identity({ business_identity: business_identity, 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_business_identity(::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new(business_identity: business_identity, 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_business_identity_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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_paths_test.rb deleted file mode 100644 index a1e221703a36..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_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/shopping/merchant/accounts/v1/business_info_service" - -class ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::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_business_info_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.business_info_path account: "value0" - assert_equal "accounts/value0/businessInfo", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_rest_test.rb deleted file mode 100644 index 891dc8a7a3e5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1/businessinfo_pb" -require "google/shopping/merchant/accounts/v1/business_info_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_business_info - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_business_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::ServiceStub.stub :transcode_get_business_info_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_business_info_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_business_info({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_business_info name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_business_info ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_business_info({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_business_info(::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_business_info_client_stub.call_count - end - end - end - - def test_update_business_info - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - business_info = {} - update_mask = {} - - update_business_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::ServiceStub.stub :transcode_update_business_info_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_business_info_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_business_info({ business_info: business_info, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_business_info business_info: business_info, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_business_info ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_business_info({ business_info: business_info, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_business_info(::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_business_info_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::Shopping::Merchant::Accounts::V1::BusinessInfoService::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::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_test.rb deleted file mode 100644 index a239f051ba42..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/businessinfo_pb" -require "google/shopping/merchant/accounts/v1/business_info_service" - -class ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_business_info - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_business_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_business_info, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_business_info_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_business_info({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_business_info name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_business_info ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_business_info({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_business_info(::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_business_info_client_stub.call_rpc_count - end - end - - def test_update_business_info - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - business_info = {} - update_mask = {} - - update_business_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_business_info, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo), request["business_info"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_business_info_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_business_info({ business_info: business_info, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_business_info business_info: business_info, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_business_info ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new(business_info: business_info, 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_business_info({ business_info: business_info, 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_business_info(::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new(business_info: business_info, 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_business_info_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::Shopping::Merchant::Accounts::V1::BusinessInfoService::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::Shopping::Merchant::Accounts::V1::BusinessInfoService::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::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_paths_test.rb deleted file mode 100644 index 7443551ed7d0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_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/shopping/merchant/accounts/v1/checkout_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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_checkout_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.checkout_settings_path account: "value0", program: "value1" - assert_equal "accounts/value0/programs/value1/checkoutSettings", path - end - end - - def test_program_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.program_path account: "value0", program: "value1" - assert_equal "accounts/value0/programs/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_rest_test.rb deleted file mode 100644 index 0224cdd58ebf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_rest_test.rb +++ /dev/null @@ -1,317 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1/checkoutsettings_pb" -require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_checkout_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_get_checkout_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_checkout_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_checkout_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_checkout_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_checkout_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_checkout_settings_client_stub.call_count - end - end - end - - def test_create_checkout_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - checkout_settings = {} - - create_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_create_checkout_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_checkout_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_checkout_settings_client_stub.call_count - end - end - end - - def test_update_checkout_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - checkout_settings = {} - update_mask = {} - - update_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_update_checkout_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_checkout_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_checkout_settings_client_stub.call_count - end - end - end - - def test_delete_checkout_settings - # 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_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_delete_checkout_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_checkout_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_checkout_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_checkout_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_checkout_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_checkout_settings_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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb deleted file mode 100644 index 8580a4b53df8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb +++ /dev/null @@ -1,340 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/checkoutsettings_pb" -require "google/shopping/merchant/accounts/v1/checkout_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_checkout_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_checkout_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_checkout_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_checkout_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_checkout_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_checkout_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_checkout_settings_client_stub.call_rpc_count - end - end - - def test_create_checkout_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - checkout_settings = {} - - create_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_checkout_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings), request["checkout_settings"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_checkout_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_checkout_settings_client_stub.call_rpc_count - end - end - - def test_update_checkout_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - checkout_settings = {} - update_mask = {} - - update_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_checkout_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings), request["checkout_settings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_checkout_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, 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_checkout_settings({ checkout_settings: checkout_settings, 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_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, 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_checkout_settings_client_stub.call_rpc_count - end - end - - def test_delete_checkout_settings - # 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_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_checkout_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_checkout_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_checkout_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_checkout_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_checkout_settings({ 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_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new(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_checkout_settings_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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_paths_test.rb deleted file mode 100644 index 397b0d34a5d5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_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/shopping/merchant/accounts/v1/developer_registration_service" - -class ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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_developer_registration_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.developer_registration_path account: "value0" - assert_equal "accounts/value0/developerRegistration", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_rest_test.rb deleted file mode 100644 index f09c738e49e0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_rest_test.rb +++ /dev/null @@ -1,310 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1/developerregistration_pb" -require "google/shopping/merchant/accounts/v1/developer_registration_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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_register_gcp - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - developer_email = "hello world" - - register_gcp_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::ServiceStub.stub :transcode_register_gcp_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, register_gcp_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.register_gcp({ name: name, developer_email: developer_email }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.register_gcp name: name, developer_email: developer_email do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.register_gcp ::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new(name: name, developer_email: developer_email) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.register_gcp({ name: name, developer_email: developer_email }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.register_gcp(::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new(name: name, developer_email: developer_email), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, register_gcp_client_stub.call_count - end - end - end - - def test_get_developer_registration - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_developer_registration_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::ServiceStub.stub :transcode_get_developer_registration_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_developer_registration_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_developer_registration({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_developer_registration name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_developer_registration ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_developer_registration({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_developer_registration(::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_developer_registration_client_stub.call_count - end - end - end - - def test_unregister_gcp - # 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" - - unregister_gcp_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::ServiceStub.stub :transcode_unregister_gcp_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, unregister_gcp_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.unregister_gcp({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.unregister_gcp name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.unregister_gcp ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.unregister_gcp({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.unregister_gcp(::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, unregister_gcp_client_stub.call_count - end - end - end - - def test_get_account_for_gcp_registration - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - - get_account_for_gcp_registration_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::ServiceStub.stub :transcode_get_account_for_gcp_registration_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_account_for_gcp_registration_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_account_for_gcp_registration({ }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_account_for_gcp_registration ::Google::Protobuf::Empty.new() do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_account_for_gcp_registration({ }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_account_for_gcp_registration(::Google::Protobuf::Empty.new(), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 4, get_account_for_gcp_registration_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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb deleted file mode 100644 index af47466f3d9e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb +++ /dev/null @@ -1,330 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/developerregistration_pb" -require "google/shopping/merchant/accounts/v1/developer_registration_service" - -class ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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_register_gcp - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - developer_email = "hello world" - - register_gcp_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :register_gcp, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["developer_email"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, register_gcp_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.register_gcp({ name: name, developer_email: developer_email }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.register_gcp name: name, developer_email: developer_email do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.register_gcp ::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new(name: name, developer_email: developer_email) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.register_gcp({ name: name, developer_email: developer_email }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.register_gcp(::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new(name: name, developer_email: developer_email), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, register_gcp_client_stub.call_rpc_count - end - end - - def test_get_developer_registration - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_developer_registration_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_developer_registration, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_developer_registration_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_developer_registration({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_developer_registration name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_developer_registration ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_developer_registration({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_developer_registration(::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_developer_registration_client_stub.call_rpc_count - end - end - - def test_unregister_gcp - # 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" - - unregister_gcp_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :unregister_gcp, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, unregister_gcp_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.unregister_gcp({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.unregister_gcp name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.unregister_gcp ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.unregister_gcp({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.unregister_gcp(::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, unregister_gcp_client_stub.call_rpc_count - end - end - - def test_get_account_for_gcp_registration - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::GetAccountForGcpRegistrationResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - - get_account_for_gcp_registration_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_account_for_gcp_registration, name - assert_kind_of ::Google::Protobuf::Empty, request - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_account_for_gcp_registration_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_account_for_gcp_registration({ }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_account_for_gcp_registration ::Google::Protobuf::Empty.new() do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_account_for_gcp_registration({ }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_account_for_gcp_registration(::Google::Protobuf::Empty.new(), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 4, get_account_for_gcp_registration_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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_paths_test.rb deleted file mode 100644 index fceef70de69e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_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/shopping/merchant/accounts/v1/email_preferences_service" - -class ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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_email_preferences_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.email_preferences_path account: "value0", email: "value1" - assert_equal "accounts/value0/users/value1/emailPreferences", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_rest_test.rb deleted file mode 100644 index 67a5ef8fb0ab..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1/emailpreferences_pb" -require "google/shopping/merchant/accounts/v1/email_preferences_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_email_preferences - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_email_preferences_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::ServiceStub.stub :transcode_get_email_preferences_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_email_preferences_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_email_preferences({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_email_preferences name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_email_preferences ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_email_preferences({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_email_preferences(::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_email_preferences_client_stub.call_count - end - end - end - - def test_update_email_preferences - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - email_preferences = {} - update_mask = {} - - update_email_preferences_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::ServiceStub.stub :transcode_update_email_preferences_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_email_preferences_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_email_preferences email_preferences: email_preferences, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_email_preferences ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_email_preferences(::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_email_preferences_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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb deleted file mode 100644 index 848292fe9954..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/emailpreferences_pb" -require "google/shopping/merchant/accounts/v1/email_preferences_service" - -class ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_email_preferences - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_email_preferences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_email_preferences, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_email_preferences_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_email_preferences({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_email_preferences name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_email_preferences ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_email_preferences({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_email_preferences(::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_email_preferences_client_stub.call_rpc_count - end - end - - def test_update_email_preferences - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - email_preferences = {} - update_mask = {} - - update_email_preferences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_email_preferences, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences), request["email_preferences"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_email_preferences_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_email_preferences email_preferences: email_preferences, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_email_preferences ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, 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_email_preferences({ email_preferences: email_preferences, 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_email_preferences(::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, 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_email_preferences_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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_paths_test.rb deleted file mode 100644 index a18d614ae584..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_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/shopping/merchant/accounts/v1/gbp_accounts_service" - -class ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_rest_test.rb deleted file mode 100644 index 2f57e8d53791..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_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/shopping/merchant/accounts/v1/gbpaccounts_pb" -require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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_gbp_accounts - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse.new - http_response = OpenStruct.new 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_gbp_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::ServiceStub.stub :transcode_list_gbp_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_gbp_accounts_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_gbp_accounts({ 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_gbp_accounts 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_gbp_accounts ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.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_gbp_accounts({ 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_gbp_accounts(::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.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_gbp_accounts_client_stub.call_count - end - end - end - - def test_link_gbp_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - gbp_email = "hello world" - - link_gbp_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::ServiceStub.stub :transcode_link_gbp_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, link_gbp_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.link_gbp_account({ parent: parent, gbp_email: gbp_email }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.link_gbp_account parent: parent, gbp_email: gbp_email do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.link_gbp_account ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.link_gbp_account({ parent: parent, gbp_email: gbp_email }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.link_gbp_account(::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, link_gbp_account_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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb deleted file mode 100644 index b4477e71d26b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb +++ /dev/null @@ -1,231 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/gbpaccounts_pb" -require "google/shopping/merchant/accounts/v1/gbp_accounts_service" - -class ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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_gbp_accounts - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_gbp_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_gbp_accounts, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest, 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_gbp_accounts_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_gbp_accounts({ 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_gbp_accounts 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_gbp_accounts ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.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_gbp_accounts({ 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_gbp_accounts(::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.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_gbp_accounts_client_stub.call_rpc_count - end - end - - def test_link_gbp_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - gbp_email = "hello world" - - link_gbp_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :link_gbp_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["gbp_email"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, link_gbp_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.link_gbp_account({ parent: parent, gbp_email: gbp_email }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.link_gbp_account parent: parent, gbp_email: gbp_email do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.link_gbp_account ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.link_gbp_account({ parent: parent, gbp_email: gbp_email }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.link_gbp_account(::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, link_gbp_account_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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_paths_test.rb deleted file mode 100644 index f14d97d6a2c6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_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/shopping/merchant/accounts/v1/homepage_service" - -class ::Google::Shopping::Merchant::Accounts::V1::HomepageService::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_homepage_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.homepage_path account: "value0" - assert_equal "accounts/value0/homepage", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_rest_test.rb deleted file mode 100644 index 6f0c2a45c603..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_rest_test.rb +++ /dev/null @@ -1,317 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1/homepage_pb" -require "google/shopping/merchant/accounts/v1/homepage_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_homepage - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ServiceStub.stub :transcode_get_homepage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_homepage_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_homepage({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_homepage name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_homepage ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_homepage({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_homepage(::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_homepage_client_stub.call_count - end - end - end - - def test_update_homepage - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - homepage = {} - update_mask = {} - - update_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ServiceStub.stub :transcode_update_homepage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_homepage_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_homepage({ homepage: homepage, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_homepage homepage: homepage, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_homepage ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_homepage({ homepage: homepage, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_homepage(::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_homepage_client_stub.call_count - end - end - end - - def test_claim_homepage - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - overwrite = true - - claim_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ServiceStub.stub :transcode_claim_homepage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, claim_homepage_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.claim_homepage({ name: name, overwrite: overwrite }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.claim_homepage name: name, overwrite: overwrite do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.claim_homepage ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new(name: name, overwrite: overwrite) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.claim_homepage({ name: name, overwrite: overwrite }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.claim_homepage(::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new(name: name, overwrite: overwrite), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, claim_homepage_client_stub.call_count - end - end - end - - def test_unclaim_homepage - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - unclaim_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ServiceStub.stub :transcode_unclaim_homepage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, unclaim_homepage_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.unclaim_homepage({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.unclaim_homepage name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.unclaim_homepage ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.unclaim_homepage({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.unclaim_homepage(::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, unclaim_homepage_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::Shopping::Merchant::Accounts::V1::HomepageService::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::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_test.rb deleted file mode 100644 index 50ed26f1e493..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_test.rb +++ /dev/null @@ -1,340 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/homepage_pb" -require "google/shopping/merchant/accounts/v1/homepage_service" - -class ::Google::Shopping::Merchant::Accounts::V1::HomepageService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_homepage - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_homepage, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_homepage_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_homepage({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_homepage name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_homepage ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_homepage({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_homepage(::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_homepage_client_stub.call_rpc_count - end - end - - def test_update_homepage - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - homepage = {} - update_mask = {} - - update_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_homepage, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Homepage), request["homepage"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_homepage_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_homepage({ homepage: homepage, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_homepage homepage: homepage, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_homepage ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new(homepage: homepage, 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_homepage({ homepage: homepage, 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_homepage(::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new(homepage: homepage, 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_homepage_client_stub.call_rpc_count - end - end - - def test_claim_homepage - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - overwrite = true - - claim_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :claim_homepage, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["overwrite"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, claim_homepage_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.claim_homepage({ name: name, overwrite: overwrite }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.claim_homepage name: name, overwrite: overwrite do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.claim_homepage ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new(name: name, overwrite: overwrite) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.claim_homepage({ name: name, overwrite: overwrite }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.claim_homepage(::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new(name: name, overwrite: overwrite), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, claim_homepage_client_stub.call_rpc_count - end - end - - def test_unclaim_homepage - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - unclaim_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :unclaim_homepage, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, unclaim_homepage_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.unclaim_homepage({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.unclaim_homepage name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.unclaim_homepage ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.unclaim_homepage({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.unclaim_homepage(::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, unclaim_homepage_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::Shopping::Merchant::Accounts::V1::HomepageService::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::Shopping::Merchant::Accounts::V1::HomepageService::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::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_paths_test.rb deleted file mode 100644 index 7c464e6be2db..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_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/shopping/merchant/accounts/v1/lfp_providers_service" - -class ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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_lfp_provider_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lfp_provider_path account: "value0", omnichannel_setting: "value1", lfp_provider: "value2" - assert_equal "accounts/value0/omnichannelSettings/value1/lfpProviders/value2", path - end - end - - def test_omnichannel_setting_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.omnichannel_setting_path account: "value0", omnichannel_setting: "value1" - assert_equal "accounts/value0/omnichannelSettings/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_rest_test.rb deleted file mode 100644 index a20843454363..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_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/shopping/merchant/accounts/v1/lfpproviders_pb" -require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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_find_lfp_providers - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - find_lfp_providers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::ServiceStub.stub :transcode_find_lfp_providers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, find_lfp_providers_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.find_lfp_providers({ 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.find_lfp_providers 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.find_lfp_providers ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.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.find_lfp_providers({ 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.find_lfp_providers(::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.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, find_lfp_providers_client_stub.call_count - end - end - end - - def test_link_lfp_provider - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - external_account_id = "hello world" - - link_lfp_provider_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::ServiceStub.stub :transcode_link_lfp_provider_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, link_lfp_provider_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.link_lfp_provider({ name: name, external_account_id: external_account_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.link_lfp_provider name: name, external_account_id: external_account_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.link_lfp_provider ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.link_lfp_provider({ name: name, external_account_id: external_account_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.link_lfp_provider(::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, link_lfp_provider_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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb deleted file mode 100644 index d3d962a154ff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb +++ /dev/null @@ -1,231 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/lfpproviders_pb" -require "google/shopping/merchant/accounts/v1/lfp_providers_service" - -class ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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_find_lfp_providers - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - find_lfp_providers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :find_lfp_providers, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest, 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, find_lfp_providers_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.find_lfp_providers({ 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.find_lfp_providers 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.find_lfp_providers ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.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.find_lfp_providers({ 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.find_lfp_providers(::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.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, find_lfp_providers_client_stub.call_rpc_count - end - end - - def test_link_lfp_provider - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - external_account_id = "hello world" - - link_lfp_provider_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :link_lfp_provider, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["external_account_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, link_lfp_provider_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.link_lfp_provider({ name: name, external_account_id: external_account_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.link_lfp_provider name: name, external_account_id: external_account_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.link_lfp_provider ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.link_lfp_provider({ name: name, external_account_id: external_account_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.link_lfp_provider(::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, link_lfp_provider_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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_paths_test.rb deleted file mode 100644 index b271e6e41dfb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_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/shopping/merchant/accounts/v1/omnichannel_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_omnichannel_setting_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.omnichannel_setting_path account: "value0", omnichannel_setting: "value1" - assert_equal "accounts/value0/omnichannelSettings/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_rest_test.rb deleted file mode 100644 index 3de422202e7c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_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/shopping/merchant/accounts/v1/omnichannelsettings_pb" -require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_omnichannel_setting - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_get_omnichannel_setting_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_omnichannel_setting_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_omnichannel_setting({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_omnichannel_setting name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_omnichannel_setting({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_omnichannel_setting_client_stub.call_count - end - end - end - - def test_list_omnichannel_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse.new - http_response = OpenStruct.new 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_omnichannel_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_list_omnichannel_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_omnichannel_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_omnichannel_settings({ 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_omnichannel_settings 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_omnichannel_settings ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.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_omnichannel_settings({ 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_omnichannel_settings(::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.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_omnichannel_settings_client_stub.call_count - end - end - end - - def test_create_omnichannel_setting - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - omnichannel_setting = {} - - create_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_create_omnichannel_setting_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_omnichannel_setting_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_omnichannel_setting parent: parent, omnichannel_setting: omnichannel_setting do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_omnichannel_setting_client_stub.call_count - end - end - end - - def test_update_omnichannel_setting - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - omnichannel_setting = {} - update_mask = {} - - update_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_update_omnichannel_setting_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_omnichannel_setting_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_omnichannel_setting omnichannel_setting: omnichannel_setting, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_omnichannel_setting_client_stub.call_count - end - end - end - - def test_request_inventory_verification - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - request_inventory_verification_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_request_inventory_verification_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, request_inventory_verification_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.request_inventory_verification({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.request_inventory_verification name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.request_inventory_verification ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.request_inventory_verification({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.request_inventory_verification(::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, request_inventory_verification_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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_test.rb deleted file mode 100644 index 3787e174d401..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_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/shopping/merchant/accounts/v1/omnichannelsettings_pb" -require "google/shopping/merchant/accounts/v1/omnichannel_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_omnichannel_setting - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_omnichannel_setting, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_omnichannel_setting_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_omnichannel_setting({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_omnichannel_setting name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_omnichannel_setting({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_omnichannel_setting_client_stub.call_rpc_count - end - end - - def test_list_omnichannel_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_omnichannel_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_omnichannel_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest, 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_omnichannel_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_omnichannel_settings({ 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_omnichannel_settings 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_omnichannel_settings ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.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_omnichannel_settings({ 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_omnichannel_settings(::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.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_omnichannel_settings_client_stub.call_rpc_count - end - end - - def test_create_omnichannel_setting - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - omnichannel_setting = {} - - create_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_omnichannel_setting, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting), request["omnichannel_setting"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_omnichannel_setting_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_omnichannel_setting parent: parent, omnichannel_setting: omnichannel_setting do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_omnichannel_setting_client_stub.call_rpc_count - end - end - - def test_update_omnichannel_setting - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - omnichannel_setting = {} - update_mask = {} - - update_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_omnichannel_setting, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting), request["omnichannel_setting"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_omnichannel_setting_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_omnichannel_setting omnichannel_setting: omnichannel_setting, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, 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_omnichannel_setting({ omnichannel_setting: omnichannel_setting, 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_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, 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_omnichannel_setting_client_stub.call_rpc_count - end - end - - def test_request_inventory_verification - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_inventory_verification_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :request_inventory_verification, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, request_inventory_verification_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.request_inventory_verification({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.request_inventory_verification name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.request_inventory_verification ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.request_inventory_verification({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.request_inventory_verification(::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, request_inventory_verification_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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_paths_test.rb deleted file mode 100644 index 24232f903c3f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_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/shopping/merchant/accounts/v1/online_return_policy_service" - -class ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_online_return_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.online_return_policy_path account: "value0", return_policy: "value1" - assert_equal "accounts/value0/onlineReturnPolicies/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_rest_test.rb deleted file mode 100644 index 894d759226cf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_rest_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/rest" -require "google/shopping/merchant/accounts/v1/online_return_policy_pb" -require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_online_return_policy - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_online_return_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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_get_online_return_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_online_return_policy_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_online_return_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_online_return_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_online_return_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_online_return_policy_client_stub.call_count - end - end - end - - def test_list_online_return_policies - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse.new - http_response = OpenStruct.new 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_online_return_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_list_online_return_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_online_return_policies_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_online_return_policies({ 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_online_return_policies 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_online_return_policies ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.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_online_return_policies({ 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_online_return_policies(::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.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_online_return_policies_client_stub.call_count - end - end - end - - def test_create_online_return_policy - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - online_return_policy = {} - - create_online_return_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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_create_online_return_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_online_return_policy_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_online_return_policy parent: parent, online_return_policy: online_return_policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_online_return_policy_client_stub.call_count - end - end - end - - def test_delete_online_return_policy - # 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_online_return_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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_delete_online_return_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_online_return_policy_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_online_return_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_online_return_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_online_return_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_online_return_policy_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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb deleted file mode 100644 index 797843e167e9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb +++ /dev/null @@ -1,347 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/online_return_policy_pb" -require "google/shopping/merchant/accounts/v1/online_return_policy_service" - -class ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_online_return_policy - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_online_return_policy, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_online_return_policy_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_online_return_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_online_return_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_online_return_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_online_return_policy_client_stub.call_rpc_count - end - end - - def test_list_online_return_policies - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_online_return_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_online_return_policies, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest, 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_online_return_policies_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_online_return_policies({ 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_online_return_policies 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_online_return_policies ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.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_online_return_policies({ 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_online_return_policies(::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.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_online_return_policies_client_stub.call_rpc_count - end - end - - def test_create_online_return_policy - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - online_return_policy = {} - - create_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_online_return_policy, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy), request["online_return_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_online_return_policy_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_online_return_policy parent: parent, online_return_policy: online_return_policy do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_online_return_policy_client_stub.call_rpc_count - end - end - - def test_delete_online_return_policy - # 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_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_online_return_policy, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_online_return_policy_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_online_return_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_online_return_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_online_return_policy({ 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_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new(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_online_return_policy_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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_paths_test.rb deleted file mode 100644 index 1ef2405c401b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_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/shopping/merchant/accounts/v1/programs_service" - -class ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_program_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.program_path account: "value0", program: "value1" - assert_equal "accounts/value0/programs/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_rest_test.rb deleted file mode 100644 index a33f8b696e0c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_rest_test.rb +++ /dev/null @@ -1,317 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1/programs_pb" -require "google/shopping/merchant/accounts/v1/programs_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_program - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::Program.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ServiceStub.stub :transcode_get_program_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_program_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_program({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_program name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_program ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_program({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_program(::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_program_client_stub.call_count - end - end - end - - def test_list_programs - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse.new - http_response = OpenStruct.new 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_programs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ServiceStub.stub :transcode_list_programs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_programs_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_programs({ 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_programs 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_programs ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.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_programs({ 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_programs(::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.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_programs_client_stub.call_count - end - end - end - - def test_enable_program - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::Program.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - enable_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ServiceStub.stub :transcode_enable_program_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, enable_program_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.enable_program({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.enable_program name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.enable_program ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.enable_program({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.enable_program(::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, enable_program_client_stub.call_count - end - end - end - - def test_disable_program - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::Program.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - disable_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ServiceStub.stub :transcode_disable_program_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, disable_program_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.disable_program({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.disable_program name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.disable_program ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.disable_program({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.disable_program(::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, disable_program_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::Shopping::Merchant::Accounts::V1::ProgramsService::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::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_test.rb deleted file mode 100644 index 91499ae0270f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_test.rb +++ /dev/null @@ -1,345 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/programs_pb" -require "google/shopping/merchant/accounts/v1/programs_service" - -class ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_program - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Program.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_program, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_program_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_program({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_program name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_program ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_program({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_program(::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_program_client_stub.call_rpc_count - end - end - - def test_list_programs - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_programs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_programs, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest, 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_programs_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_programs({ 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_programs 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_programs ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.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_programs({ 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_programs(::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.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_programs_client_stub.call_rpc_count - end - end - - def test_enable_program - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Program.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - enable_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :enable_program, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, enable_program_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.enable_program({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.enable_program name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.enable_program ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.enable_program({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.enable_program(::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, enable_program_client_stub.call_rpc_count - end - end - - def test_disable_program - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Program.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - disable_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :disable_program, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, disable_program_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.disable_program({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.disable_program name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.disable_program ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.disable_program({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.disable_program(::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, disable_program_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::Shopping::Merchant::Accounts::V1::ProgramsService::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::Shopping::Merchant::Accounts::V1::ProgramsService::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::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_paths_test.rb deleted file mode 100644 index dfc2a9e6f99f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_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/shopping/merchant/accounts/v1/regions_service" - -class ::Google::Shopping::Merchant::Accounts::V1::RegionsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_region_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.region_path account: "value0", region: "value1" - assert_equal "accounts/value0/regions/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_rest_test.rb deleted file mode 100644 index ccec6752b7a8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_rest_test.rb +++ /dev/null @@ -1,539 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1/regions_pb" -require "google/shopping/merchant/accounts/v1/regions_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_region - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::Region.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_get_region_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_region_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_region({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_region name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_region ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_region({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_region(::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_region_client_stub.call_count - end - end - end - - def test_create_region - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::Region.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - region_id = "hello world" - region = {} - - create_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_create_region_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_region_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_region({ parent: parent, region_id: region_id, region: region }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_region parent: parent, region_id: region_id, region: region do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_region ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_region({ parent: parent, region_id: region_id, region: region }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_region(::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_region_client_stub.call_count - end - end - end - - def test_batch_create_regions - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - batch_create_regions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_batch_create_regions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_create_regions_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_create_regions({ parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_create_regions parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_create_regions ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest.new(parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_create_regions({ parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_create_regions(::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_create_regions_client_stub.call_count - end - end - end - - def test_update_region - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::Region.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - region = {} - update_mask = {} - - update_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_update_region_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_region_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_region({ region: region, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_region region: region, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_region ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new(region: region, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_region({ region: region, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_region(::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new(region: region, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_region_client_stub.call_count - end - end - end - - def test_batch_update_regions - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - batch_update_regions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_batch_update_regions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_update_regions_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_update_regions({ parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_update_regions parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_update_regions ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest.new(parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_update_regions({ parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_update_regions(::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_update_regions_client_stub.call_count - end - end - end - - def test_delete_region - # 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_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_delete_region_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_region_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_region({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_region name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_region ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_region({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_region(::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_region_client_stub.call_count - end - end - end - - def test_batch_delete_regions - # 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" - requests = [{}] - - batch_delete_regions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_batch_delete_regions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_delete_regions_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_delete_regions({ parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_delete_regions parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_delete_regions ::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest.new(parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_delete_regions({ parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_delete_regions(::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_delete_regions_client_stub.call_count - end - end - end - - def test_list_regions - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse.new - http_response = OpenStruct.new 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_regions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_list_regions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_regions_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_regions({ 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_regions 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_regions ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.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_regions({ 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_regions(::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.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_regions_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::Shopping::Merchant::Accounts::V1::RegionsService::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::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_test.rb deleted file mode 100644 index 2498e37aa96b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/regions_pb" -require "google/shopping/merchant/accounts/v1/regions_service" - -class ::Google::Shopping::Merchant::Accounts::V1::RegionsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_region - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Region.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_region, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_region_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_region({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_region name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_region ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_region({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_region(::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_region_client_stub.call_rpc_count - end - end - - def test_create_region - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Region.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - region_id = "hello world" - region = {} - - create_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_region, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["region_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Region), request["region"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_region_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_region({ parent: parent, region_id: region_id, region: region }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_region parent: parent, region_id: region_id, region: region do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_region ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_region({ parent: parent, region_id: region_id, region: region }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_region(::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_region_client_stub.call_rpc_count - end - end - - def test_batch_create_regions - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - batch_create_regions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_create_regions, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_create_regions_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_create_regions({ parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_create_regions parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_create_regions ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest.new(parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_create_regions({ parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_create_regions(::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_create_regions_client_stub.call_rpc_count - end - end - - def test_update_region - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Region.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - region = {} - update_mask = {} - - update_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_region, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Region), request["region"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_region_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_region({ region: region, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_region region: region, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_region ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new(region: region, 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_region({ region: region, 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_region(::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new(region: region, 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_region_client_stub.call_rpc_count - end - end - - def test_batch_update_regions - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - batch_update_regions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_update_regions, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_update_regions_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_update_regions({ parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_update_regions parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_update_regions ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest.new(parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_update_regions({ parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_update_regions(::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_update_regions_client_stub.call_rpc_count - end - end - - def test_delete_region - # 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_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_region, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_region_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_region({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_region name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_region ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_region({ 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_region(::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new(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_region_client_stub.call_rpc_count - end - end - - def test_batch_delete_regions - # 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" - requests = [{}] - - batch_delete_regions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_delete_regions, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_delete_regions_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_delete_regions({ parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_delete_regions parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_delete_regions ::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest.new(parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_delete_regions({ parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_delete_regions(::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_delete_regions_client_stub.call_rpc_count - end - end - - def test_list_regions - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_regions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_regions, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest, 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_regions_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_regions({ 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_regions 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_regions ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.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_regions({ 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_regions(::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.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_regions_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::Shopping::Merchant::Accounts::V1::RegionsService::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::Shopping::Merchant::Accounts::V1::RegionsService::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::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_paths_test.rb deleted file mode 100644 index 7b536f46ae2b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_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/shopping/merchant/accounts/v1/shipping_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_shipping_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.shipping_settings_path account: "value0" - assert_equal "accounts/value0/shippingSettings", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_rest_test.rb deleted file mode 100644 index 8359fdf326e1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1/shippingsettings_pb" -require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_shipping_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_shipping_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::ServiceStub.stub :transcode_get_shipping_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_shipping_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_shipping_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_shipping_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_shipping_settings ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_shipping_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_shipping_settings(::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_shipping_settings_client_stub.call_count - end - end - end - - def test_insert_shipping_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - shipping_setting = {} - - insert_shipping_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::ServiceStub.stub :transcode_insert_shipping_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_shipping_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_shipping_settings parent: parent, shipping_setting: shipping_setting do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_shipping_settings ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_shipping_settings(::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_shipping_settings_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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb deleted file mode 100644 index 5f66c4d2e3d3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/shippingsettings_pb" -require "google/shopping/merchant/accounts/v1/shipping_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_shipping_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_shipping_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_shipping_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_shipping_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_shipping_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_shipping_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_shipping_settings ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_shipping_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_shipping_settings(::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_shipping_settings_client_stub.call_rpc_count - end - end - - def test_insert_shipping_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - shipping_setting = {} - - insert_shipping_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_shipping_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings), request["shipping_setting"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_shipping_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_shipping_settings parent: parent, shipping_setting: shipping_setting do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_shipping_settings ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_shipping_settings(::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_shipping_settings_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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_paths_test.rb deleted file mode 100644 index 02c24e35694c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service" - -class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_terms_of_service_agreement_state_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.terms_of_service_agreement_state_path account: "value0", identifier: "value1" - assert_equal "accounts/value0/termsOfServiceAgreementStates/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_rest_test.rb deleted file mode 100644 index e4a395b398ff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_rest_test.rb +++ /dev/null @@ -1,207 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb" -require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_terms_of_service_agreement_state - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_terms_of_service_agreement_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::ServiceStub.stub :transcode_get_terms_of_service_agreement_state_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_terms_of_service_agreement_state_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_terms_of_service_agreement_state({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_terms_of_service_agreement_state name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_terms_of_service_agreement_state({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_terms_of_service_agreement_state_client_stub.call_count - end - end - end - - def test_retrieve_for_application_terms_of_service_agreement_state - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - retrieve_for_application_terms_of_service_agreement_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::ServiceStub.stub :transcode_retrieve_for_application_terms_of_service_agreement_state_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, retrieve_for_application_terms_of_service_agreement_state_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.retrieve_for_application_terms_of_service_agreement_state parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.retrieve_for_application_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.retrieve_for_application_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, retrieve_for_application_terms_of_service_agreement_state_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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb deleted file mode 100644 index d129875a1043..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb +++ /dev/null @@ -1,220 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb" -require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service" - -class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_terms_of_service_agreement_state - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_terms_of_service_agreement_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_terms_of_service_agreement_state, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_terms_of_service_agreement_state_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_terms_of_service_agreement_state({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_terms_of_service_agreement_state name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_terms_of_service_agreement_state({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_terms_of_service_agreement_state_client_stub.call_rpc_count - end - end - - def test_retrieve_for_application_terms_of_service_agreement_state - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - retrieve_for_application_terms_of_service_agreement_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :retrieve_for_application_terms_of_service_agreement_state, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest, request - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, retrieve_for_application_terms_of_service_agreement_state_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.retrieve_for_application_terms_of_service_agreement_state parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.retrieve_for_application_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.retrieve_for_application_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, retrieve_for_application_terms_of_service_agreement_state_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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_paths_test.rb deleted file mode 100644 index 69b3d964582e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_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/shopping/merchant/accounts/v1/terms_of_service_service" - -class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_terms_of_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.terms_of_service_path version: "value0" - assert_equal "termsOfService/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_rest_test.rb deleted file mode 100644 index b0f5998ca69b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_rest_test.rb +++ /dev/null @@ -1,264 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1/termsofservice_pb" -require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_terms_of_service - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::ServiceStub.stub :transcode_get_terms_of_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_terms_of_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_terms_of_service({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_terms_of_service name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_terms_of_service({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_terms_of_service_client_stub.call_count - end - end - end - - def test_retrieve_latest_terms_of_service - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - region_code = "hello world" - kind = :TERMS_OF_SERVICE_KIND_UNSPECIFIED - - retrieve_latest_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::ServiceStub.stub :transcode_retrieve_latest_terms_of_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, retrieve_latest_terms_of_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.retrieve_latest_terms_of_service region_code: region_code, kind: kind do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.retrieve_latest_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.retrieve_latest_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, retrieve_latest_terms_of_service_client_stub.call_count - end - end - end - - def test_accept_terms_of_service - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - account = "hello world" - region_code = "hello world" - - accept_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::ServiceStub.stub :transcode_accept_terms_of_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, accept_terms_of_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.accept_terms_of_service({ name: name, account: account, region_code: region_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.accept_terms_of_service name: name, account: account, region_code: region_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.accept_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.accept_terms_of_service({ name: name, account: account, region_code: region_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.accept_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, accept_terms_of_service_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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb deleted file mode 100644 index 1d66866ca978..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb +++ /dev/null @@ -1,284 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/termsofservice_pb" -require "google/shopping/merchant/accounts/v1/terms_of_service_service" - -class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_terms_of_service - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_terms_of_service, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_terms_of_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_terms_of_service({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_terms_of_service name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_terms_of_service({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_terms_of_service_client_stub.call_rpc_count - end - end - - def test_retrieve_latest_terms_of_service - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - region_code = "hello world" - kind = :TERMS_OF_SERVICE_KIND_UNSPECIFIED - - retrieve_latest_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :retrieve_latest_terms_of_service, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest, request - assert_equal "hello world", request["region_code"] - assert_equal :TERMS_OF_SERVICE_KIND_UNSPECIFIED, request["kind"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, retrieve_latest_terms_of_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.retrieve_latest_terms_of_service region_code: region_code, kind: kind do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.retrieve_latest_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.retrieve_latest_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, retrieve_latest_terms_of_service_client_stub.call_rpc_count - end - end - - def test_accept_terms_of_service - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - account = "hello world" - region_code = "hello world" - - accept_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :accept_terms_of_service, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["account"] - assert_equal "hello world", request["region_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, accept_terms_of_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.accept_terms_of_service({ name: name, account: account, region_code: region_code }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.accept_terms_of_service name: name, account: account, region_code: region_code do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.accept_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.accept_terms_of_service({ name: name, account: account, region_code: region_code }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.accept_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, accept_terms_of_service_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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_paths_test.rb deleted file mode 100644 index 12c2582215a5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_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/shopping/merchant/accounts/v1/user_service" - -class ::Google::Shopping::Merchant::Accounts::V1::UserService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_user_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.user_path account: "value0", email: "value1" - assert_equal "accounts/value0/users/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_rest_test.rb deleted file mode 100644 index 41dfbe2fd771..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_rest_test.rb +++ /dev/null @@ -1,428 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1/user_pb" -require "google/shopping/merchant/accounts/v1/user_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_user - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::User.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_get_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_user_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_user({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_user name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_user ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_user({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_user(::Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_user_client_stub.call_count - end - end - end - - def test_create_user - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::User.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - user_id = "hello world" - user = {} - - create_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_create_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_user_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_user({ parent: parent, user_id: user_id, user: user }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_user parent: parent, user_id: user_id, user: user do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_user ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new(parent: parent, user_id: user_id, user: user) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_user({ parent: parent, user_id: user_id, user: user }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_user(::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new(parent: parent, user_id: user_id, user: user), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_user_client_stub.call_count - end - end - end - - def test_delete_user - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_delete_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_user_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_user({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_user name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_user ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_user({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_user(::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_user_client_stub.call_count - end - end - end - - def test_update_user - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::User.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - user = {} - update_mask = {} - - update_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_update_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_user_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_user({ user: user, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_user user: user, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_user ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new(user: user, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_user({ user: user, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_user(::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new(user: user, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_user_client_stub.call_count - end - end - end - - def test_list_users - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse.new - http_response = OpenStruct.new 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_users_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_list_users_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_users_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_users({ 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_users 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_users ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.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_users({ 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_users(::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.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_users_client_stub.call_count - end - end - end - - def test_verify_self - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1::User.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account = "hello world" - - verify_self_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_verify_self_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, verify_self_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.verify_self({ account: account }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.verify_self account: account do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.verify_self ::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest.new(account: account) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.verify_self({ account: account }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.verify_self(::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest.new(account: account), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, verify_self_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::Shopping::Merchant::Accounts::V1::UserService::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::Shopping::Merchant::Accounts::V1::UserService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_test.rb deleted file mode 100644 index 394e97f79670..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_test.rb +++ /dev/null @@ -1,467 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1/user_pb" -require "google/shopping/merchant/accounts/v1/user_service" - -class ::Google::Shopping::Merchant::Accounts::V1::UserService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_user - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::User.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_user, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_user_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_user({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_user name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_user ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_user({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_user(::Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_user_client_stub.call_rpc_count - end - end - - def test_create_user - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::User.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - user_id = "hello world" - user = {} - - create_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_user, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["user_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::User), request["user"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_user_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_user({ parent: parent, user_id: user_id, user: user }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_user parent: parent, user_id: user_id, user: user do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_user ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new(parent: parent, user_id: user_id, user: user) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_user({ parent: parent, user_id: user_id, user: user }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_user(::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new(parent: parent, user_id: user_id, user: user), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_user_client_stub.call_rpc_count - end - end - - def test_delete_user - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_user, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_user_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_user({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_user name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_user ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_user({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_user(::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_user_client_stub.call_rpc_count - end - end - - def test_update_user - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::User.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - user = {} - update_mask = {} - - update_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_user, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::User), request["user"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_user_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_user({ user: user, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_user user: user, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_user ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new(user: user, 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_user({ user: user, 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_user(::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new(user: user, 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_user_client_stub.call_rpc_count - end - end - - def test_list_users - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_users_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_users, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest, 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_users_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_users({ 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_users 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_users ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.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_users({ 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_users(::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.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_users_client_stub.call_rpc_count - end - end - - def test_verify_self - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1::User.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account = "hello world" - - verify_self_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :verify_self, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest, request - assert_equal "hello world", request["account"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, verify_self_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.verify_self({ account: account }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.verify_self account: account do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.verify_self ::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest.new(account: account) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.verify_self({ account: account }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.verify_self(::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest.new(account: account), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, verify_self_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::Shopping::Merchant::Accounts::V1::UserService::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::Shopping::Merchant::Accounts::V1::UserService::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::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UserService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.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-shopping-merchant-accounts-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json deleted file mode 100644 index 788a554a5593..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta", - "distribution_name": "google-shopping-merchant-accounts-v1beta", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1BETA API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml deleted file mode 100644 index 5fa9eb10ddf1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-accounts-v1beta.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-shopping-merchant-accounts-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.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-shopping-merchant-accounts-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant V1BETA 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-shopping-merchant-accounts-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/AUTHENTICATION.md deleted file mode 100644 index 456fb36054bb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-accounts-v1beta 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-shopping-merchant-accounts-v1beta 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/shopping/merchant/accounts/v1beta" - -client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/accounts/v1beta" - -::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts-v1beta -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/shopping/merchant/accounts/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/README.md deleted file mode 100644 index 751c304589af..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Merchant V1BETA API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1BETA API. Most users should consider using -the main client gem, -[google-shopping-merchant-accounts](https://rubygems.org/gems/google-shopping-merchant-accounts). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-accounts-v1beta -``` - -## 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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/accounts/v1beta" - -client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new -request = ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new # (request fields as keyword arguments...) -response = client.get_account_tax request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/accounts/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-accounts-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-shopping-merchant-accounts`. -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-shopping-merchant-accounts-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Rakefile deleted file mode 100644 index dc4519177094..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta 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/shopping/merchant/accounts/v1beta/account_tax_service/credentials" - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts-v1beta 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-shopping-merchant-accounts-v1beta 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-shopping-merchant-accounts-v1beta 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-shopping-merchant-accounts-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-accounts-v1beta" - header "google-shopping-merchant-accounts-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-accounts-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-accounts-v1beta 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-shopping-merchant-accounts-v1beta 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-shopping-merchant-accounts-v1beta 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-shopping-merchant-accounts-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/gapic_metadata.json deleted file mode 100644 index c3348ff56d9c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/gapic_metadata.json +++ /dev/null @@ -1,504 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.accounts.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Accounts::V1beta", - "services": { - "AccountTaxService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client", - "rpcs": { - "GetAccountTax": { - "methods": [ - "get_account_tax" - ] - }, - "ListAccountTax": { - "methods": [ - "list_account_tax" - ] - }, - "UpdateAccountTax": { - "methods": [ - "update_account_tax" - ] - } - } - } - } - }, - "AccountIssueService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client", - "rpcs": { - "ListAccountIssues": { - "methods": [ - "list_account_issues" - ] - } - } - } - } - }, - "UserService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client", - "rpcs": { - "GetUser": { - "methods": [ - "get_user" - ] - }, - "CreateUser": { - "methods": [ - "create_user" - ] - }, - "DeleteUser": { - "methods": [ - "delete_user" - ] - }, - "UpdateUser": { - "methods": [ - "update_user" - ] - }, - "ListUsers": { - "methods": [ - "list_users" - ] - } - } - } - } - }, - "AccountsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client", - "rpcs": { - "GetAccount": { - "methods": [ - "get_account" - ] - }, - "CreateAndConfigureAccount": { - "methods": [ - "create_and_configure_account" - ] - }, - "DeleteAccount": { - "methods": [ - "delete_account" - ] - }, - "UpdateAccount": { - "methods": [ - "update_account" - ] - }, - "ListAccounts": { - "methods": [ - "list_accounts" - ] - }, - "ListSubAccounts": { - "methods": [ - "list_sub_accounts" - ] - } - } - } - } - }, - "AutofeedSettingsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client", - "rpcs": { - "GetAutofeedSettings": { - "methods": [ - "get_autofeed_settings" - ] - }, - "UpdateAutofeedSettings": { - "methods": [ - "update_autofeed_settings" - ] - } - } - } - } - }, - "AutomaticImprovementsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client", - "rpcs": { - "GetAutomaticImprovements": { - "methods": [ - "get_automatic_improvements" - ] - }, - "UpdateAutomaticImprovements": { - "methods": [ - "update_automatic_improvements" - ] - } - } - } - } - }, - "BusinessIdentityService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client", - "rpcs": { - "GetBusinessIdentity": { - "methods": [ - "get_business_identity" - ] - }, - "UpdateBusinessIdentity": { - "methods": [ - "update_business_identity" - ] - } - } - } - } - }, - "BusinessInfoService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client", - "rpcs": { - "GetBusinessInfo": { - "methods": [ - "get_business_info" - ] - }, - "UpdateBusinessInfo": { - "methods": [ - "update_business_info" - ] - } - } - } - } - }, - "CheckoutSettingsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client", - "rpcs": { - "GetCheckoutSettings": { - "methods": [ - "get_checkout_settings" - ] - }, - "CreateCheckoutSettings": { - "methods": [ - "create_checkout_settings" - ] - }, - "UpdateCheckoutSettings": { - "methods": [ - "update_checkout_settings" - ] - }, - "DeleteCheckoutSettings": { - "methods": [ - "delete_checkout_settings" - ] - } - } - } - } - }, - "EmailPreferencesService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client", - "rpcs": { - "GetEmailPreferences": { - "methods": [ - "get_email_preferences" - ] - }, - "UpdateEmailPreferences": { - "methods": [ - "update_email_preferences" - ] - } - } - } - } - }, - "GbpAccountsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client", - "rpcs": { - "ListGbpAccounts": { - "methods": [ - "list_gbp_accounts" - ] - }, - "LinkGbpAccount": { - "methods": [ - "link_gbp_account" - ] - } - } - } - } - }, - "HomepageService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client", - "rpcs": { - "GetHomepage": { - "methods": [ - "get_homepage" - ] - }, - "UpdateHomepage": { - "methods": [ - "update_homepage" - ] - }, - "ClaimHomepage": { - "methods": [ - "claim_homepage" - ] - }, - "UnclaimHomepage": { - "methods": [ - "unclaim_homepage" - ] - } - } - } - } - }, - "LfpProvidersService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client", - "rpcs": { - "FindLfpProviders": { - "methods": [ - "find_lfp_providers" - ] - }, - "LinkLfpProvider": { - "methods": [ - "link_lfp_provider" - ] - } - } - } - } - }, - "OmnichannelSettingsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client", - "rpcs": { - "GetOmnichannelSetting": { - "methods": [ - "get_omnichannel_setting" - ] - }, - "ListOmnichannelSettings": { - "methods": [ - "list_omnichannel_settings" - ] - }, - "CreateOmnichannelSetting": { - "methods": [ - "create_omnichannel_setting" - ] - }, - "UpdateOmnichannelSetting": { - "methods": [ - "update_omnichannel_setting" - ] - }, - "RequestInventoryVerification": { - "methods": [ - "request_inventory_verification" - ] - } - } - } - } - }, - "OnlineReturnPolicyService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client", - "rpcs": { - "GetOnlineReturnPolicy": { - "methods": [ - "get_online_return_policy" - ] - }, - "ListOnlineReturnPolicies": { - "methods": [ - "list_online_return_policies" - ] - }, - "CreateOnlineReturnPolicy": { - "methods": [ - "create_online_return_policy" - ] - }, - "UpdateOnlineReturnPolicy": { - "methods": [ - "update_online_return_policy" - ] - }, - "DeleteOnlineReturnPolicy": { - "methods": [ - "delete_online_return_policy" - ] - } - } - } - } - }, - "ProgramsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client", - "rpcs": { - "GetProgram": { - "methods": [ - "get_program" - ] - }, - "ListPrograms": { - "methods": [ - "list_programs" - ] - }, - "EnableProgram": { - "methods": [ - "enable_program" - ] - }, - "DisableProgram": { - "methods": [ - "disable_program" - ] - } - } - } - } - }, - "RegionsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client", - "rpcs": { - "GetRegion": { - "methods": [ - "get_region" - ] - }, - "CreateRegion": { - "methods": [ - "create_region" - ] - }, - "UpdateRegion": { - "methods": [ - "update_region" - ] - }, - "DeleteRegion": { - "methods": [ - "delete_region" - ] - }, - "ListRegions": { - "methods": [ - "list_regions" - ] - } - } - } - } - }, - "ShippingSettingsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client", - "rpcs": { - "GetShippingSettings": { - "methods": [ - "get_shipping_settings" - ] - }, - "InsertShippingSettings": { - "methods": [ - "insert_shipping_settings" - ] - } - } - } - } - }, - "TermsOfServiceService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client", - "rpcs": { - "GetTermsOfService": { - "methods": [ - "get_terms_of_service" - ] - }, - "RetrieveLatestTermsOfService": { - "methods": [ - "retrieve_latest_terms_of_service" - ] - }, - "AcceptTermsOfService": { - "methods": [ - "accept_terms_of_service" - ] - } - } - } - } - }, - "TermsOfServiceAgreementStateService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client", - "rpcs": { - "GetTermsOfServiceAgreementState": { - "methods": [ - "get_terms_of_service_agreement_state" - ] - }, - "RetrieveForApplicationTermsOfServiceAgreementState": { - "methods": [ - "retrieve_for_application_terms_of_service_agreement_state" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec deleted file mode 100644 index d4adca82cd27..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/accounts/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-accounts-v1beta" - gem.version = Google::Shopping::Merchant::Accounts::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center Accounts." - 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-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb deleted file mode 100644 index c0b2d7879e0c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.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/shopping/merchant/accounts/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb deleted file mode 100644 index e10eb5ebc89c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.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! - -require "google/shopping/merchant/accounts/v1beta/account_tax_service" -require "google/shopping/merchant/accounts/v1beta/account_issue_service" -require "google/shopping/merchant/accounts/v1beta/user_service" -require "google/shopping/merchant/accounts/v1beta/accounts_service" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" -require "google/shopping/merchant/accounts/v1beta/business_identity_service" -require "google/shopping/merchant/accounts/v1beta/business_info_service" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" -require "google/shopping/merchant/accounts/v1beta/homepage_service" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service" -require "google/shopping/merchant/accounts/v1beta/programs_service" -require "google/shopping/merchant/accounts/v1beta/regions_service" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service" -require "google/shopping/merchant/accounts/v1beta/version" - -module Google - module Shopping - module Merchant - module Accounts - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/accounts/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb deleted file mode 100644 index 49903c0040db..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/accessright.proto - -require 'google/protobuf' - - -descriptor_data = "\n:google/shopping/merchant/accounts/v1beta/accessright.proto\x12(google.shopping.merchant.accounts.v1beta*_\n\x0b\x41\x63\x63\x65ssRight\x12\x1c\n\x18\x41\x43\x43\x45SS_RIGHT_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\t\n\x05\x41\x44MIN\x10\x02\x12\x19\n\x15PERFORMANCE_REPORTING\x10\x03\x42\x92\x01\n,com.google.shopping.merchant.accounts.v1betaB\x10\x41\x63\x63\x65ssRightProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AccessRight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccessRight").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb deleted file mode 100644 index b613248a4cd9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/account_issue_service/credentials" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/paths" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/client" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support `AccountIssueService` API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/account_issue_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new - # - module AccountIssueService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "account_issue_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb deleted file mode 100644 index 0b9febb4d60a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb +++ /dev/null @@ -1,507 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/accountissue_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - ## - # Client for the AccountIssueService service. - # - # Service to support `AccountIssueService` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_issue_service_stub - - ## - # Configure the AccountIssueService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountIssueService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountIssueService 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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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 - @account_issue_service_stub.universe_domain - end - - ## - # Create a new AccountIssueService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountIssueService 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/shopping/merchant/accounts/v1beta/accountissue_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 - - @account_issue_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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 - ) - - @account_issue_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 - @account_issue_service_stub.logger - end - - # Service calls - - ## - # Lists all account issues of a Merchant Center account. - # - # @overload list_account_issues(request, options = nil) - # Pass arguments to `list_account_issues` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil) - # Pass arguments to `list_account_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of issues. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of issues to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccountIssues` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountIssues` must - # match the call that provided the page token. - # @param language_code [::String] - # Optional. The issues in the response will have human-readable fields in the - # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), - # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be - # used. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in human-readable fields. For example 'America/Los_Angeles'. - # If not set, 'America/Los_Angeles' will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new - # - # # Call the list_account_issues method. - # result = client.list_account_issues request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue. - # p item - # end - # - def list_account_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_account_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_account_issues.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_account_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_issue_service_stub.call_rpc :list_account_issues, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, 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 AccountIssueService API. - # - # This class represents the configuration for AccountIssueService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_account_issues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_issues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_issues.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountIssueService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_account_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_issues - - # @private - def initialize parent_rpcs = nil - list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues - @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb deleted file mode 100644 index bec671601e38..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_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 Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - # Credentials for the AccountIssueService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb deleted file mode 100644 index 71d24f829fad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.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 Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - # Path helper methods for the AccountIssueService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb deleted file mode 100644 index 3b76683c97dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/account_issue_service/credentials" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/paths" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support `AccountIssueService` API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new - # - module AccountIssueService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb deleted file mode 100644 index 779e41fc1c3e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb +++ /dev/null @@ -1,457 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/accountissue_pb" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - module Rest - ## - # REST client for the AccountIssueService service. - # - # Service to support `AccountIssueService` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_issue_service_stub - - ## - # Configure the AccountIssueService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountIssueService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountIssueService 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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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 - @account_issue_service_stub.universe_domain - end - - ## - # Create a new AccountIssueService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountIssueService 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 - - @account_issue_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @account_issue_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 - @account_issue_service_stub.logger - end - - # Service calls - - ## - # Lists all account issues of a Merchant Center account. - # - # @overload list_account_issues(request, options = nil) - # Pass arguments to `list_account_issues` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil) - # Pass arguments to `list_account_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of issues. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of issues to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccountIssues` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountIssues` must - # match the call that provided the page token. - # @param language_code [::String] - # Optional. The issues in the response will have human-readable fields in the - # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), - # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be - # used. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in human-readable fields. For example 'America/Los_Angeles'. - # If not set, 'America/Los_Angeles' will be used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new - # - # # Call the list_account_issues method. - # result = client.list_account_issues request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue. - # p item - # end - # - def list_account_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_account_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_account_issues.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_account_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_issue_service_stub.list_account_issues request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, "account_issues", request, result, 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 AccountIssueService REST API. - # - # This class represents the configuration for AccountIssueService 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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_issues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_issues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_issues.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountIssueService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_account_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_issues - - # @private - def initialize parent_rpcs = nil - list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues - @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb deleted file mode 100644 index 625c0f5e9a9c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.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! - -require "google/shopping/merchant/accounts/v1beta/accountissue_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - module Rest - ## - # REST service stub for the AccountIssueService 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_account_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse] - # A result object deserialized from the server's reply - def list_account_issues request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_account_issues_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_account_issues", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse.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_account_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_account_issues_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/issues", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb deleted file mode 100644 index 45fafd29eba8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/account_tax.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/accounts/v1beta/tax_rule_pb' - - -descriptor_data = "\n:google/shopping/merchant/accounts/v1beta/account_tax.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x37google/shopping/merchant/accounts/v1beta/tax_rule.proto\"\xe6\x01\n\nAccountTax\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x44\n\ttax_rules\x18\x03 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.TaxRule:i\xea\x41\x66\n%merchantapi.googleapis.com/AccountTax\x12#accounts/{account}/accounttax/{tax}*\x0c\x61\x63\x63ountTaxes2\naccountTax\"S\n\x14GetAccountTaxRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/AccountTax\"\x9a\x01\n\x17UpdateAccountTaxRequest\x12N\n\x0b\x61\x63\x63ount_tax\x18\x01 \x01(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.AccountTaxB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"}\n\x15ListAccountTaxRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%merchantapi.googleapis.com/AccountTax\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"~\n\x16ListAccountTaxResponse\x12K\n\raccount_taxes\x18\x01 \x03(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.AccountTax\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x84\x06\n\x11\x41\x63\x63ountTaxService\x12\xc5\x01\n\rGetAccountTax\x12>.google.shopping.merchant.accounts.v1beta.GetAccountTaxRequest\x1a\x34.google.shopping.merchant.accounts.v1beta.AccountTax\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{name=accounts/*/accounttax/*}\x12\xd5\x01\n\x0eListAccountTax\x12?.google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest\x1a@.google.shopping.merchant.accounts.v1beta.ListAccountTaxResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{parent=accounts/*}/accounttax\x12\x85\x02\n\x10UpdateAccountTax\x12\x41.google.shopping.merchant.accounts.v1beta.UpdateAccountTaxRequest\x1a\x34.google.shopping.merchant.accounts.v1beta.AccountTax\"x\xda\x41\x17\x61\x63\x63ount_tax,update_mask\xda\x41\x0b\x61\x63\x63ount_tax\x82\xd3\xe4\x93\x02J2;/accounts/v1beta/{account_tax.name=accounts/*/accounttax/*}:\x0b\x61\x63\x63ount_tax\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x91\x01\n,com.google.shopping.merchant.accounts.v1betaB\x0f\x41\x63\x63ountTaxProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AccountTax = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountTax").msgclass - GetAccountTaxRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAccountTaxRequest").msgclass - UpdateAccountTaxRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAccountTaxRequest").msgclass - ListAccountTaxRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest").msgclass - ListAccountTaxResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountTaxResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb deleted file mode 100644 index fe883ee6aa6c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/account_tax_service/credentials" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/paths" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/client" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/account_tax_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - module AccountTaxService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "account_tax_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb deleted file mode 100644 index 811f8a756b2a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/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/shopping/merchant/accounts/v1beta/account_tax_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - ## - # Client for the AccountTaxService service. - # - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_tax_service_stub - - ## - # Configure the AccountTaxService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountTaxService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountTaxService 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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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 - @account_tax_service_stub.universe_domain - end - - ## - # Create a new AccountTaxService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountTaxService 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/shopping/merchant/accounts/v1beta/account_tax_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 - - @account_tax_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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 - ) - - @account_tax_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 - @account_tax_service_stub.logger - end - - # Service calls - - ## - # Returns the tax rules that match the conditions of GetAccountTaxRequest - # - # @overload get_account_tax(request, options = nil) - # Pass arguments to `get_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_account_tax(name: nil) - # Pass arguments to `get_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name from which tax settings will be retrieved - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new - # - # # Call the get_account_tax method. - # result = client.get_account_tax request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p result - # - def get_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_account_tax.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.call_rpc :get_account_tax, request, 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 tax settings of the sub-accounts only in your - # Merchant Center account. - # This method can only be called on a multi-client account, otherwise it'll - # return an error. - # - # @overload list_account_tax(request, options = nil) - # Pass arguments to `list_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_account_tax(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of account tax. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of tax settings to return in the response, used for - # paging. - # @param page_token [::String] - # The token returned by the previous request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new - # - # # Call the list_account_tax method. - # result = client.list_account_tax request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p item - # end - # - def list_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_account_tax.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.call_rpc :list_account_tax, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @account_tax_service_stub, :list_account_tax, 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 the tax settings of the account. - # - # @overload update_account_tax(request, options = nil) - # Pass arguments to `update_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_account_tax(account_tax: nil, update_mask: nil) - # Pass arguments to `update_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_tax [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax, ::Hash] - # Required. The tax setting that will be updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new - # - # # Call the update_account_tax method. - # result = client.update_account_tax request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p result - # - def update_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest - - # Converts hash and nil to 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_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.account_tax&.name - header_params["account_tax.name"] = request.account_tax.name - end - - request_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_account_tax.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.call_rpc :update_account_tax, request, 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 AccountTaxService API. - # - # This class represents the configuration for AccountTaxService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_account_tax to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_tax.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_tax.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountTaxService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account_tax - ## - # RPC-specific configuration for `list_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_tax - ## - # RPC-specific configuration for `update_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account_tax - - # @private - def initialize parent_rpcs = nil - get_account_tax_config = parent_rpcs.get_account_tax if parent_rpcs.respond_to? :get_account_tax - @get_account_tax = ::Gapic::Config::Method.new get_account_tax_config - list_account_tax_config = parent_rpcs.list_account_tax if parent_rpcs.respond_to? :list_account_tax - @list_account_tax = ::Gapic::Config::Method.new list_account_tax_config - update_account_tax_config = parent_rpcs.update_account_tax if parent_rpcs.respond_to? :update_account_tax - @update_account_tax = ::Gapic::Config::Method.new update_account_tax_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb deleted file mode 100644 index fdecfb93cd56..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_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 Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - # Credentials for the AccountTaxService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb deleted file mode 100644 index 327a514a749b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_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 Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - # Path helper methods for the AccountTaxService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified AccountTax resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/accounttax/{tax}` - # - # @param account [String] - # @param tax [String] - # - # @return [::String] - def account_tax_path account:, tax: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/accounttax/#{tax}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb deleted file mode 100644 index 539c364b6e47..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/account_tax_service/credentials" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/paths" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - module AccountTaxService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb deleted file mode 100644 index 0b2b76a1feb7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb +++ /dev/null @@ -1,622 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/account_tax_pb" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - module Rest - ## - # REST client for the AccountTaxService service. - # - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_tax_service_stub - - ## - # Configure the AccountTaxService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountTaxService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountTaxService 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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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 - @account_tax_service_stub.universe_domain - end - - ## - # Create a new AccountTaxService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountTaxService 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 - - @account_tax_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @account_tax_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 - @account_tax_service_stub.logger - end - - # Service calls - - ## - # Returns the tax rules that match the conditions of GetAccountTaxRequest - # - # @overload get_account_tax(request, options = nil) - # Pass arguments to `get_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_account_tax(name: nil) - # Pass arguments to `get_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name from which tax settings will be retrieved - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new - # - # # Call the get_account_tax method. - # result = client.get_account_tax request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p result - # - def get_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_account_tax.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.get_account_tax request, 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 tax settings of the sub-accounts only in your - # Merchant Center account. - # This method can only be called on a multi-client account, otherwise it'll - # return an error. - # - # @overload list_account_tax(request, options = nil) - # Pass arguments to `list_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_account_tax(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of account tax. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of tax settings to return in the response, used for - # paging. - # @param page_token [::String] - # The token returned by the previous request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new - # - # # Call the list_account_tax method. - # result = client.list_account_tax request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p item - # end - # - def list_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_account_tax.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.list_account_tax request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @account_tax_service_stub, :list_account_tax, "account_taxes", request, result, 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 tax settings of the account. - # - # @overload update_account_tax(request, options = nil) - # Pass arguments to `update_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_account_tax(account_tax: nil, update_mask: nil) - # Pass arguments to `update_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_tax [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax, ::Hash] - # Required. The tax setting that will be updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new - # - # # Call the update_account_tax method. - # result = client.update_account_tax request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p result - # - def update_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest - - # Converts hash and nil to an 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_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_account_tax.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.update_account_tax request, 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 AccountTaxService REST API. - # - # This class represents the configuration for AccountTaxService 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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_account_tax to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_tax.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_tax.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountTaxService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account_tax - ## - # RPC-specific configuration for `list_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_tax - ## - # RPC-specific configuration for `update_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account_tax - - # @private - def initialize parent_rpcs = nil - get_account_tax_config = parent_rpcs.get_account_tax if parent_rpcs.respond_to? :get_account_tax - @get_account_tax = ::Gapic::Config::Method.new get_account_tax_config - list_account_tax_config = parent_rpcs.list_account_tax if parent_rpcs.respond_to? :list_account_tax - @list_account_tax = ::Gapic::Config::Method.new list_account_tax_config - update_account_tax_config = parent_rpcs.update_account_tax if parent_rpcs.respond_to? :update_account_tax - @update_account_tax = ::Gapic::Config::Method.new update_account_tax_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb deleted file mode 100644 index 1793880416fc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb +++ /dev/null @@ -1,267 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/account_tax_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - module Rest - ## - # REST service stub for the AccountTaxService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # A result object deserialized from the server's reply - def get_account_tax request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_account_tax_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_account_tax", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.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_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse] - # A result object deserialized from the server's reply - def list_account_tax request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_account_tax_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_account_tax", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse.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_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # A result object deserialized from the server's reply - def update_account_tax request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_account_tax_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_account_tax", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_account_tax_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/accounttax/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_account_tax_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/accounttax", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest] - # 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_account_tax_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{account_tax.name}", - body: "account_tax", - matches: [ - ["account_tax.name", %r{^accounts/[^/]+/accounttax/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb deleted file mode 100644 index 91544da451e6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/account_tax.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/account_tax_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.AccountTaxService' - - # Returns the tax rules that match the conditions of GetAccountTaxRequest - rpc :GetAccountTax, ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax - # Lists the tax settings of the sub-accounts only in your - # Merchant Center account. - # This method can only be called on a multi-client account, otherwise it'll - # return an error. - rpc :ListAccountTax, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse - # Updates the tax settings of the account. - rpc :UpdateAccountTax, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb deleted file mode 100644 index 1221df9fb2c8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/accountissue.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/shopping/type/types_pb' - - -descriptor_data = "\n;google/shopping/merchant/accounts/v1beta/accountissue.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xb7\x06\n\x0c\x41\x63\x63ountIssue\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\r\n\x05title\x18\x02 \x01(\t\x12Q\n\x08severity\x18\x03 \x01(\x0e\x32?.google.shopping.merchant.accounts.v1beta.AccountIssue.Severity\x12i\n\x15impacted_destinations\x18\x04 \x03(\x0b\x32J.google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination\x12\x0e\n\x06\x64\x65tail\x18\x05 \x01(\t\x12\x19\n\x11\x64ocumentation_uri\x18\x06 \x01(\t\x1a\xde\x02\n\x13ImpactedDestination\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x00\x88\x01\x01\x12\x62\n\x07impacts\x18\x02 \x03(\x0b\x32Q.google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination.Impact\x1ap\n\x06Impact\x12\x13\n\x0bregion_code\x18\x01 \x01(\t\x12Q\n\x08severity\x18\x02 \x01(\x0e\x32?.google.shopping.merchant.accounts.v1beta.AccountIssue.SeverityB\x14\n\x12_reporting_context\"M\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x12\x0e\n\nSUGGESTION\x10\x03:l\xea\x41i\n\'merchantapi.googleapis.com/AccountIssue\x12!accounts/{account}/issues/{issue}*\raccountIssues2\x0c\x61\x63\x63ountIssue\"\xbb\x01\n\x18ListAccountIssuesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\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\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x84\x01\n\x19ListAccountIssuesResponse\x12N\n\x0e\x61\x63\x63ount_issues\x18\x01 \x03(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.AccountIssue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xbb\x02\n\x13\x41\x63\x63ountIssueService\x12\xda\x01\n\x11ListAccountIssues\x12\x42.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest\x1a\x43.google.shopping.merchant.accounts.v1beta.ListAccountIssuesResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/accounts/v1beta/{parent=accounts/*}/issues\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x01\n,com.google.shopping.merchant.accounts.v1betaB\x11\x41\x63\x63ountIssueProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AccountIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue").msgclass - AccountIssue::ImpactedDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination").msgclass - AccountIssue::ImpactedDestination::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination.Impact").msgclass - AccountIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue.Severity").enummodule - ListAccountIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest").msgclass - ListAccountIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountIssuesResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb deleted file mode 100644 index c925c068fe0e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/accountissue.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/accountissue_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - # Service to support `AccountIssueService` API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.AccountIssueService' - - # Lists all account issues of a Merchant Center account. - rpc :ListAccountIssues, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb deleted file mode 100644 index ea1e691e4169..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/accounts.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/accounts/v1beta/accountservices_pb' -require 'google/shopping/merchant/accounts/v1beta/user_pb' -require 'google/type/datetime_pb' - - -descriptor_data = "\n7google/shopping/merchant/accounts/v1beta/accounts.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a>google/shopping/merchant/accounts/v1beta/accountservices.proto\x1a\x33google/shopping/merchant/accounts/v1beta/user.proto\x1a\x1agoogle/type/datetime.proto\"\x8a\x02\n\x07\x41\x63\x63ount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\naccount_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x61\x63\x63ount_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\radult_content\x18\x04 \x01(\x08\x12\x19\n\x0ctest_account\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12-\n\ttime_zone\x18\x06 \x01(\x0b\x32\x15.google.type.TimeZoneB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x07 \x01(\tB\x03\xe0\x41\x02:;\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\"M\n\x11GetAccountRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\"\x9f\x06\n CreateAndConfigureAccountRequest\x12G\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.AccountB\x03\xe0\x41\x02\x12O\n\x05users\x18\x02 \x03(\x0b\x32;.google.shopping.merchant.accounts.v1beta.CreateUserRequestB\x03\xe0\x41\x01\x12\x8a\x01\n\x17\x61\x63\x63\x65pt_terms_of_service\x18\x03 \x01(\x0b\x32_.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AcceptTermsOfServiceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12r\n\x07service\x18\x04 \x03(\x0b\x32\\.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AddAccountServiceB\x03\xe0\x41\x02\x1aq\n\x14\x41\x63\x63\x65ptTermsOfService\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x18\n\x0bregion_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x1a\xd0\x01\n\x11\x41\x64\x64\x41\x63\x63ountService\x12[\n\x13\x61\x63\x63ount_aggregation\x18g \x01(\x0b\x32<.google.shopping.merchant.accounts.v1beta.AccountAggregationH\x00\x12\x41\n\x08provider\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"merchantapi.googleapis.com/AccountH\x01\x88\x01\x01\x42\x0e\n\x0cservice_typeB\x0b\n\t_providerB\x1a\n\x18_accept_terms_of_service\"d\n\x14\x44\x65leteAccountRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x95\x01\n\x14UpdateAccountRequest\x12G\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.AccountB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"[\n\x13ListAccountsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"t\n\x14ListAccountsResponse\x12\x43\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x87\x01\n\x16ListSubAccountsRequest\x12<\n\x08provider\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"w\n\x17ListSubAccountsResponse\x12\x43\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xee\t\n\x0f\x41\x63\x63ountsService\x12\xaf\x01\n\nGetAccount\x12;.google.shopping.merchant.accounts.v1beta.GetAccountRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Account\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$\x12\"/accounts/v1beta/{name=accounts/*}\x12\xd3\x01\n\x19\x43reateAndConfigureAccount\x12J.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Account\"7\x82\xd3\xe4\x93\x02\x31\",/accounts/v1beta/accounts:createAndConfigure:\x01*\x12\x9a\x01\n\rDeleteAccount\x12>.google.shopping.merchant.accounts.v1beta.DeleteAccountRequest\x1a\x16.google.protobuf.Empty\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$*\"/accounts/v1beta/{name=accounts/*}\x12\xd5\x01\n\rUpdateAccount\x12>.google.shopping.merchant.accounts.v1beta.UpdateAccountRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Account\"Q\xda\x41\x13\x61\x63\x63ount,update_mask\x82\xd3\xe4\x93\x02\x35\x32*/accounts/v1beta/{account.name=accounts/*}:\x07\x61\x63\x63ount\x12\xb0\x01\n\x0cListAccounts\x12=.google.shopping.merchant.accounts.v1beta.ListAccountsRequest\x1a>.google.shopping.merchant.accounts.v1beta.ListAccountsResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/accounts/v1beta/accounts\x12\xe1\x01\n\x0fListSubAccounts\x12@.google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest\x1a\x41.google.shopping.merchant.accounts.v1beta.ListSubAccountsResponse\"I\xda\x41\x08provider\x82\xd3\xe4\x93\x02\x38\x12\x36/accounts/v1beta/{provider=accounts/*}:listSubaccounts\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8f\x01\n,com.google.shopping.merchant.accounts.v1betaB\rAccountsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Account").msgclass - GetAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAccountRequest").msgclass - CreateAndConfigureAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest").msgclass - CreateAndConfigureAccountRequest::AcceptTermsOfService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AcceptTermsOfService").msgclass - CreateAndConfigureAccountRequest::AddAccountService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AddAccountService").msgclass - DeleteAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteAccountRequest").msgclass - UpdateAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAccountRequest").msgclass - ListAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountsRequest").msgclass - ListAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountsResponse").msgclass - ListSubAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest").msgclass - ListSubAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListSubAccountsResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb deleted file mode 100644 index 1db2def8535c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/accounts_service/credentials" -require "google/shopping/merchant/accounts/v1beta/accounts_service/paths" -require "google/shopping/merchant/accounts/v1beta/accounts_service/client" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support Accounts API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/accounts_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - module AccountsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "accounts_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb deleted file mode 100644 index c63df1b0ec97..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.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! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/accounts_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - ## - # Client for the AccountsService service. - # - # Service to support Accounts API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :accounts_service_stub - - ## - # Configure the AccountsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountsService 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::Shopping::Merchant::Accounts::V1beta::AccountsService::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 - @accounts_service_stub.universe_domain - end - - ## - # Create a new AccountsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountsService 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/shopping/merchant/accounts/v1beta/accounts_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 - - @accounts_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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 - ) - - @accounts_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 - @accounts_service_stub.logger - end - - # Service calls - - ## - # Retrieves an account from your Merchant Center account. - # After inserting, updating, or deleting an account, it may take several - # minutes before changes take effect. - # - # @overload get_account(request, options = nil) - # Pass arguments to `get_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_account(name: nil) - # Pass arguments to `get_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the account to retrieve. - # Format: `accounts/{account}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new - # - # # Call the get_account method. - # result = client.get_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def get_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :get_account, request, 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 standalone Merchant Center account with additional configuration. - # Adds the user that makes the request as an admin for the new account. - # - # @overload create_and_configure_account(request, options = nil) - # Pass arguments to `create_and_configure_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_and_configure_account(account: nil, users: nil, accept_terms_of_service: nil, service: nil) - # Pass arguments to `create_and_configure_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] - # Required. The account to be created. - # @param users [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash>] - # Optional. Users to be added to the account. - # @param accept_terms_of_service [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService, ::Hash] - # Optional. The Terms of Service (ToS) to be accepted immediately upon - # account creation. - # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>] - # Required. An account service between the account to be created and the - # provider account is initialized as part of the creation. At least one such - # service needs to be provided. Currently exactly one of these needs to be - # `account_aggregation`, which means you can only create sub accounts, not - # standalone account through this method. Additional `account_management` or - # `product_management` services may be provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new - # - # # Call the create_and_configure_account method. - # result = client.create_and_configure_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def create_and_configure_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest - - # Converts hash and nil to 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_and_configure_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::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.create_and_configure_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_and_configure_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :create_and_configure_account, request, 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 account regardless of its type: standalone, MCA or - # sub-account. Deleting an MCA leads to the deletion of all of its - # sub-accounts. Executing this method requires admin access. - # The deletion succeeds only if the account does not provide services - # to any other account and has no processed offers. You can use the `force` - # parameter to override this. - # - # @overload delete_account(request, options = nil) - # Pass arguments to `delete_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_account(name: nil, force: nil) - # Pass arguments to `delete_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the account to delete. - # Format: `accounts/{account}` - # @param force [::Boolean] - # Optional. If set to `true`, the account is deleted even if it provides - # services to other accounts or has processed offers. - # - # @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/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new - # - # # Call the delete_account method. - # result = client.delete_account request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :delete_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an account regardless of its type: standalone, MCA or sub-account. - # Executing this method requires admin access. - # - # @overload update_account(request, options = nil) - # Pass arguments to `update_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_account(account: nil, update_mask: nil) - # Pass arguments to `update_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] - # Required. The new version of the account. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new - # - # # Call the update_account method. - # result = client.update_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def update_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest - - # Converts hash and nil to 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_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.account&.name - header_params["account.name"] = request.account.name - end - - request_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_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :update_account, request, 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 accounts accessible to the calling user and matching the - # constraints of the request such as page size or filters. - # This is not just listing the sub-accounts of an MCA, but all accounts the - # calling user has access to including other MCAs, linked accounts, - # standalone accounts and so on. If no filter is provided, then it returns - # accounts the user is directly added to. - # - # @overload list_accounts(request, options = nil) - # Pass arguments to `list_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_accounts(page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. Returns only accounts that match the - # [filter](/merchant/api/guides/accounts/filter). - # For more details, see the - # [filter syntax reference](/merchant/api/guides/accounts/filter-syntax). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new - # - # # Call the list_accounts method. - # result = client.list_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - # p item - # end - # - def list_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::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_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :list_accounts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_accounts, 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 all sub-accounts for a given multi client account. This is a - # convenience wrapper for the more powerful `ListAccounts` method. This - # method will produce the same results as calling `ListsAccounts` with the - # following filter: - # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` - # - # @overload list_sub_accounts(request, options = nil) - # Pass arguments to `list_sub_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_sub_accounts(provider: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_sub_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param provider [::String] - # Required. The parent account. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new - # - # # Call the list_sub_accounts method. - # result = client.list_sub_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - # p item - # end - # - def list_sub_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_sub_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.provider - header_params["provider"] = request.provider - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_sub_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_sub_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :list_sub_accounts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, 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 AccountsService API. - # - # This class represents the configuration for AccountsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_account to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::AccountsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account - ## - # RPC-specific configuration for `create_and_configure_account` - # @return [::Gapic::Config::Method] - # - attr_reader :create_and_configure_account - ## - # RPC-specific configuration for `delete_account` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_account - ## - # RPC-specific configuration for `update_account` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account - ## - # RPC-specific configuration for `list_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_accounts - ## - # RPC-specific configuration for `list_sub_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sub_accounts - - # @private - def initialize parent_rpcs = nil - get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account - @get_account = ::Gapic::Config::Method.new get_account_config - create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account - @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config - delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account - @delete_account = ::Gapic::Config::Method.new delete_account_config - update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account - @update_account = ::Gapic::Config::Method.new update_account_config - list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts - @list_accounts = ::Gapic::Config::Method.new list_accounts_config - list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts - @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb deleted file mode 100644 index d2510c2f46bd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_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 Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - # Credentials for the AccountsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb deleted file mode 100644 index 2be49373540a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.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 Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - # Path helper methods for the AccountsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified TermsOfService resource string. - # - # The resource will be in the following format: - # - # `termsOfService/{version}` - # - # @param version [String] - # - # @return [::String] - def terms_of_service_path version: - "termsOfService/#{version}" - end - - ## - # Create a fully-qualified User resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/users/{email}` - # - # @param account [String] - # @param email [String] - # - # @return [::String] - def user_path account:, email: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/users/#{email}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb deleted file mode 100644 index 0d514d6bb48c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/accounts_service/credentials" -require "google/shopping/merchant/accounts/v1beta/accounts_service/paths" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support Accounts API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - module AccountsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb deleted file mode 100644 index d6d0b6470a43..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb +++ /dev/null @@ -1,929 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/accounts_pb" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - module Rest - ## - # REST client for the AccountsService service. - # - # Service to support Accounts API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :accounts_service_stub - - ## - # Configure the AccountsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountsService 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::Shopping::Merchant::Accounts::V1beta::AccountsService::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 - @accounts_service_stub.universe_domain - end - - ## - # Create a new AccountsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountsService 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 - - @accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @accounts_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 - @accounts_service_stub.logger - end - - # Service calls - - ## - # Retrieves an account from your Merchant Center account. - # After inserting, updating, or deleting an account, it may take several - # minutes before changes take effect. - # - # @overload get_account(request, options = nil) - # Pass arguments to `get_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_account(name: nil) - # Pass arguments to `get_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the account to retrieve. - # Format: `accounts/{account}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new - # - # # Call the get_account method. - # result = client.get_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def get_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.get_account request, 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 standalone Merchant Center account with additional configuration. - # Adds the user that makes the request as an admin for the new account. - # - # @overload create_and_configure_account(request, options = nil) - # Pass arguments to `create_and_configure_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_and_configure_account(account: nil, users: nil, accept_terms_of_service: nil, service: nil) - # Pass arguments to `create_and_configure_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] - # Required. The account to be created. - # @param users [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash>] - # Optional. Users to be added to the account. - # @param accept_terms_of_service [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService, ::Hash] - # Optional. The Terms of Service (ToS) to be accepted immediately upon - # account creation. - # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>] - # Required. An account service between the account to be created and the - # provider account is initialized as part of the creation. At least one such - # service needs to be provided. Currently exactly one of these needs to be - # `account_aggregation`, which means you can only create sub accounts, not - # standalone account through this method. Additional `account_management` or - # `product_management` services may be provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new - # - # # Call the create_and_configure_account method. - # result = client.create_and_configure_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def create_and_configure_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest - - # Converts hash and nil to an 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_and_configure_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_and_configure_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_and_configure_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.create_and_configure_account request, 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 account regardless of its type: standalone, MCA or - # sub-account. Deleting an MCA leads to the deletion of all of its - # sub-accounts. Executing this method requires admin access. - # The deletion succeeds only if the account does not provide services - # to any other account and has no processed offers. You can use the `force` - # parameter to override this. - # - # @overload delete_account(request, options = nil) - # Pass arguments to `delete_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_account(name: nil, force: nil) - # Pass arguments to `delete_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the account to delete. - # Format: `accounts/{account}` - # @param force [::Boolean] - # Optional. If set to `true`, the account is deleted even if it provides - # services to other accounts or has processed offers. - # @yield [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/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new - # - # # Call the delete_account method. - # result = client.delete_account request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.delete_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an account regardless of its type: standalone, MCA or sub-account. - # Executing this method requires admin access. - # - # @overload update_account(request, options = nil) - # Pass arguments to `update_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_account(account: nil, update_mask: nil) - # Pass arguments to `update_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] - # Required. The new version of the account. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new - # - # # Call the update_account method. - # result = client.update_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def update_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest - - # Converts hash and nil to an 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_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.update_account request, 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 accounts accessible to the calling user and matching the - # constraints of the request such as page size or filters. - # This is not just listing the sub-accounts of an MCA, but all accounts the - # calling user has access to including other MCAs, linked accounts, - # standalone accounts and so on. If no filter is provided, then it returns - # accounts the user is directly added to. - # - # @overload list_accounts(request, options = nil) - # Pass arguments to `list_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_accounts(page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. Returns only accounts that match the - # [filter](/merchant/api/guides/accounts/filter). - # For more details, see the - # [filter syntax reference](/merchant/api/guides/accounts/filter-syntax). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new - # - # # Call the list_accounts method. - # result = client.list_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - # p item - # end - # - def list_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.list_accounts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_accounts, "accounts", request, result, 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 all sub-accounts for a given multi client account. This is a - # convenience wrapper for the more powerful `ListAccounts` method. This - # method will produce the same results as calling `ListsAccounts` with the - # following filter: - # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` - # - # @overload list_sub_accounts(request, options = nil) - # Pass arguments to `list_sub_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_sub_accounts(provider: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_sub_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param provider [::String] - # Required. The parent account. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new - # - # # Call the list_sub_accounts method. - # result = client.list_sub_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - # p item - # end - # - def list_sub_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_sub_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_sub_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_sub_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.list_sub_accounts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, "accounts", request, result, 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 AccountsService REST API. - # - # This class represents the configuration for AccountsService 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::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_account to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account - ## - # RPC-specific configuration for `create_and_configure_account` - # @return [::Gapic::Config::Method] - # - attr_reader :create_and_configure_account - ## - # RPC-specific configuration for `delete_account` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_account - ## - # RPC-specific configuration for `update_account` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account - ## - # RPC-specific configuration for `list_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_accounts - ## - # RPC-specific configuration for `list_sub_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sub_accounts - - # @private - def initialize parent_rpcs = nil - get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account - @get_account = ::Gapic::Config::Method.new get_account_config - create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account - @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config - delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account - @delete_account = ::Gapic::Config::Method.new delete_account_config - update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account - @update_account = ::Gapic::Config::Method.new update_account_config - list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts - @list_accounts = ::Gapic::Config::Method.new list_accounts_config - list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts - @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb deleted file mode 100644 index d62c09e78506..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb +++ /dev/null @@ -1,447 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/accounts_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - module Rest - ## - # REST service stub for the AccountsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # A result object deserialized from the server's reply - def get_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.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_and_configure_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # A result object deserialized from the server's reply - def create_and_configure_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_and_configure_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_and_configure_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.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_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_account", - 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 update_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # A result object deserialized from the server's reply - def update_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.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_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse] - # A result object deserialized from the server's reply - def list_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_accounts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse.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_sub_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse] - # A result object deserialized from the server's reply - def list_sub_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_sub_accounts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_sub_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_and_configure_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest] - # 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_and_configure_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/accounts:createAndConfigure", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest] - # 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_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{account.name}", - body: "account", - matches: [ - ["account.name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/accounts", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_sub_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_sub_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{provider}:listSubaccounts", - matches: [ - ["provider", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb deleted file mode 100644 index df57e5bd28dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb +++ /dev/null @@ -1,75 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/accounts.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/accounts_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - # Service to support Accounts API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.AccountsService' - - # Retrieves an account from your Merchant Center account. - # After inserting, updating, or deleting an account, it may take several - # minutes before changes take effect. - rpc :GetAccount, ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Account - # Creates a standalone Merchant Center account with additional configuration. - # Adds the user that makes the request as an admin for the new account. - rpc :CreateAndConfigureAccount, ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Account - # Deletes the specified account regardless of its type: standalone, MCA or - # sub-account. Deleting an MCA leads to the deletion of all of its - # sub-accounts. Executing this method requires admin access. - # The deletion succeeds only if the account does not provide services - # to any other account and has no processed offers. You can use the `force` - # parameter to override this. - rpc :DeleteAccount, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, ::Google::Protobuf::Empty - # Updates an account regardless of its type: standalone, MCA or sub-account. - # Executing this method requires admin access. - rpc :UpdateAccount, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Account - # Lists accounts accessible to the calling user and matching the - # constraints of the request such as page size or filters. - # This is not just listing the sub-accounts of an MCA, but all accounts the - # calling user has access to including other MCAs, linked accounts, - # standalone accounts and so on. If no filter is provided, then it returns - # accounts the user is directly added to. - rpc :ListAccounts, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse - # List all sub-accounts for a given multi client account. This is a - # convenience wrapper for the more powerful `ListAccounts` method. This - # method will produce the same results as calling `ListsAccounts` with the - # following filter: - # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` - rpc :ListSubAccounts, ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb deleted file mode 100644 index cf8e6a5da5cb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/accountservices.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/shopping/merchant/accounts/v1beta/accountservices.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x14\n\x12\x41\x63\x63ountAggregationB\x96\x01\n,com.google.shopping.merchant.accounts.v1betaB\x14\x41\x63\x63ountServicesProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AccountAggregation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountAggregation").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb deleted file mode 100644 index 2d2bb35eeb25..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new - # - module AutofeedSettingsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "autofeed_settings_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb deleted file mode 100644 index 78494e643071..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb +++ /dev/null @@ -1,577 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/autofeedsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - ## - # Client for the AutofeedSettingsService service. - # - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :autofeed_settings_service_stub - - ## - # Configure the AutofeedSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutofeedSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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 - @autofeed_settings_service_stub.universe_domain - end - - ## - # Create a new AutofeedSettingsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutofeedSettingsService 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/shopping/merchant/accounts/v1beta/autofeedsettings_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 - - @autofeed_settings_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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 - ) - - @autofeed_settings_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 - @autofeed_settings_service_stub.logger - end - - # Service calls - - ## - # Retrieves the autofeed settings of an account. - # - # @overload get_autofeed_settings(request, options = nil) - # Pass arguments to `get_autofeed_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_autofeed_settings(name: nil) - # Pass arguments to `get_autofeed_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the autofeed settings. - # Format: `accounts/{account}/autofeedSettings` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new - # - # # Call the get_autofeed_settings method. - # result = client.get_autofeed_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - # p result - # - def get_autofeed_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_autofeed_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_autofeed_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_autofeed_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @autofeed_settings_service_stub.call_rpc :get_autofeed_settings, request, 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 autofeed settings of an account. - # - # @overload update_autofeed_settings(request, options = nil) - # Pass arguments to `update_autofeed_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_autofeed_settings(autofeed_settings: nil, update_mask: nil) - # Pass arguments to `update_autofeed_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param autofeed_settings [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings, ::Hash] - # Required. The new version of the autofeed setting. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new - # - # # Call the update_autofeed_settings method. - # result = client.update_autofeed_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - # p result - # - def update_autofeed_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest - - # Converts hash and nil to 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_autofeed_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.autofeed_settings&.name - header_params["autofeed_settings.name"] = request.autofeed_settings.name - end - - request_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_autofeed_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_autofeed_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @autofeed_settings_service_stub.call_rpc :update_autofeed_settings, request, 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 AutofeedSettingsService API. - # - # This class represents the configuration for AutofeedSettingsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_autofeed_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_autofeed_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_autofeed_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AutofeedSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_autofeed_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_autofeed_settings - ## - # RPC-specific configuration for `update_autofeed_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_autofeed_settings - - # @private - def initialize parent_rpcs = nil - get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings - @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config - update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings - @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb deleted file mode 100644 index 2ebbb8b964ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_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 Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - # Credentials for the AutofeedSettingsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb deleted file mode 100644 index 4e13a4e879c1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.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 Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - # Path helper methods for the AutofeedSettingsService API. - module Paths - ## - # Create a fully-qualified AutofeedSettings resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/autofeedSettings` - # - # @param account [String] - # - # @return [::String] - def autofeed_settings_path account: - "accounts/#{account}/autofeedSettings" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb deleted file mode 100644 index 089d4e01e4f1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new - # - module AutofeedSettingsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb deleted file mode 100644 index 7ae670abf44d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb +++ /dev/null @@ -1,520 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/autofeedsettings_pb" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - module Rest - ## - # REST client for the AutofeedSettingsService service. - # - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :autofeed_settings_service_stub - - ## - # Configure the AutofeedSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutofeedSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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 - @autofeed_settings_service_stub.universe_domain - end - - ## - # Create a new AutofeedSettingsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutofeedSettingsService 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 - - @autofeed_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @autofeed_settings_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 - @autofeed_settings_service_stub.logger - end - - # Service calls - - ## - # Retrieves the autofeed settings of an account. - # - # @overload get_autofeed_settings(request, options = nil) - # Pass arguments to `get_autofeed_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_autofeed_settings(name: nil) - # Pass arguments to `get_autofeed_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the autofeed settings. - # Format: `accounts/{account}/autofeedSettings` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new - # - # # Call the get_autofeed_settings method. - # result = client.get_autofeed_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - # p result - # - def get_autofeed_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_autofeed_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_autofeed_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_autofeed_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @autofeed_settings_service_stub.get_autofeed_settings request, 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 autofeed settings of an account. - # - # @overload update_autofeed_settings(request, options = nil) - # Pass arguments to `update_autofeed_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_autofeed_settings(autofeed_settings: nil, update_mask: nil) - # Pass arguments to `update_autofeed_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param autofeed_settings [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings, ::Hash] - # Required. The new version of the autofeed setting. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new - # - # # Call the update_autofeed_settings method. - # result = client.update_autofeed_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - # p result - # - def update_autofeed_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest - - # Converts hash and nil to an 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_autofeed_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_autofeed_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_autofeed_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @autofeed_settings_service_stub.update_autofeed_settings request, 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 AutofeedSettingsService REST API. - # - # This class represents the configuration for AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_autofeed_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_autofeed_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_autofeed_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AutofeedSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_autofeed_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_autofeed_settings - ## - # RPC-specific configuration for `update_autofeed_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_autofeed_settings - - # @private - def initialize parent_rpcs = nil - get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings - @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config - update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings - @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb deleted file mode 100644 index 31c104de3eab..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - module Rest - ## - # REST service stub for the AutofeedSettingsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_autofeed_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # A result object deserialized from the server's reply - def get_autofeed_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_autofeed_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_autofeed_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.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_autofeed_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # A result object deserialized from the server's reply - def update_autofeed_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_autofeed_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_autofeed_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_autofeed_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_autofeed_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/autofeedSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_autofeed_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest] - # 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_autofeed_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{autofeed_settings.name}", - body: "autofeed_settings", - matches: [ - ["autofeed_settings.name", %r{^accounts/[^/]+/autofeedSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb deleted file mode 100644 index d9f92c16c605..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/autofeedsettings.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/autofeedsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xd5\x01\n\x10\x41utofeedSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0f\x65nable_products\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02\x12\x15\n\x08\x65ligible\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03:y\xea\x41v\n+merchantapi.googleapis.com/AutofeedSettings\x12#accounts/{account}/autofeedSettings*\x10\x61utofeedSettings2\x10\x61utofeedSettings\"_\n\x1aGetAutofeedSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/AutofeedSettings\"\xb1\x01\n\x1dUpdateAutofeedSettingsRequest\x12Z\n\x11\x61utofeed_settings\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.AutofeedSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xe3\x04\n\x17\x41utofeedSettingsService\x12\xdb\x01\n\x13GetAutofeedSettings\x12\x44.google.shopping.merchant.accounts.v1beta.GetAutofeedSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.AutofeedSettings\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/accounts/v1beta/{name=accounts/*/autofeedSettings}\x12\xa0\x02\n\x16UpdateAutofeedSettings\x12G.google.shopping.merchant.accounts.v1beta.UpdateAutofeedSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.AutofeedSettings\"\x80\x01\xda\x41\x1d\x61utofeed_settings,update_mask\x82\xd3\xe4\x93\x02Z2E/accounts/v1beta/{autofeed_settings.name=accounts/*/autofeedSettings}:\x11\x61utofeed_settings\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x41utofeedSettingsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AutofeedSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutofeedSettings").msgclass - GetAutofeedSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAutofeedSettingsRequest").msgclass - UpdateAutofeedSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAutofeedSettingsRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb deleted file mode 100644 index 700b9a9139ef..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/autofeedsettings.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/autofeedsettings_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.AutofeedSettingsService' - - # Retrieves the autofeed settings of an account. - rpc :GetAutofeedSettings, ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings - # Updates the autofeed settings of an account. - rpc :UpdateAutofeedSettings, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb deleted file mode 100644 index f49e147087f1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new - # - module AutomaticImprovementsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "automatic_improvements_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb deleted file mode 100644 index c9c3ddb45feb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb +++ /dev/null @@ -1,587 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/automaticimprovements_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - ## - # Client for the AutomaticImprovementsService service. - # - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :automatic_improvements_service_stub - - ## - # Configure the AutomaticImprovementsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutomaticImprovementsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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 - @automatic_improvements_service_stub.universe_domain - end - - ## - # Create a new AutomaticImprovementsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutomaticImprovementsService 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/shopping/merchant/accounts/v1beta/automaticimprovements_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 - - @automatic_improvements_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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 - ) - - @automatic_improvements_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 - @automatic_improvements_service_stub.logger - end - - # Service calls - - ## - # Retrieves the automatic improvements of an account. - # - # @overload get_automatic_improvements(request, options = nil) - # Pass arguments to `get_automatic_improvements` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_automatic_improvements(name: nil) - # Pass arguments to `get_automatic_improvements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the automatic improvements. - # Format: `accounts/{account}/automaticImprovements` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new - # - # # Call the get_automatic_improvements method. - # result = client.get_automatic_improvements request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - # p result - # - def get_automatic_improvements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_automatic_improvements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_automatic_improvements.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_automatic_improvements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @automatic_improvements_service_stub.call_rpc :get_automatic_improvements, request, 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 automatic improvements of an account. - # - # @overload update_automatic_improvements(request, options = nil) - # Pass arguments to `update_automatic_improvements` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_automatic_improvements(automatic_improvements: nil, update_mask: nil) - # Pass arguments to `update_automatic_improvements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param automatic_improvements [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements, ::Hash] - # Required. The new version of the automatic imrovements. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `item_updates` - # - `item_updates.account_level_settings` - # - `image_improvements` - # - `image_improvements.account_level_settings` - # - `shipping_improvements` - # - `shipping_improvements.allow_shipping_improvements` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new - # - # # Call the update_automatic_improvements method. - # result = client.update_automatic_improvements request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - # p result - # - def update_automatic_improvements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest - - # Converts hash and nil to 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_automatic_improvements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.automatic_improvements&.name - header_params["automatic_improvements.name"] = request.automatic_improvements.name - end - - request_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_automatic_improvements.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_automatic_improvements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @automatic_improvements_service_stub.call_rpc :update_automatic_improvements, request, 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 AutomaticImprovementsService API. - # - # This class represents the configuration for AutomaticImprovementsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_automatic_improvements to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_automatic_improvements.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_automatic_improvements.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AutomaticImprovementsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_automatic_improvements` - # @return [::Gapic::Config::Method] - # - attr_reader :get_automatic_improvements - ## - # RPC-specific configuration for `update_automatic_improvements` - # @return [::Gapic::Config::Method] - # - attr_reader :update_automatic_improvements - - # @private - def initialize parent_rpcs = nil - get_automatic_improvements_config = parent_rpcs.get_automatic_improvements if parent_rpcs.respond_to? :get_automatic_improvements - @get_automatic_improvements = ::Gapic::Config::Method.new get_automatic_improvements_config - update_automatic_improvements_config = parent_rpcs.update_automatic_improvements if parent_rpcs.respond_to? :update_automatic_improvements - @update_automatic_improvements = ::Gapic::Config::Method.new update_automatic_improvements_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb deleted file mode 100644 index f8387a866b10..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_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 Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - # Credentials for the AutomaticImprovementsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb deleted file mode 100644 index 9450fc09a397..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.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 Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - # Path helper methods for the AutomaticImprovementsService API. - module Paths - ## - # Create a fully-qualified AutomaticImprovements resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/automaticImprovements` - # - # @param account [String] - # - # @return [::String] - def automatic_improvements_path account: - "accounts/#{account}/automaticImprovements" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb deleted file mode 100644 index 351bcf6d3b94..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new - # - module AutomaticImprovementsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb deleted file mode 100644 index 935b0c3c30d9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/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/shopping/merchant/accounts/v1beta/automaticimprovements_pb" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - module Rest - ## - # REST client for the AutomaticImprovementsService service. - # - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :automatic_improvements_service_stub - - ## - # Configure the AutomaticImprovementsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutomaticImprovementsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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 - @automatic_improvements_service_stub.universe_domain - end - - ## - # Create a new AutomaticImprovementsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutomaticImprovementsService 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 - - @automatic_improvements_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @automatic_improvements_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 - @automatic_improvements_service_stub.logger - end - - # Service calls - - ## - # Retrieves the automatic improvements of an account. - # - # @overload get_automatic_improvements(request, options = nil) - # Pass arguments to `get_automatic_improvements` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_automatic_improvements(name: nil) - # Pass arguments to `get_automatic_improvements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the automatic improvements. - # Format: `accounts/{account}/automaticImprovements` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new - # - # # Call the get_automatic_improvements method. - # result = client.get_automatic_improvements request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - # p result - # - def get_automatic_improvements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_automatic_improvements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_automatic_improvements.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_automatic_improvements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @automatic_improvements_service_stub.get_automatic_improvements request, 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 automatic improvements of an account. - # - # @overload update_automatic_improvements(request, options = nil) - # Pass arguments to `update_automatic_improvements` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_automatic_improvements(automatic_improvements: nil, update_mask: nil) - # Pass arguments to `update_automatic_improvements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param automatic_improvements [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements, ::Hash] - # Required. The new version of the automatic imrovements. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `item_updates` - # - `item_updates.account_level_settings` - # - `image_improvements` - # - `image_improvements.account_level_settings` - # - `shipping_improvements` - # - `shipping_improvements.allow_shipping_improvements` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new - # - # # Call the update_automatic_improvements method. - # result = client.update_automatic_improvements request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - # p result - # - def update_automatic_improvements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest - - # Converts hash and nil to an 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_automatic_improvements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_automatic_improvements.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_automatic_improvements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @automatic_improvements_service_stub.update_automatic_improvements request, 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 AutomaticImprovementsService REST API. - # - # This class represents the configuration for AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_automatic_improvements to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_automatic_improvements.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_automatic_improvements.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AutomaticImprovementsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_automatic_improvements` - # @return [::Gapic::Config::Method] - # - attr_reader :get_automatic_improvements - ## - # RPC-specific configuration for `update_automatic_improvements` - # @return [::Gapic::Config::Method] - # - attr_reader :update_automatic_improvements - - # @private - def initialize parent_rpcs = nil - get_automatic_improvements_config = parent_rpcs.get_automatic_improvements if parent_rpcs.respond_to? :get_automatic_improvements - @get_automatic_improvements = ::Gapic::Config::Method.new get_automatic_improvements_config - update_automatic_improvements_config = parent_rpcs.update_automatic_improvements if parent_rpcs.respond_to? :update_automatic_improvements - @update_automatic_improvements = ::Gapic::Config::Method.new update_automatic_improvements_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb deleted file mode 100644 index 3b8079dd1fa9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - module Rest - ## - # REST service stub for the AutomaticImprovementsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_automatic_improvements REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # A result object deserialized from the server's reply - def get_automatic_improvements request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_automatic_improvements_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_automatic_improvements", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.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_automatic_improvements REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # A result object deserialized from the server's reply - def update_automatic_improvements request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_automatic_improvements_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_automatic_improvements", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_automatic_improvements REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_automatic_improvements_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/automaticImprovements/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_automatic_improvements REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest] - # 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_automatic_improvements_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{automatic_improvements.name}", - body: "automatic_improvements", - matches: [ - ["automatic_improvements.name", %r{^accounts/[^/]+/automaticImprovements/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb deleted file mode 100644 index d9465d26faaa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/automaticimprovements.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\nDgoogle/shopping/merchant/accounts/v1beta/automaticimprovements.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xac\x04\n\x15\x41utomaticImprovements\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12Y\n\x0citem_updates\x18\x02 \x01(\x0b\x32>.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdatesH\x00\x88\x01\x01\x12\x65\n\x12image_improvements\x18\x03 \x01(\x0b\x32\x44.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovementsH\x01\x88\x01\x01\x12k\n\x15shipping_improvements\x18\x04 \x01(\x0b\x32G.google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovementsH\x02\x88\x01\x01:\x8e\x01\xea\x41\x8a\x01\n0merchantapi.googleapis.com/AutomaticImprovements\x12(accounts/{account}/automaticImprovements*\x15\x61utomaticImprovements2\x15\x61utomaticImprovementsB\x0f\n\r_item_updatesB\x15\n\x13_image_improvementsB\x18\n\x16_shipping_improvements\"\xaa\x05\n\x14\x41utomaticItemUpdates\x12\x8a\x01\n\x1d\x61\x63\x63ount_item_updates_settings\x18\x01 \x01(\x0b\x32^.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettingsB\x03\xe0\x41\x01\x12*\n\x1d\x65\x66\x66\x65\x63tive_allow_price_updates\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\x31\n$effective_allow_availability_updates\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12\x38\n+effective_allow_strict_availability_updates\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12.\n!effective_allow_condition_updates\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x1a\xbb\x02\n\x1fItemUpdatesAccountLevelSettings\x12 \n\x13\x61llow_price_updates\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\'\n\x1a\x61llow_availability_updates\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12.\n!allow_strict_availability_updates\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12$\n\x17\x61llow_condition_updates\x18\x04 \x01(\x08H\x03\x88\x01\x01\x42\x16\n\x14_allow_price_updatesB\x1d\n\x1b_allow_availability_updatesB$\n\"_allow_strict_availability_updatesB\x1a\n\x18_allow_condition_updates\"\xa4\x03\n\x1a\x41utomaticImageImprovements\x12\xa1\x01\n#account_image_improvements_settings\x18\x01 \x01(\x0b\x32j.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettingsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x39\n,effective_allow_automatic_image_improvements\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x1a\x7f\n%ImageImprovementsAccountLevelSettings\x12/\n\"allow_automatic_image_improvements\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42%\n#_allow_automatic_image_improvementsB&\n$_account_image_improvements_settings\"i\n\x1d\x41utomaticShippingImprovements\x12(\n\x1b\x61llow_shipping_improvements\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x1e\n\x1c_allow_shipping_improvements\"i\n\x1fGetAutomaticImprovementsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/AutomaticImprovements\"\xc0\x01\n\"UpdateAutomaticImprovementsRequest\x12\x64\n\x16\x61utomatic_improvements\x18\x01 \x01(\x0b\x32?.google.shopping.merchant.accounts.v1beta.AutomaticImprovementsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\x9f\x05\n\x1c\x41utomaticImprovementsService\x12\xef\x01\n\x18GetAutomaticImprovements\x12I.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest\x1a?.google.shopping.merchant.accounts.v1beta.AutomaticImprovements\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/accounts/v1beta/{name=accounts/*/automaticImprovements}\x12\xc3\x02\n\x1bUpdateAutomaticImprovements\x12L.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest\x1a?.google.shopping.merchant.accounts.v1beta.AutomaticImprovements\"\x94\x01\xda\x41\"automatic_improvements,update_mask\x82\xd3\xe4\x93\x02i2O/accounts/v1beta/{automatic_improvements.name=accounts/*/automaticImprovements}:\x16\x61utomatic_improvements\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x9c\x01\n,com.google.shopping.merchant.accounts.v1betaB\x1a\x41utomaticImprovementsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AutomaticImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticImprovements").msgclass - AutomaticItemUpdates = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates").msgclass - AutomaticItemUpdates::ItemUpdatesAccountLevelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings").msgclass - AutomaticImageImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements").msgclass - AutomaticImageImprovements::ImageImprovementsAccountLevelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings").msgclass - AutomaticShippingImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements").msgclass - GetAutomaticImprovementsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest").msgclass - UpdateAutomaticImprovementsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb deleted file mode 100644 index 50bbf1aa06a2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/automaticimprovements.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/automaticimprovements_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService' - - # Retrieves the automatic improvements of an account. - rpc :GetAutomaticImprovements, ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements - # Updates the automatic improvements of an account. - rpc :UpdateAutomaticImprovements, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb deleted file mode 100644 index d43f48202612..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/business_identity_service/credentials" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/paths" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/client" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/business_identity_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new - # - module BusinessIdentityService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "business_identity_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb deleted file mode 100644 index 83a197b183b7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb +++ /dev/null @@ -1,578 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/businessidentity_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - ## - # Client for the BusinessIdentityService service. - # - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_identity_service_stub - - ## - # Configure the BusinessIdentityService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessIdentityService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessIdentityService 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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @business_identity_service_stub.universe_domain - end - - ## - # Create a new BusinessIdentityService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessIdentityService 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/shopping/merchant/accounts/v1beta/businessidentity_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 - - @business_identity_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @business_identity_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 - @business_identity_service_stub.logger - end - - # Service calls - - ## - # Retrieves the business identity of an account. - # - # @overload get_business_identity(request, options = nil) - # Pass arguments to `get_business_identity` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_business_identity(name: nil) - # Pass arguments to `get_business_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the business identity. - # Format: `accounts/{account}/businessIdentity` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new - # - # # Call the get_business_identity method. - # result = client.get_business_identity request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - # p result - # - def get_business_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_business_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_business_identity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_business_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_identity_service_stub.call_rpc :get_business_identity, request, 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 business identity of an account. Executing this method requires - # admin access. - # - # @overload update_business_identity(request, options = nil) - # Pass arguments to `update_business_identity` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_business_identity(business_identity: nil, update_mask: nil) - # Pass arguments to `update_business_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param business_identity [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity, ::Hash] - # Required. The new version of the business identity. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new - # - # # Call the update_business_identity method. - # result = client.update_business_identity request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - # p result - # - def update_business_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest - - # Converts hash and nil to 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_business_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.business_identity&.name - header_params["business_identity.name"] = request.business_identity.name - end - - request_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_business_identity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_business_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_identity_service_stub.call_rpc :update_business_identity, request, 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 BusinessIdentityService API. - # - # This class represents the configuration for BusinessIdentityService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_business_identity to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_identity.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_identity.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 BusinessIdentityService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_business_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :get_business_identity - ## - # RPC-specific configuration for `update_business_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :update_business_identity - - # @private - def initialize parent_rpcs = nil - get_business_identity_config = parent_rpcs.get_business_identity if parent_rpcs.respond_to? :get_business_identity - @get_business_identity = ::Gapic::Config::Method.new get_business_identity_config - update_business_identity_config = parent_rpcs.update_business_identity if parent_rpcs.respond_to? :update_business_identity - @update_business_identity = ::Gapic::Config::Method.new update_business_identity_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb deleted file mode 100644 index 411d0a8452ca..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_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 Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - # Credentials for the BusinessIdentityService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb deleted file mode 100644 index 684dbc65841c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.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 Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - # Path helper methods for the BusinessIdentityService API. - module Paths - ## - # Create a fully-qualified BusinessIdentity resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/businessIdentity` - # - # @param account [String] - # - # @return [::String] - def business_identity_path account: - "accounts/#{account}/businessIdentity" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb deleted file mode 100644 index d1f0814edc5c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/business_identity_service/credentials" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/paths" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new - # - module BusinessIdentityService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb deleted file mode 100644 index 3a57198332af..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.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! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - module Rest - ## - # REST client for the BusinessIdentityService service. - # - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_identity_service_stub - - ## - # Configure the BusinessIdentityService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessIdentityService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessIdentityService 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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @business_identity_service_stub.universe_domain - end - - ## - # Create a new BusinessIdentityService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessIdentityService 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 - - @business_identity_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @business_identity_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 - @business_identity_service_stub.logger - end - - # Service calls - - ## - # Retrieves the business identity of an account. - # - # @overload get_business_identity(request, options = nil) - # Pass arguments to `get_business_identity` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_business_identity(name: nil) - # Pass arguments to `get_business_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the business identity. - # Format: `accounts/{account}/businessIdentity` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new - # - # # Call the get_business_identity method. - # result = client.get_business_identity request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - # p result - # - def get_business_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_business_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_business_identity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_business_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_identity_service_stub.get_business_identity request, 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 business identity of an account. Executing this method requires - # admin access. - # - # @overload update_business_identity(request, options = nil) - # Pass arguments to `update_business_identity` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_business_identity(business_identity: nil, update_mask: nil) - # Pass arguments to `update_business_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param business_identity [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity, ::Hash] - # Required. The new version of the business identity. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new - # - # # Call the update_business_identity method. - # result = client.update_business_identity request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - # p result - # - def update_business_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest - - # Converts hash and nil to an 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_business_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_business_identity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_business_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_identity_service_stub.update_business_identity request, 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 BusinessIdentityService REST API. - # - # This class represents the configuration for BusinessIdentityService 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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_business_identity to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_identity.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_identity.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 BusinessIdentityService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_business_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :get_business_identity - ## - # RPC-specific configuration for `update_business_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :update_business_identity - - # @private - def initialize parent_rpcs = nil - get_business_identity_config = parent_rpcs.get_business_identity if parent_rpcs.respond_to? :get_business_identity - @get_business_identity = ::Gapic::Config::Method.new get_business_identity_config - update_business_identity_config = parent_rpcs.update_business_identity if parent_rpcs.respond_to? :update_business_identity - @update_business_identity = ::Gapic::Config::Method.new update_business_identity_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb deleted file mode 100644 index 650d5181843f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - module Rest - ## - # REST service stub for the BusinessIdentityService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_business_identity REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # A result object deserialized from the server's reply - def get_business_identity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_business_identity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_business_identity", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.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_business_identity REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # A result object deserialized from the server's reply - def update_business_identity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_business_identity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_business_identity", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_business_identity REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_business_identity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/businessIdentity/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_business_identity REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest] - # 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_business_identity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{business_identity.name}", - body: "business_identity", - matches: [ - ["business_identity.name", %r{^accounts/[^/]+/businessIdentity/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb deleted file mode 100644 index 6bc1a26ad17a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/business_info_service/credentials" -require "google/shopping/merchant/accounts/v1beta/business_info_service/paths" -require "google/shopping/merchant/accounts/v1beta/business_info_service/client" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support business info API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/business_info_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new - # - module BusinessInfoService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "business_info_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/business_info_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb deleted file mode 100644 index 3dc96f0ac02f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb +++ /dev/null @@ -1,577 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/businessinfo_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - ## - # Client for the BusinessInfoService service. - # - # Service to support business info API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_info_service_stub - - ## - # Configure the BusinessInfoService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessInfoService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessInfoService 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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @business_info_service_stub.universe_domain - end - - ## - # Create a new BusinessInfoService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessInfoService 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/shopping/merchant/accounts/v1beta/businessinfo_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 - - @business_info_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @business_info_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 - @business_info_service_stub.logger - end - - # Service calls - - ## - # Retrieves the business info of an account. - # - # @overload get_business_info(request, options = nil) - # Pass arguments to `get_business_info` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_business_info(name: nil) - # Pass arguments to `get_business_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the business info. - # Format: `accounts/{account}/businessInfo` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new - # - # # Call the get_business_info method. - # result = client.get_business_info request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - # p result - # - def get_business_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_business_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_business_info.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_business_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_info_service_stub.call_rpc :get_business_info, request, 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 business info of an account. Executing this method requires - # admin access. - # - # @overload update_business_info(request, options = nil) - # Pass arguments to `update_business_info` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_business_info(business_info: nil, update_mask: nil) - # Pass arguments to `update_business_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param business_info [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo, ::Hash] - # Required. The new version of the business info. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new - # - # # Call the update_business_info method. - # result = client.update_business_info request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - # p result - # - def update_business_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest - - # Converts hash and nil to 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_business_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.business_info&.name - header_params["business_info.name"] = request.business_info.name - end - - request_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_business_info.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_business_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_info_service_stub.call_rpc :update_business_info, request, 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 BusinessInfoService API. - # - # This class represents the configuration for BusinessInfoService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_business_info to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_info.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_info.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 BusinessInfoService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_business_info` - # @return [::Gapic::Config::Method] - # - attr_reader :get_business_info - ## - # RPC-specific configuration for `update_business_info` - # @return [::Gapic::Config::Method] - # - attr_reader :update_business_info - - # @private - def initialize parent_rpcs = nil - get_business_info_config = parent_rpcs.get_business_info if parent_rpcs.respond_to? :get_business_info - @get_business_info = ::Gapic::Config::Method.new get_business_info_config - update_business_info_config = parent_rpcs.update_business_info if parent_rpcs.respond_to? :update_business_info - @update_business_info = ::Gapic::Config::Method.new update_business_info_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb deleted file mode 100644 index 0308f8a5ad24..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_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 Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - # Credentials for the BusinessInfoService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb deleted file mode 100644 index 0a2e4aaaee0b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.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 Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - # Path helper methods for the BusinessInfoService API. - module Paths - ## - # Create a fully-qualified BusinessInfo resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/businessInfo` - # - # @param account [String] - # - # @return [::String] - def business_info_path account: - "accounts/#{account}/businessInfo" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb deleted file mode 100644 index 1a834ba1e2c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/business_info_service/credentials" -require "google/shopping/merchant/accounts/v1beta/business_info_service/paths" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support business info API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new - # - module BusinessInfoService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb deleted file mode 100644 index 0bafb42d3b7e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb +++ /dev/null @@ -1,520 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/businessinfo_pb" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - module Rest - ## - # REST client for the BusinessInfoService service. - # - # Service to support business info API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_info_service_stub - - ## - # Configure the BusinessInfoService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessInfoService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessInfoService 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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @business_info_service_stub.universe_domain - end - - ## - # Create a new BusinessInfoService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessInfoService 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 - - @business_info_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @business_info_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 - @business_info_service_stub.logger - end - - # Service calls - - ## - # Retrieves the business info of an account. - # - # @overload get_business_info(request, options = nil) - # Pass arguments to `get_business_info` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_business_info(name: nil) - # Pass arguments to `get_business_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the business info. - # Format: `accounts/{account}/businessInfo` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new - # - # # Call the get_business_info method. - # result = client.get_business_info request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - # p result - # - def get_business_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_business_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_business_info.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_business_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_info_service_stub.get_business_info request, 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 business info of an account. Executing this method requires - # admin access. - # - # @overload update_business_info(request, options = nil) - # Pass arguments to `update_business_info` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_business_info(business_info: nil, update_mask: nil) - # Pass arguments to `update_business_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param business_info [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo, ::Hash] - # Required. The new version of the business info. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new - # - # # Call the update_business_info method. - # result = client.update_business_info request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - # p result - # - def update_business_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest - - # Converts hash and nil to an 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_business_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_business_info.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_business_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_info_service_stub.update_business_info request, 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 BusinessInfoService REST API. - # - # This class represents the configuration for BusinessInfoService 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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_business_info to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_info.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_info.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 BusinessInfoService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_business_info` - # @return [::Gapic::Config::Method] - # - attr_reader :get_business_info - ## - # RPC-specific configuration for `update_business_info` - # @return [::Gapic::Config::Method] - # - attr_reader :update_business_info - - # @private - def initialize parent_rpcs = nil - get_business_info_config = parent_rpcs.get_business_info if parent_rpcs.respond_to? :get_business_info - @get_business_info = ::Gapic::Config::Method.new get_business_info_config - update_business_info_config = parent_rpcs.update_business_info if parent_rpcs.respond_to? :update_business_info - @update_business_info = ::Gapic::Config::Method.new update_business_info_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb deleted file mode 100644 index b7cc0315c746..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - module Rest - ## - # REST service stub for the BusinessInfoService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_business_info REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # A result object deserialized from the server's reply - def get_business_info request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_business_info_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_business_info", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.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_business_info REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # A result object deserialized from the server's reply - def update_business_info request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_business_info_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_business_info", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_business_info REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_business_info_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/businessInfo/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_business_info REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest] - # 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_business_info_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{business_info.name}", - body: "business_info", - matches: [ - ["business_info.name", %r{^accounts/[^/]+/businessInfo/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb deleted file mode 100644 index 9dc1403d6850..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/businessidentity.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/businessidentity.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa5\t\n\x10\x42usinessIdentity\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12m\n\x12promotions_consent\x18\x02 \x01(\x0e\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.PromotionsConsentB\x03\xe0\x41\x01\x12\x66\n\x0b\x62lack_owned\x18\x03 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x66\n\x0bwomen_owned\x18\x04 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12h\n\rveteran_owned\x18\x05 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12g\n\x0clatino_owned\x18\x06 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12i\n\x0esmall_business\x18\x07 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x1a\x8d\x02\n\x11IdentityAttribute\x12\x83\x01\n\x14identity_declaration\x18\x01 \x01(\x0e\x32`.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute.IdentityDeclarationB\x03\xe0\x41\x02\"r\n\x13IdentityDeclaration\x12$\n IDENTITY_DECLARATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SELF_IDENTIFIES_AS\x10\x01\x12\x1d\n\x19\x44OES_NOT_SELF_IDENTIFY_AS\x10\x02\"t\n\x11PromotionsConsent\x12\"\n\x1ePROMOTIONS_CONSENT_UNSPECIFIED\x10\x00\x12\x1c\n\x18PROMOTIONS_CONSENT_GIVEN\x10\x01\x12\x1d\n\x19PROMOTIONS_CONSENT_DENIED\x10\x02:{\xea\x41x\n+merchantapi.googleapis.com/BusinessIdentity\x12#accounts/{account}/businessIdentity*\x12\x62usinessIdentities2\x10\x62usinessIdentity\"_\n\x1aGetBusinessIdentityRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/BusinessIdentity\"\xb1\x01\n\x1dUpdateBusinessIdentityRequest\x12Z\n\x11\x62usiness_identity\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.BusinessIdentityB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xe3\x04\n\x17\x42usinessIdentityService\x12\xdb\x01\n\x13GetBusinessIdentity\x12\x44.google.shopping.merchant.accounts.v1beta.GetBusinessIdentityRequest\x1a:.google.shopping.merchant.accounts.v1beta.BusinessIdentity\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/accounts/v1beta/{name=accounts/*/businessIdentity}\x12\xa0\x02\n\x16UpdateBusinessIdentity\x12G.google.shopping.merchant.accounts.v1beta.UpdateBusinessIdentityRequest\x1a:.google.shopping.merchant.accounts.v1beta.BusinessIdentity\"\x80\x01\xda\x41\x1d\x62usiness_identity,update_mask\x82\xd3\xe4\x93\x02Z2E/accounts/v1beta/{business_identity.name=accounts/*/businessIdentity}:\x11\x62usiness_identity\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x42usinessIdentityProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - BusinessIdentity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity").msgclass - BusinessIdentity::IdentityAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute").msgclass - BusinessIdentity::IdentityAttribute::IdentityDeclaration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute.IdentityDeclaration").enummodule - BusinessIdentity::PromotionsConsent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.PromotionsConsent").enummodule - GetBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetBusinessIdentityRequest").msgclass - UpdateBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateBusinessIdentityRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb deleted file mode 100644 index 91a6e86252b1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/businessidentity.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/businessidentity_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.BusinessIdentityService' - - # Retrieves the business identity of an account. - rpc :GetBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity - # Updates the business identity of an account. Executing this method requires - # admin access. - rpc :UpdateBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb deleted file mode 100644 index 254aa9f643ed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/businessinfo.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/accounts/v1beta/customerservice_pb' -require 'google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb' -require 'google/type/phone_number_pb' -require 'google/type/postal_address_pb' - - -descriptor_data = "\n;google/shopping/merchant/accounts/v1beta/businessinfo.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a>google/shopping/merchant/accounts/v1beta/customerservice.proto\x1a\x45google/shopping/merchant/accounts/v1beta/phoneverificationstate.proto\x1a\x1egoogle/type/phone_number.proto\x1a google/type/postal_address.proto\"\xeb\x04\n\x0c\x42usinessInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x35\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x1a.google.type.PostalAddressB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x31\n\x05phone\x18\x03 \x01(\x0b\x32\x18.google.type.PhoneNumberB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12l\n\x18phone_verification_state\x18\x04 \x01(\x0e\x32@.google.shopping.merchant.accounts.v1beta.PhoneVerificationStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12]\n\x10\x63ustomer_service\x18\x05 \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1beta.CustomerServiceB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x35\n#korean_business_registration_number\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01:j\xea\x41g\n\'merchantapi.googleapis.com/BusinessInfo\x12\x1f\x61\x63\x63ounts/{account}/businessInfo*\rbusinessInfos2\x0c\x62usinessInfoB\n\n\x08_addressB\x08\n\x06_phoneB\x1b\n\x19_phone_verification_stateB\x13\n\x11_customer_serviceB&\n$_korean_business_registration_number\"W\n\x16GetBusinessInfoRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/BusinessInfo\"\xa5\x01\n\x19UpdateBusinessInfoRequest\x12R\n\rbusiness_info\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.BusinessInfoB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xb2\x04\n\x13\x42usinessInfoService\x12\xcb\x01\n\x0fGetBusinessInfo\x12@.google.shopping.merchant.accounts.v1beta.GetBusinessInfoRequest\x1a\x36.google.shopping.merchant.accounts.v1beta.BusinessInfo\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{name=accounts/*/businessInfo}\x12\x83\x02\n\x12UpdateBusinessInfo\x12\x43.google.shopping.merchant.accounts.v1beta.UpdateBusinessInfoRequest\x1a\x36.google.shopping.merchant.accounts.v1beta.BusinessInfo\"p\xda\x41\x19\x62usiness_info,update_mask\x82\xd3\xe4\x93\x02N2=/accounts/v1beta/{business_info.name=accounts/*/businessInfo}:\rbusiness_info\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x01\n,com.google.shopping.merchant.accounts.v1betaB\x11\x42usinessInfoProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - BusinessInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessInfo").msgclass - GetBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetBusinessInfoRequest").msgclass - UpdateBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateBusinessInfoRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb deleted file mode 100644 index b69a18296f1e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/businessinfo.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/businessinfo_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - # Service to support business info API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.BusinessInfoService' - - # Retrieves the business info of an account. - rpc :GetBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo - # Updates the business info of an account. Executing this method requires - # admin access. - rpc :UpdateBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb deleted file mode 100644 index 6510004f596a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/client" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - module CheckoutSettingsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "checkout_settings_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb deleted file mode 100644 index 29c9fc0dab5c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.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/errors" -require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - ## - # Client for the CheckoutSettingsService service. - # - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :checkout_settings_service_stub - - ## - # Configure the CheckoutSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CheckoutSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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 - @checkout_settings_service_stub.universe_domain - end - - ## - # Create a new CheckoutSettingsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CheckoutSettingsService 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/shopping/merchant/accounts/v1beta/checkoutsettings_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 - - @checkout_settings_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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 - ) - - @checkout_settings_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 - @checkout_settings_service_stub.logger - end - - # Service calls - - ## - # Gets `CheckoutSettings` for the given merchant. This includes - # information about review state, enrollment state and URL settings. - # - # @overload get_checkout_settings(request, options = nil) - # Pass arguments to `get_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_checkout_settings(name: nil) - # Pass arguments to `get_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new - # - # # Call the get_checkout_settings method. - # result = client.get_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def get_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_checkout_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.call_rpc :get_checkout_settings, request, 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 `CheckoutSettings` for the given merchant. - # - # @overload create_checkout_settings(request, options = nil) - # Pass arguments to `create_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_checkout_settings(parent: nil, checkout_settings: nil) - # Pass arguments to `create_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which the `CheckoutSettings` will be - # created. - # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] - # Required. The `CheckoutSettings` object to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new - # - # # Call the create_checkout_settings method. - # result = client.create_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def create_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest - - # Converts hash and nil to 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_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_checkout_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.call_rpc :create_checkout_settings, request, 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 `CheckoutSettings` for the given merchant. - # - # @overload update_checkout_settings(request, options = nil) - # Pass arguments to `update_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_checkout_settings(checkout_settings: nil, update_mask: nil) - # Pass arguments to `update_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] - # Required. The updated version of the `CheckoutSettings`. - # The `name` field is used to identify the `CheckoutSettings`. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `eligible_destinations` - # - `uri_settings` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new - # - # # Call the update_checkout_settings method. - # result = client.update_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def update_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest - - # Converts hash and nil to 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_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.checkout_settings&.name - header_params["checkout_settings.name"] = request.checkout_settings.name - end - - request_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_checkout_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.call_rpc :update_checkout_settings, request, 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 `CheckoutSettings` and unenrolls merchant from - # `Checkout` program. - # - # @overload delete_checkout_settings(request, options = nil) - # Pass arguments to `delete_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_checkout_settings(name: nil) - # Pass arguments to `delete_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # - # @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/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new - # - # # Call the delete_checkout_settings method. - # result = client.delete_checkout_settings request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_checkout_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.call_rpc :delete_checkout_settings, request, 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 CheckoutSettingsService API. - # - # This class represents the configuration for CheckoutSettingsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_checkout_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_checkout_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_checkout_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 CheckoutSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_checkout_settings - ## - # RPC-specific configuration for `create_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :create_checkout_settings - ## - # RPC-specific configuration for `update_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_checkout_settings - ## - # RPC-specific configuration for `delete_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_checkout_settings - - # @private - def initialize parent_rpcs = nil - get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings - @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config - create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings - @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config - update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings - @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config - delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings - @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb deleted file mode 100644 index 59b479846819..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_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 Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - # Credentials for the CheckoutSettingsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb deleted file mode 100644 index c2ce599e591d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - # Path helper methods for the CheckoutSettingsService API. - module Paths - ## - # Create a fully-qualified CheckoutSettings resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/programs/{program}/checkoutSettings` - # - # @param account [String] - # @param program [String] - # - # @return [::String] - def checkout_settings_path account:, program: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/programs/#{program}/checkoutSettings" - end - - ## - # Create a fully-qualified Program resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/programs/{program}` - # - # @param account [String] - # @param program [String] - # - # @return [::String] - def program_path account:, program: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/programs/#{program}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb deleted file mode 100644 index 88121fed97ac..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - module CheckoutSettingsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb deleted file mode 100644 index 9ce8ea790731..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb +++ /dev/null @@ -1,703 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/checkoutsettings_pb" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - module Rest - ## - # REST client for the CheckoutSettingsService service. - # - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :checkout_settings_service_stub - - ## - # Configure the CheckoutSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CheckoutSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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 - @checkout_settings_service_stub.universe_domain - end - - ## - # Create a new CheckoutSettingsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CheckoutSettingsService 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 - - @checkout_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @checkout_settings_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 - @checkout_settings_service_stub.logger - end - - # Service calls - - ## - # Gets `CheckoutSettings` for the given merchant. This includes - # information about review state, enrollment state and URL settings. - # - # @overload get_checkout_settings(request, options = nil) - # Pass arguments to `get_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_checkout_settings(name: nil) - # Pass arguments to `get_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new - # - # # Call the get_checkout_settings method. - # result = client.get_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def get_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_checkout_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.get_checkout_settings request, 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 `CheckoutSettings` for the given merchant. - # - # @overload create_checkout_settings(request, options = nil) - # Pass arguments to `create_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_checkout_settings(parent: nil, checkout_settings: nil) - # Pass arguments to `create_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which the `CheckoutSettings` will be - # created. - # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] - # Required. The `CheckoutSettings` object to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new - # - # # Call the create_checkout_settings method. - # result = client.create_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def create_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest - - # Converts hash and nil to an 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_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_checkout_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.create_checkout_settings request, 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 `CheckoutSettings` for the given merchant. - # - # @overload update_checkout_settings(request, options = nil) - # Pass arguments to `update_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_checkout_settings(checkout_settings: nil, update_mask: nil) - # Pass arguments to `update_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] - # Required. The updated version of the `CheckoutSettings`. - # The `name` field is used to identify the `CheckoutSettings`. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `eligible_destinations` - # - `uri_settings` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new - # - # # Call the update_checkout_settings method. - # result = client.update_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def update_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest - - # Converts hash and nil to an 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_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_checkout_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.update_checkout_settings request, 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 `CheckoutSettings` and unenrolls merchant from - # `Checkout` program. - # - # @overload delete_checkout_settings(request, options = nil) - # Pass arguments to `delete_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_checkout_settings(name: nil) - # Pass arguments to `delete_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @yield [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/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new - # - # # Call the delete_checkout_settings method. - # result = client.delete_checkout_settings request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_checkout_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.delete_checkout_settings request, 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 CheckoutSettingsService REST API. - # - # This class represents the configuration for CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_checkout_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_checkout_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_checkout_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 CheckoutSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_checkout_settings - ## - # RPC-specific configuration for `create_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :create_checkout_settings - ## - # RPC-specific configuration for `update_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_checkout_settings - ## - # RPC-specific configuration for `delete_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_checkout_settings - - # @private - def initialize parent_rpcs = nil - get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings - @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config - create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings - @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config - update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings - @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config - delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings - @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb deleted file mode 100644 index ab727cfeab6f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb +++ /dev/null @@ -1,329 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - module Rest - ## - # REST service stub for the CheckoutSettingsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # A result object deserialized from the server's reply - def get_checkout_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_checkout_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_checkout_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.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_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # A result object deserialized from the server's reply - def create_checkout_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_checkout_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_checkout_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.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_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # A result object deserialized from the server's reply - def update_checkout_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_checkout_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_checkout_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.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_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_checkout_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_checkout_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_checkout_settings", - 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 get_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_checkout_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest] - # 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_checkout_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/checkoutSettings", - body: "checkout_settings", - matches: [ - ["parent", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest] - # 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_checkout_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{checkout_settings.name}", - body: "checkout_settings", - matches: [ - ["checkout_settings.name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_checkout_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb deleted file mode 100644 index 6d4141e47877..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/checkoutsettings.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/checkoutsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a google/shopping/type/types.proto\"_\n\x1aGetCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xc0\x01\n\x1d\x43reateCheckoutSettingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/CheckoutSettings\x12Z\n\x11\x63heckout_settings\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.CheckoutSettingsB\x03\xe0\x41\x02\"\xb1\x01\n\x1dUpdateCheckoutSettingsRequest\x12Z\n\x11\x63heckout_settings\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.CheckoutSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"b\n\x1d\x44\x65leteCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xe5\t\n\x10\x43heckoutSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12P\n\x0curi_settings\x18\x02 \x01(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.UriSettingsH\x00\x88\x01\x01\x12U\n\x15\x65ligible_destinations\x18\x08 \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnumB\x03\xe0\x41\x01\x12v\n\x10\x65nrollment_state\x18\x03 \x01(\x0e\x32R.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12n\n\x0creview_state\x18\x04 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12Z\n\x16\x65\x66\x66\x65\x63tive_uri_settings\x18\x05 \x01(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.UriSettingsB\x03\xe0\x41\x03\x12\x80\x01\n\x1a\x65\x66\x66\x65\x63tive_enrollment_state\x18\x06 \x01(\x0e\x32R.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12x\n\x16\x65\x66\x66\x65\x63tive_review_state\x18\x07 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x04\x88\x01\x01\"o\n\x17\x43heckoutEnrollmentState\x12)\n%CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INACTIVE\x10\x01\x12\x0c\n\x08\x45NROLLED\x10\x02\x12\r\n\tOPTED_OUT\x10\x03\"j\n\x13\x43heckoutReviewState\x12%\n!CHECKOUT_REVIEW_STATE_UNSPECIFIED\x10\x00\x12\r\n\tIN_REVIEW\x10\x01\x12\x0c\n\x08\x41PPROVED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03:\x85\x01\xea\x41\x81\x01\n+merchantapi.googleapis.com/CheckoutSettings\x12\x36\x61\x63\x63ounts/{account}/programs/{program}/checkoutSettings*\x08settings2\x10\x63heckoutSettingsB\x0f\n\r_uri_settingsB\x13\n\x11_enrollment_stateB\x0f\n\r_review_stateB\x1d\n\x1b_effective_enrollment_stateB\x19\n\x17_effective_review_state\"[\n\x0bUriSettings\x12\x1f\n\x15\x63heckout_uri_template\x18\x01 \x01(\tH\x00\x12\x1b\n\x11\x63\x61rt_uri_template\x18\x02 \x01(\tH\x00\x42\x0e\n\x0curi_template2\xdc\x08\n\x17\x43heckoutSettingsService\x12\xe6\x01\n\x13GetCheckoutSettings\x12\x44.google.shopping.merchant.accounts.v1beta.GetCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/accounts/v1beta/{name=accounts/*/programs/*/checkoutSettings}\x12\x95\x02\n\x16\x43reateCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.CreateCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"v\xda\x41\x18parent,checkout_settings\x82\xd3\xe4\x93\x02U\"@/accounts/v1beta/{parent=accounts/*/programs/*}/checkoutSettings:\x11\x63heckout_settings\x12\xab\x02\n\x16UpdateCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.UpdateCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"\x8b\x01\xda\x41\x1d\x63heckout_settings,update_mask\x82\xd3\xe4\x93\x02\x65\x32P/accounts/v1beta/{checkout_settings.name=accounts/*/programs/*/checkoutSettings}:\x11\x63heckout_settings\x12\xc8\x01\n\x16\x44\x65leteCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.DeleteCheckoutSettingsRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/accounts/v1beta/{name=accounts/*/programs/*/checkoutSettings}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x43heckoutsettingsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - GetCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetCheckoutSettingsRequest").msgclass - CreateCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateCheckoutSettingsRequest").msgclass - UpdateCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateCheckoutSettingsRequest").msgclass - DeleteCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteCheckoutSettingsRequest").msgclass - CheckoutSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings").msgclass - CheckoutSettings::CheckoutEnrollmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentState").enummodule - CheckoutSettings::CheckoutReviewState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewState").enummodule - UriSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UriSettings").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb deleted file mode 100644 index bd81b765e3d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/checkoutsettings.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/checkoutsettings_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.CheckoutSettingsService' - - # Gets `CheckoutSettings` for the given merchant. This includes - # information about review state, enrollment state and URL settings. - rpc :GetCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings - # Creates `CheckoutSettings` for the given merchant. - rpc :CreateCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings - # Updates `CheckoutSettings` for the given merchant. - rpc :UpdateCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings - # Deletes `CheckoutSettings` and unenrolls merchant from - # `Checkout` program. - rpc :DeleteCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb deleted file mode 100644 index c17c763ded0c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/customerservice.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/type/phone_number_pb' - - -descriptor_data = "\n>google/shopping/merchant/accounts/v1beta/customerservice.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/type/phone_number.proto\"\x90\x01\n\x0f\x43ustomerService\x12\x15\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05\x65mail\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x31\n\x05phone\x18\x03 \x01(\x0b\x32\x18.google.type.PhoneNumberB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x06\n\x04_uriB\x08\n\x06_emailB\x08\n\x06_phoneB\x96\x01\n,com.google.shopping.merchant.accounts.v1betaB\x14\x43ustomerServiceProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - CustomerService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CustomerService").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb deleted file mode 100644 index d06d098a05ba..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/paths" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/client" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/email_preferences_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new - # - module EmailPreferencesService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "email_preferences_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb deleted file mode 100644 index 80a6356b2fe2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb +++ /dev/null @@ -1,592 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/emailpreferences_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - ## - # Client for the EmailPreferencesService service. - # - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :email_preferences_service_stub - - ## - # Configure the EmailPreferencesService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EmailPreferencesService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EmailPreferencesService 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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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 - @email_preferences_service_stub.universe_domain - end - - ## - # Create a new EmailPreferencesService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EmailPreferencesService 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/shopping/merchant/accounts/v1beta/emailpreferences_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 - - @email_preferences_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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 - ) - - @email_preferences_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 - @email_preferences_service_stub.logger - end - - # Service calls - - ## - # Returns the email preferences for a Merchant Center account user. - # - # Use the name=accounts/*/users/me/emailPreferences alias to get preferences - # for the authenticated user. - # - # @overload get_email_preferences(request, options = nil) - # Pass arguments to `get_email_preferences` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_email_preferences(name: nil) - # Pass arguments to `get_email_preferences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `EmailPreferences` resource. - # Format: `accounts/{account}/users/{email}/emailPreferences` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new - # - # # Call the get_email_preferences method. - # result = client.get_email_preferences request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - # p result - # - def get_email_preferences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_email_preferences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_email_preferences.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_email_preferences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @email_preferences_service_stub.call_rpc :get_email_preferences, request, 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 email preferences for a Merchant Center account user. MCA users - # should specify the MCA account rather than a sub-account of the MCA. - # - # Preferences which are not explicitly selected in the update mask will not - # be updated. - # - # It is invalid for updates to specify an UNCONFIRMED opt-in status value. - # - # Use the name=accounts/*/users/me/emailPreferences alias to update - # preferences - # for the authenticated user. - # - # @overload update_email_preferences(request, options = nil) - # Pass arguments to `update_email_preferences` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_email_preferences(email_preferences: nil, update_mask: nil) - # Pass arguments to `update_email_preferences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param email_preferences [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences, ::Hash] - # Required. Email Preferences to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new - # - # # Call the update_email_preferences method. - # result = client.update_email_preferences request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - # p result - # - def update_email_preferences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest - - # Converts hash and nil to 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_email_preferences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.email_preferences&.name - header_params["email_preferences.name"] = request.email_preferences.name - end - - request_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_email_preferences.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_email_preferences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @email_preferences_service_stub.call_rpc :update_email_preferences, request, 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 EmailPreferencesService API. - # - # This class represents the configuration for EmailPreferencesService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_email_preferences to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_email_preferences.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_email_preferences.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 EmailPreferencesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_email_preferences` - # @return [::Gapic::Config::Method] - # - attr_reader :get_email_preferences - ## - # RPC-specific configuration for `update_email_preferences` - # @return [::Gapic::Config::Method] - # - attr_reader :update_email_preferences - - # @private - def initialize parent_rpcs = nil - get_email_preferences_config = parent_rpcs.get_email_preferences if parent_rpcs.respond_to? :get_email_preferences - @get_email_preferences = ::Gapic::Config::Method.new get_email_preferences_config - update_email_preferences_config = parent_rpcs.update_email_preferences if parent_rpcs.respond_to? :update_email_preferences - @update_email_preferences = ::Gapic::Config::Method.new update_email_preferences_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb deleted file mode 100644 index 720eb9a879d7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_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 Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - # Credentials for the EmailPreferencesService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb deleted file mode 100644 index fd9c9497e227..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/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 Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - # Path helper methods for the EmailPreferencesService API. - module Paths - ## - # Create a fully-qualified EmailPreferences resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/users/{email}/emailPreferences` - # - # @param account [String] - # @param email [String] - # - # @return [::String] - def email_preferences_path account:, email: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/users/#{email}/emailPreferences" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb deleted file mode 100644 index b2676240e767..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/paths" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new - # - module EmailPreferencesService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb deleted file mode 100644 index 57981b71c9e3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb +++ /dev/null @@ -1,535 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/emailpreferences_pb" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - module Rest - ## - # REST client for the EmailPreferencesService service. - # - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :email_preferences_service_stub - - ## - # Configure the EmailPreferencesService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EmailPreferencesService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EmailPreferencesService 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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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 - @email_preferences_service_stub.universe_domain - end - - ## - # Create a new EmailPreferencesService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EmailPreferencesService 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 - - @email_preferences_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @email_preferences_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 - @email_preferences_service_stub.logger - end - - # Service calls - - ## - # Returns the email preferences for a Merchant Center account user. - # - # Use the name=accounts/*/users/me/emailPreferences alias to get preferences - # for the authenticated user. - # - # @overload get_email_preferences(request, options = nil) - # Pass arguments to `get_email_preferences` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_email_preferences(name: nil) - # Pass arguments to `get_email_preferences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `EmailPreferences` resource. - # Format: `accounts/{account}/users/{email}/emailPreferences` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new - # - # # Call the get_email_preferences method. - # result = client.get_email_preferences request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - # p result - # - def get_email_preferences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_email_preferences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_email_preferences.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_email_preferences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @email_preferences_service_stub.get_email_preferences request, 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 email preferences for a Merchant Center account user. MCA users - # should specify the MCA account rather than a sub-account of the MCA. - # - # Preferences which are not explicitly selected in the update mask will not - # be updated. - # - # It is invalid for updates to specify an UNCONFIRMED opt-in status value. - # - # Use the name=accounts/*/users/me/emailPreferences alias to update - # preferences - # for the authenticated user. - # - # @overload update_email_preferences(request, options = nil) - # Pass arguments to `update_email_preferences` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_email_preferences(email_preferences: nil, update_mask: nil) - # Pass arguments to `update_email_preferences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param email_preferences [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences, ::Hash] - # Required. Email Preferences to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new - # - # # Call the update_email_preferences method. - # result = client.update_email_preferences request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - # p result - # - def update_email_preferences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest - - # Converts hash and nil to an 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_email_preferences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_email_preferences.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_email_preferences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @email_preferences_service_stub.update_email_preferences request, 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 EmailPreferencesService REST API. - # - # This class represents the configuration for EmailPreferencesService 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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_email_preferences to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_email_preferences.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_email_preferences.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 EmailPreferencesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_email_preferences` - # @return [::Gapic::Config::Method] - # - attr_reader :get_email_preferences - ## - # RPC-specific configuration for `update_email_preferences` - # @return [::Gapic::Config::Method] - # - attr_reader :update_email_preferences - - # @private - def initialize parent_rpcs = nil - get_email_preferences_config = parent_rpcs.get_email_preferences if parent_rpcs.respond_to? :get_email_preferences - @get_email_preferences = ::Gapic::Config::Method.new get_email_preferences_config - update_email_preferences_config = parent_rpcs.update_email_preferences if parent_rpcs.respond_to? :update_email_preferences - @update_email_preferences = ::Gapic::Config::Method.new update_email_preferences_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb deleted file mode 100644 index 9193d3947fc0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - module Rest - ## - # REST service stub for the EmailPreferencesService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_email_preferences REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # A result object deserialized from the server's reply - def get_email_preferences request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_email_preferences_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_email_preferences", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.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_email_preferences REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # A result object deserialized from the server's reply - def update_email_preferences request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_email_preferences_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_email_preferences", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_email_preferences REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_email_preferences_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/users/[^/]+/emailPreferences/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_email_preferences REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest] - # 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_email_preferences_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{email_preferences.name}", - body: "email_preferences", - matches: [ - ["email_preferences.name", %r{^accounts/[^/]+/users/[^/]+/emailPreferences/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb deleted file mode 100644 index 37d52395e2bd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/emailpreferences.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/emailpreferences.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xed\x02\n\x10\x45mailPreferences\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x61\n\rnews_and_tips\x18\x02 \x01(\x0e\x32\x45.google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInStateB\x03\xe0\x41\x01\"X\n\nOptInState\x12\x1c\n\x18OPT_IN_STATE_UNSPECIFIED\x10\x00\x12\r\n\tOPTED_OUT\x10\x01\x12\x0c\n\x08OPTED_IN\x10\x02\x12\x0f\n\x0bUNCONFIRMED\x10\x03:\x88\x01\xea\x41\x84\x01\n+merchantapi.googleapis.com/EmailPreferences\x12\x31\x61\x63\x63ounts/{account}/users/{email}/emailPreferences*\x10\x65mailPreferences2\x10\x65mailPreferences\"_\n\x1aGetEmailPreferencesRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/EmailPreferences\"\xb1\x01\n\x1dUpdateEmailPreferencesRequest\x12Z\n\x11\x65mail_preferences\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.EmailPreferencesB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xf3\x04\n\x17\x45mailPreferencesService\x12\xe3\x01\n\x13GetEmailPreferences\x12\x44.google.shopping.merchant.accounts.v1beta.GetEmailPreferencesRequest\x1a:.google.shopping.merchant.accounts.v1beta.EmailPreferences\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/accounts/v1beta/{name=accounts/*/users/*/emailPreferences}\x12\xa8\x02\n\x16UpdateEmailPreferences\x12G.google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest\x1a:.google.shopping.merchant.accounts.v1beta.EmailPreferences\"\x88\x01\xda\x41\x1d\x65mail_preferences,update_mask\x82\xd3\xe4\x93\x02\x62\x32M/accounts/v1beta/{email_preferences.name=accounts/*/users/*/emailPreferences}:\x11\x65mail_preferences\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x45mailPreferencesProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - EmailPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.EmailPreferences").msgclass - EmailPreferences::OptInState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInState").enummodule - GetEmailPreferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetEmailPreferencesRequest").msgclass - UpdateEmailPreferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb deleted file mode 100644 index 4d4ab5d746e5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/emailpreferences.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/emailpreferences_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.EmailPreferencesService' - - # Returns the email preferences for a Merchant Center account user. - # - # Use the name=accounts/*/users/me/emailPreferences alias to get preferences - # for the authenticated user. - rpc :GetEmailPreferences, ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences - # Updates the email preferences for a Merchant Center account user. MCA users - # should specify the MCA account rather than a sub-account of the MCA. - # - # Preferences which are not explicitly selected in the update mask will not - # be updated. - # - # It is invalid for updates to specify an UNCONFIRMED opt-in status value. - # - # Use the name=accounts/*/users/me/emailPreferences alias to update - # preferences - # for the authenticated user. - rpc :UpdateEmailPreferences, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb deleted file mode 100644 index cdcf6b1c5dfd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new - # - module GbpAccountsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "gbp_accounts_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb deleted file mode 100644 index 0e023cbb4b4e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb +++ /dev/null @@ -1,598 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/gbpaccounts_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - ## - # Client for the GbpAccountsService service. - # - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :gbp_accounts_service_stub - - ## - # Configure the GbpAccountsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all GbpAccountsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the GbpAccountsService 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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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 - @gbp_accounts_service_stub.universe_domain - end - - ## - # Create a new GbpAccountsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the GbpAccountsService 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/shopping/merchant/accounts/v1beta/gbpaccounts_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 - - @gbp_accounts_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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 - ) - - @gbp_accounts_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 - @gbp_accounts_service_stub.logger - end - - # Service calls - - ## - # List the GBP accounts for a given merchant. - # - # @overload list_gbp_accounts(request, options = nil) - # Pass arguments to `list_gbp_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_gbp_accounts(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gbp_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 parent resource under which the GBP accounts are - # listed. Format: `accounts/{account}`. - # @param page_size [::Integer] - # Optional. The maximum number of `GbpAccount` resources to return. The - # service returns fewer than this value if the number of gbp accounts is less - # that than the `pageSize`. The default value is 50. The maximum value is - # 1000; If a value higher than the maximum is specified, then the `pageSize` - # will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListGbpAccounts` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListGbpAccounts` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new - # - # # Call the list_gbp_accounts method. - # result = client.list_gbp_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount. - # p item - # end - # - def list_gbp_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_gbp_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_gbp_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_gbp_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gbp_accounts_service_stub.call_rpc :list_gbp_accounts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gbp_accounts_service_stub, :list_gbp_accounts, 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 - - ## - # Link the specified merchant to a GBP account for all countries. - # - # @overload link_gbp_account(request, options = nil) - # Pass arguments to `link_gbp_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload link_gbp_account(parent: nil, gbp_email: nil) - # Pass arguments to `link_gbp_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 parent resource to which the GBP account is - # linked. Format: `accounts/{account}`. - # @param gbp_email [::String] - # Required. The email address of the Business Profile account. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new - # - # # Call the link_gbp_account method. - # result = client.link_gbp_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse. - # p result - # - def link_gbp_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.link_gbp_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.link_gbp_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.link_gbp_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gbp_accounts_service_stub.call_rpc :link_gbp_account, request, 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 GbpAccountsService API. - # - # This class represents the configuration for GbpAccountsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_gbp_accounts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_gbp_accounts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_gbp_accounts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 GbpAccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_gbp_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gbp_accounts - ## - # RPC-specific configuration for `link_gbp_account` - # @return [::Gapic::Config::Method] - # - attr_reader :link_gbp_account - - # @private - def initialize parent_rpcs = nil - list_gbp_accounts_config = parent_rpcs.list_gbp_accounts if parent_rpcs.respond_to? :list_gbp_accounts - @list_gbp_accounts = ::Gapic::Config::Method.new list_gbp_accounts_config - link_gbp_account_config = parent_rpcs.link_gbp_account if parent_rpcs.respond_to? :link_gbp_account - @link_gbp_account = ::Gapic::Config::Method.new link_gbp_account_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb deleted file mode 100644 index 293bf2160f68..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_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 Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - # Credentials for the GbpAccountsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb deleted file mode 100644 index a10be9d7033a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.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 Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - # Path helper methods for the GbpAccountsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb deleted file mode 100644 index e9b645d1dcbe..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new - # - module GbpAccountsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb deleted file mode 100644 index 2f963501342e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb +++ /dev/null @@ -1,541 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/gbpaccounts_pb" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - module Rest - ## - # REST client for the GbpAccountsService service. - # - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :gbp_accounts_service_stub - - ## - # Configure the GbpAccountsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all GbpAccountsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the GbpAccountsService 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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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 - @gbp_accounts_service_stub.universe_domain - end - - ## - # Create a new GbpAccountsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the GbpAccountsService 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 - - @gbp_accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @gbp_accounts_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 - @gbp_accounts_service_stub.logger - end - - # Service calls - - ## - # List the GBP accounts for a given merchant. - # - # @overload list_gbp_accounts(request, options = nil) - # Pass arguments to `list_gbp_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_gbp_accounts(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gbp_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 parent resource under which the GBP accounts are - # listed. Format: `accounts/{account}`. - # @param page_size [::Integer] - # Optional. The maximum number of `GbpAccount` resources to return. The - # service returns fewer than this value if the number of gbp accounts is less - # that than the `pageSize`. The default value is 50. The maximum value is - # 1000; If a value higher than the maximum is specified, then the `pageSize` - # will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListGbpAccounts` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListGbpAccounts` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new - # - # # Call the list_gbp_accounts method. - # result = client.list_gbp_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount. - # p item - # end - # - def list_gbp_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_gbp_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_gbp_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_gbp_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gbp_accounts_service_stub.list_gbp_accounts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gbp_accounts_service_stub, :list_gbp_accounts, "gbp_accounts", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Link the specified merchant to a GBP account for all countries. - # - # @overload link_gbp_account(request, options = nil) - # Pass arguments to `link_gbp_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload link_gbp_account(parent: nil, gbp_email: nil) - # Pass arguments to `link_gbp_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 parent resource to which the GBP account is - # linked. Format: `accounts/{account}`. - # @param gbp_email [::String] - # Required. The email address of the Business Profile account. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new - # - # # Call the link_gbp_account method. - # result = client.link_gbp_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse. - # p result - # - def link_gbp_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.link_gbp_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.link_gbp_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.link_gbp_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gbp_accounts_service_stub.link_gbp_account request, 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 GbpAccountsService REST API. - # - # This class represents the configuration for GbpAccountsService 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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_gbp_accounts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_gbp_accounts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_gbp_accounts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 GbpAccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_gbp_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gbp_accounts - ## - # RPC-specific configuration for `link_gbp_account` - # @return [::Gapic::Config::Method] - # - attr_reader :link_gbp_account - - # @private - def initialize parent_rpcs = nil - list_gbp_accounts_config = parent_rpcs.list_gbp_accounts if parent_rpcs.respond_to? :list_gbp_accounts - @list_gbp_accounts = ::Gapic::Config::Method.new list_gbp_accounts_config - link_gbp_account_config = parent_rpcs.link_gbp_account if parent_rpcs.respond_to? :link_gbp_account - @link_gbp_account = ::Gapic::Config::Method.new link_gbp_account_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb deleted file mode 100644 index d969d96d14e1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - module Rest - ## - # REST service stub for the GbpAccountsService 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_gbp_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse] - # A result object deserialized from the server's reply - def list_gbp_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_gbp_accounts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_gbp_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the link_gbp_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # A result object deserialized from the server's reply - def link_gbp_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_link_gbp_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "link_gbp_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse.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_gbp_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_gbp_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/gbpAccounts", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the link_gbp_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_link_gbp_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/gbpAccounts:linkGbpAccount", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb deleted file mode 100644 index ccccc7e7699e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/gbpaccounts.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n:google/shopping/merchant/accounts/v1beta/gbpaccounts.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xe2\x02\n\nGbpAccount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\x0egbp_account_id\x18\x02 \x01(\t\x12G\n\x04type\x18\x03 \x01(\x0e\x32\x39.google.shopping.merchant.accounts.v1beta.GbpAccount.Type\x12\x18\n\x10gbp_account_name\x18\x05 \x01(\t\x12\x15\n\rlisting_count\x18\x06 \x01(\x03\"<\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x14\n\x10\x42USINESS_ACCOUNT\x10\x02:q\xea\x41n\n%merchantapi.googleapis.com/GbpAccount\x12,accounts/{account}/gbpAccounts/{gbp_account}*\x0bgbpAccounts2\ngbpAccount\"\x85\x01\n\x16ListGbpAccountsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\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\x17ListGbpAccountsResponse\x12J\n\x0cgbp_accounts\x18\x01 \x03(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.GbpAccount\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"k\n\x15LinkGbpAccountRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tgbp_email\x18\x02 \x01(\tB\x03\xe0\x41\x02\"B\n\x16LinkGbpAccountResponse\x12(\n\x08response\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Empty2\xa4\x04\n\x12GbpAccountsService\x12\xd9\x01\n\x0fListGbpAccounts\x12@.google.shopping.merchant.accounts.v1beta.ListGbpAccountsRequest\x1a\x41.google.shopping.merchant.accounts.v1beta.ListGbpAccountsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/accounts/v1beta/{parent=accounts/*}/gbpAccounts\x12\xe8\x01\n\x0eLinkGbpAccount\x12?.google.shopping.merchant.accounts.v1beta.LinkGbpAccountRequest\x1a@.google.shopping.merchant.accounts.v1beta.LinkGbpAccountResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\"?/accounts/v1beta/{parent=accounts/*}/gbpAccounts:linkGbpAccount:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x92\x01\n,com.google.shopping.merchant.accounts.v1betaB\x10GbpAccountsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - GbpAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GbpAccount").msgclass - GbpAccount::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GbpAccount.Type").enummodule - ListGbpAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListGbpAccountsRequest").msgclass - ListGbpAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListGbpAccountsResponse").msgclass - LinkGbpAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkGbpAccountRequest").msgclass - LinkGbpAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkGbpAccountResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb deleted file mode 100644 index 2e204bc48d59..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/gbpaccounts.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/gbpaccounts_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.GbpAccountsService' - - # List the GBP accounts for a given merchant. - rpc :ListGbpAccounts, ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse - # Link the specified merchant to a GBP account for all countries. - rpc :LinkGbpAccount, ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb deleted file mode 100644 index 9c3fea67be84..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/homepage.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n7google/shopping/merchant/accounts/v1beta/homepage.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xae\x01\n\x08Homepage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x15\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x14\n\x07\x63laimed\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03:Z\xea\x41W\n#merchantapi.googleapis.com/Homepage\x12\x1b\x61\x63\x63ounts/{account}/homepage*\thomepages2\x08homepageB\x06\n\x04_uri\"O\n\x12GetHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage\"\x98\x01\n\x15UpdateHomepageRequest\x12I\n\x08homepage\x18\x01 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.HomepageB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"Q\n\x14\x43laimHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage\"S\n\x16UnclaimHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage2\x8d\x07\n\x0fHomepageService\x12\xbb\x01\n\x0bGetHomepage\x12<.google.shopping.merchant.accounts.v1beta.GetHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/accounts/v1beta/{name=accounts/*/homepage}\x12\xe4\x01\n\x0eUpdateHomepage\x12?.google.shopping.merchant.accounts.v1beta.UpdateHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\"]\xda\x41\x14homepage,update_mask\x82\xd3\xe4\x93\x02@24/accounts/v1beta/{homepage.name=accounts/*/homepage}:\x08homepage\x12\xc1\x01\n\rClaimHomepage\x12>.google.shopping.merchant.accounts.v1beta.ClaimHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\"<\x82\xd3\xe4\x93\x02\x36\"1/accounts/v1beta/{name=accounts/*/homepage}:claim:\x01*\x12\xc7\x01\n\x0fUnclaimHomepage\x12@.google.shopping.merchant.accounts.v1beta.UnclaimHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\">\x82\xd3\xe4\x93\x02\x38\"3/accounts/v1beta/{name=accounts/*/homepage}:unclaim:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8f\x01\n,com.google.shopping.merchant.accounts.v1betaB\rHomepageProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - Homepage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Homepage").msgclass - GetHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetHomepageRequest").msgclass - UpdateHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateHomepageRequest").msgclass - ClaimHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ClaimHomepageRequest").msgclass - UnclaimHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UnclaimHomepageRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb deleted file mode 100644 index d3c47366408e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/homepage_service/credentials" -require "google/shopping/merchant/accounts/v1beta/homepage_service/paths" -require "google/shopping/merchant/accounts/v1beta/homepage_service/client" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support an API for a store's homepage. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/homepage_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - module HomepageService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "homepage_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/homepage_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb deleted file mode 100644 index 573e4910d6ff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.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! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/homepage_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - ## - # Client for the HomepageService service. - # - # Service to support an API for a store's homepage. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :homepage_service_stub - - ## - # Configure the HomepageService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all HomepageService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the HomepageService 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::Shopping::Merchant::Accounts::V1beta::HomepageService::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 - @homepage_service_stub.universe_domain - end - - ## - # Create a new HomepageService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the HomepageService 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/shopping/merchant/accounts/v1beta/homepage_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 - - @homepage_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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 - ) - - @homepage_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 - @homepage_service_stub.logger - end - - # Service calls - - ## - # Retrieves a store's homepage. - # - # @overload get_homepage(request, options = nil) - # Pass arguments to `get_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_homepage(name: nil) - # Pass arguments to `get_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to retrieve. - # Format: `accounts/{account}/homepage` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new - # - # # Call the get_homepage method. - # result = client.get_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def get_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_homepage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.call_rpc :get_homepage, request, 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 store's homepage. Executing this method requires admin access. - # - # @overload update_homepage(request, options = nil) - # Pass arguments to `update_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_homepage(homepage: nil, update_mask: nil) - # Pass arguments to `update_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param homepage [::Google::Shopping::Merchant::Accounts::V1beta::Homepage, ::Hash] - # Required. The new version of the homepage. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new - # - # # Call the update_homepage method. - # result = client.update_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def update_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest - - # Converts hash and nil to 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_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.homepage&.name - header_params["homepage.name"] = request.homepage.name - end - - request_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_homepage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.call_rpc :update_homepage, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Claims a store's homepage. Executing this method requires admin access. - # - # If the homepage is already claimed, this will recheck the - # verification (unless the merchant is exempted from claiming, which also - # exempts from verification) and return a successful response. If ownership - # can no longer be verified, it will return an error, but it won't clear the - # claim. In case of failure, a canonical error message will be returned: - # * PERMISSION_DENIED: user doesn't have the necessary permissions on this - # MC account; - # * FAILED_PRECONDITION: - # - The account is not a Merchant Center account; - # - MC account doesn't have a homepage; - # - claiming failed (in this case the error message will contain more - # details). - # - # @overload claim_homepage(request, options = nil) - # Pass arguments to `claim_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload claim_homepage(name: nil) - # Pass arguments to `claim_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to claim. - # Format: `accounts/{account}/homepage` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new - # - # # Call the claim_homepage method. - # result = client.claim_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def claim_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.claim_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.claim_homepage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.claim_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.call_rpc :claim_homepage, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Unclaims a store's homepage. Executing this method requires admin access. - # - # @overload unclaim_homepage(request, options = nil) - # Pass arguments to `unclaim_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload unclaim_homepage(name: nil) - # Pass arguments to `unclaim_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to unclaim. - # Format: `accounts/{account}/homepage` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new - # - # # Call the unclaim_homepage method. - # result = client.unclaim_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def unclaim_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.unclaim_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.unclaim_homepage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.unclaim_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.call_rpc :unclaim_homepage, request, 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 HomepageService API. - # - # This class represents the configuration for HomepageService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_homepage to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_homepage.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_homepage.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::HomepageService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 HomepageService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :get_homepage - ## - # RPC-specific configuration for `update_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :update_homepage - ## - # RPC-specific configuration for `claim_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :claim_homepage - ## - # RPC-specific configuration for `unclaim_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :unclaim_homepage - - # @private - def initialize parent_rpcs = nil - get_homepage_config = parent_rpcs.get_homepage if parent_rpcs.respond_to? :get_homepage - @get_homepage = ::Gapic::Config::Method.new get_homepage_config - update_homepage_config = parent_rpcs.update_homepage if parent_rpcs.respond_to? :update_homepage - @update_homepage = ::Gapic::Config::Method.new update_homepage_config - claim_homepage_config = parent_rpcs.claim_homepage if parent_rpcs.respond_to? :claim_homepage - @claim_homepage = ::Gapic::Config::Method.new claim_homepage_config - unclaim_homepage_config = parent_rpcs.unclaim_homepage if parent_rpcs.respond_to? :unclaim_homepage - @unclaim_homepage = ::Gapic::Config::Method.new unclaim_homepage_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb deleted file mode 100644 index cd945b510c57..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_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 Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - # Credentials for the HomepageService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb deleted file mode 100644 index 58d7b7105437..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.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 Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - # Path helper methods for the HomepageService API. - module Paths - ## - # Create a fully-qualified Homepage resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/homepage` - # - # @param account [String] - # - # @return [::String] - def homepage_path account: - "accounts/#{account}/homepage" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb deleted file mode 100644 index 87039ee3847c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/homepage_service/credentials" -require "google/shopping/merchant/accounts/v1beta/homepage_service/paths" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support an API for a store's homepage. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - module HomepageService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb deleted file mode 100644 index 8211a0e4c5e6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb +++ /dev/null @@ -1,704 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/homepage_pb" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - module Rest - ## - # REST client for the HomepageService service. - # - # Service to support an API for a store's homepage. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :homepage_service_stub - - ## - # Configure the HomepageService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all HomepageService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the HomepageService 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::Shopping::Merchant::Accounts::V1beta::HomepageService::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 - @homepage_service_stub.universe_domain - end - - ## - # Create a new HomepageService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the HomepageService 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 - - @homepage_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @homepage_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 - @homepage_service_stub.logger - end - - # Service calls - - ## - # Retrieves a store's homepage. - # - # @overload get_homepage(request, options = nil) - # Pass arguments to `get_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_homepage(name: nil) - # Pass arguments to `get_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to retrieve. - # Format: `accounts/{account}/homepage` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new - # - # # Call the get_homepage method. - # result = client.get_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def get_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_homepage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.get_homepage request, 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 store's homepage. Executing this method requires admin access. - # - # @overload update_homepage(request, options = nil) - # Pass arguments to `update_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_homepage(homepage: nil, update_mask: nil) - # Pass arguments to `update_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param homepage [::Google::Shopping::Merchant::Accounts::V1beta::Homepage, ::Hash] - # Required. The new version of the homepage. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new - # - # # Call the update_homepage method. - # result = client.update_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def update_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest - - # Converts hash and nil to an 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_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_homepage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.update_homepage request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Claims a store's homepage. Executing this method requires admin access. - # - # If the homepage is already claimed, this will recheck the - # verification (unless the merchant is exempted from claiming, which also - # exempts from verification) and return a successful response. If ownership - # can no longer be verified, it will return an error, but it won't clear the - # claim. In case of failure, a canonical error message will be returned: - # * PERMISSION_DENIED: user doesn't have the necessary permissions on this - # MC account; - # * FAILED_PRECONDITION: - # - The account is not a Merchant Center account; - # - MC account doesn't have a homepage; - # - claiming failed (in this case the error message will contain more - # details). - # - # @overload claim_homepage(request, options = nil) - # Pass arguments to `claim_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload claim_homepage(name: nil) - # Pass arguments to `claim_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to claim. - # Format: `accounts/{account}/homepage` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new - # - # # Call the claim_homepage method. - # result = client.claim_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def claim_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.claim_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.claim_homepage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.claim_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.claim_homepage request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Unclaims a store's homepage. Executing this method requires admin access. - # - # @overload unclaim_homepage(request, options = nil) - # Pass arguments to `unclaim_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload unclaim_homepage(name: nil) - # Pass arguments to `unclaim_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to unclaim. - # Format: `accounts/{account}/homepage` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new - # - # # Call the unclaim_homepage method. - # result = client.unclaim_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def unclaim_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.unclaim_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.unclaim_homepage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.unclaim_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.unclaim_homepage request, 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 HomepageService REST API. - # - # This class represents the configuration for HomepageService 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::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_homepage to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_homepage.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_homepage.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 HomepageService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :get_homepage - ## - # RPC-specific configuration for `update_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :update_homepage - ## - # RPC-specific configuration for `claim_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :claim_homepage - ## - # RPC-specific configuration for `unclaim_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :unclaim_homepage - - # @private - def initialize parent_rpcs = nil - get_homepage_config = parent_rpcs.get_homepage if parent_rpcs.respond_to? :get_homepage - @get_homepage = ::Gapic::Config::Method.new get_homepage_config - update_homepage_config = parent_rpcs.update_homepage if parent_rpcs.respond_to? :update_homepage - @update_homepage = ::Gapic::Config::Method.new update_homepage_config - claim_homepage_config = parent_rpcs.claim_homepage if parent_rpcs.respond_to? :claim_homepage - @claim_homepage = ::Gapic::Config::Method.new claim_homepage_config - unclaim_homepage_config = parent_rpcs.unclaim_homepage if parent_rpcs.respond_to? :unclaim_homepage - @unclaim_homepage = ::Gapic::Config::Method.new unclaim_homepage_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb deleted file mode 100644 index 9c3d3c797d7d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb +++ /dev/null @@ -1,330 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/homepage_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - module Rest - ## - # REST service stub for the HomepageService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # A result object deserialized from the server's reply - def get_homepage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_homepage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_homepage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.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_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # A result object deserialized from the server's reply - def update_homepage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_homepage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_homepage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the claim_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # A result object deserialized from the server's reply - def claim_homepage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_claim_homepage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "claim_homepage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the unclaim_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # A result object deserialized from the server's reply - def unclaim_homepage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_unclaim_homepage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "unclaim_homepage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_homepage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/homepage/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest] - # 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_homepage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{homepage.name}", - body: "homepage", - matches: [ - ["homepage.name", %r{^accounts/[^/]+/homepage/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the claim_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_claim_homepage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:claim", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/homepage/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the unclaim_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_unclaim_homepage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:unclaim", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/homepage/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb deleted file mode 100644 index 9767309ba008..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/homepage.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/homepage_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - # Service to support an API for a store's homepage. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.HomepageService' - - # Retrieves a store's homepage. - rpc :GetHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage - # Updates a store's homepage. Executing this method requires admin access. - rpc :UpdateHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage - # Claims a store's homepage. Executing this method requires admin access. - # - # If the homepage is already claimed, this will recheck the - # verification (unless the merchant is exempted from claiming, which also - # exempts from verification) and return a successful response. If ownership - # can no longer be verified, it will return an error, but it won't clear the - # claim. In case of failure, a canonical error message will be returned: - # * PERMISSION_DENIED: user doesn't have the necessary permissions on this - # MC account; - # * FAILED_PRECONDITION: - # - The account is not a Merchant Center account; - # - MC account doesn't have a homepage; - # - claiming failed (in this case the error message will contain more - # details). - rpc :ClaimHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage - # Unclaims a store's homepage. Executing this method requires admin access. - rpc :UnclaimHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb deleted file mode 100644 index 058cc57bb288..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/client" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/lfp_providers_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new - # - module LfpProvidersService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "lfp_providers_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb deleted file mode 100644 index 4a0cdc85420b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb +++ /dev/null @@ -1,601 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/lfpproviders_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - ## - # Client for the LfpProvidersService service. - # - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_providers_service_stub - - ## - # Configure the LfpProvidersService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpProvidersService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpProvidersService 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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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 - @lfp_providers_service_stub.universe_domain - end - - ## - # Create a new LfpProvidersService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpProvidersService 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/shopping/merchant/accounts/v1beta/lfpproviders_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 - - @lfp_providers_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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 - ) - - @lfp_providers_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 - @lfp_providers_service_stub.logger - end - - # Service calls - - ## - # Find the LFP provider candidates in a given country. - # - # @overload find_lfp_providers(request, options = nil) - # Pass arguments to `find_lfp_providers` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload find_lfp_providers(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `find_lfp_providers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource under which the LFP providers are - # found. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. - # @param page_size [::Integer] - # Optional. The maximum number of `LfpProvider` resources to return. The - # service returns fewer than this value if the number of lfp providers is - # less that than the `pageSize`. The default value is 50. The maximum value - # is 1000; If a value higher than the maximum is specified, then the - # `pageSize` will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `FindLfpProviders` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `FindLfpProviders` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new - # - # # Call the find_lfp_providers method. - # result = client.find_lfp_providers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider. - # p item - # end - # - def find_lfp_providers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.find_lfp_providers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.find_lfp_providers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.find_lfp_providers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_providers_service_stub.call_rpc :find_lfp_providers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Link the specified merchant to a LFP provider for the specified country. - # - # @overload link_lfp_provider(request, options = nil) - # Pass arguments to `link_lfp_provider` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload link_lfp_provider(name: nil, external_account_id: nil) - # Pass arguments to `link_lfp_provider` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the LFP provider resource to link. - # Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. - # The `lfp_provider` is the LFP provider ID. - # @param external_account_id [::String] - # Required. The external account ID by which this merchant is known to the - # LFP provider. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new - # - # # Call the link_lfp_provider method. - # result = client.link_lfp_provider request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse. - # p result - # - def link_lfp_provider request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.link_lfp_provider.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.link_lfp_provider.timeout, - metadata: metadata, - retry_policy: @config.rpcs.link_lfp_provider.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_providers_service_stub.call_rpc :link_lfp_provider, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the LfpProvidersService API. - # - # This class represents the configuration for LfpProvidersService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # find_lfp_providers to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.find_lfp_providers.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.find_lfp_providers.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpProvidersService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `find_lfp_providers` - # @return [::Gapic::Config::Method] - # - attr_reader :find_lfp_providers - ## - # RPC-specific configuration for `link_lfp_provider` - # @return [::Gapic::Config::Method] - # - attr_reader :link_lfp_provider - - # @private - def initialize parent_rpcs = nil - find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers - @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config - link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider - @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb deleted file mode 100644 index 4e45d13facbf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_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 Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - # Credentials for the LfpProvidersService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb deleted file mode 100644 index 668327ff63dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.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 Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - # Path helper methods for the LfpProvidersService API. - module Paths - ## - # Create a fully-qualified LfpProvider resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}` - # - # @param account [String] - # @param omnichannel_setting [String] - # @param lfp_provider [String] - # - # @return [::String] - def lfp_provider_path account:, omnichannel_setting:, lfp_provider: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "omnichannel_setting cannot contain /" if omnichannel_setting.to_s.include? "/" - - "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}/lfpProviders/#{lfp_provider}" - end - - ## - # Create a fully-qualified OmnichannelSetting resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # - # @param account [String] - # @param omnichannel_setting [String] - # - # @return [::String] - def omnichannel_setting_path account:, omnichannel_setting: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb deleted file mode 100644 index 501c902dee0b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new - # - module LfpProvidersService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb deleted file mode 100644 index 64254fe27015..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.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 "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - module Rest - ## - # REST client for the LfpProvidersService service. - # - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_providers_service_stub - - ## - # Configure the LfpProvidersService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpProvidersService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpProvidersService 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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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 - @lfp_providers_service_stub.universe_domain - end - - ## - # Create a new LfpProvidersService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpProvidersService 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 - - @lfp_providers_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @lfp_providers_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 - @lfp_providers_service_stub.logger - end - - # Service calls - - ## - # Find the LFP provider candidates in a given country. - # - # @overload find_lfp_providers(request, options = nil) - # Pass arguments to `find_lfp_providers` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload find_lfp_providers(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `find_lfp_providers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource under which the LFP providers are - # found. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. - # @param page_size [::Integer] - # Optional. The maximum number of `LfpProvider` resources to return. The - # service returns fewer than this value if the number of lfp providers is - # less that than the `pageSize`. The default value is 50. The maximum value - # is 1000; If a value higher than the maximum is specified, then the - # `pageSize` will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `FindLfpProviders` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `FindLfpProviders` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new - # - # # Call the find_lfp_providers method. - # result = client.find_lfp_providers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider. - # p item - # end - # - def find_lfp_providers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.find_lfp_providers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.find_lfp_providers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.find_lfp_providers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_providers_service_stub.find_lfp_providers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, "lfp_providers", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Link the specified merchant to a LFP provider for the specified country. - # - # @overload link_lfp_provider(request, options = nil) - # Pass arguments to `link_lfp_provider` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload link_lfp_provider(name: nil, external_account_id: nil) - # Pass arguments to `link_lfp_provider` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the LFP provider resource to link. - # Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. - # The `lfp_provider` is the LFP provider ID. - # @param external_account_id [::String] - # Required. The external account ID by which this merchant is known to the - # LFP provider. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new - # - # # Call the link_lfp_provider method. - # result = client.link_lfp_provider request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse. - # p result - # - def link_lfp_provider request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.link_lfp_provider.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.link_lfp_provider.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.link_lfp_provider.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_providers_service_stub.link_lfp_provider request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the LfpProvidersService REST API. - # - # This class represents the configuration for LfpProvidersService 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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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 - # # find_lfp_providers to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.find_lfp_providers.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.find_lfp_providers.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpProvidersService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `find_lfp_providers` - # @return [::Gapic::Config::Method] - # - attr_reader :find_lfp_providers - ## - # RPC-specific configuration for `link_lfp_provider` - # @return [::Gapic::Config::Method] - # - attr_reader :link_lfp_provider - - # @private - def initialize parent_rpcs = nil - find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers - @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config - link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider - @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb deleted file mode 100644 index 490af09ca942..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - module Rest - ## - # REST service stub for the LfpProvidersService 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 find_lfp_providers REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse] - # A result object deserialized from the server's reply - def find_lfp_providers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_find_lfp_providers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "find_lfp_providers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the link_lfp_provider REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # A result object deserialized from the server's reply - def link_lfp_provider request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_link_lfp_provider_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "link_lfp_provider", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse.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 find_lfp_providers REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_find_lfp_providers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/lfpProviders:find", - matches: [ - ["parent", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the link_lfp_provider REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_link_lfp_provider_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:linkLfpProvider", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/lfpProviders/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb deleted file mode 100644 index 672686b1abaf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/lfpproviders.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n;google/shopping/merchant/accounts/v1beta/lfpproviders.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xf4\x01\n\x0bLfpProvider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t:\xa1\x01\xea\x41\x9d\x01\n&merchantapi.googleapis.com/LfpProvider\x12Xaccounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}*\x0clfpProviders2\x0blfpProvider\"\x91\x01\n\x17\x46indLfpProvidersRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-merchantapi.googleapis.com/OmnichannelSetting\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x81\x01\n\x18\x46indLfpProvidersResponse\x12L\n\rlfp_providers\x18\x01 \x03(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.LfpProvider\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n\x16LinkLfpProviderRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&merchantapi.googleapis.com/LfpProvider\x12 \n\x13\x65xternal_account_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"C\n\x17LinkLfpProviderResponse\x12(\n\x08response\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Empty2\xdd\x04\n\x13LfpProvidersService\x12\xf8\x01\n\x10\x46indLfpProviders\x12\x41.google.shopping.merchant.accounts.v1beta.FindLfpProvidersRequest\x1a\x42.google.shopping.merchant.accounts.v1beta.FindLfpProvidersResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/accounts/v1beta/{parent=accounts/*/omnichannelSettings/*}/lfpProviders:find\x12\x81\x02\n\x0fLinkLfpProvider\x12@.google.shopping.merchant.accounts.v1beta.LinkLfpProviderRequest\x1a\x41.google.shopping.merchant.accounts.v1beta.LinkLfpProviderResponse\"i\xda\x41\x04name\x82\xd3\xe4\x93\x02\\\"W/accounts/v1beta/{name=accounts/*/omnichannelSettings/*/lfpProviders/*}:linkLfpProvider:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x01\n,com.google.shopping.merchant.accounts.v1betaB\x11LfpProvidersProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - LfpProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LfpProvider").msgclass - FindLfpProvidersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.FindLfpProvidersRequest").msgclass - FindLfpProvidersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.FindLfpProvidersResponse").msgclass - LinkLfpProviderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkLfpProviderRequest").msgclass - LinkLfpProviderResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkLfpProviderResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb deleted file mode 100644 index f8deaf08100e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/lfpproviders.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/lfpproviders_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.LfpProvidersService' - - # Find the LFP provider candidates in a given country. - rpc :FindLfpProviders, ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse - # Link the specified merchant to a LFP provider for the specified country. - rpc :LinkLfpProvider, ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb deleted file mode 100644 index a05a5462fd00..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's omnichannel settings. - # ## This API defines the following resource model: - # - # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - module OmnichannelSettingsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "omnichannel_settings_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb deleted file mode 100644 index b8436779d0fe..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb +++ /dev/null @@ -1,892 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OmnichannelSettingsService - ## - # Client for the OmnichannelSettingsService service. - # - # The service facilitates the management of a merchant's omnichannel settings. - # ## This API defines the following resource model: - # - # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :omnichannel_settings_service_stub - - ## - # Configure the OmnichannelSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OmnichannelSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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 - @omnichannel_settings_service_stub.universe_domain - end - - ## - # Create a new OmnichannelSettingsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OmnichannelSettingsService 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/shopping/merchant/accounts/v1beta/omnichannelsettings_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 - - @omnichannel_settings_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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 - ) - - @omnichannel_settings_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 - @omnichannel_settings_service_stub.logger - end - - # Service calls - - ## - # Get the omnichannel settings for a given merchant. - # - # @overload get_omnichannel_setting(request, options = nil) - # Pass arguments to `get_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_omnichannel_setting(name: nil) - # Pass arguments to `get_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the omnichannel setting to retrieve. - # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new - # - # # Call the get_omnichannel_setting method. - # result = client.get_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def get_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_omnichannel_setting.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :get_omnichannel_setting, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all the omnichannel settings for a given merchant. - # - # @overload list_omnichannel_settings(request, options = nil) - # Pass arguments to `list_omnichannel_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_omnichannel_settings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_omnichannel_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of omnichannel settings. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of omnichannel settings to return. The service - # may return fewer than this value. If unspecified, at most 50 omnichannel - # settings will be returned. The maximum value is 1000; values above 1000 - # will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListOmnichannelSettings` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListOmnichannelSettings` - # must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new - # - # # Call the list_omnichannel_settings method. - # result = client.list_omnichannel_settings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p item - # end - # - def list_omnichannel_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_omnichannel_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_omnichannel_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :list_omnichannel_settings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create the omnichannel settings for a given merchant. - # - # @overload create_omnichannel_setting(request, options = nil) - # Pass arguments to `create_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_omnichannel_setting(parent: nil, omnichannel_setting: nil) - # Pass arguments to `create_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this omnichannel setting will be - # created. Format: `accounts/{account}` - # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] - # Required. The omnichannel setting to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new - # - # # Call the create_omnichannel_setting method. - # result = client.create_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def create_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest - - # Converts hash and nil to 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_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_omnichannel_setting.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :create_omnichannel_setting, request, 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 the omnichannel setting for a given merchant in a given country. - # - # @overload update_omnichannel_setting(request, options = nil) - # Pass arguments to `update_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil) - # Pass arguments to `update_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] - # Required. The omnichannel setting to update. - # - # The omnichannel setting's `name` field is used to identify the - # omnichannel setting to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to be updated. - # - # The following fields are supported in snake_case only: - # - `lsf_type` - # - `in_stock` - # - `pickup` - # - `odo` - # - `about` - # - `inventory_verification` - # - # Full replacement with wildcard `*`is supported, while empty/implied update - # mask is not. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new - # - # # Call the update_omnichannel_setting method. - # result = client.update_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def update_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest - - # Converts hash and nil to 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_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.omnichannel_setting&.name - header_params["omnichannel_setting.name"] = request.omnichannel_setting.name - end - - request_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_omnichannel_setting.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :update_omnichannel_setting, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Requests inventory verification for a given merchant in a given country. - # - # @overload request_inventory_verification(request, options = nil) - # Pass arguments to `request_inventory_verification` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload request_inventory_verification(name: nil) - # Pass arguments to `request_inventory_verification` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the omnichannel setting to request inventory - # verification. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new - # - # # Call the request_inventory_verification method. - # result = client.request_inventory_verification request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse. - # p result - # - def request_inventory_verification request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.request_inventory_verification.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.request_inventory_verification.timeout, - metadata: metadata, - retry_policy: @config.rpcs.request_inventory_verification.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :request_inventory_verification, request, 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 OmnichannelSettingsService API. - # - # This class represents the configuration for OmnichannelSettingsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_omnichannel_setting to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_omnichannel_setting.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_omnichannel_setting.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 OmnichannelSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :get_omnichannel_setting - ## - # RPC-specific configuration for `list_omnichannel_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_omnichannel_settings - ## - # RPC-specific configuration for `create_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :create_omnichannel_setting - ## - # RPC-specific configuration for `update_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :update_omnichannel_setting - ## - # RPC-specific configuration for `request_inventory_verification` - # @return [::Gapic::Config::Method] - # - attr_reader :request_inventory_verification - - # @private - def initialize parent_rpcs = nil - get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting - @get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config - list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings - @list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config - create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting - @create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config - update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting - @update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config - request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification - @request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb deleted file mode 100644 index b68c12fb3003..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_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 Shopping - module Merchant - module Accounts - module V1beta - module OmnichannelSettingsService - # Credentials for the OmnichannelSettingsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb deleted file mode 100644 index e50d1ca4f146..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_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 Shopping - module Merchant - module Accounts - module V1beta - module OmnichannelSettingsService - # Path helper methods for the OmnichannelSettingsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified OmnichannelSetting resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # - # @param account [String] - # @param omnichannel_setting [String] - # - # @return [::String] - def omnichannel_setting_path account:, omnichannel_setting: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb deleted file mode 100644 index 263f2eb40bce..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's omnichannel settings. - # ## This API defines the following resource model: - # - # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - module OmnichannelSettingsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb deleted file mode 100644 index 6b7df2b5f6c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb +++ /dev/null @@ -1,814 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OmnichannelSettingsService - module Rest - ## - # REST client for the OmnichannelSettingsService service. - # - # The service facilitates the management of a merchant's omnichannel settings. - # ## This API defines the following resource model: - # - # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :omnichannel_settings_service_stub - - ## - # Configure the OmnichannelSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OmnichannelSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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 - @omnichannel_settings_service_stub.universe_domain - end - - ## - # Create a new OmnichannelSettingsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OmnichannelSettingsService 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 - - @omnichannel_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @omnichannel_settings_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 - @omnichannel_settings_service_stub.logger - end - - # Service calls - - ## - # Get the omnichannel settings for a given merchant. - # - # @overload get_omnichannel_setting(request, options = nil) - # Pass arguments to `get_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_omnichannel_setting(name: nil) - # Pass arguments to `get_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the omnichannel setting to retrieve. - # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new - # - # # Call the get_omnichannel_setting method. - # result = client.get_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def get_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_omnichannel_setting.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.get_omnichannel_setting request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all the omnichannel settings for a given merchant. - # - # @overload list_omnichannel_settings(request, options = nil) - # Pass arguments to `list_omnichannel_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_omnichannel_settings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_omnichannel_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of omnichannel settings. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of omnichannel settings to return. The service - # may return fewer than this value. If unspecified, at most 50 omnichannel - # settings will be returned. The maximum value is 1000; values above 1000 - # will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListOmnichannelSettings` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListOmnichannelSettings` - # must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new - # - # # Call the list_omnichannel_settings method. - # result = client.list_omnichannel_settings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p item - # end - # - def list_omnichannel_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_omnichannel_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_omnichannel_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.list_omnichannel_settings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, "omnichannel_settings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create the omnichannel settings for a given merchant. - # - # @overload create_omnichannel_setting(request, options = nil) - # Pass arguments to `create_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_omnichannel_setting(parent: nil, omnichannel_setting: nil) - # Pass arguments to `create_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this omnichannel setting will be - # created. Format: `accounts/{account}` - # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] - # Required. The omnichannel setting to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new - # - # # Call the create_omnichannel_setting method. - # result = client.create_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def create_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest - - # Converts hash and nil to an 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_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_omnichannel_setting.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.create_omnichannel_setting request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update the omnichannel setting for a given merchant in a given country. - # - # @overload update_omnichannel_setting(request, options = nil) - # Pass arguments to `update_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil) - # Pass arguments to `update_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] - # Required. The omnichannel setting to update. - # - # The omnichannel setting's `name` field is used to identify the - # omnichannel setting to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to be updated. - # - # The following fields are supported in snake_case only: - # - `lsf_type` - # - `in_stock` - # - `pickup` - # - `odo` - # - `about` - # - `inventory_verification` - # - # Full replacement with wildcard `*`is supported, while empty/implied update - # mask is not. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new - # - # # Call the update_omnichannel_setting method. - # result = client.update_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def update_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest - - # Converts hash and nil to an 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_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_omnichannel_setting.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.update_omnichannel_setting request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Requests inventory verification for a given merchant in a given country. - # - # @overload request_inventory_verification(request, options = nil) - # Pass arguments to `request_inventory_verification` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload request_inventory_verification(name: nil) - # Pass arguments to `request_inventory_verification` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the omnichannel setting to request inventory - # verification. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new - # - # # Call the request_inventory_verification method. - # result = client.request_inventory_verification request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse. - # p result - # - def request_inventory_verification request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.request_inventory_verification.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.request_inventory_verification.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.request_inventory_verification.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.request_inventory_verification request, 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 OmnichannelSettingsService REST API. - # - # This class represents the configuration for OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_omnichannel_setting to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_omnichannel_setting.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_omnichannel_setting.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 OmnichannelSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :get_omnichannel_setting - ## - # RPC-specific configuration for `list_omnichannel_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_omnichannel_settings - ## - # RPC-specific configuration for `create_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :create_omnichannel_setting - ## - # RPC-specific configuration for `update_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :update_omnichannel_setting - ## - # RPC-specific configuration for `request_inventory_verification` - # @return [::Gapic::Config::Method] - # - attr_reader :request_inventory_verification - - # @private - def initialize parent_rpcs = nil - get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting - @get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config - list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings - @list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config - create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting - @create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config - update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting - @update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config - request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification - @request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb deleted file mode 100644 index 6ceefbcd5ee9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb +++ /dev/null @@ -1,391 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OmnichannelSettingsService - module Rest - ## - # REST service stub for the OmnichannelSettingsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # A result object deserialized from the server's reply - def get_omnichannel_setting request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_omnichannel_setting_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_omnichannel_setting", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.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_omnichannel_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse] - # A result object deserialized from the server's reply - def list_omnichannel_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_omnichannel_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_omnichannel_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse.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_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # A result object deserialized from the server's reply - def create_omnichannel_setting request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_omnichannel_setting_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_omnichannel_setting", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.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_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # A result object deserialized from the server's reply - def update_omnichannel_setting request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_omnichannel_setting_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_omnichannel_setting", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the request_inventory_verification REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # A result object deserialized from the server's reply - def request_inventory_verification request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_request_inventory_verification_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "request_inventory_verification", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_omnichannel_setting_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_omnichannel_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_omnichannel_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/omnichannelSettings", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest] - # 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_omnichannel_setting_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/omnichannelSettings", - body: "omnichannel_setting", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest] - # 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_omnichannel_setting_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{omnichannel_setting.name}", - body: "omnichannel_setting", - matches: [ - ["omnichannel_setting.name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the request_inventory_verification REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_request_inventory_verification_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:requestInventoryVerification", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb deleted file mode 100644 index 7c74b858526a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/omnichannelsettings.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\nBgoogle/shopping/merchant/accounts/v1beta/omnichannelsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xe3\x06\n\x12OmnichannelSetting\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0bregion_code\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12[\n\x08lsf_type\x18\x0c \x01(\x0e\x32\x44.google.shopping.merchant.accounts.v1beta.OmnichannelSetting.LsfTypeB\x03\xe0\x41\x02\x12H\n\x08in_stock\x18\r \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.InStockB\x03\xe0\x41\x01\x12\x45\n\x06pickup\x18\x0e \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.PickupB\x03\xe0\x41\x01\x12H\n\x08lfp_link\x18\x05 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.LfpLinkB\x03\xe0\x41\x03\x12L\n\x03odo\x18\x06 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.OnDisplayToOrderB\x03\xe0\x41\x01\x12\x43\n\x05\x61\x62out\x18\x07 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1beta.AboutB\x03\xe0\x41\x01\x12\x64\n\x16inventory_verification\x18\x08 \x01(\x0b\x32?.google.shopping.merchant.accounts.v1beta.InventoryVerificationB\x03\xe0\x41\x01\"O\n\x07LsfType\x12\x18\n\x14LSF_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05GHLSF\x10\x01\x12\x0f\n\x0bMHLSF_BASIC\x10\x02\x12\x0e\n\nMHLSF_FULL\x10\x03:\x9a\x01\xea\x41\x96\x01\n-merchantapi.googleapis.com/OmnichannelSetting\x12 e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all existing return policies for a given merchant. - # - # @overload list_online_return_policies(request, options = nil) - # Pass arguments to `list_online_return_policies` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_online_return_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_online_return_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which to list return policies. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of `OnlineReturnPolicy` resources to return. - # The service returns fewer than this value if the number of return policies - # for the given merchant is less that than the `pageSize`. The default value - # is 10. The maximum value is 100; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum - # @param page_token [::String] - # Optional. A page token, received from a previous `ListOnlineReturnPolicies` - # call. Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListOnlineReturnPolicies` must match the call that provided the page - # token. The token returned as - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new - # - # # Call the list_online_return_policies method. - # result = client.list_online_return_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p item - # end - # - def list_online_return_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_online_return_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_online_return_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_online_return_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.call_rpc :list_online_return_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @online_return_policy_service_stub, :list_online_return_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new return policy for a given merchant. - # - # @overload create_online_return_policy(request, options = nil) - # Pass arguments to `create_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_online_return_policy(parent: nil, online_return_policy: nil) - # Pass arguments to `create_online_return_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 parent [::String] - # Required. The merchant account for which the return policy will be created. - # Format: `accounts/{account}` - # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] - # Required. The return policy object to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new - # - # # Call the create_online_return_policy method. - # result = client.create_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p result - # - def create_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest - - # Converts hash and nil to 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_online_return_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::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_online_return_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.call_rpc :create_online_return_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 - - ## - # Updates an existing return policy for a given merchant. - # - # @overload update_online_return_policy(request, options = nil) - # Pass arguments to `update_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_online_return_policy(online_return_policy: nil, update_mask: nil) - # Pass arguments to `update_online_return_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 online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] - # Required. The online return policy to update. - # The online return policy's `name` field is used to identify the - # online return policy to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `accept_defective_only` - # - `accept_exchange` - # - `item_conditions` - # - `policy` - # - `process_refund_days` - # - `restocking_fee` - # - `return_methods` - # - `return_policy_uri` - # - `return_shipping_fee` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new - # - # # Call the update_online_return_policy method. - # result = client.update_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p result - # - def update_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest - - # Converts hash and nil to 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_online_return_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::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.online_return_policy&.name - header_params["online_return_policy.name"] = request.online_return_policy.name - end - - request_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_online_return_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.call_rpc :update_online_return_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 - - ## - # Deletes an existing return policy. - # - # @overload delete_online_return_policy(request, options = nil) - # Pass arguments to `delete_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_online_return_policy(name: nil) - # Pass arguments to `delete_online_return_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 name [::String] - # Required. The name of the return policy to delete. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - # - # @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/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new - # - # # Call the delete_online_return_policy method. - # result = client.delete_online_return_policy request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_online_return_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::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_online_return_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.call_rpc :delete_online_return_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 - - ## - # Configuration class for the OnlineReturnPolicyService API. - # - # This class represents the configuration for OnlineReturnPolicyService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_online_return_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_online_return_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_online_return_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 OnlineReturnPolicyService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_online_return_policy - ## - # RPC-specific configuration for `list_online_return_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_online_return_policies - ## - # RPC-specific configuration for `create_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_online_return_policy - ## - # RPC-specific configuration for `update_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_online_return_policy - ## - # RPC-specific configuration for `delete_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_online_return_policy - - # @private - def initialize parent_rpcs = nil - get_online_return_policy_config = parent_rpcs.get_online_return_policy if parent_rpcs.respond_to? :get_online_return_policy - @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config - list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies - @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config - create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy - @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config - update_online_return_policy_config = parent_rpcs.update_online_return_policy if parent_rpcs.respond_to? :update_online_return_policy - @update_online_return_policy = ::Gapic::Config::Method.new update_online_return_policy_config - delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy - @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb deleted file mode 100644 index 65cce8eedd0a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_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 Shopping - module Merchant - module Accounts - module V1beta - module OnlineReturnPolicyService - # Credentials for the OnlineReturnPolicyService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb deleted file mode 100644 index 99da2a7379d2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_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 Shopping - module Merchant - module Accounts - module V1beta - module OnlineReturnPolicyService - # Path helper methods for the OnlineReturnPolicyService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified OnlineReturnPolicy resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/onlineReturnPolicies/{return_policy}` - # - # @param account [String] - # @param return_policy [String] - # - # @return [::String] - def online_return_policy_path account:, return_policy: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/onlineReturnPolicies/#{return_policy}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb deleted file mode 100644 index aae7187d3bc3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's remorse return policy - # configuration, encompassing return policies for both ads and free listings - # ## programs. This API defines the following resource model: - # - # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy) - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - module OnlineReturnPolicyService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb deleted file mode 100644 index 4dd96a0fc90c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb +++ /dev/null @@ -1,819 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/online_return_policy_pb" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OnlineReturnPolicyService - module Rest - ## - # REST client for the OnlineReturnPolicyService service. - # - # The service facilitates the management of a merchant's remorse return policy - # configuration, encompassing return policies for both ads and free listings - # ## programs. This API defines the following resource model: - # - # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy) - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :online_return_policy_service_stub - - ## - # Configure the OnlineReturnPolicyService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OnlineReturnPolicyService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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 - @online_return_policy_service_stub.universe_domain - end - - ## - # Create a new OnlineReturnPolicyService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OnlineReturnPolicyService 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 - - @online_return_policy_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @online_return_policy_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 - @online_return_policy_service_stub.logger - end - - # Service calls - - ## - # Gets an existing return policy for a given merchant. - # - # @overload get_online_return_policy(request, options = nil) - # Pass arguments to `get_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_online_return_policy(name: nil) - # Pass arguments to `get_online_return_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 name [::String] - # Required. The name of the return policy to retrieve. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new - # - # # Call the get_online_return_policy method. - # result = client.get_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p result - # - def get_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_online_return_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::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_online_return_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.get_online_return_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 - - ## - # Lists all existing return policies for a given merchant. - # - # @overload list_online_return_policies(request, options = nil) - # Pass arguments to `list_online_return_policies` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_online_return_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_online_return_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which to list return policies. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of `OnlineReturnPolicy` resources to return. - # The service returns fewer than this value if the number of return policies - # for the given merchant is less that than the `pageSize`. The default value - # is 10. The maximum value is 100; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum - # @param page_token [::String] - # Optional. A page token, received from a previous `ListOnlineReturnPolicies` - # call. Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListOnlineReturnPolicies` must match the call that provided the page - # token. The token returned as - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new - # - # # Call the list_online_return_policies method. - # result = client.list_online_return_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p item - # end - # - def list_online_return_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_online_return_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_online_return_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_online_return_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.list_online_return_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @online_return_policy_service_stub, :list_online_return_policies, "online_return_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new return policy for a given merchant. - # - # @overload create_online_return_policy(request, options = nil) - # Pass arguments to `create_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_online_return_policy(parent: nil, online_return_policy: nil) - # Pass arguments to `create_online_return_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 parent [::String] - # Required. The merchant account for which the return policy will be created. - # Format: `accounts/{account}` - # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] - # Required. The return policy object to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new - # - # # Call the create_online_return_policy method. - # result = client.create_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p result - # - def create_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest - - # Converts hash and nil to an 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_online_return_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::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_online_return_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.create_online_return_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 - - ## - # Updates an existing return policy for a given merchant. - # - # @overload update_online_return_policy(request, options = nil) - # Pass arguments to `update_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_online_return_policy(online_return_policy: nil, update_mask: nil) - # Pass arguments to `update_online_return_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 online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] - # Required. The online return policy to update. - # The online return policy's `name` field is used to identify the - # online return policy to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `accept_defective_only` - # - `accept_exchange` - # - `item_conditions` - # - `policy` - # - `process_refund_days` - # - `restocking_fee` - # - `return_methods` - # - `return_policy_uri` - # - `return_shipping_fee` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new - # - # # Call the update_online_return_policy method. - # result = client.update_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p result - # - def update_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest - - # Converts hash and nil to an 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_online_return_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::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_online_return_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.update_online_return_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 - - ## - # Deletes an existing return policy. - # - # @overload delete_online_return_policy(request, options = nil) - # Pass arguments to `delete_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_online_return_policy(name: nil) - # Pass arguments to `delete_online_return_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 name [::String] - # Required. The name of the return policy to delete. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - # @yield [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/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new - # - # # Call the delete_online_return_policy method. - # result = client.delete_online_return_policy request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_online_return_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::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_online_return_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.delete_online_return_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 - - ## - # Configuration class for the OnlineReturnPolicyService REST API. - # - # This class represents the configuration for OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_online_return_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_online_return_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_online_return_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 OnlineReturnPolicyService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_online_return_policy - ## - # RPC-specific configuration for `list_online_return_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_online_return_policies - ## - # RPC-specific configuration for `create_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_online_return_policy - ## - # RPC-specific configuration for `update_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_online_return_policy - ## - # RPC-specific configuration for `delete_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_online_return_policy - - # @private - def initialize parent_rpcs = nil - get_online_return_policy_config = parent_rpcs.get_online_return_policy if parent_rpcs.respond_to? :get_online_return_policy - @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config - list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies - @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config - create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy - @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config - update_online_return_policy_config = parent_rpcs.update_online_return_policy if parent_rpcs.respond_to? :update_online_return_policy - @update_online_return_policy = ::Gapic::Config::Method.new update_online_return_policy_config - delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy - @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb deleted file mode 100644 index dedd98287a41..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb +++ /dev/null @@ -1,390 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/online_return_policy_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OnlineReturnPolicyService - module Rest - ## - # REST service stub for the OnlineReturnPolicyService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # A result object deserialized from the server's reply - def get_online_return_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_online_return_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_online_return_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.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_online_return_policies REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse] - # A result object deserialized from the server's reply - def list_online_return_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_online_return_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_online_return_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse.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_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # A result object deserialized from the server's reply - def create_online_return_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_online_return_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: "create_online_return_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.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_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # A result object deserialized from the server's reply - def update_online_return_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_online_return_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: "update_online_return_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.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_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_online_return_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_online_return_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: "delete_online_return_policy", - 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 get_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_online_return_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_online_return_policies REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_online_return_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/onlineReturnPolicies", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest] - # 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_online_return_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/onlineReturnPolicies", - body: "online_return_policy", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest] - # 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_online_return_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{online_return_policy.name}", - body: "online_return_policy", - matches: [ - ["online_return_policy.name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_online_return_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb deleted file mode 100644 index 0fe2ffb749d5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb +++ /dev/null @@ -1,59 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/online_return_policy.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/online_return_policy_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OnlineReturnPolicyService - # The service facilitates the management of a merchant's remorse return policy - # configuration, encompassing return policies for both ads and free listings - # ## programs. This API defines the following resource model: - # - # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy) - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService' - - # Gets an existing return policy for a given merchant. - rpc :GetOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy - # Lists all existing return policies for a given merchant. - rpc :ListOnlineReturnPolicies, ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse - # Creates a new return policy for a given merchant. - rpc :CreateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy - # Updates an existing return policy for a given merchant. - rpc :UpdateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy - # Deletes an existing return policy. - rpc :DeleteOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb deleted file mode 100644 index 54a151690147..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/phoneverificationstate.proto - -require 'google/protobuf' - - -descriptor_data = "\nEgoogle/shopping/merchant/accounts/v1beta/phoneverificationstate.proto\x12(google.shopping.merchant.accounts.v1beta*\x92\x01\n\x16PhoneVerificationState\x12(\n$PHONE_VERIFICATION_STATE_UNSPECIFIED\x10\x00\x12%\n!PHONE_VERIFICATION_STATE_VERIFIED\x10\x01\x12\'\n#PHONE_VERIFICATION_STATE_UNVERIFIED\x10\x02\x42\x9d\x01\n,com.google.shopping.merchant.accounts.v1betaB\x1bPhoneVerificationStateProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - PhoneVerificationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.PhoneVerificationState").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb deleted file mode 100644 index b4a19137e869..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/programs.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 = "\n7google/shopping/merchant/accounts/v1beta/programs.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa2\x04\n\x07Program\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x11\x64ocumentation_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12K\n\x05state\x18\x03 \x01(\x0e\x32\x37.google.shopping.merchant.accounts.v1beta.Program.StateB\x03\xe0\x41\x03\x12 \n\x13\x61\x63tive_region_codes\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12^\n\x12unmet_requirements\x18\x05 \x03(\x0b\x32=.google.shopping.merchant.accounts.v1beta.Program.RequirementB\x03\xe0\x41\x03\x1a\x65\n\x0bRequirement\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1e\n\x11\x64ocumentation_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15\x61\x66\x66\x65\x63ted_region_codes\x18\x03 \x03(\tB\x03\xe0\x41\x03\"K\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_ELIGIBLE\x10\x01\x12\x0c\n\x08\x45LIGIBLE\x10\x02\x12\x0b\n\x07\x45NABLED\x10\x03:a\xea\x41^\n\"merchantapi.googleapis.com/Program\x12%accounts/{account}/programs/{program}*\x08programs2\x07program\"M\n\x11GetProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program\"\x82\x01\n\x13ListProgramsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Program\x12\x16\n\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\x14ListProgramsResponse\x12\x43\n\x08programs\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.Program\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x14\x45nableProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program\"Q\n\x15\x44isableProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program2\x84\x07\n\x0fProgramsService\x12\xba\x01\n\nGetProgram\x12;.google.shopping.merchant.accounts.v1beta.GetProgramRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Program\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/accounts/v1beta/{name=accounts/*/programs/*}\x12\xcd\x01\n\x0cListPrograms\x12=.google.shopping.merchant.accounts.v1beta.ListProgramsRequest\x1a>.google.shopping.merchant.accounts.v1beta.ListProgramsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/accounts/v1beta/{parent=accounts/*}/programs\x12\xca\x01\n\rEnableProgram\x12>.google.shopping.merchant.accounts.v1beta.EnableProgramRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Program\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/accounts/v1beta/{name=accounts/*/programs/*}:enable:\x01*\x12\xcd\x01\n\x0e\x44isableProgram\x12?.google.shopping.merchant.accounts.v1beta.DisableProgramRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Program\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/accounts/v1beta/{name=accounts/*/programs/*}:disable:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8f\x01\n,com.google.shopping.merchant.accounts.v1betaB\rProgramsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - Program = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Program").msgclass - Program::Requirement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Program.Requirement").msgclass - Program::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Program.State").enummodule - GetProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetProgramRequest").msgclass - ListProgramsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListProgramsRequest").msgclass - ListProgramsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListProgramsResponse").msgclass - EnableProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.EnableProgramRequest").msgclass - DisableProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DisableProgramRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb deleted file mode 100644 index 5c31844c5c2f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.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 "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/programs_service/credentials" -require "google/shopping/merchant/accounts/v1beta/programs_service/paths" -require "google/shopping/merchant/accounts/v1beta/programs_service/client" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/programs_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/programs_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - module ProgramsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "programs_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/programs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb deleted file mode 100644 index 6133609391bb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb +++ /dev/null @@ -1,786 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/programs_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - ## - # Client for the ProgramsService service. - # - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :programs_service_stub - - ## - # Configure the ProgramsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProgramsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ProgramsService 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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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 - @programs_service_stub.universe_domain - end - - ## - # Create a new ProgramsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProgramsService 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/shopping/merchant/accounts/v1beta/programs_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 - - @programs_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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 - ) - - @programs_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 - @programs_service_stub.logger - end - - # Service calls - - ## - # Retrieves the specified program for the account. - # - # @overload get_program(request, options = nil) - # Pass arguments to `get_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_program(name: nil) - # Pass arguments to `get_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program to retrieve. - # Format: `accounts/{account}/programs/{program}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new - # - # # Call the get_program method. - # result = client.get_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def get_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_program.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.call_rpc :get_program, request, 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 all programs for the account. - # - # @overload list_programs(request, options = nil) - # Pass arguments to `list_programs` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_programs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_programs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account for which to retrieve all programs. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of programs to return in a single response. If - # unspecified (or 0), a default size of 1000 is used. The maximum value is - # 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A continuation token, received from a previous `ListPrograms` - # call. Provide this to retrieve the next page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new - # - # # Call the list_programs method. - # result = client.list_programs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Program. - # p item - # end - # - def list_programs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_programs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_programs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_programs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.call_rpc :list_programs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @programs_service_stub, :list_programs, 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 - - ## - # Enable participation in the specified program for the account. Executing - # this method requires admin access. - # - # @overload enable_program(request, options = nil) - # Pass arguments to `enable_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload enable_program(name: nil) - # Pass arguments to `enable_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program for which to enable participation for the - # given account. Format: `accounts/{account}/programs/{program}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new - # - # # Call the enable_program method. - # result = client.enable_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def enable_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.enable_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.enable_program.timeout, - metadata: metadata, - retry_policy: @config.rpcs.enable_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.call_rpc :enable_program, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disable participation in the specified program for the account. Executing - # this method requires admin access. - # - # @overload disable_program(request, options = nil) - # Pass arguments to `disable_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload disable_program(name: nil) - # Pass arguments to `disable_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program for which to disable participation for - # the given account. Format: `accounts/{account}/programs/{program}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new - # - # # Call the disable_program method. - # result = client.disable_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def disable_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.disable_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.disable_program.timeout, - metadata: metadata, - retry_policy: @config.rpcs.disable_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.call_rpc :disable_program, request, 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 ProgramsService API. - # - # This class represents the configuration for ProgramsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_program to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_program.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_program.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ProgramsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_program` - # @return [::Gapic::Config::Method] - # - attr_reader :get_program - ## - # RPC-specific configuration for `list_programs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_programs - ## - # RPC-specific configuration for `enable_program` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_program - ## - # RPC-specific configuration for `disable_program` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_program - - # @private - def initialize parent_rpcs = nil - get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program - @get_program = ::Gapic::Config::Method.new get_program_config - list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs - @list_programs = ::Gapic::Config::Method.new list_programs_config - enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program - @enable_program = ::Gapic::Config::Method.new enable_program_config - disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program - @disable_program = ::Gapic::Config::Method.new disable_program_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb deleted file mode 100644 index 2935731c5fc6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_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 Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - # Credentials for the ProgramsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb deleted file mode 100644 index 3b9b815133bd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_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 Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - # Path helper methods for the ProgramsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified Program resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/programs/{program}` - # - # @param account [String] - # @param program [String] - # - # @return [::String] - def program_path account:, program: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/programs/#{program}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb deleted file mode 100644 index ffbd61628a98..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/programs_service/credentials" -require "google/shopping/merchant/accounts/v1beta/programs_service/paths" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/programs_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - module ProgramsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb deleted file mode 100644 index 5376b543b7b1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb +++ /dev/null @@ -1,715 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/programs_pb" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - module Rest - ## - # REST client for the ProgramsService service. - # - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :programs_service_stub - - ## - # Configure the ProgramsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProgramsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ProgramsService 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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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 - @programs_service_stub.universe_domain - end - - ## - # Create a new ProgramsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProgramsService 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 - - @programs_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @programs_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 - @programs_service_stub.logger - end - - # Service calls - - ## - # Retrieves the specified program for the account. - # - # @overload get_program(request, options = nil) - # Pass arguments to `get_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_program(name: nil) - # Pass arguments to `get_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program to retrieve. - # Format: `accounts/{account}/programs/{program}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new - # - # # Call the get_program method. - # result = client.get_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def get_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_program.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.get_program request, 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 all programs for the account. - # - # @overload list_programs(request, options = nil) - # Pass arguments to `list_programs` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_programs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_programs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account for which to retrieve all programs. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of programs to return in a single response. If - # unspecified (or 0), a default size of 1000 is used. The maximum value is - # 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A continuation token, received from a previous `ListPrograms` - # call. Provide this to retrieve the next page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new - # - # # Call the list_programs method. - # result = client.list_programs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Program. - # p item - # end - # - def list_programs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_programs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_programs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_programs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.list_programs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @programs_service_stub, :list_programs, "programs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enable participation in the specified program for the account. Executing - # this method requires admin access. - # - # @overload enable_program(request, options = nil) - # Pass arguments to `enable_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload enable_program(name: nil) - # Pass arguments to `enable_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program for which to enable participation for the - # given account. Format: `accounts/{account}/programs/{program}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new - # - # # Call the enable_program method. - # result = client.enable_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def enable_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.enable_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.enable_program.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.enable_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.enable_program request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disable participation in the specified program for the account. Executing - # this method requires admin access. - # - # @overload disable_program(request, options = nil) - # Pass arguments to `disable_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload disable_program(name: nil) - # Pass arguments to `disable_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program for which to disable participation for - # the given account. Format: `accounts/{account}/programs/{program}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new - # - # # Call the disable_program method. - # result = client.disable_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def disable_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.disable_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.disable_program.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.disable_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.disable_program request, 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 ProgramsService REST API. - # - # This class represents the configuration for ProgramsService 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::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_program to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_program.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_program.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ProgramsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_program` - # @return [::Gapic::Config::Method] - # - attr_reader :get_program - ## - # RPC-specific configuration for `list_programs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_programs - ## - # RPC-specific configuration for `enable_program` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_program - ## - # RPC-specific configuration for `disable_program` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_program - - # @private - def initialize parent_rpcs = nil - get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program - @get_program = ::Gapic::Config::Method.new get_program_config - list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs - @list_programs = ::Gapic::Config::Method.new list_programs_config - enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program - @enable_program = ::Gapic::Config::Method.new enable_program_config - disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program - @disable_program = ::Gapic::Config::Method.new disable_program_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb deleted file mode 100644 index bb7144364d14..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb +++ /dev/null @@ -1,329 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/programs_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - module Rest - ## - # REST service stub for the ProgramsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # A result object deserialized from the server's reply - def get_program request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_program_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_program", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.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_programs REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse] - # A result object deserialized from the server's reply - def list_programs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_programs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_programs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the enable_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # A result object deserialized from the server's reply - def enable_program request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_enable_program_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "enable_program", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the disable_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # A result object deserialized from the server's reply - def disable_program request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_disable_program_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "disable_program", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_program_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_programs REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_programs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/programs", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the enable_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_enable_program_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:enable", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the disable_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_disable_program_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:disable", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb deleted file mode 100644 index 8282a0f080fc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/programs.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/programs_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.ProgramsService' - - # Retrieves the specified program for the account. - rpc :GetProgram, ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program - # Retrieves all programs for the account. - rpc :ListPrograms, ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse - # Enable participation in the specified program for the account. Executing - # this method requires admin access. - rpc :EnableProgram, ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program - # Disable participation in the specified program for the account. Executing - # this method requires admin access. - rpc :DisableProgram, ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb deleted file mode 100644 index 012299b8a9d6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/regions.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n6google/shopping/merchant/accounts/v1beta/regions.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1egoogle/protobuf/wrappers.proto\"K\n\x10GetRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\xb0\x01\n\x13\x43reateRegionRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tregion_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x06region\x18\x03 \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.RegionB\x03\xe0\x41\x02\"\x92\x01\n\x13UpdateRegionRequest\x12\x45\n\x06region\x18\x01 \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.RegionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x13\x44\x65leteRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\x81\x01\n\x12ListRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\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\x13ListRegionsResponse\x12\x41\n\x07regions\x18\x01 \x03(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.Region\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf1\x05\n\x06Region\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12^\n\x10postal_code_area\x18\x03 \x01(\x0b\x32?.google.shopping.merchant.accounts.v1beta.Region.PostalCodeAreaB\x03\xe0\x41\x01\x12[\n\x0egeotarget_area\x18\x04 \x01(\x0b\x32>.google.shopping.merchant.accounts.v1beta.Region.GeoTargetAreaB\x03\xe0\x41\x01\x12\x44\n\x1bregional_inventory_eligible\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12:\n\x11shipping_eligible\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x1a\xcf\x01\n\x0ePostalCodeArea\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12j\n\x0cpostal_codes\x18\x02 \x03(\x0b\x32O.google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea.PostalCodeRangeB\x03\xe0\x41\x02\x1a\x37\n\x0fPostalCodeRange\x12\x12\n\x05\x62\x65gin\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03\x65nd\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x34\n\rGeoTargetArea\x12#\n\x16geotarget_criteria_ids\x18\x01 \x03(\x03\x42\x03\xe0\x41\x02:\\\xea\x41Y\n!merchantapi.googleapis.com/Region\x12#accounts/{account}/regions/{region}*\x07regions2\x06regionB\x0f\n\r_display_name2\xb9\x08\n\x0eRegionsService\x12\xb6\x01\n\tGetRegion\x12:.google.shopping.merchant.accounts.v1beta.GetRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/accounts/v1beta/{name=accounts/*/regions/*}\x12\xd7\x01\n\x0c\x43reateRegion\x12=.google.shopping.merchant.accounts.v1beta.CreateRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\"V\xda\x41\x17parent,region,region_id\x82\xd3\xe4\x93\x02\x36\",/accounts/v1beta/{parent=accounts/*}/regions:\x06region\x12\xd9\x01\n\x0cUpdateRegion\x12=.google.shopping.merchant.accounts.v1beta.UpdateRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\"X\xda\x41\x12region,update_mask\x82\xd3\xe4\x93\x02=23/accounts/v1beta/{region.name=accounts/*/regions/*}:\x06region\x12\xa2\x01\n\x0c\x44\x65leteRegion\x12=.google.shopping.merchant.accounts.v1beta.DeleteRegionRequest\x1a\x16.google.protobuf.Empty\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/accounts/v1beta/{name=accounts/*/regions/*}\x12\xc9\x01\n\x0bListRegions\x12<.google.shopping.merchant.accounts.v1beta.ListRegionsRequest\x1a=.google.shopping.merchant.accounts.v1beta.ListRegionsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/accounts/v1beta/{parent=accounts/*}/regions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8e\x01\n,com.google.shopping.merchant.accounts.v1betaB\x0cRegionsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - GetRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetRegionRequest").msgclass - CreateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateRegionRequest").msgclass - UpdateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateRegionRequest").msgclass - DeleteRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteRegionRequest").msgclass - ListRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListRegionsRequest").msgclass - ListRegionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListRegionsResponse").msgclass - Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region").msgclass - Region::PostalCodeArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea").msgclass - Region::PostalCodeArea::PostalCodeRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea.PostalCodeRange").msgclass - Region::GeoTargetArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.GeoTargetArea").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb deleted file mode 100644 index a6f7d439e86b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/regions_service/credentials" -require "google/shopping/merchant/accounts/v1beta/regions_service/paths" -require "google/shopping/merchant/accounts/v1beta/regions_service/client" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/regions_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/regions_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - module RegionsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "regions_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/regions_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb deleted file mode 100644 index fce72afcb413..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb +++ /dev/null @@ -1,886 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/regions_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - ## - # Client for the RegionsService service. - # - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :regions_service_stub - - ## - # Configure the RegionsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RegionsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RegionsService 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::Shopping::Merchant::Accounts::V1beta::RegionsService::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 - @regions_service_stub.universe_domain - end - - ## - # Create a new RegionsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RegionsService 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/shopping/merchant/accounts/v1beta/regions_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 - - @regions_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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 - ) - - @regions_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 - @regions_service_stub.logger - end - - # Service calls - - ## - # Retrieves a region defined in your Merchant Center account. - # - # @overload get_region(request, options = nil) - # Pass arguments to `get_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_region(name: nil) - # Pass arguments to `get_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the region to retrieve. - # Format: `accounts/{account}/regions/{region}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new - # - # # Call the get_region method. - # result = client.get_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def get_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_region.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :get_region, request, 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 region definition in your Merchant Center account. Executing this - # method requires admin access. - # - # @overload create_region(request, options = nil) - # Pass arguments to `create_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_region(parent: nil, region_id: nil, region: nil) - # Pass arguments to `create_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to create a region for. - # Format: `accounts/{account}` - # @param region_id [::String] - # Required. The identifier for the region, unique over all regions of the - # same account. - # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] - # Required. The region to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new - # - # # Call the create_region method. - # result = client.create_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def create_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest - - # Converts hash and nil to 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_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_region.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :create_region, request, 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 region definition in your Merchant Center account. Executing this - # method requires admin access. - # - # @overload update_region(request, options = nil) - # Pass arguments to `update_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_region(region: nil, update_mask: nil) - # Pass arguments to `update_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] - # Required. The updated region. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The comma-separated field mask indicating the fields to update. - # Example: - # `"displayName,postalCodeArea.regionCode"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new - # - # # Call the update_region method. - # result = client.update_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def update_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest - - # Converts hash and nil to 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_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.region&.name - header_params["region.name"] = request.region.name - end - - request_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_region.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :update_region, request, 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 region definition from your Merchant Center account. Executing - # this method requires admin access. - # - # @overload delete_region(request, options = nil) - # Pass arguments to `delete_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_region(name: nil) - # Pass arguments to `delete_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the region to delete. - # Format: `accounts/{account}/regions/{region}` - # - # @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/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new - # - # # Call the delete_region method. - # result = client.delete_region request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_region.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :delete_region, request, 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 regions in your Merchant Center account. - # - # @overload list_regions(request, options = nil) - # Pass arguments to `list_regions` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_regions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_regions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list regions for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of regions to return. The service may return - # fewer than this value. - # If unspecified, at most 50 regions will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListRegions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegions` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new - # - # # Call the list_regions method. - # result = client.list_regions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Region. - # p item - # end - # - def list_regions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_regions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_regions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_regions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :list_regions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @regions_service_stub, :list_regions, 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 RegionsService API. - # - # This class represents the configuration for RegionsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_region to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_region.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_region.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::RegionsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 RegionsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_region` - # @return [::Gapic::Config::Method] - # - attr_reader :get_region - ## - # RPC-specific configuration for `create_region` - # @return [::Gapic::Config::Method] - # - attr_reader :create_region - ## - # RPC-specific configuration for `update_region` - # @return [::Gapic::Config::Method] - # - attr_reader :update_region - ## - # RPC-specific configuration for `delete_region` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_region - ## - # RPC-specific configuration for `list_regions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_regions - - # @private - def initialize parent_rpcs = nil - get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region - @get_region = ::Gapic::Config::Method.new get_region_config - create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region - @create_region = ::Gapic::Config::Method.new create_region_config - update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region - @update_region = ::Gapic::Config::Method.new update_region_config - delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region - @delete_region = ::Gapic::Config::Method.new delete_region_config - list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions - @list_regions = ::Gapic::Config::Method.new list_regions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb deleted file mode 100644 index 536fce1bdfaf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_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 Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - # Credentials for the RegionsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb deleted file mode 100644 index b6f5e812e70d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_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 Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - # Path helper methods for the RegionsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified Region resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/regions/{region}` - # - # @param account [String] - # @param region [String] - # - # @return [::String] - def region_path account:, region: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/regions/#{region}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb deleted file mode 100644 index f359bf4bc293..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/regions_service/credentials" -require "google/shopping/merchant/accounts/v1beta/regions_service/paths" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/regions_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - module RegionsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb deleted file mode 100644 index 4aa76953495d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb +++ /dev/null @@ -1,808 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/regions_pb" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - module Rest - ## - # REST client for the RegionsService service. - # - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :regions_service_stub - - ## - # Configure the RegionsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RegionsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RegionsService 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::Shopping::Merchant::Accounts::V1beta::RegionsService::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 - @regions_service_stub.universe_domain - end - - ## - # Create a new RegionsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RegionsService 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 - - @regions_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @regions_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 - @regions_service_stub.logger - end - - # Service calls - - ## - # Retrieves a region defined in your Merchant Center account. - # - # @overload get_region(request, options = nil) - # Pass arguments to `get_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_region(name: nil) - # Pass arguments to `get_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the region to retrieve. - # Format: `accounts/{account}/regions/{region}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new - # - # # Call the get_region method. - # result = client.get_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def get_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_region.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.get_region request, 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 region definition in your Merchant Center account. Executing this - # method requires admin access. - # - # @overload create_region(request, options = nil) - # Pass arguments to `create_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_region(parent: nil, region_id: nil, region: nil) - # Pass arguments to `create_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to create a region for. - # Format: `accounts/{account}` - # @param region_id [::String] - # Required. The identifier for the region, unique over all regions of the - # same account. - # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] - # Required. The region to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new - # - # # Call the create_region method. - # result = client.create_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def create_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest - - # Converts hash and nil to an 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_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_region.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.create_region request, 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 region definition in your Merchant Center account. Executing this - # method requires admin access. - # - # @overload update_region(request, options = nil) - # Pass arguments to `update_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_region(region: nil, update_mask: nil) - # Pass arguments to `update_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] - # Required. The updated region. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The comma-separated field mask indicating the fields to update. - # Example: - # `"displayName,postalCodeArea.regionCode"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new - # - # # Call the update_region method. - # result = client.update_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def update_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest - - # Converts hash and nil to an 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_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_region.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.update_region request, 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 region definition from your Merchant Center account. Executing - # this method requires admin access. - # - # @overload delete_region(request, options = nil) - # Pass arguments to `delete_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_region(name: nil) - # Pass arguments to `delete_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the region to delete. - # Format: `accounts/{account}/regions/{region}` - # @yield [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/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new - # - # # Call the delete_region method. - # result = client.delete_region request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_region.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.delete_region request, 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 regions in your Merchant Center account. - # - # @overload list_regions(request, options = nil) - # Pass arguments to `list_regions` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_regions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_regions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list regions for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of regions to return. The service may return - # fewer than this value. - # If unspecified, at most 50 regions will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListRegions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegions` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new - # - # # Call the list_regions method. - # result = client.list_regions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Region. - # p item - # end - # - def list_regions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_regions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_regions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_regions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.list_regions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @regions_service_stub, :list_regions, "regions", request, result, 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 RegionsService REST API. - # - # This class represents the configuration for RegionsService 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::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_region to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_region.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_region.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 RegionsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_region` - # @return [::Gapic::Config::Method] - # - attr_reader :get_region - ## - # RPC-specific configuration for `create_region` - # @return [::Gapic::Config::Method] - # - attr_reader :create_region - ## - # RPC-specific configuration for `update_region` - # @return [::Gapic::Config::Method] - # - attr_reader :update_region - ## - # RPC-specific configuration for `delete_region` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_region - ## - # RPC-specific configuration for `list_regions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_regions - - # @private - def initialize parent_rpcs = nil - get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region - @get_region = ::Gapic::Config::Method.new get_region_config - create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region - @create_region = ::Gapic::Config::Method.new create_region_config - update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region - @update_region = ::Gapic::Config::Method.new update_region_config - delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region - @delete_region = ::Gapic::Config::Method.new delete_region_config - list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions - @list_regions = ::Gapic::Config::Method.new list_regions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb deleted file mode 100644 index 2705002746ab..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb +++ /dev/null @@ -1,390 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/regions_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - module Rest - ## - # REST service stub for the RegionsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # A result object deserialized from the server's reply - def get_region request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_region_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_region", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.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_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # A result object deserialized from the server's reply - def create_region request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_region_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_region", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.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_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # A result object deserialized from the server's reply - def update_region request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_region_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_region", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.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_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_region request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_region_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_region", - 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_regions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse] - # A result object deserialized from the server's reply - def list_regions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_regions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_regions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_region_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest] - # 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_region_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/regions", - body: "region", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest] - # 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_region_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{region.name}", - body: "region", - matches: [ - ["region.name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_region_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_regions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_regions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/regions", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb deleted file mode 100644 index dcb5e918d1ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/regions.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/regions_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.RegionsService' - - # Retrieves a region defined in your Merchant Center account. - rpc :GetRegion, ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Region - # Creates a region definition in your Merchant Center account. Executing this - # method requires admin access. - rpc :CreateRegion, ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Region - # Updates a region definition in your Merchant Center account. Executing this - # method requires admin access. - rpc :UpdateRegion, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Region - # Deletes a region definition from your Merchant Center account. Executing - # this method requires admin access. - rpc :DeleteRegion, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, ::Google::Protobuf::Empty - # Lists the regions in your Merchant Center account. - rpc :ListRegions, ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb deleted file mode 100644 index 7a948b075dea..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/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 "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" -require "google/shopping/merchant/accounts/v1beta/user_service/rest" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest" -require "google/shopping/merchant/accounts/v1beta/version" - -module Google - module Shopping - module Merchant - module Accounts - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/accounts/v1beta/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb deleted file mode 100644 index 883a132363a8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/client" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to get method call shipping setting information per Merchant API - # method. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/shipping_settings_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new - # - module ShippingSettingsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "shipping_settings_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb deleted file mode 100644 index c51e8c162861..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb +++ /dev/null @@ -1,574 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/shippingsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ShippingSettingsService - ## - # Client for the ShippingSettingsService service. - # - # Service to get method call shipping setting information per Merchant API - # method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :shipping_settings_service_stub - - ## - # Configure the ShippingSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ShippingSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 ShippingSettingsService 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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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 - @shipping_settings_service_stub.universe_domain - end - - ## - # Create a new ShippingSettingsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ShippingSettingsService 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/shopping/merchant/accounts/v1beta/shippingsettings_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 - - @shipping_settings_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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 - ) - - @shipping_settings_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 - @shipping_settings_service_stub.logger - end - - # Service calls - - ## - # Retrieve shipping setting information. - # - # @overload get_shipping_settings(request, options = nil) - # Pass arguments to `get_shipping_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_shipping_settings(name: nil) - # Pass arguments to `get_shipping_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the shipping setting to retrieve. - # Format: `accounts/{account}/shippingsetting` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new - # - # # Call the get_shipping_settings method. - # result = client.get_shipping_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - # p result - # - def get_shipping_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_shipping_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_shipping_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_shipping_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @shipping_settings_service_stub.call_rpc :get_shipping_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replace the shipping setting of a merchant with the request shipping - # setting. Executing this method requires admin access. - # - # @overload insert_shipping_settings(request, options = nil) - # Pass arguments to `insert_shipping_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_shipping_settings(parent: nil, shipping_setting: nil) - # Pass arguments to `insert_shipping_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account where this product will be inserted. - # Format: accounts/\\{account} - # @param shipping_setting [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings, ::Hash] - # Required. The new version of the account. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new - # - # # Call the insert_shipping_settings method. - # result = client.insert_shipping_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - # p result - # - def insert_shipping_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_shipping_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_shipping_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_shipping_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @shipping_settings_service_stub.call_rpc :insert_shipping_settings, request, 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 ShippingSettingsService API. - # - # This class represents the configuration for ShippingSettingsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_shipping_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_shipping_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_shipping_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ShippingSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_shipping_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_shipping_settings - ## - # RPC-specific configuration for `insert_shipping_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_shipping_settings - - # @private - def initialize parent_rpcs = nil - get_shipping_settings_config = parent_rpcs.get_shipping_settings if parent_rpcs.respond_to? :get_shipping_settings - @get_shipping_settings = ::Gapic::Config::Method.new get_shipping_settings_config - insert_shipping_settings_config = parent_rpcs.insert_shipping_settings if parent_rpcs.respond_to? :insert_shipping_settings - @insert_shipping_settings = ::Gapic::Config::Method.new insert_shipping_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb deleted file mode 100644 index b3b8b543ed1a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_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 Shopping - module Merchant - module Accounts - module V1beta - module ShippingSettingsService - # Credentials for the ShippingSettingsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb deleted file mode 100644 index 29bb68e960e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.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 Shopping - module Merchant - module Accounts - module V1beta - module ShippingSettingsService - # Path helper methods for the ShippingSettingsService API. - module Paths - ## - # Create a fully-qualified ShippingSettings resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/shippingSettings` - # - # @param account [String] - # - # @return [::String] - def shipping_settings_path account: - "accounts/#{account}/shippingSettings" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb deleted file mode 100644 index 0d14c8f4c394..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to get method call shipping setting information per Merchant API - # method. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new - # - module ShippingSettingsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb deleted file mode 100644 index 766d44f4b10d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb +++ /dev/null @@ -1,517 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/shippingsettings_pb" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ShippingSettingsService - module Rest - ## - # REST client for the ShippingSettingsService service. - # - # Service to get method call shipping setting information per Merchant API - # method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :shipping_settings_service_stub - - ## - # Configure the ShippingSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ShippingSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 ShippingSettingsService 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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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 - @shipping_settings_service_stub.universe_domain - end - - ## - # Create a new ShippingSettingsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ShippingSettingsService 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 - - @shipping_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @shipping_settings_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 - @shipping_settings_service_stub.logger - end - - # Service calls - - ## - # Retrieve shipping setting information. - # - # @overload get_shipping_settings(request, options = nil) - # Pass arguments to `get_shipping_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_shipping_settings(name: nil) - # Pass arguments to `get_shipping_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the shipping setting to retrieve. - # Format: `accounts/{account}/shippingsetting` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new - # - # # Call the get_shipping_settings method. - # result = client.get_shipping_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - # p result - # - def get_shipping_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_shipping_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_shipping_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_shipping_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @shipping_settings_service_stub.get_shipping_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replace the shipping setting of a merchant with the request shipping - # setting. Executing this method requires admin access. - # - # @overload insert_shipping_settings(request, options = nil) - # Pass arguments to `insert_shipping_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_shipping_settings(parent: nil, shipping_setting: nil) - # Pass arguments to `insert_shipping_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account where this product will be inserted. - # Format: accounts/\\{account} - # @param shipping_setting [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings, ::Hash] - # Required. The new version of the account. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new - # - # # Call the insert_shipping_settings method. - # result = client.insert_shipping_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - # p result - # - def insert_shipping_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_shipping_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_shipping_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_shipping_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @shipping_settings_service_stub.insert_shipping_settings request, 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 ShippingSettingsService REST API. - # - # This class represents the configuration for ShippingSettingsService 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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_shipping_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_shipping_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_shipping_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ShippingSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_shipping_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_shipping_settings - ## - # RPC-specific configuration for `insert_shipping_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_shipping_settings - - # @private - def initialize parent_rpcs = nil - get_shipping_settings_config = parent_rpcs.get_shipping_settings if parent_rpcs.respond_to? :get_shipping_settings - @get_shipping_settings = ::Gapic::Config::Method.new get_shipping_settings_config - insert_shipping_settings_config = parent_rpcs.insert_shipping_settings if parent_rpcs.respond_to? :insert_shipping_settings - @insert_shipping_settings = ::Gapic::Config::Method.new insert_shipping_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb deleted file mode 100644 index 40faa8e51671..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ShippingSettingsService - module Rest - ## - # REST service stub for the ShippingSettingsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_shipping_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # A result object deserialized from the server's reply - def get_shipping_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_shipping_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_shipping_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the insert_shipping_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # A result object deserialized from the server's reply - def insert_shipping_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_shipping_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "insert_shipping_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_shipping_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_shipping_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/shippingSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_shipping_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_shipping_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/shippingSettings:insert", - body: "shipping_setting", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb deleted file mode 100644 index c3a11939d0fb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/shippingsettings.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/shopping/type/types_pb' - - -descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/shippingsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xcb\x02\n\x10ShippingSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12H\n\x08services\x18\x02 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.ServiceB\x03\xe0\x41\x01\x12L\n\nwarehouses\x18\x03 \x03(\x0b\x32\x33.google.shopping.merchant.accounts.v1beta.WarehouseB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x02:y\xea\x41v\n+merchantapi.googleapis.com/ShippingSettings\x12#accounts/{account}/shippingSettings*\x10shippingSettings2\x10shippingSettings\"\xc7\x10\n\x07Service\x12\x1e\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06\x61\x63tive\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1f\n\x12\x64\x65livery_countries\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tH\x02\x88\x01\x01\x12W\n\rdelivery_time\x18\x05 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.DeliveryTimeB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12M\n\x0brate_groups\x18\x06 \x03(\x0b\x32\x33.google.shopping.merchant.accounts.v1beta.RateGroupB\x03\xe0\x41\x01\x12Z\n\rshipment_type\x18\x07 \x01(\x0e\x32>.google.shopping.merchant.accounts.v1beta.Service.ShipmentTypeH\x04\x88\x01\x01\x12=\n\x13minimum_order_value\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x05\x88\x01\x01\x12h\n\x19minimum_order_value_table\x18\t \x01(\x0b\x32@.google.shopping.merchant.accounts.v1beta.MinimumOrderValueTableH\x06\x88\x01\x01\x12X\n\x0cstore_config\x18\n \x01(\x0b\x32=.google.shopping.merchant.accounts.v1beta.Service.StoreConfigH\x07\x88\x01\x01\x12_\n\x10loyalty_programs\x18\x0b \x03(\x0b\x32@.google.shopping.merchant.accounts.v1beta.Service.LoyaltyProgramB\x03\xe0\x41\x01\x1a\xe2\x06\n\x0bStoreConfig\x12o\n\x12store_service_type\x18\x01 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.Service.StoreConfig.StoreServiceTypeH\x00\x88\x01\x01\x12\x18\n\x0bstore_codes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x66\n\rcutoff_config\x18\x03 \x01(\x0b\x32J.google.shopping.merchant.accounts.v1beta.Service.StoreConfig.CutoffConfigH\x01\x88\x01\x01\x12O\n\x0eservice_radius\x18\x04 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.DistanceH\x02\x88\x01\x01\x1a\xf5\x02\n\x0c\x43utoffConfig\x12z\n\x11local_cutoff_time\x18\x01 \x01(\x0b\x32Z.google.shopping.merchant.accounts.v1beta.Service.StoreConfig.CutoffConfig.LocalCutoffTimeH\x00\x88\x01\x01\x12%\n\x18store_close_offset_hours\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12$\n\x17no_delivery_post_cutoff\x18\x03 \x01(\x08H\x02\x88\x01\x01\x1aM\n\x0fLocalCutoffTime\x12\x11\n\x04hour\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x13\n\x06minute\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minuteB\x14\n\x12_local_cutoff_timeB\x1b\n\x19_store_close_offset_hoursB\x1a\n\x18_no_delivery_post_cutoff\"[\n\x10StoreServiceType\x12\"\n\x1eSTORE_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nALL_STORES\x10\x01\x12\x13\n\x0fSELECTED_STORES\x10\x02\x42\x15\n\x13_store_service_typeB\x10\n\x0e_cutoff_configB\x11\n\x0f_service_radius\x1a\xf7\x01\n\x0eLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12x\n\x15loyalty_program_tiers\x18\x02 \x03(\x0b\x32T.google.shopping.merchant.accounts.v1beta.Service.LoyaltyProgram.LoyaltyProgramTiersB\x03\xe0\x41\x01\x1a=\n\x13LoyaltyProgramTiers\x12\x17\n\ntier_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_tier_labelB\x10\n\x0e_program_label\"e\n\x0cShipmentType\x12\x1d\n\x19SHIPMENT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45LIVERY\x10\x01\x12\x12\n\x0eLOCAL_DELIVERY\x10\x02\x12\x14\n\x10\x43OLLECTION_POINT\x10\x03\x42\x0f\n\r_service_nameB\t\n\x07_activeB\x10\n\x0e_currency_codeB\x10\n\x0e_delivery_timeB\x10\n\x0e_shipment_typeB\x16\n\x14_minimum_order_valueB\x1c\n\x1a_minimum_order_value_tableB\x0f\n\r_store_config\"\xb6\x01\n\x08\x44istance\x12\x12\n\x05value\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12J\n\x04unit\x18\x02 \x01(\x0e\x32\x37.google.shopping.merchant.accounts.v1beta.Distance.UnitH\x01\x88\x01\x01\"7\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\t\n\x05MILES\x10\x01\x12\x0e\n\nKILOMETERS\x10\x02\x42\x08\n\x06_valueB\x07\n\x05_unit\"\xb0\x03\n\tWarehouse\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12U\n\x10shipping_address\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.AddressB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\\\n\x0b\x63utoff_time\x18\x03 \x01(\x0b\x32=.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTimeB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x1f\n\rhandling_days\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02H\x03\x88\x01\x01\x12]\n\x13\x62usiness_day_config\x18\x05 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1beta.BusinessDayConfigH\x04\x88\x01\x01\x42\x07\n\x05_nameB\x13\n\x11_shipping_addressB\x0e\n\x0c_cutoff_timeB\x10\n\x0e_handling_daysB\x16\n\x14_business_day_config\"[\n\x13WarehouseCutoffTime\x12\x16\n\x04hour\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06minute\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minute\"\xf7\x01\n\x07\x41\x64\x64ress\x12\x1b\n\x0estreet_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x04\x63ity\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12%\n\x13\x61\x64ministrative_area\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x1d\n\x0bpostal_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\x1d\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02H\x04\x88\x01\x01\x42\x11\n\x0f_street_addressB\x07\n\x05_cityB\x16\n\x14_administrative_areaB\x0e\n\x0c_postal_codeB\x0e\n\x0c_region_code\"\xb5\x06\n\x0c\x44\x65liveryTime\x12\x1d\n\x10min_transit_days\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_transit_days\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12N\n\x0b\x63utoff_time\x18\x03 \x01(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.CutoffTimeH\x02\x88\x01\x01\x12\x1e\n\x11min_handling_days\x18\x04 \x01(\x05H\x03\x88\x01\x01\x12\x1e\n\x11max_handling_days\x18\x05 \x01(\x05H\x04\x88\x01\x01\x12W\n\x12transit_time_table\x18\x06 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.TransitTableH\x05\x88\x01\x01\x12\x66\n\x1chandling_business_day_config\x18\x07 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1beta.BusinessDayConfigH\x06\x88\x01\x01\x12\x65\n\x1btransit_business_day_config\x18\x08 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1beta.BusinessDayConfigH\x07\x88\x01\x01\x12q\n\x1ewarehouse_based_delivery_times\x18\t \x03(\x0b\x32\x44.google.shopping.merchant.accounts.v1beta.WarehouseBasedDeliveryTimeB\x03\xe0\x41\x01\x42\x13\n\x11_min_transit_daysB\x13\n\x11_max_transit_daysB\x0e\n\x0c_cutoff_timeB\x14\n\x12_min_handling_daysB\x14\n\x12_max_handling_daysB\x15\n\x13_transit_time_tableB\x1f\n\x1d_handling_business_day_configB\x1e\n\x1c_transit_business_day_config\"}\n\nCutoffTime\x12\x16\n\x04hour\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06minute\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1b\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minuteB\x0c\n\n_time_zone\"\xf4\x01\n\x11\x42usinessDayConfig\x12_\n\rbusiness_days\x18\x01 \x03(\x0e\x32\x43.google.shopping.merchant.accounts.v1beta.BusinessDayConfig.WeekdayB\x03\xe0\x41\x02\"~\n\x07Weekday\x12\x17\n\x13WEEKDAY_UNSPECIFIED\x10\x00\x12\n\n\x06MONDAY\x10\x01\x12\x0b\n\x07TUESDAY\x10\x02\x12\r\n\tWEDNESDAY\x10\x03\x12\x0c\n\x08THURSDAY\x10\x04\x12\n\n\x06\x46RIDAY\x10\x05\x12\x0c\n\x08SATURDAY\x10\x06\x12\n\n\x06SUNDAY\x10\x07\"\xa5\x01\n\x1aWarehouseBasedDeliveryTime\x12\x19\n\x07\x63\x61rrier\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12!\n\x0f\x63\x61rrier_service\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1b\n\twarehouse\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\n\n\x08_carrierB\x12\n\x10_carrier_serviceB\x0c\n\n_warehouse\"\xa7\x03\n\tRateGroup\x12\'\n\x1a\x61pplicable_shipping_labels\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12J\n\x0csingle_value\x18\x02 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1beta.ValueH\x00\x88\x01\x01\x12H\n\nmain_table\x18\x03 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1beta.TableH\x01\x88\x01\x01\x12G\n\tsubtables\x18\x04 \x03(\x0b\x32/.google.shopping.merchant.accounts.v1beta.TableB\x03\xe0\x41\x01\x12Q\n\rcarrier_rates\x18\x05 \x03(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.CarrierRateB\x03\xe0\x41\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x0f\n\r_single_valueB\r\n\x0b_main_tableB\x07\n\x05_name\"\xaa\x02\n\x05Table\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12P\n\x0brow_headers\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.HeadersB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12N\n\x0e\x63olumn_headers\x18\x03 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.HeadersH\x02\x88\x01\x01\x12@\n\x04rows\x18\x04 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1beta.RowB\x03\xe0\x41\x02\x42\x07\n\x05_nameB\x0e\n\x0c_row_headersB\x11\n\x0f_column_headers\"\xac\x03\n\x0cTransitTable\x12$\n\x17postal_code_group_names\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12 \n\x13transit_time_labels\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12X\n\x04rows\x18\x03 \x03(\x0b\x32\x45.google.shopping.merchant.accounts.v1beta.TransitTable.TransitTimeRowB\x03\xe0\x41\x02\x1a\xf9\x01\n\x0eTransitTimeRow\x12k\n\x06values\x18\x01 \x03(\x0b\x32V.google.shopping.merchant.accounts.v1beta.TransitTable.TransitTimeRow.TransitTimeValueB\x03\xe0\x41\x02\x1az\n\x10TransitTimeValue\x12\x1d\n\x10min_transit_days\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_transit_days\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x13\n\x11_min_transit_daysB\x13\n\x11_max_transit_days\"\x81\x02\n\x16MinimumOrderValueTable\x12{\n\x18store_code_set_with_movs\x18\x01 \x03(\x0b\x32T.google.shopping.merchant.accounts.v1beta.MinimumOrderValueTable.StoreCodeSetWithMovB\x03\xe0\x41\x02\x1aj\n\x13StoreCodeSetWithMov\x12\x18\n\x0bstore_codes\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12/\n\x05value\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x88\x01\x01\x42\x08\n\x06_value\"\x84\x02\n\x07Headers\x12\x30\n\x06prices\x18\x01 \x03(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02\x12\x32\n\x07weights\x18\x02 \x03(\x0b\x32\x1c.google.shopping.type.WeightB\x03\xe0\x41\x02\x12\x1c\n\x0fnumber_of_items\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12$\n\x17postal_code_group_names\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12O\n\tlocations\x18\x05 \x03(\x0b\x32\x37.google.shopping.merchant.accounts.v1beta.LocationIdSetB\x03\xe0\x41\x02\"*\n\rLocationIdSet\x12\x19\n\x0clocation_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02\"J\n\x03Row\x12\x43\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32/.google.shopping.merchant.accounts.v1beta.ValueB\x03\xe0\x41\x02\"\xf8\x01\n\x05Value\x12\x18\n\x0bno_shipping\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x33\n\tflat_rate\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x01\x88\x01\x01\x12\x1d\n\x10price_percentage\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0c\x63\x61rrier_rate\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08subtable\x18\x05 \x01(\tH\x04\x88\x01\x01\x42\x0e\n\x0c_no_shippingB\x0c\n\n_flat_rateB\x13\n\x11_price_percentageB\x0f\n\r_carrier_rateB\x0b\n\t_subtable\"\xe0\x02\n\x0b\x43\x61rrierRate\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x19\n\x07\x63\x61rrier\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12!\n\x0f\x63\x61rrier_service\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12$\n\x12origin_postal_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\'\n\x15percentage_adjustment\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12>\n\x0f\x66lat_adjustment\x18\x06 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x05\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_carrierB\x12\n\x10_carrier_serviceB\x15\n\x13_origin_postal_codeB\x18\n\x16_percentage_adjustmentB\x12\n\x10_flat_adjustment\"_\n\x1aGetShippingSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ShippingSettings\"\x8f\x01\n\x1dInsertShippingSettingsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x10shipping_setting\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.ShippingSettingsB\x03\xe0\x41\x02\x32\xb8\x04\n\x17ShippingSettingsService\x12\xdb\x01\n\x13GetShippingSettings\x12\x44.google.shopping.merchant.accounts.v1beta.GetShippingSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.ShippingSettings\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/accounts/v1beta/{name=accounts/*/shippingSettings}\x12\xf5\x01\n\x16InsertShippingSettings\x12G.google.shopping.merchant.accounts.v1beta.InsertShippingSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.ShippingSettings\"V\x82\xd3\xe4\x93\x02P\" e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the state of the agreement for the application terms of service. - # - # @overload retrieve_for_application_terms_of_service_agreement_state(request, options = nil) - # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload retrieve_for_application_terms_of_service_agreement_state(parent: nil) - # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account for which to get a TermsOfServiceAgreementState - # Format: `accounts/{account}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new - # - # # Call the retrieve_for_application_terms_of_service_agreement_state method. - # result = client.retrieve_for_application_terms_of_service_agreement_state request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. - # p result - # - def retrieve_for_application_terms_of_service_agreement_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.timeout, - metadata: metadata, - retry_policy: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_agreement_state_service_stub.call_rpc :retrieve_for_application_terms_of_service_agreement_state, request, 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 TermsOfServiceAgreementStateService API. - # - # This class represents the configuration for TermsOfServiceAgreementStateService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_terms_of_service_agreement_state to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 TermsOfServiceAgreementStateService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_terms_of_service_agreement_state` - # @return [::Gapic::Config::Method] - # - attr_reader :get_terms_of_service_agreement_state - ## - # RPC-specific configuration for `retrieve_for_application_terms_of_service_agreement_state` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_for_application_terms_of_service_agreement_state - - # @private - def initialize parent_rpcs = nil - get_terms_of_service_agreement_state_config = parent_rpcs.get_terms_of_service_agreement_state if parent_rpcs.respond_to? :get_terms_of_service_agreement_state - @get_terms_of_service_agreement_state = ::Gapic::Config::Method.new get_terms_of_service_agreement_state_config - retrieve_for_application_terms_of_service_agreement_state_config = parent_rpcs.retrieve_for_application_terms_of_service_agreement_state if parent_rpcs.respond_to? :retrieve_for_application_terms_of_service_agreement_state - @retrieve_for_application_terms_of_service_agreement_state = ::Gapic::Config::Method.new retrieve_for_application_terms_of_service_agreement_state_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb deleted file mode 100644 index 08f405184324..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_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 Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceAgreementStateService - # Credentials for the TermsOfServiceAgreementStateService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb deleted file mode 100644 index 8f1f50a9834f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_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 Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceAgreementStateService - # Path helper methods for the TermsOfServiceAgreementStateService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified TermsOfServiceAgreementState resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/termsOfServiceAgreementStates/{identifier}` - # - # @param account [String] - # @param identifier [String] - # - # @return [::String] - def terms_of_service_agreement_state_path account:, identifier: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/termsOfServiceAgreementStates/#{identifier}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb deleted file mode 100644 index 33c9185e4e0a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support `TermsOfServiceAgreementState` API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new - # - module TermsOfServiceAgreementStateService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb deleted file mode 100644 index 270b37221168..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb +++ /dev/null @@ -1,519 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceAgreementStateService - module Rest - ## - # REST client for the TermsOfServiceAgreementStateService service. - # - # Service to support `TermsOfServiceAgreementState` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :terms_of_service_agreement_state_service_stub - - ## - # Configure the TermsOfServiceAgreementStateService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TermsOfServiceAgreementStateService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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 - @terms_of_service_agreement_state_service_stub.universe_domain - end - - ## - # Create a new TermsOfServiceAgreementStateService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TermsOfServiceAgreementStateService 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 - - @terms_of_service_agreement_state_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @terms_of_service_agreement_state_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 - @terms_of_service_agreement_state_service_stub.logger - end - - # Service calls - - ## - # Returns the state of a terms of service agreement. - # - # @overload get_terms_of_service_agreement_state(request, options = nil) - # Pass arguments to `get_terms_of_service_agreement_state` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_terms_of_service_agreement_state(name: nil) - # Pass arguments to `get_terms_of_service_agreement_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` - # The identifier format is: `{TermsOfServiceKind}-{country}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new - # - # # Call the get_terms_of_service_agreement_state method. - # result = client.get_terms_of_service_agreement_state request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. - # p result - # - def get_terms_of_service_agreement_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_terms_of_service_agreement_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_terms_of_service_agreement_state.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_terms_of_service_agreement_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_agreement_state_service_stub.get_terms_of_service_agreement_state request, 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 the state of the agreement for the application terms of service. - # - # @overload retrieve_for_application_terms_of_service_agreement_state(request, options = nil) - # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload retrieve_for_application_terms_of_service_agreement_state(parent: nil) - # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account for which to get a TermsOfServiceAgreementState - # Format: `accounts/{account}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new - # - # # Call the retrieve_for_application_terms_of_service_agreement_state method. - # result = client.retrieve_for_application_terms_of_service_agreement_state request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. - # p result - # - def retrieve_for_application_terms_of_service_agreement_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_agreement_state_service_stub.retrieve_for_application_terms_of_service_agreement_state request, 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 TermsOfServiceAgreementStateService REST API. - # - # This class represents the configuration for TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_terms_of_service_agreement_state to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 TermsOfServiceAgreementStateService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_terms_of_service_agreement_state` - # @return [::Gapic::Config::Method] - # - attr_reader :get_terms_of_service_agreement_state - ## - # RPC-specific configuration for `retrieve_for_application_terms_of_service_agreement_state` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_for_application_terms_of_service_agreement_state - - # @private - def initialize parent_rpcs = nil - get_terms_of_service_agreement_state_config = parent_rpcs.get_terms_of_service_agreement_state if parent_rpcs.respond_to? :get_terms_of_service_agreement_state - @get_terms_of_service_agreement_state = ::Gapic::Config::Method.new get_terms_of_service_agreement_state_config - retrieve_for_application_terms_of_service_agreement_state_config = parent_rpcs.retrieve_for_application_terms_of_service_agreement_state if parent_rpcs.respond_to? :retrieve_for_application_terms_of_service_agreement_state - @retrieve_for_application_terms_of_service_agreement_state = ::Gapic::Config::Method.new retrieve_for_application_terms_of_service_agreement_state_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb deleted file mode 100644 index c0a226adbfbc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceAgreementStateService - module Rest - ## - # REST service stub for the TermsOfServiceAgreementStateService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_terms_of_service_agreement_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # A result object deserialized from the server's reply - def get_terms_of_service_agreement_state request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_terms_of_service_agreement_state_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_terms_of_service_agreement_state", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the retrieve_for_application_terms_of_service_agreement_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # A result object deserialized from the server's reply - def retrieve_for_application_terms_of_service_agreement_state request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_for_application_terms_of_service_agreement_state_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "retrieve_for_application_terms_of_service_agreement_state", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_terms_of_service_agreement_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_terms_of_service_agreement_state_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/termsOfServiceAgreementStates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the retrieve_for_application_terms_of_service_agreement_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_retrieve_for_application_terms_of_service_agreement_state_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/termsOfServiceAgreementStates:retrieveForApplication", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb deleted file mode 100644 index 7147a2323140..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/client" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support `TermsOfService` API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/terms_of_service_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - module TermsOfServiceService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "terms_of_service_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb deleted file mode 100644 index 14e060c6cf12..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb +++ /dev/null @@ -1,670 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/termsofservice_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - ## - # Client for the TermsOfServiceService service. - # - # Service to support `TermsOfService` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :terms_of_service_service_stub - - ## - # Configure the TermsOfServiceService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TermsOfServiceService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TermsOfServiceService 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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 - @terms_of_service_service_stub.universe_domain - end - - ## - # Create a new TermsOfServiceService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TermsOfServiceService 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/shopping/merchant/accounts/v1beta/termsofservice_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 - - @terms_of_service_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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 - ) - - @terms_of_service_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 - @terms_of_service_service_stub.logger - end - - # Service calls - - ## - # Retrieves the `TermsOfService` associated with the provided version. - # - # @overload get_terms_of_service(request, options = nil) - # Pass arguments to `get_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_terms_of_service(name: nil) - # Pass arguments to `get_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new - # - # # Call the get_terms_of_service method. - # result = client.get_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - # p result - # - def get_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_terms_of_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.call_rpc :get_terms_of_service, request, 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 the latest version of the `TermsOfService` for a given `kind` and - # `region_code`. - # - # @overload retrieve_latest_terms_of_service(request, options = nil) - # Pass arguments to `retrieve_latest_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload retrieve_latest_terms_of_service(region_code: nil, kind: nil) - # Pass arguments to `retrieve_latest_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param region_code [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # @param kind [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] - # Required. The Kind this terms of service version applies to. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new - # - # # Call the retrieve_latest_terms_of_service method. - # result = client.retrieve_latest_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - # p result - # - def retrieve_latest_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.retrieve_latest_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::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.retrieve_latest_terms_of_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.retrieve_latest_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.call_rpc :retrieve_latest_terms_of_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Accepts a `TermsOfService`. Executing this method requires admin access. - # - # @overload accept_terms_of_service(request, options = nil) - # Pass arguments to `accept_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload accept_terms_of_service(name: nil, account: nil, region_code: nil) - # Pass arguments to `accept_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @param account [::String] - # Required. The account for which to accept the ToS. - # @param region_code [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # - # @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/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new - # - # # Call the accept_terms_of_service method. - # result = client.accept_terms_of_service request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def accept_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.accept_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.accept_terms_of_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.accept_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.call_rpc :accept_terms_of_service, request, 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 TermsOfServiceService API. - # - # This class represents the configuration for TermsOfServiceService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_terms_of_service to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 TermsOfServiceService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_terms_of_service - ## - # RPC-specific configuration for `retrieve_latest_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_latest_terms_of_service - ## - # RPC-specific configuration for `accept_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :accept_terms_of_service - - # @private - def initialize parent_rpcs = nil - get_terms_of_service_config = parent_rpcs.get_terms_of_service if parent_rpcs.respond_to? :get_terms_of_service - @get_terms_of_service = ::Gapic::Config::Method.new get_terms_of_service_config - retrieve_latest_terms_of_service_config = parent_rpcs.retrieve_latest_terms_of_service if parent_rpcs.respond_to? :retrieve_latest_terms_of_service - @retrieve_latest_terms_of_service = ::Gapic::Config::Method.new retrieve_latest_terms_of_service_config - accept_terms_of_service_config = parent_rpcs.accept_terms_of_service if parent_rpcs.respond_to? :accept_terms_of_service - @accept_terms_of_service = ::Gapic::Config::Method.new accept_terms_of_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb deleted file mode 100644 index 46f3c20085d5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_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 Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - # Credentials for the TermsOfServiceService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb deleted file mode 100644 index cbc86885e96c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - # Path helper methods for the TermsOfServiceService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified TermsOfService resource string. - # - # The resource will be in the following format: - # - # `termsOfService/{version}` - # - # @param version [String] - # - # @return [::String] - def terms_of_service_path version: - "termsOfService/#{version}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb deleted file mode 100644 index 45348f1253e5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support `TermsOfService` API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - module TermsOfServiceService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb deleted file mode 100644 index 33fa3e6a098f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb +++ /dev/null @@ -1,614 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/termsofservice_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - module Rest - ## - # REST client for the TermsOfServiceService service. - # - # Service to support `TermsOfService` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :terms_of_service_service_stub - - ## - # Configure the TermsOfServiceService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TermsOfServiceService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TermsOfServiceService 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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 - @terms_of_service_service_stub.universe_domain - end - - ## - # Create a new TermsOfServiceService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TermsOfServiceService 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 - - @terms_of_service_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @terms_of_service_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 - @terms_of_service_service_stub.logger - end - - # Service calls - - ## - # Retrieves the `TermsOfService` associated with the provided version. - # - # @overload get_terms_of_service(request, options = nil) - # Pass arguments to `get_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_terms_of_service(name: nil) - # Pass arguments to `get_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new - # - # # Call the get_terms_of_service method. - # result = client.get_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - # p result - # - def get_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_terms_of_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.get_terms_of_service request, 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 the latest version of the `TermsOfService` for a given `kind` and - # `region_code`. - # - # @overload retrieve_latest_terms_of_service(request, options = nil) - # Pass arguments to `retrieve_latest_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload retrieve_latest_terms_of_service(region_code: nil, kind: nil) - # Pass arguments to `retrieve_latest_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param region_code [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # @param kind [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] - # Required. The Kind this terms of service version applies to. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new - # - # # Call the retrieve_latest_terms_of_service method. - # result = client.retrieve_latest_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - # p result - # - def retrieve_latest_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.retrieve_latest_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.retrieve_latest_terms_of_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.retrieve_latest_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.retrieve_latest_terms_of_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Accepts a `TermsOfService`. Executing this method requires admin access. - # - # @overload accept_terms_of_service(request, options = nil) - # Pass arguments to `accept_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload accept_terms_of_service(name: nil, account: nil, region_code: nil) - # Pass arguments to `accept_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @param account [::String] - # Required. The account for which to accept the ToS. - # @param region_code [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # @yield [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/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new - # - # # Call the accept_terms_of_service method. - # result = client.accept_terms_of_service request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def accept_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.accept_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.accept_terms_of_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.accept_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.accept_terms_of_service request, 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 TermsOfServiceService REST API. - # - # This class represents the configuration for TermsOfServiceService 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_terms_of_service to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 TermsOfServiceService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_terms_of_service - ## - # RPC-specific configuration for `retrieve_latest_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_latest_terms_of_service - ## - # RPC-specific configuration for `accept_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :accept_terms_of_service - - # @private - def initialize parent_rpcs = nil - get_terms_of_service_config = parent_rpcs.get_terms_of_service if parent_rpcs.respond_to? :get_terms_of_service - @get_terms_of_service = ::Gapic::Config::Method.new get_terms_of_service_config - retrieve_latest_terms_of_service_config = parent_rpcs.retrieve_latest_terms_of_service if parent_rpcs.respond_to? :retrieve_latest_terms_of_service - @retrieve_latest_terms_of_service = ::Gapic::Config::Method.new retrieve_latest_terms_of_service_config - accept_terms_of_service_config = parent_rpcs.accept_terms_of_service if parent_rpcs.respond_to? :accept_terms_of_service - @accept_terms_of_service = ::Gapic::Config::Method.new accept_terms_of_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb deleted file mode 100644 index e44a62b60c86..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb +++ /dev/null @@ -1,264 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - module Rest - ## - # REST service stub for the TermsOfServiceService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # A result object deserialized from the server's reply - def get_terms_of_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_terms_of_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_terms_of_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the retrieve_latest_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # A result object deserialized from the server's reply - def retrieve_latest_terms_of_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_latest_terms_of_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "retrieve_latest_terms_of_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the accept_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 accept_terms_of_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_accept_terms_of_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "accept_terms_of_service", - 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 get_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_terms_of_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^termsOfService/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the retrieve_latest_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_retrieve_latest_terms_of_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/termsOfService:retrieveLatest", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the accept_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_accept_terms_of_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}:accept", - matches: [ - ["name", %r{^termsOfService/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb deleted file mode 100644 index e47173662cd5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/termsofservice.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/shopping/merchant/accounts/v1beta/termsofservicekind_pb' - - -descriptor_data = "\n=google/shopping/merchant/accounts/v1beta/termsofservice.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x41google/shopping/merchant/accounts/v1beta/termsofservicekind.proto\"\xb2\x02\n\x0eTermsOfService\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x08\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12J\n\x04kind\x18\x03 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1beta.TermsOfServiceKind\x12\x15\n\x08\x66ile_uri\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08\x65xternal\x18\x05 \x01(\x08:H\xea\x41\x45\n)merchantapi.googleapis.com/TermsOfService\x12\x18termsOfService/{version}B\x0b\n\t_file_uri\"[\n\x18GetTermsOfServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\"\x90\x01\n#RetrieveLatestTermsOfServiceRequest\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12O\n\x04kind\x18\x02 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1beta.TermsOfServiceKindB\x03\xe0\x41\x02\"\xb5\x01\n\x1b\x41\x63\x63\x65ptTermsOfServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12;\n\x07\x61\x63\x63ount\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x18\n\x0bregion_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x32\xc7\x05\n\x15TermsOfServiceService\x12\xca\x01\n\x11GetTermsOfService\x12\x42.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceRequest\x1a\x38.google.shopping.merchant.accounts.v1beta.TermsOfService\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/accounts/v1beta/{name=termsOfService/*}\x12\xdf\x01\n\x1cRetrieveLatestTermsOfService\x12M.google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest\x1a\x38.google.shopping.merchant.accounts.v1beta.TermsOfService\"6\x82\xd3\xe4\x93\x02\x30\x12./accounts/v1beta/termsOfService:retrieveLatest\x12\xb5\x01\n\x14\x41\x63\x63\x65ptTermsOfService\x12\x45.google.shopping.merchant.accounts.v1beta.AcceptTermsOfServiceRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{name=termsOfService/*}:accept\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x95\x01\n,com.google.shopping.merchant.accounts.v1betaB\x13TermsOfServiceProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - TermsOfService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.TermsOfService").msgclass - GetTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetTermsOfServiceRequest").msgclass - RetrieveLatestTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest").msgclass - AcceptTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AcceptTermsOfServiceRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb deleted file mode 100644 index f300591e6416..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/termsofservice.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/termsofservice_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - # Service to support `TermsOfService` API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.TermsOfServiceService' - - # Retrieves the `TermsOfService` associated with the provided version. - rpc :GetTermsOfService, ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService - # Retrieves the latest version of the `TermsOfService` for a given `kind` and - # `region_code`. - rpc :RetrieveLatestTermsOfService, ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService - # Accepts a `TermsOfService`. Executing this method requires admin access. - rpc :AcceptTermsOfService, ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb deleted file mode 100644 index 1be87bcf62c8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.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/shopping/merchant/accounts/v1beta/termsofservicekind_pb' -require 'google/type/date_pb' - - -descriptor_data = "\nKgoogle/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x41google/shopping/merchant/accounts/v1beta/termsofservicekind.proto\x1a\x16google/type/date.proto\"\x8f\x04\n\x1cTermsOfServiceAgreementState\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12[\n\x15terms_of_service_kind\x18\x03 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1beta.TermsOfServiceKind\x12I\n\x08\x61\x63\x63\x65pted\x18\x04 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.AcceptedH\x00\x88\x01\x01\x12I\n\x08required\x18\x05 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.RequiredH\x01\x88\x01\x01:\xb9\x01\xea\x41\xb5\x01\n7merchantapi.googleapis.com/TermsOfServiceAgreementState\x12=accounts/{account}/termsOfServiceAgreementStates/{identifier}*\x1dtermsOfServiceAgreementStates2\x1ctermsOfServiceAgreementStateB\x0b\n\t_acceptedB\x0b\n\t_required\"\xcf\x01\n\x08\x41\x63\x63\x65pted\x12H\n\x10terms_of_service\x18\x01 \x01(\tB.\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12<\n\x0b\x61\x63\x63\x65pted_by\x18\x02 \x01(\tB\'\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12+\n\x0bvalid_until\x18\x03 \x01(\x0b\x32\x11.google.type.DateH\x00\x88\x01\x01\x42\x0e\n\x0c_valid_until\"j\n\x08Required\x12H\n\x10terms_of_service\x18\x01 \x01(\tB.\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x14\n\x0ctos_file_uri\x18\x02 \x01(\t\"w\n&GetTermsOfServiceAgreementStateRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7merchantapi.googleapis.com/TermsOfServiceAgreementState\"\x8c\x01\n9RetrieveForApplicationTermsOfServiceAgreementStateRequest\x12O\n\x06parent\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\x12\x37merchantapi.googleapis.com/TermsOfServiceAgreementState2\xcf\x05\n#TermsOfServiceAgreementStateService\x12\x8e\x02\n\x1fGetTermsOfServiceAgreementState\x12P.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceAgreementStateRequest\x1a\x46.google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementState\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/accounts/v1beta/{name=accounts/*/termsOfServiceAgreementStates/*}\x12\xcd\x02\n2RetrieveForApplicationTermsOfServiceAgreementState\x12\x63.google.shopping.merchant.accounts.v1beta.RetrieveForApplicationTermsOfServiceAgreementStateRequest\x1a\x46.google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementState\"j\xda\x41\x06parent\x82\xd3\xe4\x93\x02[\x12Y/accounts/v1beta/{parent=accounts/*}/termsOfServiceAgreementStates:retrieveForApplication\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xa3\x01\n,com.google.shopping.merchant.accounts.v1betaB!TermsOfServiceAgreementStateProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - TermsOfServiceAgreementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementState").msgclass - Accepted = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Accepted").msgclass - Required = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Required").msgclass - GetTermsOfServiceAgreementStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetTermsOfServiceAgreementStateRequest").msgclass - RetrieveForApplicationTermsOfServiceAgreementStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.RetrieveForApplicationTermsOfServiceAgreementStateRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb deleted file mode 100644 index edbccf383c55..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceAgreementStateService - # Service to support `TermsOfServiceAgreementState` API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService' - - # Returns the state of a terms of service agreement. - rpc :GetTermsOfServiceAgreementState, ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState - # Retrieves the state of the agreement for the application terms of service. - rpc :RetrieveForApplicationTermsOfServiceAgreementState, ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb deleted file mode 100644 index 35ab44903852..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/termsofservicekind.proto - -require 'google/protobuf' - - -descriptor_data = "\nAgoogle/shopping/merchant/accounts/v1beta/termsofservicekind.proto\x12(google.shopping.merchant.accounts.v1beta*P\n\x12TermsOfServiceKind\x12%\n!TERMS_OF_SERVICE_KIND_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_CENTER\x10\x01\x42\x99\x01\n,com.google.shopping.merchant.accounts.v1betaB\x17TermsOfServiceKindProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - TermsOfServiceKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.TermsOfServiceKind").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb deleted file mode 100644 index a4ae3c613309..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/user.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/accounts/v1beta/accessright_pb' - - -descriptor_data = "\n3google/shopping/merchant/accounts/v1beta/user.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a:google/shopping/merchant/accounts/v1beta/accessright.proto\"\xc6\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x34.google.shopping.merchant.accounts.v1beta.User.StateB\x03\xe0\x41\x03\x12Q\n\raccess_rights\x18\x04 \x03(\x0e\x32\x35.google.shopping.merchant.accounts.v1beta.AccessRightB\x03\xe0\x41\x01\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08VERIFIED\x10\x02:S\xea\x41P\n\x1fmerchantapi.googleapis.com/User\x12 accounts/{account}/users/{email}*\x05users2\x04user\"G\n\x0eGetUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\xa8\x01\n\x11\x43reateUserRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x14\n\x07user_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x04user\x18\x03 \x01(\x0b\x32..google.shopping.merchant.accounts.v1beta.UserB\x03\xe0\x41\x02\"J\n\x11\x44\x65leteUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\x8c\x01\n\x11UpdateUserRequest\x12\x41\n\x04user\x18\x01 \x01(\x0b\x32..google.shopping.merchant.accounts.v1beta.UserB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x7f\n\x10ListUsersRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"k\n\x11ListUsersResponse\x12=\n\x05users\x18\x01 \x03(\x0b\x32..google.shopping.merchant.accounts.v1beta.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xfc\x07\n\x0bUserService\x12\xae\x01\n\x07GetUser\x12\x38.google.shopping.merchant.accounts.v1beta.GetUserRequest\x1a..google.shopping.merchant.accounts.v1beta.User\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/accounts/v1beta/{name=accounts/*/users/*}\x12\xc1\x01\n\nCreateUser\x12;.google.shopping.merchant.accounts.v1beta.CreateUserRequest\x1a..google.shopping.merchant.accounts.v1beta.User\"F\xda\x41\x0bparent,user\x82\xd3\xe4\x93\x02\x32\"*/accounts/v1beta/{parent=accounts/*}/users:\x04user\x12\x9c\x01\n\nDeleteUser\x12;.google.shopping.merchant.accounts.v1beta.DeleteUserRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/accounts/v1beta/{name=accounts/*/users/*}\x12\xcb\x01\n\nUpdateUser\x12;.google.shopping.merchant.accounts.v1beta.UpdateUserRequest\x1a..google.shopping.merchant.accounts.v1beta.User\"P\xda\x41\x10user,update_mask\x82\xd3\xe4\x93\x02\x37\x32//accounts/v1beta/{user.name=accounts/*/users/*}:\x04user\x12\xc1\x01\n\tListUsers\x12:.google.shopping.merchant.accounts.v1beta.ListUsersRequest\x1a;.google.shopping.merchant.accounts.v1beta.ListUsersResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/accounts/v1beta/{parent=accounts/*}/users\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8b\x01\n,com.google.shopping.merchant.accounts.v1betaB\tUserProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - User = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.User").msgclass - User::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.User.State").enummodule - GetUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetUserRequest").msgclass - CreateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateUserRequest").msgclass - DeleteUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteUserRequest").msgclass - UpdateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateUserRequest").msgclass - ListUsersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListUsersRequest").msgclass - ListUsersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListUsersResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb deleted file mode 100644 index 64065f29308c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/user_service/credentials" -require "google/shopping/merchant/accounts/v1beta/user_service/paths" -require "google/shopping/merchant/accounts/v1beta/user_service/client" -require "google/shopping/merchant/accounts/v1beta/user_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support user API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/user_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/user_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - module UserService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "user_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/user_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb deleted file mode 100644 index d409e306db68..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb +++ /dev/null @@ -1,889 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/user_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module UserService - ## - # Client for the UserService service. - # - # Service to support user API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :user_service_stub - - ## - # Configure the UserService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all UserService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the UserService 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::Shopping::Merchant::Accounts::V1beta::UserService::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 - @user_service_stub.universe_domain - end - - ## - # Create a new UserService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the UserService 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/shopping/merchant/accounts/v1beta/user_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 - - @user_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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 - ) - - @user_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 - @user_service_stub.logger - end - - # Service calls - - ## - # Retrieves a Merchant Center account user. - # - # @overload get_user(request, options = nil) - # Pass arguments to `get_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_user(name: nil) - # Pass arguments to `get_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the user to retrieve. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to retrieve the user corresponding to the caller by - # using `me` rather than an email address as in - # `accounts/{account}/users/me`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new - # - # # Call the get_user method. - # result = client.get_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def get_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :get_user, request, 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 Merchant Center account user. Executing this method requires - # admin access. - # - # @overload create_user(request, options = nil) - # Pass arguments to `create_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_user(parent: nil, user_id: nil, user: nil) - # Pass arguments to `create_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the account for which a user will be - # created. Format: `accounts/{account}` - # @param user_id [::String] - # Required. The email address of the user (for example, - # `john.doe@gmail.com`). - # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] - # Required. The user to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new - # - # # Call the create_user method. - # result = client.create_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def create_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :create_user, request, 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 Merchant Center account user. Executing this method requires - # admin access. - # - # @overload delete_user(request, options = nil) - # Pass arguments to `delete_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_user(name: nil) - # Pass arguments to `delete_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the user to delete. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to delete the user corresponding to the caller by using - # `me` rather than an email address as in `accounts/{account}/users/me`. - # - # @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/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new - # - # # Call the delete_user method. - # result = client.delete_user request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :delete_user, request, 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 Merchant Center account user. Executing this method requires - # admin access. - # - # @overload update_user(request, options = nil) - # Pass arguments to `update_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_user(user: nil, update_mask: nil) - # Pass arguments to `update_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] - # Required. The new version of the user. - # - # Use `me` to refer to your own email address, for example - # `accounts/{account}/users/me`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new - # - # # Call the update_user method. - # result = client.update_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def update_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest - - # Converts hash and nil to 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_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.user&.name - header_params["user.name"] = request.user.name - end - - request_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_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :update_user, request, 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 users of a Merchant Center account. - # - # @overload list_users(request, options = nil) - # Pass arguments to `list_users` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_users(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_users` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of users. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of users to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @param page_token [::String] - # Optional. A page token, received from a previous `ListUsers` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListUsers` must match - # the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new - # - # # Call the list_users method. - # result = client.list_users request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::User. - # p item - # end - # - def list_users request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_users.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_users.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_users.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :list_users, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @user_service_stub, :list_users, 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 UserService API. - # - # This class represents the configuration for UserService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_user to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_user.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_user.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Accounts::V1beta::UserService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 UserService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_user` - # @return [::Gapic::Config::Method] - # - attr_reader :get_user - ## - # RPC-specific configuration for `create_user` - # @return [::Gapic::Config::Method] - # - attr_reader :create_user - ## - # RPC-specific configuration for `delete_user` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_user - ## - # RPC-specific configuration for `update_user` - # @return [::Gapic::Config::Method] - # - attr_reader :update_user - ## - # RPC-specific configuration for `list_users` - # @return [::Gapic::Config::Method] - # - attr_reader :list_users - - # @private - def initialize parent_rpcs = nil - get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user - @get_user = ::Gapic::Config::Method.new get_user_config - create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user - @create_user = ::Gapic::Config::Method.new create_user_config - delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user - @delete_user = ::Gapic::Config::Method.new delete_user_config - update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user - @update_user = ::Gapic::Config::Method.new update_user_config - list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users - @list_users = ::Gapic::Config::Method.new list_users_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb deleted file mode 100644 index b280d41b5a54..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_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 Shopping - module Merchant - module Accounts - module V1beta - module UserService - # Credentials for the UserService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb deleted file mode 100644 index e0b82b1f8295..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_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 Shopping - module Merchant - module Accounts - module V1beta - module UserService - # Path helper methods for the UserService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified User resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/users/{email}` - # - # @param account [String] - # @param email [String] - # - # @return [::String] - def user_path account:, email: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/users/#{email}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb deleted file mode 100644 index 485719a9a0b7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/user_service/credentials" -require "google/shopping/merchant/accounts/v1beta/user_service/paths" -require "google/shopping/merchant/accounts/v1beta/user_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support user API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/user_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - module UserService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/user_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb deleted file mode 100644 index 1985fa37df55..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb +++ /dev/null @@ -1,811 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/accounts/v1beta/user_pb" -require "google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module UserService - module Rest - ## - # REST client for the UserService service. - # - # Service to support user API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :user_service_stub - - ## - # Configure the UserService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all UserService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the UserService 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::Shopping::Merchant::Accounts::V1beta::UserService::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 - @user_service_stub.universe_domain - end - - ## - # Create a new UserService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the UserService 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 - - @user_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @user_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 - @user_service_stub.logger - end - - # Service calls - - ## - # Retrieves a Merchant Center account user. - # - # @overload get_user(request, options = nil) - # Pass arguments to `get_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_user(name: nil) - # Pass arguments to `get_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the user to retrieve. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to retrieve the user corresponding to the caller by - # using `me` rather than an email address as in - # `accounts/{account}/users/me`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new - # - # # Call the get_user method. - # result = client.get_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def get_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.get_user request, 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 Merchant Center account user. Executing this method requires - # admin access. - # - # @overload create_user(request, options = nil) - # Pass arguments to `create_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_user(parent: nil, user_id: nil, user: nil) - # Pass arguments to `create_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the account for which a user will be - # created. Format: `accounts/{account}` - # @param user_id [::String] - # Required. The email address of the user (for example, - # `john.doe@gmail.com`). - # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] - # Required. The user to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new - # - # # Call the create_user method. - # result = client.create_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def create_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.create_user request, 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 Merchant Center account user. Executing this method requires - # admin access. - # - # @overload delete_user(request, options = nil) - # Pass arguments to `delete_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_user(name: nil) - # Pass arguments to `delete_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the user to delete. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to delete the user corresponding to the caller by using - # `me` rather than an email address as in `accounts/{account}/users/me`. - # @yield [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/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new - # - # # Call the delete_user method. - # result = client.delete_user request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.delete_user request, 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 Merchant Center account user. Executing this method requires - # admin access. - # - # @overload update_user(request, options = nil) - # Pass arguments to `update_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_user(user: nil, update_mask: nil) - # Pass arguments to `update_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] - # Required. The new version of the user. - # - # Use `me` to refer to your own email address, for example - # `accounts/{account}/users/me`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new - # - # # Call the update_user method. - # result = client.update_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def update_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest - - # Converts hash and nil to an 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_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.update_user request, 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 users of a Merchant Center account. - # - # @overload list_users(request, options = nil) - # Pass arguments to `list_users` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_users(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_users` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of users. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of users to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @param page_token [::String] - # Optional. A page token, received from a previous `ListUsers` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListUsers` must match - # the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new - # - # # Call the list_users method. - # result = client.list_users request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::User. - # p item - # end - # - def list_users request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_users.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_users.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_users.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.list_users request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @user_service_stub, :list_users, "users", request, result, 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 UserService REST API. - # - # This class represents the configuration for UserService 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::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_user to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_user.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_user.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 UserService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_user` - # @return [::Gapic::Config::Method] - # - attr_reader :get_user - ## - # RPC-specific configuration for `create_user` - # @return [::Gapic::Config::Method] - # - attr_reader :create_user - ## - # RPC-specific configuration for `delete_user` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_user - ## - # RPC-specific configuration for `update_user` - # @return [::Gapic::Config::Method] - # - attr_reader :update_user - ## - # RPC-specific configuration for `list_users` - # @return [::Gapic::Config::Method] - # - attr_reader :list_users - - # @private - def initialize parent_rpcs = nil - get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user - @get_user = ::Gapic::Config::Method.new get_user_config - create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user - @create_user = ::Gapic::Config::Method.new create_user_config - delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user - @delete_user = ::Gapic::Config::Method.new delete_user_config - update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user - @update_user = ::Gapic::Config::Method.new update_user_config - list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users - @list_users = ::Gapic::Config::Method.new list_users_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb deleted file mode 100644 index c297a2b417f7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb +++ /dev/null @@ -1,390 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/user_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module UserService - module Rest - ## - # REST service stub for the UserService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # A result object deserialized from the server's reply - def get_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_user", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::User.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # A result object deserialized from the server's reply - def create_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_user", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::User.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_user", - 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 update_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # A result object deserialized from the server's reply - def update_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_user", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::User.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_users REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse] - # A result object deserialized from the server's reply - def list_users request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_users_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_users", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/users", - body: "user", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest] - # 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_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{user.name}", - body: "user", - matches: [ - ["user.name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_users REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_users_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/users", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb deleted file mode 100644 index 54dabf37a72e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/user.proto for package 'google.shopping.merchant.accounts.v1beta' -# 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/shopping/merchant/accounts/v1beta/user_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module UserService - # Service to support user API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.UserService' - - # Retrieves a Merchant Center account user. - rpc :GetUser, ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, ::Google::Shopping::Merchant::Accounts::V1beta::User - # Creates a Merchant Center account user. Executing this method requires - # admin access. - rpc :CreateUser, ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Google::Shopping::Merchant::Accounts::V1beta::User - # Deletes a Merchant Center account user. Executing this method requires - # admin access. - rpc :DeleteUser, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, ::Google::Protobuf::Empty - # Updates a Merchant Center account user. Executing this method requires - # admin access. - rpc :UpdateUser, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, ::Google::Shopping::Merchant::Accounts::V1beta::User - # Lists all users of a Merchant Center account. - rpc :ListUsers, ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb deleted file mode 100644 index 9d433caf1711..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/verificationmailsettings.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\nGgoogle/shopping/merchant/accounts/v1beta/verificationmailsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1fgoogle/api/field_behavior.proto\"\x94\x02\n\x18VerificationMailSettings\x12|\n\x16verification_mail_mode\x18\x01 \x01(\x0e\x32W.google.shopping.merchant.accounts.v1beta.VerificationMailSettings.VerificationMailModeB\x03\xe0\x41\x01\"z\n\x14VerificationMailMode\x12&\n\"VERIFICATION_MAIL_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SEND_VERIFICATION_MAIL\x10\x01\x12\x1e\n\x1aSUPPRESS_VERIFICATION_MAIL\x10\x02\x42\xa4\x02\n,com.google.shopping.merchant.accounts.v1betaB\x1dVerificationMailSettingsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspb\xaa\x02(Google.Shopping.Merchant.Accounts.V1Beta\xca\x02(Google\\Shopping\\Merchant\\Accounts\\V1beta\xea\x02,Google::Shopping::Merchant::Accounts::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - VerificationMailSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.VerificationMailSettings").msgclass - VerificationMailSettings::VerificationMailMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.VerificationMailSettings.VerificationMailMode").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb deleted file mode 100644 index b50ef86acc14..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/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 Shopping - module Merchant - module Accounts - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant V1BETA 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-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb deleted file mode 100644 index d51673a9fd9a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.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 Shopping - module Merchant - module Accounts - module V1beta - # The access right. - module AccessRight - # Default value. This value is unused. - ACCESS_RIGHT_UNSPECIFIED = 0 - - # Standard access rights. - STANDARD = 1 - - # Admin access rights. - ADMIN = 2 - - # Users with this right have access to performance and insights. - PERFORMANCE_REPORTING = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb deleted file mode 100644 index fb5a0c3c1f9b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb +++ /dev/null @@ -1,101 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # The tax settings of a merchant account. All methods require the admin role. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the tax setting. - # Format: - # "\\{account_tax.name=accounts/\\{account}}" - # @!attribute [r] account - # @return [::Integer] - # Output only. The ID of the account to which these account tax settings - # belong. - # @!attribute [rw] tax_rules - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::TaxRule>] - # Tax rules. "Define the tax rules in each region. - # No tax will be presented if a region has no rule." - class AccountTax - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get tax settings - # @!attribute [rw] name - # @return [::String] - # Required. The name from which tax settings will be retrieved - class GetAccountTaxRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update the tax settings - # @!attribute [rw] account_tax - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # Required. The tax setting that will be updated - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated - class UpdateAccountTaxRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list all sub-account tax settings only for the requesting merchant - # This method can only be called on a multi-client account, otherwise it'll - # return an error. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of account tax. - # Format: accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of tax settings to return in the response, used for - # paging. - # @!attribute [rw] page_token - # @return [::String] - # The token returned by the previous request. - class ListAccountTaxRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to account tax list request - # This method can only be called on a multi-client account, otherwise it'll - # return an error. - # @!attribute [rw] account_taxes - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] - # Page of accounttax settings - # @!attribute [rw] next_page_token - # @return [::String] - # The token for the retrieval of the next page of account tax settings. - class ListAccountTaxResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb deleted file mode 100644 index 5cce1309c12e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # An - # [`AccountIssue`](https://support.google.com/merchants/answer/12153802?sjid=17798438912526418908-EU#account). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the account issue. - # Format: `accounts/{account}/issues/{id}` - # @!attribute [rw] title - # @return [::String] - # The localized title of the issue. - # @!attribute [rw] severity - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::Severity] - # The overall severity of the issue. - # @!attribute [rw] impacted_destinations - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::ImpactedDestination>] - # The impact this issue has on various destinations. - # @!attribute [rw] detail - # @return [::String] - # Further localized details about the issue. - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to Merchant Center Help Center providing further information about the - # issue and how to fix it. - class AccountIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The impact of the issue on a destination. - # @!attribute [rw] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # The impacted reporting context. - # @!attribute [rw] impacts - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::ImpactedDestination::Impact>] - # The (negative) impact for various regions on the given destination. - class ImpactedDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The impact of the issue on a region. - # @!attribute [rw] region_code - # @return [::String] - # The [CLDR region code](https://cldr.unicode.org/) where this issue - # applies. - # @!attribute [rw] severity - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::Severity] - # The severity of the issue on the destination and region. - class Impact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # All possible issue severities. - module Severity - # The severity is unknown. - SEVERITY_UNSPECIFIED = 0 - - # The issue causes offers to not serve. - CRITICAL = 1 - - # The issue might affect offers (in the future) or might be an - # indicator of issues with offers. - ERROR = 2 - - # The issue is a suggestion for improvement. - SUGGESTION = 3 - end - end - - # Request message for the `ListAccountIssues` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of issues. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of issues to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListAccountIssues` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountIssues` must - # match the call that provided the page token. - # @!attribute [rw] language_code - # @return [::String] - # Optional. The issues in the response will have human-readable fields in the - # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), - # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be - # used. - # @!attribute [rw] time_zone - # @return [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in human-readable fields. For example 'America/Los_Angeles'. - # If not set, 'America/Los_Angeles' will be used. - class ListAccountIssuesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListAccountIssues` method. - # @!attribute [rw] account_issues - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] - # The issues from the specified account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListAccountIssuesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb deleted file mode 100644 index 573b329cfd2a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb +++ /dev/null @@ -1,231 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # An account. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the account. - # Format: `accounts/{account}` - # @!attribute [r] account_id - # @return [::Integer] - # Output only. The ID of the account. - # @!attribute [rw] account_name - # @return [::String] - # Required. A human-readable name of the account. See - # [store name](https://support.google.com/merchants/answer/160556) and - # [business name](https://support.google.com/merchants/answer/12159159) for - # more information. - # @!attribute [rw] adult_content - # @return [::Boolean] - # Whether this account contains adult content. - # @!attribute [r] test_account - # @return [::Boolean] - # Output only. Whether this is a test account. - # @!attribute [rw] time_zone - # @return [::Google::Type::TimeZone] - # Required. The time zone of the account. - # - # On writes, `time_zone` sets both the `reporting_time_zone` and the - # `display_time_zone`. - # - # For reads, `time_zone` always returns the `display_time_zone`. If - # `display_time_zone` doesn't exist for your account, `time_zone` is empty. - # @!attribute [rw] language_code - # @return [::String] - # Required. The account's [BCP-47 language - # code](https://tools.ietf.org/html/bcp47), such as `en-US` or `sr-Latn`. - class Account - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetAccount` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the account to retrieve. - # Format: `accounts/{account}` - class GetAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateAndConfigureAccount` method. - # @!attribute [rw] account - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # Required. The account to be created. - # @!attribute [rw] users - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest>] - # Optional. Users to be added to the account. - # @!attribute [rw] accept_terms_of_service - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService] - # Optional. The Terms of Service (ToS) to be accepted immediately upon - # account creation. - # @!attribute [rw] service - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService>] - # Required. An account service between the account to be created and the - # provider account is initialized as part of the creation. At least one such - # service needs to be provided. Currently exactly one of these needs to be - # `account_aggregation`, which means you can only create sub accounts, not - # standalone account through this method. Additional `account_management` or - # `product_management` services may be provided. - class CreateAndConfigureAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reference to a Terms of Service resource. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the terms of service version in the format - # `termsOfService/{version}`. To retrieve the latest version, use the - # [termsOfService.retrieveLatest](/merchant/api/reference/rest/accounts_v1beta/termsOfService/retrieveLatest) - # method. - # @!attribute [rw] region_code - # @return [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). - # This is either a country when the ToS applies specifically to that - # country or `001` when it applies globally. - class AcceptTermsOfService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Additional instructions to add account services during creation of the - # account. - # @!attribute [rw] account_aggregation - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountAggregation] - # The provider is an - # [aggregator](https://support.google.com/merchants/answer/188487) for - # the account. Payload for service type Account Aggregation. - # @!attribute [rw] provider - # @return [::String] - # Optional. The provider of the service. - # Format: `accounts/{account}` - class AddAccountService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for the `DeleteAccount` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the account to delete. - # Format: `accounts/{account}` - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to `true`, the account is deleted even if it provides - # services to other accounts or has processed offers. - class DeleteAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateAccount` method. - # @!attribute [rw] account - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # Required. The new version of the account. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListAccounts` method. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Returns only accounts that match the - # [filter](/merchant/api/guides/accounts/filter). - # For more details, see the - # [filter syntax reference](/merchant/api/guides/accounts/filter-syntax). - class ListAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListAccounts` method. - # @!attribute [rw] accounts - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # The accounts matching the `ListAccountsRequest`. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListSubAccounts` method. - # @!attribute [rw] provider - # @return [::String] - # Required. The parent account. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - class ListSubAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListSubAccounts` method. - # @!attribute [rw] accounts - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # The accounts for which the given parent account is an aggregator. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListSubAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb deleted file mode 100644 index 19cff87b2479..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.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 Shopping - module Merchant - module Accounts - module V1beta - # `AccountAggregation` payload. - class AccountAggregation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb deleted file mode 100644 index e321368804c4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.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 Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to the - # [autofeed](https://support.google.com/merchants/answer/7538732) settings. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the autofeed settings. - # Format: `accounts/{account}/autofeedSettings`. - # @!attribute [rw] enable_products - # @return [::Boolean] - # Required. Enables or disables product crawling through the autofeed for the - # given account. Autofeed accounts must meet [certain - # conditions](https://support.google.com/merchants/answer/7538732#Configure_automated_feeds_Standard_Experience), - # which can be checked through the `eligible` field. - # The account must **not** be a marketplace. - # When the autofeed is enabled for the first time, the products usually - # appear instantly. When re-enabling, it might take up to 24 hours for - # products to appear. - # @!attribute [r] eligible - # @return [::Boolean] - # Output only. Determines whether merchant is eligible for being enrolled - # into an autofeed. - class AutofeedSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetAutofeedSettings` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the autofeed settings. - # Format: `accounts/{account}/autofeedSettings` - class GetAutofeedSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateAutofeedSettings` method. - # @!attribute [rw] autofeed_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # Required. The new version of the autofeed setting. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateAutofeedSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb deleted file mode 100644 index 08941d3f76aa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb +++ /dev/null @@ -1,235 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to the [automatic - # improvements](https://developers.google.com/shopping-content/guides/automatic-improvements) - # of an account. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the automatic improvements. - # Format: `accounts/{account}/automaticImprovements`. - # @!attribute [rw] item_updates - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticItemUpdates] - # Turning on [item - # updates](https://support.google.com/merchants/answer/3246284) allows - # Google to automatically update items for you. When item updates are on, - # Google uses the structured data markup on the website and advanced data - # extractors to update the price and availability of the items. When the item - # updates are off, items with mismatched data aren't shown. - # This field is only updated (cleared) if provided in the update mask. - # @!attribute [rw] image_improvements - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImageImprovements] - # This improvement will attempt to automatically correct submitted images if - # they don't meet the [image - # requirements](https://support.google.com/merchants/answer/6324350), for - # example, removing overlays. If successful, the image will be replaced and - # approved. This improvement is only applied to images of disapproved offers. - # For more information see: [Automatic image - # improvements](https://support.google.com/merchants/answer/9242973) - # This field is only updated (cleared) if provided in the update mask. - # @!attribute [rw] shipping_improvements - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticShippingImprovements] - # Not available for MCAs - # [accounts](https://support.google.com/merchants/answer/188487). By turning - # on [automatic shipping - # improvements](https://support.google.com/merchants/answer/10027038), - # you are allowing Google to improve the accuracy of your delivery times - # shown to shoppers using Google. More accurate delivery times, especially - # when faster, typically lead to better conversion rates. Google will improve - # your estimated delivery times based on various factors: - # * Delivery address of an order - # * Current handling time and shipping time settings - # * Estimated weekdays or business days - # * Parcel tracking data - # This field is only updated (cleared) if provided in the update mask. - class AutomaticImprovements - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Turning on [item - # updates](https://support.google.com/merchants/answer/3246284) allows - # Google to automatically update items for you. When item updates are on, - # Google uses the structured data markup on the website and advanced data - # extractors to update the price and availability of the items. When the item - # updates are off, items with mismatched data aren't shown. - # @!attribute [rw] account_item_updates_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticItemUpdates::ItemUpdatesAccountLevelSettings] - # Optional. Determines which attributes of the items should be automatically - # updated. If this field is not present and provided in the update mask, then - # the settings will be deleted. If there are no settings for subaccount, they - # are inherited from aggregator. - # @!attribute [r] effective_allow_price_updates - # @return [::Boolean] - # Output only. The effective value of allow_price_updates. - # If account_item_updates_settings is present, then this value is the same. - # Otherwise, it represents the inherited value of the parent account. - # The default value is true if no settings are present. - # Read-only. - # @!attribute [r] effective_allow_availability_updates - # @return [::Boolean] - # Output only. The effective value of allow_availability_updates. - # If account_item_updates_settings is present, then this value is the same. - # Otherwise, it represents the inherited value of the parent account. - # The default value is true if no settings are present. - # Read-only. - # @!attribute [r] effective_allow_strict_availability_updates - # @return [::Boolean] - # Output only. The effective value of - # allow_strict_availability_updates. - # If account_item_updates_settings is present, then this value is the same. - # Otherwise, it represents the inherited value of the parent account. - # The default value is true if no settings are present. - # Read-only. - # @!attribute [r] effective_allow_condition_updates - # @return [::Boolean] - # Output only. The effective value of allow_condition_updates. - # If account_item_updates_settings is present, then this value is the same. - # Otherwise, it represents the inherited value of the parent account. - # The default value is true if no settings are present. - # Read-only. - class AutomaticItemUpdates - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Settings for the Automatic Item Updates. - # @!attribute [rw] allow_price_updates - # @return [::Boolean] - # If price updates are enabled, Google always updates the active price with - # the crawled information. - # @!attribute [rw] allow_availability_updates - # @return [::Boolean] - # If availability updates are enabled, any previous availability values - # get overwritten if Google finds an out-of-stock annotation on the offer's - # page. - # If additionally `allow_strict_availability_updates` field is set to - # true, values get overwritten if Google finds an in-stock annotation on - # the offer’s page. - # @!attribute [rw] allow_strict_availability_updates - # @return [::Boolean] - # If `allow_availability_updates` is enabled, items are automatically - # updated in all your Shopping target countries. By default, availability - # updates will only be applied to items that are 'out of stock' on your - # website but 'in stock' on Shopping. Set this to true to also update items - # that are 'in stock' on your website, but 'out of stock' on Google - # Shopping. In order for this field to have an effect, you must also set - # `allow_availability_updates`. - # @!attribute [rw] allow_condition_updates - # @return [::Boolean] - # If condition updates are enabled, Google always updates item condition - # with the condition detected from the details of your product. - class ItemUpdatesAccountLevelSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This improvement will attempt to automatically correct submitted images if - # they don't meet the [image - # requirements](https://support.google.com/merchants/answer/6324350), for - # example, removing overlays. If successful, the image will be replaced and - # approved. This improvement is only applied to images of disapproved offers. - # For more information see: [Automatic image - # improvements](https://support.google.com/merchants/answer/9242973) - # @!attribute [rw] account_image_improvements_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImageImprovements::ImageImprovementsAccountLevelSettings] - # Optional. Determines how the images should be automatically updated. - # If this field is not present and provided in the update mask, then the - # settings will be deleted. If there are no settings for subaccount, they are - # inherited from aggregator. - # @!attribute [r] effective_allow_automatic_image_improvements - # @return [::Boolean] - # Output only. The effective value of allow_automatic_image_improvements. - # If account_image_improvements_settings is present, then this value is the - # same. Otherwise, it represents the inherited value of the parent account. - # Read-only. - class AutomaticImageImprovements - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Settings for the Automatic Image Improvements. - # @!attribute [rw] allow_automatic_image_improvements - # @return [::Boolean] - # Enables automatic image improvements. - class ImageImprovementsAccountLevelSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Not available for MCAs - # [accounts](https://support.google.com/merchants/answer/188487). By turning on - # [automatic shipping - # improvements](https://support.google.com/merchants/answer/10027038), - # you are allowing Google to improve the accuracy of your delivery times shown - # to shoppers using Google. More accurate delivery times, especially when - # faster, typically lead to better conversion rates. Google will improve your - # estimated delivery times based on various factors: - # * Delivery address of an order - # * Current handling time and shipping time settings - # * Estimated weekdays or business days - # * Parcel tracking data - # @!attribute [rw] allow_shipping_improvements - # @return [::Boolean] - # Enables automatic shipping improvements. - class AutomaticShippingImprovements - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetAutomaticImprovements` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the automatic improvements. - # Format: `accounts/{account}/automaticImprovements` - class GetAutomaticImprovementsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateAutomaticImprovements` method. - # @!attribute [rw] automatic_improvements - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # Required. The new version of the automatic imrovements. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `item_updates` - # - `item_updates.account_level_settings` - # - `image_improvements` - # - `image_improvements.account_level_settings` - # - `shipping_improvements` - # - `shipping_improvements.allow_shipping_improvements` - class UpdateAutomaticImprovementsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb deleted file mode 100644 index 0e7e0a4c0677..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb +++ /dev/null @@ -1,129 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to the [identity of a - # business](https://support.google.com/merchants/answer/12564247). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the business identity. - # Format: `accounts/{account}/businessIdentity` - # @!attribute [rw] promotions_consent - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::PromotionsConsent] - # Optional. Whether the identity attributes may be used for promotions. - # @!attribute [rw] black_owned - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as being - # black-owned. This optional field will only be available for merchants with - # a business country set to `US`. It is also not applicable for marketplaces - # or marketplace sellers. - # @!attribute [rw] women_owned - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as being - # women-owned. This optional field will only be available for merchants with - # a business country set to `US`. It is also not applicable for marketplaces - # or marketplace sellers. - # @!attribute [rw] veteran_owned - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as being - # veteran-owned. This optional field will only be available for merchants - # with a business country set to `US`. It is also not applicable for - # marketplaces or marketplace sellers. - # @!attribute [rw] latino_owned - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as being - # latino-owned. This optional field will only be available for merchants with - # a business country set to `US`. It is also not applicable for marketplaces - # or marketplace sellers. - # @!attribute [rw] small_business - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as a small - # business. This optional field will only be available for merchants with a - # business country set to `US`. It is also not applicable for marketplaces. - class BusinessIdentity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # All information related to an identity attribute. - # @!attribute [rw] identity_declaration - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute::IdentityDeclaration] - # Required. The declaration of identity for this attribute. - class IdentityAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # All possible settings regarding the declaration of an identity. - module IdentityDeclaration - # Default value indicating that no selection was made. - IDENTITY_DECLARATION_UNSPECIFIED = 0 - - # Indicates that the account identifies with the attribute. - SELF_IDENTIFIES_AS = 1 - - # Indicates that the account does not identify with the attribute. - DOES_NOT_SELF_IDENTIFY_AS = 2 - end - end - - # All possible settings regarding promotions related to the business - # identity. - module PromotionsConsent - # Default value indicating that no selection was made. - PROMOTIONS_CONSENT_UNSPECIFIED = 0 - - # Indicates that the account consented to having their business identity - # used for promotions. - PROMOTIONS_CONSENT_GIVEN = 1 - - # Indicates that the account did not consent to having their business - # identity used for promotions. - PROMOTIONS_CONSENT_DENIED = 2 - end - end - - # Request message for the `GetBusinessIdentity` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the business identity. - # Format: `accounts/{account}/businessIdentity` - class GetBusinessIdentityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateBusinessIdentity` method. - # @!attribute [rw] business_identity - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # Required. The new version of the business identity. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateBusinessIdentityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb deleted file mode 100644 index 3546fd5ee3a5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.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 Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to a business. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the business info. - # Format: `accounts/{account}/businessInfo` - # @!attribute [rw] address - # @return [::Google::Type::PostalAddress] - # Optional. The address of the business. - # @!attribute [r] phone - # @return [::Google::Type::PhoneNumber] - # Output only. The phone number of the business. - # @!attribute [r] phone_verification_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::PhoneVerificationState] - # Output only. The phone verification state of the business. - # @!attribute [rw] customer_service - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CustomerService] - # Optional. The customer service of the business. - # @!attribute [rw] korean_business_registration_number - # @return [::String] - # Optional. The 10-digit [Korean business registration - # number](https://support.google.com/merchants/answer/9037766) separated with - # dashes in the format: XXX-XX-XXXXX. - class BusinessInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetBusinessInfo` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the business info. - # Format: `accounts/{account}/businessInfo` - class GetBusinessInfoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateBusinessInfo` method. - # @!attribute [rw] business_info - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # Required. The new version of the business info. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateBusinessInfoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb deleted file mode 100644 index 1acb59925679..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb +++ /dev/null @@ -1,185 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Request message for `GetCheckoutSettings` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - class GetCheckoutSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateCheckoutSettings` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account for which the `CheckoutSettings` will be - # created. - # @!attribute [rw] checkout_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # Required. The `CheckoutSettings` object to create. - class CreateCheckoutSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateCheckoutSettings` method. - # @!attribute [rw] checkout_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # Required. The updated version of the `CheckoutSettings`. - # The `name` field is used to identify the `CheckoutSettings`. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `eligible_destinations` - # - `uri_settings` - class UpdateCheckoutSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteCheckoutSettings` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - class DeleteCheckoutSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # [CheckoutSettings](https://support.google.com/merchants/answer/13945960) for - # a specific merchant. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the program configuration settings. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @!attribute [rw] uri_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::UriSettings] - # URI settings for cart or checkout URL. - # @!attribute [rw] eligible_destinations - # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] - # Optional. The destinations to which the checkout program applies, valid - # destination values are `SHOPPING_ADS`, `FREE_LISTINGS` - # @!attribute [r] enrollment_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutEnrollmentState] - # Output only. Reflects the merchant enrollment state in `Checkout` program. - # @!attribute [r] review_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutReviewState] - # Output only. Reflects the merchant review state in `Checkout` program. - # This is set based on the data quality reviews of the URL provided by - # the merchant. - # A merchant with enrollment state - # as `ENROLLED` can be in the following review states: `IN_REVIEW`, - # `APPROVED` or `DISAPPROVED`. A merchant must be in an `enrollment_state` of - # `ENROLLED` before a review can begin for the merchant.For more details, - # check the help center doc. - # @!attribute [r] effective_uri_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::UriSettings] - # Output only. The effective value of `uri_settings` for a given merchant. If - # account level settings are present then this value will be a copy of url - # settings. Otherwise, it will have the value of the parent account (for only - # marketplace sellers). - # @!attribute [r] effective_enrollment_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutEnrollmentState] - # Output only. The effective value of enrollment_state for a given merchant - # ID. If account level settings are present then this value will be a copy of - # the account level settings. Otherwise, it will have the value of the parent - # account (for only marketplace sellers). - # @!attribute [r] effective_review_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutReviewState] - # Output only. The effective value of `review_state` for a given merchant ID. - # If account level settings are present then this value will be a copy of the - # account level settings. Otherwise, it will have the value of the parent - # account (for only marketplace sellers). - class CheckoutSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum indicating the enrollment state of merchant in `Checkout` - # program. - module CheckoutEnrollmentState - # Default enrollment state when enrollment state is not specified. - CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED = 0 - - # Merchant has not enrolled into the program. - INACTIVE = 1 - - # Merchant has enrolled into the program by providing either an - # account level URL or checkout URLs as part of their feed. - ENROLLED = 2 - - # Merchant has previously enrolled but opted out of the program. - OPTED_OUT = 3 - end - - # Enum indicating the review state of merchant in `Checkout` - # program. - module CheckoutReviewState - # Default review state when review state is not specified. - CHECKOUT_REVIEW_STATE_UNSPECIFIED = 0 - - # Merchant provided URLs are being reviewed for data quality issues. - IN_REVIEW = 1 - - # Merchant account has been approved. Indicates the data quality checks - # have passed. - APPROVED = 2 - - # Merchant account has been disapproved due to data quality issues. - DISAPPROVED = 3 - end - end - - # URL settings for cart or checkout URL. - # @!attribute [rw] checkout_uri_template - # @return [::String] - # Checkout URL template. When the placeholders are expanded will redirect - # the buyer to the merchant checkout page with the item in the cart. For - # more details, check the [help center - # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) - # - # Note: The following fields are mutually exclusive: `checkout_uri_template`, `cart_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cart_uri_template - # @return [::String] - # Cart URL template. When the placeholders are expanded will redirect the - # buyer to the cart page on the merchant website with the selected - # item in cart. For more details, check the [help center - # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) - # - # Note: The following fields are mutually exclusive: `cart_uri_template`, `checkout_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class UriSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb deleted file mode 100644 index 5a79025d60ca..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.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 Shopping - module Merchant - module Accounts - module V1beta - # Customer service information. - # @!attribute [rw] uri - # @return [::String] - # Optional. The URI where customer service may be found. - # @!attribute [rw] email - # @return [::String] - # Optional. The email address where customer service may be reached. - # @!attribute [rw] phone - # @return [::Google::Type::PhoneNumber] - # Optional. The phone number where customer service may be called. - class CustomerService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb deleted file mode 100644 index 540f0e3bee48..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.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 Shopping - module Merchant - module Accounts - module V1beta - # The categories of notifications the user opted into / opted out of. The email - # preferences do not include mandatory announcements as users can't opt out of - # them. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the EmailPreferences. The endpoint is only - # supported for the authenticated user. - # @!attribute [rw] news_and_tips - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences::OptInState] - # Optional. Updates on new features, tips and best practices. - class EmailPreferences - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Opt in state of the email preference. - module OptInState - # Opt-in status is not specified. - OPT_IN_STATE_UNSPECIFIED = 0 - - # User has opted out of receiving this type of email. - OPTED_OUT = 1 - - # User has opted in to receiving this type of email. - OPTED_IN = 2 - - # User has opted in to receiving this type of email and the confirmation - # email has been sent, but user has not yet confirmed the opt in (applies - # only to certain countries). - UNCONFIRMED = 3 - end - end - - # Request message for GetEmailPreferences method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `EmailPreferences` resource. - # Format: `accounts/{account}/users/{email}/emailPreferences` - class GetEmailPreferencesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateEmailPreferences method. - # @!attribute [rw] email_preferences - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # Required. Email Preferences to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateEmailPreferencesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb deleted file mode 100644 index b8c64f5452ff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.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 Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to a Google Business Profile (GBP) account. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the GBP account. Format: - # `accounts/{account}/gbpAccount/{gbp_account}` - # @!attribute [rw] gbp_account_id - # @return [::String] - # The id of the GBP account. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount::Type] - # The type of the Business Profile. - # @!attribute [rw] gbp_account_name - # @return [::String] - # The name of the Business Profile. - # For personal accounts: Email id of the owner. - # For Business accounts: Name of the Business Account. - # @!attribute [rw] listing_count - # @return [::Integer] - # Number of listings under this account. - class GbpAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the GBP account. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # The GBP account is a user account. - USER = 1 - - # The GBP account is a business account. - BUSINESS_ACCOUNT = 2 - end - end - - # Request message for the ListGbpAccounts method. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource under which the GBP accounts are - # listed. Format: `accounts/{account}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `GbpAccount` resources to return. The - # service returns fewer than this value if the number of gbp accounts is less - # that than the `pageSize`. The default value is 50. The maximum value is - # 1000; If a value higher than the maximum is specified, then the `pageSize` - # will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListGbpAccounts` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListGbpAccounts` must - # match the call that provided the page token. - class ListGbpAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListGbpAccounts method. - # @!attribute [rw] gbp_accounts - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] - # The GBP accounts from the specified merchant in the specified country. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListGbpAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the LinkGbpAccount method. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource to which the GBP account is - # linked. Format: `accounts/{account}`. - # @!attribute [rw] gbp_email - # @return [::String] - # Required. The email address of the Business Profile account. - class LinkGbpAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the LinkGbpAccount method. - # @!attribute [rw] response - # @return [::Google::Protobuf::Empty] - # Empty response. - class LinkGbpAccountResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb deleted file mode 100644 index 24696e1e3b3f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.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 Shopping - module Merchant - module Accounts - module V1beta - # A store's homepage. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the store's homepage. - # Format: `accounts/{account}/homepage` - # @!attribute [rw] uri - # @return [::String] - # Required. The URI (typically a URL) of the store's homepage. - # @!attribute [r] claimed - # @return [::Boolean] - # Output only. Whether the homepage is claimed. See - # https://support.google.com/merchants/answer/176793. - class Homepage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetHomepage` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the homepage to retrieve. - # Format: `accounts/{account}/homepage` - class GetHomepageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateHomepage` method. - # @!attribute [rw] homepage - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # Required. The new version of the homepage. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateHomepageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ClaimHomepage` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the homepage to claim. - # Format: `accounts/{account}/homepage` - class ClaimHomepageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UnclaimHomepage` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the homepage to unclaim. - # Format: `accounts/{account}/homepage` - class UnclaimHomepageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb deleted file mode 100644 index f4a962b34c31..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.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 Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to a Local Feed Partnership (LFP) provider. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the LFP provider. - # Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}` - # @!attribute [r] region_code - # @return [::String] - # Output only. Region code defined by [CLDR](https://cldr.unicode.org/). - # @!attribute [rw] display_name - # @return [::String] - # The display name of the LFP provider. - class LfpProvider - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the FindLfpProviders method. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource under which the LFP providers are - # found. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `LfpProvider` resources to return. The - # service returns fewer than this value if the number of lfp providers is - # less that than the `pageSize`. The default value is 50. The maximum value - # is 1000; If a value higher than the maximum is specified, then the - # `pageSize` will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `FindLfpProviders` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `FindLfpProviders` must - # match the call that provided the page token. - class FindLfpProvidersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the FindLfpProviders method. - # @!attribute [rw] lfp_providers - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] - # The LFP providers from the specified merchant in the specified country. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class FindLfpProvidersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the LinkLfpProvider method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the LFP provider resource to link. - # Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. - # The `lfp_provider` is the LFP provider ID. - # @!attribute [rw] external_account_id - # @return [::String] - # Required. The external account ID by which this merchant is known to the - # LFP provider. - class LinkLfpProviderRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the LinkLfpProvider method. - # @!attribute [rw] response - # @return [::Google::Protobuf::Empty] - # Empty response. - class LinkLfpProviderResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb deleted file mode 100644 index 17d29142b0ff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb +++ /dev/null @@ -1,336 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to the omnichannel settings of a merchant. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the omnichannel setting. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # @!attribute [rw] region_code - # @return [::String] - # Required. Immutable. Region code defined by - # [CLDR](https://cldr.unicode.org/). Must be provided in the Create method, - # and is immutable. - # @!attribute [rw] lsf_type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting::LsfType] - # Required. The Local Store Front type for this country. - # @!attribute [rw] in_stock - # @return [::Google::Shopping::Merchant::Accounts::V1beta::InStock] - # Optional. The InStock URI and state for this country. - # @!attribute [rw] pickup - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Pickup] - # Optional. The Pickup URI and state for this country. - # @!attribute [r] lfp_link - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LfpLink] - # Output only. The established link to a LFP provider. - # @!attribute [rw] odo - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnDisplayToOrder] - # Optional. The On Display to Order (ODO) policy URI and state for this - # country. - # @!attribute [rw] about - # @return [::Google::Shopping::Merchant::Accounts::V1beta::About] - # Optional. The about page URI and state for this country. - # @!attribute [rw] inventory_verification - # @return [::Google::Shopping::Merchant::Accounts::V1beta::InventoryVerification] - # Optional. The inventory verification contact and state for this country. - class OmnichannelSetting - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The product page experience type, which is also called the Local Store - # Front (LSF) type. Check the [HC - # article](https://support.google.com/merchants/answer/7178526) for more - # details. - module LsfType - # Default value. This value is unused. - LSF_TYPE_UNSPECIFIED = 0 - - # Google-Hosted Local Store Front. Check the [HC - # article](https://support.google.com/merchants/answer/14869424) for more - # details. - GHLSF = 1 - - # Merchant-Hosted Local Store Front Basic. Check the [HC - # article](https://support.google.com/merchants/answer/14615867) for more - # details. - MHLSF_BASIC = 2 - - # Merchant-Hosted Local Store Front Full. Check the [HC - # article](https://support.google.com/merchants/answer/14617076) for more - # details. - MHLSF_FULL = 3 - end - end - - # The state of a omnichannel setting related review process. - class ReviewState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the review process. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The review process has concluded successfully. The reviewed item is - # active. - ACTIVE = 1 - - # The review process failed. - FAILED = 2 - - # The review process is running. - RUNNING = 3 - - # The review process is waiting for the merchant to take action. - ACTION_REQUIRED = 4 - end - end - - # Collection of information related to InStock. - # @!attribute [rw] uri - # @return [::String] - # Optional. Product landing page URI. It is only used for the review of MHLSF - # in-stock serving. This URI domain should match with the business's - # homepage. Required to be empty if the lsf_type is GHLSF, and required when - # the lsf_type is MHLSF_FULL or MHLSF_BASIC. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the in-stock serving. - class InStock - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to Pickup. - # @!attribute [rw] uri - # @return [::String] - # Required. Pickup product page URI. It is only used for the review of pickup - # serving. This URI domain should match with the business's homepage. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the pickup serving. - class Pickup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to the LFP link. - # @!attribute [rw] lfp_provider - # @return [::String] - # Required. The resource name of the LFP provider. - # Format: `lfpProviders/{lfp_provider}` - # @!attribute [rw] external_account_id - # @return [::String] - # Required. The account ID by which this merchant is known to the LFP - # provider. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the LFP link. - class LfpLink - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to the on display to order - # ([ODO](https://support.google.com/merchants/answer/14615056?hl=en&ref_topic=15145747&sjid=6892280366904591178-NC)). - # @!attribute [rw] uri - # @return [::String] - # Required. The on display to order (ODO) policy URI. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the URI. - class OnDisplayToOrder - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to the about page - # ([impressum](https://support.google.com/merchants/answer/14675634?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC)). - # @!attribute [rw] uri - # @return [::String] - # Required. The about page URI. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the URI. - class About - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to [inventory - # verification](https://support.google.com/merchants/answer/14684499?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC). - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::InventoryVerification::State] - # Output only. The state of the inventory verification process. - # @!attribute [rw] contact - # @return [::String] - # Required. The name of the contact for the inventory verification process. - # @!attribute [rw] contact_email - # @return [::String] - # Required. The email address of the contact for the inventory verification - # process. - # @!attribute [r] contact_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the contact verification. - class InventoryVerification - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the [inventory - # verification](https://support.google.com/merchants/answer/14684499?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC) - # process. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # When the merchant needs to initiate the inventory - # verification process. The next state is INACTIVE. - ACTION_REQUIRED = 1 - - # When the merchant is ready to request inventory verification. - INACTIVE = 5 - - # The inventory verification process is running. If the merchant is - # rejected, the next state is INACTIVE. - RUNNING = 2 - - # The inventory verification process succeeded. - SUCCEEDED = 3 - - # When merchant fails the inventory verification process and all attempts - # are exhausted. - SUSPENDED = 4 - end - end - - # Request message for the GetOmnichannelSettings method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the omnichannel setting to retrieve. - # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - class GetOmnichannelSettingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListOmnichannelSettings method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of omnichannel settings. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of omnichannel settings to return. The service - # may return fewer than this value. If unspecified, at most 50 omnichannel - # settings will be returned. The maximum value is 1000; values above 1000 - # will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListOmnichannelSettings` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListOmnichannelSettings` - # must match the call that provided the page token. - class ListOmnichannelSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListOmnichannelSettings method. - # @!attribute [rw] omnichannel_settings - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] - # The omnichannel settings from the specified merchant. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListOmnichannelSettingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateOmnichannelSetting method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this omnichannel setting will be - # created. Format: `accounts/{account}` - # @!attribute [rw] omnichannel_setting - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # Required. The omnichannel setting to create. - class CreateOmnichannelSettingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateOmnichannelSetting method. - # @!attribute [rw] omnichannel_setting - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # Required. The omnichannel setting to update. - # - # The omnichannel setting's `name` field is used to identify the - # omnichannel setting to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to be updated. - # - # The following fields are supported in snake_case only: - # - `lsf_type` - # - `in_stock` - # - `pickup` - # - `odo` - # - `about` - # - `inventory_verification` - # - # Full replacement with wildcard `*`is supported, while empty/implied update - # mask is not. - class UpdateOmnichannelSettingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the RequestInventoryVerification method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the omnichannel setting to request inventory - # verification. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - class RequestInventoryVerificationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the RequestInventoryVerification method. - # @!attribute [rw] omnichannel_setting - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # The omnichannel setting that was updated. - class RequestInventoryVerificationResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb deleted file mode 100644 index 7e1e51be1a93..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb +++ /dev/null @@ -1,345 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Request message for the `GetOnlineReturnPolicy` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the return policy to retrieve. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - class GetOnlineReturnPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateOnlineReturnPolicy` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account for which the return policy will be created. - # Format: `accounts/{account}` - # @!attribute [rw] online_return_policy - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # Required. The return policy object to create. - class CreateOnlineReturnPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateOnlineReturnPolicy` method. The method - # supports field masks and when the mask is provided, only the fields specified - # in the mask are updated. - # @!attribute [rw] online_return_policy - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # Required. The online return policy to update. - # The online return policy's `name` field is used to identify the - # online return policy to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `accept_defective_only` - # - `accept_exchange` - # - `item_conditions` - # - `policy` - # - `process_refund_days` - # - `restocking_fee` - # - `return_methods` - # - `return_policy_uri` - # - `return_shipping_fee` - class UpdateOnlineReturnPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteOnlineReturnPolicy` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the return policy to delete. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - class DeleteOnlineReturnPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListOnlineReturnPolicies` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account for which to list return policies. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `OnlineReturnPolicy` resources to return. - # The service returns fewer than this value if the number of return policies - # for the given merchant is less that than the `pageSize`. The default value - # is 10. The maximum value is 100; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListOnlineReturnPolicies` - # call. Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListOnlineReturnPolicies` must match the call that provided the page - # token. The token returned as - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} - # in the response to the previous request. - class ListOnlineReturnPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListOnlineReturnPolicies` method. - # @!attribute [rw] online_return_policies - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] - # The retrieved return policies. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `pageToken` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListOnlineReturnPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # [Online return policy](https://support.google.com/merchants/answer/10220642) - # object. This is currently used to represent return policies for ads and free - # listings programs. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the `OnlineReturnPolicy` resource. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - # @!attribute [r] return_policy_id - # @return [::String] - # Output only. Return policy ID generated by Google. - # @!attribute [rw] label - # @return [::String] - # Required. Immutable. This field represents the unique user-defined label of - # the return policy. It is important to note that the same label cannot be - # used in different return policies for the same country. Unless a product - # specifies a specific label attribute, policies will be automatically - # labeled as 'default'. To assign a custom return policy to certain product - # groups, follow the instructions provided in the [Return policy label] - # (https://support.google.com/merchants/answer/9445425). - # The label can contain up to 50 characters. - # @!attribute [rw] countries - # @return [::Array<::String>] - # Required. Immutable. The countries of sale where the return policy applies. - # The values must be a valid 2 letter ISO 3166 code. - # @!attribute [rw] policy - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::Policy] - # Optional. The return policy. - # @!attribute [rw] seasonal_overrides - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::SeasonalOverride>] - # Optional. Overrides to the general policy for orders placed during a - # specific set of time intervals. - # @!attribute [rw] restocking_fee - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::RestockingFee] - # Optional. The restocking fee that applies to all return reason categories. - # This would be treated as a free restocking fee if the value is not set. - # @!attribute [rw] return_methods - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnMethod>] - # Optional. The return methods of how customers can return an item. This - # value is required to not be empty unless the type of return policy is - # noReturns. - # @!attribute [rw] item_conditions - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ItemCondition>] - # Optional. The item conditions accepted for returns must not be empty unless - # the type of return policy is 'noReturns'. - # @!attribute [rw] return_shipping_fee - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnShippingFee] - # Optional. The return shipping fee. Should be set only when customer need to - # download and print the return label. - # @!attribute [rw] return_policy_uri - # @return [::String] - # Required. The return policy uri. This can used by Google to do a sanity - # check for the policy. It must be a valid URL. - # @!attribute [rw] accept_defective_only - # @return [::Boolean] - # Optional. This field specifies if merchant - # only accepts defective products for returns. - # @!attribute [rw] process_refund_days - # @return [::Integer] - # Optional. The field specifies the number of - # days it takes for merchants to process refunds. - # @!attribute [rw] accept_exchange - # @return [::Boolean] - # Optional. This field specifies if merchant - # allows customers to exchange products. - # @!attribute [rw] return_label_source - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnLabelSource] - # Optional. The field specifies the return - # label source. - class OnlineReturnPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The return shipping fee. This can either be a fixed fee or a boolean to - # indicate that the customer pays the actual shipping cost. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnShippingFee::Type] - # Required. Type of return shipping fee. - # @!attribute [rw] fixed_fee - # @return [::Google::Shopping::Type::Price] - # Fixed return shipping fee amount. This value is only applicable when type - # is `FIXED`. We will treat the return shipping fee as free if type is - # `FIXED` and this value is not set. - class ReturnShippingFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Return shipping fee types. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # The return shipping fee is a fixed value. - FIXED = 1 - - # Customers will pay the actual return shipping fee. - CUSTOMER_PAYING_ACTUAL_FEE = 2 - end - end - - # The restocking fee. This can be a flat fee or a micro percent. - # @!attribute [rw] fixed_fee - # @return [::Google::Shopping::Type::Price] - # Fixed restocking fee. - # - # Note: The following fields are mutually exclusive: `fixed_fee`, `micro_percent`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] micro_percent - # @return [::Integer] - # Percent of total price in micros. 15,000,000 means 15% of the total - # price would be charged. - # - # Note: The following fields are mutually exclusive: `micro_percent`, `fixed_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class RestockingFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The available policies. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::Policy::Type] - # Policy type. - # @!attribute [rw] days - # @return [::Integer] - # The number of days items can be returned after delivery, where one day - # is defined as 24 hours after the delivery timestamp. Required for - # `NUMBER_OF_DAYS_AFTER_DELIVERY` returns. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Return policy types. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # The number of days within which a return is valid after delivery. - NUMBER_OF_DAYS_AFTER_DELIVERY = 1 - - # No returns. - NO_RETURNS = 2 - - # Life time returns. - LIFETIME_RETURNS = 3 - end - end - - # @!attribute [rw] return_days - # @return [::Integer] - # Number of days (from the delivery date) that the product can be - # returned. - # - # Note: The following fields are mutually exclusive: `return_days`, `return_until_date`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] return_until_date - # @return [::Google::Type::Date] - # Fixed end date until which the product can be returned. - # - # Note: The following fields are mutually exclusive: `return_until_date`, `return_days`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] label - # @return [::String] - # Required. Display name of this seasonal override in Merchant Center. - # @!attribute [rw] start_date - # @return [::Google::Type::Date] - # Required. Defines the date range when this seasonal override applies. - # Both start_date and end_date are inclusive. - # The dates of the seasonal overrides should not overlap. - # @!attribute [rw] end_date - # @return [::Google::Type::Date] - # Required. seasonal override end date (inclusive). - class SeasonalOverride - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The available return methods. - module ReturnMethod - # Default value. This value is unused. - RETURN_METHOD_UNSPECIFIED = 0 - - # Return by mail. - BY_MAIL = 1 - - # Return in store. - IN_STORE = 2 - - # Return at a kiosk. - AT_A_KIOSK = 3 - end - - # The available item conditions. - module ItemCondition - # Default value. This value is unused. - ITEM_CONDITION_UNSPECIFIED = 0 - - # New. - NEW = 1 - - # Used. - USED = 2 - end - - # The available return label sources. - module ReturnLabelSource - # Default value. This value is unused. - RETURN_LABEL_SOURCE_UNSPECIFIED = 0 - - # Download and print. - DOWNLOAD_AND_PRINT = 1 - - # Label include in the package. - IN_THE_PACKAGE = 2 - - # Customer to provide. - CUSTOMER_RESPONSIBILITY = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb deleted file mode 100644 index 8dd1d729cfe1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.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 Shopping - module Merchant - module Accounts - module V1beta - # The phone verification state. - module PhoneVerificationState - # Default value. This value is unused. - PHONE_VERIFICATION_STATE_UNSPECIFIED = 0 - - # The phone is verified. - PHONE_VERIFICATION_STATE_VERIFIED = 1 - - # The phone is unverified - PHONE_VERIFICATION_STATE_UNVERIFIED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb deleted file mode 100644 index 7a16e89b6c29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb +++ /dev/null @@ -1,160 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Defines participation in a given program for the specified account. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the program. - # Format: `accounts/{account}/programs/{program}` - # @!attribute [r] documentation_uri - # @return [::String] - # Output only. The URL of a Merchant Center help page describing the program. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program::State] - # Output only. The participation state of the account in the program. - # @!attribute [r] active_region_codes - # @return [::Array<::String>] - # Output only. The regions in which the account is actively participating in - # the program. Active regions are defined as those where all program - # requirements affecting the regions have been met. - # - # Region codes are defined by [CLDR](https://cldr.unicode.org/). This is - # either a country where the program applies specifically to that country or - # `001` when the program applies globally. - # @!attribute [r] unmet_requirements - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Program::Requirement>] - # Output only. The requirements that the account has not yet satisfied that - # are affecting participation in the program. - class Program - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines a requirement specified for participation in the program. - # @!attribute [r] title - # @return [::String] - # Output only. Name of the requirement. - # @!attribute [r] documentation_uri - # @return [::String] - # Output only. The URL of a help page describing the requirement. - # @!attribute [r] affected_region_codes - # @return [::Array<::String>] - # Output only. The regions that are currently affected by this requirement - # not being met. - # - # Region codes are defined by [CLDR](https://cldr.unicode.org/). This is - # either a country where the program applies specifically to that country - # or `001` when the program applies globally. - class Requirement - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible program participation states for the account. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The account is not eligible to participate in the program. - NOT_ELIGIBLE = 1 - - # The account is eligible to participate in the program. - ELIGIBLE = 2 - - # The program is enabled for the account. - ENABLED = 3 - end - end - - # Request message for the GetProgram method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the program to retrieve. - # Format: `accounts/{account}/programs/{program}` - class GetProgramRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListPrograms method. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the account for which to retrieve all programs. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of programs to return in a single response. If - # unspecified (or 0), a default size of 1000 is used. The maximum value is - # 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A continuation token, received from a previous `ListPrograms` - # call. Provide this to retrieve the next page. - class ListProgramsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListPrograms method. - # @!attribute [rw] programs - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Program>] - # The programs for the given account. - # @!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 ListProgramsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the EnableProgram method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the program for which to enable participation for the - # given account. Format: `accounts/{account}/programs/{program}` - class EnableProgramRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DisableProgram method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the program for which to disable participation for - # the given account. Format: `accounts/{account}/programs/{program}` - class DisableProgramRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb deleted file mode 100644 index 6757ee510eca..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb +++ /dev/null @@ -1,195 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Request message for the `GetRegion` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the region to retrieve. - # Format: `accounts/{account}/regions/{region}` - class GetRegionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateRegion` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to create a region for. - # Format: `accounts/{account}` - # @!attribute [rw] region_id - # @return [::String] - # Required. The identifier for the region, unique over all regions of the - # same account. - # @!attribute [rw] region - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # Required. The region to create. - class CreateRegionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateRegion` method. - # @!attribute [rw] region - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # Required. The updated region. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The comma-separated field mask indicating the fields to update. - # Example: - # `"displayName,postalCodeArea.regionCode"`. - class UpdateRegionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteRegion` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the region to delete. - # Format: `accounts/{account}/regions/{region}` - class DeleteRegionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListRegions` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to list regions for. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of regions to return. The service may return - # fewer than this value. - # If unspecified, at most 50 regions will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListRegions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegions` must - # match the call that provided the page token. - class ListRegionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListRegions` method. - # @!attribute [rw] regions - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Region>] - # The regions from the specified merchant. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRegionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a geographic region that you can use as a target with both the - # `RegionalInventory` and `ShippingSettings` services. You can define regions - # as collections of either postal codes or, in some countries, using predefined - # geotargets. For more information, see [Set up regions - # ](https://support.google.com/merchants/answer/7410946#zippy=%2Ccreate-a-new-region) - # for more information. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the region. - # Format: `accounts/{account}/regions/{region}` - # @!attribute [rw] display_name - # @return [::String] - # Optional. The display name of the region. - # @!attribute [rw] postal_code_area - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region::PostalCodeArea] - # Optional. A list of postal codes that defines the region area. - # @!attribute [rw] geotarget_area - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region::GeoTargetArea] - # Optional. A list of geotargets that defines the region area. - # @!attribute [r] regional_inventory_eligible - # @return [::Google::Protobuf::BoolValue] - # Output only. Indicates if the region is eligible for use in the Regional - # Inventory configuration. - # @!attribute [r] shipping_eligible - # @return [::Google::Protobuf::BoolValue] - # Output only. Indicates if the region is eligible for use in the Shipping - # Services configuration. - class Region - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A list of postal codes that defines the region area. - # Note: All regions defined using postal codes are accessible through the - # account's `ShippingSettings.postalCodeGroups` resource. - # @!attribute [rw] region_code - # @return [::String] - # Required. [CLDR territory - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # or the country the postal code group applies to. - # @!attribute [rw] postal_codes - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Region::PostalCodeArea::PostalCodeRange>] - # Required. A range of postal codes. - class PostalCodeArea - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A range of postal codes that defines the region area. - # @!attribute [rw] begin - # @return [::String] - # Required. A postal code or a pattern of the form prefix* denoting the - # inclusive lower bound of the range defining the area. Examples values: - # `94108`, `9410*`, `9*`. - # @!attribute [rw] end - # @return [::String] - # Optional. A postal code or a pattern of the form `prefix*` denoting the - # inclusive upper bound of the range defining the area. It must have the - # same length as postalCodeRangeBegin: if postalCodeRangeBegin is a - # postal code then postalCodeRangeEnd must be a postal code too; if - # postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a - # pattern with the same prefix length. Optional: if not set, then the - # area is defined as being all the postal codes matching - # postalCodeRangeBegin. - class PostalCodeRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A list of geotargets that defines the region area. - # @!attribute [rw] geotarget_criteria_ids - # @return [::Array<::Integer>] - # Required. A non-empty list of [location - # IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). - # They must all be of the same location type (for example, state). - class GeoTargetArea - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb deleted file mode 100644 index e5456e04275e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb +++ /dev/null @@ -1,747 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # The merchant account's [shipping - # setting](https://support.google.com/merchants/answer/6069284). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the shipping setting. - # Format: `accounts/{account}/shippingSetting` - # @!attribute [rw] services - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Service>] - # Optional. The target account's list of services. - # @!attribute [rw] warehouses - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Warehouse>] - # Optional. A list of warehouses which can be referred to in `services`. - # @!attribute [rw] etag - # @return [::String] - # Required. This field is used for avoid async issue. Make sure shipping - # setting data - # didn't change between get call and insert call. The user should do - # following steps: - # - # 1. Set etag field as empty string for initial shipping setting creation. - # - # 2. After initial creation, call get method to obtain an etag and current - # shipping setting data before call insert. - # - # 3. Modify to wanted shipping setting information. - # - # 4. Call insert method with the wanted shipping setting information with - # the etag obtained from step 2. - # - # 5. If shipping setting data changed between step 2 and step 4. Insert - # request will fail because the etag changes every time the shipping setting - # data changes. User should repeate step 2-4 with the new etag. - class ShippingSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Shipping service. - # @!attribute [rw] service_name - # @return [::String] - # Required. Free-form name of the service. Must be unique within target - # account. - # @!attribute [rw] active - # @return [::Boolean] - # Required. A boolean exposing the active status of the shipping service. - # @!attribute [rw] delivery_countries - # @return [::Array<::String>] - # Required. The CLDR territory code of the countries to which the service - # applies. - # @!attribute [rw] currency_code - # @return [::String] - # The CLDR code of the currency to which this service applies. Must match - # that of the prices in rate groups. - # @!attribute [rw] delivery_time - # @return [::Google::Shopping::Merchant::Accounts::V1beta::DeliveryTime] - # Required. Time spent in various aspects from order to the delivery of the - # product. - # @!attribute [rw] rate_groups - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::RateGroup>] - # Optional. Shipping rate group definitions. Only the last one is allowed to - # have an empty `applicable_shipping_labels`, which means "everything else". - # The other `applicable_shipping_labels` must not overlap. - # @!attribute [rw] shipment_type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::ShipmentType] - # Type of locations this service ships orders to. - # @!attribute [rw] minimum_order_value - # @return [::Google::Shopping::Type::Price] - # Minimum order value for this service. If set, indicates that customers - # will have to spend at least this amount. - # All prices within a service must have the same currency. - # Cannot be set together with minimum_order_value_table. - # @!attribute [rw] minimum_order_value_table - # @return [::Google::Shopping::Merchant::Accounts::V1beta::MinimumOrderValueTable] - # Table of per store minimum order values for the pickup fulfillment type. - # Cannot be set together with minimum_order_value. - # @!attribute [rw] store_config - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig] - # A list of stores your products are delivered from. - # This is only valid for the local delivery shipment type. - # @!attribute [rw] loyalty_programs - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Service::LoyaltyProgram>] - # Optional. Loyalty programs that this shipping service is limited to. - class Service - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A list of stores your products are delivered from. - # This is only valid for the local delivery shipment type. - # @!attribute [rw] store_service_type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig::StoreServiceType] - # Indicates whether all stores, or selected stores, listed by this - # merchant provide local delivery. - # @!attribute [rw] store_codes - # @return [::Array<::String>] - # Optional. A list of store codes that provide local delivery. - # If empty, then `all_stores` must be true. - # @!attribute [rw] cutoff_config - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig::CutoffConfig] - # Configs related to local delivery ends for the day. - # @!attribute [rw] service_radius - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Distance] - # Maximum delivery radius. - # This is only required for the local delivery shipment type. - class StoreConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configs related to local delivery ends for the day. - # @!attribute [rw] local_cutoff_time - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig::CutoffConfig::LocalCutoffTime] - # Time that local delivery ends for the day. - # @!attribute [rw] store_close_offset_hours - # @return [::Integer] - # Only valid with local delivery fulfillment. Represents cutoff time - # as the number of hours before store closing. Mutually exclusive - # with `local_cutoff_time`. - # @!attribute [rw] no_delivery_post_cutoff - # @return [::Boolean] - # Merchants can opt-out of showing n+1 day local delivery when they have - # a shipping service configured to n day local delivery. For example, if - # the shipping service defines same-day delivery, and it's past the - # cut-off, setting this field to `true` results in the calculated - # shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the - # same example, setting this field to `false` results in the calculated - # shipping time being one day. This is only for local delivery. - class CutoffConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Time that local delivery ends for the day. - # @!attribute [rw] hour - # @return [::Integer] - # Hour local delivery orders must be placed by to process the same - # day. - # @!attribute [rw] minute - # @return [::Integer] - # Minute local delivery orders must be placed by to process the same - # day. - class LocalCutoffTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Indicates whether all stores, or selected stores, listed by the - # merchant provide local delivery. - module StoreServiceType - # Did not specify store service type. - STORE_SERVICE_TYPE_UNSPECIFIED = 0 - - # Indicates whether all stores, current and future, listed by this - # merchant provide local delivery. - ALL_STORES = 1 - - # Indicates that only the stores listed in `store_codes` are eligible - # for local delivery. - SELECTED_STORES = 2 - end - end - - # [Loyalty program](https://support.google.com/merchants/answer/12922446) - # provided by a merchant. - # @!attribute [rw] program_label - # @return [::String] - # This is the loyalty program label set in your loyalty program settings in - # Merchant Center. This sub-attribute allows Google to map your loyalty - # program to eligible offers. - # @!attribute [rw] loyalty_program_tiers - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Service::LoyaltyProgram::LoyaltyProgramTiers>] - # Optional. Loyalty program tier of this shipping service. - class LoyaltyProgram - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Subset of a merchants loyalty program. - # @!attribute [rw] tier_label - # @return [::String] - # The tier label [tier_label] sub-attribute differentiates offer level - # benefits between each tier. This value is also set in your program - # settings in Merchant Center, and is required for data source changes - # even if your loyalty program only has 1 tier. - class LoyaltyProgramTiers - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Shipment type of shipping service. - module ShipmentType - # This service did not specify shipment type. - SHIPMENT_TYPE_UNSPECIFIED = 0 - - # This service ships orders to an address chosen by the customer. - DELIVERY = 1 - - # This service ships orders to an address chosen by the customer. - # The order is shipped from a local store near by. - LOCAL_DELIVERY = 2 - - # This service ships orders to an address chosen by the customer. - # The order is shipped from a collection point. - COLLECTION_POINT = 3 - end - end - - # Maximum delivery radius. - # This is only required for the local delivery shipment type. - # @!attribute [rw] value - # @return [::Integer] - # Integer value of distance. - # @!attribute [rw] unit - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Distance::Unit] - # Unit can differ based on country, it is parameterized to include miles - # and kilometers. - class Distance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Unit can differ based on country, it is parameterized to include miles - # and kilometers. - module Unit - # Unit unspecified - UNIT_UNSPECIFIED = 0 - - # Unit in miles - MILES = 1 - - # Unit in kilometers - KILOMETERS = 2 - end - end - - # A fulfillment warehouse, which stores and handles inventory. - # Next tag: 7 - # @!attribute [rw] name - # @return [::String] - # Required. The name of the warehouse. Must be unique within account. - # @!attribute [rw] shipping_address - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Address] - # Required. Shipping address of the warehouse. - # @!attribute [rw] cutoff_time - # @return [::Google::Shopping::Merchant::Accounts::V1beta::WarehouseCutoffTime] - # Required. The latest time of day that an order can be accepted and begin - # processing. Later orders will be processed in the next day. The time is - # based on the warehouse postal code. - # @!attribute [rw] handling_days - # @return [::Integer] - # Required. The number of days it takes for this warehouse to pack up and - # ship an item. This is on the warehouse level, but can be overridden on the - # offer level based on the attributes of an item. - # @!attribute [rw] business_day_config - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig] - # Business days of the warehouse. - # If not set, will be Monday to Friday by default. - class Warehouse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The latest time of day that an order can be accepted and begin processing. - # Later orders will be processed in the next day. The time is based on the - # warehouse postal code. - # @!attribute [rw] hour - # @return [::Integer] - # Required. Hour of the cutoff time until which an order has to be placed to - # be processed in the same day by the warehouse. Hour is based on the - # timezone of warehouse. - # @!attribute [rw] minute - # @return [::Integer] - # Required. Minute of the cutoff time until which an order has to be placed - # to be processed in the same day by the warehouse. Minute is based on the - # timezone of warehouse. - class WarehouseCutoffTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Shipping address of the warehouse. - # @!attribute [rw] street_address - # @return [::String] - # Street-level part of the address. For example: `111w 31st Street`. - # @!attribute [rw] city - # @return [::String] - # Required. City, town or commune. May also include dependent localities or - # sublocalities (For example neighborhoods or suburbs). - # @!attribute [rw] administrative_area - # @return [::String] - # Required. Top-level administrative subdivision of the country. For example, - # a state like California ("CA") or a province like Quebec ("QC"). - # @!attribute [rw] postal_code - # @return [::String] - # Required. Postal code or ZIP (For example "94043"). - # @!attribute [rw] region_code - # @return [::String] - # Required. [CLDR country - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # (For example "US"). - class Address - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Time spent in various aspects from order to the delivery of the product. - # @!attribute [rw] min_transit_days - # @return [::Integer] - # Minimum number of business days that is spent in transit. 0 means same - # day delivery, 1 means next day delivery. - # Either `min_transit_days`, `max_transit_days` or - # `transit_time_table` must be set, but not both. - # @!attribute [rw] max_transit_days - # @return [::Integer] - # Maximum number of business days that is spent in transit. 0 means same - # day delivery, 1 means next day delivery. Must be greater than or equal - # to `min_transit_days`. - # @!attribute [rw] cutoff_time - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CutoffTime] - # Business days cutoff time definition. - # If not configured the cutoff time will be defaulted to 8AM PST. - # @!attribute [rw] min_handling_days - # @return [::Integer] - # Minimum number of business days spent before an order is shipped. - # 0 means same day shipped, 1 means next day shipped. - # 'min_handling_days' and 'max_handling_days' should be either set or not set - # at the same time. - # @!attribute [rw] max_handling_days - # @return [::Integer] - # Maximum number of business days spent before an order is shipped. - # 0 means same day shipped, 1 means next day shipped. - # Must be greater than or equal to `min_handling_days`. - # 'min_handling_days' and 'max_handling_days' should be either set or not set - # at the same time. - # @!attribute [rw] transit_time_table - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TransitTable] - # Transit time table, number of business days spent in transit based on row - # and column dimensions. Either `min_transit_days`, `max_transit_days` or - # `transit_time_table` can be set, but not both. - # @!attribute [rw] handling_business_day_config - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig] - # The business days during which orders can be handled. - # If not provided, Monday to Friday business days will be assumed. - # @!attribute [rw] transit_business_day_config - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig] - # The business days during which orders can be in-transit. - # If not provided, Monday to Friday business days will be assumed. - # @!attribute [rw] warehouse_based_delivery_times - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::WarehouseBasedDeliveryTime>] - # Optional. Indicates that the delivery time should be calculated per - # warehouse (shipping origin location) based on the settings of the selected - # carrier. When set, no other transit time related field in [delivery - # time][[google.shopping.content.bundles.ShippingSetting.DeliveryTime] should - # be set. - class DeliveryTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Business days cutoff time definition. - # @!attribute [rw] hour - # @return [::Integer] - # Required. Hour of the cutoff time until which an order has to be placed to - # be processed in the same day. - # @!attribute [rw] minute - # @return [::Integer] - # Required. Minute of the cutoff time until which an order has to be placed - # to be processed in the same day. - # @!attribute [rw] time_zone - # @return [::String] - # Required. [Timezone - # identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids) - # For example "Europe/Zurich". - class CutoffTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Business days of the warehouse. - # @!attribute [rw] business_days - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig::Weekday>] - # Required. Regular business days. - # May not be empty. - class BusinessDayConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - module Weekday - WEEKDAY_UNSPECIFIED = 0 - - MONDAY = 1 - - TUESDAY = 2 - - WEDNESDAY = 3 - - THURSDAY = 4 - - FRIDAY = 5 - - SATURDAY = 6 - - SUNDAY = 7 - end - end - - # Indicates that the delivery time should be calculated per warehouse - # (shipping origin location) based on the settings of the selected carrier. - # When set, no other transit time related field in `delivery_time` should be - # set. - # @!attribute [rw] carrier - # @return [::String] - # Required. Carrier, such as `"UPS"` or `"Fedex"`. - # @!attribute [rw] carrier_service - # @return [::String] - # Required. Carrier service, such as `"ground"` or `"2 days"`. The name of - # the service must be in the eddSupportedServices list. - # @!attribute [rw] warehouse - # @return [::String] - # Required. Warehouse name. This should match - # [warehouse][ShippingSetting.warehouses.name] - class WarehouseBasedDeliveryTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Shipping rate group definitions. Only the last one is allowed to have an - # empty `applicable_shipping_labels`, which means - # "everything else". The other `applicable_shipping_labels` must - # not overlap. - # @!attribute [rw] applicable_shipping_labels - # @return [::Array<::String>] - # Required. A list of [shipping - # labels](https://support.google.com/merchants/answer/6324504) defining the - # products to which this rate group applies to. This is a disjunction: only - # one of the labels has to match for the rate group to apply. May only be - # empty for the last rate group of a service. - # @!attribute [rw] single_value - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Value] - # The value of the rate group (For example flat rate $10). Can only be set - # if `main_table` and `subtables` are not set. - # @!attribute [rw] main_table - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Table] - # A table defining the rate group, when `single_value` is not - # expressive enough. Can only be set if `single_value` is not - # set. - # @!attribute [rw] subtables - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Table>] - # Optional. A list of subtables referred to by `main_table`. Can only - # be set if `main_table` is set. - # @!attribute [rw] carrier_rates - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CarrierRate>] - # Optional. A list of carrier rates that can be referred to by - # `main_table` or `single_value`. - # @!attribute [rw] name - # @return [::String] - # Optional. Name of the rate group. - # If set has to be unique within shipping service. - class RateGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A table defining the rate group, when `single_value` is not - # expressive enough. - # @!attribute [rw] name - # @return [::String] - # Name of the table. Required for subtables, ignored for the main table. - # @!attribute [rw] row_headers - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Headers] - # Required. Headers of the table's rows. - # @!attribute [rw] column_headers - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Headers] - # Headers of the table's columns. Optional: if not set then the table has - # only one dimension. - # @!attribute [rw] rows - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Row>] - # Required. The list of rows that constitute the table. Must have the same - # length as `row_headers`. - class Table - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Transit time table, number of business days spent in transit based on row - # and column dimensions. Either `min_transit_days`, `max_transit_days` or - # `transit_time_table` can be set, but not both. - # @!attribute [rw] postal_code_group_names - # @return [::Array<::String>] - # Required. A list of region names - # {::Google::Shopping::Merchant::Accounts::V1beta::Region#name Region.name} . The - # last value can be - # `"all other locations"`. Example: - # `["zone 1", "zone 2", "all other locations"]`. The referred - # postal code groups must match the delivery country of the service. - # @!attribute [rw] transit_time_labels - # @return [::Array<::String>] - # Required. A list of transit time labels. The last value can be - # `"all other labels"`. Example: - # `["food", "electronics", "all other labels"]`. - # @!attribute [rw] rows - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::TransitTable::TransitTimeRow>] - # Required. If there's only one dimension set of `postal_code_group_names` or - # `transit_time_labels`, there are multiple rows each with one value - # for that dimension. If there are two dimensions, each row corresponds to a - # `postal_code_group_names`, and columns (values) to a - # `transit_time_labels`. - class TransitTable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # If there's only one dimension set of `postal_code_group_names` or - # `transit_time_labels`, there are multiple rows each with one value - # for that dimension. If there are two dimensions, each row corresponds to a - # `postal_code_group_names`, and columns (values) to a - # `transit_time_labels`. - # @!attribute [rw] values - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::TransitTable::TransitTimeRow::TransitTimeValue>] - # Required. Transit time range (min-max) in business days. - class TransitTimeRow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Transit time range (min-max) in business days. - # @!attribute [rw] min_transit_days - # @return [::Integer] - # Minimum transit time range in business days. 0 means same - # day delivery, 1 means next day delivery. - # @!attribute [rw] max_transit_days - # @return [::Integer] - # Must be greater than or equal to `min_transit_days`. - class TransitTimeValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Table of per store minimum order values for the pickup fulfillment type. - # @!attribute [rw] store_code_set_with_movs - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::MinimumOrderValueTable::StoreCodeSetWithMov>] - # Required. A list of store code sets sharing the same minimum order value - # (MOV). At least two sets are required and the last one must be empty, which - # signifies 'MOV for all other stores'. Each store code can only appear once - # across all the sets. All prices within a service must have the same - # currency. - class MinimumOrderValueTable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A list of store code sets sharing the same minimum order value. At least - # two sets are required and the last one must be empty, which signifies - # 'MOV for all other stores'. - # Each store code can only appear once across all the sets. - # All prices within a service must have the same currency. - # @!attribute [rw] store_codes - # @return [::Array<::String>] - # Optional. A list of unique store codes or empty for the catch all. - # @!attribute [rw] value - # @return [::Google::Shopping::Type::Price] - # The minimum order value for the given stores. - class StoreCodeSetWithMov - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A non-empty list of row or column headers for a table. - # Exactly one of `prices`, `weights`, - # `num_items`, `postal_code_group_names`, or - # `location` must be set. - # @!attribute [rw] prices - # @return [::Array<::Google::Shopping::Type::Price>] - # Required. A list of inclusive order price upper bounds. The last price's - # value can be infinity by setting price amount_micros = -1. For example - # `[{"amount_micros": 10000000, "currency_code": "USD"}, - # \\{"amount_micros": 500000000, "currency_code": "USD"}, - # \\{"amount_micros": -1, "currency_code": "USD"}]` represents the headers - # "<= $10", "<= $500", and "> $500". All prices within a service must have - # the same currency. Must be non-empty. Must be positive except -1. Can only - # be set if all other fields are not set. - # @!attribute [rw] weights - # @return [::Array<::Google::Shopping::Type::Weight>] - # Required. A list of inclusive order weight upper bounds. The last weight's - # value can be infinity by setting price amount_micros = -1. For example - # `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, - # "unit": "kg"}, - # \\{"amount_micros": -1, "unit": "kg"}]` represents the headers - # "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have - # the same unit. Must be non-empty. Must be positive except -1. Can only be - # set if all other fields are not set. - # @!attribute [rw] number_of_items - # @return [::Array<::String>] - # Required. A list of inclusive number of items upper bounds. The last value - # can be - # `"infinity"`. For example - # `["10", "50", "infinity"]` represents the headers - # "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can - # only be set if all other fields are not set. - # @!attribute [rw] postal_code_group_names - # @return [::Array<::String>] - # Required. A list of postal group names. The last value can be - # `"all other locations"`. Example: - # `["zone 1", "zone 2", "all other locations"]`. The referred - # postal code groups must match the delivery country of the service. Must - # be non-empty. Can only be set if all other fields are not set. - # @!attribute [rw] locations - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::LocationIdSet>] - # Required. A list of location ID sets. Must be non-empty. Can only be set if - # all other fields are not set. - class Headers - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of location ID sets. Must be non-empty. Can only be set if all - # other fields are not set. - # @!attribute [rw] location_ids - # @return [::Array<::String>] - # Required. A non-empty list of - # [location - # IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). - # They must all be of the same location type (For - # example, state). - class LocationIdSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Include a list of cells. - # @!attribute [rw] cells - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Value>] - # Required. The list of cells that constitute the row. Must have the same - # length as `columnHeaders` for two-dimensional tables, a length of 1 for - # one-dimensional tables. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The single value of a rate group or the value of a rate group table's cell. - # Exactly one of `no_shipping`, `flat_rate`, - # `price_percentage`, `carrier_rateName`, - # `subtable_name` must be set. - # @!attribute [rw] no_shipping - # @return [::Boolean] - # If true, then the product can't be shipped. Must be true when set, can only - # be set if all other fields are not set. - # @!attribute [rw] flat_rate - # @return [::Google::Shopping::Type::Price] - # A flat rate. Can only be set if all other fields are not set. - # @!attribute [rw] price_percentage - # @return [::String] - # A percentage of the price represented as a number in decimal notation - # (For example, `"5.4"`). Can only be set if all other fields are not - # set. - # @!attribute [rw] carrier_rate - # @return [::String] - # The name of a carrier rate referring to a carrier rate defined in the - # same rate group. Can only be set if all other fields are not set. - # @!attribute [rw] subtable - # @return [::String] - # The name of a subtable. Can only be set in table cells (For example, not - # for single values), and only if all other fields are not set. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of carrier rates that can be referred to by - # `main_table` or `single_value`. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the carrier rate. Must be unique per rate group. - # @!attribute [rw] carrier - # @return [::String] - # Required. Carrier service, such as `"UPS"` or `"Fedex"`. - # @!attribute [rw] carrier_service - # @return [::String] - # Required. Carrier service, such as `"ground"` or `"2 days"`. - # @!attribute [rw] origin_postal_code - # @return [::String] - # Required. Shipping origin for this carrier rate. - # @!attribute [rw] percentage_adjustment - # @return [::String] - # Optional. Multiplicative shipping rate modifier as a number in decimal - # notation. Can be negative. For example `"5.4"` increases the rate by 5.4%, - # `"-3"` decreases the rate by 3%. - # @!attribute [rw] flat_adjustment - # @return [::Google::Shopping::Type::Price] - # Optional. Additive shipping rate modifier. Can be negative. For example - # `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate, - # `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the - # rate. - class CarrierRate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetShippingSetting` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the shipping setting to retrieve. - # Format: `accounts/{account}/shippingsetting` - class GetShippingSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertShippingSetting` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account where this product will be inserted. - # Format: accounts/\\{account} - # @!attribute [rw] shipping_setting - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # Required. The new version of the account. - class InsertShippingSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb deleted file mode 100644 index 5cbe635b16ed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb +++ /dev/null @@ -1,96 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Primary type convension - # - # percent micro : 100% = 1 000 000 and 1% = 10 000 - # cannot be negative. - # - # Information about tax nexus and related parameters applicable to orders - # delivered to the area covered by a single tax admin. Nexus is created when a - # merchant is doing business in an area administered by tax admin (only US - # states are supported for nexus configuration). If merchant has nexus in a US - # state, merchant needs to pay tax to all tax authorities associated with - # the shipping destination. - # Next Id : 8 - # @!attribute [rw] location_id - # @return [::Integer] - # The admin_id or criteria_id of the region in which this rule is - # applicable. - # - # Note: The following fields are mutually exclusive: `location_id`, `post_code_range`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] post_code_range - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TaxRule::TaxPostalCodeRange] - # The range of postal codes in which this rule is applicable. - # - # Note: The following fields are mutually exclusive: `post_code_range`, `location_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] use_google_rate - # @return [::Boolean] - # Rate that depends on delivery location: if merchant has a nexus in - # corresponding US state, rates from authorities with jurisdiction over - # delivery area are added up. - # - # Note: The following fields are mutually exclusive: `use_google_rate`, `self_specified_rate_micros`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] self_specified_rate_micros - # @return [::Integer] - # A fixed rate specified in micros, where 100% = 1_000_000. - # Suitable for origin-based states. - # - # Note: The following fields are mutually exclusive: `self_specified_rate_micros`, `use_google_rate`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] region_code - # @return [::String] - # Region code in which this rule is applicable - # @!attribute [rw] shipping_taxed - # @return [::Boolean] - # If set, shipping charge is taxed (at the same rate as product) when - # delivering to this admin's area. - # Can only be set on US states without category. - # @!attribute [rw] effective_time_period - # @return [::Google::Type::Interval] - # Required. Time period when this rule is effective. If the duration is - # missing from effective_time listed, then it is open ended to the future. - # The start of this time period is inclusive, and the end is exclusive. - class TaxRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A range of postal codes that defines the area. - # @!attribute [rw] start - # @return [::String] - # Required. The start of the postal code range, which is also the smallest - # in the range. - # @!attribute [rw] end - # @return [::String] - # The end of the postal code range. Will be the same as start if not - # specified. - class TaxPostalCodeRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb deleted file mode 100644 index 1b414fd1bccf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb +++ /dev/null @@ -1,99 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # A `TermsOfService`. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @!attribute [rw] region_code - # @return [::String] - # Region code as defined by [CLDR](https://cldr.unicode.org/). This is either - # a country where the ToS applies specifically to that country or `001` when - # the same `TermsOfService` can be signed in any country. However note that - # when signing a ToS that applies globally we still expect that a specific - # country is provided (this should be merchant business country or program - # country of participation). - # @!attribute [rw] kind - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] - # The Kind this terms of service version applies to. - # @!attribute [rw] file_uri - # @return [::String] - # URI for terms of service file that needs to be displayed to signing users. - # @!attribute [rw] external - # @return [::Boolean] - # Whether this terms of service version is external. External terms of - # service versions can only be agreed through external processes and not - # directly by the merchant through UI or API. - class TermsOfService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetTermsOfService` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - class GetTermsOfServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `RetrieveLatestTermsOfService` method. - # @!attribute [rw] region_code - # @return [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # @!attribute [rw] kind - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] - # Required. The Kind this terms of service version applies to. - class RetrieveLatestTermsOfServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `AcceptTermsOfService` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @!attribute [rw] account - # @return [::String] - # Required. The account for which to accept the ToS. - # @!attribute [rw] region_code - # @return [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - class AcceptTermsOfServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb deleted file mode 100644 index 0390b017c401..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.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 Shopping - module Merchant - module Accounts - module V1beta - # This resource represents the agreement state for a given account and terms of - # service kind. - # The state is as follows: - # - # * If the merchant has accepted a terms of service: - # [accepted](TermsOfServiceAggrementState.accepted) will be populated, - # otherwise it will be empty - # * If the merchant must sign a terms of service: - # [required](TermsOfServiceAggrementState.required) will be populated, - # otherwise it will be empty. - # - # Note that both [required](TermsOfServiceAggrementState.required) and - # [accepted](TermsOfServiceAggrementState.accepted) can be present. In this - # case the `accepted` terms of services will have an expiration date set in the - # [valid_until](Accepted.valid_until) field. The `required` terms of services - # need to be accepted before `valid_until` in order for the account to continue - # having a valid agreement. When accepting new terms of services we expect 3Ps - # to display the text associated with the given terms of service agreement (the - # url to the file containing the text is added in the Required message below as - # [tos_file_uri](Accepted.tos_file_uri). The actual acceptance of the terms of - # service is done by calling accept on the [TermsOfService](TermsOfService) - # resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the terms of service version. - # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` - # The identifier format is: `{TermsOfServiceKind}-{country}` - # For example, an identifier could be: `MERCHANT_CENTER-US` - # @!attribute [rw] region_code - # @return [::String] - # Region code as defined by https://cldr.unicode.org/. This is the - # country the current state applies to. - # @!attribute [rw] terms_of_service_kind - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] - # Terms of Service kind associated with the particular version. - # @!attribute [rw] accepted - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Accepted] - # The accepted terms of service of this kind and for the associated - # region_code - # @!attribute [rw] required - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Required] - # The required terms of service - class TermsOfServiceAgreementState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the accepted terms of service. - # @!attribute [rw] terms_of_service - # @return [::String] - # The accepted - # [termsOfService](google.shopping.merchant.accounts.v1main.TermsOfService). - # @!attribute [rw] accepted_by - # @return [::String] - # The account where the acceptance was recorded. This can be the account - # itself or, in the case of subaccounts, the MCA account. - # @!attribute [rw] valid_until - # @return [::Google::Type::Date] - # When set, it states that the accepted - # [TermsOfService](google.shopping.merchant.accounts.v1main.TermsOfService) - # is only valid until the end of this date (in UTC). A new one must be - # accepted before then. The information of the required - # [TermsOfService](google.shopping.merchant.accounts.v1main.TermsOfService) - # is found in the [Required](Required) message. - class Accepted - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the terms of service which are required to be accepted. - # @!attribute [rw] terms_of_service - # @return [::String] - # The - # [termsOfService](google.shopping.merchant.accounts.v1main.TermsOfService) - # that need to be accepted. - # @!attribute [rw] tos_file_uri - # @return [::String] - # Full URL to the terms of service file. This field is the same as - # [TermsOfService.file_uri](TermsOfService.file_uri), it is added - # here for convenience only. - class Required - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetTermsOfServiceAgreementState` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the terms of service version. - # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` - # The identifier format is: `{TermsOfServiceKind}-{country}` - class GetTermsOfServiceAgreementStateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `RetrieveForApplicationTermsOfServiceAgreementState` - # method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account for which to get a TermsOfServiceAgreementState - # Format: `accounts/{account}` - class RetrieveForApplicationTermsOfServiceAgreementStateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb deleted file mode 100644 index 636da0a3420a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # The TermsOfService Kind. - module TermsOfServiceKind - # Default value. This value is unused. - TERMS_OF_SERVICE_KIND_UNSPECIFIED = 0 - - # Merchant Center application. - MERCHANT_CENTER = 1 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb deleted file mode 100644 index 549b2ff4eff2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb +++ /dev/null @@ -1,156 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # A [user](https://support.google.com/merchants/answer/12160472). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the user. - # Format: `accounts/{account}/user/{email}` - # - # Use `me` to refer to your own email address, for example - # `accounts/{account}/users/me`. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User::State] - # Output only. The state of the user. - # @!attribute [rw] access_rights - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccessRight>] - # Optional. The [access - # rights](https://support.google.com/merchants/answer/12160472?sjid=6789834943175119429-EU#accesstypes) - # the user has. - class User - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible states of a user. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The user is pending confirmation. In this state, the user first needs to - # accept the invitation before performing other actions. - PENDING = 1 - - # The user is verified. - VERIFIED = 2 - end - end - - # Request message for the `GetUser` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the user to retrieve. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to retrieve the user corresponding to the caller by - # using `me` rather than an email address as in - # `accounts/{account}/users/me`. - class GetUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateUser` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the account for which a user will be - # created. Format: `accounts/{account}` - # @!attribute [rw] user_id - # @return [::String] - # Required. The email address of the user (for example, - # `john.doe@gmail.com`). - # @!attribute [rw] user - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # Required. The user to create. - class CreateUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteUser` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the user to delete. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to delete the user corresponding to the caller by using - # `me` rather than an email address as in `accounts/{account}/users/me`. - class DeleteUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateUser` method. - # @!attribute [rw] user - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # Required. The new version of the user. - # - # Use `me` to refer to your own email address, for example - # `accounts/{account}/users/me`. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListUsers` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of users. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of users to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListUsers` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListUsers` must match - # the call that provided the page token. - class ListUsersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListUsers` method. - # @!attribute [rw] users - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::User>] - # The users from the specified account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListUsersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb deleted file mode 100644 index 50aab1617c36..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Settings related to the verification email that is sent after adding a user. - # @!attribute [rw] verification_mail_mode - # @return [::Google::Shopping::Merchant::Accounts::V1beta::VerificationMailSettings::VerificationMailMode] - # Optional. Mode of the verification mail. If not set, the default is - # `SEND_VERIFICATION_MAIL`. - class VerificationMailSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The different configuration options for sending a verification email - # when adding a user. - module VerificationMailMode - # Default first member of every enum. Do not use. - VERIFICATION_MAIL_MODE_UNSPECIFIED = 0 - - # An invitation email is sent to the user added shortly after. - SEND_VERIFICATION_MAIL = 1 - - # No invitation email is sent. This can be useful if the user is - # expected to accept the invitation through the API without needing - # another notification. - SUPPRESS_VERIFICATION_MAIL = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.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! - - -module Google - module Shopping - module Type - # The weight represented as the value in string and the unit. - # @!attribute [rw] amount_micros - # @return [::Integer] - # Required. The weight represented as a number in micros (1 million micros is - # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 - # micros). - # This field can also be set as infinity by setting to -1. - # This field only support -1 and positive value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Type::Weight::WeightUnit] - # Required. The weight unit. - # Acceptable values are: kg and lb - class Weight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The weight unit. - module WeightUnit - # unit unspecified - WEIGHT_UNIT_UNSPECIFIED = 0 - - # lb unit. - POUND = 1 - - # kg unit. - KILOGRAM = 2 - end - end - - # The price represented as a number and currency. - # @!attribute [rw] amount_micros - # @return [::Integer] - # The price represented as a number in micros (1 million micros is an - # equivalent to one's currency standard unit, for example, 1 USD = 1000000 - # micros). - # @!attribute [rw] currency_code - # @return [::String] - # The currency of the price using three-letter acronyms according to [ISO - # 4217](http://en.wikipedia.org/wiki/ISO_4217). - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents custom attributes. Exactly one of `value` or - # `group_values` must not be empty. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute. - # @!attribute [rw] value - # @return [::String] - # The value of the attribute. If `value` is not empty, `group_values` must be - # empty. - # @!attribute [rw] group_values - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Subattributes within this attribute group. If - # `group_values` is not empty, `value` must be empty. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations available for a product. - # - # Destinations are used in Merchant Center to allow you to control where the - # products from your data feed should be displayed. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Destination values. - module DestinationEnum - # Not specified. - DESTINATION_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/google-ads/answer/2454022). - SHOPPING_ADS = 1 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 2 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3057972). - LOCAL_INVENTORY_ADS = 3 - - # [Free listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 4 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 5 - - # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). - YOUTUBE_SHOPPING = 6 - - # Youtube shopping checkout. - YOUTUBE_SHOPPING_CHECKOUT = 7 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 8 - - # [Free vehicle - # listings](https://support.google.com/merchants/answer/11189169). - FREE_VEHICLE_LISTINGS = 9 - - # [Vehicle ads](https://support.google.com/merchants/answer/11189169). - VEHICLE_ADS = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - end - end - - # Reporting contexts that your account and product issues apply to. - # - # Reporting contexts are groups of surfaces and formats for product results on - # Google. They can represent the entire destination (for example, [Shopping - # ads](https://support.google.com/merchants/answer/6149970)) or a subset of - # formats within a destination (for example, [Demand Gen - # ads](https://support.google.com/merchants/answer/13389785)). - class ReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reporting context values. - module ReportingContextEnum - # Not specified. - REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/merchants/answer/6149970). - SHOPPING_ADS = 1 - - # Deprecated: Use `DEMAND_GEN_ADS` instead. - # [Discovery and Demand Gen - # ads](https://support.google.com/merchants/answer/13389785). - DISCOVERY_ADS = 2 - - # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS = 13 - - # [Demand Gen ads on Discover - # surface](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 - - # [Video ads](https://support.google.com/google-ads/answer/6340491). - VIDEO_ADS = 3 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 4 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3271956). - LOCAL_INVENTORY_ADS = 5 - - # [Vehicle inventory - # ads](https://support.google.com/merchants/answer/11544533). - VEHICLE_INVENTORY_ADS = 6 - - # [Free product - # listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 7 - - # [Free product listings on UCP - # checkout](https://developers.google.com/merchant/ucp). - FREE_LISTINGS_UCP_CHECKOUT = 19 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 8 - - # [Free local vehicle - # listings](https://support.google.com/merchants/answer/11544533). - FREE_LOCAL_VEHICLE_LISTINGS = 9 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 18 - - # [YouTube - # Shopping](https://support.google.com/merchants/answer/13478370). - YOUTUBE_SHOPPING = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - - # [Product - # Reviews](https://support.google.com/merchants/answer/14620732). - PRODUCT_REVIEWS = 15 - - # [Merchant - # Reviews](https://developers.google.com/merchant-review-feeds). - MERCHANT_REVIEWS = 16 - - # YouTube Checkout - # . - YOUTUBE_CHECKOUT = 17 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb deleted file mode 100644 index 1d0a9780457f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a whole or partial calendar date, such as a birthday. The time of - # day and time zone are either specified elsewhere or are insignificant. The - # date is relative to the Gregorian Calendar. This can represent one of the - # following: - # - # * A full date, with non-zero year, month, and day values - # * A month and day value, with a zero year, such as an anniversary - # * A year on its own, with zero month and day values - # * A year and month value, with a zero day, such as a credit card expiration - # date - # - # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and - # `google.protobuf.Timestamp`. - # @!attribute [rw] year - # @return [::Integer] - # Year of the date. Must be from 1 to 9999, or 0 to specify a date without - # a year. - # @!attribute [rw] month - # @return [::Integer] - # Month of a year. Must be from 1 to 12, or 0 to specify a year without a - # month and day. - # @!attribute [rw] day - # @return [::Integer] - # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 - # to specify a year by itself or a year and month where the day isn't - # significant. - class Date - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb deleted file mode 100644 index d15ba7af54e4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb deleted file mode 100644 index 9350ca479005..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a time interval, encoded as a Timestamp start (inclusive) and a - # Timestamp end (exclusive). - # - # The start must be less than or equal to the end. - # When the start equals the end, the interval is empty (matches no time). - # When both start and end are unspecified, the interval matches any time. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Inclusive start of the interval. - # - # If specified, a Timestamp matching this interval will have to be the same - # or after the start. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Exclusive end of the interval. - # - # If specified, a Timestamp matching this interval will have to be before the - # end. - class Interval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb deleted file mode 100644 index 41b7c4af138c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb +++ /dev/null @@ -1,116 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 representing a phone number, suitable as an API wire format. - # - # This representation: - # - # - should not be used for locale-specific formatting of a phone number, such - # as "+1 (650) 253-0000 ext. 123" - # - # - is not designed for efficient storage - # - may not be suitable for dialing - specialized libraries (see references) - # should be used to parse the number for that purpose - # - # To do something meaningful with this number, such as format it for various - # use-cases, convert it to an `i18n.phonenumbers.PhoneNumber` object first. - # - # For instance, in Java this would be: - # - # com.google.type.PhoneNumber wireProto = - # com.google.type.PhoneNumber.newBuilder().build(); - # com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber = - # PhoneNumberUtil.getInstance().parse(wireProto.getE164Number(), "ZZ"); - # if (!wireProto.getExtension().isEmpty()) { - # phoneNumber.setExtension(wireProto.getExtension()); - # } - # - # Reference(s): - # - https://github.com/google/libphonenumber - # @!attribute [rw] e164_number - # @return [::String] - # The phone number, represented as a leading plus sign ('+'), followed by a - # phone number that uses a relaxed ITU E.164 format consisting of the - # country calling code (1 to 3 digits) and the subscriber number, with no - # additional spaces or formatting, e.g.: - # - correct: "+15552220123" - # - incorrect: "+1 (555) 222-01234 x123". - # - # The ITU E.164 format limits the latter to 12 digits, but in practice not - # all countries respect that, so we relax that restriction here. - # National-only numbers are not allowed. - # - # References: - # - https://www.itu.int/rec/T-REC-E.164-201011-I - # - https://en.wikipedia.org/wiki/E.164. - # - https://en.wikipedia.org/wiki/List_of_country_calling_codes - # - # Note: The following fields are mutually exclusive: `e164_number`, `short_code`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] short_code - # @return [::Google::Type::PhoneNumber::ShortCode] - # A short code. - # - # Reference(s): - # - https://en.wikipedia.org/wiki/Short_code - # - # Note: The following fields are mutually exclusive: `short_code`, `e164_number`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] extension - # @return [::String] - # The phone number's extension. The extension is not standardized in ITU - # recommendations, except for being defined as a series of numbers with a - # maximum length of 40 digits. Other than digits, some other dialing - # characters such as ',' (indicating a wait) or '#' may be stored here. - # - # Note that no regions currently use extensions with short codes, so this - # field is normally only set in conjunction with an E.164 number. It is held - # separately from the E.164 number to allow for short code extensions in the - # future. - class PhoneNumber - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An object representing a short code, which is a phone number that is - # typically much shorter than regular phone numbers and can be used to - # address messages in MMS and SMS systems, as well as for abbreviated dialing - # (e.g. "Text 611 to see how many minutes you have remaining on your plan."). - # - # Short codes are restricted to a region and are not internationally - # dialable, which means the same short code can exist in different regions, - # with different usage and pricing, even if those regions share the same - # country calling code (e.g. US and CA). - # @!attribute [rw] region_code - # @return [::String] - # Required. The BCP-47 region code of the location where calls to this - # short code can be made, such as "US" and "BB". - # - # Reference(s): - # - http://www.unicode.org/reports/tr35/#unicode_region_subtag - # @!attribute [rw] number - # @return [::String] - # Required. The short code digits, without a leading plus ('+') or country - # calling code, e.g. "611". - class ShortCode - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb deleted file mode 100644 index 9cd0c16495dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/Gemfile deleted file mode 100644 index 1661c67a33c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-accounts-v1beta", path: "../" -else - gem "google-shopping-merchant-accounts-v1beta" -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-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb deleted file mode 100644 index d2c2f5b7044e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.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 merchantapi_v1beta_generated_AccountIssueService_ListAccountIssues_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_account_issues call in the AccountIssueService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client#list_account_issues. -# -def list_account_issues - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new - - # Call the list_account_issues method. - result = client.list_account_issues request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue. - p item - end -end -# [END merchantapi_v1beta_generated_AccountIssueService_ListAccountIssues_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb deleted file mode 100644 index a6ee5c5ad6a3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountTaxService_GetAccountTax_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_account_tax call in the AccountTaxService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#get_account_tax. -# -def get_account_tax - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new - - # Call the get_account_tax method. - result = client.get_account_tax request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - p result -end -# [END merchantapi_v1beta_generated_AccountTaxService_GetAccountTax_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb deleted file mode 100644 index 05f1f64c9431..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.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 merchantapi_v1beta_generated_AccountTaxService_ListAccountTax_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_account_tax call in the AccountTaxService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#list_account_tax. -# -def list_account_tax - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new - - # Call the list_account_tax method. - result = client.list_account_tax request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - p item - end -end -# [END merchantapi_v1beta_generated_AccountTaxService_ListAccountTax_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb deleted file mode 100644 index eac84cb07759..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountTaxService_UpdateAccountTax_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_account_tax call in the AccountTaxService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#update_account_tax. -# -def update_account_tax - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new - - # Call the update_account_tax method. - result = client.update_account_tax request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - p result -end -# [END merchantapi_v1beta_generated_AccountTaxService_UpdateAccountTax_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb deleted file mode 100644 index c4b1730282e8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountsService_CreateAndConfigureAccount_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_and_configure_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#create_and_configure_account. -# -def create_and_configure_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new - - # Call the create_and_configure_account method. - result = client.create_and_configure_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - p result -end -# [END merchantapi_v1beta_generated_AccountsService_CreateAndConfigureAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb deleted file mode 100644 index be1e82db0406..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountsService_DeleteAccount_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the delete_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#delete_account. -# -def delete_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new - - # Call the delete_account method. - result = client.delete_account request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_AccountsService_DeleteAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb deleted file mode 100644 index ce0c105100dc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountsService_GetAccount_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#get_account. -# -def get_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new - - # Call the get_account method. - result = client.get_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - p result -end -# [END merchantapi_v1beta_generated_AccountsService_GetAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb deleted file mode 100644 index 507751cb8634..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.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 merchantapi_v1beta_generated_AccountsService_ListAccounts_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_accounts call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_accounts. -# -def list_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new - - # Call the list_accounts method. - result = client.list_accounts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - p item - end -end -# [END merchantapi_v1beta_generated_AccountsService_ListAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb deleted file mode 100644 index 8db5c917e70c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.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 merchantapi_v1beta_generated_AccountsService_ListSubAccounts_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_sub_accounts call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_sub_accounts. -# -def list_sub_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new - - # Call the list_sub_accounts method. - result = client.list_sub_accounts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - p item - end -end -# [END merchantapi_v1beta_generated_AccountsService_ListSubAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb deleted file mode 100644 index d17466b32f14..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountsService_UpdateAccount_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#update_account. -# -def update_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new - - # Call the update_account method. - result = client.update_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - p result -end -# [END merchantapi_v1beta_generated_AccountsService_UpdateAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb deleted file mode 100644 index 74c288fe1afe..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AutofeedSettingsService_GetAutofeedSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_autofeed_settings call in the AutofeedSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#get_autofeed_settings. -# -def get_autofeed_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new - - # Call the get_autofeed_settings method. - result = client.get_autofeed_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - p result -end -# [END merchantapi_v1beta_generated_AutofeedSettingsService_GetAutofeedSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb deleted file mode 100644 index fdcde06c5e91..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_autofeed_settings call in the AutofeedSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#update_autofeed_settings. -# -def update_autofeed_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new - - # Call the update_autofeed_settings method. - result = client.update_autofeed_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - p result -end -# [END merchantapi_v1beta_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb deleted file mode 100644 index aae1e325fdef..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_automatic_improvements call in the AutomaticImprovementsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#get_automatic_improvements. -# -def get_automatic_improvements - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new - - # Call the get_automatic_improvements method. - result = client.get_automatic_improvements request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - p result -end -# [END merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb deleted file mode 100644 index 846c9557c5b8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_automatic_improvements call in the AutomaticImprovementsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#update_automatic_improvements. -# -def update_automatic_improvements - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new - - # Call the update_automatic_improvements method. - result = client.update_automatic_improvements request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - p result -end -# [END merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb deleted file mode 100644 index b23cc7bee95a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_BusinessIdentityService_GetBusinessIdentity_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_business_identity call in the BusinessIdentityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#get_business_identity. -# -def get_business_identity - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new - - # Call the get_business_identity method. - result = client.get_business_identity request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - p result -end -# [END merchantapi_v1beta_generated_BusinessIdentityService_GetBusinessIdentity_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb deleted file mode 100644 index b6b4835aabd4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_BusinessIdentityService_UpdateBusinessIdentity_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_business_identity call in the BusinessIdentityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#update_business_identity. -# -def update_business_identity - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new - - # Call the update_business_identity method. - result = client.update_business_identity request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - p result -end -# [END merchantapi_v1beta_generated_BusinessIdentityService_UpdateBusinessIdentity_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb deleted file mode 100644 index 7c8d4345e227..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_BusinessInfoService_GetBusinessInfo_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_business_info call in the BusinessInfoService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#get_business_info. -# -def get_business_info - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new - - # Call the get_business_info method. - result = client.get_business_info request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - p result -end -# [END merchantapi_v1beta_generated_BusinessInfoService_GetBusinessInfo_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb deleted file mode 100644 index cd34a45a3abd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_BusinessInfoService_UpdateBusinessInfo_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_business_info call in the BusinessInfoService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#update_business_info. -# -def update_business_info - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new - - # Call the update_business_info method. - result = client.update_business_info request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - p result -end -# [END merchantapi_v1beta_generated_BusinessInfoService_UpdateBusinessInfo_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb deleted file mode 100644 index ea2f979f5cd7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_checkout_settings call in the CheckoutSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings. -# -def create_checkout_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new - - # Call the create_checkout_settings method. - result = client.create_checkout_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - p result -end -# [END merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb deleted file mode 100644 index b7b8c95e0bf3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the delete_checkout_settings call in the CheckoutSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings. -# -def delete_checkout_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new - - # Call the delete_checkout_settings method. - result = client.delete_checkout_settings request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb deleted file mode 100644 index c7b80b5590d4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_checkout_settings call in the CheckoutSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings. -# -def get_checkout_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new - - # Call the get_checkout_settings method. - result = client.get_checkout_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - p result -end -# [END merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb deleted file mode 100644 index 4bdc2f2116dc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_checkout_settings call in the CheckoutSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings. -# -def update_checkout_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new - - # Call the update_checkout_settings method. - result = client.update_checkout_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - p result -end -# [END merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb deleted file mode 100644 index f1cfbb47c184..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_EmailPreferencesService_GetEmailPreferences_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_email_preferences call in the EmailPreferencesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#get_email_preferences. -# -def get_email_preferences - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new - - # Call the get_email_preferences method. - result = client.get_email_preferences request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - p result -end -# [END merchantapi_v1beta_generated_EmailPreferencesService_GetEmailPreferences_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb deleted file mode 100644 index efce339f0560..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_EmailPreferencesService_UpdateEmailPreferences_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_email_preferences call in the EmailPreferencesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#update_email_preferences. -# -def update_email_preferences - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new - - # Call the update_email_preferences method. - result = client.update_email_preferences request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - p result -end -# [END merchantapi_v1beta_generated_EmailPreferencesService_UpdateEmailPreferences_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb deleted file mode 100644 index cb5845dd1e9e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_GbpAccountsService_LinkGbpAccount_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the link_gbp_account call in the GbpAccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#link_gbp_account. -# -def link_gbp_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new - - # Call the link_gbp_account method. - result = client.link_gbp_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse. - p result -end -# [END merchantapi_v1beta_generated_GbpAccountsService_LinkGbpAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb deleted file mode 100644 index db5611b0eb27..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.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 merchantapi_v1beta_generated_GbpAccountsService_ListGbpAccounts_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_gbp_accounts call in the GbpAccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#list_gbp_accounts. -# -def list_gbp_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new - - # Call the list_gbp_accounts method. - result = client.list_gbp_accounts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount. - p item - end -end -# [END merchantapi_v1beta_generated_GbpAccountsService_ListGbpAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb deleted file mode 100644 index 5d6017d56856..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_HomepageService_ClaimHomepage_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the claim_homepage call in the HomepageService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#claim_homepage. -# -def claim_homepage - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new - - # Call the claim_homepage method. - result = client.claim_homepage request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - p result -end -# [END merchantapi_v1beta_generated_HomepageService_ClaimHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb deleted file mode 100644 index b371da4cfb57..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_HomepageService_GetHomepage_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_homepage call in the HomepageService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#get_homepage. -# -def get_homepage - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new - - # Call the get_homepage method. - result = client.get_homepage request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - p result -end -# [END merchantapi_v1beta_generated_HomepageService_GetHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb deleted file mode 100644 index 7119627b9aeb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_HomepageService_UnclaimHomepage_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the unclaim_homepage call in the HomepageService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#unclaim_homepage. -# -def unclaim_homepage - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new - - # Call the unclaim_homepage method. - result = client.unclaim_homepage request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - p result -end -# [END merchantapi_v1beta_generated_HomepageService_UnclaimHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb deleted file mode 100644 index 19c3e42071a9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_HomepageService_UpdateHomepage_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_homepage call in the HomepageService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#update_homepage. -# -def update_homepage - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new - - # Call the update_homepage method. - result = client.update_homepage request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - p result -end -# [END merchantapi_v1beta_generated_HomepageService_UpdateHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb deleted file mode 100644 index e093657726da..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpProvidersService_FindLfpProviders_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the find_lfp_providers call in the LfpProvidersService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#find_lfp_providers. -# -def find_lfp_providers - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new - - # Call the find_lfp_providers method. - result = client.find_lfp_providers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider. - p item - end -end -# [END merchantapi_v1beta_generated_LfpProvidersService_FindLfpProviders_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb deleted file mode 100644 index 0e786754f919..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpProvidersService_LinkLfpProvider_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the link_lfp_provider call in the LfpProvidersService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#link_lfp_provider. -# -def link_lfp_provider - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new - - # Call the link_lfp_provider method. - result = client.link_lfp_provider request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse. - p result -end -# [END merchantapi_v1beta_generated_LfpProvidersService_LinkLfpProvider_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb deleted file mode 100644 index 925b54971955..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_omnichannel_setting call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#create_omnichannel_setting. -# -def create_omnichannel_setting - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new - - # Call the create_omnichannel_setting method. - result = client.create_omnichannel_setting request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - p result -end -# [END merchantapi_v1beta_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb deleted file mode 100644 index f41ee01542d3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_omnichannel_setting call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#get_omnichannel_setting. -# -def get_omnichannel_setting - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new - - # Call the get_omnichannel_setting method. - result = client.get_omnichannel_setting request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - p result -end -# [END merchantapi_v1beta_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb deleted file mode 100644 index 3b764f8ff84d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.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 merchantapi_v1beta_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_omnichannel_settings call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#list_omnichannel_settings. -# -def list_omnichannel_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new - - # Call the list_omnichannel_settings method. - result = client.list_omnichannel_settings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - p item - end -end -# [END merchantapi_v1beta_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb deleted file mode 100644 index 61b421be1805..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OmnichannelSettingsService_RequestInventoryVerification_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the request_inventory_verification call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#request_inventory_verification. -# -def request_inventory_verification - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new - - # Call the request_inventory_verification method. - result = client.request_inventory_verification request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse. - p result -end -# [END merchantapi_v1beta_generated_OmnichannelSettingsService_RequestInventoryVerification_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb deleted file mode 100644 index c9ab04368e53..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_omnichannel_setting call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#update_omnichannel_setting. -# -def update_omnichannel_setting - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new - - # Call the update_omnichannel_setting method. - result = client.update_omnichannel_setting request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - p result -end -# [END merchantapi_v1beta_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb deleted file mode 100644 index 83bc00b2c1df..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_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 merchantapi_v1beta_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_online_return_policy call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#create_online_return_policy. -# -def create_online_return_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new - - # Call the create_online_return_policy method. - result = client.create_online_return_policy request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - p result -end -# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb deleted file mode 100644 index 642b3bdcdc00..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_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 merchantapi_v1beta_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the delete_online_return_policy call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#delete_online_return_policy. -# -def delete_online_return_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new - - # Call the delete_online_return_policy method. - result = client.delete_online_return_policy request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb deleted file mode 100644 index 2105a2c947a5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_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 merchantapi_v1beta_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_online_return_policy call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#get_online_return_policy. -# -def get_online_return_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new - - # Call the get_online_return_policy method. - result = client.get_online_return_policy request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - p result -end -# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb deleted file mode 100644 index f9a0b2b0a844..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.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 merchantapi_v1beta_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_online_return_policies call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#list_online_return_policies. -# -def list_online_return_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new - - # Call the list_online_return_policies method. - result = client.list_online_return_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - p item - end -end -# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb deleted file mode 100644 index 4034ff554461..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_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 merchantapi_v1beta_generated_OnlineReturnPolicyService_UpdateOnlineReturnPolicy_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_online_return_policy call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#update_online_return_policy. -# -def update_online_return_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new - - # Call the update_online_return_policy method. - result = client.update_online_return_policy request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - p result -end -# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_UpdateOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb deleted file mode 100644 index 775a998697dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ProgramsService_DisableProgram_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the disable_program call in the ProgramsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#disable_program. -# -def disable_program - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new - - # Call the disable_program method. - result = client.disable_program request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - p result -end -# [END merchantapi_v1beta_generated_ProgramsService_DisableProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb deleted file mode 100644 index d1bdf22bfbc7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ProgramsService_EnableProgram_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the enable_program call in the ProgramsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#enable_program. -# -def enable_program - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new - - # Call the enable_program method. - result = client.enable_program request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - p result -end -# [END merchantapi_v1beta_generated_ProgramsService_EnableProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb deleted file mode 100644 index ca8e55bfb1f4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ProgramsService_GetProgram_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_program call in the ProgramsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#get_program. -# -def get_program - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new - - # Call the get_program method. - result = client.get_program request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - p result -end -# [END merchantapi_v1beta_generated_ProgramsService_GetProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb deleted file mode 100644 index f3249c03a812..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.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 merchantapi_v1beta_generated_ProgramsService_ListPrograms_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_programs call in the ProgramsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#list_programs. -# -def list_programs - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new - - # Call the list_programs method. - result = client.list_programs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Program. - p item - end -end -# [END merchantapi_v1beta_generated_ProgramsService_ListPrograms_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb deleted file mode 100644 index 8b0ad849b120..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionsService_CreateRegion_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_region call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#create_region. -# -def create_region - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new - - # Call the create_region method. - result = client.create_region request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - p result -end -# [END merchantapi_v1beta_generated_RegionsService_CreateRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb deleted file mode 100644 index 97ee0432dab6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionsService_DeleteRegion_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the delete_region call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#delete_region. -# -def delete_region - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new - - # Call the delete_region method. - result = client.delete_region request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_RegionsService_DeleteRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb deleted file mode 100644 index 6929030f8c97..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionsService_GetRegion_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_region call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#get_region. -# -def get_region - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new - - # Call the get_region method. - result = client.get_region request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - p result -end -# [END merchantapi_v1beta_generated_RegionsService_GetRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb deleted file mode 100644 index 390e2d0f9420..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.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 merchantapi_v1beta_generated_RegionsService_ListRegions_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_regions call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#list_regions. -# -def list_regions - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new - - # Call the list_regions method. - result = client.list_regions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Region. - p item - end -end -# [END merchantapi_v1beta_generated_RegionsService_ListRegions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb deleted file mode 100644 index ef1e556cc578..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionsService_UpdateRegion_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_region call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#update_region. -# -def update_region - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new - - # Call the update_region method. - result = client.update_region request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - p result -end -# [END merchantapi_v1beta_generated_RegionsService_UpdateRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb deleted file mode 100644 index e6cbd703b4dc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ShippingSettingsService_GetShippingSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_shipping_settings call in the ShippingSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#get_shipping_settings. -# -def get_shipping_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new - - # Call the get_shipping_settings method. - result = client.get_shipping_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - p result -end -# [END merchantapi_v1beta_generated_ShippingSettingsService_GetShippingSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb deleted file mode 100644 index 592e8881b30b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ShippingSettingsService_InsertShippingSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the insert_shipping_settings call in the ShippingSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#insert_shipping_settings. -# -def insert_shipping_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new - - # Call the insert_shipping_settings method. - result = client.insert_shipping_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - p result -end -# [END merchantapi_v1beta_generated_ShippingSettingsService_InsertShippingSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json deleted file mode 100644 index 519af736323e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json +++ /dev/null @@ -1,2535 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-accounts-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.accounts.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_AccountTaxService_GetAccountTax_sync", - "title": "Snippet for the get_account_tax call in the AccountTaxService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#get_account_tax.", - "file": "account_tax_service/get_account_tax.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_account_tax", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#get_account_tax", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTax", - "client": { - "short_name": "AccountTaxService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client" - }, - "method": { - "short_name": "GetAccountTax", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService.GetAccountTax", - "service": { - "short_name": "AccountTaxService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountTaxService_ListAccountTax_sync", - "title": "Snippet for the list_account_tax call in the AccountTaxService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#list_account_tax.", - "file": "account_tax_service/list_account_tax.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_account_tax", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#list_account_tax", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse", - "client": { - "short_name": "AccountTaxService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client" - }, - "method": { - "short_name": "ListAccountTax", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService.ListAccountTax", - "service": { - "short_name": "AccountTaxService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountTaxService_UpdateAccountTax_sync", - "title": "Snippet for the update_account_tax call in the AccountTaxService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#update_account_tax.", - "file": "account_tax_service/update_account_tax.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_account_tax", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#update_account_tax", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTax", - "client": { - "short_name": "AccountTaxService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client" - }, - "method": { - "short_name": "UpdateAccountTax", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService.UpdateAccountTax", - "service": { - "short_name": "AccountTaxService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountIssueService_ListAccountIssues_sync", - "title": "Snippet for the list_account_issues call in the AccountIssueService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client#list_account_issues.", - "file": "account_issue_service/list_account_issues.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_account_issues", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client#list_account_issues", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse", - "client": { - "short_name": "AccountIssueService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client" - }, - "method": { - "short_name": "ListAccountIssues", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountIssueService.ListAccountIssues", - "service": { - "short_name": "AccountIssueService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountIssueService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_UserService_GetUser_sync", - "title": "Snippet for the get_user call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#get_user.", - "file": "user_service/get_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_user", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#get_user", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::User", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" - }, - "method": { - "short_name": "GetUser", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService.GetUser", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_UserService_CreateUser_sync", - "title": "Snippet for the create_user call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#create_user.", - "file": "user_service/create_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_user", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#create_user", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::User", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" - }, - "method": { - "short_name": "CreateUser", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService.CreateUser", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_UserService_DeleteUser_sync", - "title": "Snippet for the delete_user call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#delete_user.", - "file": "user_service/delete_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_user", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#delete_user", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" - }, - "method": { - "short_name": "DeleteUser", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService.DeleteUser", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_UserService_UpdateUser_sync", - "title": "Snippet for the update_user call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#update_user.", - "file": "user_service/update_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_user", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#update_user", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::User", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" - }, - "method": { - "short_name": "UpdateUser", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService.UpdateUser", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_UserService_ListUsers_sync", - "title": "Snippet for the list_users call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#list_users.", - "file": "user_service/list_users.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_users", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#list_users", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" - }, - "method": { - "short_name": "ListUsers", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService.ListUsers", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_GetAccount_sync", - "title": "Snippet for the get_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#get_account.", - "file": "accounts_service/get_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#get_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "GetAccount", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.GetAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_CreateAndConfigureAccount_sync", - "title": "Snippet for the create_and_configure_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#create_and_configure_account.", - "file": "accounts_service/create_and_configure_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_and_configure_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#create_and_configure_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "CreateAndConfigureAccount", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.CreateAndConfigureAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_DeleteAccount_sync", - "title": "Snippet for the delete_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#delete_account.", - "file": "accounts_service/delete_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#delete_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "DeleteAccount", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.DeleteAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_UpdateAccount_sync", - "title": "Snippet for the update_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#update_account.", - "file": "accounts_service/update_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#update_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "UpdateAccount", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.UpdateAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_ListAccounts_sync", - "title": "Snippet for the list_accounts call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_accounts.", - "file": "accounts_service/list_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_accounts", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "ListAccounts", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.ListAccounts", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_ListSubAccounts_sync", - "title": "Snippet for the list_sub_accounts call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_sub_accounts.", - "file": "accounts_service/list_sub_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_sub_accounts", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_sub_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "ListSubAccounts", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.ListSubAccounts", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AutofeedSettingsService_GetAutofeedSettings_sync", - "title": "Snippet for the get_autofeed_settings call in the AutofeedSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#get_autofeed_settings.", - "file": "autofeed_settings_service/get_autofeed_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_autofeed_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#get_autofeed_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings", - "client": { - "short_name": "AutofeedSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client" - }, - "method": { - "short_name": "GetAutofeedSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService.GetAutofeedSettings", - "service": { - "short_name": "AutofeedSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync", - "title": "Snippet for the update_autofeed_settings call in the AutofeedSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#update_autofeed_settings.", - "file": "autofeed_settings_service/update_autofeed_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_autofeed_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#update_autofeed_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings", - "client": { - "short_name": "AutofeedSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client" - }, - "method": { - "short_name": "UpdateAutofeedSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService.UpdateAutofeedSettings", - "service": { - "short_name": "AutofeedSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync", - "title": "Snippet for the get_automatic_improvements call in the AutomaticImprovementsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#get_automatic_improvements.", - "file": "automatic_improvements_service/get_automatic_improvements.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_automatic_improvements", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#get_automatic_improvements", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements", - "client": { - "short_name": "AutomaticImprovementsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client" - }, - "method": { - "short_name": "GetAutomaticImprovements", - "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.GetAutomaticImprovements", - "service": { - "short_name": "AutomaticImprovementsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync", - "title": "Snippet for the update_automatic_improvements call in the AutomaticImprovementsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#update_automatic_improvements.", - "file": "automatic_improvements_service/update_automatic_improvements.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_automatic_improvements", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#update_automatic_improvements", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements", - "client": { - "short_name": "AutomaticImprovementsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client" - }, - "method": { - "short_name": "UpdateAutomaticImprovements", - "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.UpdateAutomaticImprovements", - "service": { - "short_name": "AutomaticImprovementsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_BusinessIdentityService_GetBusinessIdentity_sync", - "title": "Snippet for the get_business_identity call in the BusinessIdentityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#get_business_identity.", - "file": "business_identity_service/get_business_identity.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_business_identity", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#get_business_identity", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity", - "client": { - "short_name": "BusinessIdentityService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client" - }, - "method": { - "short_name": "GetBusinessIdentity", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService.GetBusinessIdentity", - "service": { - "short_name": "BusinessIdentityService", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_BusinessIdentityService_UpdateBusinessIdentity_sync", - "title": "Snippet for the update_business_identity call in the BusinessIdentityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#update_business_identity.", - "file": "business_identity_service/update_business_identity.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_business_identity", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#update_business_identity", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity", - "client": { - "short_name": "BusinessIdentityService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client" - }, - "method": { - "short_name": "UpdateBusinessIdentity", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService.UpdateBusinessIdentity", - "service": { - "short_name": "BusinessIdentityService", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_BusinessInfoService_GetBusinessInfo_sync", - "title": "Snippet for the get_business_info call in the BusinessInfoService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#get_business_info.", - "file": "business_info_service/get_business_info.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_business_info", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#get_business_info", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo", - "client": { - "short_name": "BusinessInfoService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client" - }, - "method": { - "short_name": "GetBusinessInfo", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService.GetBusinessInfo", - "service": { - "short_name": "BusinessInfoService", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_BusinessInfoService_UpdateBusinessInfo_sync", - "title": "Snippet for the update_business_info call in the BusinessInfoService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#update_business_info.", - "file": "business_info_service/update_business_info.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_business_info", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#update_business_info", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo", - "client": { - "short_name": "BusinessInfoService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client" - }, - "method": { - "short_name": "UpdateBusinessInfo", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService.UpdateBusinessInfo", - "service": { - "short_name": "BusinessInfoService", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync", - "title": "Snippet for the get_checkout_settings call in the CheckoutSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings.", - "file": "checkout_settings_service/get_checkout_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_checkout_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", - "client": { - "short_name": "CheckoutSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" - }, - "method": { - "short_name": "GetCheckoutSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.GetCheckoutSettings", - "service": { - "short_name": "CheckoutSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync", - "title": "Snippet for the create_checkout_settings call in the CheckoutSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings.", - "file": "checkout_settings_service/create_checkout_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_checkout_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", - "client": { - "short_name": "CheckoutSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" - }, - "method": { - "short_name": "CreateCheckoutSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.CreateCheckoutSettings", - "service": { - "short_name": "CheckoutSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync", - "title": "Snippet for the update_checkout_settings call in the CheckoutSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings.", - "file": "checkout_settings_service/update_checkout_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_checkout_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", - "client": { - "short_name": "CheckoutSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" - }, - "method": { - "short_name": "UpdateCheckoutSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.UpdateCheckoutSettings", - "service": { - "short_name": "CheckoutSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync", - "title": "Snippet for the delete_checkout_settings call in the CheckoutSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings.", - "file": "checkout_settings_service/delete_checkout_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_checkout_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CheckoutSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" - }, - "method": { - "short_name": "DeleteCheckoutSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.DeleteCheckoutSettings", - "service": { - "short_name": "CheckoutSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_EmailPreferencesService_GetEmailPreferences_sync", - "title": "Snippet for the get_email_preferences call in the EmailPreferencesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#get_email_preferences.", - "file": "email_preferences_service/get_email_preferences.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_email_preferences", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#get_email_preferences", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences", - "client": { - "short_name": "EmailPreferencesService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client" - }, - "method": { - "short_name": "GetEmailPreferences", - "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService.GetEmailPreferences", - "service": { - "short_name": "EmailPreferencesService", - "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_EmailPreferencesService_UpdateEmailPreferences_sync", - "title": "Snippet for the update_email_preferences call in the EmailPreferencesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#update_email_preferences.", - "file": "email_preferences_service/update_email_preferences.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_email_preferences", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#update_email_preferences", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences", - "client": { - "short_name": "EmailPreferencesService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client" - }, - "method": { - "short_name": "UpdateEmailPreferences", - "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService.UpdateEmailPreferences", - "service": { - "short_name": "EmailPreferencesService", - "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_GbpAccountsService_ListGbpAccounts_sync", - "title": "Snippet for the list_gbp_accounts call in the GbpAccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#list_gbp_accounts.", - "file": "gbp_accounts_service/list_gbp_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_gbp_accounts", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#list_gbp_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse", - "client": { - "short_name": "GbpAccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client" - }, - "method": { - "short_name": "ListGbpAccounts", - "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService.ListGbpAccounts", - "service": { - "short_name": "GbpAccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_GbpAccountsService_LinkGbpAccount_sync", - "title": "Snippet for the link_gbp_account call in the GbpAccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#link_gbp_account.", - "file": "gbp_accounts_service/link_gbp_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "link_gbp_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#link_gbp_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse", - "client": { - "short_name": "GbpAccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client" - }, - "method": { - "short_name": "LinkGbpAccount", - "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService.LinkGbpAccount", - "service": { - "short_name": "GbpAccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_HomepageService_GetHomepage_sync", - "title": "Snippet for the get_homepage call in the HomepageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#get_homepage.", - "file": "homepage_service/get_homepage.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_homepage", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#get_homepage", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", - "client": { - "short_name": "HomepageService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" - }, - "method": { - "short_name": "GetHomepage", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.GetHomepage", - "service": { - "short_name": "HomepageService", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_HomepageService_UpdateHomepage_sync", - "title": "Snippet for the update_homepage call in the HomepageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#update_homepage.", - "file": "homepage_service/update_homepage.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_homepage", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#update_homepage", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", - "client": { - "short_name": "HomepageService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" - }, - "method": { - "short_name": "UpdateHomepage", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.UpdateHomepage", - "service": { - "short_name": "HomepageService", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_HomepageService_ClaimHomepage_sync", - "title": "Snippet for the claim_homepage call in the HomepageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#claim_homepage.", - "file": "homepage_service/claim_homepage.rb", - "language": "RUBY", - "client_method": { - "short_name": "claim_homepage", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#claim_homepage", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", - "client": { - "short_name": "HomepageService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" - }, - "method": { - "short_name": "ClaimHomepage", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.ClaimHomepage", - "service": { - "short_name": "HomepageService", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_HomepageService_UnclaimHomepage_sync", - "title": "Snippet for the unclaim_homepage call in the HomepageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#unclaim_homepage.", - "file": "homepage_service/unclaim_homepage.rb", - "language": "RUBY", - "client_method": { - "short_name": "unclaim_homepage", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#unclaim_homepage", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", - "client": { - "short_name": "HomepageService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" - }, - "method": { - "short_name": "UnclaimHomepage", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.UnclaimHomepage", - "service": { - "short_name": "HomepageService", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpProvidersService_FindLfpProviders_sync", - "title": "Snippet for the find_lfp_providers call in the LfpProvidersService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#find_lfp_providers.", - "file": "lfp_providers_service/find_lfp_providers.rb", - "language": "RUBY", - "client_method": { - "short_name": "find_lfp_providers", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#find_lfp_providers", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse", - "client": { - "short_name": "LfpProvidersService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client" - }, - "method": { - "short_name": "FindLfpProviders", - "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService.FindLfpProviders", - "service": { - "short_name": "LfpProvidersService", - "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpProvidersService_LinkLfpProvider_sync", - "title": "Snippet for the link_lfp_provider call in the LfpProvidersService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#link_lfp_provider.", - "file": "lfp_providers_service/link_lfp_provider.rb", - "language": "RUBY", - "client_method": { - "short_name": "link_lfp_provider", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#link_lfp_provider", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse", - "client": { - "short_name": "LfpProvidersService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client" - }, - "method": { - "short_name": "LinkLfpProvider", - "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService.LinkLfpProvider", - "service": { - "short_name": "LfpProvidersService", - "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync", - "title": "Snippet for the get_omnichannel_setting call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#get_omnichannel_setting.", - "file": "omnichannel_settings_service/get_omnichannel_setting.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_omnichannel_setting", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#get_omnichannel_setting", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "GetOmnichannelSetting", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.GetOmnichannelSetting", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync", - "title": "Snippet for the list_omnichannel_settings call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#list_omnichannel_settings.", - "file": "omnichannel_settings_service/list_omnichannel_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_omnichannel_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#list_omnichannel_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "ListOmnichannelSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.ListOmnichannelSettings", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync", - "title": "Snippet for the create_omnichannel_setting call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#create_omnichannel_setting.", - "file": "omnichannel_settings_service/create_omnichannel_setting.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_omnichannel_setting", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#create_omnichannel_setting", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "CreateOmnichannelSetting", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.CreateOmnichannelSetting", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync", - "title": "Snippet for the update_omnichannel_setting call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#update_omnichannel_setting.", - "file": "omnichannel_settings_service/update_omnichannel_setting.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_omnichannel_setting", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#update_omnichannel_setting", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "UpdateOmnichannelSetting", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.UpdateOmnichannelSetting", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_RequestInventoryVerification_sync", - "title": "Snippet for the request_inventory_verification call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#request_inventory_verification.", - "file": "omnichannel_settings_service/request_inventory_verification.rb", - "language": "RUBY", - "client_method": { - "short_name": "request_inventory_verification", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#request_inventory_verification", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "RequestInventoryVerification", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.RequestInventoryVerification", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync", - "title": "Snippet for the get_online_return_policy call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#get_online_return_policy.", - "file": "online_return_policy_service/get_online_return_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_online_return_policy", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#get_online_return_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "GetOnlineReturnPolicy", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.GetOnlineReturnPolicy", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync", - "title": "Snippet for the list_online_return_policies call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#list_online_return_policies.", - "file": "online_return_policy_service/list_online_return_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_online_return_policies", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#list_online_return_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "ListOnlineReturnPolicies", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.ListOnlineReturnPolicies", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync", - "title": "Snippet for the create_online_return_policy call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#create_online_return_policy.", - "file": "online_return_policy_service/create_online_return_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_online_return_policy", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#create_online_return_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "CreateOnlineReturnPolicy", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.CreateOnlineReturnPolicy", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_UpdateOnlineReturnPolicy_sync", - "title": "Snippet for the update_online_return_policy call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#update_online_return_policy.", - "file": "online_return_policy_service/update_online_return_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_online_return_policy", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#update_online_return_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "UpdateOnlineReturnPolicy", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.UpdateOnlineReturnPolicy", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync", - "title": "Snippet for the delete_online_return_policy call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#delete_online_return_policy.", - "file": "online_return_policy_service/delete_online_return_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_online_return_policy", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#delete_online_return_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "DeleteOnlineReturnPolicy", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.DeleteOnlineReturnPolicy", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProgramsService_GetProgram_sync", - "title": "Snippet for the get_program call in the ProgramsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#get_program.", - "file": "programs_service/get_program.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_program", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#get_program", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Program", - "client": { - "short_name": "ProgramsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" - }, - "method": { - "short_name": "GetProgram", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.GetProgram", - "service": { - "short_name": "ProgramsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProgramsService_ListPrograms_sync", - "title": "Snippet for the list_programs call in the ProgramsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#list_programs.", - "file": "programs_service/list_programs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_programs", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#list_programs", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse", - "client": { - "short_name": "ProgramsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" - }, - "method": { - "short_name": "ListPrograms", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.ListPrograms", - "service": { - "short_name": "ProgramsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProgramsService_EnableProgram_sync", - "title": "Snippet for the enable_program call in the ProgramsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#enable_program.", - "file": "programs_service/enable_program.rb", - "language": "RUBY", - "client_method": { - "short_name": "enable_program", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#enable_program", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Program", - "client": { - "short_name": "ProgramsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" - }, - "method": { - "short_name": "EnableProgram", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.EnableProgram", - "service": { - "short_name": "ProgramsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProgramsService_DisableProgram_sync", - "title": "Snippet for the disable_program call in the ProgramsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#disable_program.", - "file": "programs_service/disable_program.rb", - "language": "RUBY", - "client_method": { - "short_name": "disable_program", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#disable_program", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Program", - "client": { - "short_name": "ProgramsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" - }, - "method": { - "short_name": "DisableProgram", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.DisableProgram", - "service": { - "short_name": "ProgramsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionsService_GetRegion_sync", - "title": "Snippet for the get_region call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#get_region.", - "file": "regions_service/get_region.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_region", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#get_region", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Region", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" - }, - "method": { - "short_name": "GetRegion", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.GetRegion", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionsService_CreateRegion_sync", - "title": "Snippet for the create_region call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#create_region.", - "file": "regions_service/create_region.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_region", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#create_region", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Region", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" - }, - "method": { - "short_name": "CreateRegion", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.CreateRegion", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionsService_UpdateRegion_sync", - "title": "Snippet for the update_region call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#update_region.", - "file": "regions_service/update_region.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_region", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#update_region", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Region", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" - }, - "method": { - "short_name": "UpdateRegion", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.UpdateRegion", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionsService_DeleteRegion_sync", - "title": "Snippet for the delete_region call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#delete_region.", - "file": "regions_service/delete_region.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_region", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#delete_region", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" - }, - "method": { - "short_name": "DeleteRegion", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.DeleteRegion", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionsService_ListRegions_sync", - "title": "Snippet for the list_regions call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#list_regions.", - "file": "regions_service/list_regions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_regions", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#list_regions", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" - }, - "method": { - "short_name": "ListRegions", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.ListRegions", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ShippingSettingsService_GetShippingSettings_sync", - "title": "Snippet for the get_shipping_settings call in the ShippingSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#get_shipping_settings.", - "file": "shipping_settings_service/get_shipping_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_shipping_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#get_shipping_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings", - "client": { - "short_name": "ShippingSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client" - }, - "method": { - "short_name": "GetShippingSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService.GetShippingSettings", - "service": { - "short_name": "ShippingSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ShippingSettingsService_InsertShippingSettings_sync", - "title": "Snippet for the insert_shipping_settings call in the ShippingSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#insert_shipping_settings.", - "file": "shipping_settings_service/insert_shipping_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_shipping_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#insert_shipping_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings", - "client": { - "short_name": "ShippingSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client" - }, - "method": { - "short_name": "InsertShippingSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService.InsertShippingSettings", - "service": { - "short_name": "ShippingSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_TermsOfServiceService_GetTermsOfService_sync", - "title": "Snippet for the get_terms_of_service call in the TermsOfServiceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#get_terms_of_service.", - "file": "terms_of_service_service/get_terms_of_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_terms_of_service", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#get_terms_of_service", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService", - "client": { - "short_name": "TermsOfServiceService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client" - }, - "method": { - "short_name": "GetTermsOfService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService.GetTermsOfService", - "service": { - "short_name": "TermsOfServiceService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync", - "title": "Snippet for the retrieve_latest_terms_of_service call in the TermsOfServiceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#retrieve_latest_terms_of_service.", - "file": "terms_of_service_service/retrieve_latest_terms_of_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "retrieve_latest_terms_of_service", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#retrieve_latest_terms_of_service", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService", - "client": { - "short_name": "TermsOfServiceService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client" - }, - "method": { - "short_name": "RetrieveLatestTermsOfService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService.RetrieveLatestTermsOfService", - "service": { - "short_name": "TermsOfServiceService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_TermsOfServiceService_AcceptTermsOfService_sync", - "title": "Snippet for the accept_terms_of_service call in the TermsOfServiceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#accept_terms_of_service.", - "file": "terms_of_service_service/accept_terms_of_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "accept_terms_of_service", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#accept_terms_of_service", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TermsOfServiceService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client" - }, - "method": { - "short_name": "AcceptTermsOfService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService.AcceptTermsOfService", - "service": { - "short_name": "TermsOfServiceService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync", - "title": "Snippet for the get_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state.", - "file": "terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_terms_of_service_agreement_state", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState", - "client": { - "short_name": "TermsOfServiceAgreementStateService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client" - }, - "method": { - "short_name": "GetTermsOfServiceAgreementState", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService.GetTermsOfServiceAgreementState", - "service": { - "short_name": "TermsOfServiceAgreementStateService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync", - "title": "Snippet for the retrieve_for_application_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state.", - "file": "terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb", - "language": "RUBY", - "client_method": { - "short_name": "retrieve_for_application_terms_of_service_agreement_state", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState", - "client": { - "short_name": "TermsOfServiceAgreementStateService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client" - }, - "method": { - "short_name": "RetrieveForApplicationTermsOfServiceAgreementState", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService.RetrieveForApplicationTermsOfServiceAgreementState", - "service": { - "short_name": "TermsOfServiceAgreementStateService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService" - } - } - }, - "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-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb deleted file mode 100644 index 6002493fa06e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state. -# -def get_terms_of_service_agreement_state - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new - - # Call the get_terms_of_service_agreement_state method. - result = client.get_terms_of_service_agreement_state request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. - p result -end -# [END merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb deleted file mode 100644 index fce83e3ae057..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the retrieve_for_application_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state. -# -def retrieve_for_application_terms_of_service_agreement_state - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new - - # Call the retrieve_for_application_terms_of_service_agreement_state method. - result = client.retrieve_for_application_terms_of_service_agreement_state request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. - p result -end -# [END merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb deleted file mode 100644 index b1e3c65fd56f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_TermsOfServiceService_AcceptTermsOfService_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the accept_terms_of_service call in the TermsOfServiceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#accept_terms_of_service. -# -def accept_terms_of_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new - - # Call the accept_terms_of_service method. - result = client.accept_terms_of_service request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_TermsOfServiceService_AcceptTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb deleted file mode 100644 index 72780fd192f1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_TermsOfServiceService_GetTermsOfService_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_terms_of_service call in the TermsOfServiceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#get_terms_of_service. -# -def get_terms_of_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new - - # Call the get_terms_of_service method. - result = client.get_terms_of_service request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - p result -end -# [END merchantapi_v1beta_generated_TermsOfServiceService_GetTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb deleted file mode 100644 index e0039a91db2f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the retrieve_latest_terms_of_service call in the TermsOfServiceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#retrieve_latest_terms_of_service. -# -def retrieve_latest_terms_of_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new - - # Call the retrieve_latest_terms_of_service method. - result = client.retrieve_latest_terms_of_service request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - p result -end -# [END merchantapi_v1beta_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb deleted file mode 100644 index 99337d55834e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_UserService_CreateUser_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_user call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#create_user. -# -def create_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new - - # Call the create_user method. - result = client.create_user request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - p result -end -# [END merchantapi_v1beta_generated_UserService_CreateUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb deleted file mode 100644 index 07a8a692be99..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_UserService_DeleteUser_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the delete_user call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#delete_user. -# -def delete_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new - - # Call the delete_user method. - result = client.delete_user request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_UserService_DeleteUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb deleted file mode 100644 index 7e279d65f5b8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_UserService_GetUser_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_user call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#get_user. -# -def get_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new - - # Call the get_user method. - result = client.get_user request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - p result -end -# [END merchantapi_v1beta_generated_UserService_GetUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb deleted file mode 100644 index 17dca433a258..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.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 merchantapi_v1beta_generated_UserService_ListUsers_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_users call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#list_users. -# -def list_users - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new - - # Call the list_users method. - result = client.list_users request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::User. - p item - end -end -# [END merchantapi_v1beta_generated_UserService_ListUsers_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb deleted file mode 100644 index a39e0c84162a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_UserService_UpdateUser_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_user call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#update_user. -# -def update_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new - - # Call the update_user method. - result = client.update_user request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - p result -end -# [END merchantapi_v1beta_generated_UserService_UpdateUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb deleted file mode 100644 index d759cbee13e3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_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/shopping/merchant/accounts/v1beta/account_issue_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb deleted file mode 100644 index e4c44183ebb3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_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/shopping/merchant/accounts/v1beta/accountissue_pb" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_issues - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - time_zone = "hello world" - - list_account_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::ServiceStub.stub :transcode_list_account_issues_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_account_issues_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_account_issues parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_account_issues ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_account_issues(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_account_issues_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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb deleted file mode 100644 index 9a61e1e6f5ee..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb +++ /dev/null @@ -1,175 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/accountissue_pb" -require "google/shopping/merchant/accounts/v1beta/account_issue_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_issues - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - time_zone = "hello world" - - list_account_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_account_issues, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, 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["language_code"] - assert_equal "hello world", request["time_zone"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_account_issues_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_account_issues parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_account_issues ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_account_issues(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_account_issues_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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb deleted file mode 100644 index f72de9504a1c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_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/shopping/merchant/accounts/v1beta/account_tax_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_account_tax_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_tax_path account: "value0", tax: "value1" - assert_equal "accounts/value0/accounttax/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb deleted file mode 100644 index 522b58c23bd2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb +++ /dev/null @@ -1,264 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/account_tax_pb" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_account_tax - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_tax_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.stub :transcode_get_account_tax_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_account_tax_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_account_tax({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_account_tax name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_account_tax({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_account_tax_client_stub.call_count - end - end - end - - def test_list_account_tax - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse.new - http_response = OpenStruct.new 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_account_tax_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.stub :transcode_list_account_tax_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_account_tax_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_account_tax({ 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_account_tax 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_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.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_account_tax({ 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_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.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_account_tax_client_stub.call_count - end - end - end - - def test_update_account_tax - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account_tax = {} - update_mask = {} - - update_account_tax_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.stub :transcode_update_account_tax_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_account_tax_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_account_tax({ account_tax: account_tax, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_account_tax account_tax: account_tax, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_account_tax({ account_tax: account_tax, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_account_tax_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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb deleted file mode 100644 index 434a6b00b4d0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb +++ /dev/null @@ -1,289 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/account_tax_pb" -require "google/shopping/merchant/accounts/v1beta/account_tax_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_account_tax - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_tax_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_account_tax, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_account_tax_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_account_tax({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_account_tax name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_account_tax({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_account_tax_client_stub.call_rpc_count - end - end - - def test_list_account_tax - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_account_tax_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_account_tax, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, 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_account_tax_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_account_tax({ 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_account_tax 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_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.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_account_tax({ 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_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.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_account_tax_client_stub.call_rpc_count - end - end - - def test_update_account_tax - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account_tax = {} - update_mask = {} - - update_account_tax_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_account_tax, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax), request["account_tax"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_account_tax_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_account_tax({ account_tax: account_tax, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_account_tax account_tax: account_tax, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, 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_account_tax({ account_tax: account_tax, 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_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, 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_account_tax_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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb deleted file mode 100644 index 62d77fd98b02..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_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/shopping/merchant/accounts/v1beta/accounts_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_terms_of_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.terms_of_service_path version: "value0" - assert_equal "termsOfService/value0", path - end - end - - def test_user_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.user_path account: "value0", email: "value1" - assert_equal "accounts/value0/users/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb deleted file mode 100644 index ba9233339f03..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb +++ /dev/null @@ -1,432 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1beta/accounts_pb" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_get_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_account({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_account name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_account ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_account({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_account(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_account_client_stub.call_count - end - end - end - - def test_create_and_configure_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account = {} - users = [{}] - accept_terms_of_service = {} - service = [{}] - - create_and_configure_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_create_and_configure_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_and_configure_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_and_configure_account account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_and_configure_account ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_and_configure_account(::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_and_configure_account_client_stub.call_count - end - end - end - - def test_delete_account - # 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" - force = true - - delete_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_delete_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_account({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_account name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_account ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_account({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_account(::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_account_client_stub.call_count - end - end - end - - def test_update_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account = {} - update_mask = {} - - update_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_update_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_account({ account: account, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_account account: account, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_account ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_account({ account: account, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_account(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_account_client_stub.call_count - end - end - end - - def test_list_accounts - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_list_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_accounts_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_accounts({ 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_accounts 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_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(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_accounts({ 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_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(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_accounts_client_stub.call_count - end - end - end - - def test_list_sub_accounts - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - provider = "hello world" - page_size = 42 - page_token = "hello world" - - list_sub_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_list_sub_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_sub_accounts_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_sub_accounts provider: provider, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_sub_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts({ provider: provider, 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_sub_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts_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::Shopping::Merchant::Accounts::V1beta::AccountsService::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::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb deleted file mode 100644 index e37342237ea8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.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 "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/accounts_pb" -require "google/shopping/merchant/accounts/v1beta/accounts_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_account({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_account name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_account ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_account({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_account(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_account_client_stub.call_rpc_count - end - end - - def test_create_and_configure_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account = {} - users = [{}] - accept_terms_of_service = {} - service = [{}] - - create_and_configure_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_and_configure_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Account), request["account"] - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, request["users"].first - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService), request["accept_terms_of_service"] - assert request.has_accept_terms_of_service? - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService, request["service"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_and_configure_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_and_configure_account account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_and_configure_account ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_and_configure_account(::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_and_configure_account_client_stub.call_rpc_count - end - end - - def test_delete_account - # 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" - force = true - - delete_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_account({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_account name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_account ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_account({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_account(::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_account_client_stub.call_rpc_count - end - end - - def test_update_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account = {} - update_mask = {} - - update_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Account), request["account"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_account({ account: account, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_account account: account, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_account ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, 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_account({ account: account, 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_account(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, 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_account_client_stub.call_rpc_count - end - end - - def test_list_accounts - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_accounts, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, request - 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_accounts_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_accounts({ 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_accounts 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_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(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_accounts({ 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_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(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_accounts_client_stub.call_rpc_count - end - end - - def test_list_sub_accounts - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - provider = "hello world" - page_size = 42 - page_token = "hello world" - - list_sub_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_sub_accounts, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, request - assert_equal "hello world", request["provider"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_sub_accounts_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_sub_accounts({ provider: provider, page_size: page_size, page_token: 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_sub_accounts provider: provider, page_size: page_size, page_token: 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_sub_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, page_size: page_size, page_token: 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_sub_accounts({ provider: provider, 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_sub_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts_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::Shopping::Merchant::Accounts::V1beta::AccountsService::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::Shopping::Merchant::Accounts::V1beta::AccountsService::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::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb deleted file mode 100644 index 0d03f7e27cbf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_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/shopping/merchant/accounts/v1beta/autofeed_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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_autofeed_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.autofeed_settings_path account: "value0" - assert_equal "accounts/value0/autofeedSettings", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb deleted file mode 100644 index 28fdef608f40..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_autofeed_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_autofeed_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ServiceStub.stub :transcode_get_autofeed_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_autofeed_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_autofeed_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_autofeed_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_autofeed_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_autofeed_settings_client_stub.call_count - end - end - end - - def test_update_autofeed_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - autofeed_settings = {} - update_mask = {} - - update_autofeed_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ServiceStub.stub :transcode_update_autofeed_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_autofeed_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_autofeed_settings autofeed_settings: autofeed_settings, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_autofeed_settings_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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb deleted file mode 100644 index 8c8923e68a8b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_autofeed_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_autofeed_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_autofeed_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_autofeed_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_autofeed_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_autofeed_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_autofeed_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_autofeed_settings_client_stub.call_rpc_count - end - end - - def test_update_autofeed_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - autofeed_settings = {} - update_mask = {} - - update_autofeed_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_autofeed_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings), request["autofeed_settings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_autofeed_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_autofeed_settings autofeed_settings: autofeed_settings, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, 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_autofeed_settings({ autofeed_settings: autofeed_settings, 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_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, 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_autofeed_settings_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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb deleted file mode 100644 index 5432846fad2e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_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/shopping/merchant/accounts/v1beta/automatic_improvements_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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_automatic_improvements_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.automatic_improvements_path account: "value0" - assert_equal "accounts/value0/automaticImprovements", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb deleted file mode 100644 index e5e64a6eadd5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_automatic_improvements - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_automatic_improvements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ServiceStub.stub :transcode_get_automatic_improvements_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_automatic_improvements_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_automatic_improvements({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_automatic_improvements name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_automatic_improvements({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_automatic_improvements_client_stub.call_count - end - end - end - - def test_update_automatic_improvements - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - automatic_improvements = {} - update_mask = {} - - update_automatic_improvements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ServiceStub.stub :transcode_update_automatic_improvements_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_automatic_improvements_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_automatic_improvements automatic_improvements: automatic_improvements, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_automatic_improvements_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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb deleted file mode 100644 index 86cb99cf7bb5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_automatic_improvements - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_automatic_improvements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_automatic_improvements, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_automatic_improvements_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_automatic_improvements({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_automatic_improvements name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_automatic_improvements({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_automatic_improvements_client_stub.call_rpc_count - end - end - - def test_update_automatic_improvements - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - automatic_improvements = {} - update_mask = {} - - update_automatic_improvements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_automatic_improvements, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements), request["automatic_improvements"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_automatic_improvements_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_automatic_improvements automatic_improvements: automatic_improvements, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, 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_automatic_improvements({ automatic_improvements: automatic_improvements, 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_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, 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_automatic_improvements_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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb deleted file mode 100644 index 20f3daac2d1a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_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/shopping/merchant/accounts/v1beta/business_identity_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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_business_identity_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.business_identity_path account: "value0" - assert_equal "accounts/value0/businessIdentity", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb deleted file mode 100644 index 885667cd5906..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_business_identity - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_business_identity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ServiceStub.stub :transcode_get_business_identity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_business_identity_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_business_identity({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_business_identity name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_business_identity({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_business_identity_client_stub.call_count - end - end - end - - def test_update_business_identity - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - business_identity = {} - update_mask = {} - - update_business_identity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ServiceStub.stub :transcode_update_business_identity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_business_identity_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_business_identity({ business_identity: business_identity, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_business_identity business_identity: business_identity, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_business_identity({ business_identity: business_identity, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_business_identity_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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb deleted file mode 100644 index d088ff822a0b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" -require "google/shopping/merchant/accounts/v1beta/business_identity_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_business_identity - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_business_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_business_identity, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_business_identity_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_business_identity({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_business_identity name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_business_identity({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_business_identity_client_stub.call_rpc_count - end - end - - def test_update_business_identity - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - business_identity = {} - update_mask = {} - - update_business_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_business_identity, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity), request["business_identity"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_business_identity_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_business_identity({ business_identity: business_identity, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_business_identity business_identity: business_identity, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, 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_business_identity({ business_identity: business_identity, 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_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, 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_business_identity_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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb deleted file mode 100644 index 128cf717a145..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_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/shopping/merchant/accounts/v1beta/business_info_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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_business_info_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.business_info_path account: "value0" - assert_equal "accounts/value0/businessInfo", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb deleted file mode 100644 index e5dc46020947..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_business_info - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_business_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ServiceStub.stub :transcode_get_business_info_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_business_info_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_business_info({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_business_info name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_business_info ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_business_info({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_business_info(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_business_info_client_stub.call_count - end - end - end - - def test_update_business_info - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - business_info = {} - update_mask = {} - - update_business_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ServiceStub.stub :transcode_update_business_info_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_business_info_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_business_info({ business_info: business_info, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_business_info business_info: business_info, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_business_info ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_business_info({ business_info: business_info, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_business_info(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_business_info_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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb deleted file mode 100644 index 0377d3eef173..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" -require "google/shopping/merchant/accounts/v1beta/business_info_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_business_info - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_business_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_business_info, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_business_info_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_business_info({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_business_info name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_business_info ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_business_info({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_business_info(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_business_info_client_stub.call_rpc_count - end - end - - def test_update_business_info - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - business_info = {} - update_mask = {} - - update_business_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_business_info, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo), request["business_info"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_business_info_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_business_info({ business_info: business_info, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_business_info business_info: business_info, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_business_info ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, 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_business_info({ business_info: business_info, 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_business_info(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, 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_business_info_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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb deleted file mode 100644 index 4f838dc12447..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_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/shopping/merchant/accounts/v1beta/checkout_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_checkout_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.checkout_settings_path account: "value0", program: "value1" - assert_equal "accounts/value0/programs/value1/checkoutSettings", path - end - end - - def test_program_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.program_path account: "value0", program: "value1" - assert_equal "accounts/value0/programs/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb deleted file mode 100644 index 829225a0067e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb +++ /dev/null @@ -1,317 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_checkout_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_get_checkout_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_checkout_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_checkout_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_checkout_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_checkout_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_checkout_settings_client_stub.call_count - end - end - end - - def test_create_checkout_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - checkout_settings = {} - - create_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_create_checkout_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_checkout_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_checkout_settings_client_stub.call_count - end - end - end - - def test_update_checkout_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - checkout_settings = {} - update_mask = {} - - update_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_update_checkout_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_checkout_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_checkout_settings_client_stub.call_count - end - end - end - - def test_delete_checkout_settings - # 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_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_delete_checkout_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_checkout_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_checkout_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_checkout_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_checkout_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_checkout_settings_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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb deleted file mode 100644 index 9b77929d554e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb +++ /dev/null @@ -1,340 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_checkout_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_checkout_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_checkout_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_checkout_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_checkout_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_checkout_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_checkout_settings_client_stub.call_rpc_count - end - end - - def test_create_checkout_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - checkout_settings = {} - - create_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_checkout_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings), request["checkout_settings"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_checkout_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_checkout_settings_client_stub.call_rpc_count - end - end - - def test_update_checkout_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - checkout_settings = {} - update_mask = {} - - update_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_checkout_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings), request["checkout_settings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_checkout_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, 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_checkout_settings({ checkout_settings: checkout_settings, 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_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, 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_checkout_settings_client_stub.call_rpc_count - end - end - - def test_delete_checkout_settings - # 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_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_checkout_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_checkout_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_checkout_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_checkout_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_checkout_settings({ 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_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(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_checkout_settings_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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb deleted file mode 100644 index a4b6db6efe0f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_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/shopping/merchant/accounts/v1beta/email_preferences_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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_email_preferences_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.email_preferences_path account: "value0", email: "value1" - assert_equal "accounts/value0/users/value1/emailPreferences", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb deleted file mode 100644 index 911fa879bed4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_email_preferences - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_email_preferences_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ServiceStub.stub :transcode_get_email_preferences_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_email_preferences_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_email_preferences({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_email_preferences name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_email_preferences({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_email_preferences_client_stub.call_count - end - end - end - - def test_update_email_preferences - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - email_preferences = {} - update_mask = {} - - update_email_preferences_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ServiceStub.stub :transcode_update_email_preferences_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_email_preferences_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_email_preferences email_preferences: email_preferences, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_email_preferences_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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb deleted file mode 100644 index 4df3f2283c70..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_email_preferences - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_email_preferences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_email_preferences, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_email_preferences_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_email_preferences({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_email_preferences name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_email_preferences({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_email_preferences_client_stub.call_rpc_count - end - end - - def test_update_email_preferences - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - email_preferences = {} - update_mask = {} - - update_email_preferences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_email_preferences, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences), request["email_preferences"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_email_preferences_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_email_preferences email_preferences: email_preferences, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, 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_email_preferences({ email_preferences: email_preferences, 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_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, 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_email_preferences_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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb deleted file mode 100644 index 28b36c651b32..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_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/shopping/merchant/accounts/v1beta/gbp_accounts_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb deleted file mode 100644 index 78e00b374ffc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_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/shopping/merchant/accounts/v1beta/gbpaccounts_pb" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_gbp_accounts - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse.new - http_response = OpenStruct.new 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_gbp_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::ServiceStub.stub :transcode_list_gbp_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_gbp_accounts_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_gbp_accounts({ 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_gbp_accounts 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_gbp_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.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_gbp_accounts({ 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_gbp_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.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_gbp_accounts_client_stub.call_count - end - end - end - - def test_link_gbp_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - gbp_email = "hello world" - - link_gbp_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::ServiceStub.stub :transcode_link_gbp_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, link_gbp_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.link_gbp_account({ parent: parent, gbp_email: gbp_email }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.link_gbp_account parent: parent, gbp_email: gbp_email do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.link_gbp_account ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.link_gbp_account({ parent: parent, gbp_email: gbp_email }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.link_gbp_account(::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, link_gbp_account_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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb deleted file mode 100644 index a0dae9ea0491..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb +++ /dev/null @@ -1,231 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_gbp_accounts - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_gbp_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_gbp_accounts, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, 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_gbp_accounts_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_gbp_accounts({ 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_gbp_accounts 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_gbp_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.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_gbp_accounts({ 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_gbp_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.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_gbp_accounts_client_stub.call_rpc_count - end - end - - def test_link_gbp_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - gbp_email = "hello world" - - link_gbp_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :link_gbp_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["gbp_email"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, link_gbp_account_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.link_gbp_account({ parent: parent, gbp_email: gbp_email }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.link_gbp_account parent: parent, gbp_email: gbp_email do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.link_gbp_account ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.link_gbp_account({ parent: parent, gbp_email: gbp_email }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.link_gbp_account(::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, link_gbp_account_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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb deleted file mode 100644 index 61d80f67f1a5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_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/shopping/merchant/accounts/v1beta/homepage_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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_homepage_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.homepage_path account: "value0" - assert_equal "accounts/value0/homepage", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb deleted file mode 100644 index 3a76b1e7c8b3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_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/rest" -require "google/shopping/merchant/accounts/v1beta/homepage_pb" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_homepage - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_get_homepage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_homepage_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_homepage({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_homepage name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_homepage ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_homepage({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_homepage(::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_homepage_client_stub.call_count - end - end - end - - def test_update_homepage - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - homepage = {} - update_mask = {} - - update_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_update_homepage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_homepage_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_homepage({ homepage: homepage, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_homepage homepage: homepage, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_homepage({ homepage: homepage, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_homepage_client_stub.call_count - end - end - end - - def test_claim_homepage - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - claim_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_claim_homepage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, claim_homepage_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.claim_homepage({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.claim_homepage name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.claim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.claim_homepage({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.claim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, claim_homepage_client_stub.call_count - end - end - end - - def test_unclaim_homepage - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - unclaim_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_unclaim_homepage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, unclaim_homepage_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.unclaim_homepage({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.unclaim_homepage name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.unclaim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.unclaim_homepage({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.unclaim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, unclaim_homepage_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::Shopping::Merchant::Accounts::V1beta::HomepageService::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::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb deleted file mode 100644 index be982cef3397..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb +++ /dev/null @@ -1,338 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/homepage_pb" -require "google/shopping/merchant/accounts/v1beta/homepage_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_homepage - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_homepage, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_homepage_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_homepage({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_homepage name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_homepage ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_homepage({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_homepage(::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_homepage_client_stub.call_rpc_count - end - end - - def test_update_homepage - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - homepage = {} - update_mask = {} - - update_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_homepage, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Homepage), request["homepage"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_homepage_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_homepage({ homepage: homepage, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_homepage homepage: homepage, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, 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_homepage({ homepage: homepage, 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_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, 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_homepage_client_stub.call_rpc_count - end - end - - def test_claim_homepage - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - claim_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :claim_homepage, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, claim_homepage_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.claim_homepage({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.claim_homepage name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.claim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.claim_homepage({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.claim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, claim_homepage_client_stub.call_rpc_count - end - end - - def test_unclaim_homepage - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - unclaim_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :unclaim_homepage, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, unclaim_homepage_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.unclaim_homepage({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.unclaim_homepage name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.unclaim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.unclaim_homepage({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.unclaim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, unclaim_homepage_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::Shopping::Merchant::Accounts::V1beta::HomepageService::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::Shopping::Merchant::Accounts::V1beta::HomepageService::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::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb deleted file mode 100644 index 40c4e008e3f6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_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/shopping/merchant/accounts/v1beta/lfp_providers_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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_lfp_provider_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lfp_provider_path account: "value0", omnichannel_setting: "value1", lfp_provider: "value2" - assert_equal "accounts/value0/omnichannelSettings/value1/lfpProviders/value2", path - end - end - - def test_omnichannel_setting_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.omnichannel_setting_path account: "value0", omnichannel_setting: "value1" - assert_equal "accounts/value0/omnichannelSettings/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb deleted file mode 100644 index 20d70aaf205c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_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/shopping/merchant/accounts/v1beta/lfpproviders_pb" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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_find_lfp_providers - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - find_lfp_providers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::ServiceStub.stub :transcode_find_lfp_providers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, find_lfp_providers_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.find_lfp_providers({ 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.find_lfp_providers 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.find_lfp_providers ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.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.find_lfp_providers({ 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.find_lfp_providers(::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.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, find_lfp_providers_client_stub.call_count - end - end - end - - def test_link_lfp_provider - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - external_account_id = "hello world" - - link_lfp_provider_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::ServiceStub.stub :transcode_link_lfp_provider_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, link_lfp_provider_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.link_lfp_provider({ name: name, external_account_id: external_account_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.link_lfp_provider name: name, external_account_id: external_account_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.link_lfp_provider ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.link_lfp_provider({ name: name, external_account_id: external_account_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.link_lfp_provider(::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, link_lfp_provider_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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb deleted file mode 100644 index d9df0ee6704d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb +++ /dev/null @@ -1,231 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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_find_lfp_providers - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - find_lfp_providers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :find_lfp_providers, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, 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, find_lfp_providers_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.find_lfp_providers({ 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.find_lfp_providers 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.find_lfp_providers ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.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.find_lfp_providers({ 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.find_lfp_providers(::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.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, find_lfp_providers_client_stub.call_rpc_count - end - end - - def test_link_lfp_provider - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - external_account_id = "hello world" - - link_lfp_provider_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :link_lfp_provider, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["external_account_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, link_lfp_provider_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.link_lfp_provider({ name: name, external_account_id: external_account_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.link_lfp_provider name: name, external_account_id: external_account_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.link_lfp_provider ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.link_lfp_provider({ name: name, external_account_id: external_account_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.link_lfp_provider(::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, link_lfp_provider_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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb deleted file mode 100644 index fda485c81acf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_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/shopping/merchant/accounts/v1beta/omnichannel_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_omnichannel_setting_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.omnichannel_setting_path account: "value0", omnichannel_setting: "value1" - assert_equal "accounts/value0/omnichannelSettings/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb deleted file mode 100644 index 26e03b74b749..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_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/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_omnichannel_setting - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_get_omnichannel_setting_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_omnichannel_setting_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_omnichannel_setting({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_omnichannel_setting name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_omnichannel_setting({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_omnichannel_setting_client_stub.call_count - end - end - end - - def test_list_omnichannel_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse.new - http_response = OpenStruct.new 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_omnichannel_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_list_omnichannel_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_omnichannel_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_omnichannel_settings({ 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_omnichannel_settings 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_omnichannel_settings ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.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_omnichannel_settings({ 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_omnichannel_settings(::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.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_omnichannel_settings_client_stub.call_count - end - end - end - - def test_create_omnichannel_setting - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - omnichannel_setting = {} - - create_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_create_omnichannel_setting_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_omnichannel_setting_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_omnichannel_setting parent: parent, omnichannel_setting: omnichannel_setting do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_omnichannel_setting_client_stub.call_count - end - end - end - - def test_update_omnichannel_setting - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - omnichannel_setting = {} - update_mask = {} - - update_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_update_omnichannel_setting_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_omnichannel_setting_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_omnichannel_setting omnichannel_setting: omnichannel_setting, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_omnichannel_setting_client_stub.call_count - end - end - end - - def test_request_inventory_verification - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - request_inventory_verification_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_request_inventory_verification_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, request_inventory_verification_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.request_inventory_verification({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.request_inventory_verification name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.request_inventory_verification ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.request_inventory_verification({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.request_inventory_verification(::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, request_inventory_verification_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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb deleted file mode 100644 index c2f371599259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_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/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_omnichannel_setting - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_omnichannel_setting, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_omnichannel_setting_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_omnichannel_setting({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_omnichannel_setting name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_omnichannel_setting({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_omnichannel_setting_client_stub.call_rpc_count - end - end - - def test_list_omnichannel_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_omnichannel_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_omnichannel_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest, 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_omnichannel_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_omnichannel_settings({ 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_omnichannel_settings 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_omnichannel_settings ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.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_omnichannel_settings({ 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_omnichannel_settings(::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.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_omnichannel_settings_client_stub.call_rpc_count - end - end - - def test_create_omnichannel_setting - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - omnichannel_setting = {} - - create_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_omnichannel_setting, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting), request["omnichannel_setting"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_omnichannel_setting_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_omnichannel_setting parent: parent, omnichannel_setting: omnichannel_setting do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_omnichannel_setting_client_stub.call_rpc_count - end - end - - def test_update_omnichannel_setting - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - omnichannel_setting = {} - update_mask = {} - - update_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_omnichannel_setting, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting), request["omnichannel_setting"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_omnichannel_setting_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_omnichannel_setting omnichannel_setting: omnichannel_setting, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, 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_omnichannel_setting({ omnichannel_setting: omnichannel_setting, 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_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, 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_omnichannel_setting_client_stub.call_rpc_count - end - end - - def test_request_inventory_verification - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_inventory_verification_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :request_inventory_verification, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, request_inventory_verification_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.request_inventory_verification({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.request_inventory_verification name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.request_inventory_verification ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.request_inventory_verification({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.request_inventory_verification(::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, request_inventory_verification_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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb deleted file mode 100644 index c8399e11c1e1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_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/shopping/merchant/accounts/v1beta/online_return_policy_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_online_return_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.online_return_policy_path account: "value0", return_policy: "value1" - assert_equal "accounts/value0/onlineReturnPolicies/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb deleted file mode 100644 index ede70ccbb768..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_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/shopping/merchant/accounts/v1beta/online_return_policy_pb" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_online_return_policy - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_online_return_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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_get_online_return_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_online_return_policy_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_online_return_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_online_return_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_online_return_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_online_return_policy_client_stub.call_count - end - end - end - - def test_list_online_return_policies - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse.new - http_response = OpenStruct.new 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_online_return_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_list_online_return_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_online_return_policies_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_online_return_policies({ 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_online_return_policies 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_online_return_policies ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.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_online_return_policies({ 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_online_return_policies(::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.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_online_return_policies_client_stub.call_count - end - end - end - - def test_create_online_return_policy - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - online_return_policy = {} - - create_online_return_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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_create_online_return_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_online_return_policy_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_online_return_policy parent: parent, online_return_policy: online_return_policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_online_return_policy_client_stub.call_count - end - end - end - - def test_update_online_return_policy - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - online_return_policy = {} - update_mask = {} - - update_online_return_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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_update_online_return_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_online_return_policy_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_online_return_policy online_return_policy: online_return_policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_online_return_policy_client_stub.call_count - end - end - end - - def test_delete_online_return_policy - # 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_online_return_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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_delete_online_return_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_online_return_policy_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_online_return_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_online_return_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_online_return_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_online_return_policy_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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb deleted file mode 100644 index f054d7d1a895..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_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/shopping/merchant/accounts/v1beta/online_return_policy_pb" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_online_return_policy - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_online_return_policy, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_online_return_policy_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_online_return_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_online_return_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_online_return_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_online_return_policy_client_stub.call_rpc_count - end - end - - def test_list_online_return_policies - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_online_return_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_online_return_policies, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, 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_online_return_policies_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_online_return_policies({ 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_online_return_policies 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_online_return_policies ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.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_online_return_policies({ 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_online_return_policies(::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.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_online_return_policies_client_stub.call_rpc_count - end - end - - def test_create_online_return_policy - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - online_return_policy = {} - - create_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_online_return_policy, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy), request["online_return_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_online_return_policy_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_online_return_policy parent: parent, online_return_policy: online_return_policy do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_online_return_policy_client_stub.call_rpc_count - end - end - - def test_update_online_return_policy - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - online_return_policy = {} - update_mask = {} - - update_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_online_return_policy, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy), request["online_return_policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_online_return_policy_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_online_return_policy online_return_policy: online_return_policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_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.update_online_return_policy({ online_return_policy: online_return_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.update_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_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, update_online_return_policy_client_stub.call_rpc_count - end - end - - def test_delete_online_return_policy - # 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_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_online_return_policy, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_online_return_policy_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_online_return_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_online_return_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_online_return_policy({ 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_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(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_online_return_policy_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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb deleted file mode 100644 index 380202e72500..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_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/shopping/merchant/accounts/v1beta/programs_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_program_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.program_path account: "value0", program: "value1" - assert_equal "accounts/value0/programs/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb deleted file mode 100644 index 8fa3f03539fd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb +++ /dev/null @@ -1,317 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/programs_pb" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_program - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_get_program_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_program_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_program({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_program name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_program ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_program({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_program(::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_program_client_stub.call_count - end - end - end - - def test_list_programs - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse.new - http_response = OpenStruct.new 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_programs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_list_programs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_programs_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_programs({ 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_programs 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_programs ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.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_programs({ 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_programs(::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.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_programs_client_stub.call_count - end - end - end - - def test_enable_program - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - enable_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_enable_program_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, enable_program_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.enable_program({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.enable_program name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.enable_program ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.enable_program({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.enable_program(::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, enable_program_client_stub.call_count - end - end - end - - def test_disable_program - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - disable_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_disable_program_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, disable_program_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.disable_program({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.disable_program name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.disable_program ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.disable_program({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.disable_program(::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, disable_program_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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb deleted file mode 100644 index 55c85f6f4f8c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb +++ /dev/null @@ -1,345 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/programs_pb" -require "google/shopping/merchant/accounts/v1beta/programs_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_program - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_program, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_program_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_program({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_program name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_program ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_program({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_program(::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_program_client_stub.call_rpc_count - end - end - - def test_list_programs - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_programs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_programs, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, 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_programs_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_programs({ 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_programs 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_programs ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.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_programs({ 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_programs(::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.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_programs_client_stub.call_rpc_count - end - end - - def test_enable_program - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - enable_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :enable_program, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, enable_program_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.enable_program({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.enable_program name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.enable_program ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.enable_program({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.enable_program(::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, enable_program_client_stub.call_rpc_count - end - end - - def test_disable_program - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - disable_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :disable_program, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, disable_program_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.disable_program({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.disable_program name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.disable_program ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.disable_program({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.disable_program(::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, disable_program_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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb deleted file mode 100644 index 698e3d23528b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_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/shopping/merchant/accounts/v1beta/regions_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_region_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.region_path account: "value0", region: "value1" - assert_equal "accounts/value0/regions/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb deleted file mode 100644 index a723d17c1ef9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_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/shopping/merchant/accounts/v1beta/regions_pb" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_region - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_get_region_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_region_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_region({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_region name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_region ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_region({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_region(::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_region_client_stub.call_count - end - end - end - - def test_create_region - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - region_id = "hello world" - region = {} - - create_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_create_region_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_region_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_region({ parent: parent, region_id: region_id, region: region }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_region parent: parent, region_id: region_id, region: region do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_region ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_region({ parent: parent, region_id: region_id, region: region }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_region(::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_region_client_stub.call_count - end - end - end - - def test_update_region - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - region = {} - update_mask = {} - - update_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_update_region_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_region_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_region({ region: region, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_region region: region, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_region ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_region({ region: region, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_region(::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_region_client_stub.call_count - end - end - end - - def test_delete_region - # 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_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_delete_region_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_region_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_region({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_region name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_region ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_region({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_region(::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_region_client_stub.call_count - end - end - end - - def test_list_regions - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse.new - http_response = OpenStruct.new 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_regions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_list_regions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_regions_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_regions({ 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_regions 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_regions ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.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_regions({ 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_regions(::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.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_regions_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::Shopping::Merchant::Accounts::V1beta::RegionsService::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::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb deleted file mode 100644 index 3de4bc7e5d6d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_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/shopping/merchant/accounts/v1beta/regions_pb" -require "google/shopping/merchant/accounts/v1beta/regions_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_region - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_region, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_region_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_region({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_region name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_region ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_region({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_region(::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_region_client_stub.call_rpc_count - end - end - - def test_create_region - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - region_id = "hello world" - region = {} - - create_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_region, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["region_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Region), request["region"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_region_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_region({ parent: parent, region_id: region_id, region: region }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_region parent: parent, region_id: region_id, region: region do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_region ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_region({ parent: parent, region_id: region_id, region: region }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_region(::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_region_client_stub.call_rpc_count - end - end - - def test_update_region - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - region = {} - update_mask = {} - - update_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_region, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Region), request["region"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_region_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_region({ region: region, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_region region: region, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_region ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, 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_region({ region: region, 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_region(::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, 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_region_client_stub.call_rpc_count - end - end - - def test_delete_region - # 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_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_region, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_region_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_region({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_region name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_region ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_region({ 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_region(::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(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_region_client_stub.call_rpc_count - end - end - - def test_list_regions - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_regions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_regions, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, 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_regions_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_regions({ 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_regions 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_regions ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.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_regions({ 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_regions(::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.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_regions_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::Shopping::Merchant::Accounts::V1beta::RegionsService::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::Shopping::Merchant::Accounts::V1beta::RegionsService::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::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb deleted file mode 100644 index 555555c1a601..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_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/shopping/merchant/accounts/v1beta/shipping_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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_shipping_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.shipping_settings_path account: "value0" - assert_equal "accounts/value0/shippingSettings", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb deleted file mode 100644 index 77fe6e8fd271..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_shipping_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_shipping_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ServiceStub.stub :transcode_get_shipping_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_shipping_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_shipping_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_shipping_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_shipping_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_shipping_settings_client_stub.call_count - end - end - end - - def test_insert_shipping_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - shipping_setting = {} - - insert_shipping_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ServiceStub.stub :transcode_insert_shipping_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_shipping_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_shipping_settings parent: parent, shipping_setting: shipping_setting do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_shipping_settings_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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb deleted file mode 100644 index 286e3664d046..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_shipping_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_shipping_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_shipping_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_shipping_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_shipping_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_shipping_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_shipping_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_shipping_settings_client_stub.call_rpc_count - end - end - - def test_insert_shipping_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - shipping_setting = {} - - insert_shipping_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_shipping_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings), request["shipping_setting"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_shipping_settings_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_shipping_settings parent: parent, shipping_setting: shipping_setting do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_shipping_settings_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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb deleted file mode 100644 index eecca8da77a7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_terms_of_service_agreement_state_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.terms_of_service_agreement_state_path account: "value0", identifier: "value1" - assert_equal "accounts/value0/termsOfServiceAgreementStates/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb deleted file mode 100644 index dba090afafbc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb +++ /dev/null @@ -1,207 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_terms_of_service_agreement_state - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_terms_of_service_agreement_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ServiceStub.stub :transcode_get_terms_of_service_agreement_state_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_terms_of_service_agreement_state_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_terms_of_service_agreement_state({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_terms_of_service_agreement_state name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_terms_of_service_agreement_state({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_terms_of_service_agreement_state_client_stub.call_count - end - end - end - - def test_retrieve_for_application_terms_of_service_agreement_state - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - retrieve_for_application_terms_of_service_agreement_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ServiceStub.stub :transcode_retrieve_for_application_terms_of_service_agreement_state_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, retrieve_for_application_terms_of_service_agreement_state_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.retrieve_for_application_terms_of_service_agreement_state parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.retrieve_for_application_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.retrieve_for_application_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, retrieve_for_application_terms_of_service_agreement_state_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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb deleted file mode 100644 index 25e259c93e99..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb +++ /dev/null @@ -1,220 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_terms_of_service_agreement_state - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_terms_of_service_agreement_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_terms_of_service_agreement_state, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_terms_of_service_agreement_state_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_terms_of_service_agreement_state({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_terms_of_service_agreement_state name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_terms_of_service_agreement_state({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_terms_of_service_agreement_state_client_stub.call_rpc_count - end - end - - def test_retrieve_for_application_terms_of_service_agreement_state - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - retrieve_for_application_terms_of_service_agreement_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :retrieve_for_application_terms_of_service_agreement_state, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, request - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, retrieve_for_application_terms_of_service_agreement_state_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.retrieve_for_application_terms_of_service_agreement_state parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.retrieve_for_application_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.retrieve_for_application_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, retrieve_for_application_terms_of_service_agreement_state_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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb deleted file mode 100644 index cecc22896b0b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_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/shopping/merchant/accounts/v1beta/terms_of_service_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_terms_of_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.terms_of_service_path version: "value0" - assert_equal "termsOfService/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb deleted file mode 100644 index f59573067f69..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb +++ /dev/null @@ -1,264 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_terms_of_service - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.stub :transcode_get_terms_of_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_terms_of_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_terms_of_service({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_terms_of_service name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_terms_of_service({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_terms_of_service_client_stub.call_count - end - end - end - - def test_retrieve_latest_terms_of_service - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - region_code = "hello world" - kind = :TERMS_OF_SERVICE_KIND_UNSPECIFIED - - retrieve_latest_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.stub :transcode_retrieve_latest_terms_of_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, retrieve_latest_terms_of_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.retrieve_latest_terms_of_service region_code: region_code, kind: kind do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.retrieve_latest_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.retrieve_latest_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, retrieve_latest_terms_of_service_client_stub.call_count - end - end - end - - def test_accept_terms_of_service - # 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" - account = "hello world" - region_code = "hello world" - - accept_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.stub :transcode_accept_terms_of_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, accept_terms_of_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.accept_terms_of_service({ name: name, account: account, region_code: region_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.accept_terms_of_service name: name, account: account, region_code: region_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.accept_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.accept_terms_of_service({ name: name, account: account, region_code: region_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.accept_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, accept_terms_of_service_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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb deleted file mode 100644 index f27cd96690b9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb +++ /dev/null @@ -1,284 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_terms_of_service - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_terms_of_service, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_terms_of_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_terms_of_service({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_terms_of_service name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_terms_of_service({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_terms_of_service_client_stub.call_rpc_count - end - end - - def test_retrieve_latest_terms_of_service - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - region_code = "hello world" - kind = :TERMS_OF_SERVICE_KIND_UNSPECIFIED - - retrieve_latest_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :retrieve_latest_terms_of_service, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, request - assert_equal "hello world", request["region_code"] - assert_equal :TERMS_OF_SERVICE_KIND_UNSPECIFIED, request["kind"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, retrieve_latest_terms_of_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.retrieve_latest_terms_of_service region_code: region_code, kind: kind do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.retrieve_latest_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.retrieve_latest_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, retrieve_latest_terms_of_service_client_stub.call_rpc_count - end - end - - def test_accept_terms_of_service - # 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" - account = "hello world" - region_code = "hello world" - - accept_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :accept_terms_of_service, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["account"] - assert_equal "hello world", request["region_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, accept_terms_of_service_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.accept_terms_of_service({ name: name, account: account, region_code: region_code }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.accept_terms_of_service name: name, account: account, region_code: region_code do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.accept_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.accept_terms_of_service({ name: name, account: account, region_code: region_code }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.accept_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, accept_terms_of_service_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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb deleted file mode 100644 index e71cf60afd5d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/user_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_user_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.user_path account: "value0", email: "value1" - assert_equal "accounts/value0/users/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb deleted file mode 100644 index daa6c9cc28f4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/user_pb" -require "google/shopping/merchant/accounts/v1beta/user_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_user - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_get_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_user_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_user({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_user name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_user ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_user({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_user(::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_user_client_stub.call_count - end - end - end - - def test_create_user - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - user_id = "hello world" - user = {} - - create_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_create_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_user_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_user({ parent: parent, user_id: user_id, user: user }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_user parent: parent, user_id: user_id, user: user do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_user ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_user({ parent: parent, user_id: user_id, user: user }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_user(::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_user_client_stub.call_count - end - end - end - - def test_delete_user - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_delete_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_user_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_user({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_user name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_user ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_user({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_user(::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_user_client_stub.call_count - end - end - end - - def test_update_user - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - user = {} - update_mask = {} - - update_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_update_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_user_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_user({ user: user, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_user user: user, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_user ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_user({ user: user, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_user(::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_user_client_stub.call_count - end - end - end - - def test_list_users - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse.new - http_response = OpenStruct.new 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_users_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_list_users_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_users_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_users({ 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_users 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_users ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.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_users({ 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_users(::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.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_users_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::Shopping::Merchant::Accounts::V1beta::UserService::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::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb deleted file mode 100644 index b3a4ce248cd1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/user_pb" -require "google/shopping/merchant/accounts/v1beta/user_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::UserService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_user - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_user, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_user_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_user({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_user name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_user ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_user({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_user(::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_user_client_stub.call_rpc_count - end - end - - def test_create_user - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - user_id = "hello world" - user = {} - - create_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_user, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["user_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::User), request["user"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_user_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_user({ parent: parent, user_id: user_id, user: user }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_user parent: parent, user_id: user_id, user: user do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_user ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_user({ parent: parent, user_id: user_id, user: user }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_user(::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_user_client_stub.call_rpc_count - end - end - - def test_delete_user - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_user, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_user_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_user({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_user name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_user ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_user({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_user(::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_user_client_stub.call_rpc_count - end - end - - def test_update_user - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - user = {} - update_mask = {} - - update_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_user, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::User), request["user"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_user_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_user({ user: user, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_user user: user, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_user ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, 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_user({ user: user, 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_user(::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, 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_user_client_stub.call_rpc_count - end - end - - def test_list_users - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_users_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_users, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, 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_users_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_users({ 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_users 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_users ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.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_users({ 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_users(::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.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_users_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::Shopping::Merchant::Accounts::V1beta::UserService::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::Shopping::Merchant::Accounts::V1beta::UserService::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::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/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-shopping-merchant-conversions-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-conversions-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json deleted file mode 100644 index 20ec393175c4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-conversions-v1", - "distribution_name": "google-shopping-merchant-conversions-v1", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1 API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-conversions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml deleted file mode 100644 index dc26bdfd3a23..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-conversions-v1/.yardopts deleted file mode 100644 index dc7bbc10ae29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant 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-shopping-merchant-conversions-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/AUTHENTICATION.md deleted file mode 100644 index 6489474b1d66..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-conversions-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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1" - -client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/conversions/v1" - -::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/README.md deleted file mode 100644 index 97b49a0c376c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Merchant V1 API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1 API. Most users should consider using -the main client gem, -[google-shopping-merchant-conversions](https://rubygems.org/gems/google-shopping-merchant-conversions). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-conversions-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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/conversions/v1" - -client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new -request = ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new # (request fields as keyword arguments...) -response = client.create_conversion_source request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-conversions-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/conversions/v1" -require "logger" - -client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-conversions-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-shopping-merchant-conversions`. -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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-conversions-v1/Rakefile deleted file mode 100644 index 09036b63c7b4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1/conversion_sources_service/credentials" - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-conversions-v1" - header "google-shopping-merchant-conversions-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-conversions-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1/gapic_metadata.json deleted file mode 100644 index c91c1680b96f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/gapic_metadata.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.conversions.v1", - "libraryPackage": "::Google::Shopping::Merchant::Conversions::V1", - "services": { - "ConversionSourcesService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client", - "rpcs": { - "CreateConversionSource": { - "methods": [ - "create_conversion_source" - ] - }, - "UpdateConversionSource": { - "methods": [ - "update_conversion_source" - ] - }, - "DeleteConversionSource": { - "methods": [ - "delete_conversion_source" - ] - }, - "UndeleteConversionSource": { - "methods": [ - "undelete_conversion_source" - ] - }, - "GetConversionSource": { - "methods": [ - "get_conversion_source" - ] - }, - "ListConversionSources": { - "methods": [ - "list_conversion_sources" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec b/owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec deleted file mode 100644 index 10b07396a830..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/conversions/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-conversions-v1" - gem.version = Google::Shopping::Merchant::Conversions::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-conversions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center Accounts." - 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-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb deleted file mode 100644 index 2992146c576e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-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/shopping/merchant/conversions/v1" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb deleted file mode 100644 index d3e68a85ea00..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/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/shopping/merchant/conversions/v1/conversion_sources_service" -require "google/shopping/merchant/conversions/v1/version" - -module Google - module Shopping - module Merchant - module Conversions - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/conversions/v1" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/conversions/v1" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/merchant/conversions/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb deleted file mode 100644 index ec823442ad31..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/conversions/v1/version" - -require "google/shopping/merchant/conversions/v1/conversion_sources_service/credentials" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/paths" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/client" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - ## - # Service for managing conversion sources for a merchant account. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/conversions/v1/conversion_sources_service" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - module ConversionSourcesService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "conversion_sources_service", "helpers.rb" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb deleted file mode 100644 index 722cc061f37f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb +++ /dev/null @@ -1,973 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/conversions/v1/conversionsources_pb" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - ## - # Client for the ConversionSourcesService service. - # - # Service for managing conversion sources for a merchant account. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :conversion_sources_service_stub - - ## - # Configure the ConversionSourcesService Client class. - # - # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ConversionSourcesService clients - # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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", "Shopping", "Merchant", "Conversions", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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 - @conversion_sources_service_stub.universe_domain - end - - ## - # Create a new ConversionSourcesService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ConversionSourcesService 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/shopping/merchant/conversions/v1/conversionsources_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 - - @conversion_sources_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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 - ) - - @conversion_sources_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 - @conversion_sources_service_stub.logger - end - - # Service calls - - ## - # Creates a new conversion source. - # - # @overload create_conversion_source(request, options = nil) - # Pass arguments to `create_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_conversion_source(parent: nil, conversion_source: nil) - # Pass arguments to `create_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that will own the new conversion source. - # Format: `accounts/{account}` - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new - # - # # Call the create_conversion_source method. - # result = client.create_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def create_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest - - # Converts hash and nil to 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_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :create_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - # - # @overload update_conversion_source(request, options = nil) - # Pass arguments to `update_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_conversion_source(conversion_source: nil, update_mask: nil) - # Pass arguments to `update_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] - # Required. The new version of the conversion source data. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new - # - # # Call the update_conversion_source method. - # result = client.update_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def update_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest - - # Converts hash and nil to 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_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.conversion_source&.name - header_params["conversion_source.name"] = request.conversion_source.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :update_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - # - # @overload delete_conversion_source(request, options = nil) - # Pass arguments to `delete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_conversion_source(name: nil) - # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be deleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # - # @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/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new - # - # # Call the delete_conversion_source method. - # result = client.delete_conversion_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :delete_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - # - # @overload undelete_conversion_source(request, options = nil) - # Pass arguments to `undelete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload undelete_conversion_source(name: nil) - # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be undeleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new - # - # # Call the undelete_conversion_source method. - # result = client.undelete_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def undelete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.undelete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.undelete_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.undelete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :undelete_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches a conversion source. - # - # @overload get_conversion_source(request, options = nil) - # Pass arguments to `get_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_conversion_source(name: nil) - # Pass arguments to `get_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be fetched. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new - # - # # Call the get_conversion_source method. - # result = client.get_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def get_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :get_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the list of conversion sources the caller has access to. - # - # @overload list_conversion_sources(request, options = nil) - # Pass arguments to `list_conversion_sources` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) - # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @param page_token [::String] - # Optional. Page token. - # @param show_deleted [::Boolean] - # Optional. Show deleted (archived) conversion sources. By default, deleted - # conversion sources are not returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new - # - # # Call the list_conversion_sources method. - # result = client.list_conversion_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p item - # end - # - def list_conversion_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_conversion_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_conversion_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_conversion_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :list_conversion_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ConversionSourcesService API. - # - # This class represents the configuration for ConversionSourcesService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_conversion_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ConversionSourcesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_conversion_source - ## - # RPC-specific configuration for `update_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_conversion_source - ## - # RPC-specific configuration for `delete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_conversion_source - ## - # RPC-specific configuration for `undelete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :undelete_conversion_source - ## - # RPC-specific configuration for `get_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_conversion_source - ## - # RPC-specific configuration for `list_conversion_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_conversion_sources - - # @private - def initialize parent_rpcs = nil - create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source - @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config - update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source - @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config - delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source - @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config - undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source - @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config - get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source - @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config - list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources - @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb deleted file mode 100644 index c408f4a3e17b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_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 Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - # Credentials for the ConversionSourcesService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb deleted file mode 100644 index 58f06044072d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_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 Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - # Path helper methods for the ConversionSourcesService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified ConversionSource resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/conversionSources/{conversion_source}` - # - # @param account [String] - # @param conversion_source [String] - # - # @return [::String] - def conversion_source_path account:, conversion_source: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/conversionSources/#{conversion_source}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb deleted file mode 100644 index c4ae00d76953..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_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/shopping/merchant/conversions/v1/version" - -require "google/shopping/merchant/conversions/v1/conversion_sources_service/credentials" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/paths" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - ## - # Service for managing conversion sources for a merchant account. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - module ConversionSourcesService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb deleted file mode 100644 index 14c77d5fe348..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb +++ /dev/null @@ -1,888 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/conversions/v1/conversionsources_pb" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - module Rest - ## - # REST client for the ConversionSourcesService service. - # - # Service for managing conversion sources for a merchant account. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :conversion_sources_service_stub - - ## - # Configure the ConversionSourcesService Client class. - # - # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ConversionSourcesService clients - # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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", "Shopping", "Merchant", "Conversions", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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 - @conversion_sources_service_stub.universe_domain - end - - ## - # Create a new ConversionSourcesService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ConversionSourcesService 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 - - @conversion_sources_service_stub = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @conversion_sources_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 - @conversion_sources_service_stub.logger - end - - # Service calls - - ## - # Creates a new conversion source. - # - # @overload create_conversion_source(request, options = nil) - # Pass arguments to `create_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_conversion_source(parent: nil, conversion_source: nil) - # Pass arguments to `create_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that will own the new conversion source. - # Format: `accounts/{account}` - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new - # - # # Call the create_conversion_source method. - # result = client.create_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def create_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest - - # Converts hash and nil to an 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_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.create_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - # - # @overload update_conversion_source(request, options = nil) - # Pass arguments to `update_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_conversion_source(conversion_source: nil, update_mask: nil) - # Pass arguments to `update_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] - # Required. The new version of the conversion source data. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new - # - # # Call the update_conversion_source method. - # result = client.update_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def update_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest - - # Converts hash and nil to an 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_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.update_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - # - # @overload delete_conversion_source(request, options = nil) - # Pass arguments to `delete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_conversion_source(name: nil) - # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be deleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # @yield [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/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new - # - # # Call the delete_conversion_source method. - # result = client.delete_conversion_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.delete_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - # - # @overload undelete_conversion_source(request, options = nil) - # Pass arguments to `undelete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload undelete_conversion_source(name: nil) - # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be undeleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new - # - # # Call the undelete_conversion_source method. - # result = client.undelete_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def undelete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.undelete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.undelete_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.undelete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.undelete_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches a conversion source. - # - # @overload get_conversion_source(request, options = nil) - # Pass arguments to `get_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_conversion_source(name: nil) - # Pass arguments to `get_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be fetched. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new - # - # # Call the get_conversion_source method. - # result = client.get_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def get_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.get_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the list of conversion sources the caller has access to. - # - # @overload list_conversion_sources(request, options = nil) - # Pass arguments to `list_conversion_sources` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) - # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @param page_token [::String] - # Optional. Page token. - # @param show_deleted [::Boolean] - # Optional. Show deleted (archived) conversion sources. By default, deleted - # conversion sources are not returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new - # - # # Call the list_conversion_sources method. - # result = client.list_conversion_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p item - # end - # - def list_conversion_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_conversion_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_conversion_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_conversion_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.list_conversion_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, "conversion_sources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ConversionSourcesService REST API. - # - # This class represents the configuration for ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ConversionSourcesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_conversion_source - ## - # RPC-specific configuration for `update_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_conversion_source - ## - # RPC-specific configuration for `delete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_conversion_source - ## - # RPC-specific configuration for `undelete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :undelete_conversion_source - ## - # RPC-specific configuration for `get_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_conversion_source - ## - # RPC-specific configuration for `list_conversion_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_conversion_sources - - # @private - def initialize parent_rpcs = nil - create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source - @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config - update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source - @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config - delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source - @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config - undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source - @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config - get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source - @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config - list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources - @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb deleted file mode 100644 index cba0818d9244..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb +++ /dev/null @@ -1,452 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/conversions/v1/conversionsources_pb" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - module Rest - ## - # REST service stub for the ConversionSourcesService 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_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # A result object deserialized from the server's reply - def create_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.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_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # A result object deserialized from the server's reply - def update_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.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_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_conversion_source", - 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 undelete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # A result object deserialized from the server's reply - def undelete_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_undelete_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "undelete_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # A result object deserialized from the server's reply - def get_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.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_conversion_sources REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse] - # A result object deserialized from the server's reply - def list_conversion_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_conversion_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_conversion_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.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_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest] - # 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_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/conversions/v1/{parent}/conversionSources", - body: "conversion_source", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest] - # 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_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/conversions/v1/{conversion_source.name}", - body: "conversion_source", - matches: [ - ["conversion_source.name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/conversions/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the undelete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_undelete_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/conversions/v1/{name}:undelete", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/conversions/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_conversion_sources REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_conversion_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/conversions/v1/{parent}/conversionSources", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb deleted file mode 100644 index 4a8730f21f3b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/conversions/v1/conversionsources.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n?google/shopping/merchant/conversions/v1/conversionsources.proto\x12\'google.shopping.merchant.conversions.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9a\x06\n\x10\x43onversionSource\x12\x62\n\x15google_analytics_link\x18\x03 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.GoogleAnalyticsLinkB\x03\xe0\x41\x05H\x00\x12i\n\x1bmerchant_center_destination\x18\x04 \x01(\x0b\x32\x42.google.shopping.merchant.conversions.v1.MerchantCenterDestinationH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12S\n\x05state\x18\x05 \x01(\x0e\x32?.google.shopping.merchant.conversions.v1.ConversionSource.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12]\n\ncontroller\x18\x07 \x01(\x0e\x32\x44.google.shopping.merchant.conversions.v1.ConversionSource.ControllerB\x03\xe0\x41\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x41RCHIVED\x10\x02\x12\x0b\n\x07PENDING\x10\x03\"N\n\nController\x12\x1a\n\x16\x43ONTROLLER_UNSPECIFIED\x10\x00\x12\x0c\n\x08MERCHANT\x10\x01\x12\x16\n\x12YOUTUBE_AFFILIATES\x10\x02:\x90\x01\xea\x41\x8c\x01\n+merchantapi.googleapis.com/ConversionSource\x12\x38\x61\x63\x63ounts/{account}/conversionSources/{conversion_source}*\x11\x63onversionSources2\x10\x63onversionSourceB\r\n\x0bsource_data\"\xe7\x04\n\x13\x41ttributionSettings\x12-\n attribution_lookback_window_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12m\n\x11\x61ttribution_model\x18\x02 \x01(\x0e\x32M.google.shopping.merchant.conversions.v1.AttributionSettings.AttributionModelB\x03\xe0\x41\x02\x12l\n\x0f\x63onversion_type\x18\x03 \x03(\x0b\x32K.google.shopping.merchant.conversions.v1.AttributionSettings.ConversionTypeB\x06\xe0\x41\x06\xe0\x41\x05\x1a\x38\n\x0e\x43onversionType\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06report\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\"\x89\x02\n\x10\x41ttributionModel\x12!\n\x1d\x41TTRIBUTION_MODEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x43ROSS_CHANNEL_LAST_CLICK\x10\x01\x12\x1c\n\x18\x41\x44S_PREFERRED_LAST_CLICK\x10\x02\x12\x1d\n\x19\x43ROSS_CHANNEL_DATA_DRIVEN\x10\x05\x12\x1d\n\x19\x43ROSS_CHANNEL_FIRST_CLICK\x10\x06\x12\x18\n\x14\x43ROSS_CHANNEL_LINEAR\x10\x07\x12 \n\x1c\x43ROSS_CHANNEL_POSITION_BASED\x10\x08\x12\x1c\n\x18\x43ROSS_CHANNEL_TIME_DECAY\x10\t\"\xaa\x01\n\x13GoogleAnalyticsLink\x12\x1b\n\x0bproperty_id\x18\x01 \x01(\x03\x42\x06\xe0\x41\x02\xe0\x41\x05\x12_\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.AttributionSettingsB\x03\xe0\x41\x03\x12\x15\n\x08property\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xcd\x01\n\x19MerchantCenterDestination\x12\x18\n\x0b\x64\x65stination\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12_\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.AttributionSettingsB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xbf\x01\n\x1d\x43reateConversionSourceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12Y\n\x11\x63onversion_source\x18\x02 \x01(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSourceB\x03\xe0\x41\x02\"\xb0\x01\n\x1dUpdateConversionSourceRequest\x12Y\n\x11\x63onversion_source\x18\x01 \x01(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSourceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"b\n\x1d\x44\x65leteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"d\n\x1fUndeleteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"_\n\x1aGetConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"\xaf\x01\n\x1cListConversionSourcesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12\x16\n\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\x19\n\x0cshow_deleted\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x8f\x01\n\x1dListConversionSourcesResponse\x12U\n\x12\x63onversion_sources\x18\x01 \x03(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x8e\x0c\n\x18\x43onversionSourcesService\x12\x88\x02\n\x16\x43reateConversionSource\x12\x46.google.shopping.merchant.conversions.v1.CreateConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"k\xda\x41\x18parent,conversion_source\x82\xd3\xe4\x93\x02J\"5/conversions/v1/{parent=accounts/*}/conversionSources:\x11\x63onversion_source\x12\xa0\x02\n\x16UpdateConversionSource\x12\x46.google.shopping.merchant.conversions.v1.UpdateConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"\x82\x01\xda\x41\x1d\x63onversion_source,update_mask\x82\xd3\xe4\x93\x02\\2G/conversions/v1/{conversion_source.name=accounts/*/conversionSources/*}:\x11\x63onversion_source\x12\xbe\x01\n\x16\x44\x65leteConversionSource\x12\x46.google.shopping.merchant.conversions.v1.DeleteConversionSourceRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/conversions/v1/{name=accounts/*/conversionSources/*}\x12\xea\x01\n\x18UndeleteConversionSource\x12H.google.shopping.merchant.conversions.v1.UndeleteConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"I\x82\xd3\xe4\x93\x02\x43\">/conversions/v1/{name=accounts/*/conversionSources/*}:undelete:\x01*\x12\xdb\x01\n\x13GetConversionSource\x12\x43.google.shopping.merchant.conversions.v1.GetConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/conversions/v1/{name=accounts/*/conversionSources/*}\x12\xee\x01\n\x15ListConversionSources\x12\x45.google.shopping.merchant.conversions.v1.ListConversionSourcesRequest\x1a\x46.google.shopping.merchant.conversions.v1.ListConversionSourcesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/conversions/v1/{parent=accounts/*}/conversionSources\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xd9\x02\n+com.google.shopping.merchant.conversions.v1B\x16\x43onversionSourcesProtoP\x01ZScloud.google.com/go/shopping/merchant/conversions/apiv1/conversionspb;conversionspb\xaa\x02\'Google.Shopping.Merchant.Conversions.V1\xca\x02\'Google\\Shopping\\Merchant\\Conversions\\V1\xea\x02+Google::Shopping::Merchant::Conversions::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Conversions - module V1 - ConversionSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource").msgclass - ConversionSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource.State").enummodule - ConversionSource::Controller = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource.Controller").enummodule - AttributionSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings").msgclass - AttributionSettings::ConversionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings.ConversionType").msgclass - AttributionSettings::AttributionModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings.AttributionModel").enummodule - GoogleAnalyticsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.GoogleAnalyticsLink").msgclass - MerchantCenterDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.MerchantCenterDestination").msgclass - CreateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.CreateConversionSourceRequest").msgclass - UpdateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.UpdateConversionSourceRequest").msgclass - DeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.DeleteConversionSourceRequest").msgclass - UndeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.UndeleteConversionSourceRequest").msgclass - GetConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.GetConversionSourceRequest").msgclass - ListConversionSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ListConversionSourcesRequest").msgclass - ListConversionSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ListConversionSourcesResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb deleted file mode 100644 index 45549ad85a8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/conversions/v1/conversionsources.proto for package 'Google.Shopping.Merchant.Conversions.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/shopping/merchant/conversions/v1/conversionsources_pb' - -module Google - module Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - # Service for managing conversion sources for a merchant account. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.conversions.v1.ConversionSourcesService' - - # Creates a new conversion source. - rpc :CreateConversionSource, ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - rpc :UpdateConversionSource, ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - rpc :DeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::Google::Protobuf::Empty - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - rpc :UndeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource - # Fetches a conversion source. - rpc :GetConversionSource, ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource - # Retrieves the list of conversion sources the caller has access to. - rpc :ListConversionSources, ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb deleted file mode 100644 index 851e5c7243ac..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/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/shopping/merchant/conversions/v1/conversion_sources_service/rest" -require "google/shopping/merchant/conversions/v1/version" - -module Google - module Shopping - module Merchant - module Conversions - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/conversions/v1/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb deleted file mode 100644 index 09fb85215856..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/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 Shopping - module Merchant - module Conversions - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md deleted file mode 100644 index 110adc2cf42e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant 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-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb deleted file mode 100644 index f308c62c77bc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb +++ /dev/null @@ -1,289 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Conversions - module V1 - # Represents a conversion source owned by a Merchant account. A merchant - # account can have up to 200 conversion sources. - # @!attribute [rw] google_analytics_link - # @return [::Google::Shopping::Merchant::Conversions::V1::GoogleAnalyticsLink] - # Immutable. Conversion Source of type "Link to Google Analytics Property". - # - # Note: The following fields are mutually exclusive: `google_analytics_link`, `merchant_center_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] merchant_center_destination - # @return [::Google::Shopping::Merchant::Conversions::V1::MerchantCenterDestination] - # Conversion Source of type "Merchant Center Tag Destination". - # - # Note: The following fields are mutually exclusive: `merchant_center_destination`, `google_analytics_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Generated by the Content API upon creation of a - # new `ConversionSource`. Format: `[a-z]{4}:.+` The four characters before - # the colon represent the type of conversion source. Content after the colon - # represents the ID of the conversion source within that type. The ID of two - # different conversion sources might be the same across different types. The - # following type prefixes are supported: - # * `galk`: For GoogleAnalyticsLink sources. - # * `mcdn`: For MerchantCenterDestination sources. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource::State] - # Output only. Current state of this conversion source. Can't be edited - # through the API. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when an archived conversion source becomes - # permanently deleted and is no longer available to undelete. - # @!attribute [r] controller - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource::Controller] - # Output only. Controller of the conversion source. - class ConversionSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the state of a conversion source. - module State - # Conversion source has unspecified state. - STATE_UNSPECIFIED = 0 - - # Conversion source is fully functional. - ACTIVE = 1 - - # Conversion source has been archived in the last 30 days and is currently - # not functional. Can be restored using the undelete method. - ARCHIVED = 2 - - # Conversion source creation has started but not fully finished yet. - PENDING = 3 - end - - # Entity controlling the conversion source. - module Controller - # Default value. This value is unused. - CONTROLLER_UNSPECIFIED = 0 - - # Controlled by the Merchant who owns the Conversion Source. - MERCHANT = 1 - - # Controlled by the Youtube Affiliates program. - YOUTUBE_AFFILIATES = 2 - end - end - - # Represents attribution settings for conversion sources receiving - # pre-attribution data. - # @!attribute [rw] attribution_lookback_window_days - # @return [::Integer] - # Required. Lookback window (in days) used for attribution in this source. - # Supported values are `7`, `30` & `40`. - # @!attribute [rw] attribution_model - # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings::AttributionModel] - # Required. Attribution model. - # @!attribute [rw] conversion_type - # @return [::Array<::Google::Shopping::Merchant::Conversions::V1::AttributionSettings::ConversionType>] - # Immutable. Unordered list. List of different conversion types a conversion - # event can be classified as. A standard "purchase" type will be - # automatically created if this list is empty at creation time. - class AttributionSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Message representing the type of a conversion event. - # @!attribute [r] name - # @return [::String] - # Output only. Conversion event name, as it'll be reported by the client. - # @!attribute [r] report - # @return [::Boolean] - # Output only. Option indicating if the type should be included in Merchant - # Center reporting. - class ConversionType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The attribution model used for this source. We support the same set of - # [models offered by Google Analytics - # 4](https://support.google.com/analytics/answer/10596866). - module AttributionModel - # Unspecified model. - ATTRIBUTION_MODEL_UNSPECIFIED = 0 - - # Cross-channel Last Click model. - CROSS_CHANNEL_LAST_CLICK = 1 - - # Ads-preferred Last Click model. - ADS_PREFERRED_LAST_CLICK = 2 - - # Cross-channel Data Driven model. - CROSS_CHANNEL_DATA_DRIVEN = 5 - - # Cross-channel First Click model. - CROSS_CHANNEL_FIRST_CLICK = 6 - - # Cross-channel Linear model. - CROSS_CHANNEL_LINEAR = 7 - - # Cross-channel Position Based model. - CROSS_CHANNEL_POSITION_BASED = 8 - - # Cross-channel Time Decay model. - CROSS_CHANNEL_TIME_DECAY = 9 - end - end - - # "Google Analytics Link" sources can be used to get conversion data from an - # existing Google Analytics property into the linked Merchant Center account. - # @!attribute [rw] property_id - # @return [::Integer] - # Required. Immutable. ID of the Google Analytics property the merchant is - # linked to. - # @!attribute [r] attribution_settings - # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings] - # Output only. Attribution settings for the linked Google Analytics property. - # @!attribute [r] property - # @return [::String] - # Output only. Name of the Google Analytics property the merchant is linked - # to. - class GoogleAnalyticsLink - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # "Merchant Center Destination" sources can be used to send conversion events - # from an online store using a Google tag directly to a Merchant Center account - # where the source is created. - # @!attribute [r] destination - # @return [::String] - # Output only. Merchant Center Destination ID. - # @!attribute [rw] attribution_settings - # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings] - # Required. Attribution settings used for the Merchant Center Destination. - # @!attribute [rw] display_name - # @return [::String] - # Required. Merchant-specified display name for the destination. This is the - # name that identifies the conversion source within the Merchant Center UI. - # The maximum length is 64 characters. - # @!attribute [rw] currency_code - # @return [::String] - # Required. Three-letter currency code (ISO 4217). The currency code defines - # in which currency the conversions sent to this destination will be reported - # in Merchant Center. - class MerchantCenterDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateConversionSource method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account that will own the new conversion source. - # Format: `accounts/{account}` - # @!attribute [rw] conversion_source - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - class CreateConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateConversionSource method. - # @!attribute [rw] conversion_source - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # Required. The new version of the conversion source data. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. List of fields being updated. - class UpdateConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be deleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - class DeleteConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UndeleteConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be undeleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - class UndeleteConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the GetConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be fetched. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - class GetConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListConversionSources method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token. - # @!attribute [rw] show_deleted - # @return [::Boolean] - # Optional. Show deleted (archived) conversion sources. By default, deleted - # conversion sources are not returned. - class ListConversionSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListConversionSources method. - # @!attribute [rw] conversion_sources - # @return [::Array<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] - # List of conversion sources. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to be used to fetch the next results page. - class ListConversionSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/Gemfile deleted file mode 100644 index f46fb0f94950..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1", path: "../" -else - gem "google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb deleted file mode 100644 index 827b4a926e65..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the create_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source. -# -def create_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new - - # Call the create_conversion_source method. - result = client.create_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - p result -end -# [END merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb deleted file mode 100644 index ba6b1ac8bfc2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the delete_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source. -# -def delete_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new - - # Call the delete_conversion_source method. - result = client.delete_conversion_source request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb deleted file mode 100644 index d9f971d44b48..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the get_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source. -# -def get_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new - - # Call the get_conversion_source method. - result = client.get_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - p result -end -# [END merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb deleted file mode 100644 index 658a5ab951e4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the list_conversion_sources call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources. -# -def list_conversion_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new - - # Call the list_conversion_sources method. - result = client.list_conversion_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Conversions::V1::ConversionSource. - p item - end -end -# [END merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb deleted file mode 100644 index 22afe1c1ac8b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the undelete_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source. -# -def undelete_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new - - # Call the undelete_conversion_source method. - result = client.undelete_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - p result -end -# [END merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb deleted file mode 100644 index 67c6808b8b3c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the update_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source. -# -def update_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new - - # Call the update_conversion_source method. - result = client.update_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - p result -end -# [END merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json deleted file mode 100644 index 141ac1a9a2fb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-conversions-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.conversions.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync", - "title": "Snippet for the create_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source.", - "file": "conversion_sources_service/create_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "CreateConversionSource", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.CreateConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync", - "title": "Snippet for the update_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source.", - "file": "conversion_sources_service/update_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "UpdateConversionSource", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.UpdateConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync", - "title": "Snippet for the delete_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source.", - "file": "conversion_sources_service/delete_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "DeleteConversionSource", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.DeleteConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync", - "title": "Snippet for the undelete_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source.", - "file": "conversion_sources_service/undelete_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "undelete_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "UndeleteConversionSource", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.UndeleteConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync", - "title": "Snippet for the get_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source.", - "file": "conversion_sources_service/get_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "GetConversionSource", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.GetConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync", - "title": "Snippet for the list_conversion_sources call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources.", - "file": "conversion_sources_service/list_conversion_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_conversion_sources", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "ListConversionSources", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.ListConversionSources", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "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-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb deleted file mode 100644 index 58ab80ed3978..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_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/shopping/merchant/conversions/v1/conversion_sources_service" - -class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_conversion_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.conversion_source_path account: "value0", conversion_source: "value1" - assert_equal "accounts/value0/conversionSources/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb deleted file mode 100644 index f64e2c038333..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb +++ /dev/null @@ -1,428 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/conversions/v1/conversionsources_pb" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" - - -class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - conversion_source = {} - - create_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_create_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_conversion_source parent: parent, conversion_source: conversion_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_conversion_source({ parent: parent, conversion_source: conversion_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_conversion_source_client_stub.call_count - end - end - end - - def test_update_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - conversion_source = {} - update_mask = {} - - update_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_update_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_conversion_source_client_stub.call_count - end - end - end - - def test_delete_conversion_source - # 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_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_delete_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_conversion_source_client_stub.call_count - end - end - end - - def test_undelete_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undelete_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_undelete_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, undelete_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.undelete_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.undelete_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.undelete_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, undelete_conversion_source_client_stub.call_count - end - end - end - - def test_get_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_get_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_conversion_source_client_stub.call_count - end - end - end - - def test_list_conversion_sources - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - show_deleted = true - - list_conversion_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_list_conversion_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_conversion_sources_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_conversion_sources_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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb deleted file mode 100644 index c3f61e19bfbd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb +++ /dev/null @@ -1,467 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/conversions/v1/conversionsources_pb" -require "google/shopping/merchant/conversions/v1/conversion_sources_service" - -class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - conversion_source = {} - - create_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1::ConversionSource), request["conversion_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_conversion_source parent: parent, conversion_source: conversion_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_conversion_source({ parent: parent, conversion_source: conversion_source }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_conversion_source_client_stub.call_rpc_count - end - end - - def test_update_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - conversion_source = {} - update_mask = {} - - update_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1::ConversionSource), request["conversion_source"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, 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_conversion_source({ conversion_source: conversion_source, 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_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, 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_conversion_source_client_stub.call_rpc_count - end - end - - def test_delete_conversion_source - # 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_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(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_conversion_source_client_stub.call_rpc_count - end - end - - def test_undelete_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undelete_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :undelete_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, undelete_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.undelete_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.undelete_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.undelete_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, undelete_conversion_source_client_stub.call_rpc_count - end - end - - def test_get_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_conversion_source_client_stub.call_rpc_count - end - end - - def test_list_conversion_sources - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - show_deleted = true - - list_conversion_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_conversion_sources, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["show_deleted"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_conversion_sources_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_conversion_sources_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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.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-shopping-merchant-conversions-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json deleted file mode 100644 index 20e6dffcf926..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-conversions-v1beta", - "distribution_name": "google-shopping-merchant-conversions-v1beta", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1BETA API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-conversions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml deleted file mode 100644 index 6d5086c6f1ab..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-conversions-v1beta.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-shopping-merchant-conversions-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.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-shopping-merchant-conversions-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant V1BETA 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-shopping-merchant-conversions-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/AUTHENTICATION.md deleted file mode 100644 index 2159dc1507a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-conversions-v1beta 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-shopping-merchant-conversions-v1beta 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/shopping/merchant/conversions/v1beta" - -client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/conversions/v1beta" - -::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions-v1beta -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/shopping/merchant/conversions/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/README.md deleted file mode 100644 index 5fb15095eb28..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Merchant V1BETA API - -Programmatically manage your Merchant Center accounts. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1BETA API. Most users should consider using -the main client gem, -[google-shopping-merchant-conversions](https://rubygems.org/gems/google-shopping-merchant-conversions). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-conversions-v1beta -``` - -## 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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/conversions/v1beta" - -client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new -request = ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new # (request fields as keyword arguments...) -response = client.create_conversion_source request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-conversions-v1beta) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/conversions/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-conversions-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-shopping-merchant-conversions`. -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-shopping-merchant-conversions-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Rakefile deleted file mode 100644 index df7ec62e5251..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta 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/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials" - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions-v1beta 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-shopping-merchant-conversions-v1beta 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-shopping-merchant-conversions-v1beta 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-shopping-merchant-conversions-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-conversions-v1beta" - header "google-shopping-merchant-conversions-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-conversions-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-conversions-v1beta 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-shopping-merchant-conversions-v1beta 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-shopping-merchant-conversions-v1beta 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-shopping-merchant-conversions-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/gapic_metadata.json deleted file mode 100644 index cb28c69efe62..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/gapic_metadata.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.conversions.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Conversions::V1beta", - "services": { - "ConversionSourcesService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client", - "rpcs": { - "CreateConversionSource": { - "methods": [ - "create_conversion_source" - ] - }, - "UpdateConversionSource": { - "methods": [ - "update_conversion_source" - ] - }, - "DeleteConversionSource": { - "methods": [ - "delete_conversion_source" - ] - }, - "UndeleteConversionSource": { - "methods": [ - "undelete_conversion_source" - ] - }, - "GetConversionSource": { - "methods": [ - "get_conversion_source" - ] - }, - "ListConversionSources": { - "methods": [ - "list_conversion_sources" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec deleted file mode 100644 index 1b1396a16746..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/conversions/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-conversions-v1beta" - gem.version = Google::Shopping::Merchant::Conversions::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-conversions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center accounts." - 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-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb deleted file mode 100644 index 8aae5f49f6d7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.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/shopping/merchant/conversions/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb deleted file mode 100644 index efa027bc825f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service" -require "google/shopping/merchant/conversions/v1beta/version" - -module Google - module Shopping - module Merchant - module Conversions - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/conversions/v1beta" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/conversions/v1beta" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/conversions/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb deleted file mode 100644 index ec937b0d20dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/conversions/v1beta/version" - -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/client" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - ## - # Service for managing conversion sources for a merchant account. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/conversions/v1beta/conversion_sources_service" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - module ConversionSourcesService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "conversion_sources_service", "helpers.rb" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb deleted file mode 100644 index fcb74ba6a8f8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb +++ /dev/null @@ -1,973 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/conversions/v1beta/conversionsources_pb" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - ## - # Client for the ConversionSourcesService service. - # - # Service for managing conversion sources for a merchant account. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :conversion_sources_service_stub - - ## - # Configure the ConversionSourcesService Client class. - # - # See {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ConversionSourcesService clients - # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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", "Shopping", "Merchant", "Conversions", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ConversionSourcesService 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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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 - @conversion_sources_service_stub.universe_domain - end - - ## - # Create a new ConversionSourcesService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ConversionSourcesService 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/shopping/merchant/conversions/v1beta/conversionsources_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 - - @conversion_sources_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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 - ) - - @conversion_sources_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 - @conversion_sources_service_stub.logger - end - - # Service calls - - ## - # Creates a new conversion source. - # - # @overload create_conversion_source(request, options = nil) - # Pass arguments to `create_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_conversion_source(parent: nil, conversion_source: nil) - # Pass arguments to `create_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that will own the new conversion source. - # Format: accounts/\\{account} - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new - # - # # Call the create_conversion_source method. - # result = client.create_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def create_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest - - # Converts hash and nil to 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_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :create_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - # - # @overload update_conversion_source(request, options = nil) - # Pass arguments to `update_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_conversion_source(conversion_source: nil, update_mask: nil) - # Pass arguments to `update_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] - # Required. The new version of the conversion source data. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new - # - # # Call the update_conversion_source method. - # result = client.update_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def update_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest - - # Converts hash and nil to 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_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.conversion_source&.name - header_params["conversion_source.name"] = request.conversion_source.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :update_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - # - # @overload delete_conversion_source(request, options = nil) - # Pass arguments to `delete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_conversion_source(name: nil) - # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be deleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # - # @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/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new - # - # # Call the delete_conversion_source method. - # result = client.delete_conversion_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :delete_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - # - # @overload undelete_conversion_source(request, options = nil) - # Pass arguments to `undelete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload undelete_conversion_source(name: nil) - # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be undeleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new - # - # # Call the undelete_conversion_source method. - # result = client.undelete_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def undelete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.undelete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.undelete_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.undelete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :undelete_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches a conversion source. - # - # @overload get_conversion_source(request, options = nil) - # Pass arguments to `get_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_conversion_source(name: nil) - # Pass arguments to `get_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be fetched. - # Format: accounts/\\{account}/conversionsources/\\{conversion_source} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new - # - # # Call the get_conversion_source method. - # result = client.get_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def get_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :get_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the list of conversion sources the caller has access to. - # - # @overload list_conversion_sources(request, options = nil) - # Pass arguments to `list_conversion_sources` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) - # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @param page_token [::String] - # Optional. Page token. - # @param show_deleted [::Boolean] - # Optional. Show deleted (archived) option. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new - # - # # Call the list_conversion_sources method. - # result = client.list_conversion_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p item - # end - # - def list_conversion_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_conversion_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_conversion_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_conversion_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :list_conversion_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ConversionSourcesService API. - # - # This class represents the configuration for ConversionSourcesService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_conversion_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ConversionSourcesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_conversion_source - ## - # RPC-specific configuration for `update_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_conversion_source - ## - # RPC-specific configuration for `delete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_conversion_source - ## - # RPC-specific configuration for `undelete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :undelete_conversion_source - ## - # RPC-specific configuration for `get_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_conversion_source - ## - # RPC-specific configuration for `list_conversion_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_conversion_sources - - # @private - def initialize parent_rpcs = nil - create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source - @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config - update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source - @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config - delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source - @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config - undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source - @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config - get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source - @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config - list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources - @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb deleted file mode 100644 index fc78775e84b1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_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 Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - # Credentials for the ConversionSourcesService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb deleted file mode 100644 index 0957b8b6c5be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_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 Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - # Path helper methods for the ConversionSourcesService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified ConversionSource resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/conversionSources/{conversion_source}` - # - # @param account [String] - # @param conversion_source [String] - # - # @return [::String] - def conversion_source_path account:, conversion_source: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/conversionSources/#{conversion_source}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb deleted file mode 100644 index 050042f123cb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_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/shopping/merchant/conversions/v1beta/version" - -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - ## - # Service for managing conversion sources for a merchant account. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - module ConversionSourcesService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb deleted file mode 100644 index 957dd01d3a7f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb +++ /dev/null @@ -1,888 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/conversions/v1beta/conversionsources_pb" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - module Rest - ## - # REST client for the ConversionSourcesService service. - # - # Service for managing conversion sources for a merchant account. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :conversion_sources_service_stub - - ## - # Configure the ConversionSourcesService Client class. - # - # See {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ConversionSourcesService clients - # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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", "Shopping", "Merchant", "Conversions", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ConversionSourcesService 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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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 - @conversion_sources_service_stub.universe_domain - end - - ## - # Create a new ConversionSourcesService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ConversionSourcesService 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 - - @conversion_sources_service_stub = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @conversion_sources_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 - @conversion_sources_service_stub.logger - end - - # Service calls - - ## - # Creates a new conversion source. - # - # @overload create_conversion_source(request, options = nil) - # Pass arguments to `create_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_conversion_source(parent: nil, conversion_source: nil) - # Pass arguments to `create_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that will own the new conversion source. - # Format: accounts/\\{account} - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new - # - # # Call the create_conversion_source method. - # result = client.create_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def create_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest - - # Converts hash and nil to an 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_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.create_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - # - # @overload update_conversion_source(request, options = nil) - # Pass arguments to `update_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_conversion_source(conversion_source: nil, update_mask: nil) - # Pass arguments to `update_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] - # Required. The new version of the conversion source data. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new - # - # # Call the update_conversion_source method. - # result = client.update_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def update_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest - - # Converts hash and nil to an 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_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.update_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - # - # @overload delete_conversion_source(request, options = nil) - # Pass arguments to `delete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_conversion_source(name: nil) - # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be deleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # @yield [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/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new - # - # # Call the delete_conversion_source method. - # result = client.delete_conversion_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.delete_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - # - # @overload undelete_conversion_source(request, options = nil) - # Pass arguments to `undelete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload undelete_conversion_source(name: nil) - # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be undeleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new - # - # # Call the undelete_conversion_source method. - # result = client.undelete_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def undelete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.undelete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.undelete_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.undelete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.undelete_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches a conversion source. - # - # @overload get_conversion_source(request, options = nil) - # Pass arguments to `get_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_conversion_source(name: nil) - # Pass arguments to `get_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be fetched. - # Format: accounts/\\{account}/conversionsources/\\{conversion_source} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new - # - # # Call the get_conversion_source method. - # result = client.get_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def get_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.get_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the list of conversion sources the caller has access to. - # - # @overload list_conversion_sources(request, options = nil) - # Pass arguments to `list_conversion_sources` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) - # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @param page_token [::String] - # Optional. Page token. - # @param show_deleted [::Boolean] - # Optional. Show deleted (archived) option. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new - # - # # Call the list_conversion_sources method. - # result = client.list_conversion_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p item - # end - # - def list_conversion_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_conversion_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_conversion_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_conversion_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.list_conversion_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, "conversion_sources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ConversionSourcesService REST API. - # - # This class represents the configuration for ConversionSourcesService 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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_conversion_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ConversionSourcesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_conversion_source - ## - # RPC-specific configuration for `update_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_conversion_source - ## - # RPC-specific configuration for `delete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_conversion_source - ## - # RPC-specific configuration for `undelete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :undelete_conversion_source - ## - # RPC-specific configuration for `get_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_conversion_source - ## - # RPC-specific configuration for `list_conversion_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_conversion_sources - - # @private - def initialize parent_rpcs = nil - create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source - @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config - update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source - @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config - delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source - @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config - undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source - @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config - get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source - @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config - list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources - @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb deleted file mode 100644 index fe73baae518b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb +++ /dev/null @@ -1,452 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - module Rest - ## - # REST service stub for the ConversionSourcesService 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_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # A result object deserialized from the server's reply - def create_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.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_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # A result object deserialized from the server's reply - def update_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.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_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_conversion_source", - 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 undelete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # A result object deserialized from the server's reply - def undelete_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_undelete_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "undelete_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # A result object deserialized from the server's reply - def get_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.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_conversion_sources REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse] - # A result object deserialized from the server's reply - def list_conversion_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_conversion_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_conversion_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse.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_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest] - # 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_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/conversions/v1beta/{parent}/conversionSources", - body: "conversion_source", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest] - # 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_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/conversions/v1beta/{conversion_source.name}", - body: "conversion_source", - matches: [ - ["conversion_source.name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/conversions/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the undelete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_undelete_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/conversions/v1beta/{name}:undelete", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/conversions/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_conversion_sources REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_conversion_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/conversions/v1beta/{parent}/conversionSources", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb deleted file mode 100644 index e7ee072fd173..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/conversions/v1beta/conversionsources.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nCgoogle/shopping/merchant/conversions/v1beta/conversionsources.proto\x12+google.shopping.merchant.conversions.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaa\x06\n\x10\x43onversionSource\x12\x66\n\x15google_analytics_link\x18\x03 \x01(\x0b\x32@.google.shopping.merchant.conversions.v1beta.GoogleAnalyticsLinkB\x03\xe0\x41\x05H\x00\x12m\n\x1bmerchant_center_destination\x18\x04 \x01(\x0b\x32\x46.google.shopping.merchant.conversions.v1beta.MerchantCenterDestinationH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12W\n\x05state\x18\x05 \x01(\x0e\x32\x43.google.shopping.merchant.conversions.v1beta.ConversionSource.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x61\n\ncontroller\x18\x07 \x01(\x0e\x32H.google.shopping.merchant.conversions.v1beta.ConversionSource.ControllerB\x03\xe0\x41\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x41RCHIVED\x10\x02\x12\x0b\n\x07PENDING\x10\x03\"N\n\nController\x12\x1a\n\x16\x43ONTROLLER_UNSPECIFIED\x10\x00\x12\x0c\n\x08MERCHANT\x10\x01\x12\x16\n\x12YOUTUBE_AFFILIATES\x10\x02:\x90\x01\xea\x41\x8c\x01\n+merchantapi.googleapis.com/ConversionSource\x12\x38\x61\x63\x63ounts/{account}/conversionSources/{conversion_source}*\x11\x63onversionSources2\x10\x63onversionSourceB\r\n\x0bsource_data\"\xef\x04\n\x13\x41ttributionSettings\x12-\n attribution_lookback_window_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12q\n\x11\x61ttribution_model\x18\x02 \x01(\x0e\x32Q.google.shopping.merchant.conversions.v1beta.AttributionSettings.AttributionModelB\x03\xe0\x41\x02\x12p\n\x0f\x63onversion_type\x18\x03 \x03(\x0b\x32O.google.shopping.merchant.conversions.v1beta.AttributionSettings.ConversionTypeB\x06\xe0\x41\x06\xe0\x41\x05\x1a\x38\n\x0e\x43onversionType\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06report\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\"\x89\x02\n\x10\x41ttributionModel\x12!\n\x1d\x41TTRIBUTION_MODEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x43ROSS_CHANNEL_LAST_CLICK\x10\x01\x12\x1c\n\x18\x41\x44S_PREFERRED_LAST_CLICK\x10\x02\x12\x1d\n\x19\x43ROSS_CHANNEL_DATA_DRIVEN\x10\x05\x12\x1d\n\x19\x43ROSS_CHANNEL_FIRST_CLICK\x10\x06\x12\x18\n\x14\x43ROSS_CHANNEL_LINEAR\x10\x07\x12 \n\x1c\x43ROSS_CHANNEL_POSITION_BASED\x10\x08\x12\x1c\n\x18\x43ROSS_CHANNEL_TIME_DECAY\x10\t\"\xae\x01\n\x13GoogleAnalyticsLink\x12\x1b\n\x0bproperty_id\x18\x01 \x01(\x03\x42\x06\xe0\x41\x02\xe0\x41\x05\x12\x63\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.conversions.v1beta.AttributionSettingsB\x03\xe0\x41\x03\x12\x15\n\x08property\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xd1\x01\n\x19MerchantCenterDestination\x12\x18\n\x0b\x64\x65stination\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x63\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.conversions.v1beta.AttributionSettingsB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xc3\x01\n\x1d\x43reateConversionSourceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12]\n\x11\x63onversion_source\x18\x02 \x01(\x0b\x32=.google.shopping.merchant.conversions.v1beta.ConversionSourceB\x03\xe0\x41\x02\"\xb4\x01\n\x1dUpdateConversionSourceRequest\x12]\n\x11\x63onversion_source\x18\x01 \x01(\x0b\x32=.google.shopping.merchant.conversions.v1beta.ConversionSourceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"b\n\x1d\x44\x65leteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"d\n\x1fUndeleteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"_\n\x1aGetConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"\xaf\x01\n\x1cListConversionSourcesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12\x16\n\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\x19\n\x0cshow_deleted\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x93\x01\n\x1dListConversionSourcesResponse\x12Y\n\x12\x63onversion_sources\x18\x01 \x03(\x0b\x32=.google.shopping.merchant.conversions.v1beta.ConversionSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xd2\x0c\n\x18\x43onversionSourcesService\x12\x94\x02\n\x16\x43reateConversionSource\x12J.google.shopping.merchant.conversions.v1beta.CreateConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"o\xda\x41\x18parent,conversion_source\x82\xd3\xe4\x93\x02N\"9/conversions/v1beta/{parent=accounts/*}/conversionSources:\x11\x63onversion_source\x12\xac\x02\n\x16UpdateConversionSource\x12J.google.shopping.merchant.conversions.v1beta.UpdateConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"\x86\x01\xda\x41\x1d\x63onversion_source,update_mask\x82\xd3\xe4\x93\x02`2K/conversions/v1beta/{conversion_source.name=accounts/*/conversionSources/*}:\x11\x63onversion_source\x12\xc6\x01\n\x16\x44\x65leteConversionSource\x12J.google.shopping.merchant.conversions.v1beta.DeleteConversionSourceRequest\x1a\x16.google.protobuf.Empty\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/conversions/v1beta/{name=accounts/*/conversionSources/*}\x12\xf6\x01\n\x18UndeleteConversionSource\x12L.google.shopping.merchant.conversions.v1beta.UndeleteConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"M\x82\xd3\xe4\x93\x02G\"B/conversions/v1beta/{name=accounts/*/conversionSources/*}:undelete:\x01*\x12\xe7\x01\n\x13GetConversionSource\x12G.google.shopping.merchant.conversions.v1beta.GetConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/conversions/v1beta/{name=accounts/*/conversionSources/*}\x12\xfa\x01\n\x15ListConversionSources\x12I.google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest\x1aJ.google.shopping.merchant.conversions.v1beta.ListConversionSourcesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/conversions/v1beta/{parent=accounts/*}/conversionSources\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xdf\x01\n/com.google.shopping.merchant.conversions.v1betaB\x16\x43onversionSourcesProtoP\x01ZWcloud.google.com/go/shopping/merchant/conversions/apiv1beta/conversionspb;conversionspb\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - ConversionSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ConversionSource").msgclass - ConversionSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ConversionSource.State").enummodule - ConversionSource::Controller = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ConversionSource.Controller").enummodule - AttributionSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.AttributionSettings").msgclass - AttributionSettings::ConversionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.AttributionSettings.ConversionType").msgclass - AttributionSettings::AttributionModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.AttributionSettings.AttributionModel").enummodule - GoogleAnalyticsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.GoogleAnalyticsLink").msgclass - MerchantCenterDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.MerchantCenterDestination").msgclass - CreateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.CreateConversionSourceRequest").msgclass - UpdateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.UpdateConversionSourceRequest").msgclass - DeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.DeleteConversionSourceRequest").msgclass - UndeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.UndeleteConversionSourceRequest").msgclass - GetConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.GetConversionSourceRequest").msgclass - ListConversionSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest").msgclass - ListConversionSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ListConversionSourcesResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb deleted file mode 100644 index f25fc3f2e077..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/conversions/v1beta/conversionsources.proto for package 'google.shopping.merchant.conversions.v1beta' -# 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/shopping/merchant/conversions/v1beta/conversionsources_pb' - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - # Service for managing conversion sources for a merchant account. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.conversions.v1beta.ConversionSourcesService' - - # Creates a new conversion source. - rpc :CreateConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - rpc :UpdateConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - rpc :DeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, ::Google::Protobuf::Empty - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - rpc :UndeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource - # Fetches a conversion source. - rpc :GetConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource - # Retrieves the list of conversion sources the caller has access to. - rpc :ListConversionSources, ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb deleted file mode 100644 index 9238cbdb5b76..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/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/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" -require "google/shopping/merchant/conversions/v1beta/version" - -module Google - module Shopping - module Merchant - module Conversions - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/conversions/v1beta/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb deleted file mode 100644 index 6860c89e382f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/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 Shopping - module Merchant - module Conversions - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant V1BETA 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-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb deleted file mode 100644 index f44123837180..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb +++ /dev/null @@ -1,290 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - # Represents a conversion source owned by a Merchant account. A merchant - # account can have up to 200 conversion sources. - # @!attribute [rw] google_analytics_link - # @return [::Google::Shopping::Merchant::Conversions::V1beta::GoogleAnalyticsLink] - # Immutable. Conversion Source of type "Link to Google Analytics Property". - # - # Note: The following fields are mutually exclusive: `google_analytics_link`, `merchant_center_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] merchant_center_destination - # @return [::Google::Shopping::Merchant::Conversions::V1beta::MerchantCenterDestination] - # Conversion Source of type "Merchant Center Tag Destination". - # - # Note: The following fields are mutually exclusive: `merchant_center_destination`, `google_analytics_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Generated by the Content API upon creation of a - # new `ConversionSource`. Format: [a-z]\\{4}:.+ The four characters before the - # colon represent the type of conversio source. Content after the colon - # represents the ID of the conversion source within that type. The ID of two - # different conversion sources might be the same across different types. The - # following type prefixes are supported: - # - galk: For GoogleAnalyticsLink sources. - # - mcdn: For MerchantCenterDestination sources. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource::State] - # Output only. Current state of this conversion source. Can't be edited - # through the API. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when an archived conversion source becomes - # permanently deleted and is no longer available to undelete. - # @!attribute [r] controller - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource::Controller] - # Output only. Controller of the conversion source. - class ConversionSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents state of the conversion source. - module State - # Conversion source has unspecified state. - STATE_UNSPECIFIED = 0 - - # Conversion source is fully functional. - ACTIVE = 1 - - # Conversion source has been archived in the last 30 days and not - # currently functional. Can be restored using the undelete method. - ARCHIVED = 2 - - # Conversion source creation has started but not fully finished yet. - PENDING = 3 - end - - # Entity controlling the conversion source. - module Controller - # Default value. This value is unused. - CONTROLLER_UNSPECIFIED = 0 - - # Controlled by the Merchant who owns the Conversion Source. - MERCHANT = 1 - - # Controlled by the YT Affiliates program. - YOUTUBE_AFFILIATES = 2 - end - end - - # Represents attribution settings for conversion sources receiving - # pre-attribution data. - # @!attribute [rw] attribution_lookback_window_days - # @return [::Integer] - # Required. Lookback windows (in days) used for attribution in this source. - # Supported values are 7, 30, 40. - # @!attribute [rw] attribution_model - # @return [::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings::AttributionModel] - # Required. Attribution model. - # @!attribute [rw] conversion_type - # @return [::Array<::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings::ConversionType>] - # Immutable. Unordered list. List of different conversion types a conversion - # event can be classified as. A standard "purchase" type will be - # automatically created if this list is empty at creation time. - class AttributionSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Message representing a types of conversion events - # @!attribute [r] name - # @return [::String] - # Output only. Conversion event name, as it'll be reported by the client. - # @!attribute [r] report - # @return [::Boolean] - # Output only. Option indicating if the type should be included in Merchant - # Center reporting. - class ConversionType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The attribution model used for this source. We support the same set of - # models offered by Google Analytics 4, as described in: - # https://support.google.com/analytics/answer/10596866. - module AttributionModel - # Unspecified model. - ATTRIBUTION_MODEL_UNSPECIFIED = 0 - - # Cross-channel Last Click model. - CROSS_CHANNEL_LAST_CLICK = 1 - - # Ads-preferred Last Click model. - ADS_PREFERRED_LAST_CLICK = 2 - - # Cross-channel Data Driven model. - CROSS_CHANNEL_DATA_DRIVEN = 5 - - # Cross-channel First Click model. - CROSS_CHANNEL_FIRST_CLICK = 6 - - # Cross-channel Linear model. - CROSS_CHANNEL_LINEAR = 7 - - # Cross-channel Position Based model. - CROSS_CHANNEL_POSITION_BASED = 8 - - # Cross-channel Time Decay model. - CROSS_CHANNEL_TIME_DECAY = 9 - end - end - - # "Google Analytics Link" sources can be used to get conversion data from an - # existing Google Analytics property into the linked Merchant Center account. - # @!attribute [rw] property_id - # @return [::Integer] - # Required. Immutable. ID of the Google Analytics property the merchant is - # linked to. - # @!attribute [r] attribution_settings - # @return [::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings] - # Output only. Attribution settings for the linked Google Analytics property. - # @!attribute [r] property - # @return [::String] - # Output only. Name of the Google Analytics property the merchant is linked - # to. - class GoogleAnalyticsLink - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # "Merchant Center Destination" sources can be used to send conversion events - # from an online store using a Google tag directly to a Merchant Center account - # where the source is created. - # @!attribute [r] destination - # @return [::String] - # Output only. Merchant Center Destination ID. - # @!attribute [rw] attribution_settings - # @return [::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings] - # Required. Attribution settings being used for the Merchant Center - # Destination. - # @!attribute [rw] display_name - # @return [::String] - # Required. Merchant-specified display name for the destination. This is the - # name that identifies the conversion source within the Merchant Center UI. - # Limited to 64 characters. - # @!attribute [rw] currency_code - # @return [::String] - # Required. Three-letter currency code (ISO 4217). The currency code defines - # in which currency the conversions sent to this destination will be reported - # in Merchant Center. - class MerchantCenterDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateConversionSource method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account that will own the new conversion source. - # Format: accounts/\\{account} - # @!attribute [rw] conversion_source - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - class CreateConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateConversionSource method. - # @!attribute [rw] conversion_source - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # Required. The new version of the conversion source data. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be deleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - class DeleteConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UndeleteConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be undeleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - class UndeleteConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the GetConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be fetched. - # Format: accounts/\\{account}/conversionsources/\\{conversion_source} - class GetConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListConversionSources method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token. - # @!attribute [rw] show_deleted - # @return [::Boolean] - # Optional. Show deleted (archived) option. - class ListConversionSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListConversionSources method. - # @!attribute [rw] conversion_sources - # @return [::Array<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] - # List of conversion sources. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to be used to fetch the next results page. - class ListConversionSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/Gemfile deleted file mode 100644 index 6a2aef3b6555..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-conversions-v1beta", path: "../" -else - gem "google-shopping-merchant-conversions-v1beta" -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-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb deleted file mode 100644 index 8081af021563..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_CreateConversionSource_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the create_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#create_conversion_source. -# -def create_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new - - # Call the create_conversion_source method. - result = client.create_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - p result -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_CreateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb deleted file mode 100644 index 67d343214d62..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_DeleteConversionSource_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the delete_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#delete_conversion_source. -# -def delete_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new - - # Call the delete_conversion_source method. - result = client.delete_conversion_source request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_DeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb deleted file mode 100644 index 6c928140a9a8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_GetConversionSource_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the get_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#get_conversion_source. -# -def get_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new - - # Call the get_conversion_source method. - result = client.get_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - p result -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_GetConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb deleted file mode 100644 index 45183543d605..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_ListConversionSources_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the list_conversion_sources call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#list_conversion_sources. -# -def list_conversion_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new - - # Call the list_conversion_sources method. - result = client.list_conversion_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - p item - end -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_ListConversionSources_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb deleted file mode 100644 index 88a2acac8a2f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_UndeleteConversionSource_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the undelete_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#undelete_conversion_source. -# -def undelete_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new - - # Call the undelete_conversion_source method. - result = client.undelete_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - p result -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_UndeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb deleted file mode 100644 index e65690f44b15..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_UpdateConversionSource_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the update_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#update_conversion_source. -# -def update_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new - - # Call the update_conversion_source method. - result = client.update_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - p result -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_UpdateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json deleted file mode 100644 index 6649119ca2d1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-conversions-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.conversions.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_CreateConversionSource_sync", - "title": "Snippet for the create_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#create_conversion_source.", - "file": "conversion_sources_service/create_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#create_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "CreateConversionSource", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.CreateConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_UpdateConversionSource_sync", - "title": "Snippet for the update_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#update_conversion_source.", - "file": "conversion_sources_service/update_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#update_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "UpdateConversionSource", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.UpdateConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_DeleteConversionSource_sync", - "title": "Snippet for the delete_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#delete_conversion_source.", - "file": "conversion_sources_service/delete_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#delete_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "DeleteConversionSource", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.DeleteConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_UndeleteConversionSource_sync", - "title": "Snippet for the undelete_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#undelete_conversion_source.", - "file": "conversion_sources_service/undelete_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "undelete_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#undelete_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "UndeleteConversionSource", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.UndeleteConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_GetConversionSource_sync", - "title": "Snippet for the get_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#get_conversion_source.", - "file": "conversion_sources_service/get_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#get_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "GetConversionSource", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.GetConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_ListConversionSources_sync", - "title": "Snippet for the list_conversion_sources call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#list_conversion_sources.", - "file": "conversion_sources_service/list_conversion_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_conversion_sources", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#list_conversion_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "ListConversionSources", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.ListConversionSources", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "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-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb deleted file mode 100644 index ac9354d66391..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_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/shopping/merchant/conversions/v1beta/conversion_sources_service" - -class ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_conversion_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.conversion_source_path account: "value0", conversion_source: "value1" - assert_equal "accounts/value0/conversionSources/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb deleted file mode 100644 index aeab95d12b0f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb +++ /dev/null @@ -1,428 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/conversions/v1beta/conversionsources_pb" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" - - -class ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - conversion_source = {} - - create_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_create_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_conversion_source parent: parent, conversion_source: conversion_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_conversion_source({ parent: parent, conversion_source: conversion_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_conversion_source_client_stub.call_count - end - end - end - - def test_update_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - conversion_source = {} - update_mask = {} - - update_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_update_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_conversion_source_client_stub.call_count - end - end - end - - def test_delete_conversion_source - # 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_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_delete_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_conversion_source_client_stub.call_count - end - end - end - - def test_undelete_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undelete_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_undelete_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, undelete_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.undelete_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.undelete_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.undelete_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, undelete_conversion_source_client_stub.call_count - end - end - end - - def test_get_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_get_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_conversion_source_client_stub.call_count - end - end - end - - def test_list_conversion_sources - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - show_deleted = true - - list_conversion_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_list_conversion_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_conversion_sources_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_conversion_sources_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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb deleted file mode 100644 index d71efad08cf4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb +++ /dev/null @@ -1,467 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service" - -class ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - conversion_source = {} - - create_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource), request["conversion_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_conversion_source parent: parent, conversion_source: conversion_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_conversion_source({ parent: parent, conversion_source: conversion_source }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_conversion_source_client_stub.call_rpc_count - end - end - - def test_update_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - conversion_source = {} - update_mask = {} - - update_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource), request["conversion_source"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, 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_conversion_source({ conversion_source: conversion_source, 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_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, 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_conversion_source_client_stub.call_rpc_count - end - end - - def test_delete_conversion_source - # 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_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(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_conversion_source_client_stub.call_rpc_count - end - end - - def test_undelete_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undelete_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :undelete_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, undelete_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.undelete_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.undelete_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.undelete_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, undelete_conversion_source_client_stub.call_rpc_count - end - end - - def test_get_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_conversion_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_conversion_source_client_stub.call_rpc_count - end - end - - def test_list_conversion_sources - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - show_deleted = true - - list_conversion_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_conversion_sources, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["show_deleted"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_conversion_sources_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_conversion_sources_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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/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-shopping-merchant-data_sources-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-data_sources-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-data_sources-v1/.repo-metadata.json deleted file mode 100644 index d59439bd54bd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-data_sources-v1", - "distribution_name": "google-shopping-merchant-data_sources-v1", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1 API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-data_sources-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-data_sources instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-data_sources-v1/.rubocop.yml deleted file mode 100644 index d2d22e9da2f7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-data_sources-v1/.yardopts deleted file mode 100644 index dc7bbc10ae29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant 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-shopping-merchant-data_sources-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1/AUTHENTICATION.md deleted file mode 100644 index 1030f16bbfcd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-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/shopping/merchant/data_sources/v1" - -client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/data_sources/v1" - -::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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-shopping-merchant-data_sources-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/shopping/merchant/data_sources/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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-shopping-merchant-data_sources-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-data_sources-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/README.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1/README.md deleted file mode 100644 index 0bc83ddaedcb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Merchant V1 API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1 API. Most users should consider using -the main client gem, -[google-shopping-merchant-data_sources](https://rubygems.org/gems/google-shopping-merchant-data_sources). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-data_sources-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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/data_sources/v1" - -client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new -request = ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new # (request fields as keyword arguments...) -response = client.get_data_source request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-data_sources-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/data_sources/v1" -require "logger" - -client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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-shopping-merchant-data_sources`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-data_sources-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-shopping-merchant-data_sources`. -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-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-data_sources-v1/Rakefile deleted file mode 100644 index b605e6ea9d30..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-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/shopping/merchant/data_sources/v1/data_sources_service/credentials" - ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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-shopping-merchant-data_sources-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-shopping-merchant-data_sources-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-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-data_sources-v1" - header "google-shopping-merchant-data_sources-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-data_sources-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-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-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-data_sources-v1/gapic_metadata.json deleted file mode 100644 index b6de9c919344..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/gapic_metadata.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.datasources.v1", - "libraryPackage": "::Google::Shopping::Merchant::DataSources::V1", - "services": { - "DataSourcesService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client", - "rpcs": { - "GetDataSource": { - "methods": [ - "get_data_source" - ] - }, - "ListDataSources": { - "methods": [ - "list_data_sources" - ] - }, - "CreateDataSource": { - "methods": [ - "create_data_source" - ] - }, - "UpdateDataSource": { - "methods": [ - "update_data_source" - ] - }, - "DeleteDataSource": { - "methods": [ - "delete_data_source" - ] - }, - "FetchDataSource": { - "methods": [ - "fetch_data_source" - ] - } - } - } - } - }, - "FileUploadsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client", - "rpcs": { - "GetFileUpload": { - "methods": [ - "get_file_upload" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/google-shopping-merchant-data_sources-v1.gemspec b/owl-bot-staging/google-shopping-merchant-data_sources-v1/google-shopping-merchant-data_sources-v1.gemspec deleted file mode 100644 index ec56bdb06b01..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/google-shopping-merchant-data_sources-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/data_sources/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-data_sources-v1" - gem.version = Google::Shopping::Merchant::DataSources::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-data_sources-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-data_sources instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center Accounts." - 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-shopping-type", "~> 1.0" -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google-shopping-merchant-data_sources-v1.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google-shopping-merchant-data_sources-v1.rb deleted file mode 100644 index 281c18ad0917..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google-shopping-merchant-data_sources-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/shopping/merchant/data_sources/v1" diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1.rb deleted file mode 100644 index df3f2660862f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1.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 "google/shopping/merchant/data_sources/v1/data_sources_service" -require "google/shopping/merchant/data_sources/v1/file_uploads_service" -require "google/shopping/merchant/data_sources/v1/version" - -module Google - module Shopping - module Merchant - module DataSources - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/data_sources/v1" - # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/data_sources/v1" - # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/merchant/data_sources/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb deleted file mode 100644 index 0b8d9020a0ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/data_sources/v1/version" - -require "google/shopping/merchant/data_sources/v1/data_sources_service/credentials" -require "google/shopping/merchant/data_sources/v1/data_sources_service/paths" -require "google/shopping/merchant/data_sources/v1/data_sources_service/client" -require "google/shopping/merchant/data_sources/v1/data_sources_service/rest" - -module Google - module Shopping - module Merchant - module DataSources - module V1 - ## - # Service to manage primary, supplemental, inventory and other data sources. - # See more in the [Merchant - # Center](https://support.google.com/merchants/answer/7439058) help article. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/data_sources/v1/data_sources_service" - # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/data_sources/v1/data_sources_service/rest" - # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new - # - module DataSourcesService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_sources_service", "helpers.rb" -require "google/shopping/merchant/data_sources/v1/data_sources_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb deleted file mode 100644 index 480722122434..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb +++ /dev/null @@ -1,984 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/datasources/v1/datasources_pb" - -module Google - module Shopping - module Merchant - module DataSources - module V1 - module DataSourcesService - ## - # Client for the DataSourcesService service. - # - # Service to manage primary, supplemental, inventory and other data sources. - # See more in the [Merchant - # Center](https://support.google.com/merchants/answer/7439058) help article. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_sources_service_stub - - ## - # Configure the DataSourcesService Client class. - # - # See {::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataSourcesService clients - # ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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", "Shopping", "Merchant", "DataSources", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataSourcesService 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::Shopping::Merchant::DataSources::V1::DataSourcesService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_sources_service_stub.universe_domain - end - - ## - # Create a new DataSourcesService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataSourcesService 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/shopping/merchant/datasources/v1/datasources_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 - - @data_sources_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @data_sources_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 - @data_sources_service_stub.logger - end - - # Service calls - - ## - # Retrieves the data source configuration for the given account. - # - # @overload get_data_source(request, options = nil) - # Pass arguments to `get_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_source(name: nil) - # Pass arguments to `get_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the data source to retrieve. - # Format: `accounts/{account}/dataSources/{datasource}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new - # - # # Call the get_data_source method. - # result = client.get_data_source request - # - # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. - # p result - # - def get_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.call_rpc :get_data_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the configurations for data sources for the given account. - # - # @overload list_data_sources(request, options = nil) - # Pass arguments to `list_data_sources` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list data sources for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of data sources to return. The service may - # return fewer than this value. The maximum value is 1000; values above 1000 - # will be coerced to 1000. If unspecified, the maximum number of data sources - # will be returned. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataSources` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDataSources` - # must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1::DataSource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1::DataSource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.new - # - # # Call the list_data_sources method. - # result = client.list_data_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::DataSources::V1::DataSource. - # p item - # end - # - def list_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.call_rpc :list_data_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_sources_service_stub, :list_data_sources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates the new data source configuration for the given account. - # This method always creates a new data source. - # - # @overload create_data_source(request, options = nil) - # Pass arguments to `create_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_data_source(parent: nil, data_source: nil) - # Pass arguments to `create_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account where this data source will be created. - # Format: `accounts/{account}` - # @param data_source [::Google::Shopping::Merchant::DataSources::V1::DataSource, ::Hash] - # Required. The data source to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new - # - # # Call the create_data_source method. - # result = client.create_data_source request - # - # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. - # p result - # - def create_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.call_rpc :create_data_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the existing data source configuration. The fields that are - # set in the update mask but not provided in the resource will be deleted. - # - # @overload update_data_source(request, options = nil) - # Pass arguments to `update_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_source(data_source: nil, update_mask: nil) - # Pass arguments to `update_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param data_source [::Google::Shopping::Merchant::DataSources::V1::DataSource, ::Hash] - # Required. The data source resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of data source fields to be updated. - # - # Fields specified in the update mask without a value specified in the - # body will be deleted from the data source. - # - # Providing special "*" value for full data source replacement is not - # supported. - # - # For example, If you insert `updateMask=displayName` in the request, it will - # only update the `displayName` leaving all other fields untouched. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new - # - # # Call the update_data_source method. - # result = client.update_data_source request - # - # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. - # p result - # - def update_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_source&.name - header_params["data_source.name"] = request.data_source.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.call_rpc :update_data_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a data source from your Merchant Center account. - # - # @overload delete_data_source(request, options = nil) - # Pass arguments to `delete_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_data_source(name: nil) - # Pass arguments to `delete_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the data source to delete. - # Format: `accounts/{account}/dataSources/{datasource}` - # - # @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/shopping/merchant/data_sources/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new - # - # # Call the delete_data_source method. - # result = client.delete_data_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.call_rpc :delete_data_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Performs the data fetch immediately (even outside fetch schedule) on a - # data source from your Merchant Center Account. If you need to call - # this method more than once per day, you should use the Products service to - # update your product data instead. - # This method only works on data sources with a file input set. - # - # @overload fetch_data_source(request, options = nil) - # Pass arguments to `fetch_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_data_source(name: nil) - # Pass arguments to `fetch_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the data source resource to fetch. - # Format: `accounts/{account}/dataSources/{datasource}` - # - # @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/shopping/merchant/data_sources/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new - # - # # Call the fetch_data_source method. - # result = client.fetch_data_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def fetch_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.call_rpc :fetch_data_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataSourcesService API. - # - # This class represents the configuration for DataSourcesService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_data_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_data_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_data_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::DataSources::V1::DataSourcesService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 DataSourcesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source - ## - # RPC-specific configuration for `list_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_sources - ## - # RPC-specific configuration for `create_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_source - ## - # RPC-specific configuration for `update_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_source - ## - # RPC-specific configuration for `delete_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_source - ## - # RPC-specific configuration for `fetch_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_data_source - - # @private - def initialize parent_rpcs = nil - get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source - @get_data_source = ::Gapic::Config::Method.new get_data_source_config - list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources - @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config - create_data_source_config = parent_rpcs.create_data_source if parent_rpcs.respond_to? :create_data_source - @create_data_source = ::Gapic::Config::Method.new create_data_source_config - update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source - @update_data_source = ::Gapic::Config::Method.new update_data_source_config - delete_data_source_config = parent_rpcs.delete_data_source if parent_rpcs.respond_to? :delete_data_source - @delete_data_source = ::Gapic::Config::Method.new delete_data_source_config - fetch_data_source_config = parent_rpcs.fetch_data_source if parent_rpcs.respond_to? :fetch_data_source - @fetch_data_source = ::Gapic::Config::Method.new fetch_data_source_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb deleted file mode 100644 index b9274d26a836..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_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 Shopping - module Merchant - module DataSources - module V1 - module DataSourcesService - # Credentials for the DataSourcesService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb deleted file mode 100644 index 4e7d168d0d48..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_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 Shopping - module Merchant - module DataSources - module V1 - module DataSourcesService - # Path helper methods for the DataSourcesService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified DataSource resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/dataSources/{datasource}` - # - # @param account [String] - # @param datasource [String] - # - # @return [::String] - def data_source_path account:, datasource: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/dataSources/#{datasource}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb deleted file mode 100644 index 1ecdae02e5ff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/data_sources/v1/version" - -require "google/shopping/merchant/data_sources/v1/data_sources_service/credentials" -require "google/shopping/merchant/data_sources/v1/data_sources_service/paths" -require "google/shopping/merchant/data_sources/v1/data_sources_service/rest/client" - -module Google - module Shopping - module Merchant - module DataSources - module V1 - ## - # Service to manage primary, supplemental, inventory and other data sources. - # See more in the [Merchant - # Center](https://support.google.com/merchants/answer/7439058) help article. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/data_sources/v1/data_sources_service/rest" - # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new - # - module DataSourcesService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/data_sources/v1/data_sources_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb deleted file mode 100644 index 1328c5b1cbfa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/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/shopping/merchant/datasources/v1/datasources_pb" -require "google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module DataSources - module V1 - module DataSourcesService - module Rest - ## - # REST client for the DataSourcesService service. - # - # Service to manage primary, supplemental, inventory and other data sources. - # See more in the [Merchant - # Center](https://support.google.com/merchants/answer/7439058) help article. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_sources_service_stub - - ## - # Configure the DataSourcesService Client class. - # - # See {::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataSourcesService clients - # ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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", "Shopping", "Merchant", "DataSources", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataSourcesService 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::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_sources_service_stub.universe_domain - end - - ## - # Create a new DataSourcesService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataSourcesService 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 - - @data_sources_service_stub = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @data_sources_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 - @data_sources_service_stub.logger - end - - # Service calls - - ## - # Retrieves the data source configuration for the given account. - # - # @overload get_data_source(request, options = nil) - # Pass arguments to `get_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_source(name: nil) - # Pass arguments to `get_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the data source to retrieve. - # Format: `accounts/{account}/dataSources/{datasource}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new - # - # # Call the get_data_source method. - # result = client.get_data_source request - # - # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. - # p result - # - def get_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.get_data_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the configurations for data sources for the given account. - # - # @overload list_data_sources(request, options = nil) - # Pass arguments to `list_data_sources` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list data sources for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of data sources to return. The service may - # return fewer than this value. The maximum value is 1000; values above 1000 - # will be coerced to 1000. If unspecified, the maximum number of data sources - # will be returned. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataSources` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDataSources` - # must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1::DataSource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1::DataSource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.new - # - # # Call the list_data_sources method. - # result = client.list_data_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::DataSources::V1::DataSource. - # p item - # end - # - def list_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.list_data_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_sources_service_stub, :list_data_sources, "data_sources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates the new data source configuration for the given account. - # This method always creates a new data source. - # - # @overload create_data_source(request, options = nil) - # Pass arguments to `create_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_data_source(parent: nil, data_source: nil) - # Pass arguments to `create_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account where this data source will be created. - # Format: `accounts/{account}` - # @param data_source [::Google::Shopping::Merchant::DataSources::V1::DataSource, ::Hash] - # Required. The data source to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new - # - # # Call the create_data_source method. - # result = client.create_data_source request - # - # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. - # p result - # - def create_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.create_data_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the existing data source configuration. The fields that are - # set in the update mask but not provided in the resource will be deleted. - # - # @overload update_data_source(request, options = nil) - # Pass arguments to `update_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_source(data_source: nil, update_mask: nil) - # Pass arguments to `update_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param data_source [::Google::Shopping::Merchant::DataSources::V1::DataSource, ::Hash] - # Required. The data source resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of data source fields to be updated. - # - # Fields specified in the update mask without a value specified in the - # body will be deleted from the data source. - # - # Providing special "*" value for full data source replacement is not - # supported. - # - # For example, If you insert `updateMask=displayName` in the request, it will - # only update the `displayName` leaving all other fields untouched. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new - # - # # Call the update_data_source method. - # result = client.update_data_source request - # - # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. - # p result - # - def update_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.update_data_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a data source from your Merchant Center account. - # - # @overload delete_data_source(request, options = nil) - # Pass arguments to `delete_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_data_source(name: nil) - # Pass arguments to `delete_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the data source to delete. - # Format: `accounts/{account}/dataSources/{datasource}` - # @yield [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/shopping/merchant/data_sources/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new - # - # # Call the delete_data_source method. - # result = client.delete_data_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.delete_data_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Performs the data fetch immediately (even outside fetch schedule) on a - # data source from your Merchant Center Account. If you need to call - # this method more than once per day, you should use the Products service to - # update your product data instead. - # This method only works on data sources with a file input set. - # - # @overload fetch_data_source(request, options = nil) - # Pass arguments to `fetch_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_data_source(name: nil) - # Pass arguments to `fetch_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the data source resource to fetch. - # Format: `accounts/{account}/dataSources/{datasource}` - # @yield [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/shopping/merchant/data_sources/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new - # - # # Call the fetch_data_source method. - # result = client.fetch_data_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def fetch_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.fetch_data_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataSourcesService REST API. - # - # This class represents the configuration for DataSourcesService 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::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_data_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_data_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_data_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 DataSourcesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source - ## - # RPC-specific configuration for `list_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_sources - ## - # RPC-specific configuration for `create_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_source - ## - # RPC-specific configuration for `update_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_source - ## - # RPC-specific configuration for `delete_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_source - ## - # RPC-specific configuration for `fetch_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_data_source - - # @private - def initialize parent_rpcs = nil - get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source - @get_data_source = ::Gapic::Config::Method.new get_data_source_config - list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources - @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config - create_data_source_config = parent_rpcs.create_data_source if parent_rpcs.respond_to? :create_data_source - @create_data_source = ::Gapic::Config::Method.new create_data_source_config - update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source - @update_data_source = ::Gapic::Config::Method.new update_data_source_config - delete_data_source_config = parent_rpcs.delete_data_source if parent_rpcs.respond_to? :delete_data_source - @delete_data_source = ::Gapic::Config::Method.new delete_data_source_config - fetch_data_source_config = parent_rpcs.fetch_data_source if parent_rpcs.respond_to? :fetch_data_source - @fetch_data_source = ::Gapic::Config::Method.new fetch_data_source_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb deleted file mode 100644 index e14b0ec46c4b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb +++ /dev/null @@ -1,452 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/datasources/v1/datasources_pb" - -module Google - module Shopping - module Merchant - module DataSources - module V1 - module DataSourcesService - module Rest - ## - # REST service stub for the DataSourcesService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # A result object deserialized from the server's reply - def get_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_data_sources REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse] - # A result object deserialized from the server's reply - def list_data_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_data_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # A result object deserialized from the server's reply - def create_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_data_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # A result object deserialized from the server's reply - def update_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_data_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_data_source", - 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 fetch_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 fetch_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_data_source", - 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 get_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/datasources/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_sources REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/datasources/v1/{parent}/dataSources", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/datasources/v1/{parent}/dataSources", - body: "data_source", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/datasources/v1/{data_source.name}", - body: "data_source", - matches: [ - ["data_source.name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/datasources/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/datasources/v1/{name}:fetch", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb deleted file mode 100644 index 1928827ef5b7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/data_sources/v1/version" - -require "google/shopping/merchant/data_sources/v1/file_uploads_service/credentials" -require "google/shopping/merchant/data_sources/v1/file_uploads_service/paths" -require "google/shopping/merchant/data_sources/v1/file_uploads_service/client" -require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest" - -module Google - module Shopping - module Merchant - module DataSources - module V1 - ## - # Service to manage data source file uploads. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/data_sources/v1/file_uploads_service" - # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest" - # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new - # - module FileUploadsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "file_uploads_service", "helpers.rb" -require "google/shopping/merchant/data_sources/v1/file_uploads_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb deleted file mode 100644 index 6190838b633b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/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/shopping/merchant/datasources/v1/fileuploads_pb" - -module Google - module Shopping - module Merchant - module DataSources - module V1 - module FileUploadsService - ## - # Client for the FileUploadsService service. - # - # Service to manage data source file uploads. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :file_uploads_service_stub - - ## - # Configure the FileUploadsService Client class. - # - # See {::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all FileUploadsService clients - # ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::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", "Shopping", "Merchant", "DataSources", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the FileUploadsService 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::Shopping::Merchant::DataSources::V1::FileUploadsService::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 - @file_uploads_service_stub.universe_domain - end - - ## - # Create a new FileUploadsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the FileUploadsService 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/shopping/merchant/datasources/v1/fileuploads_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 - - @file_uploads_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::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 - ) - - @file_uploads_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 - @file_uploads_service_stub.logger - end - - # Service calls - - ## - # Gets the latest data source file upload. Only the `latest` alias is - # accepted for a file upload. - # - # @overload get_file_upload(request, options = nil) - # Pass arguments to `get_file_upload` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_file_upload(name: nil) - # Pass arguments to `get_file_upload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the data source file upload to retrieve. - # Format: - # `accounts/{account}/dataSources/{datasource}/fileUploads/latest` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1::FileUpload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1::FileUpload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new - # - # # Call the get_file_upload method. - # result = client.get_file_upload request - # - # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::FileUpload. - # p result - # - def get_file_upload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_file_upload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_file_upload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_file_upload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @file_uploads_service_stub.call_rpc :get_file_upload, request, 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 FileUploadsService API. - # - # This class represents the configuration for FileUploadsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_file_upload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_file_upload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_file_upload.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::DataSources::V1::FileUploadsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 FileUploadsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_file_upload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_file_upload - - # @private - def initialize parent_rpcs = nil - get_file_upload_config = parent_rpcs.get_file_upload if parent_rpcs.respond_to? :get_file_upload - @get_file_upload = ::Gapic::Config::Method.new get_file_upload_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb deleted file mode 100644 index 8a7915807f54..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_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 Shopping - module Merchant - module DataSources - module V1 - module FileUploadsService - # Credentials for the FileUploadsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb deleted file mode 100644 index 0b1160372bb5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module DataSources - module V1 - module FileUploadsService - # Path helper methods for the FileUploadsService API. - module Paths - ## - # Create a fully-qualified FileUpload resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/dataSources/{datasource}/fileUploads/{fileupload}` - # - # @param account [String] - # @param datasource [String] - # @param fileupload [String] - # - # @return [::String] - def file_upload_path account:, datasource:, fileupload: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "datasource cannot contain /" if datasource.to_s.include? "/" - - "accounts/#{account}/dataSources/#{datasource}/fileUploads/#{fileupload}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb deleted file mode 100644 index 48ac5574f7f0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_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/shopping/merchant/data_sources/v1/version" - -require "google/shopping/merchant/data_sources/v1/file_uploads_service/credentials" -require "google/shopping/merchant/data_sources/v1/file_uploads_service/paths" -require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client" - -module Google - module Shopping - module Merchant - module DataSources - module V1 - ## - # Service to manage data source file uploads. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest" - # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new - # - module FileUploadsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb deleted file mode 100644 index 020a2f4ee68d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb +++ /dev/null @@ -1,434 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/datasources/v1/fileuploads_pb" -require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module DataSources - module V1 - module FileUploadsService - module Rest - ## - # REST client for the FileUploadsService service. - # - # Service to manage data source file uploads. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :file_uploads_service_stub - - ## - # Configure the FileUploadsService Client class. - # - # See {::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all FileUploadsService clients - # ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::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", "Shopping", "Merchant", "DataSources", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the FileUploadsService 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::Shopping::Merchant::DataSources::V1::FileUploadsService::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 - @file_uploads_service_stub.universe_domain - end - - ## - # Create a new FileUploadsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the FileUploadsService 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 - - @file_uploads_service_stub = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @file_uploads_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 - @file_uploads_service_stub.logger - end - - # Service calls - - ## - # Gets the latest data source file upload. Only the `latest` alias is - # accepted for a file upload. - # - # @overload get_file_upload(request, options = nil) - # Pass arguments to `get_file_upload` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_file_upload(name: nil) - # Pass arguments to `get_file_upload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the data source file upload to retrieve. - # Format: - # `accounts/{account}/dataSources/{datasource}/fileUploads/latest` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::FileUpload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1::FileUpload] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new - # - # # Call the get_file_upload method. - # result = client.get_file_upload request - # - # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::FileUpload. - # p result - # - def get_file_upload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_file_upload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_file_upload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_file_upload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @file_uploads_service_stub.get_file_upload request, 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 FileUploadsService REST API. - # - # This class represents the configuration for FileUploadsService 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::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_file_upload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_file_upload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_file_upload.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 FileUploadsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_file_upload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_file_upload - - # @private - def initialize parent_rpcs = nil - get_file_upload_config = parent_rpcs.get_file_upload if parent_rpcs.respond_to? :get_file_upload - @get_file_upload = ::Gapic::Config::Method.new get_file_upload_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb deleted file mode 100644 index 28ebd9dab420..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.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! - -require "google/shopping/merchant/datasources/v1/fileuploads_pb" - -module Google - module Shopping - module Merchant - module DataSources - module V1 - module FileUploadsService - module Rest - ## - # REST service stub for the FileUploadsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_file_upload REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::FileUpload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1::FileUpload] - # A result object deserialized from the server's reply - def get_file_upload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_file_upload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_file_upload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::DataSources::V1::FileUpload.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_file_upload REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_file_upload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/datasources/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/dataSources/[^/]+/fileUploads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/rest.rb deleted file mode 100644 index c2d680dfac34..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/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/shopping/merchant/data_sources/v1/data_sources_service/rest" -require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest" -require "google/shopping/merchant/data_sources/v1/version" - -module Google - module Shopping - module Merchant - module DataSources - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/data_sources/v1/rest" - # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/version.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/version.rb deleted file mode 100644 index 9d0ce57bb8b4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/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 Shopping - module Merchant - module DataSources - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_pb.rb deleted file mode 100644 index 1df3dfee26d6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/datasources/v1/datasources.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/datasources/v1/datasourcetypes_pb' -require 'google/shopping/merchant/datasources/v1/fileinputs_pb' - - -descriptor_data = "\n9google/shopping/merchant/datasources/v1/datasources.proto\x12\'google.shopping.merchant.datasources.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a=google/shopping/merchant/datasources/v1/datasourcetypes.proto\x1a\x38google/shopping/merchant/datasources/v1/fileinputs.proto\"\xa2\t\n\nDataSource\x12h\n\x1bprimary_product_data_source\x18\x04 \x01(\x0b\x32\x41.google.shopping.merchant.datasources.v1.PrimaryProductDataSourceH\x00\x12r\n supplemental_product_data_source\x18\x05 \x01(\x0b\x32\x46.google.shopping.merchant.datasources.v1.SupplementalProductDataSourceH\x00\x12h\n\x1blocal_inventory_data_source\x18\x06 \x01(\x0b\x32\x41.google.shopping.merchant.datasources.v1.LocalInventoryDataSourceH\x00\x12n\n\x1eregional_inventory_data_source\x18\x07 \x01(\x0b\x32\x44.google.shopping.merchant.datasources.v1.RegionalInventoryDataSourceH\x00\x12]\n\x15promotion_data_source\x18\x08 \x01(\x0b\x32<.google.shopping.merchant.datasources.v1.PromotionDataSourceH\x00\x12\x66\n\x1aproduct_review_data_source\x18\t \x01(\x0b\x32@.google.shopping.merchant.datasources.v1.ProductReviewDataSourceH\x00\x12h\n\x1bmerchant_review_data_source\x18\x0c \x01(\x0b\x32\x41.google.shopping.merchant.datasources.v1.MerchantReviewDataSourceH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x1b\n\x0e\x64\x61ta_source_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12M\n\x05input\x18\n \x01(\x0e\x32\x39.google.shopping.merchant.datasources.v1.DataSource.InputB\x03\xe0\x41\x03\x12K\n\nfile_input\x18\x0b \x01(\x0b\x32\x32.google.shopping.merchant.datasources.v1.FileInputB\x03\xe0\x41\x01\"G\n\x05Input\x12\x15\n\x11INPUT_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41PI\x10\x01\x12\x08\n\x04\x46ILE\x10\x02\x12\x06\n\x02UI\x10\x03\x12\x0c\n\x08\x41UTOFEED\x10\x04:p\xea\x41m\n%merchantapi.googleapis.com/DataSource\x12+accounts/{account}/dataSources/{datasource}*\x0b\x64\x61taSources2\ndataSourceB\x06\n\x04Type\"S\n\x14GetDataSourceRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/DataSource\"\x88\x01\n\x16ListDataSourcesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%merchantapi.googleapis.com/DataSource\x12\x16\n\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\x17ListDataSourcesResponse\x12I\n\x0c\x64\x61ta_sources\x18\x01 \x03(\x0b\x32\x33.google.shopping.merchant.datasources.v1.DataSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa7\x01\n\x17\x43reateDataSourceRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%merchantapi.googleapis.com/DataSource\x12M\n\x0b\x64\x61ta_source\x18\x02 \x01(\x0b\x32\x33.google.shopping.merchant.datasources.v1.DataSourceB\x03\xe0\x41\x02\"\x9e\x01\n\x17UpdateDataSourceRequest\x12M\n\x0b\x64\x61ta_source\x18\x01 \x01(\x0b\x32\x33.google.shopping.merchant.datasources.v1.DataSourceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"U\n\x16\x46\x65tchDataSourceRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/DataSource\"V\n\x17\x44\x65leteDataSourceRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/DataSource2\xb9\n\n\x12\x44\x61taSourcesService\x12\xc3\x01\n\rGetDataSource\x12=.google.shopping.merchant.datasources.v1.GetDataSourceRequest\x1a\x33.google.shopping.merchant.datasources.v1.DataSource\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//datasources/v1/{name=accounts/*/dataSources/*}\x12\xd6\x01\n\x0fListDataSources\x12?.google.shopping.merchant.datasources.v1.ListDataSourcesRequest\x1a@.google.shopping.merchant.datasources.v1.ListDataSourcesResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//datasources/v1/{parent=accounts/*}/dataSources\x12\xe4\x01\n\x10\x43reateDataSource\x12@.google.shopping.merchant.datasources.v1.CreateDataSourceRequest\x1a\x33.google.shopping.merchant.datasources.v1.DataSource\"Y\xda\x41\x12parent,data_source\x82\xd3\xe4\x93\x02>\"//datasources/v1/{parent=accounts/*}/dataSources:\x0b\x64\x61ta_source\x12\xf5\x01\n\x10UpdateDataSource\x12@.google.shopping.merchant.datasources.v1.UpdateDataSourceRequest\x1a\x33.google.shopping.merchant.datasources.v1.DataSource\"j\xda\x41\x17\x64\x61ta_source,update_mask\x82\xd3\xe4\x93\x02J2;/datasources/v1/{data_source.name=accounts/*/dataSources/*}:\x0b\x64\x61ta_source\x12\xac\x01\n\x10\x44\x65leteDataSource\x12@.google.shopping.merchant.datasources.v1.DeleteDataSourceRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//datasources/v1/{name=accounts/*/dataSources/*}\x12\xac\x01\n\x0f\x46\x65tchDataSource\x12?.google.shopping.merchant.datasources.v1.FetchDataSourceRequest\x1a\x16.google.protobuf.Empty\"@\x82\xd3\xe4\x93\x02:\"5/datasources/v1/{name=accounts/*/dataSources/*}:fetch:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xaa\x03\n+com.google.shopping.merchant.datasources.v1B\x10\x44\x61taSourcesProtoP\x01ZScloud.google.com/go/shopping/merchant/datasources/apiv1/datasourcespb;datasourcespb\xaa\x02\'Google.Shopping.Merchant.DataSources.V1\xca\x02\'Google\\Shopping\\Merchant\\DataSources\\V1\xea\x02+Google::Shopping::Merchant::DataSources::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\xea\x41T\n%merchantapi.googleapis.com/Datasource\x12+accounts/{account}/dataSources/{datasource}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module DataSources - module V1 - DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.DataSource").msgclass - DataSource::Input = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.DataSource.Input").enummodule - GetDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.GetDataSourceRequest").msgclass - ListDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.ListDataSourcesRequest").msgclass - ListDataSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.ListDataSourcesResponse").msgclass - CreateDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.CreateDataSourceRequest").msgclass - UpdateDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.UpdateDataSourceRequest").msgclass - FetchDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FetchDataSourceRequest").msgclass - DeleteDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.DeleteDataSourceRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_services_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_services_pb.rb deleted file mode 100644 index 4ba5ad987ed2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_services_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/datasources/v1/datasources.proto for package 'Google.Shopping.Merchant.DataSources.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/shopping/merchant/datasources/v1/datasources_pb' - -module Google - module Shopping - module Merchant - module DataSources - module V1 - module DataSourcesService - # Service to manage primary, supplemental, inventory and other data sources. - # See more in the [Merchant - # Center](https://support.google.com/merchants/answer/7439058) help article. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.datasources.v1.DataSourcesService' - - # Retrieves the data source configuration for the given account. - rpc :GetDataSource, ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest, ::Google::Shopping::Merchant::DataSources::V1::DataSource - # Lists the configurations for data sources for the given account. - rpc :ListDataSources, ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest, ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse - # Creates the new data source configuration for the given account. - # This method always creates a new data source. - rpc :CreateDataSource, ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest, ::Google::Shopping::Merchant::DataSources::V1::DataSource - # Updates the existing data source configuration. The fields that are - # set in the update mask but not provided in the resource will be deleted. - rpc :UpdateDataSource, ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest, ::Google::Shopping::Merchant::DataSources::V1::DataSource - # Deletes a data source from your Merchant Center account. - rpc :DeleteDataSource, ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest, ::Google::Protobuf::Empty - # Performs the data fetch immediately (even outside fetch schedule) on a - # data source from your Merchant Center Account. If you need to call - # this method more than once per day, you should use the Products service to - # update your product data instead. - # This method only works on data sources with a file input set. - rpc :FetchDataSource, ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasourcetypes_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasourcetypes_pb.rb deleted file mode 100644 index d9f0c51fcd55..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasourcetypes_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/datasources/v1/datasourcetypes.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n=google/shopping/merchant/datasources/v1/datasourcetypes.proto\x12\'google.shopping.merchant.datasources.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a google/shopping/type/types.proto\"\xf9\x05\n\x18PrimaryProductDataSource\x12\x1c\n\x0clegacy_local\x18\x0b \x01(\x08\x42\x06\xe0\x41\x01\xe0\x41\x05\x12\x1f\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12%\n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x01\x88\x01\x01\x12\x16\n\tcountries\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12h\n\x0c\x64\x65\x66\x61ult_rule\x18\x07 \x01(\x0b\x32M.google.shopping.merchant.datasources.v1.PrimaryProductDataSource.DefaultRuleB\x03\xe0\x41\x01\x12h\n\x0c\x64\x65stinations\x18\n \x03(\x0b\x32M.google.shopping.merchant.datasources.v1.PrimaryProductDataSource.DestinationB\x03\xe0\x41\x01\x1ap\n\x0b\x44\x65\x66\x61ultRule\x12\x61\n\x16take_from_data_sources\x18\x01 \x03(\x0b\x32<.google.shopping.merchant.datasources.v1.DataSourceReferenceB\x03\xe0\x41\x02\x1a\xf4\x01\n\x0b\x44\x65stination\x12\x46\n\x0b\x64\x65stination\x18\x01 \x01(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnum\x12\x62\n\x05state\x18\x02 \x01(\x0e\x32S.google.shopping.merchant.datasources.v1.PrimaryProductDataSource.Destination.State\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x42\r\n\x0b_feed_labelB\x13\n\x11_content_language\"\xf8\x01\n\x1dSupplementalProductDataSource\x12\x1f\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12%\n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x01\x88\x01\x01\x12k\n referencing_primary_data_sources\x18\x07 \x03(\x0b\x32<.google.shopping.merchant.datasources.v1.DataSourceReferenceB\x03\xe0\x41\x03\x42\r\n\x0b_feed_labelB\x13\n\x11_content_language\"X\n\x18LocalInventoryDataSource\x12\x1a\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\"[\n\x1bRegionalInventoryDataSource\x12\x1a\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\"W\n\x13PromotionDataSource\x12\x1e\n\x0etarget_country\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\"\x19\n\x17ProductReviewDataSource\"\x1a\n\x18MerchantReviewDataSource\"\x8e\x01\n\x13\x44\x61taSourceReference\x12\x0e\n\x04self\x18\x01 \x01(\x08H\x00\x12\'\n\x18primary_data_source_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x12,\n\x1dsupplemental_data_source_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x42\x10\n\x0e\x64\x61ta_source_idB\x9c\x02\n+com.google.shopping.merchant.datasources.v1B\x14\x44\x61tasourcetypesProtoP\x01ZScloud.google.com/go/shopping/merchant/datasources/apiv1/datasourcespb;datasourcespb\xaa\x02\'Google.Shopping.Merchant.DataSources.V1\xca\x02\'Google\\Shopping\\Merchant\\DataSources\\V1\xea\x02+Google::Shopping::Merchant::DataSources::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module DataSources - module V1 - PrimaryProductDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.PrimaryProductDataSource").msgclass - PrimaryProductDataSource::DefaultRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.PrimaryProductDataSource.DefaultRule").msgclass - PrimaryProductDataSource::Destination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.PrimaryProductDataSource.Destination").msgclass - PrimaryProductDataSource::Destination::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.PrimaryProductDataSource.Destination.State").enummodule - SupplementalProductDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.SupplementalProductDataSource").msgclass - LocalInventoryDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.LocalInventoryDataSource").msgclass - RegionalInventoryDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.RegionalInventoryDataSource").msgclass - PromotionDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.PromotionDataSource").msgclass - ProductReviewDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.ProductReviewDataSource").msgclass - MerchantReviewDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.MerchantReviewDataSource").msgclass - DataSourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.DataSourceReference").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileinputs_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileinputs_pb.rb deleted file mode 100644 index 538873b5c51e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileinputs_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/datasources/v1/fileinputs.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/type/dayofweek_pb' -require 'google/type/timeofday_pb' - - -descriptor_data = "\n8google/shopping/merchant/datasources/v1/fileinputs.proto\x12\'google.shopping.merchant.datasources.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"\x91\x06\n\tFileInput\x12]\n\x0e\x66\x65tch_settings\x18\x01 \x01(\x0b\x32@.google.shopping.merchant.datasources.v1.FileInput.FetchSettingsB\x03\xe0\x41\x01\x12\x16\n\tfile_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12^\n\x0f\x66ile_input_type\x18\x03 \x01(\x0e\x32@.google.shopping.merchant.datasources.v1.FileInput.FileInputTypeB\x03\xe0\x41\x03\x1a\xd0\x03\n\rFetchSettings\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0c\x64\x61y_of_month\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x30\n\x0btime_of_day\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x01\x12\x30\n\x0b\x64\x61y_of_week\x18\x04 \x01(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x62\n\tfrequency\x18\x06 \x01(\x0e\x32J.google.shopping.merchant.datasources.v1.FileInput.FetchSettings.FrequencyB\x03\xe0\x41\x02\x12\x16\n\tfetch_uri\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08username\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08password\x18\t \x01(\tB\x03\xe0\x41\x01\"h\n\tFrequency\x12\x19\n\x15\x46REQUENCY_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x46REQUENCY_DAILY\x10\x01\x12\x14\n\x10\x46REQUENCY_WEEKLY\x10\x02\x12\x15\n\x11\x46REQUENCY_MONTHLY\x10\x03\"Z\n\rFileInputType\x12\x1f\n\x1b\x46ILE_INPUT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06UPLOAD\x10\x01\x12\t\n\x05\x46\x45TCH\x10\x02\x12\x11\n\rGOOGLE_SHEETS\x10\x03\x42\x97\x02\n+com.google.shopping.merchant.datasources.v1B\x0f\x46ileInputsProtoP\x01ZScloud.google.com/go/shopping/merchant/datasources/apiv1/datasourcespb;datasourcespb\xaa\x02\'Google.Shopping.Merchant.DataSources.V1\xca\x02\'Google\\Shopping\\Merchant\\DataSources\\V1\xea\x02+Google::Shopping::Merchant::DataSources::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module DataSources - module V1 - FileInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileInput").msgclass - FileInput::FetchSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileInput.FetchSettings").msgclass - FileInput::FetchSettings::Frequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileInput.FetchSettings.Frequency").enummodule - FileInput::FileInputType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileInput.FileInputType").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_pb.rb deleted file mode 100644 index cb47c57577eb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/datasources/v1/fileuploads.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n9google/shopping/merchant/datasources/v1/fileuploads.proto\x12\'google.shopping.merchant.datasources.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x06\n\nFileUpload\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0e\x64\x61ta_source_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x62\n\x10processing_state\x18\x03 \x01(\x0e\x32\x43.google.shopping.merchant.datasources.v1.FileUpload.ProcessingStateB\x03\xe0\x41\x03\x12N\n\x06issues\x18\x04 \x03(\x0b\x32\x39.google.shopping.merchant.datasources.v1.FileUpload.IssueB\x03\xe0\x41\x03\x12\x18\n\x0bitems_total\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\ritems_created\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\ritems_updated\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0bupload_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x95\x02\n\x05Issue\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x63ode\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05\x63ount\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12Y\n\x08severity\x18\x05 \x01(\x0e\x32\x42.google.shopping.merchant.datasources.v1.FileUpload.Issue.SeverityB\x03\xe0\x41\x03\x12\x1e\n\x11\x64ocumentation_uri\x18\x06 \x01(\tB\x03\xe0\x41\x03\"<\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07WARNING\x10\x01\x12\t\n\x05\x45RROR\x10\x02\"_\n\x0fProcessingState\x12 \n\x1cPROCESSING_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\r\n\tSUCCEEDED\x10\x03:\x8a\x01\xea\x41\x86\x01\n%merchantapi.googleapis.com/FileUpload\x12\x44\x61\x63\x63ounts/{account}/dataSources/{datasource}/fileUploads/{fileupload}*\x0b\x66ileUploads2\nfileUpload\"S\n\x14GetFileUploadRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/FileUpload2\xb1\x02\n\x12\x46ileUploadsService\x12\xd1\x01\n\rGetFileUpload\x12=.google.shopping.merchant.datasources.v1.GetFileUploadRequest\x1a\x33.google.shopping.merchant.datasources.v1.FileUpload\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/datasources/v1/{name=accounts/*/dataSources/*/fileUploads/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x98\x02\n+com.google.shopping.merchant.datasources.v1B\x10\x46ileUploadsProtoP\x01ZScloud.google.com/go/shopping/merchant/datasources/apiv1/datasourcespb;datasourcespb\xaa\x02\'Google.Shopping.Merchant.DataSources.V1\xca\x02\'Google\\Shopping\\Merchant\\DataSources\\V1\xea\x02+Google::Shopping::Merchant::DataSources::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module DataSources - module V1 - FileUpload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileUpload").msgclass - FileUpload::Issue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileUpload.Issue").msgclass - FileUpload::Issue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileUpload.Issue.Severity").enummodule - FileUpload::ProcessingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileUpload.ProcessingState").enummodule - GetFileUploadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.GetFileUploadRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_services_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_services_pb.rb deleted file mode 100644 index 57a070591799..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_services_pb.rb +++ /dev/null @@ -1,48 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/datasources/v1/fileuploads.proto for package 'Google.Shopping.Merchant.DataSources.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/shopping/merchant/datasources/v1/fileuploads_pb' - -module Google - module Shopping - module Merchant - module DataSources - module V1 - module FileUploadsService - # Service to manage data source file uploads. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.datasources.v1.FileUploadsService' - - # Gets the latest data source file upload. Only the `latest` alias is - # accepted for a file upload. - rpc :GetFileUpload, ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest, ::Google::Shopping::Merchant::DataSources::V1::FileUpload - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/README.md deleted file mode 100644 index 110adc2cf42e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant 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-shopping-merchant-data_sources-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb deleted file mode 100644 index dab10c2325dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb +++ /dev/null @@ -1,231 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module DataSources - module V1 - # The [data source](/merchant/api/guides/data-sources/overview) for - # the Merchant Center account. - # @!attribute [rw] primary_product_data_source - # @return [::Google::Shopping::Merchant::DataSources::V1::PrimaryProductDataSource] - # The [primary data - # source](https://support.google.com/merchants/answer/7439058) for local - # and online products. - # - # Note: The following fields are mutually exclusive: `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] supplemental_product_data_source - # @return [::Google::Shopping::Merchant::DataSources::V1::SupplementalProductDataSource] - # The [supplemental data - # source](https://support.google.com/merchants/answer/7439058) for local - # and online products. - # - # Note: The following fields are mutually exclusive: `supplemental_product_data_source`, `primary_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] local_inventory_data_source - # @return [::Google::Shopping::Merchant::DataSources::V1::LocalInventoryDataSource] - # The [local - # inventory](https://support.google.com/merchants/answer/7023001) data - # source. - # - # Note: The following fields are mutually exclusive: `local_inventory_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] regional_inventory_data_source - # @return [::Google::Shopping::Merchant::DataSources::V1::RegionalInventoryDataSource] - # The [regional - # inventory](https://support.google.com/merchants/answer/7439058) data - # source. - # - # Note: The following fields are mutually exclusive: `regional_inventory_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] promotion_data_source - # @return [::Google::Shopping::Merchant::DataSources::V1::PromotionDataSource] - # The [promotion](https://support.google.com/merchants/answer/2906014) - # data source. - # - # Note: The following fields are mutually exclusive: `promotion_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] product_review_data_source - # @return [::Google::Shopping::Merchant::DataSources::V1::ProductReviewDataSource] - # The [product - # review](https://support.google.com/merchants/answer/7045996) - # data source. - # - # Note: The following fields are mutually exclusive: `product_review_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] merchant_review_data_source - # @return [::Google::Shopping::Merchant::DataSources::V1::MerchantReviewDataSource] - # The [merchant - # review](https://support.google.com/merchants/answer/7045996) - # data source. - # - # Note: The following fields are mutually exclusive: `merchant_review_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Required. Identifier. The name of the data source. - # Format: - # `accounts/{account}/dataSources/{datasource}` - # @!attribute [r] data_source_id - # @return [::Integer] - # Output only. The data source id. - # @!attribute [rw] display_name - # @return [::String] - # Required. The displayed data source name in the Merchant Center UI. - # @!attribute [r] input - # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource::Input] - # Output only. Determines the type of input to the data source. Based on the - # input some settings might not work. Only generic data sources can be - # created through the API. - # @!attribute [rw] file_input - # @return [::Google::Shopping::Merchant::DataSources::V1::FileInput] - # Optional. The field is used only when data is managed through a file. - class DataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Determines the type of input to the data source. Based on the input some - # settings might not be supported. - module Input - # Input unspecified. - INPUT_UNSPECIFIED = 0 - - # Represents data sources for which the data is primarily provided through - # the API. - API = 1 - - # Represents data sources for which the data is primarily provided through - # file input. Data can still be provided through the API. - FILE = 2 - - # The data source for products added directly in Merchant Center. - # - # This type of data source can not be created or updated through this API, - # only by Merchant Center UI. - # - # This type of data source is read only. - UI = 3 - - # This is also known as - # [Automated feeds](https://support.google.com/merchants/answer/12158480) - # used to automatically build your product data. This type of data source - # can be enabled or disabled through the Accounts sub-API. - AUTOFEED = 4 - end - end - - # Request message for the GetDataSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the data source to retrieve. - # Format: `accounts/{account}/dataSources/{datasource}` - class GetDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListDataSources method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to list data sources for. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of data sources to return. The service may - # return fewer than this value. The maximum value is 1000; values above 1000 - # will be coerced to 1000. If unspecified, the maximum number of data sources - # will be returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDataSources` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDataSources` - # must match the call that provided the page token. - class ListDataSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListDataSources method. - # @!attribute [rw] data_sources - # @return [::Array<::Google::Shopping::Merchant::DataSources::V1::DataSource>] - # The data sources from the specified account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListDataSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateDataSource method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account where this data source will be created. - # Format: `accounts/{account}` - # @!attribute [rw] data_source - # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # Required. The data source to create. - class CreateDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateDataSource method. - # @!attribute [rw] data_source - # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] - # Required. The data source resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of data source fields to be updated. - # - # Fields specified in the update mask without a value specified in the - # body will be deleted from the data source. - # - # Providing special "*" value for full data source replacement is not - # supported. - # - # For example, If you insert `updateMask=displayName` in the request, it will - # only update the `displayName` leaving all other fields untouched. - class UpdateDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the FetchDataSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the data source resource to fetch. - # Format: `accounts/{account}/dataSources/{datasource}` - class FetchDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteDataSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the data source to delete. - # Format: `accounts/{account}/dataSources/{datasource}` - class DeleteDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb deleted file mode 100644 index f3c8579d065b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb +++ /dev/null @@ -1,293 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module DataSources - module V1 - # The primary data source for local and online products. - # @!attribute [rw] legacy_local - # @return [::Boolean] - # Optional. Immutable. Determines whether the products of this data source - # are **only** targeting local destinations. Legacy local products are - # prefixed with `local~` in the product resource ID. For example, - # `accounts/123/products/local~en~US~sku123`. - # @!attribute [rw] feed_label - # @return [::String] - # Optional. Immutable. The feed label that is specified on the data source - # level. - # - # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), - # and dashes (-). - # - # See also [migration to feed - # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). - # - # `feedLabel` and `contentLanguage` must be either both set or unset for data - # sources with product content type. - # They must be set for data sources with a file input. - # - # If set, the data source will only accept products matching this - # combination. If unset, the data source will accept products without that - # restriction. - # @!attribute [rw] content_language - # @return [::String] - # Optional. Immutable. The two-letter ISO 639-1 language of the items in the - # data source. - # - # `feedLabel` and `contentLanguage` must be either both set or unset. - # The fields can only be unset for data sources without file input. - # - # If set, the data source will only accept products matching this - # combination. If unset, the data source will accept products without that - # restriction. - # @!attribute [rw] countries - # @return [::Array<::String>] - # Optional. The countries where the items may be displayed. Represented as a - # [CLDR territory - # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). - # @!attribute [rw] default_rule - # @return [::Google::Shopping::Merchant::DataSources::V1::PrimaryProductDataSource::DefaultRule] - # Optional. Default rule management of the data source. If set, the linked - # data sources will be replaced. - # @!attribute [rw] destinations - # @return [::Array<::Google::Shopping::Merchant::DataSources::V1::PrimaryProductDataSource::Destination>] - # Optional. A list of destinations describing where products of the data - # source can be shown. - # - # When retrieving the data source, the list contains all the destinations - # that can be used for the data source, including the ones that are disabled - # for the data source but enabled for the account. - # - # Only destinations that are enabled on the account, for example through - # program participation, can be enabled on the data source. - # - # If unset, during creation, the destinations will be inherited based on the - # account level program participation. - # - # If set, during creation or update, the data source will be set only for the - # specified destinations. - # - # Updating this field requires at least one destination. - class PrimaryProductDataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Default rule management of the data source. - # @!attribute [rw] take_from_data_sources - # @return [::Array<::Google::Shopping::Merchant::DataSources::V1::DataSourceReference>] - # Required. The list of data sources linked in the [default - # rule](https://support.google.com/merchants/answer/7450276). - # This list is ordered by the default rule priority of joining the data. - # It might include none or multiple references to `self` and supplemental - # data sources. - # - # The list must not be empty. - # - # To link the data source to the default rule, you need to add a - # new reference to this list (in sequential order). - # - # To unlink the data source from the default rule, you need to - # remove the given reference from this list. - # - # Changing the order of this list will result in changing the priority of - # data sources in the default rule. - # - # For example, providing the following list: [`1001`, `self`] will - # take attribute values from supplemental data source `1001`, and fallback - # to `self` if the attribute is not set in `1001`. - class DefaultRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations also known as [Marketing - # methods](https://support.google.com/merchants/answer/15130232) selections. - # @!attribute [rw] destination - # @return [::Google::Shopping::Type::Destination::DestinationEnum] - # [Marketing methods](https://support.google.com/merchants/answer/15130232) - # (also known as destination) selections. - # @!attribute [rw] state - # @return [::Google::Shopping::Merchant::DataSources::V1::PrimaryProductDataSource::Destination::State] - # The state of the destination. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the destination. - module State - # Not specified. - STATE_UNSPECIFIED = 0 - - # Indicates that the destination is enabled. - ENABLED = 1 - - # Indicates that the destination is disabled. - DISABLED = 2 - end - end - end - - # The supplemental data source for local and online products. After creation, - # you should make sure to link the supplemental product data source into one or - # more primary product data sources. - # @!attribute [rw] feed_label - # @return [::String] - # Optional. Immutable. The feed label that is specified on the data source - # level. - # - # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), - # and dashes (-). - # - # See also [migration to feed - # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). - # - # `feedLabel` and `contentLanguage` must be either both set or unset for data - # sources with product content type. - # - # They must be set for data sources with a [file - # input][google.shopping.merchant.datasources.v1.FileInput]. - # The fields must be unset for data sources without [file - # input][google.shopping.merchant.datasources.v1.FileInput]. - # - # If set, the data source will only accept products matching this - # combination. If unset, the data source will accept produts without that - # restriction. - # @!attribute [rw] content_language - # @return [::String] - # Optional. Immutable. The two-letter ISO 639-1 language of the items in the - # data source. - # - # `feedLabel` and `contentLanguage` must be either both set or unset. - # The fields can only be unset for data sources without file input. - # - # If set, the data source will only accept products matching this - # combination. If unset, the data source will accept produts without that - # restriction. - # @!attribute [r] referencing_primary_data_sources - # @return [::Array<::Google::Shopping::Merchant::DataSources::V1::DataSourceReference>] - # Output only. The (unordered and deduplicated) list of all primary data - # sources linked to this data source in either default or custom rules. - # Supplemental data source cannot be deleted before all links are removed. - class SupplementalProductDataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The local inventory data source type is only available for file inputs and - # can't be used to create API local inventory data sources. - # @!attribute [rw] feed_label - # @return [::String] - # Required. Immutable. The feed label of the offers to which the local - # inventory is provided. - # - # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), - # and dashes (-). - # - # See also [migration to feed - # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). - # @!attribute [rw] content_language - # @return [::String] - # Required. Immutable. The two-letter ISO 639-1 language of the items to - # which the local inventory is provided. - class LocalInventoryDataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] feed_label - # @return [::String] - # Required. Immutable. The feed label of the offers to which the regional - # inventory is provided. - # - # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), - # and dashes (-). - # - # See also [migration to feed - # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). - # @!attribute [rw] content_language - # @return [::String] - # Required. Immutable. The two-letter ISO 639-1 language of the items to - # which the regional inventory is provided. - class RegionalInventoryDataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The promotion data source. - # @!attribute [rw] target_country - # @return [::String] - # Required. Immutable. The target country used as part of the unique - # identifier. Represented as a [CLDR territory - # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). - # - # Promotions are only available in selected - # [countries](https://support.google.com/merchants/answer/4588460). - # @!attribute [rw] content_language - # @return [::String] - # Required. Immutable. The two-letter ISO 639-1 language of the items in the - # data source. - class PromotionDataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The product review data source. - class ProductReviewDataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The merchant review data source. - class MerchantReviewDataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Data source reference can be used to manage related data sources within the - # data source service. - # @!attribute [rw] self - # @return [::Boolean] - # Self should be used to reference the primary data source itself. - # - # Note: The following fields are mutually exclusive: `self`, `primary_data_source_name`, `supplemental_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] primary_data_source_name - # @return [::String] - # Optional. The name of the primary data source. - # Format: - # `accounts/{account}/dataSources/{datasource}` - # - # Note: The following fields are mutually exclusive: `primary_data_source_name`, `self`, `supplemental_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] supplemental_data_source_name - # @return [::String] - # Optional. The name of the supplemental data source. - # Format: - # `accounts/{account}/dataSources/{datasource}` - # - # Note: The following fields are mutually exclusive: `supplemental_data_source_name`, `self`, `primary_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DataSourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb deleted file mode 100644 index eda22f604341..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.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 Shopping - module Merchant - module DataSources - module V1 - # The data specific for file data sources. This field is empty for other - # data source inputs. - # @!attribute [rw] fetch_settings - # @return [::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings] - # Optional. Fetch details to deliver the data source. It contains settings - # for `FETCH` and `GOOGLE_SHEETS` file input types. The required fields vary - # based on the frequency of fetching. - # @!attribute [rw] file_name - # @return [::String] - # Optional. The file name of the data source. Required for `UPLOAD` file - # input type. - # @!attribute [r] file_input_type - # @return [::Google::Shopping::Merchant::DataSources::V1::FileInput::FileInputType] - # Output only. The type of file input. - class FileInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Fetch details to deliver the data source. - # @!attribute [rw] enabled - # @return [::Boolean] - # Optional. Enables or pauses the fetch schedule. - # @!attribute [rw] day_of_month - # @return [::Integer] - # Optional. The day of the month when the data source file should be - # fetched (1-31). This field can only be set for monthly frequency. - # @!attribute [rw] time_of_day - # @return [::Google::Type::TimeOfDay] - # Optional. The hour of the day when the data source file should be - # fetched. Minutes and seconds are not supported and will be ignored. - # @!attribute [rw] day_of_week - # @return [::Google::Type::DayOfWeek] - # Optional. The day of the week when the data source file should be - # fetched. This field can only be set for weekly frequency. - # @!attribute [rw] time_zone - # @return [::String] - # Optional. [Time zone](https://cldr.unicode.org) used for schedule. UTC by - # default. For example, "America/Los_Angeles". - # @!attribute [rw] frequency - # @return [::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings::Frequency] - # Required. The frequency describing fetch schedule. - # @!attribute [rw] fetch_uri - # @return [::String] - # Optional. The URL where the data source file can be fetched. Google - # Merchant Center supports automatic scheduled uploads using the HTTP, - # HTTPS or SFTP protocols, so the value will need to be a valid link using - # one of those three protocols. Immutable for Google Sheets files. - # @!attribute [rw] username - # @return [::String] - # Optional. An optional user name for - # {::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings#fetch_uri fetch_uri}. - # Used for [submitting data sources through - # SFTP](https://support.google.com/merchants/answer/13813117). - # @!attribute [rw] password - # @return [::String] - # Optional. An optional password for - # {::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings#fetch_uri fetch_uri}. - # Used for [submitting data sources through - # SFTP](https://support.google.com/merchants/answer/13813117). - class FetchSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The required fields vary based on the frequency of fetching. For a - # monthly fetch schedule, `day of month` and [hour of - # day](../Shared.Types/TimeOfDay) are required. For a weekly fetch - # schedule, [day of week](../Shared.Types/DayOfWeek) and [hour of - # day](../Shared.Types/TimeOfDay) are required. For a daily fetch schedule, - # only an [hour of day](../Shared.Types/TimeOfDay) is required. - module Frequency - # Frequency unspecified. - FREQUENCY_UNSPECIFIED = 0 - - # The fetch happens every day. - FREQUENCY_DAILY = 1 - - # The fetch happens every week. - FREQUENCY_WEEKLY = 2 - - # The fetch happens every month. - FREQUENCY_MONTHLY = 3 - end - end - - # The method of file delivery. - module FileInputType - # File input type unspecified. - FILE_INPUT_TYPE_UNSPECIFIED = 0 - - # The file is uploaded through SFTP, Google Cloud Storage or manually in - # the Merchant Center. - UPLOAD = 1 - - # The file is fetched from the configured - # {::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings#fetch_uri fetch_uri}. - FETCH = 2 - - # The file is fetched from Google Sheets specified in the - # {::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings#fetch_uri fetch_uri}. - # However, you can't set up `GOOGLE_SHEETS` as a data source through the - # API. To add `GOOGLE_SHEETS` as a data source through the Merchant Center, - # see [Add products to Merchant - # Center](https://support.google.com/merchants/answer/12158053). - GOOGLE_SHEETS = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb deleted file mode 100644 index 1df1ee25c49a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb +++ /dev/null @@ -1,131 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module DataSources - module V1 - # The file upload of a specific data source, that is, the result of the - # retrieval of the data source at a certain timestamp computed asynchronously - # when the data source processing is finished. Only applicable to file data - # sources. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the data source file upload. - # Format: - # `{datasource.name=accounts/{account}/dataSources/{datasource}/fileUploads/{fileupload}}` - # @!attribute [r] data_source_id - # @return [::Integer] - # Output only. The data source id. - # @!attribute [r] processing_state - # @return [::Google::Shopping::Merchant::DataSources::V1::FileUpload::ProcessingState] - # Output only. The processing state of the data source. - # @!attribute [r] issues - # @return [::Array<::Google::Shopping::Merchant::DataSources::V1::FileUpload::Issue>] - # Output only. The list of issues occurring in the data source. - # @!attribute [r] items_total - # @return [::Integer] - # Output only. The number of items in the data source that were processed. - # @!attribute [r] items_created - # @return [::Integer] - # Output only. The number of items in the data source that were created. - # @!attribute [r] items_updated - # @return [::Integer] - # Output only. The number of items in the data source that were updated. - # @!attribute [r] upload_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The date at which the file of the data source was uploaded. - class FileUpload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An error occurring in the data source, like "invalid price". - # @!attribute [r] title - # @return [::String] - # Output only. The title of the issue, for example, "Item too big". - # @!attribute [r] description - # @return [::String] - # Output only. The error description, for example, "Your data source - # contains items which have too many attributes, or are too big. These - # items will be dropped". - # @!attribute [r] code - # @return [::String] - # Output only. The code of the error, for example, - # "validation/invalid_value". Returns - # "?" if the code is unknown. - # @!attribute [r] count - # @return [::Integer] - # Output only. The number of occurrences of the error in the file upload. - # @!attribute [r] severity - # @return [::Google::Shopping::Merchant::DataSources::V1::FileUpload::Issue::Severity] - # Output only. The severity of the issue. - # @!attribute [r] documentation_uri - # @return [::String] - # Output only. Link to the documentation explaining the issue in more - # details, if available. - class Issue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The severity of the issue. - module Severity - # Severity unspecified. - SEVERITY_UNSPECIFIED = 0 - - # The issue is the warning. - WARNING = 1 - - # The issue is an error. - ERROR = 2 - end - end - - # The processing state of the data source. - module ProcessingState - # Processing state unspecified. - PROCESSING_STATE_UNSPECIFIED = 0 - - # The data source could not be processed or all the items had errors. - FAILED = 1 - - # The data source is being processed. - IN_PROGRESS = 2 - - # The data source was processed successfully, though some items might have - # had errors. - SUCCEEDED = 3 - end - end - - # Request message for the GetFileUploadRequest method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the data source file upload to retrieve. - # Format: - # `accounts/{account}/dataSources/{datasource}/fileUploads/latest` - class GetFileUploadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/type/types.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! - - -module Google - module Shopping - module Type - # The weight represented as the value in string and the unit. - # @!attribute [rw] amount_micros - # @return [::Integer] - # Required. The weight represented as a number in micros (1 million micros is - # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 - # micros). - # This field can also be set as infinity by setting to -1. - # This field only support -1 and positive value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Type::Weight::WeightUnit] - # Required. The weight unit. - # Acceptable values are: kg and lb - class Weight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The weight unit. - module WeightUnit - # unit unspecified - WEIGHT_UNIT_UNSPECIFIED = 0 - - # lb unit. - POUND = 1 - - # kg unit. - KILOGRAM = 2 - end - end - - # The price represented as a number and currency. - # @!attribute [rw] amount_micros - # @return [::Integer] - # The price represented as a number in micros (1 million micros is an - # equivalent to one's currency standard unit, for example, 1 USD = 1000000 - # micros). - # @!attribute [rw] currency_code - # @return [::String] - # The currency of the price using three-letter acronyms according to [ISO - # 4217](http://en.wikipedia.org/wiki/ISO_4217). - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents custom attributes. Exactly one of `value` or - # `group_values` must not be empty. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute. - # @!attribute [rw] value - # @return [::String] - # The value of the attribute. If `value` is not empty, `group_values` must be - # empty. - # @!attribute [rw] group_values - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Subattributes within this attribute group. If - # `group_values` is not empty, `value` must be empty. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations available for a product. - # - # Destinations are used in Merchant Center to allow you to control where the - # products from your data feed should be displayed. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Destination values. - module DestinationEnum - # Not specified. - DESTINATION_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/google-ads/answer/2454022). - SHOPPING_ADS = 1 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 2 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3057972). - LOCAL_INVENTORY_ADS = 3 - - # [Free listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 4 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 5 - - # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). - YOUTUBE_SHOPPING = 6 - - # Youtube shopping checkout. - YOUTUBE_SHOPPING_CHECKOUT = 7 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 8 - - # [Free vehicle - # listings](https://support.google.com/merchants/answer/11189169). - FREE_VEHICLE_LISTINGS = 9 - - # [Vehicle ads](https://support.google.com/merchants/answer/11189169). - VEHICLE_ADS = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - end - end - - # Reporting contexts that your account and product issues apply to. - # - # Reporting contexts are groups of surfaces and formats for product results on - # Google. They can represent the entire destination (for example, [Shopping - # ads](https://support.google.com/merchants/answer/6149970)) or a subset of - # formats within a destination (for example, [Demand Gen - # ads](https://support.google.com/merchants/answer/13389785)). - class ReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reporting context values. - module ReportingContextEnum - # Not specified. - REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/merchants/answer/6149970). - SHOPPING_ADS = 1 - - # Deprecated: Use `DEMAND_GEN_ADS` instead. - # [Discovery and Demand Gen - # ads](https://support.google.com/merchants/answer/13389785). - DISCOVERY_ADS = 2 - - # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS = 13 - - # [Demand Gen ads on Discover - # surface](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 - - # [Video ads](https://support.google.com/google-ads/answer/6340491). - VIDEO_ADS = 3 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 4 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3271956). - LOCAL_INVENTORY_ADS = 5 - - # [Vehicle inventory - # ads](https://support.google.com/merchants/answer/11544533). - VEHICLE_INVENTORY_ADS = 6 - - # [Free product - # listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 7 - - # [Free product listings on UCP - # checkout](https://developers.google.com/merchant/ucp). - FREE_LISTINGS_UCP_CHECKOUT = 19 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 8 - - # [Free local vehicle - # listings](https://support.google.com/merchants/answer/11544533). - FREE_LOCAL_VEHICLE_LISTINGS = 9 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 18 - - # [YouTube - # Shopping](https://support.google.com/merchants/answer/13478370). - YOUTUBE_SHOPPING = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - - # [Product - # Reviews](https://support.google.com/merchants/answer/14620732). - PRODUCT_REVIEWS = 15 - - # [Merchant - # Reviews](https://developers.google.com/merchant-review-feeds). - MERCHANT_REVIEWS = 16 - - # YouTube Checkout - # . - YOUTUBE_CHECKOUT = 17 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/dayofweek.rb deleted file mode 100644 index 973211b9ffe7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/dayofweek.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a day of the week. - module DayOfWeek - # The day of the week is unspecified. - DAY_OF_WEEK_UNSPECIFIED = 0 - - # Monday - MONDAY = 1 - - # Tuesday - TUESDAY = 2 - - # Wednesday - WEDNESDAY = 3 - - # Thursday - THURSDAY = 4 - - # Friday - FRIDAY = 5 - - # Saturday - SATURDAY = 6 - - # Sunday - SUNDAY = 7 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.rb deleted file mode 100644 index 8372dad8beb8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a time of day. The date and time zone are either not significant - # or are specified elsewhere. An API may choose to allow leap seconds. Related - # types are [google.type.Date][google.type.Date] and - # `google.protobuf.Timestamp`. - # @!attribute [rw] hours - # @return [::Integer] - # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose - # to allow the value "24:00:00" for scenarios like business closing time. - # @!attribute [rw] minutes - # @return [::Integer] - # Minutes of hour of day. Must be from 0 to 59. - # @!attribute [rw] seconds - # @return [::Integer] - # Seconds of minutes of the time. Must normally be from 0 to 59. An API may - # allow the value 60 if it allows leap-seconds. - # @!attribute [rw] nanos - # @return [::Integer] - # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. - class TimeOfDay - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/Gemfile deleted file mode 100644 index eb731687c175..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1", path: "../" -else - gem "google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1/snippets/data_sources_service/create_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/create_data_source.rb deleted file mode 100644 index cdd60ea95da4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/create_data_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_DataSourcesService_CreateDataSource_sync] -require "google/shopping/merchant/data_sources/v1" - -## -# Snippet for the create_data_source call in the DataSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#create_data_source. -# -def create_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new - - # Call the create_data_source method. - result = client.create_data_source request - - # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. - p result -end -# [END merchantapi_v1_generated_DataSourcesService_CreateDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/delete_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/delete_data_source.rb deleted file mode 100644 index 4fde5b59b589..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/delete_data_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_DataSourcesService_DeleteDataSource_sync] -require "google/shopping/merchant/data_sources/v1" - -## -# Snippet for the delete_data_source call in the DataSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#delete_data_source. -# -def delete_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new - - # Call the delete_data_source method. - result = client.delete_data_source request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_DataSourcesService_DeleteDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/fetch_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/fetch_data_source.rb deleted file mode 100644 index f518b7b9fecf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/fetch_data_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_DataSourcesService_FetchDataSource_sync] -require "google/shopping/merchant/data_sources/v1" - -## -# Snippet for the fetch_data_source call in the DataSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#fetch_data_source. -# -def fetch_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new - - # Call the fetch_data_source method. - result = client.fetch_data_source request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_DataSourcesService_FetchDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/get_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/get_data_source.rb deleted file mode 100644 index af4e36c718df..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/get_data_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_DataSourcesService_GetDataSource_sync] -require "google/shopping/merchant/data_sources/v1" - -## -# Snippet for the get_data_source call in the DataSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#get_data_source. -# -def get_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new - - # Call the get_data_source method. - result = client.get_data_source request - - # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. - p result -end -# [END merchantapi_v1_generated_DataSourcesService_GetDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/list_data_sources.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/list_data_sources.rb deleted file mode 100644 index c0d1b7947b3c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/list_data_sources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_DataSourcesService_ListDataSources_sync] -require "google/shopping/merchant/data_sources/v1" - -## -# Snippet for the list_data_sources call in the DataSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#list_data_sources. -# -def list_data_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.new - - # Call the list_data_sources method. - result = client.list_data_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::DataSources::V1::DataSource. - p item - end -end -# [END merchantapi_v1_generated_DataSourcesService_ListDataSources_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/update_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/update_data_source.rb deleted file mode 100644 index f35600e6bfe2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/update_data_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_DataSourcesService_UpdateDataSource_sync] -require "google/shopping/merchant/data_sources/v1" - -## -# Snippet for the update_data_source call in the DataSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#update_data_source. -# -def update_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new - - # Call the update_data_source method. - result = client.update_data_source request - - # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. - p result -end -# [END merchantapi_v1_generated_DataSourcesService_UpdateDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/file_uploads_service/get_file_upload.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/file_uploads_service/get_file_upload.rb deleted file mode 100644 index d1e5ca1b0acb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/file_uploads_service/get_file_upload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_FileUploadsService_GetFileUpload_sync] -require "google/shopping/merchant/data_sources/v1" - -## -# Snippet for the get_file_upload call in the FileUploadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client#get_file_upload. -# -def get_file_upload - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new - - # Call the get_file_upload method. - result = client.get_file_upload request - - # The returned object is of type Google::Shopping::Merchant::DataSources::V1::FileUpload. - p result -end -# [END merchantapi_v1_generated_FileUploadsService_GetFileUpload_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json b/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json deleted file mode 100644 index 18efc22a579b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json +++ /dev/null @@ -1,295 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-data_sources-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.datasources.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1_generated_DataSourcesService_GetDataSource_sync", - "title": "Snippet for the get_data_source call in the DataSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#get_data_source.", - "file": "data_sources_service/get_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_source", - "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#get_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::DataSources::V1::DataSource", - "client": { - "short_name": "DataSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" - }, - "method": { - "short_name": "GetDataSource", - "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.GetDataSource", - "service": { - "short_name": "DataSourcesService", - "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_DataSourcesService_ListDataSources_sync", - "title": "Snippet for the list_data_sources call in the DataSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#list_data_sources.", - "file": "data_sources_service/list_data_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_sources", - "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#list_data_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse", - "client": { - "short_name": "DataSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" - }, - "method": { - "short_name": "ListDataSources", - "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.ListDataSources", - "service": { - "short_name": "DataSourcesService", - "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_DataSourcesService_CreateDataSource_sync", - "title": "Snippet for the create_data_source call in the DataSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#create_data_source.", - "file": "data_sources_service/create_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_source", - "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#create_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::DataSources::V1::DataSource", - "client": { - "short_name": "DataSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" - }, - "method": { - "short_name": "CreateDataSource", - "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.CreateDataSource", - "service": { - "short_name": "DataSourcesService", - "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_DataSourcesService_UpdateDataSource_sync", - "title": "Snippet for the update_data_source call in the DataSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#update_data_source.", - "file": "data_sources_service/update_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_source", - "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#update_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::DataSources::V1::DataSource", - "client": { - "short_name": "DataSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" - }, - "method": { - "short_name": "UpdateDataSource", - "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.UpdateDataSource", - "service": { - "short_name": "DataSourcesService", - "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_DataSourcesService_DeleteDataSource_sync", - "title": "Snippet for the delete_data_source call in the DataSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#delete_data_source.", - "file": "data_sources_service/delete_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_source", - "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#delete_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" - }, - "method": { - "short_name": "DeleteDataSource", - "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.DeleteDataSource", - "service": { - "short_name": "DataSourcesService", - "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_DataSourcesService_FetchDataSource_sync", - "title": "Snippet for the fetch_data_source call in the DataSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#fetch_data_source.", - "file": "data_sources_service/fetch_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_data_source", - "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#fetch_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" - }, - "method": { - "short_name": "FetchDataSource", - "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.FetchDataSource", - "service": { - "short_name": "DataSourcesService", - "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_FileUploadsService_GetFileUpload_sync", - "title": "Snippet for the get_file_upload call in the FileUploadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client#get_file_upload.", - "file": "file_uploads_service/get_file_upload.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_file_upload", - "full_name": "::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client#get_file_upload", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::DataSources::V1::FileUpload", - "client": { - "short_name": "FileUploadsService::Client", - "full_name": "::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client" - }, - "method": { - "short_name": "GetFileUpload", - "full_name": "google.shopping.merchant.datasources.v1.FileUploadsService.GetFileUpload", - "service": { - "short_name": "FileUploadsService", - "full_name": "google.shopping.merchant.datasources.v1.FileUploadsService" - } - } - }, - "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-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_paths_test.rb deleted file mode 100644 index ab362a729dbe..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_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/shopping/merchant/data_sources/v1/data_sources_service" - -class ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_data_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_source_path account: "value0", datasource: "value1" - assert_equal "accounts/value0/dataSources/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.rb deleted file mode 100644 index 5e257130e855..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/datasources/v1/datasources_pb" -require "google/shopping/merchant/data_sources/v1/data_sources_service/rest" - - -class ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_data_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_get_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_source ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_source(::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_source_client_stub.call_count - end - end - end - - def test_list_data_sources - # Create test objects. - client_result = ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse.new - http_response = OpenStruct.new 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_data_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_list_data_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_sources_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_sources({ 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_data_sources 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_data_sources ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.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_data_sources({ 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_data_sources(::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.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_data_sources_client_stub.call_count - end - end - end - - def test_create_data_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_source = {} - - create_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_create_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_source({ parent: parent, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_source parent: parent, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_source ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new(parent: parent, data_source: data_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_source({ parent: parent, data_source: data_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_source(::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new(parent: parent, data_source: data_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_source_client_stub.call_count - end - end - end - - def test_update_data_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - data_source = {} - update_mask = {} - - update_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_update_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_source({ data_source: data_source, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_source data_source: data_source, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_source ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new(data_source: data_source, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_source({ data_source: data_source, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_source(::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new(data_source: data_source, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_source_client_stub.call_count - end - end - end - - def test_delete_data_source - # 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_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_delete_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_source ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_source(::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_source_client_stub.call_count - end - end - end - - def test_fetch_data_source - # 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" - - fetch_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_fetch_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_data_source ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_data_source(::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_data_source_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb deleted file mode 100644 index 825e48a38ec1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb +++ /dev/null @@ -1,465 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/datasources/v1/datasources_pb" -require "google/shopping/merchant/data_sources/v1/data_sources_service" - -class ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_data_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::DataSources::V1::DataSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_source, name - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_source ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_source(::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_source_client_stub.call_rpc_count - end - end - - def test_list_data_sources - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_sources, name - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest, 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_data_sources_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_sources({ 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_data_sources 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_data_sources ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.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_data_sources({ 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_data_sources(::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.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_data_sources_client_stub.call_rpc_count - end - end - - def test_create_data_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::DataSources::V1::DataSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_source = {} - - create_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_source, name - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::DataSources::V1::DataSource), request["data_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_source({ parent: parent, data_source: data_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_source parent: parent, data_source: data_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_source ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new(parent: parent, data_source: data_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_source({ parent: parent, data_source: data_source }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_source(::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new(parent: parent, data_source: data_source), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_source_client_stub.call_rpc_count - end - end - - def test_update_data_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::DataSources::V1::DataSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - data_source = {} - update_mask = {} - - update_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_source, name - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::DataSources::V1::DataSource), request["data_source"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_source({ data_source: data_source, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_source data_source: data_source, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_source ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new(data_source: data_source, 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_data_source({ data_source: data_source, 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_data_source(::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new(data_source: data_source, 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_data_source_client_stub.call_rpc_count - end - end - - def test_delete_data_source - # 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_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_source, name - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_source ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_source(::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new(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_data_source_client_stub.call_rpc_count - end - end - - def test_fetch_data_source - # 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" - - fetch_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_data_source, name - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_data_source ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_data_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_data_source(::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_data_source_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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::Shopping::Merchant::DataSources::V1::DataSourcesService::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::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_paths_test.rb deleted file mode 100644 index 2168dbc883e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_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/shopping/merchant/data_sources/v1/file_uploads_service" - -class ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::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_file_upload_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.file_upload_path account: "value0", datasource: "value1", fileupload: "value2" - assert_equal "accounts/value0/dataSources/value1/fileUploads/value2", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb deleted file mode 100644 index 3ccf6921b1a3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb +++ /dev/null @@ -1,153 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/datasources/v1/fileuploads_pb" -require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest" - - -class ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_file_upload - # Create test objects. - client_result = ::Google::Shopping::Merchant::DataSources::V1::FileUpload.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_file_upload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::ServiceStub.stub :transcode_get_file_upload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_file_upload_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_file_upload({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_file_upload name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_file_upload ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_file_upload({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_file_upload(::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_file_upload_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::Shopping::Merchant::DataSources::V1::FileUploadsService::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::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb deleted file mode 100644 index 4fd1bf50da82..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb +++ /dev/null @@ -1,162 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/datasources/v1/fileuploads_pb" -require "google/shopping/merchant/data_sources/v1/file_uploads_service" - -class ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_file_upload - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::DataSources::V1::FileUpload.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_file_upload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_file_upload, name - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_file_upload_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_file_upload({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_file_upload name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_file_upload ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_file_upload({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_file_upload(::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_file_upload_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::Shopping::Merchant::DataSources::V1::FileUploadsService::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::Shopping::Merchant::DataSources::V1::FileUploadsService::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::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-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-shopping-merchant-data_sources-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.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-shopping-merchant-data_sources-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.repo-metadata.json deleted file mode 100644 index f8d21b117450..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-data_sources-v1beta", - "distribution_name": "google-shopping-merchant-data_sources-v1beta", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1BETA API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-data_sources-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-data_sources instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.rubocop.yml deleted file mode 100644 index e414ca5fad83..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-data_sources-v1beta.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-shopping-merchant-data_sources-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.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-shopping-merchant-data_sources-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant V1BETA 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-shopping-merchant-data_sources-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/AUTHENTICATION.md deleted file mode 100644 index 96d233d02efb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-data_sources-v1beta 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-shopping-merchant-data_sources-v1beta 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/shopping/merchant/data_sources/v1beta" - -client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/data_sources/v1beta" - -::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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-shopping-merchant-data_sources-v1beta -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/shopping/merchant/data_sources/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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-shopping-merchant-data_sources-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/README.md deleted file mode 100644 index 077c253183b1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Merchant V1BETA API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1BETA API. Most users should consider using -the main client gem, -[google-shopping-merchant-data_sources](https://rubygems.org/gems/google-shopping-merchant-data_sources). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-data_sources-v1beta -``` - -## 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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/data_sources/v1beta" - -client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new -request = ::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest.new # (request fields as keyword arguments...) -response = client.get_data_source request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-data_sources-v1beta) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/data_sources/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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-shopping-merchant-data_sources`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-data_sources-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-shopping-merchant-data_sources`. -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-shopping-merchant-data_sources-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/Rakefile deleted file mode 100644 index cba1bb4b2fa3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta 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/shopping/merchant/data_sources/v1beta/data_sources_service/credentials" - ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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-shopping-merchant-data_sources-v1beta 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-shopping-merchant-data_sources-v1beta 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-shopping-merchant-data_sources-v1beta 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-shopping-merchant-data_sources-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-data_sources-v1beta" - header "google-shopping-merchant-data_sources-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-data_sources-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-data_sources-v1beta 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-shopping-merchant-data_sources-v1beta 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-shopping-merchant-data_sources-v1beta 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-shopping-merchant-data_sources-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/gapic_metadata.json deleted file mode 100644 index d925fc1c73dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/gapic_metadata.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.datasources.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::DataSources::V1beta", - "services": { - "DataSourcesService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client", - "rpcs": { - "GetDataSource": { - "methods": [ - "get_data_source" - ] - }, - "ListDataSources": { - "methods": [ - "list_data_sources" - ] - }, - "CreateDataSource": { - "methods": [ - "create_data_source" - ] - }, - "UpdateDataSource": { - "methods": [ - "update_data_source" - ] - }, - "DeleteDataSource": { - "methods": [ - "delete_data_source" - ] - }, - "FetchDataSource": { - "methods": [ - "fetch_data_source" - ] - } - } - } - } - }, - "FileUploadsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client", - "rpcs": { - "GetFileUpload": { - "methods": [ - "get_file_upload" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/google-shopping-merchant-data_sources-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/google-shopping-merchant-data_sources-v1beta.gemspec deleted file mode 100644 index d4b97dc2f87a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/google-shopping-merchant-data_sources-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/data_sources/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-data_sources-v1beta" - gem.version = Google::Shopping::Merchant::DataSources::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-data_sources-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-data_sources instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center Accounts." - 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-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google-shopping-merchant-data_sources-v1beta.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google-shopping-merchant-data_sources-v1beta.rb deleted file mode 100644 index a5a782e5cca9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google-shopping-merchant-data_sources-v1beta.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/shopping/merchant/data_sources/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta.rb deleted file mode 100644 index 1a4e6e79724c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta.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 "google/shopping/merchant/data_sources/v1beta/data_sources_service" -require "google/shopping/merchant/data_sources/v1beta/file_uploads_service" -require "google/shopping/merchant/data_sources/v1beta/version" - -module Google - module Shopping - module Merchant - module DataSources - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/data_sources/v1beta" - # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/data_sources/v1beta" - # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/data_sources/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service.rb deleted file mode 100644 index f9f3402a3882..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/data_sources/v1beta/version" - -require "google/shopping/merchant/data_sources/v1beta/data_sources_service/credentials" -require "google/shopping/merchant/data_sources/v1beta/data_sources_service/paths" -require "google/shopping/merchant/data_sources/v1beta/data_sources_service/client" -require "google/shopping/merchant/data_sources/v1beta/data_sources_service/rest" - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - ## - # Service to manage primary, supplemental, inventory and other data sources. - # See more in the [Merchant - # Center](https://support.google.com/merchants/answer/7439058) help article. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/data_sources/v1beta/data_sources_service" - # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/data_sources/v1beta/data_sources_service/rest" - # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new - # - module DataSourcesService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_sources_service", "helpers.rb" -require "google/shopping/merchant/data_sources/v1beta/data_sources_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/client.rb deleted file mode 100644 index a5f8ba8a0cc7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/client.rb +++ /dev/null @@ -1,980 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/datasources/v1beta/datasources_pb" - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - module DataSourcesService - ## - # Client for the DataSourcesService service. - # - # Service to manage primary, supplemental, inventory and other data sources. - # See more in the [Merchant - # Center](https://support.google.com/merchants/answer/7439058) help article. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_sources_service_stub - - ## - # Configure the DataSourcesService Client class. - # - # See {::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataSourcesService clients - # ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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", "Shopping", "Merchant", "DataSources", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataSourcesService 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::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_sources_service_stub.universe_domain - end - - ## - # Create a new DataSourcesService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataSourcesService 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/shopping/merchant/datasources/v1beta/datasources_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 - - @data_sources_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @data_sources_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 - @data_sources_service_stub.logger - end - - # Service calls - - ## - # Retrieves the data source configuration for the given account. - # - # @overload get_data_source(request, options = nil) - # Pass arguments to `get_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_source(name: nil) - # Pass arguments to `get_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the data source to retrieve. - # Format: `accounts/{account}/dataSources/{datasource}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest.new - # - # # Call the get_data_source method. - # result = client.get_data_source request - # - # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. - # p result - # - def get_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.call_rpc :get_data_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the configurations for data sources for the given account. - # - # @overload list_data_sources(request, options = nil) - # Pass arguments to `list_data_sources` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list data sources for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of data sources to return. The service may - # return fewer than this value. The maximum value is 1000; values above 1000 - # will be coerced to 1000. If unspecified, the maximum number of data sources - # will be returned. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataSources` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDataSources` - # must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1beta::DataSource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1beta::DataSource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest.new - # - # # Call the list_data_sources method. - # result = client.list_data_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::DataSources::V1beta::DataSource. - # p item - # end - # - def list_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.call_rpc :list_data_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_sources_service_stub, :list_data_sources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates the new data source configuration for the given account. - # - # @overload create_data_source(request, options = nil) - # Pass arguments to `create_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_data_source(parent: nil, data_source: nil) - # Pass arguments to `create_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account where this data source will be created. - # Format: `accounts/{account}` - # @param data_source [::Google::Shopping::Merchant::DataSources::V1beta::DataSource, ::Hash] - # Required. The data source to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest.new - # - # # Call the create_data_source method. - # result = client.create_data_source request - # - # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. - # p result - # - def create_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.call_rpc :create_data_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the existing data source configuration. The fields that are - # set in the update mask but not provided in the resource will be deleted. - # - # @overload update_data_source(request, options = nil) - # Pass arguments to `update_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_source(data_source: nil, update_mask: nil) - # Pass arguments to `update_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param data_source [::Google::Shopping::Merchant::DataSources::V1beta::DataSource, ::Hash] - # Required. The data source resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of data source fields to be updated. - # - # Fields specified in the update mask without a value specified in the - # body will be deleted from the data source. - # - # Providing special "*" value for full data source replacement is not - # supported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest.new - # - # # Call the update_data_source method. - # result = client.update_data_source request - # - # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. - # p result - # - def update_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_source&.name - header_params["data_source.name"] = request.data_source.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.call_rpc :update_data_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a data source from your Merchant Center account. - # - # @overload delete_data_source(request, options = nil) - # Pass arguments to `delete_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_data_source(name: nil) - # Pass arguments to `delete_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the data source to delete. - # Format: `accounts/{account}/dataSources/{datasource}` - # - # @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/shopping/merchant/data_sources/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest.new - # - # # Call the delete_data_source method. - # result = client.delete_data_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.call_rpc :delete_data_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Performs the data fetch immediately (even outside fetch schedule) on a - # data source from your Merchant Center Account. If you need to call - # this method more than once per day, you should use the Products service to - # update your product data instead. - # This method only works on data sources with a file input set. - # - # @overload fetch_data_source(request, options = nil) - # Pass arguments to `fetch_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_data_source(name: nil) - # Pass arguments to `fetch_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the data source resource to fetch. - # Format: `accounts/{account}/dataSources/{datasource}` - # - # @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/shopping/merchant/data_sources/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest.new - # - # # Call the fetch_data_source method. - # result = client.fetch_data_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def fetch_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.call_rpc :fetch_data_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataSourcesService API. - # - # This class represents the configuration for DataSourcesService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_data_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_data_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_data_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 DataSourcesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source - ## - # RPC-specific configuration for `list_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_sources - ## - # RPC-specific configuration for `create_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_source - ## - # RPC-specific configuration for `update_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_source - ## - # RPC-specific configuration for `delete_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_source - ## - # RPC-specific configuration for `fetch_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_data_source - - # @private - def initialize parent_rpcs = nil - get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source - @get_data_source = ::Gapic::Config::Method.new get_data_source_config - list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources - @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config - create_data_source_config = parent_rpcs.create_data_source if parent_rpcs.respond_to? :create_data_source - @create_data_source = ::Gapic::Config::Method.new create_data_source_config - update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source - @update_data_source = ::Gapic::Config::Method.new update_data_source_config - delete_data_source_config = parent_rpcs.delete_data_source if parent_rpcs.respond_to? :delete_data_source - @delete_data_source = ::Gapic::Config::Method.new delete_data_source_config - fetch_data_source_config = parent_rpcs.fetch_data_source if parent_rpcs.respond_to? :fetch_data_source - @fetch_data_source = ::Gapic::Config::Method.new fetch_data_source_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/credentials.rb deleted file mode 100644 index a3f80b7a6ecf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_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 Shopping - module Merchant - module DataSources - module V1beta - module DataSourcesService - # Credentials for the DataSourcesService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/paths.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/paths.rb deleted file mode 100644 index 3b874f91b873..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_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 Shopping - module Merchant - module DataSources - module V1beta - module DataSourcesService - # Path helper methods for the DataSourcesService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified DataSource resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/dataSources/{datasource}` - # - # @param account [String] - # @param datasource [String] - # - # @return [::String] - def data_source_path account:, datasource: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/dataSources/#{datasource}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest.rb deleted file mode 100644 index 3178cf9ddfc2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/data_sources/v1beta/version" - -require "google/shopping/merchant/data_sources/v1beta/data_sources_service/credentials" -require "google/shopping/merchant/data_sources/v1beta/data_sources_service/paths" -require "google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/client" - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - ## - # Service to manage primary, supplemental, inventory and other data sources. - # See more in the [Merchant - # Center](https://support.google.com/merchants/answer/7439058) help article. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/data_sources/v1beta/data_sources_service/rest" - # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new - # - module DataSourcesService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/client.rb deleted file mode 100644 index 29caad459dcb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/client.rb +++ /dev/null @@ -1,895 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/datasources/v1beta/datasources_pb" -require "google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - module DataSourcesService - module Rest - ## - # REST client for the DataSourcesService service. - # - # Service to manage primary, supplemental, inventory and other data sources. - # See more in the [Merchant - # Center](https://support.google.com/merchants/answer/7439058) help article. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_sources_service_stub - - ## - # Configure the DataSourcesService Client class. - # - # See {::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataSourcesService clients - # ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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", "Shopping", "Merchant", "DataSources", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataSourcesService 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::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_sources_service_stub.universe_domain - end - - ## - # Create a new DataSourcesService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataSourcesService 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 - - @data_sources_service_stub = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @data_sources_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 - @data_sources_service_stub.logger - end - - # Service calls - - ## - # Retrieves the data source configuration for the given account. - # - # @overload get_data_source(request, options = nil) - # Pass arguments to `get_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_source(name: nil) - # Pass arguments to `get_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the data source to retrieve. - # Format: `accounts/{account}/dataSources/{datasource}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest.new - # - # # Call the get_data_source method. - # result = client.get_data_source request - # - # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. - # p result - # - def get_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.get_data_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the configurations for data sources for the given account. - # - # @overload list_data_sources(request, options = nil) - # Pass arguments to `list_data_sources` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list data sources for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of data sources to return. The service may - # return fewer than this value. The maximum value is 1000; values above 1000 - # will be coerced to 1000. If unspecified, the maximum number of data sources - # will be returned. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataSources` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDataSources` - # must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1beta::DataSource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1beta::DataSource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest.new - # - # # Call the list_data_sources method. - # result = client.list_data_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::DataSources::V1beta::DataSource. - # p item - # end - # - def list_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.list_data_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_sources_service_stub, :list_data_sources, "data_sources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates the new data source configuration for the given account. - # - # @overload create_data_source(request, options = nil) - # Pass arguments to `create_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_data_source(parent: nil, data_source: nil) - # Pass arguments to `create_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account where this data source will be created. - # Format: `accounts/{account}` - # @param data_source [::Google::Shopping::Merchant::DataSources::V1beta::DataSource, ::Hash] - # Required. The data source to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest.new - # - # # Call the create_data_source method. - # result = client.create_data_source request - # - # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. - # p result - # - def create_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.create_data_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the existing data source configuration. The fields that are - # set in the update mask but not provided in the resource will be deleted. - # - # @overload update_data_source(request, options = nil) - # Pass arguments to `update_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_source(data_source: nil, update_mask: nil) - # Pass arguments to `update_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param data_source [::Google::Shopping::Merchant::DataSources::V1beta::DataSource, ::Hash] - # Required. The data source resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of data source fields to be updated. - # - # Fields specified in the update mask without a value specified in the - # body will be deleted from the data source. - # - # Providing special "*" value for full data source replacement is not - # supported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest.new - # - # # Call the update_data_source method. - # result = client.update_data_source request - # - # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. - # p result - # - def update_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.update_data_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a data source from your Merchant Center account. - # - # @overload delete_data_source(request, options = nil) - # Pass arguments to `delete_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_data_source(name: nil) - # Pass arguments to `delete_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the data source to delete. - # Format: `accounts/{account}/dataSources/{datasource}` - # @yield [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/shopping/merchant/data_sources/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest.new - # - # # Call the delete_data_source method. - # result = client.delete_data_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.delete_data_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Performs the data fetch immediately (even outside fetch schedule) on a - # data source from your Merchant Center Account. If you need to call - # this method more than once per day, you should use the Products service to - # update your product data instead. - # This method only works on data sources with a file input set. - # - # @overload fetch_data_source(request, options = nil) - # Pass arguments to `fetch_data_source` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_data_source(name: nil) - # Pass arguments to `fetch_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the data source resource to fetch. - # Format: `accounts/{account}/dataSources/{datasource}` - # @yield [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/shopping/merchant/data_sources/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest.new - # - # # Call the fetch_data_source method. - # result = client.fetch_data_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def fetch_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_sources_service_stub.fetch_data_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataSourcesService REST API. - # - # This class represents the configuration for DataSourcesService 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::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_data_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_data_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_data_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 DataSourcesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source - ## - # RPC-specific configuration for `list_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_sources - ## - # RPC-specific configuration for `create_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_source - ## - # RPC-specific configuration for `update_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_source - ## - # RPC-specific configuration for `delete_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_source - ## - # RPC-specific configuration for `fetch_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_data_source - - # @private - def initialize parent_rpcs = nil - get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source - @get_data_source = ::Gapic::Config::Method.new get_data_source_config - list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources - @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config - create_data_source_config = parent_rpcs.create_data_source if parent_rpcs.respond_to? :create_data_source - @create_data_source = ::Gapic::Config::Method.new create_data_source_config - update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source - @update_data_source = ::Gapic::Config::Method.new update_data_source_config - delete_data_source_config = parent_rpcs.delete_data_source if parent_rpcs.respond_to? :delete_data_source - @delete_data_source = ::Gapic::Config::Method.new delete_data_source_config - fetch_data_source_config = parent_rpcs.fetch_data_source if parent_rpcs.respond_to? :fetch_data_source - @fetch_data_source = ::Gapic::Config::Method.new fetch_data_source_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/service_stub.rb deleted file mode 100644 index 6c4c211a3fc7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/service_stub.rb +++ /dev/null @@ -1,452 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/datasources/v1beta/datasources_pb" - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - module DataSourcesService - module Rest - ## - # REST service stub for the DataSourcesService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # A result object deserialized from the server's reply - def get_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_data_sources REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesResponse] - # A result object deserialized from the server's reply - def list_data_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_data_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # A result object deserialized from the server's reply - def create_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_data_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # A result object deserialized from the server's reply - def update_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_data_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_data_source", - 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 fetch_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 fetch_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_data_source", - 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 get_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/datasources/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_sources REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/datasources/v1beta/{parent}/dataSources", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/datasources/v1beta/{parent}/dataSources", - body: "data_source", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/datasources/v1beta/{data_source.name}", - body: "data_source", - matches: [ - ["data_source.name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/datasources/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_data_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/datasources/v1beta/{name}:fetch", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service.rb deleted file mode 100644 index a03d1d0e4565..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/data_sources/v1beta/version" - -require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/credentials" -require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths" -require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/client" -require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest" - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - ## - # Service to manage data source file uploads. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/data_sources/v1beta/file_uploads_service" - # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest" - # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new - # - module FileUploadsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "file_uploads_service", "helpers.rb" -require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/client.rb deleted file mode 100644 index 58c88794d9b7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/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/shopping/merchant/datasources/v1beta/fileuploads_pb" - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - module FileUploadsService - ## - # Client for the FileUploadsService service. - # - # Service to manage data source file uploads. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :file_uploads_service_stub - - ## - # Configure the FileUploadsService Client class. - # - # See {::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all FileUploadsService clients - # ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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", "Shopping", "Merchant", "DataSources", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the FileUploadsService 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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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 - @file_uploads_service_stub.universe_domain - end - - ## - # Create a new FileUploadsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the FileUploadsService 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/shopping/merchant/datasources/v1beta/fileuploads_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 - - @file_uploads_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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 - ) - - @file_uploads_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 - @file_uploads_service_stub.logger - end - - # Service calls - - ## - # Gets the latest data source file upload. Only the `latest` alias is - # accepted for a file upload. - # - # @overload get_file_upload(request, options = nil) - # Pass arguments to `get_file_upload` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_file_upload(name: nil) - # Pass arguments to `get_file_upload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the data source file upload to retrieve. - # Format: - # `accounts/{account}/dataSources/{datasource}/fileUploads/latest` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest.new - # - # # Call the get_file_upload method. - # result = client.get_file_upload request - # - # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::FileUpload. - # p result - # - def get_file_upload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_file_upload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_file_upload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_file_upload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @file_uploads_service_stub.call_rpc :get_file_upload, request, 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 FileUploadsService API. - # - # This class represents the configuration for FileUploadsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_file_upload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_file_upload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_file_upload.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 FileUploadsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_file_upload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_file_upload - - # @private - def initialize parent_rpcs = nil - get_file_upload_config = parent_rpcs.get_file_upload if parent_rpcs.respond_to? :get_file_upload - @get_file_upload = ::Gapic::Config::Method.new get_file_upload_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/credentials.rb deleted file mode 100644 index 6cc6fed4a3f0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_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 Shopping - module Merchant - module DataSources - module V1beta - module FileUploadsService - # Credentials for the FileUploadsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths.rb deleted file mode 100644 index dff7d56d950f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - module FileUploadsService - # Path helper methods for the FileUploadsService API. - module Paths - ## - # Create a fully-qualified FileUpload resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/dataSources/{datasource}/fileUploads/{fileupload}` - # - # @param account [String] - # @param datasource [String] - # @param fileupload [String] - # - # @return [::String] - def file_upload_path account:, datasource:, fileupload: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "datasource cannot contain /" if datasource.to_s.include? "/" - - "accounts/#{account}/dataSources/#{datasource}/fileUploads/#{fileupload}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest.rb deleted file mode 100644 index c79feb1cc2e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_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/shopping/merchant/data_sources/v1beta/version" - -require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/credentials" -require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths" -require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/client" - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - ## - # Service to manage data source file uploads. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest" - # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new - # - module FileUploadsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/client.rb deleted file mode 100644 index dbdaed2611ee..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/client.rb +++ /dev/null @@ -1,434 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/datasources/v1beta/fileuploads_pb" -require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - module FileUploadsService - module Rest - ## - # REST client for the FileUploadsService service. - # - # Service to manage data source file uploads. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :file_uploads_service_stub - - ## - # Configure the FileUploadsService Client class. - # - # See {::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all FileUploadsService clients - # ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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", "Shopping", "Merchant", "DataSources", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the FileUploadsService 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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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 - @file_uploads_service_stub.universe_domain - end - - ## - # Create a new FileUploadsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the FileUploadsService 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 - - @file_uploads_service_stub = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @file_uploads_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 - @file_uploads_service_stub.logger - end - - # Service calls - - ## - # Gets the latest data source file upload. Only the `latest` alias is - # accepted for a file upload. - # - # @overload get_file_upload(request, options = nil) - # Pass arguments to `get_file_upload` via a request object, either of type - # {::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_file_upload(name: nil) - # Pass arguments to `get_file_upload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the data source file upload to retrieve. - # Format: - # `accounts/{account}/dataSources/{datasource}/fileUploads/latest` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/data_sources/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest.new - # - # # Call the get_file_upload method. - # result = client.get_file_upload request - # - # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::FileUpload. - # p result - # - def get_file_upload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_file_upload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_file_upload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_file_upload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @file_uploads_service_stub.get_file_upload request, 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 FileUploadsService REST API. - # - # This class represents the configuration for FileUploadsService 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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_file_upload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_file_upload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_file_upload.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 FileUploadsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_file_upload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_file_upload - - # @private - def initialize parent_rpcs = nil - get_file_upload_config = parent_rpcs.get_file_upload if parent_rpcs.respond_to? :get_file_upload - @get_file_upload = ::Gapic::Config::Method.new get_file_upload_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/service_stub.rb deleted file mode 100644 index abad739c7f4e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/service_stub.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! - -require "google/shopping/merchant/datasources/v1beta/fileuploads_pb" - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - module FileUploadsService - module Rest - ## - # REST service stub for the FileUploadsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_file_upload REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload] - # A result object deserialized from the server's reply - def get_file_upload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_file_upload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_file_upload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::DataSources::V1beta::FileUpload.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_file_upload REST call - # - # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_file_upload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/datasources/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/dataSources/[^/]+/fileUploads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/rest.rb deleted file mode 100644 index 42367eda5bd5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/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/shopping/merchant/data_sources/v1beta/data_sources_service/rest" -require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest" -require "google/shopping/merchant/data_sources/v1beta/version" - -module Google - module Shopping - module Merchant - module DataSources - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/data_sources/v1beta/rest" - # client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/version.rb deleted file mode 100644 index 13986b30a66f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/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 Shopping - module Merchant - module DataSources - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_pb.rb deleted file mode 100644 index 0b963df73918..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/datasources/v1beta/datasources.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/datasources/v1beta/datasourcetypes_pb' -require 'google/shopping/merchant/datasources/v1beta/fileinputs_pb' - - -descriptor_data = "\n=google/shopping/merchant/datasources/v1beta/datasources.proto\x12+google.shopping.merchant.datasources.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x41google/shopping/merchant/datasources/v1beta/datasourcetypes.proto\x1a\"9/datasources/v1beta/{name=accounts/*/dataSources/*}:fetch:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xbe\x03\n/com.google.shopping.merchant.datasources.v1betaB\x10\x44\x61taSourcesProtoP\x01ZWcloud.google.com/go/shopping/merchant/datasources/apiv1beta/datasourcespb;datasourcespb\xaa\x02+Google.Shopping.Merchant.DataSources.V1Beta\xca\x02+Google\\Shopping\\Merchant\\DataSources\\V1beta\xea\x02/Google::Shopping::Merchant::DataSources::V1beta\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\xea\x41T\n%merchantapi.googleapis.com/Datasource\x12+accounts/{account}/dataSources/{datasource}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.DataSource").msgclass - DataSource::Input = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.DataSource.Input").enummodule - GetDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.GetDataSourceRequest").msgclass - ListDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.ListDataSourcesRequest").msgclass - ListDataSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.ListDataSourcesResponse").msgclass - CreateDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.CreateDataSourceRequest").msgclass - UpdateDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.UpdateDataSourceRequest").msgclass - FetchDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.FetchDataSourceRequest").msgclass - DeleteDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.DeleteDataSourceRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_services_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_services_pb.rb deleted file mode 100644 index be87934ee446..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_services_pb.rb +++ /dev/null @@ -1,64 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/datasources/v1beta/datasources.proto for package 'Google.Shopping.Merchant.DataSources.V1beta' -# 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/shopping/merchant/datasources/v1beta/datasources_pb' - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - module DataSourcesService - # Service to manage primary, supplemental, inventory and other data sources. - # See more in the [Merchant - # Center](https://support.google.com/merchants/answer/7439058) help article. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.datasources.v1beta.DataSourcesService' - - # Retrieves the data source configuration for the given account. - rpc :GetDataSource, ::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest, ::Google::Shopping::Merchant::DataSources::V1beta::DataSource - # Lists the configurations for data sources for the given account. - rpc :ListDataSources, ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest, ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesResponse - # Creates the new data source configuration for the given account. - rpc :CreateDataSource, ::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest, ::Google::Shopping::Merchant::DataSources::V1beta::DataSource - # Updates the existing data source configuration. The fields that are - # set in the update mask but not provided in the resource will be deleted. - rpc :UpdateDataSource, ::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest, ::Google::Shopping::Merchant::DataSources::V1beta::DataSource - # Deletes a data source from your Merchant Center account. - rpc :DeleteDataSource, ::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest, ::Google::Protobuf::Empty - # Performs the data fetch immediately (even outside fetch schedule) on a - # data source from your Merchant Center Account. If you need to call - # this method more than once per day, you should use the Products service to - # update your product data instead. - # This method only works on data sources with a file input set. - rpc :FetchDataSource, ::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasourcetypes_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasourcetypes_pb.rb deleted file mode 100644 index ecb5d88830aa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasourcetypes_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/datasources/v1beta/datasourcetypes.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\nAgoogle/shopping/merchant/datasources/v1beta/datasourcetypes.proto\x12+google.shopping.merchant.datasources.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a google/shopping/type/types.proto\"\xae\x07\n\x18PrimaryProductDataSource\x12\x66\n\x07\x63hannel\x18\x03 \x01(\x0e\x32M.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.ChannelB\x06\xe0\x41\x01\xe0\x41\x05\x12\x1f\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12%\n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x01\x88\x01\x01\x12\x16\n\tcountries\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12l\n\x0c\x64\x65\x66\x61ult_rule\x18\x07 \x01(\x0b\x32Q.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.DefaultRuleB\x03\xe0\x41\x01\x12l\n\x0c\x64\x65stinations\x18\n \x03(\x0b\x32Q.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.DestinationB\x03\xe0\x41\x01\x1at\n\x0b\x44\x65\x66\x61ultRule\x12\x65\n\x16take_from_data_sources\x18\x01 \x03(\x0b\x32@.google.shopping.merchant.datasources.v1beta.DataSourceReferenceB\x03\xe0\x41\x02\x1a\xf8\x01\n\x0b\x44\x65stination\x12\x46\n\x0b\x64\x65stination\x18\x01 \x01(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnum\x12\x66\n\x05state\x18\x02 \x01(\x0e\x32W.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.State\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\"Y\n\x07\x43hannel\x12\x17\n\x13\x43HANNEL_UNSPECIFIED\x10\x00\x12\x13\n\x0fONLINE_PRODUCTS\x10\x01\x12\x12\n\x0eLOCAL_PRODUCTS\x10\x02\x12\x0c\n\x08PRODUCTS\x10\x03\x42\r\n\x0b_feed_labelB\x13\n\x11_content_language\"\xfc\x01\n\x1dSupplementalProductDataSource\x12\x1f\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12%\n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x01\x88\x01\x01\x12o\n referencing_primary_data_sources\x18\x07 \x03(\x0b\x32@.google.shopping.merchant.datasources.v1beta.DataSourceReferenceB\x03\xe0\x41\x03\x42\r\n\x0b_feed_labelB\x13\n\x11_content_language\"X\n\x18LocalInventoryDataSource\x12\x1a\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\"[\n\x1bRegionalInventoryDataSource\x12\x1a\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\"W\n\x13PromotionDataSource\x12\x1e\n\x0etarget_country\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\"\x19\n\x17ProductReviewDataSource\"\x1a\n\x18MerchantReviewDataSource\"\x8e\x01\n\x13\x44\x61taSourceReference\x12\x0e\n\x04self\x18\x01 \x01(\x08H\x00\x12\'\n\x18primary_data_source_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x12,\n\x1dsupplemental_data_source_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x42\x10\n\x0e\x64\x61ta_source_idB\xb0\x02\n/com.google.shopping.merchant.datasources.v1betaB\x14\x44\x61tasourcetypesProtoP\x01ZWcloud.google.com/go/shopping/merchant/datasources/apiv1beta/datasourcespb;datasourcespb\xaa\x02+Google.Shopping.Merchant.DataSources.V1Beta\xca\x02+Google\\Shopping\\Merchant\\DataSources\\V1beta\xea\x02/Google::Shopping::Merchant::DataSources::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - PrimaryProductDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource").msgclass - PrimaryProductDataSource::DefaultRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.DefaultRule").msgclass - PrimaryProductDataSource::Destination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination").msgclass - PrimaryProductDataSource::Destination::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.State").enummodule - PrimaryProductDataSource::Channel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Channel").enummodule - SupplementalProductDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.SupplementalProductDataSource").msgclass - LocalInventoryDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.LocalInventoryDataSource").msgclass - RegionalInventoryDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.RegionalInventoryDataSource").msgclass - PromotionDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.PromotionDataSource").msgclass - ProductReviewDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.ProductReviewDataSource").msgclass - MerchantReviewDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.MerchantReviewDataSource").msgclass - DataSourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1beta.DataSourceReference").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/fileinputs_pb.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/fileinputs_pb.rb deleted file mode 100644 index 966fa837ca74..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/fileinputs_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/datasources/v1beta/fileinputs.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/type/dayofweek_pb' -require 'google/type/timeofday_pb' - - -descriptor_data = "\n] - # 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-shopping-merchant-data_sources-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasources.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasources.rb deleted file mode 100644 index b08737c6e77f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasources.rb +++ /dev/null @@ -1,228 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - # The [data source](https://support.google.com/merchants/answer/7439058) for - # the Merchant Center account. - # @!attribute [rw] primary_product_data_source - # @return [::Google::Shopping::Merchant::DataSources::V1beta::PrimaryProductDataSource] - # The [primary data - # source](https://support.google.com/merchants/answer/7439058) for local - # and online products. - # - # Note: The following fields are mutually exclusive: `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] supplemental_product_data_source - # @return [::Google::Shopping::Merchant::DataSources::V1beta::SupplementalProductDataSource] - # The [supplemental data - # source](https://support.google.com/merchants/answer/7439058) for local - # and online products. - # - # Note: The following fields are mutually exclusive: `supplemental_product_data_source`, `primary_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] local_inventory_data_source - # @return [::Google::Shopping::Merchant::DataSources::V1beta::LocalInventoryDataSource] - # The [local - # inventory](https://support.google.com/merchants/answer/7023001) data - # source. - # - # Note: The following fields are mutually exclusive: `local_inventory_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] regional_inventory_data_source - # @return [::Google::Shopping::Merchant::DataSources::V1beta::RegionalInventoryDataSource] - # The [regional - # inventory](https://support.google.com/merchants/answer/7439058) data - # source. - # - # Note: The following fields are mutually exclusive: `regional_inventory_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] promotion_data_source - # @return [::Google::Shopping::Merchant::DataSources::V1beta::PromotionDataSource] - # The [promotion](https://support.google.com/merchants/answer/2906014) - # data source. - # - # Note: The following fields are mutually exclusive: `promotion_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] product_review_data_source - # @return [::Google::Shopping::Merchant::DataSources::V1beta::ProductReviewDataSource] - # The [product - # review](https://support.google.com/merchants/answer/7045996) - # data source. - # - # Note: The following fields are mutually exclusive: `product_review_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] merchant_review_data_source - # @return [::Google::Shopping::Merchant::DataSources::V1beta::MerchantReviewDataSource] - # The [merchant - # review](https://support.google.com/merchants/answer/7045996) - # data source. - # - # Note: The following fields are mutually exclusive: `merchant_review_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the data source. - # Format: - # `{datasource.name=accounts/{account}/dataSources/{datasource}}` - # @!attribute [r] data_source_id - # @return [::Integer] - # Output only. The data source id. - # @!attribute [rw] display_name - # @return [::String] - # Required. The displayed data source name in the Merchant Center UI. - # @!attribute [r] input - # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource::Input] - # Output only. Determines the type of input to the data source. Based on the - # input some settings might not work. Only generic data sources can be - # created through the API. - # @!attribute [rw] file_input - # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileInput] - # Optional. The field is used only when data is managed through a file. - class DataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Determines the type of input to the data source. Based on the input some - # settings might not be supported. - module Input - # Input unspecified. - INPUT_UNSPECIFIED = 0 - - # Represents data sources for which the data is primarily provided through - # the API. - API = 1 - - # Represents data sources for which the data is primarily provided through - # file input. Data can still be provided through the API. - FILE = 2 - - # The data source for products added directly in Merchant Center. - # - # This type of data source can not be created or updated through this API, - # only by Merchant Center UI. - # - # This type of data source is read only. - UI = 3 - - # This is also known as - # [Automated feeds](https://support.google.com/merchants/answer/12158480) - # used to automatically build your product data. This type of data source - # can be enabled or disabled through the Accounts bundle. - AUTOFEED = 4 - end - end - - # Request message for the GetDataSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the data source to retrieve. - # Format: `accounts/{account}/dataSources/{datasource}` - class GetDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListDataSources method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to list data sources for. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of data sources to return. The service may - # return fewer than this value. The maximum value is 1000; values above 1000 - # will be coerced to 1000. If unspecified, the maximum number of data sources - # will be returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDataSources` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDataSources` - # must match the call that provided the page token. - class ListDataSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListDataSources method. - # @!attribute [rw] data_sources - # @return [::Array<::Google::Shopping::Merchant::DataSources::V1beta::DataSource>] - # The data sources from the specified account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListDataSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateDataSource method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account where this data source will be created. - # Format: `accounts/{account}` - # @!attribute [rw] data_source - # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # Required. The data source to create. - class CreateDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateDataSource method. - # @!attribute [rw] data_source - # @return [::Google::Shopping::Merchant::DataSources::V1beta::DataSource] - # Required. The data source resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of data source fields to be updated. - # - # Fields specified in the update mask without a value specified in the - # body will be deleted from the data source. - # - # Providing special "*" value for full data source replacement is not - # supported. - class UpdateDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the FetchDataSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the data source resource to fetch. - # Format: `accounts/{account}/dataSources/{datasource}` - class FetchDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteDataSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the data source to delete. - # Format: `accounts/{account}/dataSources/{datasource}` - class DeleteDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasourcetypes.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasourcetypes.rb deleted file mode 100644 index 31429a27303e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasourcetypes.rb +++ /dev/null @@ -1,310 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - # The primary data source for local and online products. - # @!attribute [rw] channel - # @return [::Google::Shopping::Merchant::DataSources::V1beta::PrimaryProductDataSource::Channel] - # Optional. Immutable. Specifies the type of data source channel. - # @!attribute [rw] feed_label - # @return [::String] - # Optional. Immutable. The feed label that is specified on the data source - # level. - # - # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), - # and dashes (-). - # - # See also [migration to feed - # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). - # - # `feedLabel` and `contentLanguage` must be either both set or unset for data - # sources with product content type. - # They must be set for data sources with a file input. - # - # If set, the data source will only accept products matching this - # combination. If unset, the data source will accept products without that - # restriction. - # @!attribute [rw] content_language - # @return [::String] - # Optional. Immutable. The two-letter ISO 639-1 language of the items in the - # data source. - # - # `feedLabel` and `contentLanguage` must be either both set or unset. - # The fields can only be unset for data sources without file input. - # - # If set, the data source will only accept products matching this - # combination. If unset, the data source will accept products without that - # restriction. - # @!attribute [rw] countries - # @return [::Array<::String>] - # Optional. The countries where the items may be displayed. Represented as a - # [CLDR territory - # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). - # @!attribute [rw] default_rule - # @return [::Google::Shopping::Merchant::DataSources::V1beta::PrimaryProductDataSource::DefaultRule] - # Optional. Default rule management of the data source. If set, the linked - # data sources will be replaced. - # @!attribute [rw] destinations - # @return [::Array<::Google::Shopping::Merchant::DataSources::V1beta::PrimaryProductDataSource::Destination>] - # Optional. A list of destinations describing where products of the data - # source can be shown. - # - # When retrieving the data source, the list contains all the destinations - # that can be used for the data source, including the ones that are disabled - # for the data source but enabled for the account. - # - # Only destinations that are enabled on the account, for example through - # program participation, can be enabled on the data source. - # - # If unset, during creation, the destinations will be inherited based on the - # account level program participation. - # - # If set, during creation or update, the data source will be set only for the - # specified destinations. - # - # Updating this field requires at least one destination. - class PrimaryProductDataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Default rule management of the data source. - # @!attribute [rw] take_from_data_sources - # @return [::Array<::Google::Shopping::Merchant::DataSources::V1beta::DataSourceReference>] - # Required. The list of data sources linked in the [default - # rule](https://support.google.com/merchants/answer/7450276). - # This list is ordered by the default rule priority of joining the data. - # It might include none or multiple references to `self` and supplemental - # data sources. - # - # The list must not be empty. - # - # To link the data source to the default rule, you need to add a - # new reference to this list (in sequential order). - # - # To unlink the data source from the default rule, you need to - # remove the given reference from this list. - # - # Changing the order of this list will result in changing the priority of - # data sources in the default rule. - # - # For example, providing the following list: [`1001`, `self`] will - # take attribute values from supplemental data source `1001`, and fallback - # to `self` if the attribute is not set in `1001`. - class DefaultRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations also known as [Marketing - # methods](https://support.google.com/merchants/answer/15130232) selections. - # @!attribute [rw] destination - # @return [::Google::Shopping::Type::Destination::DestinationEnum] - # [Marketing methods](https://support.google.com/merchants/answer/15130232) - # (also known as destination) selections. - # @!attribute [rw] state - # @return [::Google::Shopping::Merchant::DataSources::V1beta::PrimaryProductDataSource::Destination::State] - # The state of the destination. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the destination. - module State - # Not specified. - STATE_UNSPECIFIED = 0 - - # Indicates that the destination is enabled. - ENABLED = 1 - - # Indicates that the destination is disabled. - DISABLED = 2 - end - end - - # Data Source Channel. - # - # Channel is used to distinguish between data sources for different product - # verticals. - module Channel - # Not specified. - CHANNEL_UNSPECIFIED = 0 - - # Online product. - ONLINE_PRODUCTS = 1 - - # Local product. - LOCAL_PRODUCTS = 2 - - # Unified data source for both local and online products. - # Note: Products management through the API is not possible for this - # channel. - PRODUCTS = 3 - end - end - - # The supplemental data source for local and online products. After creation, - # you should make sure to link the supplemental product data source into one or - # more primary product data sources. - # @!attribute [rw] feed_label - # @return [::String] - # Optional. Immutable. The feed label that is specified on the data source - # level. - # - # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), - # and dashes (-). - # - # See also [migration to feed - # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). - # - # `feedLabel` and `contentLanguage` must be either both set or unset for data - # sources with product content type. - # - # They must be set for data sources with a [file - # input][google.shopping.merchant.datasources.v1main.FileInput]. - # The fields must be unset for data sources without [file - # input][google.shopping.merchant.datasources.v1main.FileInput]. - # - # If set, the data source will only accept products matching this - # combination. If unset, the data source will accept produts without that - # restriction. - # @!attribute [rw] content_language - # @return [::String] - # Optional. Immutable. The two-letter ISO 639-1 language of the items in the - # data source. - # - # `feedLabel` and `contentLanguage` must be either both set or unset. - # The fields can only be unset for data sources without file input. - # - # If set, the data source will only accept products matching this - # combination. If unset, the data source will accept produts without that - # restriction. - # @!attribute [r] referencing_primary_data_sources - # @return [::Array<::Google::Shopping::Merchant::DataSources::V1beta::DataSourceReference>] - # Output only. The (unordered and deduplicated) list of all primary data - # sources linked to this data source in either default or custom rules. - # Supplemental data source cannot be deleted before all links are removed. - class SupplementalProductDataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The local inventory data source. - # @!attribute [rw] feed_label - # @return [::String] - # Required. Immutable. The feed label of the offers to which the local - # inventory is provided. - # - # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), - # and dashes (-). - # - # See also [migration to feed - # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). - # @!attribute [rw] content_language - # @return [::String] - # Required. Immutable. The two-letter ISO 639-1 language of the items to - # which the local inventory is provided. - class LocalInventoryDataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The regional inventory data source. - # @!attribute [rw] feed_label - # @return [::String] - # Required. Immutable. The feed label of the offers to which the regional - # inventory is provided. - # - # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), - # and dashes (-). - # - # See also [migration to feed - # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). - # @!attribute [rw] content_language - # @return [::String] - # Required. Immutable. The two-letter ISO 639-1 language of the items to - # which the regional inventory is provided. - class RegionalInventoryDataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The promotion data source. - # @!attribute [rw] target_country - # @return [::String] - # Required. Immutable. The target country used as part of the unique - # identifier. Represented as a [CLDR territory - # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). - # - # Promotions are only available in selected - # [countries](https://support.google.com/merchants/answer/4588460). - # @!attribute [rw] content_language - # @return [::String] - # Required. Immutable. The two-letter ISO 639-1 language of the items in the - # data source. - class PromotionDataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The product review data source. - class ProductReviewDataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The merchant review data source. - class MerchantReviewDataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Data source reference can be used to manage related data sources within the - # data source service. - # @!attribute [rw] self - # @return [::Boolean] - # Self should be used to reference the primary data source itself. - # - # Note: The following fields are mutually exclusive: `self`, `primary_data_source_name`, `supplemental_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] primary_data_source_name - # @return [::String] - # Optional. The name of the primary data source. - # Format: - # `accounts/{account}/dataSources/{datasource}` - # - # Note: The following fields are mutually exclusive: `primary_data_source_name`, `self`, `supplemental_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] supplemental_data_source_name - # @return [::String] - # Optional. The name of the supplemental data source. - # Format: - # `accounts/{account}/dataSources/{datasource}` - # - # Note: The following fields are mutually exclusive: `supplemental_data_source_name`, `self`, `primary_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DataSourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileinputs.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileinputs.rb deleted file mode 100644 index ed24e5e223d3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileinputs.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 Shopping - module Merchant - module DataSources - module V1beta - # The data specific for file data sources. This field is empty for other - # data source inputs. - # @!attribute [rw] fetch_settings - # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileInput::FetchSettings] - # Optional. Fetch details to deliver the data source. It contains settings - # for `FETCH` and `GOOGLE_SHEETS` file input types. The required fields vary - # based on the frequency of fetching. - # @!attribute [rw] file_name - # @return [::String] - # Optional. The file name of the data source. Required for `UPLOAD` file - # input type. - # @!attribute [r] file_input_type - # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileInput::FileInputType] - # Output only. The type of file input. - class FileInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Fetch details to deliver the data source. - # @!attribute [rw] enabled - # @return [::Boolean] - # Optional. Enables or pauses the fetch schedule. - # @!attribute [rw] day_of_month - # @return [::Integer] - # Optional. The day of the month when the data source file should be - # fetched (1-31). This field can only be set for monthly frequency. - # @!attribute [rw] time_of_day - # @return [::Google::Type::TimeOfDay] - # Optional. The hour of the day when the data source file should be - # fetched. Minutes and seconds are not supported and will be ignored. - # @!attribute [rw] day_of_week - # @return [::Google::Type::DayOfWeek] - # Optional. The day of the week when the data source file should be - # fetched. This field can only be set for weekly frequency. - # @!attribute [rw] time_zone - # @return [::String] - # Optional. [Time zone](https://cldr.unicode.org) used for schedule. UTC by - # default. For example, "America/Los_Angeles". - # @!attribute [rw] frequency - # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileInput::FetchSettings::Frequency] - # Required. The frequency describing fetch schedule. - # @!attribute [rw] fetch_uri - # @return [::String] - # Optional. The URL where the data source file can be fetched. Google - # Merchant Center supports automatic scheduled uploads using the HTTP, - # HTTPS or SFTP protocols, so the value will need to be a valid link using - # one of those three protocols. Immutable for Google Sheets files. - # @!attribute [rw] username - # @return [::String] - # Optional. An optional user name for - # {::Google::Shopping::Merchant::DataSources::V1beta::FileInput::FetchSettings#fetch_uri fetch_uri}. - # Used for [submitting data sources through - # SFTP](https://support.google.com/merchants/answer/13813117). - # @!attribute [rw] password - # @return [::String] - # Optional. An optional password for - # {::Google::Shopping::Merchant::DataSources::V1beta::FileInput::FetchSettings#fetch_uri fetch_uri}. - # Used for [submitting data sources through - # SFTP](https://support.google.com/merchants/answer/13813117). - class FetchSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The required fields vary based on the frequency of fetching. For a - # monthly - # fetch schedule, - # [day of - # month][google.shopping.content.bundles.DataSources.FileInput.FetchSchedule.day_of_month] - # and - # [hour of - # day][google.shopping.content.bundles.DataSources.FileInput.FetchSchedule.time_of_day] - # are required. For a weekly fetch schedule, - # [day of - # week][google.shopping.content.bundles.DataSources.FileInput.FetchSchedule.day_of_week] - # and [hour of - # day][google.shopping.content.bundles.DataSources.FileInput.FetchSchedule.time_of_day] - # are required. For a daily fetch schedule, only an [hour of - # day][google.shopping.content.bundles.DataSources.FileInput.FetchSchedule.time_of_day] - # is required. - module Frequency - # Frequency unspecified. - FREQUENCY_UNSPECIFIED = 0 - - # The fetch happens every day. - FREQUENCY_DAILY = 1 - - # The fetch happens every week. - FREQUENCY_WEEKLY = 2 - - # The fetch happens every month. - FREQUENCY_MONTHLY = 3 - end - end - - # The method of file delivery. - module FileInputType - # File input type unspecified. - FILE_INPUT_TYPE_UNSPECIFIED = 0 - - # The file is uploaded through SFTP, Google Cloud Storage or manually in - # the Merchant Center. - UPLOAD = 1 - - # The file is fetched from the configured - # {::Google::Shopping::Merchant::DataSources::V1beta::FileInput::FetchSettings#fetch_uri fetch_uri}. - FETCH = 2 - - # The file is fetched from Google Sheets specified in the - # {::Google::Shopping::Merchant::DataSources::V1beta::FileInput::FetchSettings#fetch_uri fetch_uri}. - GOOGLE_SHEETS = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileuploads.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileuploads.rb deleted file mode 100644 index c1ab990d6ff0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileuploads.rb +++ /dev/null @@ -1,131 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module DataSources - module V1beta - # The file upload of a specific data source, that is, the result of the - # retrieval of the data source at a certain timestamp computed asynchronously - # when the data source processing is finished. Only applicable to file data - # sources. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the data source file upload. - # Format: - # `{datasource.name=accounts/{account}/dataSources/{datasource}/fileUploads/{fileupload}}` - # @!attribute [r] data_source_id - # @return [::Integer] - # Output only. The data source id. - # @!attribute [r] processing_state - # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload::ProcessingState] - # Output only. The processing state of the data source. - # @!attribute [r] issues - # @return [::Array<::Google::Shopping::Merchant::DataSources::V1beta::FileUpload::Issue>] - # Output only. The list of issues occurring in the data source. - # @!attribute [r] items_total - # @return [::Integer] - # Output only. The number of items in the data source that were processed. - # @!attribute [r] items_created - # @return [::Integer] - # Output only. The number of items in the data source that were created. - # @!attribute [r] items_updated - # @return [::Integer] - # Output only. The number of items in the data source that were updated. - # @!attribute [r] upload_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The date at which the file of the data source was uploaded. - class FileUpload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An error occurring in the data source, like "invalid price". - # @!attribute [r] title - # @return [::String] - # Output only. The title of the issue, for example, "Item too big". - # @!attribute [r] description - # @return [::String] - # Output only. The error description, for example, "Your data source - # contains items which have too many attributes, or are too big. These - # items will be dropped". - # @!attribute [r] code - # @return [::String] - # Output only. The code of the error, for example, - # "validation/invalid_value". Returns - # "?" if the code is unknown. - # @!attribute [r] count - # @return [::Integer] - # Output only. The number of occurrences of the error in the file upload. - # @!attribute [r] severity - # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload::Issue::Severity] - # Output only. The severity of the issue. - # @!attribute [r] documentation_uri - # @return [::String] - # Output only. Link to the documentation explaining the issue in more - # details, if available. - class Issue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The severity of the issue. - module Severity - # Severity unspecified. - SEVERITY_UNSPECIFIED = 0 - - # The issue is the warning. - WARNING = 1 - - # The issue is an error. - ERROR = 2 - end - end - - # The processing state of the data source. - module ProcessingState - # Processing state unspecified. - PROCESSING_STATE_UNSPECIFIED = 0 - - # The data source could not be processed or all the items had errors. - FAILED = 1 - - # The data source is being processed. - IN_PROGRESS = 2 - - # The data source was processed successfully, though some items might have - # had errors. - SUCCEEDED = 3 - end - end - - # Request message for the GetFileUploadRequest method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the data source file upload to retrieve. - # Format: - # `accounts/{account}/dataSources/{datasource}/fileUploads/latest` - class GetFileUploadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/type/types.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! - - -module Google - module Shopping - module Type - # The weight represented as the value in string and the unit. - # @!attribute [rw] amount_micros - # @return [::Integer] - # Required. The weight represented as a number in micros (1 million micros is - # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 - # micros). - # This field can also be set as infinity by setting to -1. - # This field only support -1 and positive value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Type::Weight::WeightUnit] - # Required. The weight unit. - # Acceptable values are: kg and lb - class Weight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The weight unit. - module WeightUnit - # unit unspecified - WEIGHT_UNIT_UNSPECIFIED = 0 - - # lb unit. - POUND = 1 - - # kg unit. - KILOGRAM = 2 - end - end - - # The price represented as a number and currency. - # @!attribute [rw] amount_micros - # @return [::Integer] - # The price represented as a number in micros (1 million micros is an - # equivalent to one's currency standard unit, for example, 1 USD = 1000000 - # micros). - # @!attribute [rw] currency_code - # @return [::String] - # The currency of the price using three-letter acronyms according to [ISO - # 4217](http://en.wikipedia.org/wiki/ISO_4217). - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents custom attributes. Exactly one of `value` or - # `group_values` must not be empty. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute. - # @!attribute [rw] value - # @return [::String] - # The value of the attribute. If `value` is not empty, `group_values` must be - # empty. - # @!attribute [rw] group_values - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Subattributes within this attribute group. If - # `group_values` is not empty, `value` must be empty. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations available for a product. - # - # Destinations are used in Merchant Center to allow you to control where the - # products from your data feed should be displayed. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Destination values. - module DestinationEnum - # Not specified. - DESTINATION_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/google-ads/answer/2454022). - SHOPPING_ADS = 1 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 2 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3057972). - LOCAL_INVENTORY_ADS = 3 - - # [Free listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 4 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 5 - - # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). - YOUTUBE_SHOPPING = 6 - - # Youtube shopping checkout. - YOUTUBE_SHOPPING_CHECKOUT = 7 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 8 - - # [Free vehicle - # listings](https://support.google.com/merchants/answer/11189169). - FREE_VEHICLE_LISTINGS = 9 - - # [Vehicle ads](https://support.google.com/merchants/answer/11189169). - VEHICLE_ADS = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - end - end - - # Reporting contexts that your account and product issues apply to. - # - # Reporting contexts are groups of surfaces and formats for product results on - # Google. They can represent the entire destination (for example, [Shopping - # ads](https://support.google.com/merchants/answer/6149970)) or a subset of - # formats within a destination (for example, [Demand Gen - # ads](https://support.google.com/merchants/answer/13389785)). - class ReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reporting context values. - module ReportingContextEnum - # Not specified. - REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/merchants/answer/6149970). - SHOPPING_ADS = 1 - - # Deprecated: Use `DEMAND_GEN_ADS` instead. - # [Discovery and Demand Gen - # ads](https://support.google.com/merchants/answer/13389785). - DISCOVERY_ADS = 2 - - # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS = 13 - - # [Demand Gen ads on Discover - # surface](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 - - # [Video ads](https://support.google.com/google-ads/answer/6340491). - VIDEO_ADS = 3 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 4 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3271956). - LOCAL_INVENTORY_ADS = 5 - - # [Vehicle inventory - # ads](https://support.google.com/merchants/answer/11544533). - VEHICLE_INVENTORY_ADS = 6 - - # [Free product - # listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 7 - - # [Free product listings on UCP - # checkout](https://developers.google.com/merchant/ucp). - FREE_LISTINGS_UCP_CHECKOUT = 19 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 8 - - # [Free local vehicle - # listings](https://support.google.com/merchants/answer/11544533). - FREE_LOCAL_VEHICLE_LISTINGS = 9 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 18 - - # [YouTube - # Shopping](https://support.google.com/merchants/answer/13478370). - YOUTUBE_SHOPPING = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - - # [Product - # Reviews](https://support.google.com/merchants/answer/14620732). - PRODUCT_REVIEWS = 15 - - # [Merchant - # Reviews](https://developers.google.com/merchant-review-feeds). - MERCHANT_REVIEWS = 16 - - # YouTube Checkout - # . - YOUTUBE_CHECKOUT = 17 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/dayofweek.rb deleted file mode 100644 index 973211b9ffe7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/dayofweek.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a day of the week. - module DayOfWeek - # The day of the week is unspecified. - DAY_OF_WEEK_UNSPECIFIED = 0 - - # Monday - MONDAY = 1 - - # Tuesday - TUESDAY = 2 - - # Wednesday - WEDNESDAY = 3 - - # Thursday - THURSDAY = 4 - - # Friday - FRIDAY = 5 - - # Saturday - SATURDAY = 6 - - # Sunday - SUNDAY = 7 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/timeofday.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/timeofday.rb deleted file mode 100644 index 8372dad8beb8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/Gemfile deleted file mode 100644 index 67b7de6a85fe..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-data_sources-v1beta", path: "../" -else - gem "google-shopping-merchant-data_sources-v1beta" -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-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/create_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/create_data_source.rb deleted file mode 100644 index 638728137703..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/create_data_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_DataSourcesService_CreateDataSource_sync] -require "google/shopping/merchant/data_sources/v1beta" - -## -# Snippet for the create_data_source call in the DataSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#create_data_source. -# -def create_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest.new - - # Call the create_data_source method. - result = client.create_data_source request - - # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. - p result -end -# [END merchantapi_v1beta_generated_DataSourcesService_CreateDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/delete_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/delete_data_source.rb deleted file mode 100644 index 21641e2c7c19..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/delete_data_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_DataSourcesService_DeleteDataSource_sync] -require "google/shopping/merchant/data_sources/v1beta" - -## -# Snippet for the delete_data_source call in the DataSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#delete_data_source. -# -def delete_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest.new - - # Call the delete_data_source method. - result = client.delete_data_source request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_DataSourcesService_DeleteDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/fetch_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/fetch_data_source.rb deleted file mode 100644 index 5dca028ea8b3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/fetch_data_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_DataSourcesService_FetchDataSource_sync] -require "google/shopping/merchant/data_sources/v1beta" - -## -# Snippet for the fetch_data_source call in the DataSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#fetch_data_source. -# -def fetch_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest.new - - # Call the fetch_data_source method. - result = client.fetch_data_source request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_DataSourcesService_FetchDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/get_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/get_data_source.rb deleted file mode 100644 index 0ce0193472fb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/get_data_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_DataSourcesService_GetDataSource_sync] -require "google/shopping/merchant/data_sources/v1beta" - -## -# Snippet for the get_data_source call in the DataSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#get_data_source. -# -def get_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest.new - - # Call the get_data_source method. - result = client.get_data_source request - - # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. - p result -end -# [END merchantapi_v1beta_generated_DataSourcesService_GetDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/list_data_sources.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/list_data_sources.rb deleted file mode 100644 index ceaddc02229a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/list_data_sources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_DataSourcesService_ListDataSources_sync] -require "google/shopping/merchant/data_sources/v1beta" - -## -# Snippet for the list_data_sources call in the DataSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#list_data_sources. -# -def list_data_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest.new - - # Call the list_data_sources method. - result = client.list_data_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::DataSources::V1beta::DataSource. - p item - end -end -# [END merchantapi_v1beta_generated_DataSourcesService_ListDataSources_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/update_data_source.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/update_data_source.rb deleted file mode 100644 index f98d619b67a0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/update_data_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_DataSourcesService_UpdateDataSource_sync] -require "google/shopping/merchant/data_sources/v1beta" - -## -# Snippet for the update_data_source call in the DataSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#update_data_source. -# -def update_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest.new - - # Call the update_data_source method. - result = client.update_data_source request - - # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::DataSource. - p result -end -# [END merchantapi_v1beta_generated_DataSourcesService_UpdateDataSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/file_uploads_service/get_file_upload.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/file_uploads_service/get_file_upload.rb deleted file mode 100644 index f56c3463591d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/file_uploads_service/get_file_upload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_FileUploadsService_GetFileUpload_sync] -require "google/shopping/merchant/data_sources/v1beta" - -## -# Snippet for the get_file_upload call in the FileUploadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client#get_file_upload. -# -def get_file_upload - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest.new - - # Call the get_file_upload method. - result = client.get_file_upload request - - # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::FileUpload. - p result -end -# [END merchantapi_v1beta_generated_FileUploadsService_GetFileUpload_sync] diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/snippet_metadata_google.shopping.merchant.datasources.v1beta.json b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/snippet_metadata_google.shopping.merchant.datasources.v1beta.json deleted file mode 100644 index fa5009cb9195..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/snippets/snippet_metadata_google.shopping.merchant.datasources.v1beta.json +++ /dev/null @@ -1,295 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-data_sources-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.datasources.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_DataSourcesService_GetDataSource_sync", - "title": "Snippet for the get_data_source call in the DataSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#get_data_source.", - "file": "data_sources_service/get_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_source", - "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#get_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::DataSources::V1beta::DataSource", - "client": { - "short_name": "DataSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client" - }, - "method": { - "short_name": "GetDataSource", - "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService.GetDataSource", - "service": { - "short_name": "DataSourcesService", - "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_DataSourcesService_ListDataSources_sync", - "title": "Snippet for the list_data_sources call in the DataSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#list_data_sources.", - "file": "data_sources_service/list_data_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_sources", - "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#list_data_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesResponse", - "client": { - "short_name": "DataSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client" - }, - "method": { - "short_name": "ListDataSources", - "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService.ListDataSources", - "service": { - "short_name": "DataSourcesService", - "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_DataSourcesService_CreateDataSource_sync", - "title": "Snippet for the create_data_source call in the DataSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#create_data_source.", - "file": "data_sources_service/create_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_source", - "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#create_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::DataSources::V1beta::DataSource", - "client": { - "short_name": "DataSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client" - }, - "method": { - "short_name": "CreateDataSource", - "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService.CreateDataSource", - "service": { - "short_name": "DataSourcesService", - "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_DataSourcesService_UpdateDataSource_sync", - "title": "Snippet for the update_data_source call in the DataSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#update_data_source.", - "file": "data_sources_service/update_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_source", - "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#update_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::DataSources::V1beta::DataSource", - "client": { - "short_name": "DataSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client" - }, - "method": { - "short_name": "UpdateDataSource", - "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService.UpdateDataSource", - "service": { - "short_name": "DataSourcesService", - "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_DataSourcesService_DeleteDataSource_sync", - "title": "Snippet for the delete_data_source call in the DataSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#delete_data_source.", - "file": "data_sources_service/delete_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_source", - "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#delete_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client" - }, - "method": { - "short_name": "DeleteDataSource", - "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService.DeleteDataSource", - "service": { - "short_name": "DataSourcesService", - "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_DataSourcesService_FetchDataSource_sync", - "title": "Snippet for the fetch_data_source call in the DataSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#fetch_data_source.", - "file": "data_sources_service/fetch_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_data_source", - "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client#fetch_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client" - }, - "method": { - "short_name": "FetchDataSource", - "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService.FetchDataSource", - "service": { - "short_name": "DataSourcesService", - "full_name": "google.shopping.merchant.datasources.v1beta.DataSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_FileUploadsService_GetFileUpload_sync", - "title": "Snippet for the get_file_upload call in the FileUploadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client#get_file_upload.", - "file": "file_uploads_service/get_file_upload.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_file_upload", - "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client#get_file_upload", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::DataSources::V1beta::FileUpload", - "client": { - "short_name": "FileUploadsService::Client", - "full_name": "::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client" - }, - "method": { - "short_name": "GetFileUpload", - "full_name": "google.shopping.merchant.datasources.v1beta.FileUploadsService.GetFileUpload", - "service": { - "short_name": "FileUploadsService", - "full_name": "google.shopping.merchant.datasources.v1beta.FileUploadsService" - } - } - }, - "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-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_paths_test.rb deleted file mode 100644 index 310fb0512324..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_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/shopping/merchant/data_sources/v1beta/data_sources_service" - -class ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_data_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_source_path account: "value0", datasource: "value1" - assert_equal "accounts/value0/dataSources/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_rest_test.rb deleted file mode 100644 index 5602b972a3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/datasources/v1beta/datasources_pb" -require "google/shopping/merchant/data_sources/v1beta/data_sources_service/rest" - - -class ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_data_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::ServiceStub.stub :transcode_get_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_source ::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_source(::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_source_client_stub.call_count - end - end - end - - def test_list_data_sources - # Create test objects. - client_result = ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesResponse.new - http_response = OpenStruct.new 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_data_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::ServiceStub.stub :transcode_list_data_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_sources_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_sources({ 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_data_sources 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_data_sources ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest.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_data_sources({ 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_data_sources(::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest.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_data_sources_client_stub.call_count - end - end - end - - def test_create_data_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_source = {} - - create_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::ServiceStub.stub :transcode_create_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_source({ parent: parent, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_source parent: parent, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_source ::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest.new(parent: parent, data_source: data_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_source({ parent: parent, data_source: data_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_source(::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest.new(parent: parent, data_source: data_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_source_client_stub.call_count - end - end - end - - def test_update_data_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - data_source = {} - update_mask = {} - - update_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::ServiceStub.stub :transcode_update_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_source({ data_source: data_source, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_source data_source: data_source, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_source ::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest.new(data_source: data_source, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_source({ data_source: data_source, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_source(::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest.new(data_source: data_source, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_source_client_stub.call_count - end - end - end - - def test_delete_data_source - # 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_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::ServiceStub.stub :transcode_delete_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_source ::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_source(::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_source_client_stub.call_count - end - end - end - - def test_fetch_data_source - # 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" - - fetch_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::ServiceStub.stub :transcode_fetch_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_data_source ::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_data_source(::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_data_source_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_test.rb deleted file mode 100644 index 6f5af2b5ce1a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_test.rb +++ /dev/null @@ -1,465 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/datasources/v1beta/datasources_pb" -require "google/shopping/merchant/data_sources/v1beta/data_sources_service" - -class ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_data_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_source, name - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_source ::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_source(::Google::Shopping::Merchant::DataSources::V1beta::GetDataSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_source_client_stub.call_rpc_count - end - end - - def test_list_data_sources - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_sources, name - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest, 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_data_sources_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_sources({ 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_data_sources 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_data_sources ::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest.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_data_sources({ 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_data_sources(::Google::Shopping::Merchant::DataSources::V1beta::ListDataSourcesRequest.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_data_sources_client_stub.call_rpc_count - end - end - - def test_create_data_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_source = {} - - create_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_source, name - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::DataSources::V1beta::DataSource), request["data_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_source({ parent: parent, data_source: data_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_source parent: parent, data_source: data_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_source ::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest.new(parent: parent, data_source: data_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_source({ parent: parent, data_source: data_source }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_source(::Google::Shopping::Merchant::DataSources::V1beta::CreateDataSourceRequest.new(parent: parent, data_source: data_source), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_source_client_stub.call_rpc_count - end - end - - def test_update_data_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::DataSources::V1beta::DataSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - data_source = {} - update_mask = {} - - update_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_source, name - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::DataSources::V1beta::DataSource), request["data_source"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_source({ data_source: data_source, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_source data_source: data_source, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_source ::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest.new(data_source: data_source, 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_data_source({ data_source: data_source, 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_data_source(::Google::Shopping::Merchant::DataSources::V1beta::UpdateDataSourceRequest.new(data_source: data_source, 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_data_source_client_stub.call_rpc_count - end - end - - def test_delete_data_source - # 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_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_source, name - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_source ::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_source(::Google::Shopping::Merchant::DataSources::V1beta::DeleteDataSourceRequest.new(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_data_source_client_stub.call_rpc_count - end - end - - def test_fetch_data_source - # 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" - - fetch_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_data_source, name - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_data_source_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_data_source ::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_data_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_data_source(::Google::Shopping::Merchant::DataSources::V1beta::FetchDataSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_data_source_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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::Shopping::Merchant::DataSources::V1beta::DataSourcesService::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::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_paths_test.rb deleted file mode 100644 index f6cbfaf0fd2e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_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/shopping/merchant/data_sources/v1beta/file_uploads_service" - -class ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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_file_upload_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.file_upload_path account: "value0", datasource: "value1", fileupload: "value2" - assert_equal "accounts/value0/dataSources/value1/fileUploads/value2", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_rest_test.rb deleted file mode 100644 index 26120c190328..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_rest_test.rb +++ /dev/null @@ -1,153 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/datasources/v1beta/fileuploads_pb" -require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest" - - -class ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_file_upload - # Create test objects. - client_result = ::Google::Shopping::Merchant::DataSources::V1beta::FileUpload.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_file_upload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::ServiceStub.stub :transcode_get_file_upload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_file_upload_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_file_upload({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_file_upload name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_file_upload ::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_file_upload({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_file_upload(::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_file_upload_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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_test.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_test.rb deleted file mode 100644 index 9d6a1ec34dff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_test.rb +++ /dev/null @@ -1,162 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/datasources/v1beta/fileuploads_pb" -require "google/shopping/merchant/data_sources/v1beta/file_uploads_service" - -class ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_file_upload - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::DataSources::V1beta::FileUpload.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_file_upload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_file_upload, name - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_file_upload_client_stub do - # Create client - client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_file_upload({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_file_upload name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_file_upload ::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_file_upload({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_file_upload(::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_file_upload_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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::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::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/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-shopping-merchant-inventories-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-inventories-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-inventories-v1/.repo-metadata.json deleted file mode 100644 index e70b67d6c360..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-inventories-v1", - "distribution_name": "google-shopping-merchant-inventories-v1", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1 API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-inventories-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-inventories instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-inventories-v1/.rubocop.yml deleted file mode 100644 index b0c70c43d864..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-inventories-v1/.yardopts deleted file mode 100644 index dc7bbc10ae29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant 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-shopping-merchant-inventories-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-inventories-v1/AUTHENTICATION.md deleted file mode 100644 index 4f0423f13882..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-inventories-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-shopping-merchant-inventories-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/shopping/merchant/inventories/v1" - -client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/inventories/v1" - -::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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-shopping-merchant-inventories-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/shopping/merchant/inventories/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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-shopping-merchant-inventories-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-inventories-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-inventories-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-inventories-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/README.md b/owl-bot-staging/google-shopping-merchant-inventories-v1/README.md deleted file mode 100644 index f220a2581837..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Merchant V1 API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1 API. Most users should consider using -the main client gem, -[google-shopping-merchant-inventories](https://rubygems.org/gems/google-shopping-merchant-inventories). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-inventories-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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/inventories/v1" - -client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new -request = ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.new # (request fields as keyword arguments...) -response = client.list_local_inventories request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-inventories-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/inventories/v1" -require "logger" - -client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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-shopping-merchant-inventories`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-inventories-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-shopping-merchant-inventories`. -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-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-inventories-v1/Rakefile deleted file mode 100644 index 77497d596c9a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-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/shopping/merchant/inventories/v1/local_inventory_service/credentials" - ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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-shopping-merchant-inventories-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-shopping-merchant-inventories-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-shopping-merchant-inventories-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-shopping-merchant-inventories-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-inventories-v1" - header "google-shopping-merchant-inventories-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-inventories-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-inventories-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-shopping-merchant-inventories-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-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-inventories-v1/gapic_metadata.json deleted file mode 100644 index 30b7c2264d23..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/gapic_metadata.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.inventories.v1", - "libraryPackage": "::Google::Shopping::Merchant::Inventories::V1", - "services": { - "LocalInventoryService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client", - "rpcs": { - "ListLocalInventories": { - "methods": [ - "list_local_inventories" - ] - }, - "InsertLocalInventory": { - "methods": [ - "insert_local_inventory" - ] - }, - "DeleteLocalInventory": { - "methods": [ - "delete_local_inventory" - ] - } - } - } - } - }, - "RegionalInventoryService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client", - "rpcs": { - "ListRegionalInventories": { - "methods": [ - "list_regional_inventories" - ] - }, - "InsertRegionalInventory": { - "methods": [ - "insert_regional_inventory" - ] - }, - "DeleteRegionalInventory": { - "methods": [ - "delete_regional_inventory" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/google-shopping-merchant-inventories-v1.gemspec b/owl-bot-staging/google-shopping-merchant-inventories-v1/google-shopping-merchant-inventories-v1.gemspec deleted file mode 100644 index 56f45d65035a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/google-shopping-merchant-inventories-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/inventories/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-inventories-v1" - gem.version = Google::Shopping::Merchant::Inventories::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-inventories-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-inventories instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center Accounts." - 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-shopping-type", "~> 1.0" -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google-shopping-merchant-inventories-v1.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google-shopping-merchant-inventories-v1.rb deleted file mode 100644 index db313242d13f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google-shopping-merchant-inventories-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/shopping/merchant/inventories/v1" diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1.rb deleted file mode 100644 index a5800c6000d3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1.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 "google/shopping/merchant/inventories/v1/local_inventory_service" -require "google/shopping/merchant/inventories/v1/regional_inventory_service" -require "google/shopping/merchant/inventories/v1/version" - -module Google - module Shopping - module Merchant - module Inventories - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/inventories/v1" - # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/inventories/v1" - # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/merchant/inventories/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/inventories_common_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/inventories_common_pb.rb deleted file mode 100644 index 08f78d0ef884..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/inventories_common_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/inventories/v1/inventories_common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/shopping/type/types_pb' -require 'google/type/interval_pb' - - -descriptor_data = "\n@google/shopping/merchant/inventories/v1/inventories_common.proto\x12\'google.shopping.merchant.inventories.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\xd2\x08\n\x18LocalInventoryAttributes\x12/\n\x05price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x34\n\nsale_price\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12=\n\x19sale_price_effective_date\x18\x03 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12i\n\x0c\x61vailability\x18\x04 \x01(\x0e\x32N.google.shopping.merchant.inventories.v1.LocalInventoryAttributes.AvailabilityH\x00\x88\x01\x01\x12\x1a\n\x08quantity\x18\x05 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12o\n\rpickup_method\x18\x06 \x01(\x0e\x32N.google.shopping.merchant.inventories.v1.LocalInventoryAttributes.PickupMethodB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12i\n\npickup_sla\x18\x07 \x01(\x0e\x32K.google.shopping.merchant.inventories.v1.LocalInventoryAttributes.PickupSlaB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12*\n\x18instore_product_location\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01\"\x8f\x01\n\x0c\x41vailability\x12,\n(LOCAL_INVENTORY_AVAILABILITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STOCK\x10\x01\x12\x18\n\x14LIMITED_AVAILABILITY\x10\x02\x12\x17\n\x13ON_DISPLAY_TO_ORDER\x10\x03\x12\x10\n\x0cOUT_OF_STOCK\x10\x04\"i\n\x0cPickupMethod\x12\x1d\n\x19PICKUP_METHOD_UNSPECIFIED\x10\x00\x12\x07\n\x03\x42UY\x10\x01\x12\x0b\n\x07RESERVE\x10\x02\x12\x11\n\rSHIP_TO_STORE\x10\x03\x12\x11\n\rNOT_SUPPORTED\x10\x04\"\xa7\x01\n\tPickupSla\x12\x1a\n\x16PICKUP_SLA_UNSPECIFIED\x10\x00\x12\x0c\n\x08SAME_DAY\x10\x01\x12\x0c\n\x08NEXT_DAY\x10\x02\x12\x0b\n\x07TWO_DAY\x10\x03\x12\r\n\tTHREE_DAY\x10\x04\x12\x0c\n\x08\x46OUR_DAY\x10\x05\x12\x0c\n\x08\x46IVE_DAY\x10\x06\x12\x0b\n\x07SIX_DAY\x10\x07\x12\r\n\tSEVEN_DAY\x10\x08\x12\x0e\n\nMULTI_WEEK\x10\tB\x0f\n\r_availabilityB\x0b\n\t_quantityB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\x1b\n\x19_instore_product_location\"\xa8\x03\n\x1bRegionalInventoryAttributes\x12/\n\x05price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x34\n\nsale_price\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12=\n\x19sale_price_effective_date\x18\x03 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12q\n\x0c\x61vailability\x18\x04 \x01(\x0e\x32Q.google.shopping.merchant.inventories.v1.RegionalInventoryAttributes.AvailabilityB\x03\xe0\x41\x01H\x00\x88\x01\x01\"_\n\x0c\x41vailability\x12/\n+REGIONAL_INVENTORY_AVAILABILITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STOCK\x10\x01\x12\x10\n\x0cOUT_OF_STOCK\x10\x02\x42\x0f\n\r_availabilityB\x9e\x02\n+com.google.shopping.merchant.inventories.v1B\x16InventoriesCommonProtoP\x01ZScloud.google.com/go/shopping/merchant/inventories/apiv1/inventoriespb;inventoriespb\xaa\x02\'Google.Shopping.Merchant.Inventories.V1\xca\x02\'Google\\Shopping\\Merchant\\Inventories\\V1\xea\x02+Google::Shopping::Merchant::Inventories::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Inventories - module V1 - LocalInventoryAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.LocalInventoryAttributes").msgclass - LocalInventoryAttributes::Availability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.LocalInventoryAttributes.Availability").enummodule - LocalInventoryAttributes::PickupMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.LocalInventoryAttributes.PickupMethod").enummodule - LocalInventoryAttributes::PickupSla = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.LocalInventoryAttributes.PickupSla").enummodule - RegionalInventoryAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.RegionalInventoryAttributes").msgclass - RegionalInventoryAttributes::Availability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.RegionalInventoryAttributes.Availability").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb deleted file mode 100644 index 9da3c96daede..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/inventories/v1/version" - -require "google/shopping/merchant/inventories/v1/local_inventory_service/credentials" -require "google/shopping/merchant/inventories/v1/local_inventory_service/paths" -require "google/shopping/merchant/inventories/v1/local_inventory_service/client" -require "google/shopping/merchant/inventories/v1/local_inventory_service/rest" - -module Google - module Shopping - module Merchant - module Inventories - module V1 - ## - # Service to manage local inventory for products - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/inventories/v1/local_inventory_service" - # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/inventories/v1/local_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new - # - module LocalInventoryService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "local_inventory_service", "helpers.rb" -require "google/shopping/merchant/inventories/v1/local_inventory_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb deleted file mode 100644 index b1eadc68aca1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb +++ /dev/null @@ -1,711 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/inventories/v1/localinventory_pb" - -module Google - module Shopping - module Merchant - module Inventories - module V1 - module LocalInventoryService - ## - # Client for the LocalInventoryService service. - # - # Service to manage local inventory for products - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :local_inventory_service_stub - - ## - # Configure the LocalInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LocalInventoryService clients - # ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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", "Shopping", "Merchant", "Inventories", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LocalInventoryService 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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 - @local_inventory_service_stub.universe_domain - end - - ## - # Create a new LocalInventoryService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LocalInventoryService 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/shopping/merchant/inventories/v1/localinventory_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 - - @local_inventory_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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 - ) - - @local_inventory_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 - @local_inventory_service_stub.logger - end - - # Service calls - - ## - # Lists the `LocalInventory` resources for the given product in your merchant - # account. The response might contain fewer items than specified by - # `pageSize`. If `pageToken` was returned in previous request, it can be used - # to obtain additional results. - # - # `LocalInventory` resources are listed per product for a given account. - # - # @overload list_local_inventories(request, options = nil) - # Pass arguments to `list_local_inventories` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_local_inventories(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_local_inventories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 parent product to list local inventories for. - # Format: - # `accounts/{account}/products/{product}` - # @param page_size [::Integer] - # The maximum number of `LocalInventory` resources for the given - # product to return. The service returns fewer than this value if the number - # of inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 25000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum - # @param page_token [::String] - # A page token, received from a previous `ListLocalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListLocalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::LocalInventory>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::LocalInventory>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.new - # - # # Call the list_local_inventories method. - # result = client.list_local_inventories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1::LocalInventory. - # p item - # end - # - def list_local_inventories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_local_inventories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_local_inventories.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_local_inventories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.call_rpc :list_local_inventories, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @local_inventory_service_stub, :list_local_inventories, 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 - - ## - # Inserts a `LocalInventory` resource to a product in your merchant - # account. - # - # Replaces the full `LocalInventory` resource if an entry with the same - # {::Google::Shopping::Merchant::Inventories::V1::LocalInventory#store_code `storeCode`} - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `LocalInventory` - # resource to appear in products. - # - # @overload insert_local_inventory(request, options = nil) - # Pass arguments to `insert_local_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_local_inventory(parent: nil, local_inventory: nil) - # Pass arguments to `insert_local_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @param local_inventory [::Google::Shopping::Merchant::Inventories::V1::LocalInventory, ::Hash] - # Required. Local inventory information of the product. If the product - # already has a `LocalInventory` resource for the same `storeCode`, full - # replacement of the `LocalInventory` resource is performed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new - # - # # Call the insert_local_inventory method. - # result = client.insert_local_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Inventories::V1::LocalInventory. - # p result - # - def insert_local_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_local_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_local_inventory.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_local_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.call_rpc :insert_local_inventory, request, 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 `LocalInventory` from the given product in your - # merchant account. It might take a up to an hour for the - # `LocalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - # - # @overload delete_local_inventory(request, options = nil) - # Pass arguments to `delete_local_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_local_inventory(name: nil) - # Pass arguments to `delete_local_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the local inventory for the given product to delete. - # Format: - # `accounts/{account}/products/{product}/localInventories/{store_code}` - # - # @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/shopping/merchant/inventories/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new - # - # # Call the delete_local_inventory method. - # result = client.delete_local_inventory request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_local_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_local_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_local_inventory.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_local_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.call_rpc :delete_local_inventory, request, 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 LocalInventoryService API. - # - # This class represents the configuration for LocalInventoryService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_local_inventories to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_local_inventories.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_local_inventories.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LocalInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_local_inventories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_local_inventories - ## - # RPC-specific configuration for `insert_local_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_local_inventory - ## - # RPC-specific configuration for `delete_local_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_local_inventory - - # @private - def initialize parent_rpcs = nil - list_local_inventories_config = parent_rpcs.list_local_inventories if parent_rpcs.respond_to? :list_local_inventories - @list_local_inventories = ::Gapic::Config::Method.new list_local_inventories_config - insert_local_inventory_config = parent_rpcs.insert_local_inventory if parent_rpcs.respond_to? :insert_local_inventory - @insert_local_inventory = ::Gapic::Config::Method.new insert_local_inventory_config - delete_local_inventory_config = parent_rpcs.delete_local_inventory if parent_rpcs.respond_to? :delete_local_inventory - @delete_local_inventory = ::Gapic::Config::Method.new delete_local_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/credentials.rb deleted file mode 100644 index c59df21e5b7f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_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 Shopping - module Merchant - module Inventories - module V1 - module LocalInventoryService - # Credentials for the LocalInventoryService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb deleted file mode 100644 index a321f9b2e7ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.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 Shopping - module Merchant - module Inventories - module V1 - module LocalInventoryService - # Path helper methods for the LocalInventoryService API. - module Paths - ## - # Create a fully-qualified LocalInventory resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/products/{product}/localInventories/{store_code}` - # - # @param account [String] - # @param product [String] - # @param store_code [String] - # - # @return [::String] - def local_inventory_path account:, product:, store_code: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" - - "accounts/#{account}/products/#{product}/localInventories/#{store_code}" - end - - ## - # Create a fully-qualified Product resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/products/{product}` - # - # @param account [String] - # @param product [String] - # - # @return [::String] - def product_path account:, product: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/products/#{product}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest.rb deleted file mode 100644 index a6136640df65..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_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/shopping/merchant/inventories/v1/version" - -require "google/shopping/merchant/inventories/v1/local_inventory_service/credentials" -require "google/shopping/merchant/inventories/v1/local_inventory_service/paths" -require "google/shopping/merchant/inventories/v1/local_inventory_service/rest/client" - -module Google - module Shopping - module Merchant - module Inventories - module V1 - ## - # Service to manage local inventory for products - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/inventories/v1/local_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new - # - module LocalInventoryService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/inventories/v1/local_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb deleted file mode 100644 index 5d8c4a44cb7f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb +++ /dev/null @@ -1,647 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/inventories/v1/localinventory_pb" -require "google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Inventories - module V1 - module LocalInventoryService - module Rest - ## - # REST client for the LocalInventoryService service. - # - # Service to manage local inventory for products - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :local_inventory_service_stub - - ## - # Configure the LocalInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LocalInventoryService clients - # ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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", "Shopping", "Merchant", "Inventories", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LocalInventoryService 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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 - @local_inventory_service_stub.universe_domain - end - - ## - # Create a new LocalInventoryService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LocalInventoryService 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 - - @local_inventory_service_stub = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @local_inventory_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 - @local_inventory_service_stub.logger - end - - # Service calls - - ## - # Lists the `LocalInventory` resources for the given product in your merchant - # account. The response might contain fewer items than specified by - # `pageSize`. If `pageToken` was returned in previous request, it can be used - # to obtain additional results. - # - # `LocalInventory` resources are listed per product for a given account. - # - # @overload list_local_inventories(request, options = nil) - # Pass arguments to `list_local_inventories` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_local_inventories(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_local_inventories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 parent product to list local inventories for. - # Format: - # `accounts/{account}/products/{product}` - # @param page_size [::Integer] - # The maximum number of `LocalInventory` resources for the given - # product to return. The service returns fewer than this value if the number - # of inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 25000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum - # @param page_token [::String] - # A page token, received from a previous `ListLocalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListLocalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::LocalInventory>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::LocalInventory>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.new - # - # # Call the list_local_inventories method. - # result = client.list_local_inventories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1::LocalInventory. - # p item - # end - # - def list_local_inventories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_local_inventories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_local_inventories.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_local_inventories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.list_local_inventories request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @local_inventory_service_stub, :list_local_inventories, "local_inventories", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inserts a `LocalInventory` resource to a product in your merchant - # account. - # - # Replaces the full `LocalInventory` resource if an entry with the same - # {::Google::Shopping::Merchant::Inventories::V1::LocalInventory#store_code `storeCode`} - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `LocalInventory` - # resource to appear in products. - # - # @overload insert_local_inventory(request, options = nil) - # Pass arguments to `insert_local_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_local_inventory(parent: nil, local_inventory: nil) - # Pass arguments to `insert_local_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @param local_inventory [::Google::Shopping::Merchant::Inventories::V1::LocalInventory, ::Hash] - # Required. Local inventory information of the product. If the product - # already has a `LocalInventory` resource for the same `storeCode`, full - # replacement of the `LocalInventory` resource is performed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new - # - # # Call the insert_local_inventory method. - # result = client.insert_local_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Inventories::V1::LocalInventory. - # p result - # - def insert_local_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_local_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_local_inventory.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_local_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.insert_local_inventory request, 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 `LocalInventory` from the given product in your - # merchant account. It might take a up to an hour for the - # `LocalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - # - # @overload delete_local_inventory(request, options = nil) - # Pass arguments to `delete_local_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_local_inventory(name: nil) - # Pass arguments to `delete_local_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the local inventory for the given product to delete. - # Format: - # `accounts/{account}/products/{product}/localInventories/{store_code}` - # @yield [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/shopping/merchant/inventories/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new - # - # # Call the delete_local_inventory method. - # result = client.delete_local_inventory request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_local_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_local_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_local_inventory.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_local_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.delete_local_inventory request, 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 LocalInventoryService REST API. - # - # This class represents the configuration for LocalInventoryService 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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_local_inventories to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_local_inventories.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_local_inventories.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LocalInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_local_inventories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_local_inventories - ## - # RPC-specific configuration for `insert_local_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_local_inventory - ## - # RPC-specific configuration for `delete_local_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_local_inventory - - # @private - def initialize parent_rpcs = nil - list_local_inventories_config = parent_rpcs.list_local_inventories if parent_rpcs.respond_to? :list_local_inventories - @list_local_inventories = ::Gapic::Config::Method.new list_local_inventories_config - insert_local_inventory_config = parent_rpcs.insert_local_inventory if parent_rpcs.respond_to? :insert_local_inventory - @insert_local_inventory = ::Gapic::Config::Method.new insert_local_inventory_config - delete_local_inventory_config = parent_rpcs.delete_local_inventory if parent_rpcs.respond_to? :delete_local_inventory - @delete_local_inventory = ::Gapic::Config::Method.new delete_local_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb deleted file mode 100644 index f8eef4b1834e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb +++ /dev/null @@ -1,267 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/inventories/v1/localinventory_pb" - -module Google - module Shopping - module Merchant - module Inventories - module V1 - module LocalInventoryService - module Rest - ## - # REST service stub for the LocalInventoryService 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_local_inventories REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse] - # A result object deserialized from the server's reply - def list_local_inventories request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_local_inventories_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_local_inventories", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the insert_local_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] - # A result object deserialized from the server's reply - def insert_local_inventory request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_local_inventory_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "insert_local_inventory", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Inventories::V1::LocalInventory.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_local_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_local_inventory request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_local_inventory_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_local_inventory", - 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_local_inventories REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_local_inventories_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/inventories/v1/{parent}/localInventories", - matches: [ - ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_local_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_local_inventory_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/inventories/v1/{parent}/localInventories:insert", - body: "local_inventory", - matches: [ - ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_local_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_local_inventory_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/inventories/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/products/[^/]+/localInventories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_pb.rb deleted file mode 100644 index 542cc92ecb83..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/inventories/v1/localinventory.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/shopping/merchant/inventories/v1/inventories_common_pb' - - -descriptor_data = "\n] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::RegionalInventory>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.new - # - # # Call the list_regional_inventories method. - # result = client.list_regional_inventories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory. - # p item - # end - # - def list_regional_inventories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_regional_inventories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_regional_inventories.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_regional_inventories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.call_rpc :list_regional_inventories, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @regional_inventory_service_stub, :list_regional_inventories, 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 - - ## - # Inserts a `RegionalInventory` to a given product in your - # merchant account. - # - # Replaces the full `RegionalInventory` resource if an entry with the same - # {::Google::Shopping::Merchant::Inventories::V1::RegionalInventory#region `region`} - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `RegionalInventory` - # resource to appear in products. - # - # @overload insert_regional_inventory(request, options = nil) - # Pass arguments to `insert_regional_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_regional_inventory(parent: nil, regional_inventory: nil) - # Pass arguments to `insert_regional_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @param regional_inventory [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory, ::Hash] - # Required. Regional inventory information to add to the product. If the - # product already has a `RegionalInventory` resource for the same `region`, - # full replacement of the `RegionalInventory` resource is performed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new - # - # # Call the insert_regional_inventory method. - # result = client.insert_regional_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Inventories::V1::RegionalInventory. - # p result - # - def insert_regional_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_regional_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_regional_inventory.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_regional_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.call_rpc :insert_regional_inventory, request, 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 `RegionalInventory` resource from the given product - # in your merchant account. It might take up to an hour for the - # `RegionalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - # - # @overload delete_regional_inventory(request, options = nil) - # Pass arguments to `delete_regional_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_regional_inventory(name: nil) - # Pass arguments to `delete_regional_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `RegionalInventory` resource to delete. - # Format: - # `accounts/{account}/products/{product}/regionalInventories/{region}` - # - # @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/shopping/merchant/inventories/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new - # - # # Call the delete_regional_inventory method. - # result = client.delete_regional_inventory request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_regional_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_regional_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_regional_inventory.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_regional_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.call_rpc :delete_regional_inventory, request, 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 RegionalInventoryService API. - # - # This class represents the configuration for RegionalInventoryService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_regional_inventories to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_regional_inventories.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_regional_inventories.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 RegionalInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_regional_inventories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_regional_inventories - ## - # RPC-specific configuration for `insert_regional_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_regional_inventory - ## - # RPC-specific configuration for `delete_regional_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_regional_inventory - - # @private - def initialize parent_rpcs = nil - list_regional_inventories_config = parent_rpcs.list_regional_inventories if parent_rpcs.respond_to? :list_regional_inventories - @list_regional_inventories = ::Gapic::Config::Method.new list_regional_inventories_config - insert_regional_inventory_config = parent_rpcs.insert_regional_inventory if parent_rpcs.respond_to? :insert_regional_inventory - @insert_regional_inventory = ::Gapic::Config::Method.new insert_regional_inventory_config - delete_regional_inventory_config = parent_rpcs.delete_regional_inventory if parent_rpcs.respond_to? :delete_regional_inventory - @delete_regional_inventory = ::Gapic::Config::Method.new delete_regional_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/credentials.rb deleted file mode 100644 index 78c7f08de02e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_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 Shopping - module Merchant - module Inventories - module V1 - module RegionalInventoryService - # Credentials for the RegionalInventoryService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.rb deleted file mode 100644 index 0c526721b67d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.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 Shopping - module Merchant - module Inventories - module V1 - module RegionalInventoryService - # Path helper methods for the RegionalInventoryService API. - module Paths - ## - # Create a fully-qualified Product resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/products/{product}` - # - # @param account [String] - # @param product [String] - # - # @return [::String] - def product_path account:, product: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/products/#{product}" - end - - ## - # Create a fully-qualified RegionalInventory resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/products/{product}/regionalInventories/{region}` - # - # @param account [String] - # @param product [String] - # @param region [String] - # - # @return [::String] - def regional_inventory_path account:, product:, region: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" - - "accounts/#{account}/products/#{product}/regionalInventories/#{region}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest.rb deleted file mode 100644 index d9bce6c3c4e3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_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/shopping/merchant/inventories/v1/version" - -require "google/shopping/merchant/inventories/v1/regional_inventory_service/credentials" -require "google/shopping/merchant/inventories/v1/regional_inventory_service/paths" -require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client" - -module Google - module Shopping - module Merchant - module Inventories - module V1 - ## - # Service to manage regional inventory for products. There is also separate - # `regions` resource and API to manage regions definitions. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new - # - module RegionalInventoryService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb deleted file mode 100644 index 2c2e5452c4df..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb +++ /dev/null @@ -1,647 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/inventories/v1/regionalinventory_pb" -require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Inventories - module V1 - module RegionalInventoryService - module Rest - ## - # REST client for the RegionalInventoryService service. - # - # Service to manage regional inventory for products. There is also separate - # `regions` resource and API to manage regions definitions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :regional_inventory_service_stub - - ## - # Configure the RegionalInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RegionalInventoryService clients - # ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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", "Shopping", "Merchant", "Inventories", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RegionalInventoryService 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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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 - @regional_inventory_service_stub.universe_domain - end - - ## - # Create a new RegionalInventoryService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RegionalInventoryService 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 - - @regional_inventory_service_stub = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @regional_inventory_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 - @regional_inventory_service_stub.logger - end - - # Service calls - - ## - # Lists the `RegionalInventory` resources for the given product in your - # merchant account. The response might contain fewer items than specified by - # `pageSize`. If `pageToken` was returned in previous request, it can be - # used to obtain additional results. - # - # `RegionalInventory` resources are listed per product for a given account. - # - # @overload list_regional_inventories(request, options = nil) - # Pass arguments to `list_regional_inventories` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_regional_inventories(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_regional_inventories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 parent product to list `RegionalInventory` - # resources for. Format: `accounts/{account}/products/{product}` - # @param page_size [::Integer] - # The maximum number of `RegionalInventory` resources for the given product - # to return. The service returns fewer than this value if the number of - # inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 100000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum. - # @param page_token [::String] - # A page token, received from a previous `ListRegionalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegionalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::RegionalInventory>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::RegionalInventory>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.new - # - # # Call the list_regional_inventories method. - # result = client.list_regional_inventories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory. - # p item - # end - # - def list_regional_inventories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_regional_inventories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_regional_inventories.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_regional_inventories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.list_regional_inventories request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @regional_inventory_service_stub, :list_regional_inventories, "regional_inventories", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inserts a `RegionalInventory` to a given product in your - # merchant account. - # - # Replaces the full `RegionalInventory` resource if an entry with the same - # {::Google::Shopping::Merchant::Inventories::V1::RegionalInventory#region `region`} - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `RegionalInventory` - # resource to appear in products. - # - # @overload insert_regional_inventory(request, options = nil) - # Pass arguments to `insert_regional_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_regional_inventory(parent: nil, regional_inventory: nil) - # Pass arguments to `insert_regional_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @param regional_inventory [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory, ::Hash] - # Required. Regional inventory information to add to the product. If the - # product already has a `RegionalInventory` resource for the same `region`, - # full replacement of the `RegionalInventory` resource is performed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new - # - # # Call the insert_regional_inventory method. - # result = client.insert_regional_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Inventories::V1::RegionalInventory. - # p result - # - def insert_regional_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_regional_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_regional_inventory.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_regional_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.insert_regional_inventory request, 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 `RegionalInventory` resource from the given product - # in your merchant account. It might take up to an hour for the - # `RegionalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - # - # @overload delete_regional_inventory(request, options = nil) - # Pass arguments to `delete_regional_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_regional_inventory(name: nil) - # Pass arguments to `delete_regional_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `RegionalInventory` resource to delete. - # Format: - # `accounts/{account}/products/{product}/regionalInventories/{region}` - # @yield [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/shopping/merchant/inventories/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new - # - # # Call the delete_regional_inventory method. - # result = client.delete_regional_inventory request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_regional_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_regional_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_regional_inventory.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_regional_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.delete_regional_inventory request, 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 RegionalInventoryService REST API. - # - # This class represents the configuration for RegionalInventoryService 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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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_regional_inventories to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_regional_inventories.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_regional_inventories.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 RegionalInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_regional_inventories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_regional_inventories - ## - # RPC-specific configuration for `insert_regional_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_regional_inventory - ## - # RPC-specific configuration for `delete_regional_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_regional_inventory - - # @private - def initialize parent_rpcs = nil - list_regional_inventories_config = parent_rpcs.list_regional_inventories if parent_rpcs.respond_to? :list_regional_inventories - @list_regional_inventories = ::Gapic::Config::Method.new list_regional_inventories_config - insert_regional_inventory_config = parent_rpcs.insert_regional_inventory if parent_rpcs.respond_to? :insert_regional_inventory - @insert_regional_inventory = ::Gapic::Config::Method.new insert_regional_inventory_config - delete_regional_inventory_config = parent_rpcs.delete_regional_inventory if parent_rpcs.respond_to? :delete_regional_inventory - @delete_regional_inventory = ::Gapic::Config::Method.new delete_regional_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb deleted file mode 100644 index aee6dfec776f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb +++ /dev/null @@ -1,267 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/inventories/v1/regionalinventory_pb" - -module Google - module Shopping - module Merchant - module Inventories - module V1 - module RegionalInventoryService - module Rest - ## - # REST service stub for the RegionalInventoryService 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_regional_inventories REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse] - # A result object deserialized from the server's reply - def list_regional_inventories request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_regional_inventories_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_regional_inventories", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the insert_regional_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] - # A result object deserialized from the server's reply - def insert_regional_inventory request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_regional_inventory_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "insert_regional_inventory", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory.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_regional_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_regional_inventory request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_regional_inventory_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_regional_inventory", - 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_regional_inventories REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_regional_inventories_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/inventories/v1/{parent}/regionalInventories", - matches: [ - ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_regional_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_regional_inventory_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/inventories/v1/{parent}/regionalInventories:insert", - body: "regional_inventory", - matches: [ - ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_regional_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_regional_inventory_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/inventories/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/products/[^/]+/regionalInventories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_pb.rb deleted file mode 100644 index 2eb7c5010ec3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/inventories/v1/regionalinventory.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/shopping/merchant/inventories/v1/inventories_common_pb' - - -descriptor_data = "\n?google/shopping/merchant/inventories/v1/regionalinventory.proto\x12\'google.shopping.merchant.inventories.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a@google/shopping/merchant/inventories/v1/inventories_common.proto\"\xbd\x02\n\x11RegionalInventory\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\x06region\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12p\n\x1dregional_inventory_attributes\x18\t \x01(\x0b\x32\x44.google.shopping.merchant.inventories.v1.RegionalInventoryAttributesB\x03\xe0\x41\x01:u\xea\x41r\n,merchantapi.googleapis.com/RegionalInventory\x12\x42\x61\x63\x63ounts/{account}/products/{product}/regionalInventories/{region}\"\x8d\x01\n\x1eListRegionalInventoriesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,merchantapi.googleapis.com/RegionalInventory\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x94\x01\n\x1fListRegionalInventoriesResponse\x12X\n\x14regional_inventories\x18\x01 \x03(\x0b\x32:.google.shopping.merchant.inventories.v1.RegionalInventory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc3\x01\n\x1eInsertRegionalInventoryRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,merchantapi.googleapis.com/RegionalInventory\x12[\n\x12regional_inventory\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.inventories.v1.RegionalInventoryB\x03\xe0\x41\x02\"d\n\x1e\x44\x65leteRegionalInventoryRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,merchantapi.googleapis.com/RegionalInventory2\xbf\x06\n\x18RegionalInventoryService\x12\x81\x02\n\x17ListRegionalInventories\x12G.google.shopping.merchant.inventories.v1.ListRegionalInventoriesRequest\x1aH.google.shopping.merchant.inventories.v1.ListRegionalInventoriesResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/inventories/v1/{parent=accounts/*/products/*}/regionalInventories\x12\x85\x02\n\x17InsertRegionalInventory\x12G.google.shopping.merchant.inventories.v1.InsertRegionalInventoryRequest\x1a:.google.shopping.merchant.inventories.v1.RegionalInventory\"e\x82\xd3\xe4\x93\x02_\"I/inventories/v1/{parent=accounts/*/products/*}/regionalInventories:insert:\x12regional_inventory\x12\xcd\x01\n\x17\x44\x65leteRegionalInventory\x12G.google.shopping.merchant.inventories.v1.DeleteRegionalInventoryRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/inventories/v1/{name=accounts/*/products/*/regionalInventories/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x9e\x02\n+com.google.shopping.merchant.inventories.v1B\x16RegionalInventoryProtoP\x01ZScloud.google.com/go/shopping/merchant/inventories/apiv1/inventoriespb;inventoriespb\xaa\x02\'Google.Shopping.Merchant.Inventories.V1\xca\x02\'Google\\Shopping\\Merchant\\Inventories\\V1\xea\x02+Google::Shopping::Merchant::Inventories::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Inventories - module V1 - RegionalInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.RegionalInventory").msgclass - ListRegionalInventoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.ListRegionalInventoriesRequest").msgclass - ListRegionalInventoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.ListRegionalInventoriesResponse").msgclass - InsertRegionalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.InsertRegionalInventoryRequest").msgclass - DeleteRegionalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.DeleteRegionalInventoryRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb deleted file mode 100644 index 603f08e381ba..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb +++ /dev/null @@ -1,69 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/inventories/v1/regionalinventory.proto for package 'Google.Shopping.Merchant.Inventories.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/shopping/merchant/inventories/v1/regionalinventory_pb' - -module Google - module Shopping - module Merchant - module Inventories - module V1 - module RegionalInventoryService - # Service to manage regional inventory for products. There is also separate - # `regions` resource and API to manage regions definitions. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.inventories.v1.RegionalInventoryService' - - # Lists the `RegionalInventory` resources for the given product in your - # merchant account. The response might contain fewer items than specified by - # `pageSize`. If `pageToken` was returned in previous request, it can be - # used to obtain additional results. - # - # `RegionalInventory` resources are listed per product for a given account. - rpc :ListRegionalInventories, ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest, ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse - # Inserts a `RegionalInventory` to a given product in your - # merchant account. - # - # Replaces the full `RegionalInventory` resource if an entry with the same - # [`region`][google.shopping.merchant.inventories.v1.RegionalInventory.region] - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `RegionalInventory` - # resource to appear in products. - rpc :InsertRegionalInventory, ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest, ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory - # Deletes the specified `RegionalInventory` resource from the given product - # in your merchant account. It might take up to an hour for the - # `RegionalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - rpc :DeleteRegionalInventory, ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/rest.rb deleted file mode 100644 index 46780b0be3b6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/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/shopping/merchant/inventories/v1/local_inventory_service/rest" -require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest" -require "google/shopping/merchant/inventories/v1/version" - -module Google - module Shopping - module Merchant - module Inventories - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/inventories/v1/rest" - # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/version.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/version.rb deleted file mode 100644 index 2672356289da..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/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 Shopping - module Merchant - module Inventories - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/README.md deleted file mode 100644 index 110adc2cf42e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant 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-shopping-merchant-inventories-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb deleted file mode 100644 index e5ce358bdb2e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb +++ /dev/null @@ -1,182 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Inventories - module V1 - # Local inventory attributes. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Optional. Price of the product at this store. - # @!attribute [rw] sale_price - # @return [::Google::Shopping::Type::Price] - # Optional. Sale price of the product at this store. Mandatory if - # [`salePriceEffectiveDate`][LocalInventory.sale_price_effective_date] is - # defined. - # @!attribute [rw] sale_price_effective_date - # @return [::Google::Type::Interval] - # Optional. The `TimePeriod` of the - # sale at this store. - # @!attribute [rw] availability - # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventoryAttributes::Availability] - # [Availability](https://support.google.com/merchants/answer/3061342) of the - # product at this store. - # @!attribute [rw] quantity - # @return [::Integer] - # Optional. Quantity of the product available at this store. Must be greater - # than or equal to zero. - # @!attribute [rw] pickup_method - # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventoryAttributes::PickupMethod] - # Optional. Supported [pickup - # method](https://support.google.com/merchants/answer/3061342) for this - # product. Unless the value is `"not supported"`, this field must be - # submitted together with `pickupSla`. - # @!attribute [rw] pickup_sla - # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventoryAttributes::PickupSla] - # Optional. Relative time period from the order date for an order for this - # product, from this store, to be ready for pickup. Must be submitted with - # `pickupMethod`. See more details - # [here](https://support.google.com/merchants/answer/3061342). - # @!attribute [rw] instore_product_location - # @return [::String] - # Optional. Location of the product inside the store. Maximum length is 20 - # bytes. - class LocalInventoryAttributes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # [Availability](https://support.google.com/merchants/answer/3061342) of the - # product at this store. - module Availability - # Indicates that the availability is unspecified. - LOCAL_INVENTORY_AVAILABILITY_UNSPECIFIED = 0 - - # Indicates that the product is in stock. - IN_STOCK = 1 - - # Indicates that the product is out of stock. - LIMITED_AVAILABILITY = 2 - - # Indicates that the product is on display to order. - ON_DISPLAY_TO_ORDER = 3 - - # Indicates that the product is out of stock. - OUT_OF_STOCK = 4 - end - - # Supported [pickup - # method](https://support.google.com/merchants/answer/3061342) for this - # product. Unless the value is `"not supported"`, this field must be - # submitted together with `pickupSla`. - module PickupMethod - # Indicates that the pickup method is unspecified. - PICKUP_METHOD_UNSPECIFIED = 0 - - # Indicates that the pickup method is Buy. - BUY = 1 - - # Indicates that the pickup method is Reserve. - RESERVE = 2 - - # Indicates that the pickup method is Ship to store. - SHIP_TO_STORE = 3 - - # Indicates that the pickup method is not supported. - NOT_SUPPORTED = 4 - end - - # Relative time period from the order date for an order for this product, - # from this store, to be ready for pickup. Must be submitted with - # `pickupMethod`. See more details - # [here](https://support.google.com/merchants/answer/3061342). - module PickupSla - # Indicates that the pickup SLA is unspecified. - PICKUP_SLA_UNSPECIFIED = 0 - - # Indicates that the pickup SLA is same day. - SAME_DAY = 1 - - # Indicates that the pickup SLA is next day. - NEXT_DAY = 2 - - # Indicates that the pickup SLA is two days. - TWO_DAY = 3 - - # Indicates that the pickup SLA is three days. - THREE_DAY = 4 - - # Indicates that the pickup SLA is four days. - FOUR_DAY = 5 - - # Indicates that the pickup SLA is five days. - FIVE_DAY = 6 - - # Indicates that the pickup SLA is six days. - SIX_DAY = 7 - - # Indicates that the pickup SLA is seven days. - SEVEN_DAY = 8 - - # Indicates that the pickup SLA is multi-week. - MULTI_WEEK = 9 - end - end - - # Regional inventory attributes. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Optional. Price of the product in this region. - # @!attribute [rw] sale_price - # @return [::Google::Shopping::Type::Price] - # Optional. Sale price of the product in this region. Mandatory if - # [`salePriceEffectiveDate`][RegionalInventory.sale_price_effective_date] is - # defined. - # @!attribute [rw] sale_price_effective_date - # @return [::Google::Type::Interval] - # Optional. The `TimePeriod` of the - # sale price in this region. - # @!attribute [rw] availability - # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryAttributes::Availability] - # Optional. - # [Availability](https://support.google.com/merchants/answer/14644124) of the - # product in this region. - class RegionalInventoryAttributes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # [Availability](https://support.google.com/merchants/answer/14644124) of the - # product in this region. - module Availability - # Indicates that the availability is unspecified. - REGIONAL_INVENTORY_AVAILABILITY_UNSPECIFIED = 0 - - # Indicates that the product is in stock. - IN_STOCK = 1 - - # Indicates that the product is out of stock. - OUT_OF_STOCK = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb deleted file mode 100644 index 3d9af5f61da3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb +++ /dev/null @@ -1,124 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Inventories - module V1 - # Local inventory information for the product. Represents in-store information - # for a specific product at the store specified by - # {::Google::Shopping::Merchant::Inventories::V1::LocalInventory#store_code `storeCode`}. - # For a list of all accepted attribute values, see the [local product inventory - # data specification](https://support.google.com/merchants/answer/3061342). - # @!attribute [r] name - # @return [::String] - # Output only. The name of the `LocalInventory` resource. - # Format: - # `accounts/{account}/products/{product}/localInventories/{store_code}` - # @!attribute [r] account - # @return [::Integer] - # Output only. The account that owns the product. This field will be ignored - # if set by the client. - # @!attribute [rw] store_code - # @return [::String] - # Required. Immutable. Store code (the store ID from your Business Profile) - # of the physical store the product is sold in. See the [Local product - # inventory data - # specification](https://support.google.com/merchants/answer/3061342) for - # more information. - # @!attribute [rw] local_inventory_attributes - # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventoryAttributes] - # Optional. A list of local inventory attributes. - class LocalInventory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListLocalInventories` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The `name` of the parent product to list local inventories for. - # Format: - # `accounts/{account}/products/{product}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of `LocalInventory` resources for the given - # product to return. The service returns fewer than this value if the number - # of inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 25000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListLocalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListLocalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - class ListLocalInventoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListLocalInventories` method. - # @!attribute [rw] local_inventories - # @return [::Array<::Google::Shopping::Merchant::Inventories::V1::LocalInventory>] - # The `LocalInventory` resources for the given product from the specified - # account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `pageToken` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListLocalInventoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertLocalInventory` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @!attribute [rw] local_inventory - # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] - # Required. Local inventory information of the product. If the product - # already has a `LocalInventory` resource for the same `storeCode`, full - # replacement of the `LocalInventory` resource is performed. - class InsertLocalInventoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteLocalInventory` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the local inventory for the given product to delete. - # Format: - # `accounts/{account}/products/{product}/localInventories/{store_code}` - class DeleteLocalInventoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb deleted file mode 100644 index be9e4cda170c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.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 Shopping - module Merchant - module Inventories - module V1 - # Regional inventory information for the product. Represents specific - # information like price and availability for a given product in a specific - # {::Google::Shopping::Merchant::Inventories::V1::RegionalInventory#region `region`}. - # For a list of all accepted attribute values, see the [regional product - # inventory data - # specification](https://support.google.com/merchants/answer/9698880). - # @!attribute [r] name - # @return [::String] - # Output only. The name of the `RegionalInventory` resource. - # Format: - # `{regional_inventory.name=accounts/{account}/products/{product}/regionalInventories/{region}` - # @!attribute [r] account - # @return [::Integer] - # Output only. The account that owns the product. This field will be ignored - # if set by the client. - # @!attribute [rw] region - # @return [::String] - # Required. Immutable. ID of the region for this - # `RegionalInventory` resource. See the [Regional availability and - # pricing](https://support.google.com/merchants/answer/9698880) for more - # details. - # @!attribute [rw] regional_inventory_attributes - # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryAttributes] - # Optional. A list of regional inventory attributes. - class RegionalInventory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListRegionalInventories` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The `name` of the parent product to list `RegionalInventory` - # resources for. Format: `accounts/{account}/products/{product}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of `RegionalInventory` resources for the given product - # to return. The service returns fewer than this value if the number of - # inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 100000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListRegionalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegionalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - class ListRegionalInventoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListRegionalInventories` method. - # @!attribute [rw] regional_inventories - # @return [::Array<::Google::Shopping::Merchant::Inventories::V1::RegionalInventory>] - # The `RegionalInventory` resources for the given product from the specified - # account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `pageToken` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRegionalInventoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertRegionalInventory` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @!attribute [rw] regional_inventory - # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] - # Required. Regional inventory information to add to the product. If the - # product already has a `RegionalInventory` resource for the same `region`, - # full replacement of the `RegionalInventory` resource is performed. - class InsertRegionalInventoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteRegionalInventory` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `RegionalInventory` resource to delete. - # Format: - # `accounts/{account}/products/{product}/regionalInventories/{region}` - class DeleteRegionalInventoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/type/types.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! - - -module Google - module Shopping - module Type - # The weight represented as the value in string and the unit. - # @!attribute [rw] amount_micros - # @return [::Integer] - # Required. The weight represented as a number in micros (1 million micros is - # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 - # micros). - # This field can also be set as infinity by setting to -1. - # This field only support -1 and positive value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Type::Weight::WeightUnit] - # Required. The weight unit. - # Acceptable values are: kg and lb - class Weight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The weight unit. - module WeightUnit - # unit unspecified - WEIGHT_UNIT_UNSPECIFIED = 0 - - # lb unit. - POUND = 1 - - # kg unit. - KILOGRAM = 2 - end - end - - # The price represented as a number and currency. - # @!attribute [rw] amount_micros - # @return [::Integer] - # The price represented as a number in micros (1 million micros is an - # equivalent to one's currency standard unit, for example, 1 USD = 1000000 - # micros). - # @!attribute [rw] currency_code - # @return [::String] - # The currency of the price using three-letter acronyms according to [ISO - # 4217](http://en.wikipedia.org/wiki/ISO_4217). - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents custom attributes. Exactly one of `value` or - # `group_values` must not be empty. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute. - # @!attribute [rw] value - # @return [::String] - # The value of the attribute. If `value` is not empty, `group_values` must be - # empty. - # @!attribute [rw] group_values - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Subattributes within this attribute group. If - # `group_values` is not empty, `value` must be empty. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations available for a product. - # - # Destinations are used in Merchant Center to allow you to control where the - # products from your data feed should be displayed. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Destination values. - module DestinationEnum - # Not specified. - DESTINATION_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/google-ads/answer/2454022). - SHOPPING_ADS = 1 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 2 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3057972). - LOCAL_INVENTORY_ADS = 3 - - # [Free listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 4 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 5 - - # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). - YOUTUBE_SHOPPING = 6 - - # Youtube shopping checkout. - YOUTUBE_SHOPPING_CHECKOUT = 7 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 8 - - # [Free vehicle - # listings](https://support.google.com/merchants/answer/11189169). - FREE_VEHICLE_LISTINGS = 9 - - # [Vehicle ads](https://support.google.com/merchants/answer/11189169). - VEHICLE_ADS = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - end - end - - # Reporting contexts that your account and product issues apply to. - # - # Reporting contexts are groups of surfaces and formats for product results on - # Google. They can represent the entire destination (for example, [Shopping - # ads](https://support.google.com/merchants/answer/6149970)) or a subset of - # formats within a destination (for example, [Demand Gen - # ads](https://support.google.com/merchants/answer/13389785)). - class ReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reporting context values. - module ReportingContextEnum - # Not specified. - REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/merchants/answer/6149970). - SHOPPING_ADS = 1 - - # Deprecated: Use `DEMAND_GEN_ADS` instead. - # [Discovery and Demand Gen - # ads](https://support.google.com/merchants/answer/13389785). - DISCOVERY_ADS = 2 - - # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS = 13 - - # [Demand Gen ads on Discover - # surface](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 - - # [Video ads](https://support.google.com/google-ads/answer/6340491). - VIDEO_ADS = 3 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 4 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3271956). - LOCAL_INVENTORY_ADS = 5 - - # [Vehicle inventory - # ads](https://support.google.com/merchants/answer/11544533). - VEHICLE_INVENTORY_ADS = 6 - - # [Free product - # listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 7 - - # [Free product listings on UCP - # checkout](https://developers.google.com/merchant/ucp). - FREE_LISTINGS_UCP_CHECKOUT = 19 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 8 - - # [Free local vehicle - # listings](https://support.google.com/merchants/answer/11544533). - FREE_LOCAL_VEHICLE_LISTINGS = 9 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 18 - - # [YouTube - # Shopping](https://support.google.com/merchants/answer/13478370). - YOUTUBE_SHOPPING = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - - # [Product - # Reviews](https://support.google.com/merchants/answer/14620732). - PRODUCT_REVIEWS = 15 - - # [Merchant - # Reviews](https://developers.google.com/merchant-review-feeds). - MERCHANT_REVIEWS = 16 - - # YouTube Checkout - # . - YOUTUBE_CHECKOUT = 17 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/type/interval.rb deleted file mode 100644 index 9350ca479005..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/type/interval.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a time interval, encoded as a Timestamp start (inclusive) and a - # Timestamp end (exclusive). - # - # The start must be less than or equal to the end. - # When the start equals the end, the interval is empty (matches no time). - # When both start and end are unspecified, the interval matches any time. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Inclusive start of the interval. - # - # If specified, a Timestamp matching this interval will have to be the same - # or after the start. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Exclusive end of the interval. - # - # If specified, a Timestamp matching this interval will have to be before the - # end. - class Interval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/Gemfile deleted file mode 100644 index f6752c07deb1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1", path: "../" -else - gem "google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1/snippets/local_inventory_service/delete_local_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/delete_local_inventory.rb deleted file mode 100644 index 878f43c4da28..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/delete_local_inventory.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_LocalInventoryService_DeleteLocalInventory_sync] -require "google/shopping/merchant/inventories/v1" - -## -# Snippet for the delete_local_inventory call in the LocalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#delete_local_inventory. -# -def delete_local_inventory - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new - - # Call the delete_local_inventory method. - result = client.delete_local_inventory request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_LocalInventoryService_DeleteLocalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/insert_local_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/insert_local_inventory.rb deleted file mode 100644 index 0a741637b8cf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/insert_local_inventory.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_LocalInventoryService_InsertLocalInventory_sync] -require "google/shopping/merchant/inventories/v1" - -## -# Snippet for the insert_local_inventory call in the LocalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#insert_local_inventory. -# -def insert_local_inventory - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new - - # Call the insert_local_inventory method. - result = client.insert_local_inventory request - - # The returned object is of type Google::Shopping::Merchant::Inventories::V1::LocalInventory. - p result -end -# [END merchantapi_v1_generated_LocalInventoryService_InsertLocalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/list_local_inventories.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/list_local_inventories.rb deleted file mode 100644 index fc17d965d45d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/list_local_inventories.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 merchantapi_v1_generated_LocalInventoryService_ListLocalInventories_sync] -require "google/shopping/merchant/inventories/v1" - -## -# Snippet for the list_local_inventories call in the LocalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#list_local_inventories. -# -def list_local_inventories - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.new - - # Call the list_local_inventories method. - result = client.list_local_inventories request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Inventories::V1::LocalInventory. - p item - end -end -# [END merchantapi_v1_generated_LocalInventoryService_ListLocalInventories_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/delete_regional_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/delete_regional_inventory.rb deleted file mode 100644 index e985025813a1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/delete_regional_inventory.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_RegionalInventoryService_DeleteRegionalInventory_sync] -require "google/shopping/merchant/inventories/v1" - -## -# Snippet for the delete_regional_inventory call in the RegionalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#delete_regional_inventory. -# -def delete_regional_inventory - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new - - # Call the delete_regional_inventory method. - result = client.delete_regional_inventory request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_RegionalInventoryService_DeleteRegionalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/insert_regional_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/insert_regional_inventory.rb deleted file mode 100644 index 7f1d60cb06a7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/insert_regional_inventory.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_RegionalInventoryService_InsertRegionalInventory_sync] -require "google/shopping/merchant/inventories/v1" - -## -# Snippet for the insert_regional_inventory call in the RegionalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#insert_regional_inventory. -# -def insert_regional_inventory - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new - - # Call the insert_regional_inventory method. - result = client.insert_regional_inventory request - - # The returned object is of type Google::Shopping::Merchant::Inventories::V1::RegionalInventory. - p result -end -# [END merchantapi_v1_generated_RegionalInventoryService_InsertRegionalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/list_regional_inventories.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/list_regional_inventories.rb deleted file mode 100644 index 2837c821cbf9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/list_regional_inventories.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 merchantapi_v1_generated_RegionalInventoryService_ListRegionalInventories_sync] -require "google/shopping/merchant/inventories/v1" - -## -# Snippet for the list_regional_inventories call in the RegionalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#list_regional_inventories. -# -def list_regional_inventories - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.new - - # Call the list_regional_inventories method. - result = client.list_regional_inventories request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory. - p item - end -end -# [END merchantapi_v1_generated_RegionalInventoryService_ListRegionalInventories_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json b/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json deleted file mode 100644 index 5fbebd90967a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-inventories-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.inventories.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1_generated_LocalInventoryService_ListLocalInventories_sync", - "title": "Snippet for the list_local_inventories call in the LocalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#list_local_inventories.", - "file": "local_inventory_service/list_local_inventories.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_local_inventories", - "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#list_local_inventories", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse", - "client": { - "short_name": "LocalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client" - }, - "method": { - "short_name": "ListLocalInventories", - "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService.ListLocalInventories", - "service": { - "short_name": "LocalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_LocalInventoryService_InsertLocalInventory_sync", - "title": "Snippet for the insert_local_inventory call in the LocalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#insert_local_inventory.", - "file": "local_inventory_service/insert_local_inventory.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_local_inventory", - "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#insert_local_inventory", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Inventories::V1::LocalInventory", - "client": { - "short_name": "LocalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client" - }, - "method": { - "short_name": "InsertLocalInventory", - "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService.InsertLocalInventory", - "service": { - "short_name": "LocalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_LocalInventoryService_DeleteLocalInventory_sync", - "title": "Snippet for the delete_local_inventory call in the LocalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#delete_local_inventory.", - "file": "local_inventory_service/delete_local_inventory.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_local_inventory", - "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#delete_local_inventory", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "LocalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client" - }, - "method": { - "short_name": "DeleteLocalInventory", - "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService.DeleteLocalInventory", - "service": { - "short_name": "LocalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_RegionalInventoryService_ListRegionalInventories_sync", - "title": "Snippet for the list_regional_inventories call in the RegionalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#list_regional_inventories.", - "file": "regional_inventory_service/list_regional_inventories.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_regional_inventories", - "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#list_regional_inventories", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse", - "client": { - "short_name": "RegionalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client" - }, - "method": { - "short_name": "ListRegionalInventories", - "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService.ListRegionalInventories", - "service": { - "short_name": "RegionalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_RegionalInventoryService_InsertRegionalInventory_sync", - "title": "Snippet for the insert_regional_inventory call in the RegionalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#insert_regional_inventory.", - "file": "regional_inventory_service/insert_regional_inventory.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_regional_inventory", - "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#insert_regional_inventory", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventory", - "client": { - "short_name": "RegionalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client" - }, - "method": { - "short_name": "InsertRegionalInventory", - "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService.InsertRegionalInventory", - "service": { - "short_name": "RegionalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_RegionalInventoryService_DeleteRegionalInventory_sync", - "title": "Snippet for the delete_regional_inventory call in the RegionalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#delete_regional_inventory.", - "file": "regional_inventory_service/delete_regional_inventory.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_regional_inventory", - "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#delete_regional_inventory", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "RegionalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client" - }, - "method": { - "short_name": "DeleteRegionalInventory", - "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService.DeleteRegionalInventory", - "service": { - "short_name": "RegionalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService" - } - } - }, - "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-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_paths_test.rb deleted file mode 100644 index b6f1437a06ed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_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/shopping/merchant/inventories/v1/local_inventory_service" - -class ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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_local_inventory_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.local_inventory_path account: "value0", product: "value1", store_code: "value2" - assert_equal "accounts/value0/products/value1/localInventories/value2", 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_path account: "value0", product: "value1" - assert_equal "accounts/value0/products/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb deleted file mode 100644 index d275cbb190b3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb +++ /dev/null @@ -1,264 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/inventories/v1/localinventory_pb" -require "google/shopping/merchant/inventories/v1/local_inventory_service/rest" - - -class ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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_local_inventories - # Create test objects. - client_result = ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse.new - http_response = OpenStruct.new 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_local_inventories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::ServiceStub.stub :transcode_list_local_inventories_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_local_inventories_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_local_inventories({ 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_local_inventories 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_local_inventories ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.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_local_inventories({ 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_local_inventories(::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.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_local_inventories_client_stub.call_count - end - end - end - - def test_insert_local_inventory - # Create test objects. - client_result = ::Google::Shopping::Merchant::Inventories::V1::LocalInventory.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - local_inventory = {} - - insert_local_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::ServiceStub.stub :transcode_insert_local_inventory_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_local_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_local_inventory parent: parent, local_inventory: local_inventory do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_local_inventory ::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_local_inventory(::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_local_inventory_client_stub.call_count - end - end - end - - def test_delete_local_inventory - # 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_local_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::ServiceStub.stub :transcode_delete_local_inventory_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_local_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_local_inventory({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_local_inventory name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_local_inventory ::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_local_inventory({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_local_inventory(::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_local_inventory_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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb deleted file mode 100644 index 4ba1531cdec9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb +++ /dev/null @@ -1,289 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/inventories/v1/localinventory_pb" -require "google/shopping/merchant/inventories/v1/local_inventory_service" - -class ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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_local_inventories - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_local_inventories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_local_inventories, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest, 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_local_inventories_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_local_inventories({ 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_local_inventories 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_local_inventories ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.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_local_inventories({ 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_local_inventories(::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.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_local_inventories_client_stub.call_rpc_count - end - end - - def test_insert_local_inventory - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Inventories::V1::LocalInventory.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - local_inventory = {} - - insert_local_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_local_inventory, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Inventories::V1::LocalInventory), request["local_inventory"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_local_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_local_inventory parent: parent, local_inventory: local_inventory do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_local_inventory ::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_local_inventory(::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_local_inventory_client_stub.call_rpc_count - end - end - - def test_delete_local_inventory - # 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_local_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_local_inventory, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_local_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_local_inventory({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_local_inventory name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_local_inventory ::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_local_inventory({ 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_local_inventory(::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new(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_local_inventory_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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_paths_test.rb deleted file mode 100644 index 460a426e97e6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_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/shopping/merchant/inventories/v1/regional_inventory_service" - -class ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_path account: "value0", product: "value1" - assert_equal "accounts/value0/products/value1", path - end - end - - def test_regional_inventory_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.regional_inventory_path account: "value0", product: "value1", region: "value2" - assert_equal "accounts/value0/products/value1/regionalInventories/value2", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb deleted file mode 100644 index 45afecc76a74..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb +++ /dev/null @@ -1,264 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/inventories/v1/regionalinventory_pb" -require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest" - - -class ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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_regional_inventories - # Create test objects. - client_result = ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse.new - http_response = OpenStruct.new 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_regional_inventories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::ServiceStub.stub :transcode_list_regional_inventories_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_regional_inventories_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_regional_inventories({ 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_regional_inventories 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_regional_inventories ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.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_regional_inventories({ 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_regional_inventories(::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.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_regional_inventories_client_stub.call_count - end - end - end - - def test_insert_regional_inventory - # Create test objects. - client_result = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - regional_inventory = {} - - insert_regional_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::ServiceStub.stub :transcode_insert_regional_inventory_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_regional_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_regional_inventory ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_regional_inventory(::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_regional_inventory_client_stub.call_count - end - end - end - - def test_delete_regional_inventory - # 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_regional_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::ServiceStub.stub :transcode_delete_regional_inventory_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_regional_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_regional_inventory({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_regional_inventory name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_regional_inventory ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_regional_inventory({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_regional_inventory(::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_regional_inventory_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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb deleted file mode 100644 index f54b95d7c5fa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb +++ /dev/null @@ -1,289 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/inventories/v1/regionalinventory_pb" -require "google/shopping/merchant/inventories/v1/regional_inventory_service" - -class ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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_regional_inventories - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_regional_inventories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_regional_inventories, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest, 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_regional_inventories_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_regional_inventories({ 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_regional_inventories 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_regional_inventories ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.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_regional_inventories({ 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_regional_inventories(::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.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_regional_inventories_client_stub.call_rpc_count - end - end - - def test_insert_regional_inventory - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - regional_inventory = {} - - insert_regional_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_regional_inventory, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory), request["regional_inventory"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_regional_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_regional_inventory ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_regional_inventory(::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_regional_inventory_client_stub.call_rpc_count - end - end - - def test_delete_regional_inventory - # 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_regional_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_regional_inventory, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_regional_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_regional_inventory({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_regional_inventory name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_regional_inventory ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_regional_inventory({ 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_regional_inventory(::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new(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_regional_inventory_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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-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-shopping-merchant-inventories-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.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-shopping-merchant-inventories-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.repo-metadata.json deleted file mode 100644 index e750ced8add4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-inventories-v1beta", - "distribution_name": "google-shopping-merchant-inventories-v1beta", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1BETA API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-inventories-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-inventories instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.rubocop.yml deleted file mode 100644 index e4469fb37867..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-inventories-v1beta.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-shopping-merchant-inventories-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.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-shopping-merchant-inventories-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant V1BETA 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-shopping-merchant-inventories-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/AUTHENTICATION.md deleted file mode 100644 index 3500f6dddbe8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-inventories-v1beta 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-shopping-merchant-inventories-v1beta 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/shopping/merchant/inventories/v1beta" - -client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/inventories/v1beta" - -::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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-shopping-merchant-inventories-v1beta -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/shopping/merchant/inventories/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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-shopping-merchant-inventories-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/README.md deleted file mode 100644 index 7bac7e30b686..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Merchant V1BETA API - -Programmatically manage your Merchant Center accounts. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1BETA API. Most users should consider using -the main client gem, -[google-shopping-merchant-inventories](https://rubygems.org/gems/google-shopping-merchant-inventories). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-inventories-v1beta -``` - -## 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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/inventories/v1beta" - -client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new -request = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new # (request fields as keyword arguments...) -response = client.list_local_inventories request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-inventories-v1beta) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/inventories/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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-shopping-merchant-inventories`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-inventories-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-shopping-merchant-inventories`. -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-shopping-merchant-inventories-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Rakefile deleted file mode 100644 index ff2d3cc4b129..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta 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/shopping/merchant/inventories/v1beta/local_inventory_service/credentials" - ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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-shopping-merchant-inventories-v1beta 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-shopping-merchant-inventories-v1beta 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-shopping-merchant-inventories-v1beta 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-shopping-merchant-inventories-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-inventories-v1beta" - header "google-shopping-merchant-inventories-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-inventories-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-inventories-v1beta 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-shopping-merchant-inventories-v1beta 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-shopping-merchant-inventories-v1beta 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-shopping-merchant-inventories-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/gapic_metadata.json deleted file mode 100644 index dd89d64ee89b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/gapic_metadata.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.inventories.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Inventories::V1beta", - "services": { - "LocalInventoryService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client", - "rpcs": { - "ListLocalInventories": { - "methods": [ - "list_local_inventories" - ] - }, - "InsertLocalInventory": { - "methods": [ - "insert_local_inventory" - ] - }, - "DeleteLocalInventory": { - "methods": [ - "delete_local_inventory" - ] - } - } - } - } - }, - "RegionalInventoryService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client", - "rpcs": { - "ListRegionalInventories": { - "methods": [ - "list_regional_inventories" - ] - }, - "InsertRegionalInventory": { - "methods": [ - "insert_regional_inventory" - ] - }, - "DeleteRegionalInventory": { - "methods": [ - "delete_regional_inventory" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec deleted file mode 100644 index e58c50914813..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/inventories/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-inventories-v1beta" - gem.version = Google::Shopping::Merchant::Inventories::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-inventories-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-inventories instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center accounts." - 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-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb deleted file mode 100644 index a4315e427d7b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.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/shopping/merchant/inventories/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb deleted file mode 100644 index acf7855533df..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.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 "google/shopping/merchant/inventories/v1beta/local_inventory_service" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service" -require "google/shopping/merchant/inventories/v1beta/version" - -module Google - module Shopping - module Merchant - module Inventories - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/inventories/v1beta" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/inventories/v1beta" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/inventories/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb deleted file mode 100644 index c7d1c0af2e04..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/inventories/v1beta/version" - -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/paths" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/client" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - ## - # Service to manage local inventory for products - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/inventories/v1beta/local_inventory_service" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new - # - module LocalInventoryService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "local_inventory_service", "helpers.rb" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb deleted file mode 100644 index 53cdca3d81e9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb +++ /dev/null @@ -1,711 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/inventories/v1beta/localinventory_pb" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module LocalInventoryService - ## - # Client for the LocalInventoryService service. - # - # Service to manage local inventory for products - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :local_inventory_service_stub - - ## - # Configure the LocalInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LocalInventoryService clients - # ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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", "Shopping", "Merchant", "Inventories", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LocalInventoryService 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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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 - @local_inventory_service_stub.universe_domain - end - - ## - # Create a new LocalInventoryService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LocalInventoryService 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/shopping/merchant/inventories/v1beta/localinventory_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 - - @local_inventory_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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 - ) - - @local_inventory_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 - @local_inventory_service_stub.logger - end - - # Service calls - - ## - # Lists the `LocalInventory` resources for the given product in your merchant - # account. The response might contain fewer items than specified by - # `pageSize`. If `pageToken` was returned in previous request, it can be used - # to obtain additional results. - # - # `LocalInventory` resources are listed per product for a given account. - # - # @overload list_local_inventories(request, options = nil) - # Pass arguments to `list_local_inventories` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_local_inventories(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_local_inventories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 parent product to list local inventories for. - # Format: - # `accounts/{account}/products/{product}` - # @param page_size [::Integer] - # The maximum number of `LocalInventory` resources for the given - # product to return. The service returns fewer than this value if the number - # of inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 25000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum - # @param page_token [::String] - # A page token, received from a previous `ListLocalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListLocalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new - # - # # Call the list_local_inventories method. - # result = client.list_local_inventories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. - # p item - # end - # - def list_local_inventories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_local_inventories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_local_inventories.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_local_inventories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.call_rpc :list_local_inventories, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @local_inventory_service_stub, :list_local_inventories, 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 - - ## - # Inserts a `LocalInventory` resource to a product in your merchant - # account. - # - # Replaces the full `LocalInventory` resource if an entry with the same - # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory#store_code `storeCode`} - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `LocalInventory` - # resource to appear in products. - # - # @overload insert_local_inventory(request, options = nil) - # Pass arguments to `insert_local_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_local_inventory(parent: nil, local_inventory: nil) - # Pass arguments to `insert_local_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @param local_inventory [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory, ::Hash] - # Required. Local inventory information of the product. If the product - # already has a `LocalInventory` resource for the same `storeCode`, full - # replacement of the `LocalInventory` resource is performed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new - # - # # Call the insert_local_inventory method. - # result = client.insert_local_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. - # p result - # - def insert_local_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_local_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_local_inventory.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_local_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.call_rpc :insert_local_inventory, request, 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 `LocalInventory` from the given product in your - # merchant account. It might take a up to an hour for the - # `LocalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - # - # @overload delete_local_inventory(request, options = nil) - # Pass arguments to `delete_local_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_local_inventory(name: nil) - # Pass arguments to `delete_local_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the local inventory for the given product to delete. - # Format: - # `accounts/{account}/products/{product}/localInventories/{store_code}` - # - # @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/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new - # - # # Call the delete_local_inventory method. - # result = client.delete_local_inventory request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_local_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_local_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_local_inventory.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_local_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.call_rpc :delete_local_inventory, request, 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 LocalInventoryService API. - # - # This class represents the configuration for LocalInventoryService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_local_inventories to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_local_inventories.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_local_inventories.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LocalInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_local_inventories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_local_inventories - ## - # RPC-specific configuration for `insert_local_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_local_inventory - ## - # RPC-specific configuration for `delete_local_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_local_inventory - - # @private - def initialize parent_rpcs = nil - list_local_inventories_config = parent_rpcs.list_local_inventories if parent_rpcs.respond_to? :list_local_inventories - @list_local_inventories = ::Gapic::Config::Method.new list_local_inventories_config - insert_local_inventory_config = parent_rpcs.insert_local_inventory if parent_rpcs.respond_to? :insert_local_inventory - @insert_local_inventory = ::Gapic::Config::Method.new insert_local_inventory_config - delete_local_inventory_config = parent_rpcs.delete_local_inventory if parent_rpcs.respond_to? :delete_local_inventory - @delete_local_inventory = ::Gapic::Config::Method.new delete_local_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb deleted file mode 100644 index 1f667b3a267c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_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 Shopping - module Merchant - module Inventories - module V1beta - module LocalInventoryService - # Credentials for the LocalInventoryService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb deleted file mode 100644 index 23b3173b789e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.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 Shopping - module Merchant - module Inventories - module V1beta - module LocalInventoryService - # Path helper methods for the LocalInventoryService API. - module Paths - ## - # Create a fully-qualified LocalInventory resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/products/{product}/localInventories/{store_code}` - # - # @param account [String] - # @param product [String] - # @param store_code [String] - # - # @return [::String] - def local_inventory_path account:, product:, store_code: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" - - "accounts/#{account}/products/#{product}/localInventories/#{store_code}" - end - - ## - # Create a fully-qualified Product resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/products/{product}` - # - # @param account [String] - # @param product [String] - # - # @return [::String] - def product_path account:, product: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/products/#{product}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb deleted file mode 100644 index c6f5cb4cb26f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_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/shopping/merchant/inventories/v1beta/version" - -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/paths" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - ## - # Service to manage local inventory for products - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new - # - module LocalInventoryService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb deleted file mode 100644 index e2bb2a035be0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb +++ /dev/null @@ -1,647 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/inventories/v1beta/localinventory_pb" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module LocalInventoryService - module Rest - ## - # REST client for the LocalInventoryService service. - # - # Service to manage local inventory for products - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :local_inventory_service_stub - - ## - # Configure the LocalInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LocalInventoryService clients - # ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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", "Shopping", "Merchant", "Inventories", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LocalInventoryService 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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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 - @local_inventory_service_stub.universe_domain - end - - ## - # Create a new LocalInventoryService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LocalInventoryService 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 - - @local_inventory_service_stub = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @local_inventory_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 - @local_inventory_service_stub.logger - end - - # Service calls - - ## - # Lists the `LocalInventory` resources for the given product in your merchant - # account. The response might contain fewer items than specified by - # `pageSize`. If `pageToken` was returned in previous request, it can be used - # to obtain additional results. - # - # `LocalInventory` resources are listed per product for a given account. - # - # @overload list_local_inventories(request, options = nil) - # Pass arguments to `list_local_inventories` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_local_inventories(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_local_inventories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 parent product to list local inventories for. - # Format: - # `accounts/{account}/products/{product}` - # @param page_size [::Integer] - # The maximum number of `LocalInventory` resources for the given - # product to return. The service returns fewer than this value if the number - # of inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 25000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum - # @param page_token [::String] - # A page token, received from a previous `ListLocalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListLocalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new - # - # # Call the list_local_inventories method. - # result = client.list_local_inventories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. - # p item - # end - # - def list_local_inventories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_local_inventories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_local_inventories.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_local_inventories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.list_local_inventories request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @local_inventory_service_stub, :list_local_inventories, "local_inventories", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inserts a `LocalInventory` resource to a product in your merchant - # account. - # - # Replaces the full `LocalInventory` resource if an entry with the same - # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory#store_code `storeCode`} - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `LocalInventory` - # resource to appear in products. - # - # @overload insert_local_inventory(request, options = nil) - # Pass arguments to `insert_local_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_local_inventory(parent: nil, local_inventory: nil) - # Pass arguments to `insert_local_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @param local_inventory [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory, ::Hash] - # Required. Local inventory information of the product. If the product - # already has a `LocalInventory` resource for the same `storeCode`, full - # replacement of the `LocalInventory` resource is performed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new - # - # # Call the insert_local_inventory method. - # result = client.insert_local_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. - # p result - # - def insert_local_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_local_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_local_inventory.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_local_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.insert_local_inventory request, 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 `LocalInventory` from the given product in your - # merchant account. It might take a up to an hour for the - # `LocalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - # - # @overload delete_local_inventory(request, options = nil) - # Pass arguments to `delete_local_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_local_inventory(name: nil) - # Pass arguments to `delete_local_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the local inventory for the given product to delete. - # Format: - # `accounts/{account}/products/{product}/localInventories/{store_code}` - # @yield [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/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new - # - # # Call the delete_local_inventory method. - # result = client.delete_local_inventory request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_local_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_local_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_local_inventory.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_local_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.delete_local_inventory request, 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 LocalInventoryService REST API. - # - # This class represents the configuration for LocalInventoryService 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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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_local_inventories to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_local_inventories.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_local_inventories.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LocalInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_local_inventories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_local_inventories - ## - # RPC-specific configuration for `insert_local_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_local_inventory - ## - # RPC-specific configuration for `delete_local_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_local_inventory - - # @private - def initialize parent_rpcs = nil - list_local_inventories_config = parent_rpcs.list_local_inventories if parent_rpcs.respond_to? :list_local_inventories - @list_local_inventories = ::Gapic::Config::Method.new list_local_inventories_config - insert_local_inventory_config = parent_rpcs.insert_local_inventory if parent_rpcs.respond_to? :insert_local_inventory - @insert_local_inventory = ::Gapic::Config::Method.new insert_local_inventory_config - delete_local_inventory_config = parent_rpcs.delete_local_inventory if parent_rpcs.respond_to? :delete_local_inventory - @delete_local_inventory = ::Gapic::Config::Method.new delete_local_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb deleted file mode 100644 index 3f797cae4f4b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb +++ /dev/null @@ -1,267 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/inventories/v1beta/localinventory_pb" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module LocalInventoryService - module Rest - ## - # REST service stub for the LocalInventoryService 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_local_inventories REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse] - # A result object deserialized from the server's reply - def list_local_inventories request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_local_inventories_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_local_inventories", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the insert_local_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] - # A result object deserialized from the server's reply - def insert_local_inventory request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_local_inventory_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "insert_local_inventory", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory.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_local_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_local_inventory request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_local_inventory_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_local_inventory", - 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_local_inventories REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_local_inventories_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/inventories/v1beta/{parent}/localInventories", - matches: [ - ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_local_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_local_inventory_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/inventories/v1beta/{parent}/localInventories:insert", - body: "local_inventory", - matches: [ - ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_local_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_local_inventory_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/inventories/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/products/[^/]+/localInventories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb deleted file mode 100644 index b410b7ef3d32..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/inventories/v1beta/localinventory.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/shopping/type/types_pb' -require 'google/type/interval_pb' - - -descriptor_data = "\n@google/shopping/merchant/inventories/v1beta/localinventory.proto\x12+google.shopping.merchant.inventories.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\x8d\x05\n\x0eLocalInventory\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\nstore_code\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12*\n\x05price\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12/\n\nsale_price\x18\x05 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x38\n\x19sale_price_effective_date\x18\x06 \x01(\x0b\x32\x15.google.type.Interval\x12\x19\n\x0c\x61vailability\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08quantity\x18\x08 \x01(\x03H\x01\x88\x01\x01\x12\x1a\n\rpickup_method\x18\t \x01(\tH\x02\x88\x01\x01\x12\x17\n\npickup_sla\x18\n \x01(\tH\x03\x88\x01\x01\x12%\n\x18instore_product_location\x18\x0b \x01(\tH\x04\x88\x01\x01\x12@\n\x11\x63ustom_attributes\x18\x0c \x03(\x0b\x32%.google.shopping.type.CustomAttribute:s\xea\x41p\n)merchantapi.googleapis.com/LocalInventory\x12\x43\x61\x63\x63ounts/{account}/products/{product}/localInventories/{store_code}B\x0f\n\r_availabilityB\x0b\n\t_quantityB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\x1b\n\x19_instore_product_location\"\x87\x01\n\x1bListLocalInventoriesRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/LocalInventory\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8f\x01\n\x1cListLocalInventoriesResponse\x12V\n\x11local_inventories\x18\x01 \x03(\x0b\x32;.google.shopping.merchant.inventories.v1beta.LocalInventory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbb\x01\n\x1bInsertLocalInventoryRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/LocalInventory\x12Y\n\x0flocal_inventory\x18\x02 \x01(\x0b\x32;.google.shopping.merchant.inventories.v1beta.LocalInventoryB\x03\xe0\x41\x02\"^\n\x1b\x44\x65leteLocalInventoryRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/LocalInventory2\xb8\x06\n\x15LocalInventoryService\x12\x81\x02\n\x14ListLocalInventories\x12H.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest\x1aI.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/inventories/v1beta/{parent=accounts/*/products/*}/localInventories\x12\x82\x02\n\x14InsertLocalInventory\x12H.google.shopping.merchant.inventories.v1beta.InsertLocalInventoryRequest\x1a;.google.shopping.merchant.inventories.v1beta.LocalInventory\"c\x82\xd3\xe4\x93\x02]\"J/inventories/v1beta/{parent=accounts/*/products/*}/localInventories:insert:\x0flocal_inventory\x12\xcc\x01\n\x14\x44\x65leteLocalInventory\x12H.google.shopping.merchant.inventories.v1beta.DeleteLocalInventoryRequest\x1a\x16.google.protobuf.Empty\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45*C/inventories/v1beta/{name=accounts/*/products/*/localInventories/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xef\x01\n/com.google.shopping.merchant.inventories.v1betaB\x13LocalInventoryProtoP\x01ZWcloud.google.com/go/shopping/merchant/inventories/apiv1beta/inventoriespb;inventoriespb\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - LocalInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.LocalInventory").msgclass - ListLocalInventoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest").msgclass - ListLocalInventoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListLocalInventoriesResponse").msgclass - InsertLocalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.InsertLocalInventoryRequest").msgclass - DeleteLocalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.DeleteLocalInventoryRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb deleted file mode 100644 index 03e3fbf6b7eb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb +++ /dev/null @@ -1,68 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/inventories/v1beta/localinventory.proto for package 'google.shopping.merchant.inventories.v1beta' -# 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/shopping/merchant/inventories/v1beta/localinventory_pb' - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module LocalInventoryService - # Service to manage local inventory for products - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.inventories.v1beta.LocalInventoryService' - - # Lists the `LocalInventory` resources for the given product in your merchant - # account. The response might contain fewer items than specified by - # `pageSize`. If `pageToken` was returned in previous request, it can be used - # to obtain additional results. - # - # `LocalInventory` resources are listed per product for a given account. - rpc :ListLocalInventories, ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest, ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse - # Inserts a `LocalInventory` resource to a product in your merchant - # account. - # - # Replaces the full `LocalInventory` resource if an entry with the same - # [`storeCode`][google.shopping.merchant.inventories.v1beta.LocalInventory.store_code] - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `LocalInventory` - # resource to appear in products. - rpc :InsertLocalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest, ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory - # Deletes the specified `LocalInventory` from the given product in your - # merchant account. It might take a up to an hour for the - # `LocalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - rpc :DeleteLocalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb deleted file mode 100644 index 60e52ac9c336..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_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/shopping/merchant/inventories/v1beta/version" - -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/client" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - ## - # Service to manage regional inventory for products. There is also separate - # `regions` resource and API to manage regions definitions. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/inventories/v1beta/regional_inventory_service" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new - # - module RegionalInventoryService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "regional_inventory_service", "helpers.rb" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb deleted file mode 100644 index e5bcee5cc83f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb +++ /dev/null @@ -1,711 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/inventories/v1beta/regionalinventory_pb" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module RegionalInventoryService - ## - # Client for the RegionalInventoryService service. - # - # Service to manage regional inventory for products. There is also separate - # `regions` resource and API to manage regions definitions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :regional_inventory_service_stub - - ## - # Configure the RegionalInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RegionalInventoryService clients - # ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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", "Shopping", "Merchant", "Inventories", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RegionalInventoryService 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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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 - @regional_inventory_service_stub.universe_domain - end - - ## - # Create a new RegionalInventoryService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RegionalInventoryService 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/shopping/merchant/inventories/v1beta/regionalinventory_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 - - @regional_inventory_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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 - ) - - @regional_inventory_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 - @regional_inventory_service_stub.logger - end - - # Service calls - - ## - # Lists the `RegionalInventory` resources for the given product in your - # merchant account. The response might contain fewer items than specified by - # `pageSize`. If `pageToken` was returned in previous request, it can be - # used to obtain additional results. - # - # `RegionalInventory` resources are listed per product for a given account. - # - # @overload list_regional_inventories(request, options = nil) - # Pass arguments to `list_regional_inventories` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_regional_inventories(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_regional_inventories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 parent product to list `RegionalInventory` - # resources for. Format: `accounts/{account}/products/{product}` - # @param page_size [::Integer] - # The maximum number of `RegionalInventory` resources for the given product - # to return. The service returns fewer than this value if the number of - # inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 100000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum. - # @param page_token [::String] - # A page token, received from a previous `ListRegionalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegionalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new - # - # # Call the list_regional_inventories method. - # result = client.list_regional_inventories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. - # p item - # end - # - def list_regional_inventories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_regional_inventories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_regional_inventories.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_regional_inventories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.call_rpc :list_regional_inventories, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @regional_inventory_service_stub, :list_regional_inventories, 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 - - ## - # Inserts a `RegionalInventory` to a given product in your - # merchant account. - # - # Replaces the full `RegionalInventory` resource if an entry with the same - # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory#region `region`} - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `RegionalInventory` - # resource to appear in products. - # - # @overload insert_regional_inventory(request, options = nil) - # Pass arguments to `insert_regional_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_regional_inventory(parent: nil, regional_inventory: nil) - # Pass arguments to `insert_regional_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @param regional_inventory [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory, ::Hash] - # Required. Regional inventory information to add to the product. If the - # product already has a `RegionalInventory` resource for the same `region`, - # full replacement of the `RegionalInventory` resource is performed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new - # - # # Call the insert_regional_inventory method. - # result = client.insert_regional_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. - # p result - # - def insert_regional_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_regional_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_regional_inventory.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_regional_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.call_rpc :insert_regional_inventory, request, 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 `RegionalInventory` resource from the given product - # in your merchant account. It might take up to an hour for the - # `RegionalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - # - # @overload delete_regional_inventory(request, options = nil) - # Pass arguments to `delete_regional_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_regional_inventory(name: nil) - # Pass arguments to `delete_regional_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `RegionalInventory` resource to delete. - # Format: - # `accounts/{account}/products/{product}/regionalInventories/{region}` - # - # @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/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new - # - # # Call the delete_regional_inventory method. - # result = client.delete_regional_inventory request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_regional_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_regional_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_regional_inventory.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_regional_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.call_rpc :delete_regional_inventory, request, 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 RegionalInventoryService API. - # - # This class represents the configuration for RegionalInventoryService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_regional_inventories to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_regional_inventories.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_regional_inventories.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 RegionalInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_regional_inventories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_regional_inventories - ## - # RPC-specific configuration for `insert_regional_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_regional_inventory - ## - # RPC-specific configuration for `delete_regional_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_regional_inventory - - # @private - def initialize parent_rpcs = nil - list_regional_inventories_config = parent_rpcs.list_regional_inventories if parent_rpcs.respond_to? :list_regional_inventories - @list_regional_inventories = ::Gapic::Config::Method.new list_regional_inventories_config - insert_regional_inventory_config = parent_rpcs.insert_regional_inventory if parent_rpcs.respond_to? :insert_regional_inventory - @insert_regional_inventory = ::Gapic::Config::Method.new insert_regional_inventory_config - delete_regional_inventory_config = parent_rpcs.delete_regional_inventory if parent_rpcs.respond_to? :delete_regional_inventory - @delete_regional_inventory = ::Gapic::Config::Method.new delete_regional_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb deleted file mode 100644 index 6b325f84dd88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_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 Shopping - module Merchant - module Inventories - module V1beta - module RegionalInventoryService - # Credentials for the RegionalInventoryService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb deleted file mode 100644 index 7bf0b753a5f1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.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 Shopping - module Merchant - module Inventories - module V1beta - module RegionalInventoryService - # Path helper methods for the RegionalInventoryService API. - module Paths - ## - # Create a fully-qualified Product resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/products/{product}` - # - # @param account [String] - # @param product [String] - # - # @return [::String] - def product_path account:, product: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/products/#{product}" - end - - ## - # Create a fully-qualified RegionalInventory resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/products/{product}/regionalInventories/{region}` - # - # @param account [String] - # @param product [String] - # @param region [String] - # - # @return [::String] - def regional_inventory_path account:, product:, region: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" - - "accounts/#{account}/products/#{product}/regionalInventories/#{region}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb deleted file mode 100644 index d5a20afca8a0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_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/shopping/merchant/inventories/v1beta/version" - -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - ## - # Service to manage regional inventory for products. There is also separate - # `regions` resource and API to manage regions definitions. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new - # - module RegionalInventoryService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb deleted file mode 100644 index 28671ee52fb4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb +++ /dev/null @@ -1,647 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/inventories/v1beta/regionalinventory_pb" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module RegionalInventoryService - module Rest - ## - # REST client for the RegionalInventoryService service. - # - # Service to manage regional inventory for products. There is also separate - # `regions` resource and API to manage regions definitions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :regional_inventory_service_stub - - ## - # Configure the RegionalInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RegionalInventoryService clients - # ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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", "Shopping", "Merchant", "Inventories", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RegionalInventoryService 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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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 - @regional_inventory_service_stub.universe_domain - end - - ## - # Create a new RegionalInventoryService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RegionalInventoryService 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 - - @regional_inventory_service_stub = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @regional_inventory_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 - @regional_inventory_service_stub.logger - end - - # Service calls - - ## - # Lists the `RegionalInventory` resources for the given product in your - # merchant account. The response might contain fewer items than specified by - # `pageSize`. If `pageToken` was returned in previous request, it can be - # used to obtain additional results. - # - # `RegionalInventory` resources are listed per product for a given account. - # - # @overload list_regional_inventories(request, options = nil) - # Pass arguments to `list_regional_inventories` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_regional_inventories(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_regional_inventories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 parent product to list `RegionalInventory` - # resources for. Format: `accounts/{account}/products/{product}` - # @param page_size [::Integer] - # The maximum number of `RegionalInventory` resources for the given product - # to return. The service returns fewer than this value if the number of - # inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 100000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum. - # @param page_token [::String] - # A page token, received from a previous `ListRegionalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegionalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new - # - # # Call the list_regional_inventories method. - # result = client.list_regional_inventories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. - # p item - # end - # - def list_regional_inventories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_regional_inventories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_regional_inventories.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_regional_inventories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.list_regional_inventories request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @regional_inventory_service_stub, :list_regional_inventories, "regional_inventories", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inserts a `RegionalInventory` to a given product in your - # merchant account. - # - # Replaces the full `RegionalInventory` resource if an entry with the same - # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory#region `region`} - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `RegionalInventory` - # resource to appear in products. - # - # @overload insert_regional_inventory(request, options = nil) - # Pass arguments to `insert_regional_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_regional_inventory(parent: nil, regional_inventory: nil) - # Pass arguments to `insert_regional_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @param regional_inventory [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory, ::Hash] - # Required. Regional inventory information to add to the product. If the - # product already has a `RegionalInventory` resource for the same `region`, - # full replacement of the `RegionalInventory` resource is performed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new - # - # # Call the insert_regional_inventory method. - # result = client.insert_regional_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. - # p result - # - def insert_regional_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_regional_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_regional_inventory.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_regional_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.insert_regional_inventory request, 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 `RegionalInventory` resource from the given product - # in your merchant account. It might take up to an hour for the - # `RegionalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - # - # @overload delete_regional_inventory(request, options = nil) - # Pass arguments to `delete_regional_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_regional_inventory(name: nil) - # Pass arguments to `delete_regional_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `RegionalInventory` resource to delete. - # Format: - # `accounts/{account}/products/{product}/regionalInventories/{region}` - # @yield [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/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new - # - # # Call the delete_regional_inventory method. - # result = client.delete_regional_inventory request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_regional_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_regional_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_regional_inventory.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_regional_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.delete_regional_inventory request, 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 RegionalInventoryService REST API. - # - # This class represents the configuration for RegionalInventoryService 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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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_regional_inventories to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_regional_inventories.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_regional_inventories.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 RegionalInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_regional_inventories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_regional_inventories - ## - # RPC-specific configuration for `insert_regional_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_regional_inventory - ## - # RPC-specific configuration for `delete_regional_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_regional_inventory - - # @private - def initialize parent_rpcs = nil - list_regional_inventories_config = parent_rpcs.list_regional_inventories if parent_rpcs.respond_to? :list_regional_inventories - @list_regional_inventories = ::Gapic::Config::Method.new list_regional_inventories_config - insert_regional_inventory_config = parent_rpcs.insert_regional_inventory if parent_rpcs.respond_to? :insert_regional_inventory - @insert_regional_inventory = ::Gapic::Config::Method.new insert_regional_inventory_config - delete_regional_inventory_config = parent_rpcs.delete_regional_inventory if parent_rpcs.respond_to? :delete_regional_inventory - @delete_regional_inventory = ::Gapic::Config::Method.new delete_regional_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb deleted file mode 100644 index 937cc49a5f70..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb +++ /dev/null @@ -1,267 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module RegionalInventoryService - module Rest - ## - # REST service stub for the RegionalInventoryService 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_regional_inventories REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse] - # A result object deserialized from the server's reply - def list_regional_inventories request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_regional_inventories_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_regional_inventories", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the insert_regional_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] - # A result object deserialized from the server's reply - def insert_regional_inventory request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_regional_inventory_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "insert_regional_inventory", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory.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_regional_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_regional_inventory request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_regional_inventory_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_regional_inventory", - 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_regional_inventories REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_regional_inventories_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/inventories/v1beta/{parent}/regionalInventories", - matches: [ - ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_regional_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_regional_inventory_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/inventories/v1beta/{parent}/regionalInventories:insert", - body: "regional_inventory", - matches: [ - ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_regional_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_regional_inventory_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/inventories/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/products/[^/]+/regionalInventories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb deleted file mode 100644 index a1648d390335..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/inventories/v1beta/regionalinventory.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/shopping/type/types_pb' -require 'google/type/interval_pb' - - -descriptor_data = "\nCgoogle/shopping/merchant/inventories/v1beta/regionalinventory.proto\x12+google.shopping.merchant.inventories.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\xd0\x03\n\x11RegionalInventory\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\x06region\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12*\n\x05price\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12/\n\nsale_price\x18\x05 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x38\n\x19sale_price_effective_date\x18\x06 \x01(\x0b\x32\x15.google.type.Interval\x12\x19\n\x0c\x61vailability\x18\x07 \x01(\tH\x00\x88\x01\x01\x12@\n\x11\x63ustom_attributes\x18\x08 \x03(\x0b\x32%.google.shopping.type.CustomAttribute:u\xea\x41r\n,merchantapi.googleapis.com/RegionalInventory\x12\x42\x61\x63\x63ounts/{account}/products/{product}/regionalInventories/{region}B\x0f\n\r_availability\"\x8d\x01\n\x1eListRegionalInventoriesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,merchantapi.googleapis.com/RegionalInventory\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x98\x01\n\x1fListRegionalInventoriesResponse\x12\\\n\x14regional_inventories\x18\x01 \x03(\x0b\x32>.google.shopping.merchant.inventories.v1beta.RegionalInventory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc7\x01\n\x1eInsertRegionalInventoryRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,merchantapi.googleapis.com/RegionalInventory\x12_\n\x12regional_inventory\x18\x02 \x01(\x0b\x32>.google.shopping.merchant.inventories.v1beta.RegionalInventoryB\x03\xe0\x41\x02\"d\n\x1e\x44\x65leteRegionalInventoryRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,merchantapi.googleapis.com/RegionalInventory2\xdf\x06\n\x18RegionalInventoryService\x12\x8d\x02\n\x17ListRegionalInventories\x12K.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest\x1aL.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/inventories/v1beta/{parent=accounts/*/products/*}/regionalInventories\x12\x91\x02\n\x17InsertRegionalInventory\x12K.google.shopping.merchant.inventories.v1beta.InsertRegionalInventoryRequest\x1a>.google.shopping.merchant.inventories.v1beta.RegionalInventory\"i\x82\xd3\xe4\x93\x02\x63\"M/inventories/v1beta/{parent=accounts/*/products/*}/regionalInventories:insert:\x12regional_inventory\x12\xd5\x01\n\x17\x44\x65leteRegionalInventory\x12K.google.shopping.merchant.inventories.v1beta.DeleteRegionalInventoryRequest\x1a\x16.google.protobuf.Empty\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/inventories/v1beta/{name=accounts/*/products/*/regionalInventories/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xa4\x01\n/com.google.shopping.merchant.inventories.v1betaB\x16RegionalInventoryProtoP\x01ZWcloud.google.com/go/shopping/merchant/inventories/apiv1beta/inventoriespb;inventoriespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - RegionalInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.RegionalInventory").msgclass - ListRegionalInventoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest").msgclass - ListRegionalInventoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesResponse").msgclass - InsertRegionalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.InsertRegionalInventoryRequest").msgclass - DeleteRegionalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.DeleteRegionalInventoryRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb deleted file mode 100644 index 5dc2aa0b399f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb +++ /dev/null @@ -1,69 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/inventories/v1beta/regionalinventory.proto for package 'google.shopping.merchant.inventories.v1beta' -# 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/shopping/merchant/inventories/v1beta/regionalinventory_pb' - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module RegionalInventoryService - # Service to manage regional inventory for products. There is also separate - # `regions` resource and API to manage regions definitions. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.inventories.v1beta.RegionalInventoryService' - - # Lists the `RegionalInventory` resources for the given product in your - # merchant account. The response might contain fewer items than specified by - # `pageSize`. If `pageToken` was returned in previous request, it can be - # used to obtain additional results. - # - # `RegionalInventory` resources are listed per product for a given account. - rpc :ListRegionalInventories, ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse - # Inserts a `RegionalInventory` to a given product in your - # merchant account. - # - # Replaces the full `RegionalInventory` resource if an entry with the same - # [`region`][google.shopping.merchant.inventories.v1beta.RegionalInventory.region] - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `RegionalInventory` - # resource to appear in products. - rpc :InsertRegionalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory - # Deletes the specified `RegionalInventory` resource from the given product - # in your merchant account. It might take up to an hour for the - # `RegionalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - rpc :DeleteRegionalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb deleted file mode 100644 index 20bc16586f0d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/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/shopping/merchant/inventories/v1beta/local_inventory_service/rest" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" -require "google/shopping/merchant/inventories/v1beta/version" - -module Google - module Shopping - module Merchant - module Inventories - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/inventories/v1beta/rest" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/version.rb deleted file mode 100644 index 8a8c30474f3c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/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 Shopping - module Merchant - module Inventories - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant V1BETA 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-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb deleted file mode 100644 index 3b0e147672b0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.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! - - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - # Local inventory information for the product. Represents in-store information - # for a specific product at the store specified by - # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory#store_code `storeCode`}. - # For a list of all accepted attribute values, see the [local product inventory - # data specification](https://support.google.com/merchants/answer/3061342). - # @!attribute [r] name - # @return [::String] - # Output only. The name of the `LocalInventory` resource. - # Format: - # `accounts/{account}/products/{product}/localInventories/{store_code}` - # @!attribute [r] account - # @return [::Integer] - # Output only. The account that owns the product. This field will be ignored - # if set by the client. - # @!attribute [rw] store_code - # @return [::String] - # Required. Immutable. Store code (the store ID from your Business Profile) - # of the physical store the product is sold in. See the [Local product - # inventory data - # specification](https://support.google.com/merchants/answer/3061342) for - # more information. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Price of the product at this store. - # @!attribute [rw] sale_price - # @return [::Google::Shopping::Type::Price] - # Sale price of the product at this store. Mandatory if - # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory#sale_price_effective_date `salePriceEffectiveDate`} - # is defined. - # @!attribute [rw] sale_price_effective_date - # @return [::Google::Type::Interval] - # The `TimePeriod` of the - # sale at this store. - # @!attribute [rw] availability - # @return [::String] - # Availability of the product at this store. - # For accepted attribute values, see the [local product inventory data - # specification](https://support.google.com/merchants/answer/3061342) - # @!attribute [rw] quantity - # @return [::Integer] - # Quantity of the product available at this store. Must be greater than or - # equal to zero. - # @!attribute [rw] pickup_method - # @return [::String] - # Supported pickup method for this product. Unless the value is `"not - # supported"`, this field must be submitted together with - # `pickupSla`. - # For accepted attribute values, see the [local product inventory data - # specification](https://support.google.com/merchants/answer/3061342) - # @!attribute [rw] pickup_sla - # @return [::String] - # Relative time period from the order date for an order for this product, - # from this store, to be ready for pickup. Must be submitted with - # `pickupMethod`. - # For accepted attribute values, see the [local product inventory data - # specification](https://support.google.com/merchants/answer/3061342) - # @!attribute [rw] instore_product_location - # @return [::String] - # Location of the product inside the store. Maximum length is 20 bytes. - # @!attribute [rw] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # A list of custom (merchant-provided) attributes. You can also use - # `CustomAttribute` to submit any attribute of the data specification in its - # generic form. - class LocalInventory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListLocalInventories` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The `name` of the parent product to list local inventories for. - # Format: - # `accounts/{account}/products/{product}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of `LocalInventory` resources for the given - # product to return. The service returns fewer than this value if the number - # of inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 25000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListLocalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListLocalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - class ListLocalInventoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListLocalInventories` method. - # @!attribute [rw] local_inventories - # @return [::Array<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] - # The `LocalInventory` resources for the given product from the specified - # account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `pageToken` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListLocalInventoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertLocalInventory` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @!attribute [rw] local_inventory - # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] - # Required. Local inventory information of the product. If the product - # already has a `LocalInventory` resource for the same `storeCode`, full - # replacement of the `LocalInventory` resource is performed. - class InsertLocalInventoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteLocalInventory` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the local inventory for the given product to delete. - # Format: - # `accounts/{account}/products/{product}/localInventories/{store_code}` - class DeleteLocalInventoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb deleted file mode 100644 index 2805f45ead59..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - # Regional inventory information for the product. Represents specific - # information like price and availability for a given product in a specific - # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory#region `region`}. - # For a list of all accepted attribute values, see the [regional product - # inventory data - # specification](https://support.google.com/merchants/answer/9698880). - # @!attribute [r] name - # @return [::String] - # Output only. The name of the `RegionalInventory` resource. - # Format: - # `{regional_inventory.name=accounts/{account}/products/{product}/regionalInventories/{region}` - # @!attribute [r] account - # @return [::Integer] - # Output only. The account that owns the product. This field will be ignored - # if set by the client. - # @!attribute [rw] region - # @return [::String] - # Required. Immutable. ID of the region for this - # `RegionalInventory` resource. See the [Regional availability and - # pricing](https://support.google.com/merchants/answer/9698880) for more - # details. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Price of the product in this region. - # @!attribute [rw] sale_price - # @return [::Google::Shopping::Type::Price] - # Sale price of the product in this region. Mandatory if - # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory#sale_price_effective_date `salePriceEffectiveDate`} - # is defined. - # @!attribute [rw] sale_price_effective_date - # @return [::Google::Type::Interval] - # The `TimePeriod` of the - # sale price in this region. - # @!attribute [rw] availability - # @return [::String] - # Availability of the product in this region. - # For accepted attribute values, see the [regional product inventory data - # specification](https://support.google.com/merchants/answer/3061342) - # @!attribute [rw] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # A list of custom (merchant-provided) attributes. You can also use - # `CustomAttribute` to submit any attribute of the data specification in its - # generic form. - class RegionalInventory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListRegionalInventories` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The `name` of the parent product to list `RegionalInventory` - # resources for. Format: `accounts/{account}/products/{product}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of `RegionalInventory` resources for the given product - # to return. The service returns fewer than this value if the number of - # inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 100000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListRegionalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegionalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - class ListRegionalInventoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListRegionalInventories` method. - # @!attribute [rw] regional_inventories - # @return [::Array<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] - # The `RegionalInventory` resources for the given product from the specified - # account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `pageToken` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRegionalInventoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertRegionalInventory` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @!attribute [rw] regional_inventory - # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] - # Required. Regional inventory information to add to the product. If the - # product already has a `RegionalInventory` resource for the same `region`, - # full replacement of the `RegionalInventory` resource is performed. - class InsertRegionalInventoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteRegionalInventory` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `RegionalInventory` resource to delete. - # Format: - # `accounts/{account}/products/{product}/regionalInventories/{region}` - class DeleteRegionalInventoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.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! - - -module Google - module Shopping - module Type - # The weight represented as the value in string and the unit. - # @!attribute [rw] amount_micros - # @return [::Integer] - # Required. The weight represented as a number in micros (1 million micros is - # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 - # micros). - # This field can also be set as infinity by setting to -1. - # This field only support -1 and positive value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Type::Weight::WeightUnit] - # Required. The weight unit. - # Acceptable values are: kg and lb - class Weight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The weight unit. - module WeightUnit - # unit unspecified - WEIGHT_UNIT_UNSPECIFIED = 0 - - # lb unit. - POUND = 1 - - # kg unit. - KILOGRAM = 2 - end - end - - # The price represented as a number and currency. - # @!attribute [rw] amount_micros - # @return [::Integer] - # The price represented as a number in micros (1 million micros is an - # equivalent to one's currency standard unit, for example, 1 USD = 1000000 - # micros). - # @!attribute [rw] currency_code - # @return [::String] - # The currency of the price using three-letter acronyms according to [ISO - # 4217](http://en.wikipedia.org/wiki/ISO_4217). - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents custom attributes. Exactly one of `value` or - # `group_values` must not be empty. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute. - # @!attribute [rw] value - # @return [::String] - # The value of the attribute. If `value` is not empty, `group_values` must be - # empty. - # @!attribute [rw] group_values - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Subattributes within this attribute group. If - # `group_values` is not empty, `value` must be empty. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations available for a product. - # - # Destinations are used in Merchant Center to allow you to control where the - # products from your data feed should be displayed. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Destination values. - module DestinationEnum - # Not specified. - DESTINATION_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/google-ads/answer/2454022). - SHOPPING_ADS = 1 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 2 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3057972). - LOCAL_INVENTORY_ADS = 3 - - # [Free listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 4 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 5 - - # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). - YOUTUBE_SHOPPING = 6 - - # Youtube shopping checkout. - YOUTUBE_SHOPPING_CHECKOUT = 7 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 8 - - # [Free vehicle - # listings](https://support.google.com/merchants/answer/11189169). - FREE_VEHICLE_LISTINGS = 9 - - # [Vehicle ads](https://support.google.com/merchants/answer/11189169). - VEHICLE_ADS = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - end - end - - # Reporting contexts that your account and product issues apply to. - # - # Reporting contexts are groups of surfaces and formats for product results on - # Google. They can represent the entire destination (for example, [Shopping - # ads](https://support.google.com/merchants/answer/6149970)) or a subset of - # formats within a destination (for example, [Demand Gen - # ads](https://support.google.com/merchants/answer/13389785)). - class ReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reporting context values. - module ReportingContextEnum - # Not specified. - REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/merchants/answer/6149970). - SHOPPING_ADS = 1 - - # Deprecated: Use `DEMAND_GEN_ADS` instead. - # [Discovery and Demand Gen - # ads](https://support.google.com/merchants/answer/13389785). - DISCOVERY_ADS = 2 - - # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS = 13 - - # [Demand Gen ads on Discover - # surface](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 - - # [Video ads](https://support.google.com/google-ads/answer/6340491). - VIDEO_ADS = 3 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 4 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3271956). - LOCAL_INVENTORY_ADS = 5 - - # [Vehicle inventory - # ads](https://support.google.com/merchants/answer/11544533). - VEHICLE_INVENTORY_ADS = 6 - - # [Free product - # listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 7 - - # [Free product listings on UCP - # checkout](https://developers.google.com/merchant/ucp). - FREE_LISTINGS_UCP_CHECKOUT = 19 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 8 - - # [Free local vehicle - # listings](https://support.google.com/merchants/answer/11544533). - FREE_LOCAL_VEHICLE_LISTINGS = 9 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 18 - - # [YouTube - # Shopping](https://support.google.com/merchants/answer/13478370). - YOUTUBE_SHOPPING = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - - # [Product - # Reviews](https://support.google.com/merchants/answer/14620732). - PRODUCT_REVIEWS = 15 - - # [Merchant - # Reviews](https://developers.google.com/merchant-review-feeds). - MERCHANT_REVIEWS = 16 - - # YouTube Checkout - # . - YOUTUBE_CHECKOUT = 17 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb deleted file mode 100644 index 9350ca479005..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a time interval, encoded as a Timestamp start (inclusive) and a - # Timestamp end (exclusive). - # - # The start must be less than or equal to the end. - # When the start equals the end, the interval is empty (matches no time). - # When both start and end are unspecified, the interval matches any time. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Inclusive start of the interval. - # - # If specified, a Timestamp matching this interval will have to be the same - # or after the start. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Exclusive end of the interval. - # - # If specified, a Timestamp matching this interval will have to be before the - # end. - class Interval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/Gemfile deleted file mode 100644 index 9ce4a0148204..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-inventories-v1beta", path: "../" -else - gem "google-shopping-merchant-inventories-v1beta" -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-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb deleted file mode 100644 index e7b122806611..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LocalInventoryService_DeleteLocalInventory_sync] -require "google/shopping/merchant/inventories/v1beta" - -## -# Snippet for the delete_local_inventory call in the LocalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#delete_local_inventory. -# -def delete_local_inventory - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new - - # Call the delete_local_inventory method. - result = client.delete_local_inventory request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_LocalInventoryService_DeleteLocalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb deleted file mode 100644 index 3a5429e00076..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LocalInventoryService_InsertLocalInventory_sync] -require "google/shopping/merchant/inventories/v1beta" - -## -# Snippet for the insert_local_inventory call in the LocalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#insert_local_inventory. -# -def insert_local_inventory - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new - - # Call the insert_local_inventory method. - result = client.insert_local_inventory request - - # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. - p result -end -# [END merchantapi_v1beta_generated_LocalInventoryService_InsertLocalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb deleted file mode 100644 index 9601f90a357d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.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 merchantapi_v1beta_generated_LocalInventoryService_ListLocalInventories_sync] -require "google/shopping/merchant/inventories/v1beta" - -## -# Snippet for the list_local_inventories call in the LocalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#list_local_inventories. -# -def list_local_inventories - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new - - # Call the list_local_inventories method. - result = client.list_local_inventories request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. - p item - end -end -# [END merchantapi_v1beta_generated_LocalInventoryService_ListLocalInventories_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb deleted file mode 100644 index 32b256d4226d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionalInventoryService_DeleteRegionalInventory_sync] -require "google/shopping/merchant/inventories/v1beta" - -## -# Snippet for the delete_regional_inventory call in the RegionalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#delete_regional_inventory. -# -def delete_regional_inventory - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new - - # Call the delete_regional_inventory method. - result = client.delete_regional_inventory request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_RegionalInventoryService_DeleteRegionalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb deleted file mode 100644 index 4b16a1a36f11..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionalInventoryService_InsertRegionalInventory_sync] -require "google/shopping/merchant/inventories/v1beta" - -## -# Snippet for the insert_regional_inventory call in the RegionalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#insert_regional_inventory. -# -def insert_regional_inventory - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new - - # Call the insert_regional_inventory method. - result = client.insert_regional_inventory request - - # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. - p result -end -# [END merchantapi_v1beta_generated_RegionalInventoryService_InsertRegionalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb deleted file mode 100644 index 3dee934a1f78..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.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 merchantapi_v1beta_generated_RegionalInventoryService_ListRegionalInventories_sync] -require "google/shopping/merchant/inventories/v1beta" - -## -# Snippet for the list_regional_inventories call in the RegionalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#list_regional_inventories. -# -def list_regional_inventories - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new - - # Call the list_regional_inventories method. - result = client.list_regional_inventories request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. - p item - end -end -# [END merchantapi_v1beta_generated_RegionalInventoryService_ListRegionalInventories_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/snippet_metadata_google.shopping.merchant.inventories.v1beta.json b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/snippet_metadata_google.shopping.merchant.inventories.v1beta.json deleted file mode 100644 index 01d13ac306c5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/snippet_metadata_google.shopping.merchant.inventories.v1beta.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-inventories-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.inventories.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_LocalInventoryService_ListLocalInventories_sync", - "title": "Snippet for the list_local_inventories call in the LocalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#list_local_inventories.", - "file": "local_inventory_service/list_local_inventories.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_local_inventories", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#list_local_inventories", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse", - "client": { - "short_name": "LocalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client" - }, - "method": { - "short_name": "ListLocalInventories", - "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService.ListLocalInventories", - "service": { - "short_name": "LocalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LocalInventoryService_InsertLocalInventory_sync", - "title": "Snippet for the insert_local_inventory call in the LocalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#insert_local_inventory.", - "file": "local_inventory_service/insert_local_inventory.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_local_inventory", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#insert_local_inventory", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory", - "client": { - "short_name": "LocalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client" - }, - "method": { - "short_name": "InsertLocalInventory", - "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService.InsertLocalInventory", - "service": { - "short_name": "LocalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LocalInventoryService_DeleteLocalInventory_sync", - "title": "Snippet for the delete_local_inventory call in the LocalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#delete_local_inventory.", - "file": "local_inventory_service/delete_local_inventory.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_local_inventory", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#delete_local_inventory", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "LocalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client" - }, - "method": { - "short_name": "DeleteLocalInventory", - "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService.DeleteLocalInventory", - "service": { - "short_name": "LocalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionalInventoryService_ListRegionalInventories_sync", - "title": "Snippet for the list_regional_inventories call in the RegionalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#list_regional_inventories.", - "file": "regional_inventory_service/list_regional_inventories.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_regional_inventories", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#list_regional_inventories", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse", - "client": { - "short_name": "RegionalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client" - }, - "method": { - "short_name": "ListRegionalInventories", - "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService.ListRegionalInventories", - "service": { - "short_name": "RegionalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionalInventoryService_InsertRegionalInventory_sync", - "title": "Snippet for the insert_regional_inventory call in the RegionalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#insert_regional_inventory.", - "file": "regional_inventory_service/insert_regional_inventory.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_regional_inventory", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#insert_regional_inventory", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory", - "client": { - "short_name": "RegionalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client" - }, - "method": { - "short_name": "InsertRegionalInventory", - "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService.InsertRegionalInventory", - "service": { - "short_name": "RegionalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionalInventoryService_DeleteRegionalInventory_sync", - "title": "Snippet for the delete_regional_inventory call in the RegionalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#delete_regional_inventory.", - "file": "regional_inventory_service/delete_regional_inventory.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_regional_inventory", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#delete_regional_inventory", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "RegionalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client" - }, - "method": { - "short_name": "DeleteRegionalInventory", - "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService.DeleteRegionalInventory", - "service": { - "short_name": "RegionalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService" - } - } - }, - "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-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb deleted file mode 100644 index 3f4c12db7010..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_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/shopping/merchant/inventories/v1beta/local_inventory_service" - -class ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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_local_inventory_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.local_inventory_path account: "value0", product: "value1", store_code: "value2" - assert_equal "accounts/value0/products/value1/localInventories/value2", 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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_path account: "value0", product: "value1" - assert_equal "accounts/value0/products/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb deleted file mode 100644 index 0639195f339f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb +++ /dev/null @@ -1,264 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/inventories/v1beta/localinventory_pb" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" - - -class ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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_local_inventories - # Create test objects. - client_result = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse.new - http_response = OpenStruct.new 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_local_inventories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ServiceStub.stub :transcode_list_local_inventories_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_local_inventories_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_local_inventories({ 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_local_inventories 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_local_inventories ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.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_local_inventories({ 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_local_inventories(::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.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_local_inventories_client_stub.call_count - end - end - end - - def test_insert_local_inventory - # Create test objects. - client_result = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - local_inventory = {} - - insert_local_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ServiceStub.stub :transcode_insert_local_inventory_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_local_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_local_inventory parent: parent, local_inventory: local_inventory do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_local_inventory ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_local_inventory(::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_local_inventory_client_stub.call_count - end - end - end - - def test_delete_local_inventory - # 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_local_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ServiceStub.stub :transcode_delete_local_inventory_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_local_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_local_inventory({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_local_inventory name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_local_inventory ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_local_inventory({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_local_inventory(::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_local_inventory_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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb deleted file mode 100644 index 72d4dfaebd38..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb +++ /dev/null @@ -1,289 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/inventories/v1beta/localinventory_pb" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service" - -class ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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_local_inventories - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_local_inventories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_local_inventories, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest, 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_local_inventories_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_local_inventories({ 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_local_inventories 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_local_inventories ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.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_local_inventories({ 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_local_inventories(::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.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_local_inventories_client_stub.call_rpc_count - end - end - - def test_insert_local_inventory - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - local_inventory = {} - - insert_local_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_local_inventory, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory), request["local_inventory"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_local_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_local_inventory parent: parent, local_inventory: local_inventory do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_local_inventory ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_local_inventory(::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_local_inventory_client_stub.call_rpc_count - end - end - - def test_delete_local_inventory - # 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_local_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_local_inventory, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_local_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_local_inventory({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_local_inventory name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_local_inventory ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_local_inventory({ 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_local_inventory(::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new(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_local_inventory_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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::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::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb deleted file mode 100644 index 61b5b82c9f55..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_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/shopping/merchant/inventories/v1beta/regional_inventory_service" - -class ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_path account: "value0", product: "value1" - assert_equal "accounts/value0/products/value1", path - end - end - - def test_regional_inventory_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.regional_inventory_path account: "value0", product: "value1", region: "value2" - assert_equal "accounts/value0/products/value1/regionalInventories/value2", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb deleted file mode 100644 index c2134ab529a9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb +++ /dev/null @@ -1,264 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" - - -class ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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_regional_inventories - # Create test objects. - client_result = ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse.new - http_response = OpenStruct.new 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_regional_inventories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ServiceStub.stub :transcode_list_regional_inventories_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_regional_inventories_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_regional_inventories({ 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_regional_inventories 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_regional_inventories ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.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_regional_inventories({ 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_regional_inventories(::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.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_regional_inventories_client_stub.call_count - end - end - end - - def test_insert_regional_inventory - # Create test objects. - client_result = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - regional_inventory = {} - - insert_regional_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ServiceStub.stub :transcode_insert_regional_inventory_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_regional_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_regional_inventory ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_regional_inventory(::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_regional_inventory_client_stub.call_count - end - end - end - - def test_delete_regional_inventory - # 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_regional_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ServiceStub.stub :transcode_delete_regional_inventory_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_regional_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_regional_inventory({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_regional_inventory name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_regional_inventory ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_regional_inventory({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_regional_inventory(::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_regional_inventory_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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb deleted file mode 100644 index 45daeee675cf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb +++ /dev/null @@ -1,289 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service" - -class ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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_regional_inventories - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_regional_inventories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_regional_inventories, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, 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_regional_inventories_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_regional_inventories({ 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_regional_inventories 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_regional_inventories ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.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_regional_inventories({ 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_regional_inventories(::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.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_regional_inventories_client_stub.call_rpc_count - end - end - - def test_insert_regional_inventory - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - regional_inventory = {} - - insert_regional_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_regional_inventory, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory), request["regional_inventory"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_regional_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_regional_inventory ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_regional_inventory(::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_regional_inventory_client_stub.call_rpc_count - end - end - - def test_delete_regional_inventory - # 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_regional_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_regional_inventory, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_regional_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_regional_inventory({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_regional_inventory name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_regional_inventory ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_regional_inventory({ 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_regional_inventory(::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new(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_regional_inventory_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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::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::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/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-shopping-merchant-issue_resolution-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.repo-metadata.json deleted file mode 100644 index da9940c8e517..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1", - "distribution_name": "google-shopping-merchant-issue_resolution-v1", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1 API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-issue_resolution-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-issue_resolution instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.rubocop.yml deleted file mode 100644 index a2db5e5debad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.yardopts deleted file mode 100644 index dc7bbc10ae29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant 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-shopping-merchant-issue_resolution-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/AUTHENTICATION.md deleted file mode 100644 index 749157ece9a1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-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/shopping/merchant/issue_resolution/v1" - -client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/issue_resolution/v1" - -::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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-shopping-merchant-issue_resolution-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/shopping/merchant/issue_resolution/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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-shopping-merchant-issue_resolution-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/README.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/README.md deleted file mode 100644 index 5bd7d1dc69b9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Merchant V1 API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1 API. Most users should consider using -the main client gem, -[google-shopping-merchant-issue_resolution](https://rubygems.org/gems/google-shopping-merchant-issue_resolution). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-issue_resolution-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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/issue_resolution/v1" - -client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new -request = ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new # (request fields as keyword arguments...) -response = client.list_aggregate_product_statuses request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/issue_resolution/v1" -require "logger" - -client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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-shopping-merchant-issue_resolution`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution`. -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-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/Rakefile deleted file mode 100644 index c643d0d27ffe..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-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/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials" - ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-issue_resolution-v1" - header "google-shopping-merchant-issue_resolution-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-issue_resolution-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/gapic_metadata.json deleted file mode 100644 index 8437b573864b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-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.shopping.merchant.issueresolution.v1", - "libraryPackage": "::Google::Shopping::Merchant::IssueResolution::V1", - "services": { - "AggregateProductStatusesService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client", - "rpcs": { - "ListAggregateProductStatuses": { - "methods": [ - "list_aggregate_product_statuses" - ] - } - } - } - } - }, - "IssueResolutionService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client", - "rpcs": { - "RenderAccountIssues": { - "methods": [ - "render_account_issues" - ] - }, - "RenderProductIssues": { - "methods": [ - "render_product_issues" - ] - }, - "TriggerAction": { - "methods": [ - "trigger_action" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/google-shopping-merchant-issue_resolution-v1.gemspec b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/google-shopping-merchant-issue_resolution-v1.gemspec deleted file mode 100644 index e0a1b2a64d82..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/google-shopping-merchant-issue_resolution-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/issue_resolution/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-issue_resolution-v1" - gem.version = Google::Shopping::Merchant::IssueResolution::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-issue_resolution-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-issue_resolution instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center Accounts." - 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-shopping-type", "~> 1.0" -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google-shopping-merchant-issue_resolution-v1.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google-shopping-merchant-issue_resolution-v1.rb deleted file mode 100644 index 6e64c6764bf8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google-shopping-merchant-issue_resolution-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/shopping/merchant/issue_resolution/v1" diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1.rb deleted file mode 100644 index 1171cdfc1154..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1.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 "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service" -require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service" -require "google/shopping/merchant/issue_resolution/v1/version" - -module Google - module Shopping - module Merchant - module IssueResolution - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/issue_resolution/v1" - # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/issue_resolution/v1" - # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/merchant/issue_resolution/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service.rb deleted file mode 100644 index 4d09bb58c2b1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/issue_resolution/v1/version" - -require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials" -require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths" -require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/client" -require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1 - ## - # Service to manage aggregate product statuses. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service" - # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest" - # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new - # - module AggregateProductStatusesService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "aggregate_product_statuses_service", "helpers.rb" -require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/client.rb deleted file mode 100644 index 1f8fcff62871..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/client.rb +++ /dev/null @@ -1,508 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1 - module AggregateProductStatusesService - ## - # Client for the AggregateProductStatusesService service. - # - # Service to manage aggregate product statuses. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :aggregate_product_statuses_service_stub - - ## - # Configure the AggregateProductStatusesService Client class. - # - # See {::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AggregateProductStatusesService clients - # ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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", "Shopping", "Merchant", "IssueResolution", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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 - @aggregate_product_statuses_service_stub.universe_domain - end - - ## - # Create a new AggregateProductStatusesService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AggregateProductStatusesService 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/shopping/merchant/issueresolution/v1/aggregateproductstatuses_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 - - @aggregate_product_statuses_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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 - ) - - @aggregate_product_statuses_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 - @aggregate_product_statuses_service_stub.logger - end - - # Service calls - - ## - # Lists the `AggregateProductStatuses` resources for your merchant account. - # The response might contain fewer items than specified by `pageSize`. - # If `pageToken` was returned in previous request, it can be used to obtain - # additional results. - # - # @overload list_aggregate_product_statuses(request, options = nil) - # Pass arguments to `list_aggregate_product_statuses` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_aggregate_product_statuses(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_aggregate_product_statuses` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list aggregate product statuses for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of aggregate product statuses to return. The - # service may return fewer than this value. If unspecified, at most 25 - # aggregate product statuses are returned. The maximum value is 250; values - # above 250 are coerced to 250. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListAggregateProductStatuses` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAggregateProductStatuses` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. A filter expression that filters the aggregate product statuses. - # Filtering is only supported by the `reporting_context` and `country` field. - # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new - # - # # Call the list_aggregate_product_statuses method. - # result = client.list_aggregate_product_statuses request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus. - # p item - # end - # - def list_aggregate_product_statuses request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_aggregate_product_statuses.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_aggregate_product_statuses.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_aggregate_product_statuses.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aggregate_product_statuses_service_stub.call_rpc :list_aggregate_product_statuses, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @aggregate_product_statuses_service_stub, :list_aggregate_product_statuses, 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 AggregateProductStatusesService API. - # - # This class represents the configuration for AggregateProductStatusesService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_aggregate_product_statuses to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AggregateProductStatusesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_aggregate_product_statuses` - # @return [::Gapic::Config::Method] - # - attr_reader :list_aggregate_product_statuses - - # @private - def initialize parent_rpcs = nil - list_aggregate_product_statuses_config = parent_rpcs.list_aggregate_product_statuses if parent_rpcs.respond_to? :list_aggregate_product_statuses - @list_aggregate_product_statuses = ::Gapic::Config::Method.new list_aggregate_product_statuses_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials.rb deleted file mode 100644 index 72927c4b88ee..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_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 Shopping - module Merchant - module IssueResolution - module V1 - module AggregateProductStatusesService - # Credentials for the AggregateProductStatusesService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths.rb deleted file mode 100644 index 7840573c7d65..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths.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 Shopping - module Merchant - module IssueResolution - module V1 - module AggregateProductStatusesService - # Path helper methods for the AggregateProductStatusesService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest.rb deleted file mode 100644 index f9859d78a59f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_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/shopping/merchant/issue_resolution/v1/version" - -require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials" -require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths" -require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1 - ## - # Service to manage aggregate product statuses. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest" - # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new - # - module AggregateProductStatusesService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client.rb deleted file mode 100644 index 935c498c540d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client.rb +++ /dev/null @@ -1,458 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb" -require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1 - module AggregateProductStatusesService - module Rest - ## - # REST client for the AggregateProductStatusesService service. - # - # Service to manage aggregate product statuses. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :aggregate_product_statuses_service_stub - - ## - # Configure the AggregateProductStatusesService Client class. - # - # See {::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AggregateProductStatusesService clients - # ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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", "Shopping", "Merchant", "IssueResolution", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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 - @aggregate_product_statuses_service_stub.universe_domain - end - - ## - # Create a new AggregateProductStatusesService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AggregateProductStatusesService 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 - - @aggregate_product_statuses_service_stub = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @aggregate_product_statuses_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 - @aggregate_product_statuses_service_stub.logger - end - - # Service calls - - ## - # Lists the `AggregateProductStatuses` resources for your merchant account. - # The response might contain fewer items than specified by `pageSize`. - # If `pageToken` was returned in previous request, it can be used to obtain - # additional results. - # - # @overload list_aggregate_product_statuses(request, options = nil) - # Pass arguments to `list_aggregate_product_statuses` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_aggregate_product_statuses(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_aggregate_product_statuses` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list aggregate product statuses for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of aggregate product statuses to return. The - # service may return fewer than this value. If unspecified, at most 25 - # aggregate product statuses are returned. The maximum value is 250; values - # above 250 are coerced to 250. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListAggregateProductStatuses` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAggregateProductStatuses` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. A filter expression that filters the aggregate product statuses. - # Filtering is only supported by the `reporting_context` and `country` field. - # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new - # - # # Call the list_aggregate_product_statuses method. - # result = client.list_aggregate_product_statuses request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus. - # p item - # end - # - def list_aggregate_product_statuses request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_aggregate_product_statuses.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_aggregate_product_statuses.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_aggregate_product_statuses.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aggregate_product_statuses_service_stub.list_aggregate_product_statuses request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @aggregate_product_statuses_service_stub, :list_aggregate_product_statuses, "aggregate_product_statuses", request, result, 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 AggregateProductStatusesService REST API. - # - # This class represents the configuration for AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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_aggregate_product_statuses to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AggregateProductStatusesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_aggregate_product_statuses` - # @return [::Gapic::Config::Method] - # - attr_reader :list_aggregate_product_statuses - - # @private - def initialize parent_rpcs = nil - list_aggregate_product_statuses_config = parent_rpcs.list_aggregate_product_statuses if parent_rpcs.respond_to? :list_aggregate_product_statuses - @list_aggregate_product_statuses = ::Gapic::Config::Method.new list_aggregate_product_statuses_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub.rb deleted file mode 100644 index ea1f2e7ec08d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub.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! - -require "google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1 - module AggregateProductStatusesService - module Rest - ## - # REST service stub for the AggregateProductStatusesService 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_aggregate_product_statuses REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse] - # A result object deserialized from the server's reply - def list_aggregate_product_statuses request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_aggregate_product_statuses_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_aggregate_product_statuses", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse.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_aggregate_product_statuses REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_aggregate_product_statuses_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/issueresolution/v1/{parent}/aggregateProductStatuses", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service.rb deleted file mode 100644 index 6436c50a147c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_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/shopping/merchant/issue_resolution/v1/version" - -require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials" -require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths" -require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client" -require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1 - ## - # Service to provide an issue resolution content for account issues and product - # issues. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service" - # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest" - # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new - # - module IssueResolutionService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "issue_resolution_service", "helpers.rb" -require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client.rb deleted file mode 100644 index 685bc2aaff8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client.rb +++ /dev/null @@ -1,709 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/issueresolution/v1/issueresolution_pb" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1 - module IssueResolutionService - ## - # Client for the IssueResolutionService service. - # - # Service to provide an issue resolution content for account issues and product - # issues. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :issue_resolution_service_stub - - ## - # Configure the IssueResolutionService Client class. - # - # See {::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all IssueResolutionService clients - # ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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", "Shopping", "Merchant", "IssueResolution", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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 - @issue_resolution_service_stub.universe_domain - end - - ## - # Create a new IssueResolutionService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the IssueResolutionService 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/shopping/merchant/issueresolution/v1/issueresolution_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 - - @issue_resolution_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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 - ) - - @issue_resolution_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 - @issue_resolution_service_stub.logger - end - - # Service calls - - ## - # Provide a list of business's account issues with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - # - # @overload render_account_issues(request, options = nil) - # Pass arguments to `render_account_issues` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload render_account_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) - # Pass arguments to `render_account_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The account to fetch issues for. - # Format: `accounts/{account}` - # @param language_code [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize issue resolution content. If not set, the result will - # be in default language `en-US`. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload, ::Hash] - # Optional. The payload for configuring how the content should be rendered. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new - # - # # Call the render_account_issues method. - # result = client.render_account_issues request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse. - # p result - # - def render_account_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.render_account_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.render_account_issues.timeout, - metadata: metadata, - retry_policy: @config.rpcs.render_account_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.call_rpc :render_account_issues, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Provide a list of issues for business's product with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - # - # @overload render_product_issues(request, options = nil) - # Pass arguments to `render_product_issues` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload render_product_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) - # Pass arguments to `render_product_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the product to fetch issues for. - # Format: `accounts/{account}/products/{product}` - # @param language_code [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize an issue resolution content. If not set, the result - # will be in default language `en-US`. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload, ::Hash] - # Optional. The payload for configuring how the content should be rendered. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new - # - # # Call the render_product_issues method. - # result = client.render_product_issues request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse. - # p result - # - def render_product_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.render_product_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.render_product_issues.timeout, - metadata: metadata, - retry_policy: @config.rpcs.render_product_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.call_rpc :render_product_issues, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Start an action. The action can be requested by a business in - # third-party application. Before the business can request the action, the - # third-party application needs to show them action specific content and - # display a user input form. - # - # The action can be successfully started only once all `required` inputs are - # provided. If any `required` input is missing, or invalid value was - # provided, the service will return 400 error. Validation errors will contain - # {::Google::Shopping::Merchant::IssueResolution::V1::InputField#id Ids} for all - # problematic field together with translated, human readable error messages - # that can be shown to the user. - # - # @overload trigger_action(request, options = nil) - # Pass arguments to `trigger_action` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload trigger_action(name: nil, payload: nil, language_code: nil) - # Pass arguments to `trigger_action` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The business's account that is triggering the action. - # Format: `accounts/{account}` - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionPayload, ::Hash] - # Required. The payload for the triggered action. - # @param language_code [::String] - # Optional. Language code [IETF BCP 47 - # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. - # If not set, the result will be in default language `en-US`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new - # - # # Call the trigger_action method. - # result = client.trigger_action request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse. - # p result - # - def trigger_action request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.trigger_action.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.trigger_action.timeout, - metadata: metadata, - retry_policy: @config.rpcs.trigger_action.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.call_rpc :trigger_action, request, 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 IssueResolutionService API. - # - # This class represents the configuration for IssueResolutionService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # render_account_issues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.render_account_issues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.render_account_issues.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 IssueResolutionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `render_account_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :render_account_issues - ## - # RPC-specific configuration for `render_product_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :render_product_issues - ## - # RPC-specific configuration for `trigger_action` - # @return [::Gapic::Config::Method] - # - attr_reader :trigger_action - - # @private - def initialize parent_rpcs = nil - render_account_issues_config = parent_rpcs.render_account_issues if parent_rpcs.respond_to? :render_account_issues - @render_account_issues = ::Gapic::Config::Method.new render_account_issues_config - render_product_issues_config = parent_rpcs.render_product_issues if parent_rpcs.respond_to? :render_product_issues - @render_product_issues = ::Gapic::Config::Method.new render_product_issues_config - trigger_action_config = parent_rpcs.trigger_action if parent_rpcs.respond_to? :trigger_action - @trigger_action = ::Gapic::Config::Method.new trigger_action_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials.rb deleted file mode 100644 index 00199565274d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_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 Shopping - module Merchant - module IssueResolution - module V1 - module IssueResolutionService - # Credentials for the IssueResolutionService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths.rb deleted file mode 100644 index 462d12b4c502..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_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 Shopping - module Merchant - module IssueResolution - module V1 - module IssueResolutionService - # Path helper methods for the IssueResolutionService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified Product resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/products/{product}` - # - # @param account [String] - # @param product [String] - # - # @return [::String] - def product_path account:, product: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/products/#{product}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest.rb deleted file mode 100644 index ba565d275821..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_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/shopping/merchant/issue_resolution/v1/version" - -require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials" -require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths" -require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1 - ## - # Service to provide an issue resolution content for account issues and product - # issues. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest" - # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new - # - module IssueResolutionService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client.rb deleted file mode 100644 index ef2e4a8a47de..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client.rb +++ /dev/null @@ -1,645 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/issueresolution/v1/issueresolution_pb" -require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1 - module IssueResolutionService - module Rest - ## - # REST client for the IssueResolutionService service. - # - # Service to provide an issue resolution content for account issues and product - # issues. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :issue_resolution_service_stub - - ## - # Configure the IssueResolutionService Client class. - # - # See {::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all IssueResolutionService clients - # ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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", "Shopping", "Merchant", "IssueResolution", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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 - @issue_resolution_service_stub.universe_domain - end - - ## - # Create a new IssueResolutionService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the IssueResolutionService 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 - - @issue_resolution_service_stub = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @issue_resolution_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 - @issue_resolution_service_stub.logger - end - - # Service calls - - ## - # Provide a list of business's account issues with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - # - # @overload render_account_issues(request, options = nil) - # Pass arguments to `render_account_issues` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload render_account_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) - # Pass arguments to `render_account_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The account to fetch issues for. - # Format: `accounts/{account}` - # @param language_code [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize issue resolution content. If not set, the result will - # be in default language `en-US`. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload, ::Hash] - # Optional. The payload for configuring how the content should be rendered. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new - # - # # Call the render_account_issues method. - # result = client.render_account_issues request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse. - # p result - # - def render_account_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.render_account_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.render_account_issues.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.render_account_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.render_account_issues request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Provide a list of issues for business's product with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - # - # @overload render_product_issues(request, options = nil) - # Pass arguments to `render_product_issues` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload render_product_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) - # Pass arguments to `render_product_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the product to fetch issues for. - # Format: `accounts/{account}/products/{product}` - # @param language_code [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize an issue resolution content. If not set, the result - # will be in default language `en-US`. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload, ::Hash] - # Optional. The payload for configuring how the content should be rendered. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new - # - # # Call the render_product_issues method. - # result = client.render_product_issues request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse. - # p result - # - def render_product_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.render_product_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.render_product_issues.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.render_product_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.render_product_issues request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Start an action. The action can be requested by a business in - # third-party application. Before the business can request the action, the - # third-party application needs to show them action specific content and - # display a user input form. - # - # The action can be successfully started only once all `required` inputs are - # provided. If any `required` input is missing, or invalid value was - # provided, the service will return 400 error. Validation errors will contain - # {::Google::Shopping::Merchant::IssueResolution::V1::InputField#id Ids} for all - # problematic field together with translated, human readable error messages - # that can be shown to the user. - # - # @overload trigger_action(request, options = nil) - # Pass arguments to `trigger_action` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload trigger_action(name: nil, payload: nil, language_code: nil) - # Pass arguments to `trigger_action` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The business's account that is triggering the action. - # Format: `accounts/{account}` - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionPayload, ::Hash] - # Required. The payload for the triggered action. - # @param language_code [::String] - # Optional. Language code [IETF BCP 47 - # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. - # If not set, the result will be in default language `en-US`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new - # - # # Call the trigger_action method. - # result = client.trigger_action request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse. - # p result - # - def trigger_action request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.trigger_action.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.trigger_action.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.trigger_action.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.trigger_action request, 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 IssueResolutionService REST API. - # - # This class represents the configuration for IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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 - # # render_account_issues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.render_account_issues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.render_account_issues.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 IssueResolutionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `render_account_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :render_account_issues - ## - # RPC-specific configuration for `render_product_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :render_product_issues - ## - # RPC-specific configuration for `trigger_action` - # @return [::Gapic::Config::Method] - # - attr_reader :trigger_action - - # @private - def initialize parent_rpcs = nil - render_account_issues_config = parent_rpcs.render_account_issues if parent_rpcs.respond_to? :render_account_issues - @render_account_issues = ::Gapic::Config::Method.new render_account_issues_config - render_product_issues_config = parent_rpcs.render_product_issues if parent_rpcs.respond_to? :render_product_issues - @render_product_issues = ::Gapic::Config::Method.new render_product_issues_config - trigger_action_config = parent_rpcs.trigger_action if parent_rpcs.respond_to? :trigger_action - @trigger_action = ::Gapic::Config::Method.new trigger_action_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub.rb deleted file mode 100644 index ddb124d72813..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub.rb +++ /dev/null @@ -1,269 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/issueresolution/v1/issueresolution_pb" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1 - module IssueResolutionService - module Rest - ## - # REST service stub for the IssueResolutionService 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 render_account_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] - # A result object deserialized from the server's reply - def render_account_issues request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_render_account_issues_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "render_account_issues", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the render_product_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] - # A result object deserialized from the server's reply - def render_product_issues request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_render_product_issues_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "render_product_issues", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the trigger_action REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] - # A result object deserialized from the server's reply - def trigger_action request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_trigger_action_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "trigger_action", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse.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 render_account_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_render_account_issues_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/issueresolution/v1/{name}:renderaccountissues", - body: "payload", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the render_product_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_render_product_issues_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/issueresolution/v1/{name}:renderproductissues", - body: "payload", - matches: [ - ["name", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the trigger_action REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_trigger_action_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/issueresolution/v1/{name}:triggeraction", - body: "payload", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/rest.rb deleted file mode 100644 index 32a1931d6ce3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/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/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest" -require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest" -require "google/shopping/merchant/issue_resolution/v1/version" - -module Google - module Shopping - module Merchant - module IssueResolution - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/issue_resolution/v1/rest" - # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb deleted file mode 100644 index f11a90c2d7fd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/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 Shopping - module Merchant - module IssueResolution - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb.rb deleted file mode 100644 index 7ab0fb134ea5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.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/shopping/type/types_pb' - - -descriptor_data = "\nJgoogle/shopping/merchant/issueresolution/v1/aggregateproductstatuses.proto\x12+google.shopping.merchant.issueresolution.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xb6\x01\n#ListAggregateProductStatusesRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31merchantapi.googleapis.com/AggregateProductStatus\x12\x16\n\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\"\xa8\x01\n$ListAggregateProductStatusesResponse\x12g\n\x1a\x61ggregate_product_statuses\x18\x01 \x03(\x0b\x32\x43.google.shopping.merchant.issueresolution.v1.AggregateProductStatus\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x94\t\n\x16\x41ggregateProductStatus\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12V\n\x11reporting_context\x18\x03 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\x12\x0f\n\x07\x63ountry\x18\x04 \x01(\t\x12X\n\x05stats\x18\x05 \x01(\x0b\x32I.google.shopping.merchant.issueresolution.v1.AggregateProductStatus.Stats\x12m\n\x11item_level_issues\x18\x06 \x03(\x0b\x32R.google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue\x1ag\n\x05Stats\x12\x14\n\x0c\x61\x63tive_count\x18\x01 \x01(\x03\x12\x15\n\rpending_count\x18\x02 \x01(\x03\x12\x19\n\x11\x64isapproved_count\x18\x03 \x01(\x03\x12\x16\n\x0e\x65xpiring_count\x18\x04 \x01(\x03\x1a\x97\x04\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12m\n\x08severity\x18\x02 \x01(\x0e\x32[.google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue.Severity\x12q\n\nresolution\x18\x03 \x01(\x0e\x32].google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue.Resolution\x12\x11\n\tattribute\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x07 \x01(\t\x12\x19\n\x11\x64ocumentation_uri\x18\x08 \x01(\t\x12\x15\n\rproduct_count\x18\t \x01(\x03\"T\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0b\n\x07\x44\x45MOTED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03\"U\n\nResolution\x12\x1a\n\x16RESOLUTION_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_ACTION\x10\x01\x12\x16\n\x12PENDING_PROCESSING\x10\x02:\xb1\x01\xea\x41\xad\x01\n1merchantapi.googleapis.com/AggregateProductStatus\x12\x46\x61\x63\x63ounts/{account}/aggregateProductStatuses/{aggregate_product_status}*\x18\x61ggregateProductStatuses2\x16\x61ggregateProductStatus2\x83\x03\n\x1f\x41ggregateProductStatusesService\x12\x96\x02\n\x1cListAggregateProductStatuses\x12P.google.shopping.merchant.issueresolution.v1.ListAggregateProductStatusesRequest\x1aQ.google.shopping.merchant.issueresolution.v1.ListAggregateProductStatusesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/issueresolution/v1/{parent=accounts/*}/aggregateProductStatuses\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xc1\x02\n/com.google.shopping.merchant.issueresolution.v1B\x1d\x41ggregateProductStatusesProtoP\x01Z_cloud.google.com/go/shopping/merchant/issueresolution/apiv1/issueresolutionpb;issueresolutionpb\xaa\x02+Google.Shopping.Merchant.IssueResolution.V1\xca\x02+Google\\Shopping\\Merchant\\IssueResolution\\V1\xea\x02/Google::Shopping::Merchant::IssueResolution::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module IssueResolution - module V1 - ListAggregateProductStatusesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ListAggregateProductStatusesRequest").msgclass - ListAggregateProductStatusesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ListAggregateProductStatusesResponse").msgclass - AggregateProductStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.AggregateProductStatus").msgclass - AggregateProductStatus::Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.AggregateProductStatus.Stats").msgclass - AggregateProductStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue").msgclass - AggregateProductStatus::ItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue.Severity").enummodule - AggregateProductStatus::ItemLevelIssue::Resolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue.Resolution").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_services_pb.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_services_pb.rb deleted file mode 100644 index 8f9d9d4b5389..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.proto for package 'Google.Shopping.Merchant.IssueResolution.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/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb' - -module Google - module Shopping - module Merchant - module IssueResolution - module V1 - module AggregateProductStatusesService - # Service to manage aggregate product statuses. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.issueresolution.v1.AggregateProductStatusesService' - - # Lists the `AggregateProductStatuses` resources for your merchant account. - # The response might contain fewer items than specified by `pageSize`. - # If `pageToken` was returned in previous request, it can be used to obtain - # additional results. - rpc :ListAggregateProductStatuses, ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest, ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_pb.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_pb.rb deleted file mode 100644 index f476fb325571..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/issueresolution/v1/issueresolution.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 = "\nAgoogle/shopping/merchant/issueresolution/v1/issueresolution.proto\x12+google.shopping.merchant.issueresolution.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"r\n\x1bRenderAccountIssuesResponse\x12S\n\x0frendered_issues\x18\x01 \x03(\x0b\x32:.google.shopping.merchant.issueresolution.v1.RenderedIssue\"\xe9\x01\n\x1aRenderAccountIssuesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12]\n\x07payload\x18\x04 \x01(\x0b\x32G.google.shopping.merchant.issueresolution.v1.RenderIssuesRequestPayloadB\x03\xe0\x41\x01\"\xa3\x02\n\x1aRenderIssuesRequestPayload\x12\\\n\x0e\x63ontent_option\x18\x01 \x01(\x0e\x32:.google.shopping.merchant.issueresolution.v1.ContentOptionB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12w\n\x18user_input_action_option\x18\x02 \x01(\x0e\x32K.google.shopping.merchant.issueresolution.v1.UserInputActionRenderingOptionB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x11\n\x0f_content_optionB\x1b\n\x19_user_input_action_option\"r\n\x1bRenderProductIssuesResponse\x12S\n\x0frendered_issues\x18\x01 \x03(\x0b\x32:.google.shopping.merchant.issueresolution.v1.RenderedIssue\"\xe9\x01\n\x1aRenderProductIssuesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Product\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12]\n\x07payload\x18\x04 \x01(\x0b\x32G.google.shopping.merchant.issueresolution.v1.RenderIssuesRequestPayloadB\x03\xe0\x41\x01\"\xad\x02\n\rRenderedIssue\x12\x1d\n\x13prerendered_content\x18\x03 \x01(\tH\x00\x12\x35\n+prerendered_out_of_court_dispute_settlement\x18\x05 \x01(\tH\x01\x12\r\n\x05title\x18\x01 \x01(\t\x12\x43\n\x06impact\x18\x02 \x01(\x0b\x32\x33.google.shopping.merchant.issueresolution.v1.Impact\x12\x44\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x33.google.shopping.merchant.issueresolution.v1.ActionB\t\n\x07\x63ontentB!\n\x1fout_of_court_dispute_settlement\"\xb3\x01\n\x06Impact\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12G\n\x08severity\x18\x02 \x01(\x0e\x32\x35.google.shopping.merchant.issueresolution.v1.Severity\x12J\n\nbreakdowns\x18\x03 \x03(\x0b\x32\x36.google.shopping.merchant.issueresolution.v1.Breakdown\"\x92\x01\n\tBreakdown\x12N\n\x07regions\x18\x01 \x03(\x0b\x32=.google.shopping.merchant.issueresolution.v1.Breakdown.Region\x12\x0f\n\x07\x64\x65tails\x18\x04 \x03(\t\x1a$\n\x06Region\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\xc6\x04\n\x06\x41\x63tion\x12\x61\n\x15\x62uiltin_simple_action\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1.BuiltInSimpleActionH\x00\x12V\n\x0f\x65xternal_action\x18\x03 \x01(\x0b\x32;.google.shopping.merchant.issueresolution.v1.ExternalActionH\x00\x12h\n\x19\x62uiltin_user_input_action\x18\x07 \x01(\x0b\x32\x43.google.shopping.merchant.issueresolution.v1.BuiltInUserInputActionH\x00\x12\x14\n\x0c\x62utton_label\x18\x04 \x01(\t\x12\x14\n\x0cis_available\x18\x05 \x01(\x08\x12K\n\x07reasons\x18\x06 \x03(\x0b\x32:.google.shopping.merchant.issueresolution.v1.Action.Reason\x1a\x93\x01\n\x06Reason\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x13\n\x06\x64\x65tail\x18\x02 \x01(\tH\x00\x88\x01\x01\x12M\n\x06\x61\x63tion\x18\x03 \x01(\x0b\x32\x33.google.shopping.merchant.issueresolution.v1.ActionB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\t\n\x07_detailB\t\n\x07_actionB\x08\n\x06\x61\x63tion\"\x90\x05\n\x13\x42uiltInSimpleAction\x12\x66\n\x04type\x18\x01 \x01(\x0e\x32X.google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction.BuiltInSimpleActionType\x12\x1b\n\x0e\x61ttribute_code\x18\x02 \x01(\tH\x00\x88\x01\x01\x12s\n\x12\x61\x64\x64itional_content\x18\x03 \x01(\x0b\x32R.google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction.AdditionalContentH\x01\x88\x01\x01\x1a\x36\n\x11\x41\x64\x64itionalContent\x12\r\n\x05title\x18\x01 \x01(\t\x12\x12\n\nparagraphs\x18\x02 \x03(\t\"\x9c\x02\n\x17\x42uiltInSimpleActionType\x12+\n\'BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cVERIFY_PHONE\x10\x01\x12\x11\n\rCLAIM_WEBSITE\x10\x02\x12\x10\n\x0c\x41\x44\x44_PRODUCTS\x10\x03\x12\x14\n\x10\x41\x44\x44_CONTACT_INFO\x10\x04\x12\x14\n\x10LINK_ADS_ACCOUNT\x10\x05\x12$\n ADD_BUSINESS_REGISTRATION_NUMBER\x10\x06\x12\x17\n\x13\x45\x44IT_ITEM_ATTRIBUTE\x10\x07\x12\x15\n\x11\x46IX_ACCOUNT_ISSUE\x10\x08\x12\x1b\n\x17SHOW_ADDITIONAL_CONTENT\x10\tB\x11\n\x0f_attribute_codeB\x15\n\x13_additional_content\"x\n\x16\x42uiltInUserInputAction\x12\x16\n\x0e\x61\x63tion_context\x18\x01 \x01(\t\x12\x46\n\x05\x66lows\x18\x03 \x03(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1.ActionFlow\"\xf7\x02\n\nActionFlow\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12G\n\x06inputs\x18\x03 \x03(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1.InputField\x12\x14\n\x0c\x64ialog_title\x18\x04 \x01(\t\x12Y\n\x0e\x64ialog_message\x18\x07 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1.TextWithTooltipH\x00\x88\x01\x01\x12Q\n\x0e\x64ialog_callout\x18\x08 \x01(\x0b\x32\x34.google.shopping.merchant.issueresolution.v1.CalloutH\x01\x88\x01\x01\x12\x1b\n\x13\x64ialog_button_label\x18\t \x01(\tB\x11\n\x0f_dialog_messageB\x11\n\x0f_dialog_callout\"\x92\t\n\nInputField\x12W\n\ntext_input\x18\x04 \x01(\x0b\x32\x41.google.shopping.merchant.issueresolution.v1.InputField.TextInputH\x00\x12[\n\x0c\x63hoice_input\x18\x05 \x01(\x0b\x32\x43.google.shopping.merchant.issueresolution.v1.InputField.ChoiceInputH\x00\x12_\n\x0e\x63heckbox_input\x18\x06 \x01(\x0b\x32\x45.google.shopping.merchant.issueresolution.v1.InputField.CheckboxInputH\x00\x12\n\n\x02id\x18\x01 \x01(\t\x12K\n\x05label\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1.TextWithTooltip\x12\x10\n\x08required\x18\x03 \x01(\x08\x1a\x8d\x03\n\tTextInput\x12]\n\x04type\x18\x01 \x01(\x0e\x32O.google.shopping.merchant.issueresolution.v1.InputField.TextInput.TextInputType\x12Z\n\x0f\x61\x64\x64itional_info\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1.TextWithTooltipH\x00\x88\x01\x01\x12\x18\n\x0b\x66ormat_info\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x17\n\naria_label\x18\x04 \x01(\tH\x02\x88\x01\x01\"_\n\rTextInputType\x12\x1f\n\x1bTEXT_INPUT_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12GENERIC_SHORT_TEXT\x10\x01\x12\x15\n\x11GENERIC_LONG_TEXT\x10\x02\x42\x12\n\x10_additional_infoB\x0e\n\x0c_format_infoB\r\n\x0b_aria_label\x1a\xd1\x02\n\x0b\x43hoiceInput\x12\x66\n\x07options\x18\x01 \x03(\x0b\x32U.google.shopping.merchant.issueresolution.v1.InputField.ChoiceInput.ChoiceInputOption\x1a\xd9\x01\n\x11\x43hoiceInputOption\x12\n\n\x02id\x18\x01 \x01(\t\x12K\n\x05label\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1.TextWithTooltip\x12V\n\x10\x61\x64\x64itional_input\x18\x03 \x01(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1.InputFieldH\x00\x88\x01\x01\x42\x13\n\x11_additional_input\x1a\x0f\n\rCheckboxInputB\r\n\x0bvalue_input\"\x9e\x02\n\x0fTextWithTooltip\x12\x16\n\x0csimple_value\x18\x01 \x01(\tH\x00\x12\x1e\n\x14simple_tooltip_value\x18\x02 \x01(\tH\x01\x12i\n\x12tooltip_icon_style\x18\x03 \x01(\x0e\x32M.google.shopping.merchant.issueresolution.v1.TextWithTooltip.TooltipIconStyle\"N\n\x10TooltipIconStyle\x12\"\n\x1eTOOLTIP_ICON_STYLE_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0c\n\x08QUESTION\x10\x02\x42\x07\n\x05valueB\x0f\n\rtooltip_value\"\x92\x02\n\x07\x43\x61llout\x12Y\n\nstyle_hint\x18\x01 \x01(\x0e\x32\x45.google.shopping.merchant.issueresolution.v1.Callout.CalloutStyleHint\x12R\n\x0c\x66ull_message\x18\x03 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1.TextWithTooltip\"X\n\x10\x43\x61lloutStyleHint\x12\"\n\x1e\x43\x41LLOUT_STYLE_HINT_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\x08\n\x04INFO\x10\x03\"\xdb\x02\n\x0e\x45xternalAction\x12\\\n\x04type\x18\x01 \x01(\x0e\x32N.google.shopping.merchant.issueresolution.v1.ExternalAction.ExternalActionType\x12\x0b\n\x03uri\x18\x02 \x01(\t\"\xdd\x01\n\x12\x45xternalActionType\x12$\n EXTERNAL_ACTION_TYPE_UNSPECIFIED\x10\x00\x12+\n\'REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER\x10\x01\x12+\n\'REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER\x10\x02\x12\x1f\n\x1bLEGAL_APPEAL_IN_HELP_CENTER\x10\x03\x12&\n\"VERIFY_IDENTITY_IN_MERCHANT_CENTER\x10\x04\"\xc5\x01\n\x14TriggerActionRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12W\n\x07payload\x18\x02 \x01(\x0b\x32\x41.google.shopping.merchant.issueresolution.v1.TriggerActionPayloadB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x88\x01\n\x14TriggerActionPayload\x12\x1b\n\x0e\x61\x63tion_context\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12S\n\x0c\x61\x63tion_input\x18\x02 \x01(\x0b\x32\x38.google.shopping.merchant.issueresolution.v1.ActionInputB\x03\xe0\x41\x02\"(\n\x15TriggerActionResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\"~\n\x0b\x41\x63tionInput\x12\x1b\n\x0e\x61\x63tion_flow_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x0cinput_values\x18\x02 \x03(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1.InputValueB\x03\xe0\x41\x02\"\xf3\x03\n\nInputValue\x12\x62\n\x10text_input_value\x18\x02 \x01(\x0b\x32\x46.google.shopping.merchant.issueresolution.v1.InputValue.TextInputValueH\x00\x12\x66\n\x12\x63hoice_input_value\x18\x03 \x01(\x0b\x32H.google.shopping.merchant.issueresolution.v1.InputValue.ChoiceInputValueH\x00\x12j\n\x14\x63heckbox_input_value\x18\x04 \x01(\x0b\x32J.google.shopping.merchant.issueresolution.v1.InputValue.CheckboxInputValueH\x00\x12\x1b\n\x0einput_field_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a$\n\x0eTextInputValue\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\x37\n\x10\x43hoiceInputValue\x12#\n\x16\x63hoice_input_option_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a(\n\x12\x43heckboxInputValue\x12\x12\n\x05value\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x42\x07\n\x05value*F\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\x08\n\x04INFO\x10\x03*F\n\rContentOption\x12\x1e\n\x1a\x43ONTENT_OPTION_UNSPECIFIED\x10\x00\x12\x15\n\x11PRE_RENDERED_HTML\x10\x01*\x96\x01\n\x1eUserInputActionRenderingOption\x12\x32\n.USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED\x10\x00\x12\x1f\n\x1bREDIRECT_TO_MERCHANT_CENTER\x10\x01\x12\x1f\n\x1b\x42UILT_IN_USER_INPUT_ACTIONS\x10\x02\x32\xce\x06\n\x16IssueResolutionService\x12\xfb\x01\n\x13RenderAccountIssues\x12G.google.shopping.merchant.issueresolution.v1.RenderAccountIssuesRequest\x1aH.google.shopping.merchant.issueresolution.v1.RenderAccountIssuesResponse\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\"9/issueresolution/v1/{name=accounts/*}:renderaccountissues:\x07payload\x12\x86\x02\n\x13RenderProductIssues\x12G.google.shopping.merchant.issueresolution.v1.RenderProductIssuesRequest\x1aH.google.shopping.merchant.issueresolution.v1.RenderProductIssuesResponse\"\\\xda\x41\x04name\x82\xd3\xe4\x93\x02O\"D/issueresolution/v1/{name=accounts/*/products/*}:renderproductissues:\x07payload\x12\xe3\x01\n\rTriggerAction\x12\x41.google.shopping.merchant.issueresolution.v1.TriggerActionRequest\x1a\x42.google.shopping.merchant.issueresolution.v1.TriggerActionResponse\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\"3/issueresolution/v1/{name=accounts/*}:triggeraction:\x07payload\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xc1\x03\n/com.google.shopping.merchant.issueresolution.v1B\x14IssueResolutionProtoP\x01Z_cloud.google.com/go/shopping/merchant/issueresolution/apiv1/issueresolutionpb;issueresolutionpb\xaa\x02+Google.Shopping.Merchant.IssueResolution.V1\xca\x02+Google\\Shopping\\Merchant\\IssueResolution\\V1\xea\x02/Google::Shopping::Merchant::IssueResolution::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module IssueResolution - module V1 - RenderAccountIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderAccountIssuesResponse").msgclass - RenderAccountIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderAccountIssuesRequest").msgclass - RenderIssuesRequestPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderIssuesRequestPayload").msgclass - RenderProductIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderProductIssuesResponse").msgclass - RenderProductIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderProductIssuesRequest").msgclass - RenderedIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderedIssue").msgclass - Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Impact").msgclass - Breakdown = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Breakdown").msgclass - Breakdown::Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Breakdown.Region").msgclass - Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Action").msgclass - Action::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Action.Reason").msgclass - BuiltInSimpleAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction").msgclass - BuiltInSimpleAction::AdditionalContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction.AdditionalContent").msgclass - BuiltInSimpleAction::BuiltInSimpleActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction.BuiltInSimpleActionType").enummodule - BuiltInUserInputAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.BuiltInUserInputAction").msgclass - ActionFlow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ActionFlow").msgclass - InputField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField").msgclass - InputField::TextInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField.TextInput").msgclass - InputField::TextInput::TextInputType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField.TextInput.TextInputType").enummodule - InputField::ChoiceInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField.ChoiceInput").msgclass - InputField::ChoiceInput::ChoiceInputOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField.ChoiceInput.ChoiceInputOption").msgclass - InputField::CheckboxInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField.CheckboxInput").msgclass - TextWithTooltip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.TextWithTooltip").msgclass - TextWithTooltip::TooltipIconStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.TextWithTooltip.TooltipIconStyle").enummodule - Callout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Callout").msgclass - Callout::CalloutStyleHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Callout.CalloutStyleHint").enummodule - ExternalAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ExternalAction").msgclass - ExternalAction::ExternalActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ExternalAction.ExternalActionType").enummodule - TriggerActionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.TriggerActionRequest").msgclass - TriggerActionPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.TriggerActionPayload").msgclass - TriggerActionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.TriggerActionResponse").msgclass - ActionInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ActionInput").msgclass - InputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputValue").msgclass - InputValue::TextInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputValue.TextInputValue").msgclass - InputValue::ChoiceInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputValue.ChoiceInputValue").msgclass - InputValue::CheckboxInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputValue.CheckboxInputValue").msgclass - Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Severity").enummodule - ContentOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ContentOption").enummodule - UserInputActionRenderingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.UserInputActionRenderingOption").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_services_pb.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_services_pb.rb deleted file mode 100644 index 7daf1f8def84..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_services_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/issueresolution/v1/issueresolution.proto for package 'Google.Shopping.Merchant.IssueResolution.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/shopping/merchant/issueresolution/v1/issueresolution_pb' - -module Google - module Shopping - module Merchant - module IssueResolution - module V1 - module IssueResolutionService - # Service to provide an issue resolution content for account issues and product - # issues. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.issueresolution.v1.IssueResolutionService' - - # Provide a list of business's account issues with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - rpc :RenderAccountIssues, ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest, ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse - # Provide a list of issues for business's product with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - rpc :RenderProductIssues, ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest, ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse - # Start an action. The action can be requested by a business in - # third-party application. Before the business can request the action, the - # third-party application needs to show them action specific content and - # display a user input form. - # - # The action can be successfully started only once all `required` inputs are - # provided. If any `required` input is missing, or invalid value was - # provided, the service will return 400 error. Validation errors will contain - # [Ids][google.shopping.merchant.issueresolution.v1.InputField.id] for all - # problematic field together with translated, human readable error messages - # that can be shown to the user. - rpc :TriggerAction, ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest, ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/README.md deleted file mode 100644 index 110adc2cf42e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant 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-shopping-merchant-issue_resolution-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.rb deleted file mode 100644 index 40faf58eaeb8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.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 Shopping - module Merchant - module IssueResolution - module V1 - # Request message for the `ListAggregateProductStatuses` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to list aggregate product statuses for. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of aggregate product statuses to return. The - # service may return fewer than this value. If unspecified, at most 25 - # aggregate product statuses are returned. The maximum value is 250; values - # above 250 are coerced to 250. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListAggregateProductStatuses` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAggregateProductStatuses` must match the call that provided the page - # token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters the aggregate product statuses. - # Filtering is only supported by the `reporting_context` and `country` field. - # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. - class ListAggregateProductStatusesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListAggregateProductStatuses` method. - # @!attribute [rw] aggregate_product_statuses - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>] - # The `AggregateProductStatuses` resources for the given account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `pageToken` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListAggregateProductStatusesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Aggregate product statuses for a given reporting context and country. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the `AggregateProductStatuses` resource. - # Format: - # `accounts/{account}/aggregateProductStatuses/{aggregateProductStatuses}` - # @!attribute [rw] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # The reporting context of the aggregate product statuses. - # @!attribute [rw] country - # @return [::String] - # The country of the aggregate product statuses. Represented as a - # [CLDR territory - # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). - # @!attribute [rw] stats - # @return [::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus::Stats] - # Products statistics for the given reporting context and country. - # @!attribute [rw] item_level_issues - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus::ItemLevelIssue>] - # The product issues that affect the given reporting context and country. - class AggregateProductStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Products statistics. - # @!attribute [rw] active_count - # @return [::Integer] - # The number of products that are active. - # @!attribute [rw] pending_count - # @return [::Integer] - # The number of products that are pending. - # @!attribute [rw] disapproved_count - # @return [::Integer] - # The number of products that are disapproved. - # @!attribute [rw] expiring_count - # @return [::Integer] - # The number of products that are expiring. - class Stats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The ItemLevelIssue of the product status. - # @!attribute [rw] code - # @return [::String] - # The error code of the issue. - # @!attribute [rw] severity - # @return [::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus::ItemLevelIssue::Severity] - # How this issue affects serving of the offer. - # @!attribute [rw] resolution - # @return [::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus::ItemLevelIssue::Resolution] - # Whether the issue can be resolved by the merchant. - # @!attribute [rw] attribute - # @return [::String] - # The attribute's name, if the issue is caused by a single attribute. - # @!attribute [rw] description - # @return [::String] - # A short issue description in English. - # @!attribute [rw] detail - # @return [::String] - # A detailed issue description in English. - # @!attribute [rw] documentation_uri - # @return [::String] - # The URL of a web page to help with resolving this issue. - # @!attribute [rw] product_count - # @return [::Integer] - # The number of products affected by this issue. - class ItemLevelIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # How the issue affects the serving of the product. - module Severity - # Not specified. - SEVERITY_UNSPECIFIED = 0 - - # This issue represents a warning and does not have a direct affect - # on the product. - NOT_IMPACTED = 1 - - # The product is demoted and most likely have limited performance - # in search results - DEMOTED = 2 - - # Issue disapproves the product. - DISAPPROVED = 3 - end - - # How the issue can be resolved. - module Resolution - # Not specified. - RESOLUTION_UNSPECIFIED = 0 - - # The issue can be resolved by the merchant. - MERCHANT_ACTION = 1 - - # The issue will be resolved auomatically. - PENDING_PROCESSING = 2 - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb deleted file mode 100644 index 6aac18092bd0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb +++ /dev/null @@ -1,952 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module IssueResolution - module V1 - # Response containing an issue resolution content and actions for listed - # account issues. - # @!attribute [rw] rendered_issues - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue>] - # List of account issues for a given account. - # - # This list can be shown with compressed, expandable items. In the compressed - # form, the title and impact should be shown for each issue. Once the issue - # is expanded, the detailed - # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#prerendered_content content} - # and available - # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#actions actions} - # should be rendered. - class RenderAccountIssuesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to provide issue resolution content and actions for business's - # account issues. - # @!attribute [rw] name - # @return [::String] - # Required. The account to fetch issues for. - # Format: `accounts/{account}` - # @!attribute [rw] language_code - # @return [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize issue resolution content. If not set, the result will - # be in default language `en-US`. - # @!attribute [rw] time_zone - # @return [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @!attribute [rw] payload - # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload] - # Optional. The payload for configuring how the content should be rendered. - class RenderAccountIssuesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The payload for configuring how the content should be rendered. - # @!attribute [rw] content_option - # @return [::Google::Shopping::Merchant::IssueResolution::V1::ContentOption] - # Optional. How the detailed content should be returned. Default option is to - # return the content as a pre-rendered HTML text. - # @!attribute [rw] user_input_action_option - # @return [::Google::Shopping::Merchant::IssueResolution::V1::UserInputActionRenderingOption] - # Optional. How actions with user input form should be handled. If not - # provided, actions will be returned as links that points the business to - # Merchant Center where they can request the action. - class RenderIssuesRequestPayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response containing an issue resolution content and actions for listed - # product issues. - # @!attribute [rw] rendered_issues - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue>] - # List of issues for a given product. - # - # This list can be shown with compressed, expandable items. In the compressed - # form, the - # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#title title} - # and - # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#impact impact} - # should be shown for each issue. Once the issue is expanded, the detailed - # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#prerendered_content content} - # and available - # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#actions actions} - # should be rendered. - class RenderProductIssuesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to provide an issue resolution content and actions for product issues - # of business's product. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the product to fetch issues for. - # Format: `accounts/{account}/products/{product}` - # @!attribute [rw] language_code - # @return [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize an issue resolution content. If not set, the result - # will be in default language `en-US`. - # @!attribute [rw] time_zone - # @return [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @!attribute [rw] payload - # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload] - # Optional. The payload for configuring how the content should be rendered. - class RenderProductIssuesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An issue affecting specific business or their product. - # @!attribute [rw] prerendered_content - # @return [::String] - # Details of the issue as a pre-rendered HTML. HTML elements contain CSS - # classes that can be used to customize the style of the content. - # - # Always sanitize the HTML before embedding it directly to your - # application. The sanitizer needs to allow basic HTML tags, such as: - # `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, - # you can use [DOMPurify](https://www.npmjs.com/package/dompurify). - # - # CSS classes: - # - # * `issue-detail` - top level container for the detail of the issue - # * `callout-banners` - section of the `issue-detail` with callout banners - # * `callout-banner` - single callout banner, inside `callout-banners` - # * `callout-banner-info` - callout with important information (default) - # * `callout-banner-warning` - callout with a warning - # * `callout-banner-error` - callout informing about an error (most severe) - # * `issue-content` - section of the `issue-detail`, contains multiple - # `content-element` - # * `content-element` - content element such as a list, link or paragraph, - # inside `issue-content` - # * `root-causes` - unordered list with items describing root causes of the - # issue, inside `issue-content` - # * `root-causes-intro` - intro text before the `root-causes` list, inside - # `issue-content` - # * `segment` - section of the text, `span` inside paragraph - # * `segment-attribute` - section of the text that represents a product - # attribute, for example 'image\_link' - # * `segment-literal` - section of the text that contains a special value, - # for example '0-1000 kg' - # * `segment-bold` - section of the text that should be rendered as bold - # * `segment-italic` - section of the text that should be rendered as - # italic - # * `tooltip` - used on paragraphs that should be rendered with a tooltip. - # A section of the text in such a paragraph will have a class - # `tooltip-text` and is intended to be shown in a mouse over dialog. If the - # style is not used, the `tooltip-text` section would be shown on a new - # line, after the main part of the text. - # * `tooltip-text` - marks a section of the text within a `tooltip`, that - # is intended to be shown in a mouse over dialog. - # * `tooltip-icon` - marks a section of the text within a `tooltip`, that - # can be replaced with a tooltip icon, for example '?' or 'i'. By default, - # this section contains a `br` tag, that is separating the main text and - # the tooltip text when the style is not used. - # * `tooltip-style-question` - the tooltip shows helpful information, - # can use the '?' as an icon. - # * `tooltip-style-info` - the tooltip adds additional information fitting - # to the context, can use the 'i' as an icon. - # * `content-moderation` - marks the paragraph that explains how the issue - # was identified. - # * `new-element` - Present for new elements added to the pre-rendered - # content in the future. To make sure that a new content element does not - # break your style, you can hide everything with this class. - # @!attribute [rw] prerendered_out_of_court_dispute_settlement - # @return [::String] - # Pre-rendered HTML that contains a link to the external location where the - # ODS can be requested and instructions for how to request it. HTML - # elements contain CSS classes that can be used to customize the style of - # this snippet. - # - # Always sanitize the HTML before embedding it directly to your - # application. The sanitizer needs to allow basic HTML tags, such as: - # `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, - # you can use [DOMPurify](https://www.npmjs.com/package/dompurify). - # - # CSS classes: - # - # * `ods-section`* - wrapper around the out-of-court dispute resolution - # section - # * `ods-description`* - intro text for the out-of-court dispute - # resolution. It may contain multiple segments and a link. - # * `ods-param`* - wrapper around the header-value pair for parameters that - # the business may need to provide during the ODS process. - # * `ods-routing-id`* - ods param for the Routing ID. - # * `ods-reference-id`* - ods param for the Routing ID. - # * `ods-param-header`* - header for the ODS parameter - # * `ods-param-value`* - value of the ODS parameter. This value should be - # rendered in a way that it is easy for the user to identify and copy. - # * `segment` - section of the text, `span` inside paragraph - # * `segment-attribute` - section of the text that represents a product - # attribute, for example 'image\_link' - # * `segment-literal` - section of the text that contains a special value, - # for example '0-1000 kg' - # * `segment-bold` - section of the text that should be rendered as bold - # * `segment-italic` - section of the text that should be rendered as - # italic - # * `tooltip` - used on paragraphs that should be rendered with a tooltip. - # A section of the text in such a paragraph will have a class - # `tooltip-text` and is intended to be shown in a mouse over dialog. If the - # style is not used, the `tooltip-text` section would be shown on a new - # line, after the main part of the text. - # * `tooltip-text` - marks a section of the text within a `tooltip`, that - # is intended to be shown in a mouse over dialog. - # * `tooltip-icon` - marks a section of the text within a `tooltip`, that - # can be replaced with a tooltip icon, for example '?' or 'i'. By default, - # this section contains a `br` tag, that is separating the main text and - # the tooltip text when the style is not used. - # * `tooltip-style-question` - the tooltip shows helpful information, - # can use the '?' as an icon. - # * `tooltip-style-info` - the tooltip adds additional information fitting - # to the context, can use the 'i' as an icon. - # @!attribute [rw] title - # @return [::String] - # Title of the issue. - # @!attribute [rw] impact - # @return [::Google::Shopping::Merchant::IssueResolution::V1::Impact] - # Clarifies the severity of the issue. - # - # The [summarizing - # message][google.shopping.merchant.issueresolution.v1.Impact.message], if - # present, should be shown right under the title for each issue. It helps - # business to quickly understand the impact of the issue. - # - # The detailed - # {::Google::Shopping::Merchant::IssueResolution::V1::Impact#breakdowns breakdown} - # helps the business to fully understand the impact of the issue. It can be - # rendered as dialog that opens when the business mouse over the summarized - # impact statement. - # - # Issues with different - # {::Google::Shopping::Merchant::IssueResolution::V1::Impact#severity severity} can - # be styled differently. They may use a different color or icon to signal the - # difference between `ERROR`, `WARNING` and `INFO`. - # @!attribute [rw] actions - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::Action>] - # A list of actionable steps that can be executed to solve the issue. An - # example is requesting a re-review or providing arguments when business - # disagrees with the issue. - # - # Actions that are supported in (your) third-party application can be - # rendered as buttons and should be available to the business when they - # expand the issue. - class RenderedIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Overall impact of the issue. - # @!attribute [rw] message - # @return [::String] - # Optional. Message summarizing the overall impact of the issue. If present, - # it should be rendered to the business. For example: "Disapproves 90k offers - # in 25 countries" - # @!attribute [rw] severity - # @return [::Google::Shopping::Merchant::IssueResolution::V1::Severity] - # The severity of the issue. - # @!attribute [rw] breakdowns - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::Breakdown>] - # Detailed impact breakdown. Explains the types of restriction the issue has - # in different shopping destinations and territory. If present, it should be - # rendered to the business. Can be shown as a mouse over dropdown or a - # dialog. Each breakdown item represents a group of regions with the same - # impact details. - class Impact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A detailed impact breakdown for a group of regions where the impact of the - # issue on different shopping destinations is the same. - # @!attribute [rw] regions - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::Breakdown::Region>] - # Lists of regions. Should be rendered as a title for this group of details. - # The full list should be shown to the business. If the list is too long, it - # is recommended to make it expandable. - # @!attribute [rw] details - # @return [::Array<::String>] - # Human readable, localized description of issue's effect on different - # targets. Should be rendered as a list. - # - # For example: - # - # * "Products not showing in ads" - # * "Products not showing organically" - class Breakdown - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Region with code and localized name. - # @!attribute [rw] code - # @return [::String] - # The [CLDR territory code] - # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # @!attribute [rw] name - # @return [::String] - # The localized name of the region. - # For region with code='001' the value is 'All countries' or the equivalent - # in other languages. - class Region - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An actionable step that can be executed to solve the issue. - # @!attribute [rw] builtin_simple_action - # @return [::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction] - # Action implemented and performed in (your) third-party application. The - # application should point the business to the place, where they can access - # the corresponding functionality or provide instructions, if the specific - # functionality is not available. - # - # Note: The following fields are mutually exclusive: `builtin_simple_action`, `external_action`, `builtin_user_input_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] external_action - # @return [::Google::Shopping::Merchant::IssueResolution::V1::ExternalAction] - # Action that is implemented and performed outside of (your) third-party - # application. The application needs to redirect the business to the - # external location where they can perform the action. - # - # Note: The following fields are mutually exclusive: `external_action`, `builtin_simple_action`, `builtin_user_input_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] builtin_user_input_action - # @return [::Google::Shopping::Merchant::IssueResolution::V1::BuiltInUserInputAction] - # Action implemented and performed in (your) third-party application. - # The application needs to show an additional content and input form to the - # business as specified for given action. They can trigger the action only - # when they provided all required inputs. - # - # Note: The following fields are mutually exclusive: `builtin_user_input_action`, `builtin_simple_action`, `external_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] button_label - # @return [::String] - # Label of the action button. - # @!attribute [rw] is_available - # @return [::Boolean] - # Controlling whether the button is active or disabled. The value is 'false' - # when the action was already requested or is not available. If the action is - # not available then a - # {::Google::Shopping::Merchant::IssueResolution::V1::Action#reasons reason} will - # be present. If (your) third-party application shows a disabled button for - # action that is not available, then it should also show reasons. - # @!attribute [rw] reasons - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::Action::Reason>] - # List of reasons why the action is not available. The list of reasons is - # empty if the action is available. If there is only one reason, it can be - # displayed next to the disabled button. If there are more reasons, all of - # them should be displayed, for example in a pop-up dialog. - class Action - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A single reason why the action is not available. - # @!attribute [rw] message - # @return [::String] - # Messages summarizing the reason, why the action is not available. - # For example: "Review requested on Jan 03. Review requests can take a few - # days to complete." - # @!attribute [rw] detail - # @return [::String] - # Detailed explanation of the reason. Should be displayed as a hint if - # present. - # @!attribute [rw] action - # @return [::Google::Shopping::Merchant::IssueResolution::V1::Action] - # Optional. An action that needs to be performed to solve the problem - # represented by this reason. This action will always be available. Should - # be rendered as a link or button next to the summarizing message. - # - # For example, the review may be available only once the business configure - # all required attributes. In such a situation this action can be a link to - # the form, where they can fill the missing attribute to unblock the main - # action. - class Reason - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Action that is implemented and performed in (your) third-party application. - # Represents various functionality that is expected to be available to business - # and will help them with resolving the issue. The application should point the - # business to the place, where they can access the corresponding functionality. - # If the functionality is not supported, it is recommended to explain the - # situation to the business and provide them with instructions how to solve the - # issue. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction::BuiltInSimpleActionType] - # The type of action that represents a functionality that is expected to be - # available in third-party application. - # @!attribute [rw] attribute_code - # @return [::String] - # The attribute that needs to be updated. Present when the - # {::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction#type type} - # is `EDIT_ITEM_ATTRIBUTE`. - # - # This field contains a code for attribute, represented in snake_case. You - # can find a list of product's attributes, with their codes - # [here](https://support.google.com/merchants/answer/7052112). - # @!attribute [rw] additional_content - # @return [::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction::AdditionalContent] - # Long text from an external source that should be available to the business. - # Present when the - # {::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction#type type} - # is `SHOW_ADDITIONAL_CONTENT`. - class BuiltInSimpleAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Long text from external source. - # @!attribute [rw] title - # @return [::String] - # Title of the additional content; - # @!attribute [rw] paragraphs - # @return [::Array<::String>] - # Long text organized into paragraphs. - class AdditionalContent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Enum specifying the type of action in third-party application. - module BuiltInSimpleActionType - # Default value. Will never be provided by the API. - BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED = 0 - - # Redirect the business to the part of your application where they can - # verify their phone. - VERIFY_PHONE = 1 - - # Redirect the business to the part of your application where they can - # claim their website. - CLAIM_WEBSITE = 2 - - # Redirect the business to the part of your application where they can add - # products. - ADD_PRODUCTS = 3 - - # Open a form where the business can edit their contact information. - ADD_CONTACT_INFO = 4 - - # Redirect the business to the part of your application where they can link - # ads account. - LINK_ADS_ACCOUNT = 5 - - # Open a form where the business can add their business registration - # number. - ADD_BUSINESS_REGISTRATION_NUMBER = 6 - - # Open a form where the business can edit an attribute. The attribute that - # needs to be updated is specified in - # {::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction#attribute_code attribute_code} - # field of the action. - EDIT_ITEM_ATTRIBUTE = 7 - - # Redirect the business from the product issues to the diagnostic page with - # their account issues in your application. - # - # This action will be returned only for product issues that are caused by - # an account issue and thus the business should resolve the problem on the - # account level. - FIX_ACCOUNT_ISSUE = 8 - - # Show [additional - # content][google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction.additional_content] - # to the business. - # - # This action will be used for example to deliver a justification from - # national authority. - SHOW_ADDITIONAL_CONTENT = 9 - end - end - - # Action that is implemented and performed in (your) third-party application. - # The application needs to show an additional content and input form to the - # business. They can start the action only when they provided all required - # inputs. The application will request processing of the action by calling the - # [triggeraction - # method](https://developers.google.com/merchant/api/reference/rest/issueresolution_v1/issueresolution/triggeraction). - # @!attribute [rw] action_context - # @return [::String] - # Contains the action's context that must be included as part of the - # {::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionPayload#action_context TriggerActionPayload.action_context} - # in - # {::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest#payload TriggerActionRequest.payload} - # to call the `triggeraction` method. The content should be treated as opaque - # and must not be modified. - # @!attribute [rw] flows - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::ActionFlow>] - # Actions may provide multiple different flows. Business selects one that - # fits best to their intent. Selecting the flow is the first step in user's - # interaction with the action. It affects what input fields will be available - # and required and also how the request will be processed. - class BuiltInUserInputAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Flow that can be selected for an action. When a business selects a flow, - # application should open a dialog with more information and input form. - # @!attribute [rw] id - # @return [::String] - # Not for display but need to be sent back for the selected action flow. - # @!attribute [rw] label - # @return [::String] - # Text value describing the intent for the action flow. It can be used as an - # input label if business needs to pick one of multiple flows. For example: - # "I disagree with the issue" - # @!attribute [rw] inputs - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::InputField>] - # A list of input fields. - # @!attribute [rw] dialog_title - # @return [::String] - # Title of the request dialog. For example: "Before you request a review" - # @!attribute [rw] dialog_message - # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip] - # Message displayed in the request dialog. For example: "Make sure you've - # fixed all your country-specific issues. If not, you may have to wait 7 days - # to request another review". There may be an more information to be shown in - # a tooltip. - # @!attribute [rw] dialog_callout - # @return [::Google::Shopping::Merchant::IssueResolution::V1::Callout] - # Important message to be highlighted in the request dialog. For example: - # "You can only request a review for disagreeing with this issue once. If - # it's not approved, you'll need to fix the issue and wait a few days before - # you can request another review." - # @!attribute [rw] dialog_button_label - # @return [::String] - # Label for the button to trigger the action from the action dialog. For - # example: "Request review" - class ActionFlow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input field that needs to be available to the business. If the field is - # marked as required, then a value needs to be provided for a successful - # processing of the request. - # @!attribute [rw] text_input - # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputField::TextInput] - # Input field to provide text information. - # Corresponds to the [html input - # type=text](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text) - # or [html - # textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). - # - # Note: The following fields are mutually exclusive: `text_input`, `choice_input`, `checkbox_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] choice_input - # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputField::ChoiceInput] - # Input field to select one of the offered choices. - # Corresponds to the [html input - # type=radio](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.radio.html#input.radio). - # - # Note: The following fields are mutually exclusive: `choice_input`, `text_input`, `checkbox_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] checkbox_input - # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputField::CheckboxInput] - # Input field to provide a boolean value. - # Corresponds to the [html input - # type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). - # - # Note: The following fields are mutually exclusive: `checkbox_input`, `text_input`, `choice_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] id - # @return [::String] - # Not for display but need to be sent back for the given input field. - # @!attribute [rw] label - # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip] - # Input field label. There may be more information to be shown in a tooltip. - # @!attribute [rw] required - # @return [::Boolean] - # Whether the field is required. The action button needs to stay disabled - # till values for all required fields are provided. - class InputField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Text input allows the business to provide a text value. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputField::TextInput::TextInputType] - # Type of the text input - # @!attribute [rw] additional_info - # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip] - # Additional info regarding the field to be displayed to the business. For - # example, warning to not include personal identifiable information. There - # may be more information to be shown in a tooltip. - # @!attribute [rw] format_info - # @return [::String] - # Information about the required format. If present, it should be shown - # close to the input field to help the business to provide a correct value. - # For example: "VAT numbers should be in a format similar to SK9999999999" - # @!attribute [rw] aria_label - # @return [::String] - # Text to be used as the - # [aria-label](https://www.w3.org/TR/WCAG20-TECHS/ARIA14.html) for the - # input. - class TextInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum specifying the type of the text input and how it should be rendered. - module TextInputType - # Default value. Will never be provided by the API. - TEXT_INPUT_TYPE_UNSPECIFIED = 0 - - # Used when a short text is expected. The field can be rendered as a - # [text - # field](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text). - GENERIC_SHORT_TEXT = 1 - - # Used when a longer text is expected. The field should be rendered as a - # [textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). - GENERIC_LONG_TEXT = 2 - end - end - - # Choice input allows the business to select one of the offered choices. Some - # choices may be linked to additional input fields that should be displayed - # under or next to the choice option. The value for the additional input - # field needs to be provided only when the specific choice is selected by the - # the business. For example, additional input field can be hidden or disabled - # until the business selects the specific choice. - # @!attribute [rw] options - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::InputField::ChoiceInput::ChoiceInputOption>] - # A list of choices. Only one option can be selected. - class ChoiceInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A choice that the business can select. - # @!attribute [rw] id - # @return [::String] - # Not for display but need to be sent back for the selected choice - # option. - # @!attribute [rw] label - # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip] - # Short description of the choice option. There may be more information - # to be shown as a tooltip. - # @!attribute [rw] additional_input - # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputField] - # Input that should be displayed when this option is selected. - # The additional input will not contain a `ChoiceInput`. - class ChoiceInputOption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Checkbox input allows the business to provide a boolean value. Corresponds - # to the [html input - # type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). - # - # If the business checks the box, the input value for the field is `true`, - # otherwise it is `false`. - # - # This type of input is often used as a confirmation that the business - # completed required steps before they are allowed to start the action. In - # such a case, the input field is marked as - # {::Google::Shopping::Merchant::IssueResolution::V1::InputField#required required} - # and the button to trigger the action should stay disabled until the - # business checks the box. - class CheckboxInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Block of text that may contain a tooltip with more information. - # @!attribute [rw] simple_value - # @return [::String] - # Value of the message as a simple text. - # @!attribute [rw] simple_tooltip_value - # @return [::String] - # Value of the tooltip as a simple text. - # @!attribute [rw] tooltip_icon_style - # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip::TooltipIconStyle] - # The suggested type of an icon for tooltip, if a tooltip is present. - class TextWithTooltip - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum specifying the type of an icon that is being used to display a - # corresponding tooltip in the Merchant Center. - module TooltipIconStyle - # Default value. Will never be provided by the API. - TOOLTIP_ICON_STYLE_UNSPECIFIED = 0 - - # Used when the tooltip adds additional information to the context, - # the 'i' can be used as an icon. - INFO = 1 - - # Used when the tooltip shows helpful information, the '?' can be used as - # an icon. - QUESTION = 2 - end - end - - # An important message that should be highlighted. Usually displayed as a - # banner. - # @!attribute [rw] style_hint - # @return [::Google::Shopping::Merchant::IssueResolution::V1::Callout::CalloutStyleHint] - # Can be used to render messages with different severity in different styles. - # Snippets off all types contain important information that should be - # displayed to the business. - # @!attribute [rw] full_message - # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip] - # A full message that needs to be shown to the business. - class Callout - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum specifying the suggested style, how the message should be rendered. - module CalloutStyleHint - # Default value. Will never be provided by the API. - CALLOUT_STYLE_HINT_UNSPECIFIED = 0 - - # The most important type of information highlighting problems, like an - # unsuccessful outcome of previously requested actions. - ERROR = 1 - - # Information warning about pending problems, risks or deadlines. - WARNING = 2 - - # Default severity for important information like pending status of - # previously requested action or cooldown for re-review. - INFO = 3 - end - end - - # Action that is implemented and performed outside of the third-party - # application. It should redirect the business to the provided URL of an - # external system where they can perform the action. For example to request a - # review in the Merchant Center. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::IssueResolution::V1::ExternalAction::ExternalActionType] - # The type of external action. - # @!attribute [rw] uri - # @return [::String] - # URL to external system, for example Merchant Center, where the business can - # perform the action. - class ExternalAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum specifying the type of action that requires to redirect the business - # to an external location. - module ExternalActionType - # Default value. Will never be provided by the API. - EXTERNAL_ACTION_TYPE_UNSPECIFIED = 0 - - # Redirect to Merchant Center where the business can request a review for - # issue related to their product. - REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER = 1 - - # Redirect to Merchant Center where the business can request a review for - # issue related to their account. - REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER = 2 - - # Redirect to the form in Help Center where the business can request a - # legal appeal for the issue. - LEGAL_APPEAL_IN_HELP_CENTER = 3 - - # Redirect to Merchant Center where the business can perform identity - # verification. - VERIFY_IDENTITY_IN_MERCHANT_CENTER = 4 - end - end - - # Request to start the selected action - # @!attribute [rw] name - # @return [::String] - # Required. The business's account that is triggering the action. - # Format: `accounts/{account}` - # @!attribute [rw] payload - # @return [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionPayload] - # Required. The payload for the triggered action. - # @!attribute [rw] language_code - # @return [::String] - # Optional. Language code [IETF BCP 47 - # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. - # If not set, the result will be in default language `en-US`. - class TriggerActionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The payload for the triggered action. - # @!attribute [rw] action_context - # @return [::String] - # Required. The - # {::Google::Shopping::Merchant::IssueResolution::V1::BuiltInUserInputAction#action_context context} - # from the selected action. The value is obtained from rendered issues and - # needs to be sent back to identify the - # {::Google::Shopping::Merchant::IssueResolution::V1::Action#builtin_user_input_action action} - # that is being triggered. - # @!attribute [rw] action_input - # @return [::Google::Shopping::Merchant::IssueResolution::V1::ActionInput] - # Required. Input provided by the business. - class TriggerActionPayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response informing about the started action. - # @!attribute [rw] message - # @return [::String] - # The message for the business. - class TriggerActionResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input provided by the business. - # @!attribute [rw] action_flow_id - # @return [::String] - # Required. {::Google::Shopping::Merchant::IssueResolution::V1::ActionFlow#id Id} - # of the selected action flow. - # @!attribute [rw] input_values - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::InputValue>] - # Required. Values for input fields. - class ActionInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input provided by the business for input field. - # @!attribute [rw] text_input_value - # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputValue::TextInputValue] - # Value for [text - # input][google.shopping.merchant.issueresolution.v1.InputField.TextInput] - # field. - # - # Note: The following fields are mutually exclusive: `text_input_value`, `choice_input_value`, `checkbox_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] choice_input_value - # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputValue::ChoiceInputValue] - # Value for [choice - # input][google.shopping.merchant.issueresolution.v1.InputField.ChoiceInput] - # field. - # - # Note: The following fields are mutually exclusive: `choice_input_value`, `text_input_value`, `checkbox_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] checkbox_input_value - # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputValue::CheckboxInputValue] - # Value for [checkbox - # input][google.shopping.merchant.issueresolution.v1.InputField.CheckboxInput] - # field. - # - # Note: The following fields are mutually exclusive: `checkbox_input_value`, `text_input_value`, `choice_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] input_field_id - # @return [::String] - # Required. {::Google::Shopping::Merchant::IssueResolution::V1::InputField#id Id} - # of the corresponding input field. - class InputValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Value for [text - # input][google.shopping.merchant.issueresolution.v1.InputField.TextInput] - # field. - # @!attribute [rw] value - # @return [::String] - # Required. Text provided by the business. - class TextInputValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Value for [choice - # input][google.shopping.merchant.issueresolution.v1.InputField.ChoiceInput] - # field. - # @!attribute [rw] choice_input_option_id - # @return [::String] - # Required. [Id][InputField.ChoiceInput.id] of the option that was selected - # by the business. - class ChoiceInputValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Value for [checkbox - # input][google.shopping.merchant.issueresolution.v1.InputField.CheckboxInput] - # field. - # @!attribute [rw] value - # @return [::Boolean] - # Required. True if the business checked the box field. False otherwise. - class CheckboxInputValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Enum specifying the severity of the issue. - module Severity - # Default value. Will never be provided by the API. - SEVERITY_UNSPECIFIED = 0 - - # Causes either an account suspension or an item disapproval. Errors should - # be resolved as soon as possible to ensure items are eligible to appear in - # results again. - ERROR = 1 - - # Warnings can negatively impact the performance of ads and can lead to item - # or account suspensions in the future unless the issue is resolved. - WARNING = 2 - - # Infos are suggested optimizations to increase data quality. Resolving these - # issues is recommended, but not required. - INFO = 3 - end - - # Enum specifying how is the content returned. - module ContentOption - # Default value. Will never be provided by the API. - CONTENT_OPTION_UNSPECIFIED = 0 - - # Returns the detail of the issue as a pre-rendered HTML text. - PRE_RENDERED_HTML = 1 - end - - # Enum specifying how actions with user input forms, such as requesting - # re-review, are handled. - module UserInputActionRenderingOption - # Default value. Will never be provided by the API. - USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED = 0 - - # Actions that require user input are represented only as links that points - # the business to Merchant Center where they can request the action. Provides - # easier to implement alternative to `BUILT_IN_USER_INPUT_ACTIONS`. - REDIRECT_TO_MERCHANT_CENTER = 1 - - # Returns content and input form definition for each complex action. Your - # application needs to display this content and input form to the business - # before they can request processing of the action. To start the action, your - # application needs to call the `triggeraction` method. - BUILT_IN_USER_INPUT_ACTIONS = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/type/types.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! - - -module Google - module Shopping - module Type - # The weight represented as the value in string and the unit. - # @!attribute [rw] amount_micros - # @return [::Integer] - # Required. The weight represented as a number in micros (1 million micros is - # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 - # micros). - # This field can also be set as infinity by setting to -1. - # This field only support -1 and positive value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Type::Weight::WeightUnit] - # Required. The weight unit. - # Acceptable values are: kg and lb - class Weight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The weight unit. - module WeightUnit - # unit unspecified - WEIGHT_UNIT_UNSPECIFIED = 0 - - # lb unit. - POUND = 1 - - # kg unit. - KILOGRAM = 2 - end - end - - # The price represented as a number and currency. - # @!attribute [rw] amount_micros - # @return [::Integer] - # The price represented as a number in micros (1 million micros is an - # equivalent to one's currency standard unit, for example, 1 USD = 1000000 - # micros). - # @!attribute [rw] currency_code - # @return [::String] - # The currency of the price using three-letter acronyms according to [ISO - # 4217](http://en.wikipedia.org/wiki/ISO_4217). - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents custom attributes. Exactly one of `value` or - # `group_values` must not be empty. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute. - # @!attribute [rw] value - # @return [::String] - # The value of the attribute. If `value` is not empty, `group_values` must be - # empty. - # @!attribute [rw] group_values - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Subattributes within this attribute group. If - # `group_values` is not empty, `value` must be empty. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations available for a product. - # - # Destinations are used in Merchant Center to allow you to control where the - # products from your data feed should be displayed. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Destination values. - module DestinationEnum - # Not specified. - DESTINATION_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/google-ads/answer/2454022). - SHOPPING_ADS = 1 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 2 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3057972). - LOCAL_INVENTORY_ADS = 3 - - # [Free listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 4 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 5 - - # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). - YOUTUBE_SHOPPING = 6 - - # Youtube shopping checkout. - YOUTUBE_SHOPPING_CHECKOUT = 7 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 8 - - # [Free vehicle - # listings](https://support.google.com/merchants/answer/11189169). - FREE_VEHICLE_LISTINGS = 9 - - # [Vehicle ads](https://support.google.com/merchants/answer/11189169). - VEHICLE_ADS = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - end - end - - # Reporting contexts that your account and product issues apply to. - # - # Reporting contexts are groups of surfaces and formats for product results on - # Google. They can represent the entire destination (for example, [Shopping - # ads](https://support.google.com/merchants/answer/6149970)) or a subset of - # formats within a destination (for example, [Demand Gen - # ads](https://support.google.com/merchants/answer/13389785)). - class ReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reporting context values. - module ReportingContextEnum - # Not specified. - REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/merchants/answer/6149970). - SHOPPING_ADS = 1 - - # Deprecated: Use `DEMAND_GEN_ADS` instead. - # [Discovery and Demand Gen - # ads](https://support.google.com/merchants/answer/13389785). - DISCOVERY_ADS = 2 - - # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS = 13 - - # [Demand Gen ads on Discover - # surface](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 - - # [Video ads](https://support.google.com/google-ads/answer/6340491). - VIDEO_ADS = 3 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 4 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3271956). - LOCAL_INVENTORY_ADS = 5 - - # [Vehicle inventory - # ads](https://support.google.com/merchants/answer/11544533). - VEHICLE_INVENTORY_ADS = 6 - - # [Free product - # listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 7 - - # [Free product listings on UCP - # checkout](https://developers.google.com/merchant/ucp). - FREE_LISTINGS_UCP_CHECKOUT = 19 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 8 - - # [Free local vehicle - # listings](https://support.google.com/merchants/answer/11544533). - FREE_LOCAL_VEHICLE_LISTINGS = 9 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 18 - - # [YouTube - # Shopping](https://support.google.com/merchants/answer/13478370). - YOUTUBE_SHOPPING = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - - # [Product - # Reviews](https://support.google.com/merchants/answer/14620732). - PRODUCT_REVIEWS = 15 - - # [Merchant - # Reviews](https://developers.google.com/merchant-review-feeds). - MERCHANT_REVIEWS = 16 - - # YouTube Checkout - # . - YOUTUBE_CHECKOUT = 17 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/Gemfile deleted file mode 100644 index 6f7c12b08868..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1", path: "../" -else - gem "google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb deleted file mode 100644 index b316457043a2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.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 merchantapi_v1_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync] -require "google/shopping/merchant/issue_resolution/v1" - -## -# Snippet for the list_aggregate_product_statuses call in the AggregateProductStatusesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client#list_aggregate_product_statuses. -# -def list_aggregate_product_statuses - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new - - # Call the list_aggregate_product_statuses method. - result = client.list_aggregate_product_statuses request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus. - p item - end -end -# [END merchantapi_v1_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync] diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_account_issues.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_account_issues.rb deleted file mode 100644 index 6b8413954d39..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_account_issues.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_IssueResolutionService_RenderAccountIssues_sync] -require "google/shopping/merchant/issue_resolution/v1" - -## -# Snippet for the render_account_issues call in the IssueResolutionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_account_issues. -# -def render_account_issues - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new - - # Call the render_account_issues method. - result = client.render_account_issues request - - # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse. - p result -end -# [END merchantapi_v1_generated_IssueResolutionService_RenderAccountIssues_sync] diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_product_issues.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_product_issues.rb deleted file mode 100644 index 8c5a2a43aeaf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_product_issues.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_IssueResolutionService_RenderProductIssues_sync] -require "google/shopping/merchant/issue_resolution/v1" - -## -# Snippet for the render_product_issues call in the IssueResolutionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_product_issues. -# -def render_product_issues - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new - - # Call the render_product_issues method. - result = client.render_product_issues request - - # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse. - p result -end -# [END merchantapi_v1_generated_IssueResolutionService_RenderProductIssues_sync] diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/trigger_action.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/trigger_action.rb deleted file mode 100644 index dbedd51f6b27..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/trigger_action.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_IssueResolutionService_TriggerAction_sync] -require "google/shopping/merchant/issue_resolution/v1" - -## -# Snippet for the trigger_action call in the IssueResolutionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#trigger_action. -# -def trigger_action - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new - - # Call the trigger_action method. - result = client.trigger_action request - - # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse. - p result -end -# [END merchantapi_v1_generated_IssueResolutionService_TriggerAction_sync] diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json deleted file mode 100644 index 6a707c6d46ec..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-issue_resolution-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.issueresolution.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync", - "title": "Snippet for the list_aggregate_product_statuses call in the AggregateProductStatusesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client#list_aggregate_product_statuses.", - "file": "aggregate_product_statuses_service/list_aggregate_product_statuses.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_aggregate_product_statuses", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client#list_aggregate_product_statuses", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse", - "client": { - "short_name": "AggregateProductStatusesService::Client", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client" - }, - "method": { - "short_name": "ListAggregateProductStatuses", - "full_name": "google.shopping.merchant.issueresolution.v1.AggregateProductStatusesService.ListAggregateProductStatuses", - "service": { - "short_name": "AggregateProductStatusesService", - "full_name": "google.shopping.merchant.issueresolution.v1.AggregateProductStatusesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_IssueResolutionService_RenderAccountIssues_sync", - "title": "Snippet for the render_account_issues call in the IssueResolutionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_account_issues.", - "file": "issue_resolution_service/render_account_issues.rb", - "language": "RUBY", - "client_method": { - "short_name": "render_account_issues", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_account_issues", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse", - "client": { - "short_name": "IssueResolutionService::Client", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client" - }, - "method": { - "short_name": "RenderAccountIssues", - "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService.RenderAccountIssues", - "service": { - "short_name": "IssueResolutionService", - "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_IssueResolutionService_RenderProductIssues_sync", - "title": "Snippet for the render_product_issues call in the IssueResolutionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_product_issues.", - "file": "issue_resolution_service/render_product_issues.rb", - "language": "RUBY", - "client_method": { - "short_name": "render_product_issues", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_product_issues", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse", - "client": { - "short_name": "IssueResolutionService::Client", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client" - }, - "method": { - "short_name": "RenderProductIssues", - "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService.RenderProductIssues", - "service": { - "short_name": "IssueResolutionService", - "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_IssueResolutionService_TriggerAction_sync", - "title": "Snippet for the trigger_action call in the IssueResolutionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#trigger_action.", - "file": "issue_resolution_service/trigger_action.rb", - "language": "RUBY", - "client_method": { - "short_name": "trigger_action", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#trigger_action", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse", - "client": { - "short_name": "IssueResolutionService::Client", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client" - }, - "method": { - "short_name": "TriggerAction", - "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService.TriggerAction", - "service": { - "short_name": "IssueResolutionService", - "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService" - } - } - }, - "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-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_paths_test.rb deleted file mode 100644 index 1abada010c8f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_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/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service" - -class ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_rest_test.rb deleted file mode 100644 index 83f7cf4eae3e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_rest_test.rb +++ /dev/null @@ -1,156 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb" -require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest" - - -class ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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_aggregate_product_statuses - # Create test objects. - client_result = ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse.new - http_response = OpenStruct.new 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_aggregate_product_statuses_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::ServiceStub.stub :transcode_list_aggregate_product_statuses_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_aggregate_product_statuses_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_aggregate_product_statuses({ 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_aggregate_product_statuses 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_aggregate_product_statuses ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.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_aggregate_product_statuses({ 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_aggregate_product_statuses(::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.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_aggregate_product_statuses_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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.rb deleted file mode 100644 index 2eaf49ffd4ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb" -require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service" - -class ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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_aggregate_product_statuses - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_aggregate_product_statuses_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_aggregate_product_statuses, name - assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest, 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_aggregate_product_statuses_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_aggregate_product_statuses({ 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_aggregate_product_statuses 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_aggregate_product_statuses ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.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_aggregate_product_statuses({ 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_aggregate_product_statuses(::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.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_aggregate_product_statuses_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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_paths_test.rb deleted file mode 100644 index 770b546a8c38..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_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/shopping/merchant/issue_resolution/v1/issue_resolution_service" - -class ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_path account: "value0", product: "value1" - assert_equal "accounts/value0/products/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_rest_test.rb deleted file mode 100644 index 1224ce7d284b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_rest_test.rb +++ /dev/null @@ -1,269 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/issueresolution/v1/issueresolution_pb" -require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest" - - -class ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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_render_account_issues - # Create test objects. - client_result = ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - language_code = "hello world" - time_zone = "hello world" - payload = {} - - render_account_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::ServiceStub.stub :transcode_render_account_issues_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, render_account_issues_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.render_account_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.render_account_issues ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.render_account_issues(::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, render_account_issues_client_stub.call_count - end - end - end - - def test_render_product_issues - # Create test objects. - client_result = ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - language_code = "hello world" - time_zone = "hello world" - payload = {} - - render_product_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::ServiceStub.stub :transcode_render_product_issues_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, render_product_issues_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.render_product_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.render_product_issues ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.render_product_issues(::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, render_product_issues_client_stub.call_count - end - end - end - - def test_trigger_action - # Create test objects. - client_result = ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - payload = {} - language_code = "hello world" - - trigger_action_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::ServiceStub.stub :transcode_trigger_action_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, trigger_action_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.trigger_action({ name: name, payload: payload, language_code: language_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.trigger_action name: name, payload: payload, language_code: language_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.trigger_action ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.trigger_action({ name: name, payload: payload, language_code: language_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.trigger_action(::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, trigger_action_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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb deleted file mode 100644 index 4ee039931c15..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb +++ /dev/null @@ -1,294 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/issueresolution/v1/issueresolution_pb" -require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service" - -class ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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_render_account_issues - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - language_code = "hello world" - time_zone = "hello world" - payload = {} - - render_account_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :render_account_issues, name - assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["language_code"] - assert_equal "hello world", request["time_zone"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload), request["payload"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, render_account_issues_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.render_account_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.render_account_issues ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.render_account_issues(::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, render_account_issues_client_stub.call_rpc_count - end - end - - def test_render_product_issues - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - language_code = "hello world" - time_zone = "hello world" - payload = {} - - render_product_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :render_product_issues, name - assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["language_code"] - assert_equal "hello world", request["time_zone"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload), request["payload"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, render_product_issues_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.render_product_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.render_product_issues ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.render_product_issues(::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, render_product_issues_client_stub.call_rpc_count - end - end - - def test_trigger_action - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - payload = {} - language_code = "hello world" - - trigger_action_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :trigger_action, name - assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionPayload), request["payload"] - assert_equal "hello world", request["language_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, trigger_action_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.trigger_action({ name: name, payload: payload, language_code: language_code }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.trigger_action name: name, payload: payload, language_code: language_code do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.trigger_action ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.trigger_action({ name: name, payload: payload, 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.trigger_action(::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new(name: name, payload: payload, 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, trigger_action_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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-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-shopping-merchant-issue_resolution-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.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-shopping-merchant-issue_resolution-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.repo-metadata.json deleted file mode 100644 index b3093d31ccee..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1beta", - "distribution_name": "google-shopping-merchant-issue_resolution-v1beta", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1BETA API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-issue_resolution-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-issue_resolution instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.rubocop.yml deleted file mode 100644 index b16689bf7e9e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-issue_resolution-v1beta.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-shopping-merchant-issue_resolution-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.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-shopping-merchant-issue_resolution-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant V1BETA 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-shopping-merchant-issue_resolution-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/AUTHENTICATION.md deleted file mode 100644 index 76c2794553f5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta 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/shopping/merchant/issue_resolution/v1beta" - -client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/issue_resolution/v1beta" - -::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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-shopping-merchant-issue_resolution-v1beta -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/shopping/merchant/issue_resolution/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/README.md deleted file mode 100644 index 433fb3188a1d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Merchant V1BETA API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1BETA API. Most users should consider using -the main client gem, -[google-shopping-merchant-issue_resolution](https://rubygems.org/gems/google-shopping-merchant-issue_resolution). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-issue_resolution-v1beta -``` - -## 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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/issue_resolution/v1beta" - -client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new -request = ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.new # (request fields as keyword arguments...) -response = client.list_aggregate_product_statuses request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1beta) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/issue_resolution/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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-shopping-merchant-issue_resolution`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-issue_resolution-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-shopping-merchant-issue_resolution`. -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-shopping-merchant-issue_resolution-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/Rakefile deleted file mode 100644 index e2ee4797db27..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta 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/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials" - ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-issue_resolution-v1beta" - header "google-shopping-merchant-issue_resolution-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-issue_resolution-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/gapic_metadata.json deleted file mode 100644 index 1ffcf21af1a9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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.shopping.merchant.issueresolution.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::IssueResolution::V1beta", - "services": { - "AggregateProductStatusesService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client", - "rpcs": { - "ListAggregateProductStatuses": { - "methods": [ - "list_aggregate_product_statuses" - ] - } - } - } - } - }, - "IssueResolutionService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client", - "rpcs": { - "RenderAccountIssues": { - "methods": [ - "render_account_issues" - ] - }, - "RenderProductIssues": { - "methods": [ - "render_product_issues" - ] - }, - "TriggerAction": { - "methods": [ - "trigger_action" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec deleted file mode 100644 index 0bc07031b4df..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/issue_resolution/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-issue_resolution-v1beta" - gem.version = Google::Shopping::Merchant::IssueResolution::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-issue_resolution-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-issue_resolution instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center Accounts." - 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-shopping-type", "~> 1.0" -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google-shopping-merchant-issue_resolution-v1beta.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google-shopping-merchant-issue_resolution-v1beta.rb deleted file mode 100644 index 72022ec743f3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google-shopping-merchant-issue_resolution-v1beta.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/shopping/merchant/issue_resolution/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb deleted file mode 100644 index 8fda20606fab..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.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 "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" -require "google/shopping/merchant/issue_resolution/v1beta/version" - -module Google - module Shopping - module Merchant - module IssueResolution - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/issue_resolution/v1beta" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/issue_resolution/v1beta" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/issue_resolution/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service.rb deleted file mode 100644 index 489d7d56aa33..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/issue_resolution/v1beta/version" - -require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials" -require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths" -require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/client" -require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - ## - # Service to manage aggregate product statuses. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new - # - module AggregateProductStatusesService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "aggregate_product_statuses_service", "helpers.rb" -require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/client.rb deleted file mode 100644 index 444ca6b6331a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/client.rb +++ /dev/null @@ -1,508 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - module AggregateProductStatusesService - ## - # Client for the AggregateProductStatusesService service. - # - # Service to manage aggregate product statuses. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :aggregate_product_statuses_service_stub - - ## - # Configure the AggregateProductStatusesService Client class. - # - # See {::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AggregateProductStatusesService clients - # ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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", "Shopping", "Merchant", "IssueResolution", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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 - @aggregate_product_statuses_service_stub.universe_domain - end - - ## - # Create a new AggregateProductStatusesService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AggregateProductStatusesService 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/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_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 - - @aggregate_product_statuses_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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 - ) - - @aggregate_product_statuses_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 - @aggregate_product_statuses_service_stub.logger - end - - # Service calls - - ## - # Lists the `AggregateProductStatuses` resources for your merchant account. - # The response might contain fewer items than specified by `pageSize`. - # If `pageToken` was returned in previous request, it can be used to obtain - # additional results. - # - # @overload list_aggregate_product_statuses(request, options = nil) - # Pass arguments to `list_aggregate_product_statuses` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_aggregate_product_statuses(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_aggregate_product_statuses` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list aggregate product statuses for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of aggregate product statuses to return. The - # service may return fewer than this value. If unspecified, at most 25 - # aggregate product statuses are returned. The maximum value is 250; values - # above 250 are coerced to 250. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListAggregateProductStatuses` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAggregateProductStatuses` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. A filter expression that filters the aggregate product statuses. - # Filtering is only supported by the `reporting_context` and `country` field. - # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.new - # - # # Call the list_aggregate_product_statuses method. - # result = client.list_aggregate_product_statuses request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus. - # p item - # end - # - def list_aggregate_product_statuses request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_aggregate_product_statuses.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_aggregate_product_statuses.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_aggregate_product_statuses.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aggregate_product_statuses_service_stub.call_rpc :list_aggregate_product_statuses, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @aggregate_product_statuses_service_stub, :list_aggregate_product_statuses, 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 AggregateProductStatusesService API. - # - # This class represents the configuration for AggregateProductStatusesService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_aggregate_product_statuses to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AggregateProductStatusesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_aggregate_product_statuses` - # @return [::Gapic::Config::Method] - # - attr_reader :list_aggregate_product_statuses - - # @private - def initialize parent_rpcs = nil - list_aggregate_product_statuses_config = parent_rpcs.list_aggregate_product_statuses if parent_rpcs.respond_to? :list_aggregate_product_statuses - @list_aggregate_product_statuses = ::Gapic::Config::Method.new list_aggregate_product_statuses_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials.rb deleted file mode 100644 index c58cab29d191..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_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 Shopping - module Merchant - module IssueResolution - module V1beta - module AggregateProductStatusesService - # Credentials for the AggregateProductStatusesService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths.rb deleted file mode 100644 index 741d232919af..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths.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 Shopping - module Merchant - module IssueResolution - module V1beta - module AggregateProductStatusesService - # Path helper methods for the AggregateProductStatusesService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest.rb deleted file mode 100644 index 3b47bb28fc7e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_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/shopping/merchant/issue_resolution/v1beta/version" - -require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials" -require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths" -require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/client" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - ## - # Service to manage aggregate product statuses. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new - # - module AggregateProductStatusesService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/client.rb deleted file mode 100644 index 68fa3b664182..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/client.rb +++ /dev/null @@ -1,458 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb" -require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - module AggregateProductStatusesService - module Rest - ## - # REST client for the AggregateProductStatusesService service. - # - # Service to manage aggregate product statuses. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :aggregate_product_statuses_service_stub - - ## - # Configure the AggregateProductStatusesService Client class. - # - # See {::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AggregateProductStatusesService clients - # ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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", "Shopping", "Merchant", "IssueResolution", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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 - @aggregate_product_statuses_service_stub.universe_domain - end - - ## - # Create a new AggregateProductStatusesService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AggregateProductStatusesService 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 - - @aggregate_product_statuses_service_stub = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @aggregate_product_statuses_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 - @aggregate_product_statuses_service_stub.logger - end - - # Service calls - - ## - # Lists the `AggregateProductStatuses` resources for your merchant account. - # The response might contain fewer items than specified by `pageSize`. - # If `pageToken` was returned in previous request, it can be used to obtain - # additional results. - # - # @overload list_aggregate_product_statuses(request, options = nil) - # Pass arguments to `list_aggregate_product_statuses` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_aggregate_product_statuses(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_aggregate_product_statuses` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list aggregate product statuses for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of aggregate product statuses to return. The - # service may return fewer than this value. If unspecified, at most 25 - # aggregate product statuses are returned. The maximum value is 250; values - # above 250 are coerced to 250. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListAggregateProductStatuses` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAggregateProductStatuses` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. A filter expression that filters the aggregate product statuses. - # Filtering is only supported by the `reporting_context` and `country` field. - # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.new - # - # # Call the list_aggregate_product_statuses method. - # result = client.list_aggregate_product_statuses request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus. - # p item - # end - # - def list_aggregate_product_statuses request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_aggregate_product_statuses.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_aggregate_product_statuses.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_aggregate_product_statuses.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aggregate_product_statuses_service_stub.list_aggregate_product_statuses request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @aggregate_product_statuses_service_stub, :list_aggregate_product_statuses, "aggregate_product_statuses", request, result, 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 AggregateProductStatusesService REST API. - # - # This class represents the configuration for AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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_aggregate_product_statuses to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AggregateProductStatusesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_aggregate_product_statuses` - # @return [::Gapic::Config::Method] - # - attr_reader :list_aggregate_product_statuses - - # @private - def initialize parent_rpcs = nil - list_aggregate_product_statuses_config = parent_rpcs.list_aggregate_product_statuses if parent_rpcs.respond_to? :list_aggregate_product_statuses - @list_aggregate_product_statuses = ::Gapic::Config::Method.new list_aggregate_product_statuses_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/service_stub.rb deleted file mode 100644 index ff6086c473ef..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/service_stub.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! - -require "google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - module AggregateProductStatusesService - module Rest - ## - # REST service stub for the AggregateProductStatusesService 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_aggregate_product_statuses REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse] - # A result object deserialized from the server's reply - def list_aggregate_product_statuses request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_aggregate_product_statuses_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_aggregate_product_statuses", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse.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_aggregate_product_statuses REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_aggregate_product_statuses_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/issueresolution/v1beta/{parent}/aggregateProductStatuses", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb deleted file mode 100644 index 1b9082b49dac..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_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/shopping/merchant/issue_resolution/v1beta/version" - -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - ## - # Service to provide an issue resolution content for account issues and product - # issues. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new - # - module IssueResolutionService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "issue_resolution_service", "helpers.rb" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb deleted file mode 100644 index 990770c9374b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb +++ /dev/null @@ -1,709 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - module IssueResolutionService - ## - # Client for the IssueResolutionService service. - # - # Service to provide an issue resolution content for account issues and product - # issues. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :issue_resolution_service_stub - - ## - # Configure the IssueResolutionService Client class. - # - # See {::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all IssueResolutionService clients - # ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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", "Shopping", "Merchant", "IssueResolution", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 - @issue_resolution_service_stub.universe_domain - end - - ## - # Create a new IssueResolutionService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the IssueResolutionService 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/shopping/merchant/issueresolution/v1beta/issueresolution_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 - - @issue_resolution_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 - ) - - @issue_resolution_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 - @issue_resolution_service_stub.logger - end - - # Service calls - - ## - # Provide a list of business's account issues with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - # - # @overload render_account_issues(request, options = nil) - # Pass arguments to `render_account_issues` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload render_account_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) - # Pass arguments to `render_account_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The account to fetch issues for. - # Format: `accounts/{account}` - # @param language_code [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize issue resolution content. If not set, the result will - # be in default language `en-US`. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload, ::Hash] - # Optional. The payload for configuring how the content should be rendered. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new - # - # # Call the render_account_issues method. - # result = client.render_account_issues request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse. - # p result - # - def render_account_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.render_account_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.render_account_issues.timeout, - metadata: metadata, - retry_policy: @config.rpcs.render_account_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.call_rpc :render_account_issues, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Provide a list of issues for business's product with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - # - # @overload render_product_issues(request, options = nil) - # Pass arguments to `render_product_issues` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload render_product_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) - # Pass arguments to `render_product_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the product to fetch issues for. - # Format: `accounts/{account}/products/{product}` - # @param language_code [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize an issue resolution content. If not set, the result - # will be in default language `en-US`. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload, ::Hash] - # Optional. The payload for configuring how the content should be rendered. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new - # - # # Call the render_product_issues method. - # result = client.render_product_issues request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse. - # p result - # - def render_product_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.render_product_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.render_product_issues.timeout, - metadata: metadata, - retry_policy: @config.rpcs.render_product_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.call_rpc :render_product_issues, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Start an action. The action can be requested by a business in - # third-party application. Before the business can request the action, the - # third-party application needs to show them action specific content and - # display a user input form. - # - # The action can be successfully started only once all `required` inputs are - # provided. If any `required` input is missing, or invalid value was - # provided, the service will return 400 error. Validation errors will contain - # {::Google::Shopping::Merchant::IssueResolution::V1beta::InputField#id Ids} for - # all problematic field together with translated, human readable error - # messages that can be shown to the user. - # - # @overload trigger_action(request, options = nil) - # Pass arguments to `trigger_action` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload trigger_action(name: nil, payload: nil, language_code: nil) - # Pass arguments to `trigger_action` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The business's account that is triggering the action. - # Format: `accounts/{account}` - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload, ::Hash] - # Required. The payload for the triggered action. - # @param language_code [::String] - # Optional. Language code [IETF BCP 47 - # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. - # If not set, the result will be in default language `en-US`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new - # - # # Call the trigger_action method. - # result = client.trigger_action request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse. - # p result - # - def trigger_action request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.trigger_action.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.trigger_action.timeout, - metadata: metadata, - retry_policy: @config.rpcs.trigger_action.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.call_rpc :trigger_action, request, 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 IssueResolutionService API. - # - # This class represents the configuration for IssueResolutionService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # render_account_issues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.render_account_issues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.render_account_issues.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 IssueResolutionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `render_account_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :render_account_issues - ## - # RPC-specific configuration for `render_product_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :render_product_issues - ## - # RPC-specific configuration for `trigger_action` - # @return [::Gapic::Config::Method] - # - attr_reader :trigger_action - - # @private - def initialize parent_rpcs = nil - render_account_issues_config = parent_rpcs.render_account_issues if parent_rpcs.respond_to? :render_account_issues - @render_account_issues = ::Gapic::Config::Method.new render_account_issues_config - render_product_issues_config = parent_rpcs.render_product_issues if parent_rpcs.respond_to? :render_product_issues - @render_product_issues = ::Gapic::Config::Method.new render_product_issues_config - trigger_action_config = parent_rpcs.trigger_action if parent_rpcs.respond_to? :trigger_action - @trigger_action = ::Gapic::Config::Method.new trigger_action_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb deleted file mode 100644 index eccf576084f2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_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 Shopping - module Merchant - module IssueResolution - module V1beta - module IssueResolutionService - # Credentials for the IssueResolutionService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths.rb deleted file mode 100644 index f14b1990aa3c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_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 Shopping - module Merchant - module IssueResolution - module V1beta - module IssueResolutionService - # Path helper methods for the IssueResolutionService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified Product resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/products/{product}` - # - # @param account [String] - # @param product [String] - # - # @return [::String] - def product_path account:, product: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/products/#{product}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest.rb deleted file mode 100644 index 72b6ca65e326..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_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/shopping/merchant/issue_resolution/v1beta/version" - -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - ## - # Service to provide an issue resolution content for account issues and product - # issues. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new - # - module IssueResolutionService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb deleted file mode 100644 index e4eaf91a4c59..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb +++ /dev/null @@ -1,645 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - module IssueResolutionService - module Rest - ## - # REST client for the IssueResolutionService service. - # - # Service to provide an issue resolution content for account issues and product - # issues. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :issue_resolution_service_stub - - ## - # Configure the IssueResolutionService Client class. - # - # See {::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all IssueResolutionService clients - # ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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", "Shopping", "Merchant", "IssueResolution", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 - @issue_resolution_service_stub.universe_domain - end - - ## - # Create a new IssueResolutionService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the IssueResolutionService 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 - - @issue_resolution_service_stub = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @issue_resolution_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 - @issue_resolution_service_stub.logger - end - - # Service calls - - ## - # Provide a list of business's account issues with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - # - # @overload render_account_issues(request, options = nil) - # Pass arguments to `render_account_issues` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload render_account_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) - # Pass arguments to `render_account_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The account to fetch issues for. - # Format: `accounts/{account}` - # @param language_code [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize issue resolution content. If not set, the result will - # be in default language `en-US`. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload, ::Hash] - # Optional. The payload for configuring how the content should be rendered. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new - # - # # Call the render_account_issues method. - # result = client.render_account_issues request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse. - # p result - # - def render_account_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.render_account_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.render_account_issues.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.render_account_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.render_account_issues request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Provide a list of issues for business's product with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - # - # @overload render_product_issues(request, options = nil) - # Pass arguments to `render_product_issues` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload render_product_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) - # Pass arguments to `render_product_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the product to fetch issues for. - # Format: `accounts/{account}/products/{product}` - # @param language_code [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize an issue resolution content. If not set, the result - # will be in default language `en-US`. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload, ::Hash] - # Optional. The payload for configuring how the content should be rendered. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new - # - # # Call the render_product_issues method. - # result = client.render_product_issues request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse. - # p result - # - def render_product_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.render_product_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.render_product_issues.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.render_product_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.render_product_issues request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Start an action. The action can be requested by a business in - # third-party application. Before the business can request the action, the - # third-party application needs to show them action specific content and - # display a user input form. - # - # The action can be successfully started only once all `required` inputs are - # provided. If any `required` input is missing, or invalid value was - # provided, the service will return 400 error. Validation errors will contain - # {::Google::Shopping::Merchant::IssueResolution::V1beta::InputField#id Ids} for - # all problematic field together with translated, human readable error - # messages that can be shown to the user. - # - # @overload trigger_action(request, options = nil) - # Pass arguments to `trigger_action` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload trigger_action(name: nil, payload: nil, language_code: nil) - # Pass arguments to `trigger_action` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The business's account that is triggering the action. - # Format: `accounts/{account}` - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload, ::Hash] - # Required. The payload for the triggered action. - # @param language_code [::String] - # Optional. Language code [IETF BCP 47 - # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. - # If not set, the result will be in default language `en-US`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new - # - # # Call the trigger_action method. - # result = client.trigger_action request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse. - # p result - # - def trigger_action request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.trigger_action.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.trigger_action.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.trigger_action.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.trigger_action request, 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 IssueResolutionService REST API. - # - # This class represents the configuration for IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 - # # render_account_issues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.render_account_issues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.render_account_issues.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 IssueResolutionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `render_account_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :render_account_issues - ## - # RPC-specific configuration for `render_product_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :render_product_issues - ## - # RPC-specific configuration for `trigger_action` - # @return [::Gapic::Config::Method] - # - attr_reader :trigger_action - - # @private - def initialize parent_rpcs = nil - render_account_issues_config = parent_rpcs.render_account_issues if parent_rpcs.respond_to? :render_account_issues - @render_account_issues = ::Gapic::Config::Method.new render_account_issues_config - render_product_issues_config = parent_rpcs.render_product_issues if parent_rpcs.respond_to? :render_product_issues - @render_product_issues = ::Gapic::Config::Method.new render_product_issues_config - trigger_action_config = parent_rpcs.trigger_action if parent_rpcs.respond_to? :trigger_action - @trigger_action = ::Gapic::Config::Method.new trigger_action_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb deleted file mode 100644 index da239060f51e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb +++ /dev/null @@ -1,269 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/issueresolution/v1beta/issueresolution_pb" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - module IssueResolutionService - module Rest - ## - # REST service stub for the IssueResolutionService 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 render_account_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] - # A result object deserialized from the server's reply - def render_account_issues request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_render_account_issues_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "render_account_issues", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the render_product_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] - # A result object deserialized from the server's reply - def render_product_issues request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_render_product_issues_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "render_product_issues", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the trigger_action REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] - # A result object deserialized from the server's reply - def trigger_action request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_trigger_action_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "trigger_action", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse.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 render_account_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_render_account_issues_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/issueresolution/v1beta/{name}:renderaccountissues", - body: "payload", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the render_product_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_render_product_issues_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/issueresolution/v1beta/{name}:renderproductissues", - body: "payload", - matches: [ - ["name", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the trigger_action REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_trigger_action_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/issueresolution/v1beta/{name}:triggeraction", - body: "payload", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb deleted file mode 100644 index 1c59e12954b2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/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/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" -require "google/shopping/merchant/issue_resolution/v1beta/version" - -module Google - module Shopping - module Merchant - module IssueResolution - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/issue_resolution/v1beta/rest" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb deleted file mode 100644 index 922af54d10ff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/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 Shopping - module Merchant - module IssueResolution - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb.rb deleted file mode 100644 index 85bcd8b3f4d4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.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/shopping/type/types_pb' - - -descriptor_data = "\nNgoogle/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.proto\x12/google.shopping.merchant.issueresolution.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xb6\x01\n#ListAggregateProductStatusesRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31merchantapi.googleapis.com/AggregateProductStatus\x12\x16\n\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\"\xac\x01\n$ListAggregateProductStatusesResponse\x12k\n\x1a\x61ggregate_product_statuses\x18\x01 \x03(\x0b\x32G.google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa4\t\n\x16\x41ggregateProductStatus\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12V\n\x11reporting_context\x18\x03 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\x12\x0f\n\x07\x63ountry\x18\x04 \x01(\t\x12\\\n\x05stats\x18\x05 \x01(\x0b\x32M.google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.Stats\x12q\n\x11item_level_issues\x18\x06 \x03(\x0b\x32V.google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue\x1ag\n\x05Stats\x12\x14\n\x0c\x61\x63tive_count\x18\x01 \x01(\x03\x12\x15\n\rpending_count\x18\x02 \x01(\x03\x12\x19\n\x11\x64isapproved_count\x18\x03 \x01(\x03\x12\x16\n\x0e\x65xpiring_count\x18\x04 \x01(\x03\x1a\x9f\x04\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12q\n\x08severity\x18\x02 \x01(\x0e\x32_.google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue.Severity\x12u\n\nresolution\x18\x03 \x01(\x0e\x32\x61.google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue.Resolution\x12\x11\n\tattribute\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x07 \x01(\t\x12\x19\n\x11\x64ocumentation_uri\x18\x08 \x01(\t\x12\x15\n\rproduct_count\x18\t \x01(\x03\"T\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0b\n\x07\x44\x45MOTED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03\"U\n\nResolution\x12\x1a\n\x16RESOLUTION_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_ACTION\x10\x01\x12\x16\n\x12PENDING_PROCESSING\x10\x02:\xb1\x01\xea\x41\xad\x01\n1merchantapi.googleapis.com/AggregateProductStatus\x12\x46\x61\x63\x63ounts/{account}/aggregateProductStatuses/{aggregate_product_status}*\x18\x61ggregateProductStatuses2\x16\x61ggregateProductStatus2\x8f\x03\n\x1f\x41ggregateProductStatusesService\x12\xa2\x02\n\x1cListAggregateProductStatuses\x12T.google.shopping.merchant.issueresolution.v1beta.ListAggregateProductStatusesRequest\x1aU.google.shopping.merchant.issueresolution.v1beta.ListAggregateProductStatusesResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/issueresolution/v1beta/{parent=accounts/*}/aggregateProductStatuses\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xd5\x02\n3com.google.shopping.merchant.issueresolution.v1betaB\x1d\x41ggregateProductStatusesProtoP\x01Zccloud.google.com/go/shopping/merchant/issueresolution/apiv1beta/issueresolutionpb;issueresolutionpb\xaa\x02/Google.Shopping.Merchant.IssueResolution.V1Beta\xca\x02/Google\\Shopping\\Merchant\\IssueResolution\\V1beta\xea\x02\x33Google::Shopping::Merchant::IssueResolution::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - ListAggregateProductStatusesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ListAggregateProductStatusesRequest").msgclass - ListAggregateProductStatusesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ListAggregateProductStatusesResponse").msgclass - AggregateProductStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus").msgclass - AggregateProductStatus::Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.Stats").msgclass - AggregateProductStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue").msgclass - AggregateProductStatus::ItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue.Severity").enummodule - AggregateProductStatus::ItemLevelIssue::Resolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue.Resolution").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_services_pb.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_services_pb.rb deleted file mode 100644 index 1b071933d7bf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.proto for package 'Google.Shopping.Merchant.IssueResolution.V1beta' -# 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/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb' - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - module AggregateProductStatusesService - # Service to manage aggregate product statuses. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.issueresolution.v1beta.AggregateProductStatusesService' - - # Lists the `AggregateProductStatuses` resources for your merchant account. - # The response might contain fewer items than specified by `pageSize`. - # If `pageToken` was returned in previous request, it can be used to obtain - # additional results. - rpc :ListAggregateProductStatuses, ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest, ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb deleted file mode 100644 index bbfba5124255..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/issueresolution/v1beta/issueresolution.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 = "\nEgoogle/shopping/merchant/issueresolution/v1beta/issueresolution.proto\x12/google.shopping.merchant.issueresolution.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"v\n\x1bRenderAccountIssuesResponse\x12W\n\x0frendered_issues\x18\x01 \x03(\x0b\x32>.google.shopping.merchant.issueresolution.v1beta.RenderedIssue\"\xed\x01\n\x1aRenderAccountIssuesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x07payload\x18\x04 \x01(\x0b\x32K.google.shopping.merchant.issueresolution.v1beta.RenderIssuesRequestPayloadB\x03\xe0\x41\x01\"\xab\x02\n\x1aRenderIssuesRequestPayload\x12`\n\x0e\x63ontent_option\x18\x01 \x01(\x0e\x32>.google.shopping.merchant.issueresolution.v1beta.ContentOptionB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12{\n\x18user_input_action_option\x18\x02 \x01(\x0e\x32O.google.shopping.merchant.issueresolution.v1beta.UserInputActionRenderingOptionB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x11\n\x0f_content_optionB\x1b\n\x19_user_input_action_option\"v\n\x1bRenderProductIssuesResponse\x12W\n\x0frendered_issues\x18\x01 \x03(\x0b\x32>.google.shopping.merchant.issueresolution.v1beta.RenderedIssue\"\xed\x01\n\x1aRenderProductIssuesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Product\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x07payload\x18\x04 \x01(\x0b\x32K.google.shopping.merchant.issueresolution.v1beta.RenderIssuesRequestPayloadB\x03\xe0\x41\x01\"\xb5\x02\n\rRenderedIssue\x12\x1d\n\x13prerendered_content\x18\x03 \x01(\tH\x00\x12\x35\n+prerendered_out_of_court_dispute_settlement\x18\x05 \x01(\tH\x01\x12\r\n\x05title\x18\x01 \x01(\t\x12G\n\x06impact\x18\x02 \x01(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1beta.Impact\x12H\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1beta.ActionB\t\n\x07\x63ontentB!\n\x1fout_of_court_dispute_settlement\"\xbb\x01\n\x06Impact\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12K\n\x08severity\x18\x02 \x01(\x0e\x32\x39.google.shopping.merchant.issueresolution.v1beta.Severity\x12N\n\nbreakdowns\x18\x03 \x03(\x0b\x32:.google.shopping.merchant.issueresolution.v1beta.Breakdown\"\x96\x01\n\tBreakdown\x12R\n\x07regions\x18\x01 \x03(\x0b\x32\x41.google.shopping.merchant.issueresolution.v1beta.Breakdown.Region\x12\x0f\n\x07\x64\x65tails\x18\x04 \x03(\t\x1a$\n\x06Region\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\xda\x04\n\x06\x41\x63tion\x12\x65\n\x15\x62uiltin_simple_action\x18\x02 \x01(\x0b\x32\x44.google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleActionH\x00\x12Z\n\x0f\x65xternal_action\x18\x03 \x01(\x0b\x32?.google.shopping.merchant.issueresolution.v1beta.ExternalActionH\x00\x12l\n\x19\x62uiltin_user_input_action\x18\x07 \x01(\x0b\x32G.google.shopping.merchant.issueresolution.v1beta.BuiltInUserInputActionH\x00\x12\x14\n\x0c\x62utton_label\x18\x04 \x01(\t\x12\x14\n\x0cis_available\x18\x05 \x01(\x08\x12O\n\x07reasons\x18\x06 \x03(\x0b\x32>.google.shopping.merchant.issueresolution.v1beta.Action.Reason\x1a\x97\x01\n\x06Reason\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x13\n\x06\x64\x65tail\x18\x02 \x01(\tH\x00\x88\x01\x01\x12Q\n\x06\x61\x63tion\x18\x03 \x01(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1beta.ActionB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\t\n\x07_detailB\t\n\x07_actionB\x08\n\x06\x61\x63tion\"\x98\x05\n\x13\x42uiltInSimpleAction\x12j\n\x04type\x18\x01 \x01(\x0e\x32\\.google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.BuiltInSimpleActionType\x12\x1b\n\x0e\x61ttribute_code\x18\x02 \x01(\tH\x00\x88\x01\x01\x12w\n\x12\x61\x64\x64itional_content\x18\x03 \x01(\x0b\x32V.google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.AdditionalContentH\x01\x88\x01\x01\x1a\x36\n\x11\x41\x64\x64itionalContent\x12\r\n\x05title\x18\x01 \x01(\t\x12\x12\n\nparagraphs\x18\x02 \x03(\t\"\x9c\x02\n\x17\x42uiltInSimpleActionType\x12+\n\'BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cVERIFY_PHONE\x10\x01\x12\x11\n\rCLAIM_WEBSITE\x10\x02\x12\x10\n\x0c\x41\x44\x44_PRODUCTS\x10\x03\x12\x14\n\x10\x41\x44\x44_CONTACT_INFO\x10\x04\x12\x14\n\x10LINK_ADS_ACCOUNT\x10\x05\x12$\n ADD_BUSINESS_REGISTRATION_NUMBER\x10\x06\x12\x17\n\x13\x45\x44IT_ITEM_ATTRIBUTE\x10\x07\x12\x15\n\x11\x46IX_ACCOUNT_ISSUE\x10\x08\x12\x1b\n\x17SHOW_ADDITIONAL_CONTENT\x10\tB\x11\n\x0f_attribute_codeB\x15\n\x13_additional_content\"|\n\x16\x42uiltInUserInputAction\x12\x16\n\x0e\x61\x63tion_context\x18\x01 \x01(\t\x12J\n\x05\x66lows\x18\x03 \x03(\x0b\x32;.google.shopping.merchant.issueresolution.v1beta.ActionFlow\"\x83\x03\n\nActionFlow\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12K\n\x06inputs\x18\x03 \x03(\x0b\x32;.google.shopping.merchant.issueresolution.v1beta.InputField\x12\x14\n\x0c\x64ialog_title\x18\x04 \x01(\t\x12]\n\x0e\x64ialog_message\x18\x07 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltipH\x00\x88\x01\x01\x12U\n\x0e\x64ialog_callout\x18\x08 \x01(\x0b\x32\x38.google.shopping.merchant.issueresolution.v1beta.CalloutH\x01\x88\x01\x01\x12\x1b\n\x13\x64ialog_button_label\x18\t \x01(\tB\x11\n\x0f_dialog_messageB\x11\n\x0f_dialog_callout\"\xb6\t\n\nInputField\x12[\n\ntext_input\x18\x04 \x01(\x0b\x32\x45.google.shopping.merchant.issueresolution.v1beta.InputField.TextInputH\x00\x12_\n\x0c\x63hoice_input\x18\x05 \x01(\x0b\x32G.google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInputH\x00\x12\x63\n\x0e\x63heckbox_input\x18\x06 \x01(\x0b\x32I.google.shopping.merchant.issueresolution.v1beta.InputField.CheckboxInputH\x00\x12\n\n\x02id\x18\x01 \x01(\t\x12O\n\x05label\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltip\x12\x10\n\x08required\x18\x03 \x01(\x08\x1a\x95\x03\n\tTextInput\x12\x61\n\x04type\x18\x01 \x01(\x0e\x32S.google.shopping.merchant.issueresolution.v1beta.InputField.TextInput.TextInputType\x12^\n\x0f\x61\x64\x64itional_info\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltipH\x00\x88\x01\x01\x12\x18\n\x0b\x66ormat_info\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x17\n\naria_label\x18\x04 \x01(\tH\x02\x88\x01\x01\"_\n\rTextInputType\x12\x1f\n\x1bTEXT_INPUT_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12GENERIC_SHORT_TEXT\x10\x01\x12\x15\n\x11GENERIC_LONG_TEXT\x10\x02\x42\x12\n\x10_additional_infoB\x0e\n\x0c_format_infoB\r\n\x0b_aria_label\x1a\xdd\x02\n\x0b\x43hoiceInput\x12j\n\x07options\x18\x01 \x03(\x0b\x32Y.google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput.ChoiceInputOption\x1a\xe1\x01\n\x11\x43hoiceInputOption\x12\n\n\x02id\x18\x01 \x01(\t\x12O\n\x05label\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltip\x12Z\n\x10\x61\x64\x64itional_input\x18\x03 \x01(\x0b\x32;.google.shopping.merchant.issueresolution.v1beta.InputFieldH\x00\x88\x01\x01\x42\x13\n\x11_additional_input\x1a\x0f\n\rCheckboxInputB\r\n\x0bvalue_input\"\xa2\x02\n\x0fTextWithTooltip\x12\x16\n\x0csimple_value\x18\x01 \x01(\tH\x00\x12\x1e\n\x14simple_tooltip_value\x18\x02 \x01(\tH\x01\x12m\n\x12tooltip_icon_style\x18\x03 \x01(\x0e\x32Q.google.shopping.merchant.issueresolution.v1beta.TextWithTooltip.TooltipIconStyle\"N\n\x10TooltipIconStyle\x12\"\n\x1eTOOLTIP_ICON_STYLE_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0c\n\x08QUESTION\x10\x02\x42\x07\n\x05valueB\x0f\n\rtooltip_value\"\x9a\x02\n\x07\x43\x61llout\x12]\n\nstyle_hint\x18\x01 \x01(\x0e\x32I.google.shopping.merchant.issueresolution.v1beta.Callout.CalloutStyleHint\x12V\n\x0c\x66ull_message\x18\x03 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltip\"X\n\x10\x43\x61lloutStyleHint\x12\"\n\x1e\x43\x41LLOUT_STYLE_HINT_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\x08\n\x04INFO\x10\x03\"\xdf\x02\n\x0e\x45xternalAction\x12`\n\x04type\x18\x01 \x01(\x0e\x32R.google.shopping.merchant.issueresolution.v1beta.ExternalAction.ExternalActionType\x12\x0b\n\x03uri\x18\x02 \x01(\t\"\xdd\x01\n\x12\x45xternalActionType\x12$\n EXTERNAL_ACTION_TYPE_UNSPECIFIED\x10\x00\x12+\n\'REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER\x10\x01\x12+\n\'REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER\x10\x02\x12\x1f\n\x1bLEGAL_APPEAL_IN_HELP_CENTER\x10\x03\x12&\n\"VERIFY_IDENTITY_IN_MERCHANT_CENTER\x10\x04\"\xc9\x01\n\x14TriggerActionRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12[\n\x07payload\x18\x02 \x01(\x0b\x32\x45.google.shopping.merchant.issueresolution.v1beta.TriggerActionPayloadB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x8c\x01\n\x14TriggerActionPayload\x12\x1b\n\x0e\x61\x63tion_context\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12W\n\x0c\x61\x63tion_input\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1beta.ActionInputB\x03\xe0\x41\x02\"(\n\x15TriggerActionResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\"\x82\x01\n\x0b\x41\x63tionInput\x12\x1b\n\x0e\x61\x63tion_flow_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12V\n\x0cinput_values\x18\x02 \x03(\x0b\x32;.google.shopping.merchant.issueresolution.v1beta.InputValueB\x03\xe0\x41\x02\"\xff\x03\n\nInputValue\x12\x66\n\x10text_input_value\x18\x02 \x01(\x0b\x32J.google.shopping.merchant.issueresolution.v1beta.InputValue.TextInputValueH\x00\x12j\n\x12\x63hoice_input_value\x18\x03 \x01(\x0b\x32L.google.shopping.merchant.issueresolution.v1beta.InputValue.ChoiceInputValueH\x00\x12n\n\x14\x63heckbox_input_value\x18\x04 \x01(\x0b\x32N.google.shopping.merchant.issueresolution.v1beta.InputValue.CheckboxInputValueH\x00\x12\x1b\n\x0einput_field_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a$\n\x0eTextInputValue\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\x37\n\x10\x43hoiceInputValue\x12#\n\x16\x63hoice_input_option_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a(\n\x12\x43heckboxInputValue\x12\x12\n\x05value\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x42\x07\n\x05value*F\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\x08\n\x04INFO\x10\x03*F\n\rContentOption\x12\x1e\n\x1a\x43ONTENT_OPTION_UNSPECIFIED\x10\x00\x12\x15\n\x11PRE_RENDERED_HTML\x10\x01*\x96\x01\n\x1eUserInputActionRenderingOption\x12\x32\n.USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED\x10\x00\x12\x1f\n\x1bREDIRECT_TO_MERCHANT_CENTER\x10\x01\x12\x1f\n\x1b\x42UILT_IN_USER_INPUT_ACTIONS\x10\x02\x32\xf2\x06\n\x16IssueResolutionService\x12\x87\x02\n\x13RenderAccountIssues\x12K.google.shopping.merchant.issueresolution.v1beta.RenderAccountIssuesRequest\x1aL.google.shopping.merchant.issueresolution.v1beta.RenderAccountIssuesResponse\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\"=/issueresolution/v1beta/{name=accounts/*}:renderaccountissues:\x07payload\x12\x92\x02\n\x13RenderProductIssues\x12K.google.shopping.merchant.issueresolution.v1beta.RenderProductIssuesRequest\x1aL.google.shopping.merchant.issueresolution.v1beta.RenderProductIssuesResponse\"`\xda\x41\x04name\x82\xd3\xe4\x93\x02S\"H/issueresolution/v1beta/{name=accounts/*/products/*}:renderproductissues:\x07payload\x12\xef\x01\n\rTriggerAction\x12\x45.google.shopping.merchant.issueresolution.v1beta.TriggerActionRequest\x1a\x46.google.shopping.merchant.issueresolution.v1beta.TriggerActionResponse\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\"7/issueresolution/v1beta/{name=accounts/*}:triggeraction:\x07payload\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xd5\x03\n3com.google.shopping.merchant.issueresolution.v1betaB\x14IssueResolutionProtoP\x01Zccloud.google.com/go/shopping/merchant/issueresolution/apiv1beta/issueresolutionpb;issueresolutionpb\xaa\x02/Google.Shopping.Merchant.IssueResolution.V1Beta\xca\x02/Google\\Shopping\\Merchant\\IssueResolution\\V1beta\xea\x02\x33Google::Shopping::Merchant::IssueResolution::V1beta\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - RenderAccountIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderAccountIssuesResponse").msgclass - RenderAccountIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderAccountIssuesRequest").msgclass - RenderIssuesRequestPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderIssuesRequestPayload").msgclass - RenderProductIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderProductIssuesResponse").msgclass - RenderProductIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderProductIssuesRequest").msgclass - RenderedIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderedIssue").msgclass - Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Impact").msgclass - Breakdown = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Breakdown").msgclass - Breakdown::Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Breakdown.Region").msgclass - Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Action").msgclass - Action::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Action.Reason").msgclass - BuiltInSimpleAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction").msgclass - BuiltInSimpleAction::AdditionalContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.AdditionalContent").msgclass - BuiltInSimpleAction::BuiltInSimpleActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.BuiltInSimpleActionType").enummodule - BuiltInUserInputAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.BuiltInUserInputAction").msgclass - ActionFlow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ActionFlow").msgclass - InputField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField").msgclass - InputField::TextInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.TextInput").msgclass - InputField::TextInput::TextInputType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.TextInput.TextInputType").enummodule - InputField::ChoiceInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput").msgclass - InputField::ChoiceInput::ChoiceInputOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput.ChoiceInputOption").msgclass - InputField::CheckboxInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.CheckboxInput").msgclass - TextWithTooltip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TextWithTooltip").msgclass - TextWithTooltip::TooltipIconStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TextWithTooltip.TooltipIconStyle").enummodule - Callout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Callout").msgclass - Callout::CalloutStyleHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Callout.CalloutStyleHint").enummodule - ExternalAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ExternalAction").msgclass - ExternalAction::ExternalActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ExternalAction.ExternalActionType").enummodule - TriggerActionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TriggerActionRequest").msgclass - TriggerActionPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TriggerActionPayload").msgclass - TriggerActionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TriggerActionResponse").msgclass - ActionInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ActionInput").msgclass - InputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputValue").msgclass - InputValue::TextInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputValue.TextInputValue").msgclass - InputValue::ChoiceInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputValue.ChoiceInputValue").msgclass - InputValue::CheckboxInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputValue.CheckboxInputValue").msgclass - Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Severity").enummodule - ContentOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ContentOption").enummodule - UserInputActionRenderingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.UserInputActionRenderingOption").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb deleted file mode 100644 index 485d5f24b813..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/issueresolution/v1beta/issueresolution.proto for package 'Google.Shopping.Merchant.IssueResolution.V1beta' -# 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb' - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - module IssueResolutionService - # Service to provide an issue resolution content for account issues and product - # issues. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.issueresolution.v1beta.IssueResolutionService' - - # Provide a list of business's account issues with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - rpc :RenderAccountIssues, ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest, ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse - # Provide a list of issues for business's product with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - rpc :RenderProductIssues, ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest, ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse - # Start an action. The action can be requested by a business in - # third-party application. Before the business can request the action, the - # third-party application needs to show them action specific content and - # display a user input form. - # - # The action can be successfully started only once all `required` inputs are - # provided. If any `required` input is missing, or invalid value was - # provided, the service will return 400 error. Validation errors will contain - # [Ids][google.shopping.merchant.issueresolution.v1beta.InputField.id] for - # all problematic field together with translated, human readable error - # messages that can be shown to the user. - rpc :TriggerAction, ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest, ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant V1BETA 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-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.rb deleted file mode 100644 index 5bde22009eec..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.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 Shopping - module Merchant - module IssueResolution - module V1beta - # Request message for the `ListAggregateProductStatuses` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to list aggregate product statuses for. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of aggregate product statuses to return. The - # service may return fewer than this value. If unspecified, at most 25 - # aggregate product statuses are returned. The maximum value is 250; values - # above 250 are coerced to 250. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListAggregateProductStatuses` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAggregateProductStatuses` must match the call that provided the page - # token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters the aggregate product statuses. - # Filtering is only supported by the `reporting_context` and `country` field. - # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. - class ListAggregateProductStatusesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListAggregateProductStatuses` method. - # @!attribute [rw] aggregate_product_statuses - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus>] - # The `AggregateProductStatuses` resources for the given account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `pageToken` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListAggregateProductStatusesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Aggregate product statuses for a given reporting context and country. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the `AggregateProductStatuses` resource. - # Format: - # `accounts/{account}/aggregateProductStatuses/{aggregateProductStatuses}` - # @!attribute [rw] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # The reporting context of the aggregate product statuses. - # @!attribute [rw] country - # @return [::String] - # The country of the aggregate product statuses. Represented as a - # [CLDR territory - # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). - # @!attribute [rw] stats - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus::Stats] - # Products statistics for the given reporting context and country. - # @!attribute [rw] item_level_issues - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus::ItemLevelIssue>] - # The product issues that affect the given reporting context and country. - class AggregateProductStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Products statistics. - # @!attribute [rw] active_count - # @return [::Integer] - # The number of products that are active. - # @!attribute [rw] pending_count - # @return [::Integer] - # The number of products that are pending. - # @!attribute [rw] disapproved_count - # @return [::Integer] - # The number of products that are disapproved. - # @!attribute [rw] expiring_count - # @return [::Integer] - # The number of products that are expiring. - class Stats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The ItemLevelIssue of the product status. - # @!attribute [rw] code - # @return [::String] - # The error code of the issue. - # @!attribute [rw] severity - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus::ItemLevelIssue::Severity] - # How this issue affects serving of the offer. - # @!attribute [rw] resolution - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus::ItemLevelIssue::Resolution] - # Whether the issue can be resolved by the merchant. - # @!attribute [rw] attribute - # @return [::String] - # The attribute's name, if the issue is caused by a single attribute. - # @!attribute [rw] description - # @return [::String] - # A short issue description in English. - # @!attribute [rw] detail - # @return [::String] - # A detailed issue description in English. - # @!attribute [rw] documentation_uri - # @return [::String] - # The URL of a web page to help with resolving this issue. - # @!attribute [rw] product_count - # @return [::Integer] - # The number of products affected by this issue. - class ItemLevelIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # How the issue affects the serving of the product. - module Severity - # Not specified. - SEVERITY_UNSPECIFIED = 0 - - # This issue represents a warning and does not have a direct affect - # on the product. - NOT_IMPACTED = 1 - - # The product is demoted and most likely have limited performance - # in search results - DEMOTED = 2 - - # Issue disapproves the product. - DISAPPROVED = 3 - end - - # How the issue can be resolved. - module Resolution - # Not specified. - RESOLUTION_UNSPECIFIED = 0 - - # The issue can be resolved by the merchant. - MERCHANT_ACTION = 1 - - # The issue will be resolved auomatically. - PENDING_PROCESSING = 2 - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb deleted file mode 100644 index 0666344d3cdd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb +++ /dev/null @@ -1,954 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - # Response containing an issue resolution content and actions for listed - # account issues. - # @!attribute [rw] rendered_issues - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue>] - # List of account issues for a given account. - # - # This list can be shown with compressed, expandable items. In the compressed - # form, the title and impact should be shown for each issue. Once the issue - # is expanded, the detailed - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#prerendered_content content} - # and available - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#actions actions} - # should be rendered. - class RenderAccountIssuesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to provide issue resolution content and actions for business's - # account issues. - # @!attribute [rw] name - # @return [::String] - # Required. The account to fetch issues for. - # Format: `accounts/{account}` - # @!attribute [rw] language_code - # @return [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize issue resolution content. If not set, the result will - # be in default language `en-US`. - # @!attribute [rw] time_zone - # @return [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @!attribute [rw] payload - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload] - # Optional. The payload for configuring how the content should be rendered. - class RenderAccountIssuesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The payload for configuring how the content should be rendered. - # @!attribute [rw] content_option - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ContentOption] - # Optional. How the detailed content should be returned. Default option is to - # return the content as a pre-rendered HTML text. - # @!attribute [rw] user_input_action_option - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::UserInputActionRenderingOption] - # Optional. How actions with user input form should be handled. If not - # provided, actions will be returned as links that points the business to - # Merchant Center where they can request the action. - class RenderIssuesRequestPayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response containing an issue resolution content and actions for listed - # product issues. - # @!attribute [rw] rendered_issues - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue>] - # List of issues for a given product. - # - # This list can be shown with compressed, expandable items. In the compressed - # form, the - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#title title} - # and - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#impact impact} - # should be shown for each issue. Once the issue is expanded, the detailed - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#prerendered_content content} - # and available - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#actions actions} - # should be rendered. - class RenderProductIssuesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to provide an issue resolution content and actions for product issues - # of business's product. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the product to fetch issues for. - # Format: `accounts/{account}/products/{product}` - # @!attribute [rw] language_code - # @return [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize an issue resolution content. If not set, the result - # will be in default language `en-US`. - # @!attribute [rw] time_zone - # @return [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @!attribute [rw] payload - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload] - # Optional. The payload for configuring how the content should be rendered. - class RenderProductIssuesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An issue affecting specific business or their product. - # @!attribute [rw] prerendered_content - # @return [::String] - # Details of the issue as a pre-rendered HTML. HTML elements contain CSS - # classes that can be used to customize the style of the content. - # - # Always sanitize the HTML before embedding it directly to your - # application. The sanitizer needs to allow basic HTML tags, such as: - # `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, - # you can use [DOMPurify](https://www.npmjs.com/package/dompurify). - # - # CSS classes: - # - # * `issue-detail` - top level container for the detail of the issue - # * `callout-banners` - section of the `issue-detail` with callout banners - # * `callout-banner` - single callout banner, inside `callout-banners` - # * `callout-banner-info` - callout with important information (default) - # * `callout-banner-warning` - callout with a warning - # * `callout-banner-error` - callout informing about an error (most severe) - # * `issue-content` - section of the `issue-detail`, contains multiple - # `content-element` - # * `content-element` - content element such as a list, link or paragraph, - # inside `issue-content` - # * `root-causes` - unordered list with items describing root causes of the - # issue, inside `issue-content` - # * `root-causes-intro` - intro text before the `root-causes` list, inside - # `issue-content` - # * `segment` - section of the text, `span` inside paragraph - # * `segment-attribute` - section of the text that represents a product - # attribute, for example 'image\_link' - # * `segment-literal` - section of the text that contains a special value, - # for example '0-1000 kg' - # * `segment-bold` - section of the text that should be rendered as bold - # * `segment-italic` - section of the text that should be rendered as - # italic - # * `tooltip` - used on paragraphs that should be rendered with a tooltip. - # A section of the text in such a paragraph will have a class - # `tooltip-text` and is intended to be shown in a mouse over dialog. If the - # style is not used, the `tooltip-text` section would be shown on a new - # line, after the main part of the text. - # * `tooltip-text` - marks a section of the text within a `tooltip`, that - # is intended to be shown in a mouse over dialog. - # * `tooltip-icon` - marks a section of the text within a `tooltip`, that - # can be replaced with a tooltip icon, for example '?' or 'i'. By default, - # this section contains a `br` tag, that is separating the main text and - # the tooltip text when the style is not used. - # * `tooltip-style-question` - the tooltip shows helpful information, - # can use the '?' as an icon. - # * `tooltip-style-info` - the tooltip adds additional information fitting - # to the context, can use the 'i' as an icon. - # * `content-moderation` - marks the paragraph that explains how the issue - # was identified. - # * `new-element` - Present for new elements added to the pre-rendered - # content in the future. To make sure that a new content element does not - # break your style, you can hide everything with this class. - # @!attribute [rw] prerendered_out_of_court_dispute_settlement - # @return [::String] - # Pre-rendered HTML that contains a link to the external location where the - # ODS can be requested and instructions for how to request it. HTML - # elements contain CSS classes that can be used to customize the style of - # this snippet. - # - # Always sanitize the HTML before embedding it directly to your - # application. The sanitizer needs to allow basic HTML tags, such as: - # `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, - # you can use [DOMPurify](https://www.npmjs.com/package/dompurify). - # - # CSS classes: - # - # * `ods-section`* - wrapper around the out-of-court dispute resolution - # section - # * `ods-description`* - intro text for the out-of-court dispute - # resolution. It may contain multiple segments and a link. - # * `ods-param`* - wrapper around the header-value pair for parameters that - # the business may need to provide during the ODS process. - # * `ods-routing-id`* - ods param for the Routing ID. - # * `ods-reference-id`* - ods param for the Routing ID. - # * `ods-param-header`* - header for the ODS parameter - # * `ods-param-value`* - value of the ODS parameter. This value should be - # rendered in a way that it is easy for the user to identify and copy. - # * `segment` - section of the text, `span` inside paragraph - # * `segment-attribute` - section of the text that represents a product - # attribute, for example 'image\_link' - # * `segment-literal` - section of the text that contains a special value, - # for example '0-1000 kg' - # * `segment-bold` - section of the text that should be rendered as bold - # * `segment-italic` - section of the text that should be rendered as - # italic - # * `tooltip` - used on paragraphs that should be rendered with a tooltip. - # A section of the text in such a paragraph will have a class - # `tooltip-text` and is intended to be shown in a mouse over dialog. If the - # style is not used, the `tooltip-text` section would be shown on a new - # line, after the main part of the text. - # * `tooltip-text` - marks a section of the text within a `tooltip`, that - # is intended to be shown in a mouse over dialog. - # * `tooltip-icon` - marks a section of the text within a `tooltip`, that - # can be replaced with a tooltip icon, for example '?' or 'i'. By default, - # this section contains a `br` tag, that is separating the main text and - # the tooltip text when the style is not used. - # * `tooltip-style-question` - the tooltip shows helpful information, - # can use the '?' as an icon. - # * `tooltip-style-info` - the tooltip adds additional information fitting - # to the context, can use the 'i' as an icon. - # @!attribute [rw] title - # @return [::String] - # Title of the issue. - # @!attribute [rw] impact - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Impact] - # Clarifies the severity of the issue. - # - # The [summarizing - # message][google.shopping.merchant.issueresolution.v1beta.Impact.message], - # if present, should be shown right under the title for each issue. It helps - # business to quickly understand the impact of the issue. - # - # The detailed - # {::Google::Shopping::Merchant::IssueResolution::V1beta::Impact#breakdowns breakdown} - # helps the business to fully understand the impact of the issue. It can be - # rendered as dialog that opens when the business mouse over the summarized - # impact statement. - # - # Issues with different - # {::Google::Shopping::Merchant::IssueResolution::V1beta::Impact#severity severity} - # can be styled differently. They may use a different color or icon to signal - # the difference between `ERROR`, `WARNING` and `INFO`. - # @!attribute [rw] actions - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::Action>] - # A list of actionable steps that can be executed to solve the issue. An - # example is requesting a re-review or providing arguments when business - # disagrees with the issue. - # - # Actions that are supported in (your) third-party application can be - # rendered as buttons and should be available to the business when they - # expand the issue. - class RenderedIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Overall impact of the issue. - # @!attribute [rw] message - # @return [::String] - # Optional. Message summarizing the overall impact of the issue. If present, - # it should be rendered to the business. For example: "Disapproves 90k offers - # in 25 countries" - # @!attribute [rw] severity - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Severity] - # The severity of the issue. - # @!attribute [rw] breakdowns - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::Breakdown>] - # Detailed impact breakdown. Explains the types of restriction the issue has - # in different shopping destinations and territory. If present, it should be - # rendered to the business. Can be shown as a mouse over dropdown or a - # dialog. Each breakdown item represents a group of regions with the same - # impact details. - class Impact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A detailed impact breakdown for a group of regions where the impact of the - # issue on different shopping destinations is the same. - # @!attribute [rw] regions - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::Breakdown::Region>] - # Lists of regions. Should be rendered as a title for this group of details. - # The full list should be shown to the business. If the list is too long, it - # is recommended to make it expandable. - # @!attribute [rw] details - # @return [::Array<::String>] - # Human readable, localized description of issue's effect on different - # targets. Should be rendered as a list. - # - # For example: - # - # * "Products not showing in ads" - # * "Products not showing organically" - class Breakdown - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Region with code and localized name. - # @!attribute [rw] code - # @return [::String] - # The [CLDR territory code] - # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # @!attribute [rw] name - # @return [::String] - # The localized name of the region. - # For region with code='001' the value is 'All countries' or the equivalent - # in other languages. - class Region - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An actionable step that can be executed to solve the issue. - # @!attribute [rw] builtin_simple_action - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction] - # Action implemented and performed in (your) third-party application. The - # application should point the business to the place, where they can access - # the corresponding functionality or provide instructions, if the specific - # functionality is not available. - # - # Note: The following fields are mutually exclusive: `builtin_simple_action`, `external_action`, `builtin_user_input_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] external_action - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ExternalAction] - # Action that is implemented and performed outside of (your) third-party - # application. The application needs to redirect the business to the - # external location where they can perform the action. - # - # Note: The following fields are mutually exclusive: `external_action`, `builtin_simple_action`, `builtin_user_input_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] builtin_user_input_action - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInUserInputAction] - # Action implemented and performed in (your) third-party application. - # The application needs to show an additional content and input form to the - # business as specified for given action. They can trigger the action only - # when they provided all required inputs. - # - # Note: The following fields are mutually exclusive: `builtin_user_input_action`, `builtin_simple_action`, `external_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] button_label - # @return [::String] - # Label of the action button. - # @!attribute [rw] is_available - # @return [::Boolean] - # Controlling whether the button is active or disabled. The value is 'false' - # when the action was already requested or is not available. If the action is - # not available then a - # {::Google::Shopping::Merchant::IssueResolution::V1beta::Action#reasons reason} - # will be present. If (your) third-party application shows a disabled button - # for action that is not available, then it should also show reasons. - # @!attribute [rw] reasons - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::Action::Reason>] - # List of reasons why the action is not available. The list of reasons is - # empty if the action is available. If there is only one reason, it can be - # displayed next to the disabled button. If there are more reasons, all of - # them should be displayed, for example in a pop-up dialog. - class Action - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A single reason why the action is not available. - # @!attribute [rw] message - # @return [::String] - # Messages summarizing the reason, why the action is not available. - # For example: "Review requested on Jan 03. Review requests can take a few - # days to complete." - # @!attribute [rw] detail - # @return [::String] - # Detailed explanation of the reason. Should be displayed as a hint if - # present. - # @!attribute [rw] action - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Action] - # Optional. An action that needs to be performed to solve the problem - # represented by this reason. This action will always be available. Should - # be rendered as a link or button next to the summarizing message. - # - # For example, the review may be available only once the business configure - # all required attributes. In such a situation this action can be a link to - # the form, where they can fill the missing attribute to unblock the main - # action. - class Reason - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Action that is implemented and performed in (your) third-party application. - # Represents various functionality that is expected to be available to business - # and will help them with resolving the issue. The application should point the - # business to the place, where they can access the corresponding functionality. - # If the functionality is not supported, it is recommended to explain the - # situation to the business and provide them with instructions how to solve the - # issue. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction::BuiltInSimpleActionType] - # The type of action that represents a functionality that is expected to be - # available in third-party application. - # @!attribute [rw] attribute_code - # @return [::String] - # The attribute that needs to be updated. Present when the - # {::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction#type type} - # is `EDIT_ITEM_ATTRIBUTE`. - # - # This field contains a code for attribute, represented in snake_case. You - # can find a list of product's attributes, with their codes - # [here](https://support.google.com/merchants/answer/7052112). - # @!attribute [rw] additional_content - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction::AdditionalContent] - # Long text from an external source that should be available to the business. - # Present when the - # {::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction#type type} - # is `SHOW_ADDITIONAL_CONTENT`. - class BuiltInSimpleAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Long text from external source. - # @!attribute [rw] title - # @return [::String] - # Title of the additional content; - # @!attribute [rw] paragraphs - # @return [::Array<::String>] - # Long text organized into paragraphs. - class AdditionalContent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Enum specifying the type of action in third-party application. - module BuiltInSimpleActionType - # Default value. Will never be provided by the API. - BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED = 0 - - # Redirect the business to the part of your application where they can - # verify their phone. - VERIFY_PHONE = 1 - - # Redirect the business to the part of your application where they can - # claim their website. - CLAIM_WEBSITE = 2 - - # Redirect the business to the part of your application where they can add - # products. - ADD_PRODUCTS = 3 - - # Open a form where the business can edit their contact information. - ADD_CONTACT_INFO = 4 - - # Redirect the business to the part of your application where they can link - # ads account. - LINK_ADS_ACCOUNT = 5 - - # Open a form where the business can add their business registration - # number. - ADD_BUSINESS_REGISTRATION_NUMBER = 6 - - # Open a form where the business can edit an attribute. The attribute that - # needs to be updated is specified in - # {::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction#attribute_code attribute_code} - # field of the action. - EDIT_ITEM_ATTRIBUTE = 7 - - # Redirect the business from the product issues to the diagnostic page with - # their account issues in your application. - # - # This action will be returned only for product issues that are caused by - # an account issue and thus the business should resolve the problem on the - # account level. - FIX_ACCOUNT_ISSUE = 8 - - # Show [additional - # content][google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.additional_content] - # to the business. - # - # This action will be used for example to deliver a justification from - # national authority. - SHOW_ADDITIONAL_CONTENT = 9 - end - end - - # Action that is implemented and performed in (your) third-party application. - # The application needs to show an additional content and input form to the - # business. They can start the action only when they provided all required - # inputs. The application will request processing of the action by calling the - # [triggeraction - # method](https://developers.google.com/merchant/api/reference/rest/issueresolution_v1beta/issueresolution/triggeraction). - # @!attribute [rw] action_context - # @return [::String] - # Contains the action's context that must be included as part of the - # {::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload#action_context TriggerActionPayload.action_context} - # in - # {::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest#payload TriggerActionRequest.payload} - # to call the `triggeraction` method. The content should be treated as opaque - # and must not be modified. - # @!attribute [rw] flows - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::ActionFlow>] - # Actions may provide multiple different flows. Business selects one that - # fits best to their intent. Selecting the flow is the first step in user's - # interaction with the action. It affects what input fields will be available - # and required and also how the request will be processed. - class BuiltInUserInputAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Flow that can be selected for an action. When a business selects a flow, - # application should open a dialog with more information and input form. - # @!attribute [rw] id - # @return [::String] - # Not for display but need to be sent back for the selected action flow. - # @!attribute [rw] label - # @return [::String] - # Text value describing the intent for the action flow. It can be used as an - # input label if business needs to pick one of multiple flows. For example: - # "I disagree with the issue" - # @!attribute [rw] inputs - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::InputField>] - # A list of input fields. - # @!attribute [rw] dialog_title - # @return [::String] - # Title of the request dialog. For example: "Before you request a review" - # @!attribute [rw] dialog_message - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] - # Message displayed in the request dialog. For example: "Make sure you've - # fixed all your country-specific issues. If not, you may have to wait 7 days - # to request another review". There may be an more information to be shown in - # a tooltip. - # @!attribute [rw] dialog_callout - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Callout] - # Important message to be highlighted in the request dialog. For example: - # "You can only request a review for disagreeing with this issue once. If - # it's not approved, you'll need to fix the issue and wait a few days before - # you can request another review." - # @!attribute [rw] dialog_button_label - # @return [::String] - # Label for the button to trigger the action from the action dialog. For - # example: "Request review" - class ActionFlow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input field that needs to be available to the business. If the field is - # marked as required, then a value needs to be provided for a successful - # processing of the request. - # @!attribute [rw] text_input - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::TextInput] - # Input field to provide text information. - # Corresponds to the [html input - # type=text](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text) - # or [html - # textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). - # - # Note: The following fields are mutually exclusive: `text_input`, `choice_input`, `checkbox_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] choice_input - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::ChoiceInput] - # Input field to select one of the offered choices. - # Corresponds to the [html input - # type=radio](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.radio.html#input.radio). - # - # Note: The following fields are mutually exclusive: `choice_input`, `text_input`, `checkbox_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] checkbox_input - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::CheckboxInput] - # Input field to provide a boolean value. - # Corresponds to the [html input - # type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). - # - # Note: The following fields are mutually exclusive: `checkbox_input`, `text_input`, `choice_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] id - # @return [::String] - # Not for display but need to be sent back for the given input field. - # @!attribute [rw] label - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] - # Input field label. There may be more information to be shown in a tooltip. - # @!attribute [rw] required - # @return [::Boolean] - # Whether the field is required. The action button needs to stay disabled - # till values for all required fields are provided. - class InputField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Text input allows the business to provide a text value. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::TextInput::TextInputType] - # Type of the text input - # @!attribute [rw] additional_info - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] - # Additional info regarding the field to be displayed to the business. For - # example, warning to not include personal identifiable information. There - # may be more information to be shown in a tooltip. - # @!attribute [rw] format_info - # @return [::String] - # Information about the required format. If present, it should be shown - # close to the input field to help the business to provide a correct value. - # For example: "VAT numbers should be in a format similar to SK9999999999" - # @!attribute [rw] aria_label - # @return [::String] - # Text to be used as the - # [aria-label](https://www.w3.org/TR/WCAG20-TECHS/ARIA14.html) for the - # input. - class TextInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum specifying the type of the text input and how it should be rendered. - module TextInputType - # Default value. Will never be provided by the API. - TEXT_INPUT_TYPE_UNSPECIFIED = 0 - - # Used when a short text is expected. The field can be rendered as a - # [text - # field](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text). - GENERIC_SHORT_TEXT = 1 - - # Used when a longer text is expected. The field should be rendered as a - # [textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). - GENERIC_LONG_TEXT = 2 - end - end - - # Choice input allows the business to select one of the offered choices. Some - # choices may be linked to additional input fields that should be displayed - # under or next to the choice option. The value for the additional input - # field needs to be provided only when the specific choice is selected by the - # the business. For example, additional input field can be hidden or disabled - # until the business selects the specific choice. - # @!attribute [rw] options - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::ChoiceInput::ChoiceInputOption>] - # A list of choices. Only one option can be selected. - class ChoiceInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A choice that the business can select. - # @!attribute [rw] id - # @return [::String] - # Not for display but need to be sent back for the selected choice - # option. - # @!attribute [rw] label - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] - # Short description of the choice option. There may be more information - # to be shown as a tooltip. - # @!attribute [rw] additional_input - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField] - # Input that should be displayed when this option is selected. - # The additional input will not contain a `ChoiceInput`. - class ChoiceInputOption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Checkbox input allows the business to provide a boolean value. Corresponds - # to the [html input - # type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). - # - # If the business checks the box, the input value for the field is `true`, - # otherwise it is `false`. - # - # This type of input is often used as a confirmation that the business - # completed required steps before they are allowed to start the action. In - # such a case, the input field is marked as - # {::Google::Shopping::Merchant::IssueResolution::V1beta::InputField#required required} - # and the button to trigger the action should stay disabled until the - # business checks the box. - class CheckboxInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Block of text that may contain a tooltip with more information. - # @!attribute [rw] simple_value - # @return [::String] - # Value of the message as a simple text. - # @!attribute [rw] simple_tooltip_value - # @return [::String] - # Value of the tooltip as a simple text. - # @!attribute [rw] tooltip_icon_style - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip::TooltipIconStyle] - # The suggested type of an icon for tooltip, if a tooltip is present. - class TextWithTooltip - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum specifying the type of an icon that is being used to display a - # corresponding tooltip in the Merchant Center. - module TooltipIconStyle - # Default value. Will never be provided by the API. - TOOLTIP_ICON_STYLE_UNSPECIFIED = 0 - - # Used when the tooltip adds additional information to the context, - # the 'i' can be used as an icon. - INFO = 1 - - # Used when the tooltip shows helpful information, the '?' can be used as - # an icon. - QUESTION = 2 - end - end - - # An important message that should be highlighted. Usually displayed as a - # banner. - # @!attribute [rw] style_hint - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Callout::CalloutStyleHint] - # Can be used to render messages with different severity in different styles. - # Snippets off all types contain important information that should be - # displayed to the business. - # @!attribute [rw] full_message - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] - # A full message that needs to be shown to the business. - class Callout - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum specifying the suggested style, how the message should be rendered. - module CalloutStyleHint - # Default value. Will never be provided by the API. - CALLOUT_STYLE_HINT_UNSPECIFIED = 0 - - # The most important type of information highlighting problems, like an - # unsuccessful outcome of previously requested actions. - ERROR = 1 - - # Information warning about pending problems, risks or deadlines. - WARNING = 2 - - # Default severity for important information like pending status of - # previously requested action or cooldown for re-review. - INFO = 3 - end - end - - # Action that is implemented and performed outside of the third-party - # application. It should redirect the business to the provided URL of an - # external system where they can perform the action. For example to request a - # review in the Merchant Center. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ExternalAction::ExternalActionType] - # The type of external action. - # @!attribute [rw] uri - # @return [::String] - # URL to external system, for example Merchant Center, where the business can - # perform the action. - class ExternalAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum specifying the type of action that requires to redirect the business - # to an external location. - module ExternalActionType - # Default value. Will never be provided by the API. - EXTERNAL_ACTION_TYPE_UNSPECIFIED = 0 - - # Redirect to Merchant Center where the business can request a review for - # issue related to their product. - REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER = 1 - - # Redirect to Merchant Center where the business can request a review for - # issue related to their account. - REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER = 2 - - # Redirect to the form in Help Center where the business can request a - # legal appeal for the issue. - LEGAL_APPEAL_IN_HELP_CENTER = 3 - - # Redirect to Merchant Center where the business can perform identity - # verification. - VERIFY_IDENTITY_IN_MERCHANT_CENTER = 4 - end - end - - # Request to start the selected action - # @!attribute [rw] name - # @return [::String] - # Required. The business's account that is triggering the action. - # Format: `accounts/{account}` - # @!attribute [rw] payload - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload] - # Required. The payload for the triggered action. - # @!attribute [rw] language_code - # @return [::String] - # Optional. Language code [IETF BCP 47 - # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. - # If not set, the result will be in default language `en-US`. - class TriggerActionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The payload for the triggered action. - # @!attribute [rw] action_context - # @return [::String] - # Required. The - # {::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInUserInputAction#action_context context} - # from the selected action. The value is obtained from rendered issues and - # needs to be sent back to identify the - # {::Google::Shopping::Merchant::IssueResolution::V1beta::Action#builtin_user_input_action action} - # that is being triggered. - # @!attribute [rw] action_input - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ActionInput] - # Required. Input provided by the business. - class TriggerActionPayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response informing about the started action. - # @!attribute [rw] message - # @return [::String] - # The message for the business. - class TriggerActionResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input provided by the business. - # @!attribute [rw] action_flow_id - # @return [::String] - # Required. - # {::Google::Shopping::Merchant::IssueResolution::V1beta::ActionFlow#id Id} of the - # selected action flow. - # @!attribute [rw] input_values - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::InputValue>] - # Required. Values for input fields. - class ActionInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input provided by the business for input field. - # @!attribute [rw] text_input_value - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputValue::TextInputValue] - # Value for [text - # input][google.shopping.merchant.issueresolution.v1beta.InputField.TextInput] - # field. - # - # Note: The following fields are mutually exclusive: `text_input_value`, `choice_input_value`, `checkbox_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] choice_input_value - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputValue::ChoiceInputValue] - # Value for [choice - # input][google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput] - # field. - # - # Note: The following fields are mutually exclusive: `choice_input_value`, `text_input_value`, `checkbox_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] checkbox_input_value - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputValue::CheckboxInputValue] - # Value for [checkbox - # input][google.shopping.merchant.issueresolution.v1beta.InputField.CheckboxInput] - # field. - # - # Note: The following fields are mutually exclusive: `checkbox_input_value`, `text_input_value`, `choice_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] input_field_id - # @return [::String] - # Required. - # {::Google::Shopping::Merchant::IssueResolution::V1beta::InputField#id Id} of the - # corresponding input field. - class InputValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Value for [text - # input][google.shopping.merchant.issueresolution.v1beta.InputField.TextInput] - # field. - # @!attribute [rw] value - # @return [::String] - # Required. Text provided by the business. - class TextInputValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Value for [choice - # input][google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput] - # field. - # @!attribute [rw] choice_input_option_id - # @return [::String] - # Required. [Id][InputField.ChoiceInput.id] of the option that was selected - # by the business. - class ChoiceInputValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Value for [checkbox - # input][google.shopping.merchant.issueresolution.v1beta.InputField.CheckboxInput] - # field. - # @!attribute [rw] value - # @return [::Boolean] - # Required. True if the business checked the box field. False otherwise. - class CheckboxInputValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Enum specifying the severity of the issue. - module Severity - # Default value. Will never be provided by the API. - SEVERITY_UNSPECIFIED = 0 - - # Causes either an account suspension or an item disapproval. Errors should - # be resolved as soon as possible to ensure items are eligible to appear in - # results again. - ERROR = 1 - - # Warnings can negatively impact the performance of ads and can lead to item - # or account suspensions in the future unless the issue is resolved. - WARNING = 2 - - # Infos are suggested optimizations to increase data quality. Resolving these - # issues is recommended, but not required. - INFO = 3 - end - - # Enum specifying how is the content returned. - module ContentOption - # Default value. Will never be provided by the API. - CONTENT_OPTION_UNSPECIFIED = 0 - - # Returns the detail of the issue as a pre-rendered HTML text. - PRE_RENDERED_HTML = 1 - end - - # Enum specifying how actions with user input forms, such as requesting - # re-review, are handled. - module UserInputActionRenderingOption - # Default value. Will never be provided by the API. - USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED = 0 - - # Actions that require user input are represented only as links that points - # the business to Merchant Center where they can request the action. Provides - # easier to implement alternative to `BUILT_IN_USER_INPUT_ACTIONS`. - REDIRECT_TO_MERCHANT_CENTER = 1 - - # Returns content and input form definition for each complex action. Your - # application needs to display this content and input form to the business - # before they can request processing of the action. To start the action, your - # application needs to call the `triggeraction` method. - BUILT_IN_USER_INPUT_ACTIONS = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/type/types.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! - - -module Google - module Shopping - module Type - # The weight represented as the value in string and the unit. - # @!attribute [rw] amount_micros - # @return [::Integer] - # Required. The weight represented as a number in micros (1 million micros is - # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 - # micros). - # This field can also be set as infinity by setting to -1. - # This field only support -1 and positive value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Type::Weight::WeightUnit] - # Required. The weight unit. - # Acceptable values are: kg and lb - class Weight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The weight unit. - module WeightUnit - # unit unspecified - WEIGHT_UNIT_UNSPECIFIED = 0 - - # lb unit. - POUND = 1 - - # kg unit. - KILOGRAM = 2 - end - end - - # The price represented as a number and currency. - # @!attribute [rw] amount_micros - # @return [::Integer] - # The price represented as a number in micros (1 million micros is an - # equivalent to one's currency standard unit, for example, 1 USD = 1000000 - # micros). - # @!attribute [rw] currency_code - # @return [::String] - # The currency of the price using three-letter acronyms according to [ISO - # 4217](http://en.wikipedia.org/wiki/ISO_4217). - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents custom attributes. Exactly one of `value` or - # `group_values` must not be empty. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute. - # @!attribute [rw] value - # @return [::String] - # The value of the attribute. If `value` is not empty, `group_values` must be - # empty. - # @!attribute [rw] group_values - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Subattributes within this attribute group. If - # `group_values` is not empty, `value` must be empty. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations available for a product. - # - # Destinations are used in Merchant Center to allow you to control where the - # products from your data feed should be displayed. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Destination values. - module DestinationEnum - # Not specified. - DESTINATION_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/google-ads/answer/2454022). - SHOPPING_ADS = 1 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 2 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3057972). - LOCAL_INVENTORY_ADS = 3 - - # [Free listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 4 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 5 - - # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). - YOUTUBE_SHOPPING = 6 - - # Youtube shopping checkout. - YOUTUBE_SHOPPING_CHECKOUT = 7 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 8 - - # [Free vehicle - # listings](https://support.google.com/merchants/answer/11189169). - FREE_VEHICLE_LISTINGS = 9 - - # [Vehicle ads](https://support.google.com/merchants/answer/11189169). - VEHICLE_ADS = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - end - end - - # Reporting contexts that your account and product issues apply to. - # - # Reporting contexts are groups of surfaces and formats for product results on - # Google. They can represent the entire destination (for example, [Shopping - # ads](https://support.google.com/merchants/answer/6149970)) or a subset of - # formats within a destination (for example, [Demand Gen - # ads](https://support.google.com/merchants/answer/13389785)). - class ReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reporting context values. - module ReportingContextEnum - # Not specified. - REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/merchants/answer/6149970). - SHOPPING_ADS = 1 - - # Deprecated: Use `DEMAND_GEN_ADS` instead. - # [Discovery and Demand Gen - # ads](https://support.google.com/merchants/answer/13389785). - DISCOVERY_ADS = 2 - - # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS = 13 - - # [Demand Gen ads on Discover - # surface](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 - - # [Video ads](https://support.google.com/google-ads/answer/6340491). - VIDEO_ADS = 3 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 4 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3271956). - LOCAL_INVENTORY_ADS = 5 - - # [Vehicle inventory - # ads](https://support.google.com/merchants/answer/11544533). - VEHICLE_INVENTORY_ADS = 6 - - # [Free product - # listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 7 - - # [Free product listings on UCP - # checkout](https://developers.google.com/merchant/ucp). - FREE_LISTINGS_UCP_CHECKOUT = 19 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 8 - - # [Free local vehicle - # listings](https://support.google.com/merchants/answer/11544533). - FREE_LOCAL_VEHICLE_LISTINGS = 9 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 18 - - # [YouTube - # Shopping](https://support.google.com/merchants/answer/13478370). - YOUTUBE_SHOPPING = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - - # [Product - # Reviews](https://support.google.com/merchants/answer/14620732). - PRODUCT_REVIEWS = 15 - - # [Merchant - # Reviews](https://developers.google.com/merchant-review-feeds). - MERCHANT_REVIEWS = 16 - - # YouTube Checkout - # . - YOUTUBE_CHECKOUT = 17 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/Gemfile deleted file mode 100644 index fd343aebe259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-issue_resolution-v1beta", path: "../" -else - gem "google-shopping-merchant-issue_resolution-v1beta" -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-shopping-merchant-issue_resolution-v1beta/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb deleted file mode 100644 index 66b3fcc95753..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.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 merchantapi_v1beta_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync] -require "google/shopping/merchant/issue_resolution/v1beta" - -## -# Snippet for the list_aggregate_product_statuses call in the AggregateProductStatusesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client#list_aggregate_product_statuses. -# -def list_aggregate_product_statuses - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.new - - # Call the list_aggregate_product_statuses method. - result = client.list_aggregate_product_statuses request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus. - p item - end -end -# [END merchantapi_v1beta_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync] diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_account_issues.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_account_issues.rb deleted file mode 100644 index ece77b5b39bc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_account_issues.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_IssueResolutionService_RenderAccountIssues_sync] -require "google/shopping/merchant/issue_resolution/v1beta" - -## -# Snippet for the render_account_issues call in the IssueResolutionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_account_issues. -# -def render_account_issues - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new - - # Call the render_account_issues method. - result = client.render_account_issues request - - # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse. - p result -end -# [END merchantapi_v1beta_generated_IssueResolutionService_RenderAccountIssues_sync] diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_product_issues.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_product_issues.rb deleted file mode 100644 index 9cd9f4023221..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_product_issues.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_IssueResolutionService_RenderProductIssues_sync] -require "google/shopping/merchant/issue_resolution/v1beta" - -## -# Snippet for the render_product_issues call in the IssueResolutionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_product_issues. -# -def render_product_issues - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new - - # Call the render_product_issues method. - result = client.render_product_issues request - - # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse. - p result -end -# [END merchantapi_v1beta_generated_IssueResolutionService_RenderProductIssues_sync] diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/trigger_action.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/trigger_action.rb deleted file mode 100644 index e411fd7c8b1e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/trigger_action.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_IssueResolutionService_TriggerAction_sync] -require "google/shopping/merchant/issue_resolution/v1beta" - -## -# Snippet for the trigger_action call in the IssueResolutionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#trigger_action. -# -def trigger_action - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new - - # Call the trigger_action method. - result = client.trigger_action request - - # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse. - p result -end -# [END merchantapi_v1beta_generated_IssueResolutionService_TriggerAction_sync] diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json deleted file mode 100644 index bc030aa28df3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-issue_resolution-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.issueresolution.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync", - "title": "Snippet for the list_aggregate_product_statuses call in the AggregateProductStatusesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client#list_aggregate_product_statuses.", - "file": "aggregate_product_statuses_service/list_aggregate_product_statuses.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_aggregate_product_statuses", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client#list_aggregate_product_statuses", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse", - "client": { - "short_name": "AggregateProductStatusesService::Client", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client" - }, - "method": { - "short_name": "ListAggregateProductStatuses", - "full_name": "google.shopping.merchant.issueresolution.v1beta.AggregateProductStatusesService.ListAggregateProductStatuses", - "service": { - "short_name": "AggregateProductStatusesService", - "full_name": "google.shopping.merchant.issueresolution.v1beta.AggregateProductStatusesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_IssueResolutionService_RenderAccountIssues_sync", - "title": "Snippet for the render_account_issues call in the IssueResolutionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_account_issues.", - "file": "issue_resolution_service/render_account_issues.rb", - "language": "RUBY", - "client_method": { - "short_name": "render_account_issues", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_account_issues", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse", - "client": { - "short_name": "IssueResolutionService::Client", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client" - }, - "method": { - "short_name": "RenderAccountIssues", - "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService.RenderAccountIssues", - "service": { - "short_name": "IssueResolutionService", - "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_IssueResolutionService_RenderProductIssues_sync", - "title": "Snippet for the render_product_issues call in the IssueResolutionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_product_issues.", - "file": "issue_resolution_service/render_product_issues.rb", - "language": "RUBY", - "client_method": { - "short_name": "render_product_issues", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_product_issues", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse", - "client": { - "short_name": "IssueResolutionService::Client", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client" - }, - "method": { - "short_name": "RenderProductIssues", - "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService.RenderProductIssues", - "service": { - "short_name": "IssueResolutionService", - "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_IssueResolutionService_TriggerAction_sync", - "title": "Snippet for the trigger_action call in the IssueResolutionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#trigger_action.", - "file": "issue_resolution_service/trigger_action.rb", - "language": "RUBY", - "client_method": { - "short_name": "trigger_action", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#trigger_action", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse", - "client": { - "short_name": "IssueResolutionService::Client", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client" - }, - "method": { - "short_name": "TriggerAction", - "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService.TriggerAction", - "service": { - "short_name": "IssueResolutionService", - "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService" - } - } - }, - "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-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_paths_test.rb deleted file mode 100644 index cdbdd40af3ab..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_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/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service" - -class ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_rest_test.rb deleted file mode 100644 index 1918c6248f20..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_rest_test.rb +++ /dev/null @@ -1,156 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb" -require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest" - - -class ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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_aggregate_product_statuses - # Create test objects. - client_result = ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse.new - http_response = OpenStruct.new 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_aggregate_product_statuses_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::ServiceStub.stub :transcode_list_aggregate_product_statuses_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_aggregate_product_statuses_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_aggregate_product_statuses({ 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_aggregate_product_statuses 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_aggregate_product_statuses ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.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_aggregate_product_statuses({ 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_aggregate_product_statuses(::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.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_aggregate_product_statuses_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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.rb deleted file mode 100644 index 4054d8c0585f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb" -require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service" - -class ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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_aggregate_product_statuses - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_aggregate_product_statuses_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_aggregate_product_statuses, name - assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest, 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_aggregate_product_statuses_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_aggregate_product_statuses({ 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_aggregate_product_statuses 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_aggregate_product_statuses ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.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_aggregate_product_statuses({ 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_aggregate_product_statuses(::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.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_aggregate_product_statuses_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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb deleted file mode 100644 index f48dac30c278..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_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/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" - -class ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_path account: "value0", product: "value1" - assert_equal "accounts/value0/products/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb deleted file mode 100644 index 8d0c4caf2c8c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb +++ /dev/null @@ -1,269 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/issueresolution/v1beta/issueresolution_pb" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" - - -class ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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_render_account_issues - # Create test objects. - client_result = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - language_code = "hello world" - time_zone = "hello world" - payload = {} - - render_account_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::ServiceStub.stub :transcode_render_account_issues_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, render_account_issues_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.render_account_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.render_account_issues ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.render_account_issues(::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, render_account_issues_client_stub.call_count - end - end - end - - def test_render_product_issues - # Create test objects. - client_result = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - language_code = "hello world" - time_zone = "hello world" - payload = {} - - render_product_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::ServiceStub.stub :transcode_render_product_issues_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, render_product_issues_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.render_product_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.render_product_issues ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.render_product_issues(::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, render_product_issues_client_stub.call_count - end - end - end - - def test_trigger_action - # Create test objects. - client_result = ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - payload = {} - language_code = "hello world" - - trigger_action_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::ServiceStub.stub :transcode_trigger_action_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, trigger_action_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.trigger_action({ name: name, payload: payload, language_code: language_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.trigger_action name: name, payload: payload, language_code: language_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.trigger_action ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.trigger_action({ name: name, payload: payload, language_code: language_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.trigger_action(::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, trigger_action_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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb deleted file mode 100644 index 301f8e6a97d4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb +++ /dev/null @@ -1,294 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/issueresolution/v1beta/issueresolution_pb" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" - -class ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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_render_account_issues - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - language_code = "hello world" - time_zone = "hello world" - payload = {} - - render_account_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :render_account_issues, name - assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["language_code"] - assert_equal "hello world", request["time_zone"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload), request["payload"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, render_account_issues_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.render_account_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.render_account_issues ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.render_account_issues(::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, render_account_issues_client_stub.call_rpc_count - end - end - - def test_render_product_issues - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - language_code = "hello world" - time_zone = "hello world" - payload = {} - - render_product_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :render_product_issues, name - assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["language_code"] - assert_equal "hello world", request["time_zone"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload), request["payload"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, render_product_issues_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.render_product_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.render_product_issues ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.render_product_issues(::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, render_product_issues_client_stub.call_rpc_count - end - end - - def test_trigger_action - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - payload = {} - language_code = "hello world" - - trigger_action_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :trigger_action, name - assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload), request["payload"] - assert_equal "hello world", request["language_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, trigger_action_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.trigger_action({ name: name, payload: payload, language_code: language_code }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.trigger_action name: name, payload: payload, language_code: language_code do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.trigger_action ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.trigger_action({ name: name, payload: payload, 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.trigger_action(::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new(name: name, payload: payload, 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, trigger_action_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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/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-shopping-merchant-lfp-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-lfp-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-lfp-v1/.repo-metadata.json deleted file mode 100644 index 36b9e7c839c5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-lfp-v1", - "distribution_name": "google-shopping-merchant-lfp-v1", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1 API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-lfp-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-lfp instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-lfp-v1/.rubocop.yml deleted file mode 100644 index c02800f14e06..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-lfp-v1/.yardopts deleted file mode 100644 index dc7bbc10ae29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant 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-shopping-merchant-lfp-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-lfp-v1/AUTHENTICATION.md deleted file mode 100644 index 9b4d87b388cb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-lfp-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-shopping-merchant-lfp-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/shopping/merchant/lfp/v1" - -client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/lfp/v1" - -::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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-shopping-merchant-lfp-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/shopping/merchant/lfp/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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-shopping-merchant-lfp-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-lfp-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-lfp-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-lfp-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/README.md b/owl-bot-staging/google-shopping-merchant-lfp-v1/README.md deleted file mode 100644 index b1079018d953..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Merchant V1 API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1 API. Most users should consider using -the main client gem, -[google-shopping-merchant-lfp](https://rubygems.org/gems/google-shopping-merchant-lfp). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-lfp-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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/lfp/v1" - -client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new -request = ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new # (request fields as keyword arguments...) -response = client.insert_lfp_inventory request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/lfp/v1" -require "logger" - -client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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-shopping-merchant-lfp`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-lfp-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-shopping-merchant-lfp`. -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-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-lfp-v1/Rakefile deleted file mode 100644 index 728de334377e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-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/shopping/merchant/lfp/v1/lfp_inventory_service/credentials" - ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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-shopping-merchant-lfp-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-shopping-merchant-lfp-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-shopping-merchant-lfp-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-shopping-merchant-lfp-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-lfp-v1" - header "google-shopping-merchant-lfp-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-lfp-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-lfp-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-shopping-merchant-lfp-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-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-lfp-v1/gapic_metadata.json deleted file mode 100644 index 302bd89785a3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/gapic_metadata.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.lfp.v1", - "libraryPackage": "::Google::Shopping::Merchant::Lfp::V1", - "services": { - "LfpInventoryService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client", - "rpcs": { - "InsertLfpInventory": { - "methods": [ - "insert_lfp_inventory" - ] - } - } - } - } - }, - "LfpMerchantStateService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client", - "rpcs": { - "GetLfpMerchantState": { - "methods": [ - "get_lfp_merchant_state" - ] - } - } - } - } - }, - "LfpSaleService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client", - "rpcs": { - "InsertLfpSale": { - "methods": [ - "insert_lfp_sale" - ] - } - } - } - } - }, - "LfpStoreService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client", - "rpcs": { - "GetLfpStore": { - "methods": [ - "get_lfp_store" - ] - }, - "InsertLfpStore": { - "methods": [ - "insert_lfp_store" - ] - }, - "DeleteLfpStore": { - "methods": [ - "delete_lfp_store" - ] - }, - "ListLfpStores": { - "methods": [ - "list_lfp_stores" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/google-shopping-merchant-lfp-v1.gemspec b/owl-bot-staging/google-shopping-merchant-lfp-v1/google-shopping-merchant-lfp-v1.gemspec deleted file mode 100644 index 49f175bcb8e8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/google-shopping-merchant-lfp-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/lfp/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-lfp-v1" - gem.version = Google::Shopping::Merchant::Lfp::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-lfp-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-lfp instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center Accounts." - 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-shopping-type", "~> 1.0" -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google-shopping-merchant-lfp-v1.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google-shopping-merchant-lfp-v1.rb deleted file mode 100644 index 50973a650857..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google-shopping-merchant-lfp-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/shopping/merchant/lfp/v1" diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1.rb deleted file mode 100644 index 110574e549d6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/lfp/v1/lfp_inventory_service" -require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service" -require "google/shopping/merchant/lfp/v1/lfp_sale_service" -require "google/shopping/merchant/lfp/v1/lfp_store_service" -require "google/shopping/merchant/lfp/v1/version" - -module Google - module Shopping - module Merchant - module Lfp - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/lfp/v1" - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/lfp/v1" - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/merchant/lfp/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb deleted file mode 100644 index fc006da4801b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1/version" - -require "google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials" -require "google/shopping/merchant/lfp/v1/lfp_inventory_service/paths" -require "google/shopping/merchant/lfp/v1/lfp_inventory_service/client" -require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # inventories for a merchant. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/lfp/v1/lfp_inventory_service" - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new - # - module LfpInventoryService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "lfp_inventory_service", "helpers.rb" -require "google/shopping/merchant/lfp/v1/lfp_inventory_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb deleted file mode 100644 index 99267d24850f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb +++ /dev/null @@ -1,488 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/lfp/v1/lfpinventory_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpInventoryService - ## - # Client for the LfpInventoryService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # inventories for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_inventory_service_stub - - ## - # Configure the LfpInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpInventoryService clients - # ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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", "Shopping", "Merchant", "Lfp", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpInventoryService 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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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 - @lfp_inventory_service_stub.universe_domain - end - - ## - # Create a new LfpInventoryService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpInventoryService 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/shopping/merchant/lfp/v1/lfpinventory_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 - - @lfp_inventory_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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 - ) - - @lfp_inventory_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 - @lfp_inventory_service_stub.logger - end - - # Service calls - - ## - # Inserts a `LfpInventory` resource for the given target merchant account. If - # the resource already exists, it will be replaced. The inventory - # automatically expires after 30 days. - # - # @overload insert_lfp_inventory(request, options = nil) - # Pass arguments to `insert_lfp_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_lfp_inventory(parent: nil, lfp_inventory: nil) - # Pass arguments to `insert_lfp_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account. - # Format: `accounts/{account}` - # @param lfp_inventory [::Google::Shopping::Merchant::Lfp::V1::LfpInventory, ::Hash] - # Required. The inventory to insert. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new - # - # # Call the insert_lfp_inventory method. - # result = client.insert_lfp_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpInventory. - # p result - # - def insert_lfp_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_lfp_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_lfp_inventory.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_lfp_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_inventory_service_stub.call_rpc :insert_lfp_inventory, request, 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 LfpInventoryService API. - # - # This class represents the configuration for LfpInventoryService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # insert_lfp_inventory to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_inventory.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_inventory.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `insert_lfp_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_inventory - - # @private - def initialize parent_rpcs = nil - insert_lfp_inventory_config = parent_rpcs.insert_lfp_inventory if parent_rpcs.respond_to? :insert_lfp_inventory - @insert_lfp_inventory = ::Gapic::Config::Method.new insert_lfp_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb deleted file mode 100644 index 49a7ffb7e0db..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_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 Shopping - module Merchant - module Lfp - module V1 - module LfpInventoryService - # Credentials for the LfpInventoryService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb deleted file mode 100644 index b96335aebdf0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpInventoryService - # Path helper methods for the LfpInventoryService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified LfpInventory resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}` - # - # @param account [String] - # @param target_merchant [String] - # @param store_code [String] - # @param offer [String] - # - # @return [::String] - def lfp_inventory_path account:, target_merchant:, store_code:, offer: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "target_merchant cannot contain /" if target_merchant.to_s.include? "/" - raise ::ArgumentError, "store_code cannot contain /" if store_code.to_s.include? "/" - - "accounts/#{account}/lfpInventories/#{target_merchant}~#{store_code}~#{offer}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb deleted file mode 100644 index 0020d2acf6f6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1/version" - -require "google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials" -require "google/shopping/merchant/lfp/v1/lfp_inventory_service/paths" -require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # inventories for a merchant. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new - # - module LfpInventoryService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb deleted file mode 100644 index 172839a0ea6f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb +++ /dev/null @@ -1,438 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/lfp/v1/lfpinventory_pb" -require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpInventoryService - module Rest - ## - # REST client for the LfpInventoryService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # inventories for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_inventory_service_stub - - ## - # Configure the LfpInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpInventoryService clients - # ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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", "Shopping", "Merchant", "Lfp", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpInventoryService 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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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 - @lfp_inventory_service_stub.universe_domain - end - - ## - # Create a new LfpInventoryService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpInventoryService 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 - - @lfp_inventory_service_stub = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @lfp_inventory_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 - @lfp_inventory_service_stub.logger - end - - # Service calls - - ## - # Inserts a `LfpInventory` resource for the given target merchant account. If - # the resource already exists, it will be replaced. The inventory - # automatically expires after 30 days. - # - # @overload insert_lfp_inventory(request, options = nil) - # Pass arguments to `insert_lfp_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_lfp_inventory(parent: nil, lfp_inventory: nil) - # Pass arguments to `insert_lfp_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account. - # Format: `accounts/{account}` - # @param lfp_inventory [::Google::Shopping::Merchant::Lfp::V1::LfpInventory, ::Hash] - # Required. The inventory to insert. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new - # - # # Call the insert_lfp_inventory method. - # result = client.insert_lfp_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpInventory. - # p result - # - def insert_lfp_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_lfp_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_lfp_inventory.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_lfp_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_inventory_service_stub.insert_lfp_inventory request, 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 LfpInventoryService REST API. - # - # This class represents the configuration for LfpInventoryService 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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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 - # # insert_lfp_inventory to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_inventory.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_inventory.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `insert_lfp_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_inventory - - # @private - def initialize parent_rpcs = nil - insert_lfp_inventory_config = parent_rpcs.insert_lfp_inventory if parent_rpcs.respond_to? :insert_lfp_inventory - @insert_lfp_inventory = ::Gapic::Config::Method.new insert_lfp_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb deleted file mode 100644 index 659e524ce08f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.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! - -require "google/shopping/merchant/lfp/v1/lfpinventory_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpInventoryService - module Rest - ## - # REST service stub for the LfpInventoryService 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 insert_lfp_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] - # A result object deserialized from the server's reply - def insert_lfp_inventory request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_inventory_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "insert_lfp_inventory", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1::LfpInventory.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 insert_lfp_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_lfp_inventory_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/lfp/v1/{parent}/lfpInventories:insert", - body: "lfp_inventory", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb deleted file mode 100644 index d1805e8a2ee9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_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/shopping/merchant/lfp/v1/version" - -require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials" -require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths" -require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client" -require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to get the - # state of a merchant. - # - # For information about onboarding a retailer, see [How to onboard a - # retailer](https://support.google.com/merchants/answer/15243706). - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service" - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new - # - module LfpMerchantStateService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "lfp_merchant_state_service", "helpers.rb" -require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb deleted file mode 100644 index f49fdf6cd275..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb +++ /dev/null @@ -1,488 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/lfp/v1/lfpmerchantstate_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpMerchantStateService - ## - # Client for the LfpMerchantStateService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to get the - # state of a merchant. - # - # For information about onboarding a retailer, see [How to onboard a - # retailer](https://support.google.com/merchants/answer/15243706). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_merchant_state_service_stub - - ## - # Configure the LfpMerchantStateService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpMerchantStateService clients - # ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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", "Shopping", "Merchant", "Lfp", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpMerchantStateService 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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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 - @lfp_merchant_state_service_stub.universe_domain - end - - ## - # Create a new LfpMerchantStateService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpMerchantStateService 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/shopping/merchant/lfp/v1/lfpmerchantstate_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 - - @lfp_merchant_state_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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 - ) - - @lfp_merchant_state_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 - @lfp_merchant_state_service_stub.logger - end - - # Service calls - - ## - # Gets the LFP state of a merchant - # - # @overload get_lfp_merchant_state(request, options = nil) - # Pass arguments to `get_lfp_merchant_state` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_lfp_merchant_state(name: nil) - # Pass arguments to `get_lfp_merchant_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the state to retrieve. - # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}`. For - # example, `accounts/123456/lfpMerchantStates/567890`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new - # - # # Call the get_lfp_merchant_state method. - # result = client.get_lfp_merchant_state request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpMerchantState. - # p result - # - def get_lfp_merchant_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_lfp_merchant_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_lfp_merchant_state.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_lfp_merchant_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_merchant_state_service_stub.call_rpc :get_lfp_merchant_state, request, 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 LfpMerchantStateService API. - # - # This class represents the configuration for LfpMerchantStateService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_lfp_merchant_state to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_merchant_state.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_merchant_state.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpMerchantStateService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_lfp_merchant_state` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lfp_merchant_state - - # @private - def initialize parent_rpcs = nil - get_lfp_merchant_state_config = parent_rpcs.get_lfp_merchant_state if parent_rpcs.respond_to? :get_lfp_merchant_state - @get_lfp_merchant_state = ::Gapic::Config::Method.new get_lfp_merchant_state_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb deleted file mode 100644 index 135a12914c76..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_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 Shopping - module Merchant - module Lfp - module V1 - module LfpMerchantStateService - # Credentials for the LfpMerchantStateService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb deleted file mode 100644 index c635fc723f12..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/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 Shopping - module Merchant - module Lfp - module V1 - module LfpMerchantStateService - # Path helper methods for the LfpMerchantStateService API. - module Paths - ## - # Create a fully-qualified LfpMerchantState resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/lfpMerchantStates/{lfp_merchant_state}` - # - # @param account [String] - # @param lfp_merchant_state [String] - # - # @return [::String] - def lfp_merchant_state_path account:, lfp_merchant_state: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/lfpMerchantStates/#{lfp_merchant_state}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb deleted file mode 100644 index 97650d8d3130..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_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/shopping/merchant/lfp/v1/version" - -require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials" -require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths" -require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to get the - # state of a merchant. - # - # For information about onboarding a retailer, see [How to onboard a - # retailer](https://support.google.com/merchants/answer/15243706). - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new - # - module LfpMerchantStateService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb deleted file mode 100644 index 001434a0884a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb +++ /dev/null @@ -1,438 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/lfp/v1/lfpmerchantstate_pb" -require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpMerchantStateService - module Rest - ## - # REST client for the LfpMerchantStateService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to get the - # state of a merchant. - # - # For information about onboarding a retailer, see [How to onboard a - # retailer](https://support.google.com/merchants/answer/15243706). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_merchant_state_service_stub - - ## - # Configure the LfpMerchantStateService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpMerchantStateService clients - # ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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", "Shopping", "Merchant", "Lfp", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpMerchantStateService 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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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 - @lfp_merchant_state_service_stub.universe_domain - end - - ## - # Create a new LfpMerchantStateService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpMerchantStateService 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 - - @lfp_merchant_state_service_stub = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @lfp_merchant_state_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 - @lfp_merchant_state_service_stub.logger - end - - # Service calls - - ## - # Gets the LFP state of a merchant - # - # @overload get_lfp_merchant_state(request, options = nil) - # Pass arguments to `get_lfp_merchant_state` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_lfp_merchant_state(name: nil) - # Pass arguments to `get_lfp_merchant_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the state to retrieve. - # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}`. For - # example, `accounts/123456/lfpMerchantStates/567890`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new - # - # # Call the get_lfp_merchant_state method. - # result = client.get_lfp_merchant_state request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpMerchantState. - # p result - # - def get_lfp_merchant_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_lfp_merchant_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_lfp_merchant_state.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_lfp_merchant_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_merchant_state_service_stub.get_lfp_merchant_state request, 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 LfpMerchantStateService REST API. - # - # This class represents the configuration for LfpMerchantStateService 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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_lfp_merchant_state to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_merchant_state.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_merchant_state.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpMerchantStateService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_lfp_merchant_state` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lfp_merchant_state - - # @private - def initialize parent_rpcs = nil - get_lfp_merchant_state_config = parent_rpcs.get_lfp_merchant_state if parent_rpcs.respond_to? :get_lfp_merchant_state - @get_lfp_merchant_state = ::Gapic::Config::Method.new get_lfp_merchant_state_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb deleted file mode 100644 index e5e64946788a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.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! - -require "google/shopping/merchant/lfp/v1/lfpmerchantstate_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpMerchantStateService - module Rest - ## - # REST service stub for the LfpMerchantStateService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_lfp_merchant_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] - # A result object deserialized from the server's reply - def get_lfp_merchant_state request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_lfp_merchant_state_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_lfp_merchant_state", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_lfp_merchant_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_lfp_merchant_state_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/lfp/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/lfpMerchantStates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb deleted file mode 100644 index 799df55707ea..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1/version" - -require "google/shopping/merchant/lfp/v1/lfp_sale_service/credentials" -require "google/shopping/merchant/lfp/v1/lfp_sale_service/paths" -require "google/shopping/merchant/lfp/v1/lfp_sale_service/client" -require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit sales - # data for a merchant. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/lfp/v1/lfp_sale_service" - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new - # - module LfpSaleService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "lfp_sale_service", "helpers.rb" -require "google/shopping/merchant/lfp/v1/lfp_sale_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb deleted file mode 100644 index 2fd66f9ca7db..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb +++ /dev/null @@ -1,486 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/lfp/v1/lfpsale_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpSaleService - ## - # Client for the LfpSaleService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit sales - # data for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_sale_service_stub - - ## - # Configure the LfpSaleService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpSaleService clients - # ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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", "Shopping", "Merchant", "Lfp", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpSaleService 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::Shopping::Merchant::Lfp::V1::LfpSaleService::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 - @lfp_sale_service_stub.universe_domain - end - - ## - # Create a new LfpSaleService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpSaleService 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/shopping/merchant/lfp/v1/lfpsale_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 - - @lfp_sale_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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 - ) - - @lfp_sale_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 - @lfp_sale_service_stub.logger - end - - # Service calls - - ## - # Inserts a `LfpSale` for the given merchant. - # - # @overload insert_lfp_sale(request, options = nil) - # Pass arguments to `insert_lfp_sale` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_lfp_sale(parent: nil, lfp_sale: nil) - # Pass arguments to `insert_lfp_sale` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account. - # Format: `accounts/{lfp_partner}` - # @param lfp_sale [::Google::Shopping::Merchant::Lfp::V1::LfpSale, ::Hash] - # Required. The sale to insert. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpSale] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpSale] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new - # - # # Call the insert_lfp_sale method. - # result = client.insert_lfp_sale request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpSale. - # p result - # - def insert_lfp_sale request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_lfp_sale.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_lfp_sale.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_lfp_sale.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_sale_service_stub.call_rpc :insert_lfp_sale, request, 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 LfpSaleService API. - # - # This class represents the configuration for LfpSaleService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # insert_lfp_sale to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_sale.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_sale.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Lfp::V1::LfpSaleService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpSaleService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `insert_lfp_sale` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_sale - - # @private - def initialize parent_rpcs = nil - insert_lfp_sale_config = parent_rpcs.insert_lfp_sale if parent_rpcs.respond_to? :insert_lfp_sale - @insert_lfp_sale = ::Gapic::Config::Method.new insert_lfp_sale_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb deleted file mode 100644 index 0243ce4673d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_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 Shopping - module Merchant - module Lfp - module V1 - module LfpSaleService - # Credentials for the LfpSaleService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb deleted file mode 100644 index e561a91d26ac..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/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 Shopping - module Merchant - module Lfp - module V1 - module LfpSaleService - # Path helper methods for the LfpSaleService API. - module Paths - ## - # Create a fully-qualified LfpSale resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/lfpSales/{sale}` - # - # @param account [String] - # @param sale [String] - # - # @return [::String] - def lfp_sale_path account:, sale: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/lfpSales/#{sale}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb deleted file mode 100644 index f7a4aac73a76..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1/version" - -require "google/shopping/merchant/lfp/v1/lfp_sale_service/credentials" -require "google/shopping/merchant/lfp/v1/lfp_sale_service/paths" -require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit sales - # data for a merchant. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new - # - module LfpSaleService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb deleted file mode 100644 index 401c7bff4d4f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb +++ /dev/null @@ -1,436 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/lfp/v1/lfpsale_pb" -require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpSaleService - module Rest - ## - # REST client for the LfpSaleService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit sales - # data for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_sale_service_stub - - ## - # Configure the LfpSaleService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpSaleService clients - # ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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", "Shopping", "Merchant", "Lfp", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpSaleService 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::Shopping::Merchant::Lfp::V1::LfpSaleService::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 - @lfp_sale_service_stub.universe_domain - end - - ## - # Create a new LfpSaleService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpSaleService 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 - - @lfp_sale_service_stub = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @lfp_sale_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 - @lfp_sale_service_stub.logger - end - - # Service calls - - ## - # Inserts a `LfpSale` for the given merchant. - # - # @overload insert_lfp_sale(request, options = nil) - # Pass arguments to `insert_lfp_sale` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_lfp_sale(parent: nil, lfp_sale: nil) - # Pass arguments to `insert_lfp_sale` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account. - # Format: `accounts/{lfp_partner}` - # @param lfp_sale [::Google::Shopping::Merchant::Lfp::V1::LfpSale, ::Hash] - # Required. The sale to insert. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpSale] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpSale] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new - # - # # Call the insert_lfp_sale method. - # result = client.insert_lfp_sale request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpSale. - # p result - # - def insert_lfp_sale request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_lfp_sale.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_lfp_sale.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_lfp_sale.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_sale_service_stub.insert_lfp_sale request, 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 LfpSaleService REST API. - # - # This class represents the configuration for LfpSaleService 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::Shopping::Merchant::Lfp::V1::LfpSaleService::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 - # # insert_lfp_sale to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_sale.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_sale.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpSaleService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `insert_lfp_sale` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_sale - - # @private - def initialize parent_rpcs = nil - insert_lfp_sale_config = parent_rpcs.insert_lfp_sale if parent_rpcs.respond_to? :insert_lfp_sale - @insert_lfp_sale = ::Gapic::Config::Method.new insert_lfp_sale_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb deleted file mode 100644 index 4c4a42259017..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.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! - -require "google/shopping/merchant/lfp/v1/lfpsale_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpSaleService - module Rest - ## - # REST service stub for the LfpSaleService 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 insert_lfp_sale REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpSale] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpSale] - # A result object deserialized from the server's reply - def insert_lfp_sale request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_sale_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "insert_lfp_sale", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1::LfpSale.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 insert_lfp_sale REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_lfp_sale_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/lfp/v1/{parent}/lfpSales:insert", - body: "lfp_sale", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb deleted file mode 100644 index 65dc5989d237..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1/version" - -require "google/shopping/merchant/lfp/v1/lfp_store_service/credentials" -require "google/shopping/merchant/lfp/v1/lfp_store_service/paths" -require "google/shopping/merchant/lfp/v1/lfp_store_service/client" -require "google/shopping/merchant/lfp/v1/lfp_store_service/rest" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # stores for a merchant. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/lfp/v1/lfp_store_service" - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/lfp/v1/lfp_store_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new - # - module LfpStoreService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "lfp_store_service", "helpers.rb" -require "google/shopping/merchant/lfp/v1/lfp_store_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb deleted file mode 100644 index 3a99e0f1dab4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.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! - -require "google/cloud/errors" -require "google/shopping/merchant/lfp/v1/lfpstore_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpStoreService - ## - # Client for the LfpStoreService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # stores for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_store_service_stub - - ## - # Configure the LfpStoreService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpStoreService clients - # ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::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", "Shopping", "Merchant", "Lfp", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpStoreService 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::Shopping::Merchant::Lfp::V1::LfpStoreService::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 - @lfp_store_service_stub.universe_domain - end - - ## - # Create a new LfpStoreService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpStoreService 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/shopping/merchant/lfp/v1/lfpstore_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 - - @lfp_store_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::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 - ) - - @lfp_store_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 - @lfp_store_service_stub.logger - end - - # Service calls - - ## - # Retrieves information about a store. - # - # @overload get_lfp_store(request, options = nil) - # Pass arguments to `get_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_lfp_store(name: nil) - # Pass arguments to `get_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the store to retrieve. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpStore] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new - # - # # Call the get_lfp_store method. - # result = client.get_lfp_store request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. - # p result - # - def get_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_lfp_store.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.call_rpc :get_lfp_store, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inserts a store for the target merchant. If the store with the same store - # code already exists, it will be replaced. - # - # @overload insert_lfp_store(request, options = nil) - # Pass arguments to `insert_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_lfp_store(parent: nil, lfp_store: nil) - # Pass arguments to `insert_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account - # Format: `accounts/{account}` - # @param lfp_store [::Google::Shopping::Merchant::Lfp::V1::LfpStore, ::Hash] - # Required. The store to insert. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpStore] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new - # - # # Call the insert_lfp_store method. - # result = client.insert_lfp_store request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. - # p result - # - def insert_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_lfp_store.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.call_rpc :insert_lfp_store, request, 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 store for a target merchant. - # - # @overload delete_lfp_store(request, options = nil) - # Pass arguments to `delete_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_lfp_store(name: nil) - # Pass arguments to `delete_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the store to delete for the target merchant account. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # - # @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/shopping/merchant/lfp/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new - # - # # Call the delete_lfp_store method. - # result = client.delete_lfp_store request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_lfp_store.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.call_rpc :delete_lfp_store, request, 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 stores of the target merchant, specified by the filter in - # `ListLfpStoresRequest`. - # - # @overload list_lfp_stores(request, options = nil) - # Pass arguments to `list_lfp_stores` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_lfp_stores(parent: nil, target_account: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_lfp_stores` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP partner. - # Format: `accounts/{account}` - # @param target_account [::Integer] - # Required. The Merchant Center id of the merchant to list stores for. - # @param page_size [::Integer] - # Optional. The maximum number of `LfpStore` resources for the given account - # to return. The service returns fewer than this value if the number of - # stores for the given account is less than the `pageSize`. The default value - # is 250. The maximum value is 1000; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListLfpStoresRequest` - # call. Provide the page token to retrieve the subsequent page. When - # paginating, all other parameters provided to `ListLfpStoresRequest` must - # match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse#next_page_token nextPageToken} - # in the response to the previous request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1::LfpStore>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1::LfpStore>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new - # - # # Call the list_lfp_stores method. - # result = client.list_lfp_stores request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Lfp::V1::LfpStore. - # p item - # end - # - def list_lfp_stores request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_lfp_stores.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_lfp_stores.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_lfp_stores.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.call_rpc :list_lfp_stores, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @lfp_store_service_stub, :list_lfp_stores, 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 LfpStoreService API. - # - # This class represents the configuration for LfpStoreService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_lfp_store to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_store.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_store.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Lfp::V1::LfpStoreService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpStoreService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lfp_store - ## - # RPC-specific configuration for `insert_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_store - ## - # RPC-specific configuration for `delete_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lfp_store - ## - # RPC-specific configuration for `list_lfp_stores` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lfp_stores - - # @private - def initialize parent_rpcs = nil - get_lfp_store_config = parent_rpcs.get_lfp_store if parent_rpcs.respond_to? :get_lfp_store - @get_lfp_store = ::Gapic::Config::Method.new get_lfp_store_config - insert_lfp_store_config = parent_rpcs.insert_lfp_store if parent_rpcs.respond_to? :insert_lfp_store - @insert_lfp_store = ::Gapic::Config::Method.new insert_lfp_store_config - delete_lfp_store_config = parent_rpcs.delete_lfp_store if parent_rpcs.respond_to? :delete_lfp_store - @delete_lfp_store = ::Gapic::Config::Method.new delete_lfp_store_config - list_lfp_stores_config = parent_rpcs.list_lfp_stores if parent_rpcs.respond_to? :list_lfp_stores - @list_lfp_stores = ::Gapic::Config::Method.new list_lfp_stores_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb deleted file mode 100644 index 50e7f7a7dd9c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_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 Shopping - module Merchant - module Lfp - module V1 - module LfpStoreService - # Credentials for the LfpStoreService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb deleted file mode 100644 index dba6371bbd99..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpStoreService - # Path helper methods for the LfpStoreService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified LfpStore resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # - # @param account [String] - # @param target_merchant [String] - # @param store_code [String] - # - # @return [::String] - def lfp_store_path account:, target_merchant:, store_code: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "target_merchant cannot contain /" if target_merchant.to_s.include? "/" - - "accounts/#{account}/lfpStores/#{target_merchant}~#{store_code}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb deleted file mode 100644 index c3fc803a7e1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1/version" - -require "google/shopping/merchant/lfp/v1/lfp_store_service/credentials" -require "google/shopping/merchant/lfp/v1/lfp_store_service/paths" -require "google/shopping/merchant/lfp/v1/lfp_store_service/rest/client" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # stores for a merchant. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/lfp/v1/lfp_store_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new - # - module LfpStoreService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/lfp/v1/lfp_store_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb deleted file mode 100644 index bc188e1e485b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb +++ /dev/null @@ -1,717 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/lfp/v1/lfpstore_pb" -require "google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpStoreService - module Rest - ## - # REST client for the LfpStoreService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # stores for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_store_service_stub - - ## - # Configure the LfpStoreService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpStoreService clients - # ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::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", "Shopping", "Merchant", "Lfp", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpStoreService 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::Shopping::Merchant::Lfp::V1::LfpStoreService::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 - @lfp_store_service_stub.universe_domain - end - - ## - # Create a new LfpStoreService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpStoreService 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 - - @lfp_store_service_stub = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @lfp_store_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 - @lfp_store_service_stub.logger - end - - # Service calls - - ## - # Retrieves information about a store. - # - # @overload get_lfp_store(request, options = nil) - # Pass arguments to `get_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_lfp_store(name: nil) - # Pass arguments to `get_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the store to retrieve. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpStore] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new - # - # # Call the get_lfp_store method. - # result = client.get_lfp_store request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. - # p result - # - def get_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_lfp_store.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.get_lfp_store request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inserts a store for the target merchant. If the store with the same store - # code already exists, it will be replaced. - # - # @overload insert_lfp_store(request, options = nil) - # Pass arguments to `insert_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_lfp_store(parent: nil, lfp_store: nil) - # Pass arguments to `insert_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account - # Format: `accounts/{account}` - # @param lfp_store [::Google::Shopping::Merchant::Lfp::V1::LfpStore, ::Hash] - # Required. The store to insert. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpStore] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new - # - # # Call the insert_lfp_store method. - # result = client.insert_lfp_store request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. - # p result - # - def insert_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_lfp_store.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.insert_lfp_store request, 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 store for a target merchant. - # - # @overload delete_lfp_store(request, options = nil) - # Pass arguments to `delete_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_lfp_store(name: nil) - # Pass arguments to `delete_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the store to delete for the target merchant account. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # @yield [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/shopping/merchant/lfp/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new - # - # # Call the delete_lfp_store method. - # result = client.delete_lfp_store request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_lfp_store.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.delete_lfp_store request, 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 stores of the target merchant, specified by the filter in - # `ListLfpStoresRequest`. - # - # @overload list_lfp_stores(request, options = nil) - # Pass arguments to `list_lfp_stores` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_lfp_stores(parent: nil, target_account: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_lfp_stores` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP partner. - # Format: `accounts/{account}` - # @param target_account [::Integer] - # Required. The Merchant Center id of the merchant to list stores for. - # @param page_size [::Integer] - # Optional. The maximum number of `LfpStore` resources for the given account - # to return. The service returns fewer than this value if the number of - # stores for the given account is less than the `pageSize`. The default value - # is 250. The maximum value is 1000; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListLfpStoresRequest` - # call. Provide the page token to retrieve the subsequent page. When - # paginating, all other parameters provided to `ListLfpStoresRequest` must - # match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse#next_page_token nextPageToken} - # in the response to the previous request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1::LfpStore>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1::LfpStore>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new - # - # # Call the list_lfp_stores method. - # result = client.list_lfp_stores request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Lfp::V1::LfpStore. - # p item - # end - # - def list_lfp_stores request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_lfp_stores.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_lfp_stores.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_lfp_stores.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.list_lfp_stores request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @lfp_store_service_stub, :list_lfp_stores, "lfp_stores", request, result, 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 LfpStoreService REST API. - # - # This class represents the configuration for LfpStoreService 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::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_lfp_store to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_store.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_store.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpStoreService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lfp_store - ## - # RPC-specific configuration for `insert_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_store - ## - # RPC-specific configuration for `delete_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lfp_store - ## - # RPC-specific configuration for `list_lfp_stores` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lfp_stores - - # @private - def initialize parent_rpcs = nil - get_lfp_store_config = parent_rpcs.get_lfp_store if parent_rpcs.respond_to? :get_lfp_store - @get_lfp_store = ::Gapic::Config::Method.new get_lfp_store_config - insert_lfp_store_config = parent_rpcs.insert_lfp_store if parent_rpcs.respond_to? :insert_lfp_store - @insert_lfp_store = ::Gapic::Config::Method.new insert_lfp_store_config - delete_lfp_store_config = parent_rpcs.delete_lfp_store if parent_rpcs.respond_to? :delete_lfp_store - @delete_lfp_store = ::Gapic::Config::Method.new delete_lfp_store_config - list_lfp_stores_config = parent_rpcs.list_lfp_stores if parent_rpcs.respond_to? :list_lfp_stores - @list_lfp_stores = ::Gapic::Config::Method.new list_lfp_stores_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb deleted file mode 100644 index d91e92f8a337..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb +++ /dev/null @@ -1,328 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/lfp/v1/lfpstore_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpStoreService - module Rest - ## - # REST service stub for the LfpStoreService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpStore] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] - # A result object deserialized from the server's reply - def get_lfp_store request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_lfp_store_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_lfp_store", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the insert_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpStore] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] - # A result object deserialized from the server's reply - def insert_lfp_store request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_store_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "insert_lfp_store", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.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_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_lfp_store request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_lfp_store_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_lfp_store", - 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_lfp_stores REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse] - # A result object deserialized from the server's reply - def list_lfp_stores request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_lfp_stores_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_lfp_stores", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_lfp_store_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/lfp/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/lfpStores/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_lfp_store_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/lfp/v1/{parent}/lfpStores:insert", - body: "lfp_store", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_lfp_store_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/lfp/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/lfpStores/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_lfp_stores REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_lfp_stores_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/lfp/v1/{parent}/lfpStores", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_pb.rb deleted file mode 100644 index bebf50dc2328..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/lfp/v1/lfpinventory.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n2google/shopping/merchant/lfp/v1/lfpinventory.proto\x12\x1fgoogle.shopping.merchant.lfp.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xa2\x05\n\x0cLfpInventory\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x17\n\nstore_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08offer_id\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x04gtin\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12/\n\x05price\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x19\n\x0c\x61vailability\x18\t \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\x08quantity\x18\n \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x38\n\x0f\x63ollection_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x1f\n\rpickup_method\x18\x0c \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1c\n\npickup_sla\x18\r \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1c\n\nfeed_label\x18\x0e \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01:\x95\x01\xea\x41\x91\x01\n\'merchantapi.googleapis.com/LfpInventory\x12Haccounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}*\x0elfpInventories2\x0clfpInventoryB\x07\n\x05_gtinB\x0b\n\t_quantityB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\r\n\x0b_feed_label\"\xa7\x01\n\x19InsertLfpInventoryRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'merchantapi.googleapis.com/LfpInventory\x12I\n\rlfp_inventory\x18\x02 \x01(\x0b\x32-.google.shopping.merchant.lfp.v1.LfpInventoryB\x03\xe0\x41\x02\x32\xaa\x02\n\x13LfpInventoryService\x12\xc9\x01\n\x12InsertLfpInventory\x12:.google.shopping.merchant.lfp.v1.InsertLfpInventoryRequest\x1a-.google.shopping.merchant.lfp.v1.LfpInventory\"H\x82\xd3\xe4\x93\x02\x42\"1/lfp/v1/{parent=accounts/*}/lfpInventories:insert:\rlfp_inventory\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x9c\x02\n#com.google.shopping.merchant.lfp.v1B\x11LfpInventoryProtoP\x01Z;cloud.google.com/go/shopping/merchant/lfp/apiv1/lfppb;lfppb\xaa\x02\x1fGoogle.Shopping.Merchant.Lfp.V1\xca\x02\x1fGoogle\\Shopping\\Merchant\\Lfp\\V1\xea\x02#Google::Shopping::Merchant::Lfp::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Lfp - module V1 - LfpInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpInventory").msgclass - InsertLfpInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.InsertLfpInventoryRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_services_pb.rb deleted file mode 100644 index 209da3015936..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/lfp/v1/lfpinventory.proto for package 'Google.Shopping.Merchant.Lfp.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/shopping/merchant/lfp/v1/lfpinventory_pb' - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpInventoryService - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # inventories for a merchant. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.lfp.v1.LfpInventoryService' - - # Inserts a `LfpInventory` resource for the given target merchant account. If - # the resource already exists, it will be replaced. The inventory - # automatically expires after 30 days. - rpc :InsertLfpInventory, ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest, ::Google::Shopping::Merchant::Lfp::V1::LfpInventory - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_pb.rb deleted file mode 100644 index 575e93d4392c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/lfp/v1/lfpmerchantstate.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 = "\n6google/shopping/merchant/lfp/v1/lfpmerchantstate.proto\x12\x1fgoogle.shopping.merchant.lfp.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc7\x0e\n\x10LfpMerchantState\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0blinked_gbps\x18\x02 \x01(\x03\x12Z\n\x0cstore_states\x18\x03 \x03(\x0b\x32?.google.shopping.merchant.lfp.v1.LfpMerchantState.LfpStoreStateB\x03\xe0\x41\x03\x12Y\n\x0finventory_stats\x18\x04 \x01(\x0b\x32@.google.shopping.merchant.lfp.v1.LfpMerchantState.InventoryStats\x12[\n\x10\x63ountry_settings\x18\x05 \x03(\x0b\x32\x41.google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings\x1a\xb8\x02\n\rLfpStoreState\x12\x1a\n\nstore_code\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12o\n\x0ematching_state\x18\x02 \x01(\x0e\x32R.google.shopping.merchant.lfp.v1.LfpMerchantState.LfpStoreState.StoreMatchingStateB\x03\xe0\x41\x03\x12\x1b\n\x13matching_state_hint\x18\x03 \x01(\t\"}\n\x12StoreMatchingState\x12$\n STORE_MATCHING_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cSTORE_MATCHING_STATE_MATCHED\x10\x01\x12\x1f\n\x1bSTORE_MATCHING_STATE_FAILED\x10\x02\x1a\x88\x01\n\x0eInventoryStats\x12\x19\n\x11submitted_entries\x18\x01 \x01(\x03\x12\"\n\x1asubmitted_in_stock_entries\x18\x02 \x01(\x03\x12\x1b\n\x13unsubmitted_entries\x18\x03 \x01(\x03\x12\x1a\n\x12submitted_products\x18\x04 \x01(\x03\x1a\x9c\x07\n\x0f\x43ountrySettings\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12#\n\x1b\x66ree_local_listings_enabled\x18\x02 \x01(\x08\x12#\n\x1blocal_inventory_ads_enabled\x18\x03 \x01(\x08\x12~\n\x1cinventory_verification_state\x18\x04 \x01(\x0e\x32S.google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.VerificationStateB\x03\xe0\x41\x03\x12q\n\x11product_page_type\x18\x05 \x01(\x0e\x32Q.google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.ProductPageTypeB\x03\xe0\x41\x03\x12\x84\x01\n\"instock_serving_verification_state\x18\x06 \x01(\x0e\x32S.google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.VerificationStateB\x03\xe0\x41\x03\x12\x83\x01\n!pickup_serving_verification_state\x18\x07 \x01(\x0e\x32S.google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.VerificationStateB\x03\xe0\x41\x03\"\xa1\x01\n\x11VerificationState\x12\"\n\x1eVERIFICATION_STATE_UNSPECIFIED\x10\x00\x12#\n\x1fVERIFICATION_STATE_NOT_APPROVED\x10\x01\x12\"\n\x1eVERIFICATION_STATE_IN_PROGRESS\x10\x02\x12\x1f\n\x1bVERIFICATION_STATE_APPROVED\x10\x03\"\x80\x01\n\x0fProductPageType\x12!\n\x1dPRODUCT_PAGE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rGOOGLE_HOSTED\x10\x01\x12\x13\n\x0fMERCHANT_HOSTED\x10\x02\x12\"\n\x1eMERCHANT_HOSTED_STORE_SPECIFIC\x10\x03:\x91\x01\xea\x41\x8d\x01\n+merchantapi.googleapis.com/LfpMerchantState\x12\x39\x61\x63\x63ounts/{account}/lfpMerchantStates/{lfp_merchant_state}*\x11lfpMerchantStates2\x10lfpMerchantState\"_\n\x1aGetLfpMerchantStateRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/LfpMerchantState2\xa8\x02\n\x17LfpMerchantStateService\x12\xc3\x01\n\x13GetLfpMerchantState\x12;.google.shopping.merchant.lfp.v1.GetLfpMerchantStateRequest\x1a\x31.google.shopping.merchant.lfp.v1.LfpMerchantState\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/lfp/v1/{name=accounts/*/lfpMerchantStates/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xe5\x01\n#com.google.shopping.merchant.lfp.v1B\x15LfpMerchantStateProtoP\x01Z;cloud.google.com/go/shopping/merchant/lfp/apiv1/lfppb;lfppb\xaa\x02\x1fGoogle.Shopping.Merchant.Lfp.V1\xca\x02\x1fGoogle\\Shopping\\Merchant\\Lfp\\V1\xea\x02#Google::Shopping::Merchant::Lfp::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Lfp - module V1 - LfpMerchantState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState").msgclass - LfpMerchantState::LfpStoreState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.LfpStoreState").msgclass - LfpMerchantState::LfpStoreState::StoreMatchingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.LfpStoreState.StoreMatchingState").enummodule - LfpMerchantState::InventoryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.InventoryStats").msgclass - LfpMerchantState::CountrySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings").msgclass - LfpMerchantState::CountrySettings::VerificationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.VerificationState").enummodule - LfpMerchantState::CountrySettings::ProductPageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.ProductPageType").enummodule - GetLfpMerchantStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.GetLfpMerchantStateRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb.rb deleted file mode 100644 index be26c7cf8f6f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/lfp/v1/lfpmerchantstate.proto for package 'Google.Shopping.Merchant.Lfp.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/shopping/merchant/lfp/v1/lfpmerchantstate_pb' - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpMerchantStateService - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to get the - # state of a merchant. - # - # For information about onboarding a retailer, see [How to onboard a - # retailer](https://support.google.com/merchants/answer/15243706). - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.lfp.v1.LfpMerchantStateService' - - # Gets the LFP state of a merchant - rpc :GetLfpMerchantState, ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest, ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_pb.rb deleted file mode 100644 index 96c8eb9adccb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/lfp/v1/lfpsale.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/protobuf/timestamp_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n-google/shopping/merchant/lfp/v1/lfpsale.proto\x12\x1fgoogle.shopping.merchant.lfp.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\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xe8\x03\n\x07LfpSale\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x17\n\nstore_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08offer_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04gtin\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12/\n\x05price\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02\x12\x15\n\x08quantity\x18\t \x01(\x03\x42\x03\xe0\x41\x02\x12\x32\n\tsale_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x1d\n\x03uid\x18\x0b \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01H\x00\x88\x01\x01\x12\x1c\n\nfeed_label\x18\x0c \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01:^\xea\x41[\n\"merchantapi.googleapis.com/LfpSale\x12\"accounts/{account}/lfpSales/{sale}*\x08lfpSales2\x07lfpSaleB\x06\n\x04_uidB\r\n\x0b_feed_label\"l\n\x14InsertLfpSaleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12?\n\x08lfp_sale\x18\x02 \x01(\x0b\x32(.google.shopping.merchant.lfp.v1.LfpSaleB\x03\xe0\x41\x02\x32\x8b\x02\n\x0eLfpSaleService\x12\xaf\x01\n\rInsertLfpSale\x12\x35.google.shopping.merchant.lfp.v1.InsertLfpSaleRequest\x1a(.google.shopping.merchant.lfp.v1.LfpSale\"=\x82\xd3\xe4\x93\x02\x37\"+/lfp/v1/{parent=accounts/*}/lfpSales:insert:\x08lfp_sale\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xdc\x01\n#com.google.shopping.merchant.lfp.v1B\x0cLfpSaleProtoP\x01Z;cloud.google.com/go/shopping/merchant/lfp/apiv1/lfppb;lfppb\xaa\x02\x1fGoogle.Shopping.Merchant.Lfp.V1\xca\x02\x1fGoogle\\Shopping\\Merchant\\Lfp\\V1\xea\x02#Google::Shopping::Merchant::Lfp::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Lfp - module V1 - LfpSale = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpSale").msgclass - InsertLfpSaleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.InsertLfpSaleRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_services_pb.rb deleted file mode 100644 index 60c0eb7527b3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_services_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/lfp/v1/lfpsale.proto for package 'Google.Shopping.Merchant.Lfp.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/shopping/merchant/lfp/v1/lfpsale_pb' - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpSaleService - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit sales - # data for a merchant. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.lfp.v1.LfpSaleService' - - # Inserts a `LfpSale` for the given merchant. - rpc :InsertLfpSale, ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest, ::Google::Shopping::Merchant::Lfp::V1::LfpSale - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_pb.rb deleted file mode 100644 index 4a802811b3e0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/lfp/v1/lfpstore.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n.google/shopping/merchant/lfp/v1/lfpstore.proto\x12\x1fgoogle.shopping.merchant.lfp.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xe2\x05\n\x08LfpStore\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x1a\n\nstore_code\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1a\n\rstore_address\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\nstore_name\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1e\n\x0cphone_number\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1d\n\x0bwebsite_uri\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1a\n\rgcid_category\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\x08place_id\x18\t \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\\\n\x0ematching_state\x18\n \x01(\x0e\x32<.google.shopping.merchant.lfp.v1.LfpStore.StoreMatchingStateB\x06\xe0\x41\x01\xe0\x41\x03\x12(\n\x13matching_state_hint\x18\x0b \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03H\x04\x88\x01\x01\"}\n\x12StoreMatchingState\x12$\n STORE_MATCHING_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cSTORE_MATCHING_STATE_MATCHED\x10\x01\x12\x1f\n\x1bSTORE_MATCHING_STATE_FAILED\x10\x02:z\xea\x41w\n#merchantapi.googleapis.com/LfpStore\x12;accounts/{account}/lfpStores/{target_merchant}~{store_code}*\tlfpStores2\x08lfpStoreB\r\n\x0b_store_nameB\x0f\n\r_phone_numberB\x0e\n\x0c_website_uriB\x0b\n\t_place_idB\x16\n\x14_matching_state_hint\"O\n\x12GetLfpStoreRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/LfpStore\"\x97\x01\n\x15InsertLfpStoreRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#merchantapi.googleapis.com/LfpStore\x12\x41\n\tlfp_store\x18\x02 \x01(\x0b\x32).google.shopping.merchant.lfp.v1.LfpStoreB\x03\xe0\x41\x02\"R\n\x15\x44\x65leteLfpStoreRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/LfpStore\"\xa1\x01\n\x14ListLfpStoresRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#merchantapi.googleapis.com/LfpStore\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\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\"o\n\x15ListLfpStoresResponse\x12=\n\nlfp_stores\x18\x01 \x03(\x0b\x32).google.shopping.merchant.lfp.v1.LfpStore\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x9c\x06\n\x0fLfpStoreService\x12\xa3\x01\n\x0bGetLfpStore\x12\x33.google.shopping.merchant.lfp.v1.GetLfpStoreRequest\x1a).google.shopping.merchant.lfp.v1.LfpStore\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'\x12%/lfp/v1/{name=accounts/*/lfpStores/*}\x12\xc7\x01\n\x0eInsertLfpStore\x12\x36.google.shopping.merchant.lfp.v1.InsertLfpStoreRequest\x1a).google.shopping.merchant.lfp.v1.LfpStore\"R\xda\x41\x10parent,lfp_store\x82\xd3\xe4\x93\x02\x39\",/lfp/v1/{parent=accounts/*}/lfpStores:insert:\tlfp_store\x12\x96\x01\n\x0e\x44\x65leteLfpStore\x12\x36.google.shopping.merchant.lfp.v1.DeleteLfpStoreRequest\x1a\x16.google.protobuf.Empty\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'*%/lfp/v1/{name=accounts/*/lfpStores/*}\x12\xb6\x01\n\rListLfpStores\x12\x35.google.shopping.merchant.lfp.v1.ListLfpStoresRequest\x1a\x36.google.shopping.merchant.lfp.v1.ListLfpStoresResponse\"6\xda\x41\x06parent\x82\xd3\xe4\x93\x02\'\x12%/lfp/v1/{parent=accounts/*}/lfpStores\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xdd\x01\n#com.google.shopping.merchant.lfp.v1B\rLfpStoreProtoP\x01Z;cloud.google.com/go/shopping/merchant/lfp/apiv1/lfppb;lfppb\xaa\x02\x1fGoogle.Shopping.Merchant.Lfp.V1\xca\x02\x1fGoogle\\Shopping\\Merchant\\Lfp\\V1\xea\x02#Google::Shopping::Merchant::Lfp::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Lfp - module V1 - LfpStore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpStore").msgclass - LfpStore::StoreMatchingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpStore.StoreMatchingState").enummodule - GetLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.GetLfpStoreRequest").msgclass - InsertLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.InsertLfpStoreRequest").msgclass - DeleteLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.DeleteLfpStoreRequest").msgclass - ListLfpStoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.ListLfpStoresRequest").msgclass - ListLfpStoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.ListLfpStoresResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_services_pb.rb deleted file mode 100644 index 6155bbaea28d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_services_pb.rb +++ /dev/null @@ -1,57 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/lfp/v1/lfpstore.proto for package 'Google.Shopping.Merchant.Lfp.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/shopping/merchant/lfp/v1/lfpstore_pb' - -module Google - module Shopping - module Merchant - module Lfp - module V1 - module LfpStoreService - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # stores for a merchant. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.lfp.v1.LfpStoreService' - - # Retrieves information about a store. - rpc :GetLfpStore, ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest, ::Google::Shopping::Merchant::Lfp::V1::LfpStore - # Inserts a store for the target merchant. If the store with the same store - # code already exists, it will be replaced. - rpc :InsertLfpStore, ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest, ::Google::Shopping::Merchant::Lfp::V1::LfpStore - # Deletes a store for a target merchant. - rpc :DeleteLfpStore, ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest, ::Google::Protobuf::Empty - # Lists the stores of the target merchant, specified by the filter in - # `ListLfpStoresRequest`. - rpc :ListLfpStores, ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest, ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/rest.rb deleted file mode 100644 index 4d4fada1a79a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/rest.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/shopping/merchant/lfp/v1/lfp_inventory_service/rest" -require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest" -require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest" -require "google/shopping/merchant/lfp/v1/lfp_store_service/rest" -require "google/shopping/merchant/lfp/v1/version" - -module Google - module Shopping - module Merchant - module Lfp - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/lfp/v1/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/version.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/version.rb deleted file mode 100644 index 23d9fe53d3ff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/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 Shopping - module Merchant - module Lfp - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/README.md deleted file mode 100644 index 110adc2cf42e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant 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-shopping-merchant-lfp-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb deleted file mode 100644 index be67ae3ae6fa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb +++ /dev/null @@ -1,113 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1 - # Local Inventory for the merchant. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The name for the `LfpInventory` resource. - # Format: - # `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}` - # @!attribute [rw] target_account - # @return [::Integer] - # Required. The Merchant Center ID of the merchant to submit the inventory - # for. - # @!attribute [rw] store_code - # @return [::String] - # Required. The identifier of the merchant's store. Either the store code - # inserted through `InsertLfpStore` or the store code in the Business - # Profile. - # @!attribute [rw] offer_id - # @return [::String] - # Required. Immutable. A unique identifier for the product. If both - # inventories and sales are submitted for a merchant, this id should match - # for the same product. - # - # **Note**: if the merchant sells the same product new and used, they should - # have different IDs. - # @!attribute [rw] region_code - # @return [::String] - # Required. The [CLDR territory - # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) - # for the country where the product is sold. - # @!attribute [rw] content_language - # @return [::String] - # Required. The two-letter ISO 639-1 language code for the item. - # @!attribute [rw] gtin - # @return [::String] - # Optional. The Global Trade Item Number of the product. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Optional. The current price of the product. - # @!attribute [rw] availability - # @return [::String] - # Required. Availability of the product at this store. - # For accepted attribute values, see the [local product inventory data - # specification](https://support.google.com/merchants/answer/3061342) - # @!attribute [rw] quantity - # @return [::Integer] - # Optional. Quantity of the product available at this store. Must be greater - # than or equal to zero. - # @!attribute [rw] collection_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The time when the inventory is collected. If not set, it will be - # set to the time when the inventory is submitted. - # @!attribute [rw] pickup_method - # @return [::String] - # Optional. Supported pickup method for this offer. Unless the value is "not - # supported", this field must be submitted together with `pickupSla`. For - # accepted attribute values, see the [local product inventory data - # specification](https://support.google.com/merchants/answer/3061342). - # @!attribute [rw] pickup_sla - # @return [::String] - # Optional. Expected date that an order will be ready for pickup relative to - # the order date. Must be submitted together with `pickupMethod`. For - # accepted attribute values, see the [local product inventory data - # specification](https://support.google.com/merchants/answer/3061342). - # @!attribute [rw] feed_label - # @return [::String] - # Optional. The [feed - # label](https://developers.google.com/shopping-content/guides/products/feed-labels) - # for the product. If this is not set, it will default to `regionCode`. - class LfpInventory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertLfpInventory` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The LFP provider account. - # Format: `accounts/{account}` - # @!attribute [rw] lfp_inventory - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] - # Required. The inventory to insert. - class InsertLfpInventoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb deleted file mode 100644 index 6c0f10a465ea..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb +++ /dev/null @@ -1,181 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1 - # The LFP state of a merchant. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the `LfpMerchantState` resource. Format: - # `accounts/{account}/lfpMerchantStates/{target_merchant}`. For example, - # `accounts/123456/lfpMerchantStates/567890`. - # @!attribute [rw] linked_gbps - # @return [::Integer] - # Number of [GBPs](https://www.google.com/business/) this merchant has access - # to. - # @!attribute [r] store_states - # @return [::Array<::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::LfpStoreState>] - # Output only. The state per store from the specified merchant. The field - # will be absent if the merchant has no stores submitted through LFP. - # @!attribute [rw] inventory_stats - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::InventoryStats] - # The inventory statistics for the merchant. The field will be absent if the - # merchant has no inventory submitted through LFP. - # @!attribute [rw] country_settings - # @return [::Array<::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::CountrySettings>] - # Country-specific settings for the merchant. - class LfpMerchantState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of a specific merchant's store. - # @!attribute [rw] store_code - # @return [::String] - # Required. Immutable. The identifier of this store. - # @!attribute [r] matching_state - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::LfpStoreState::StoreMatchingState] - # Output only. The store matching state. - # @!attribute [rw] matching_state_hint - # @return [::String] - # The hint of why the matching has failed (only set if matching_state is - # FAILED). - class LfpStoreState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of matching `LfpStore` to a Google Business Profile listing. - module StoreMatchingState - # Store matching state unspecified. - STORE_MATCHING_STATE_UNSPECIFIED = 0 - - # The `LfpStore` is successfully matched with a Google Business Profile - # store. - STORE_MATCHING_STATE_MATCHED = 1 - - # The `LfpStore` is not matched with a Google Business Profile store. - STORE_MATCHING_STATE_FAILED = 2 - end - end - - # The inventory statistics for a merchant. - # @!attribute [rw] submitted_entries - # @return [::Integer] - # Number of entries (understanding entry as a pair of product and store) - # that were built based on provided inventories/sales and submitted to - # Google. - # @!attribute [rw] submitted_in_stock_entries - # @return [::Integer] - # Number of submitted in stock entries. - # @!attribute [rw] unsubmitted_entries - # @return [::Integer] - # Number of entries that were built based on provided - # inventories/sales and couldn't be submitted to Google due to errors like - # missing product. - # @!attribute [rw] submitted_products - # @return [::Integer] - # Number of products from provided inventories/sales that were created from - # matches to existing online products provided by the merchant or to the - # Google catalog. - class InventoryStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Country-specific settings for the merchant. - # @!attribute [rw] region_code - # @return [::String] - # Required. The [CLDR territory - # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) - # for the country for which these settings are defined. - # @!attribute [rw] free_local_listings_enabled - # @return [::Boolean] - # True if this merchant has enabled free local listings in MC. - # @!attribute [rw] local_inventory_ads_enabled - # @return [::Boolean] - # True if this merchant has enabled local inventory ads in MC. - # @!attribute [r] inventory_verification_state - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::CountrySettings::VerificationState] - # Output only. The verification state of this merchant's inventory check. - # @!attribute [r] product_page_type - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::CountrySettings::ProductPageType] - # Output only. The product page type selected by this merchant. - # @!attribute [r] instock_serving_verification_state - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::CountrySettings::VerificationState] - # Output only. The verification state of this merchant's instock serving - # feature. - # @!attribute [r] pickup_serving_verification_state - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::CountrySettings::VerificationState] - # Output only. The verification state of this merchant's pickup serving - # feature. - class CountrySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible verification states for different merchant programs. - module VerificationState - # Verification state unspecified. - VERIFICATION_STATE_UNSPECIFIED = 0 - - # Verification state not approved. - VERIFICATION_STATE_NOT_APPROVED = 1 - - # Verification state in progress. - VERIFICATION_STATE_IN_PROGRESS = 2 - - # Verification state approved. - VERIFICATION_STATE_APPROVED = 3 - end - - # The possible [product page - # types](https://support.google.com/merchants/topic/15148370) for a - # merchant. - module ProductPageType - # Product page type unspecified. - PRODUCT_PAGE_TYPE_UNSPECIFIED = 0 - - # Google hosted product page. - GOOGLE_HOSTED = 1 - - # Merchant hosted product page. - MERCHANT_HOSTED = 2 - - # Merchant hosted store specific product page. - MERCHANT_HOSTED_STORE_SPECIFIC = 3 - end - end - end - - # Request message for the GetLfpMerchantState method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the state to retrieve. - # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}`. For - # example, `accounts/123456/lfpMerchantStates/567890`. - class GetLfpMerchantStateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb deleted file mode 100644 index 464159590eeb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb +++ /dev/null @@ -1,96 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1 - # A sale for the merchant. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The name of the `LfpSale` resource. - # Format: - # `accounts/{account}/lfpSales/{sale}` - # @!attribute [rw] target_account - # @return [::Integer] - # Required. The Merchant Center ID of the merchant to submit the sale for. - # @!attribute [rw] store_code - # @return [::String] - # Required. The identifier of the merchant's store. Either a `storeCode` - # inserted through the API or the code of the store in the Business Profile. - # @!attribute [rw] offer_id - # @return [::String] - # Required. A unique identifier for the product. If both inventories and - # sales are submitted for a merchant, this id should match for the same - # product. - # - # **Note**: if the merchant sells the same product new and used, they should - # have different IDs. - # @!attribute [rw] region_code - # @return [::String] - # Required. The [CLDR territory - # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) - # for the country where the product is sold. - # @!attribute [rw] content_language - # @return [::String] - # Required. The two-letter ISO 639-1 language code for the item. - # @!attribute [rw] gtin - # @return [::String] - # Required. The Global Trade Item Number of the sold product. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Required. The unit price of the product. - # @!attribute [rw] quantity - # @return [::Integer] - # Required. The relative change of the available quantity. Negative for items - # returned. - # @!attribute [rw] sale_time - # @return [::Google::Protobuf::Timestamp] - # Required. The timestamp for the sale. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the `LfpSale`. - # @!attribute [rw] feed_label - # @return [::String] - # Optional. The [feed - # label](https://developers.google.com/shopping-content/guides/products/feed-labels) - # for the product. If this is not set, it will default to `regionCode`. - class LfpSale - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the InsertLfpSale method. - # @!attribute [rw] parent - # @return [::String] - # Required. The LFP provider account. - # Format: `accounts/{lfp_partner}` - # @!attribute [rw] lfp_sale - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpSale] - # Required. The sale to insert. - class InsertLfpSaleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb deleted file mode 100644 index 36f58df7e7ea..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb +++ /dev/null @@ -1,185 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1 - # A store for the merchant. This will be used to match to a store under the - # Google Business Profile of the target merchant. If a matching store can't be - # found, the inventories or sales submitted with the store code will not be - # used. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The name of the `LfpStore` resource. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # @!attribute [rw] target_account - # @return [::Integer] - # Required. The Merchant Center id of the merchant to submit the store for. - # @!attribute [rw] store_code - # @return [::String] - # Required. Immutable. A store identifier that is unique for the target - # merchant. - # @!attribute [rw] store_address - # @return [::String] - # Required. The street address of the store. - # Example: 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA. - # @!attribute [rw] store_name - # @return [::String] - # Optional. The merchant or store name. - # @!attribute [rw] phone_number - # @return [::String] - # Optional. The store phone number in - # [E.164](https://en.wikipedia.org/wiki/E.164) format. Example: - # `+15556767888` - # @!attribute [rw] website_uri - # @return [::String] - # Optional. The website URL for the store or merchant. - # @!attribute [rw] gcid_category - # @return [::Array<::String>] - # Optional. [Google My Business category - # id](https://gcid-explorer.corp.google.com/static/gcid.html). - # @!attribute [rw] place_id - # @return [::String] - # Optional. The [Google Place - # Id](https://developers.google.com/maps/documentation/places/web-service/place-id#id-overview) - # of the store location. - # @!attribute [r] matching_state - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore::StoreMatchingState] - # Optional. Output only. The state of matching to a Google Business Profile. - # See - # {::Google::Shopping::Merchant::Lfp::V1::LfpStore#matching_state_hint matchingStateHint} - # for further details if no match is found. - # @!attribute [r] matching_state_hint - # @return [::String] - # Optional. Output only. The hint of why the matching has failed. This is - # only set when - # {::Google::Shopping::Merchant::Lfp::V1::LfpStore#matching_state matchingState}=`STORE_MATCHING_STATE_FAILED`. - # - # Possible values are: - # - # - "`linked-store-not-found`": There aren't any Google Business - # Profile stores available for matching. - # - "`store-match-not-found`": The provided `LfpStore` couldn't be matched to - # any of the connected Google Business Profile stores. Merchant Center - # account is connected correctly and stores are available on Google Business - # Profile, but the `LfpStore` location address does not match with Google - # Business Profile stores' addresses. Update the `LfpStore` address or Google - # Business Profile store address to match correctly. - # - "`store-match-unverified`": The provided `LfpStore` couldn't be matched - # to any of the connected Google Business Profile stores, as the matched - # Google Business Profile store is unverified. Go through the Google Business - # Profile verification process to match correctly. - class LfpStore - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of matching `LfpStore` to a Google Business Profile. - module StoreMatchingState - # Store matching state unspecified. - STORE_MATCHING_STATE_UNSPECIFIED = 0 - - # The `LfpStore` is successfully matched with a Google Business Profile - # store. - STORE_MATCHING_STATE_MATCHED = 1 - - # The `LfpStore` is not matched with a Google Business Profile store. - STORE_MATCHING_STATE_FAILED = 2 - end - end - - # Request message for the `GetLfpStore` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the store to retrieve. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - class GetLfpStoreRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the InsertLfpStore method. - # @!attribute [rw] parent - # @return [::String] - # Required. The LFP provider account - # Format: `accounts/{account}` - # @!attribute [rw] lfp_store - # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] - # Required. The store to insert. - class InsertLfpStoreRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteLfpStore method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the store to delete for the target merchant account. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - class DeleteLfpStoreRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListLfpStores method. - # @!attribute [rw] parent - # @return [::String] - # Required. The LFP partner. - # Format: `accounts/{account}` - # @!attribute [rw] target_account - # @return [::Integer] - # Required. The Merchant Center id of the merchant to list stores for. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `LfpStore` resources for the given account - # to return. The service returns fewer than this value if the number of - # stores for the given account is less than the `pageSize`. The default value - # is 250. The maximum value is 1000; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListLfpStoresRequest` - # call. Provide the page token to retrieve the subsequent page. When - # paginating, all other parameters provided to `ListLfpStoresRequest` must - # match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse#next_page_token nextPageToken} - # in the response to the previous request. - class ListLfpStoresRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListLfpStores method. - # @!attribute [rw] lfp_stores - # @return [::Array<::Google::Shopping::Merchant::Lfp::V1::LfpStore>] - # The stores from the specified merchant. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `pageToken` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListLfpStoresResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/type/types.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! - - -module Google - module Shopping - module Type - # The weight represented as the value in string and the unit. - # @!attribute [rw] amount_micros - # @return [::Integer] - # Required. The weight represented as a number in micros (1 million micros is - # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 - # micros). - # This field can also be set as infinity by setting to -1. - # This field only support -1 and positive value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Type::Weight::WeightUnit] - # Required. The weight unit. - # Acceptable values are: kg and lb - class Weight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The weight unit. - module WeightUnit - # unit unspecified - WEIGHT_UNIT_UNSPECIFIED = 0 - - # lb unit. - POUND = 1 - - # kg unit. - KILOGRAM = 2 - end - end - - # The price represented as a number and currency. - # @!attribute [rw] amount_micros - # @return [::Integer] - # The price represented as a number in micros (1 million micros is an - # equivalent to one's currency standard unit, for example, 1 USD = 1000000 - # micros). - # @!attribute [rw] currency_code - # @return [::String] - # The currency of the price using three-letter acronyms according to [ISO - # 4217](http://en.wikipedia.org/wiki/ISO_4217). - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents custom attributes. Exactly one of `value` or - # `group_values` must not be empty. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute. - # @!attribute [rw] value - # @return [::String] - # The value of the attribute. If `value` is not empty, `group_values` must be - # empty. - # @!attribute [rw] group_values - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Subattributes within this attribute group. If - # `group_values` is not empty, `value` must be empty. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations available for a product. - # - # Destinations are used in Merchant Center to allow you to control where the - # products from your data feed should be displayed. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Destination values. - module DestinationEnum - # Not specified. - DESTINATION_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/google-ads/answer/2454022). - SHOPPING_ADS = 1 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 2 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3057972). - LOCAL_INVENTORY_ADS = 3 - - # [Free listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 4 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 5 - - # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). - YOUTUBE_SHOPPING = 6 - - # Youtube shopping checkout. - YOUTUBE_SHOPPING_CHECKOUT = 7 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 8 - - # [Free vehicle - # listings](https://support.google.com/merchants/answer/11189169). - FREE_VEHICLE_LISTINGS = 9 - - # [Vehicle ads](https://support.google.com/merchants/answer/11189169). - VEHICLE_ADS = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - end - end - - # Reporting contexts that your account and product issues apply to. - # - # Reporting contexts are groups of surfaces and formats for product results on - # Google. They can represent the entire destination (for example, [Shopping - # ads](https://support.google.com/merchants/answer/6149970)) or a subset of - # formats within a destination (for example, [Demand Gen - # ads](https://support.google.com/merchants/answer/13389785)). - class ReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reporting context values. - module ReportingContextEnum - # Not specified. - REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/merchants/answer/6149970). - SHOPPING_ADS = 1 - - # Deprecated: Use `DEMAND_GEN_ADS` instead. - # [Discovery and Demand Gen - # ads](https://support.google.com/merchants/answer/13389785). - DISCOVERY_ADS = 2 - - # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS = 13 - - # [Demand Gen ads on Discover - # surface](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 - - # [Video ads](https://support.google.com/google-ads/answer/6340491). - VIDEO_ADS = 3 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 4 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3271956). - LOCAL_INVENTORY_ADS = 5 - - # [Vehicle inventory - # ads](https://support.google.com/merchants/answer/11544533). - VEHICLE_INVENTORY_ADS = 6 - - # [Free product - # listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 7 - - # [Free product listings on UCP - # checkout](https://developers.google.com/merchant/ucp). - FREE_LISTINGS_UCP_CHECKOUT = 19 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 8 - - # [Free local vehicle - # listings](https://support.google.com/merchants/answer/11544533). - FREE_LOCAL_VEHICLE_LISTINGS = 9 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 18 - - # [YouTube - # Shopping](https://support.google.com/merchants/answer/13478370). - YOUTUBE_SHOPPING = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - - # [Product - # Reviews](https://support.google.com/merchants/answer/14620732). - PRODUCT_REVIEWS = 15 - - # [Merchant - # Reviews](https://developers.google.com/merchant-review-feeds). - MERCHANT_REVIEWS = 16 - - # YouTube Checkout - # . - YOUTUBE_CHECKOUT = 17 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/Gemfile deleted file mode 100644 index 1c952600471e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1", path: "../" -else - gem "google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1/snippets/lfp_inventory_service/insert_lfp_inventory.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_inventory_service/insert_lfp_inventory.rb deleted file mode 100644 index c320eb8f15fb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_inventory_service/insert_lfp_inventory.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_LfpInventoryService_InsertLfpInventory_sync] -require "google/shopping/merchant/lfp/v1" - -## -# Snippet for the insert_lfp_inventory call in the LfpInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client#insert_lfp_inventory. -# -def insert_lfp_inventory - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new - - # Call the insert_lfp_inventory method. - result = client.insert_lfp_inventory request - - # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpInventory. - p result -end -# [END merchantapi_v1_generated_LfpInventoryService_InsertLfpInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb deleted file mode 100644 index a01a95ef97f2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_LfpMerchantStateService_GetLfpMerchantState_sync] -require "google/shopping/merchant/lfp/v1" - -## -# Snippet for the get_lfp_merchant_state call in the LfpMerchantStateService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client#get_lfp_merchant_state. -# -def get_lfp_merchant_state - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new - - # Call the get_lfp_merchant_state method. - result = client.get_lfp_merchant_state request - - # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpMerchantState. - p result -end -# [END merchantapi_v1_generated_LfpMerchantStateService_GetLfpMerchantState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_sale_service/insert_lfp_sale.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_sale_service/insert_lfp_sale.rb deleted file mode 100644 index 4735d2bea123..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_sale_service/insert_lfp_sale.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_LfpSaleService_InsertLfpSale_sync] -require "google/shopping/merchant/lfp/v1" - -## -# Snippet for the insert_lfp_sale call in the LfpSaleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client#insert_lfp_sale. -# -def insert_lfp_sale - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new - - # Call the insert_lfp_sale method. - result = client.insert_lfp_sale request - - # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpSale. - p result -end -# [END merchantapi_v1_generated_LfpSaleService_InsertLfpSale_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/delete_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/delete_lfp_store.rb deleted file mode 100644 index c8d8b6c98a3f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/delete_lfp_store.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_LfpStoreService_DeleteLfpStore_sync] -require "google/shopping/merchant/lfp/v1" - -## -# Snippet for the delete_lfp_store call in the LfpStoreService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#delete_lfp_store. -# -def delete_lfp_store - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new - - # Call the delete_lfp_store method. - result = client.delete_lfp_store request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_LfpStoreService_DeleteLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/get_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/get_lfp_store.rb deleted file mode 100644 index 3e9192af1e2c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/get_lfp_store.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_LfpStoreService_GetLfpStore_sync] -require "google/shopping/merchant/lfp/v1" - -## -# Snippet for the get_lfp_store call in the LfpStoreService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#get_lfp_store. -# -def get_lfp_store - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new - - # Call the get_lfp_store method. - result = client.get_lfp_store request - - # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. - p result -end -# [END merchantapi_v1_generated_LfpStoreService_GetLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/insert_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/insert_lfp_store.rb deleted file mode 100644 index 642f4eec0c49..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/insert_lfp_store.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_LfpStoreService_InsertLfpStore_sync] -require "google/shopping/merchant/lfp/v1" - -## -# Snippet for the insert_lfp_store call in the LfpStoreService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#insert_lfp_store. -# -def insert_lfp_store - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new - - # Call the insert_lfp_store method. - result = client.insert_lfp_store request - - # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. - p result -end -# [END merchantapi_v1_generated_LfpStoreService_InsertLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/list_lfp_stores.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/list_lfp_stores.rb deleted file mode 100644 index 66b394a39c17..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/list_lfp_stores.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 merchantapi_v1_generated_LfpStoreService_ListLfpStores_sync] -require "google/shopping/merchant/lfp/v1" - -## -# Snippet for the list_lfp_stores call in the LfpStoreService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#list_lfp_stores. -# -def list_lfp_stores - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new - - # Call the list_lfp_stores method. - result = client.list_lfp_stores request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Lfp::V1::LfpStore. - p item - end -end -# [END merchantapi_v1_generated_LfpStoreService_ListLfpStores_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json b/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json deleted file mode 100644 index 1a6356cc1b53..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json +++ /dev/null @@ -1,295 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-lfp-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.lfp.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1_generated_LfpInventoryService_InsertLfpInventory_sync", - "title": "Snippet for the insert_lfp_inventory call in the LfpInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client#insert_lfp_inventory.", - "file": "lfp_inventory_service/insert_lfp_inventory.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_lfp_inventory", - "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client#insert_lfp_inventory", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1::LfpInventory", - "client": { - "short_name": "LfpInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client" - }, - "method": { - "short_name": "InsertLfpInventory", - "full_name": "google.shopping.merchant.lfp.v1.LfpInventoryService.InsertLfpInventory", - "service": { - "short_name": "LfpInventoryService", - "full_name": "google.shopping.merchant.lfp.v1.LfpInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_LfpMerchantStateService_GetLfpMerchantState_sync", - "title": "Snippet for the get_lfp_merchant_state call in the LfpMerchantStateService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client#get_lfp_merchant_state.", - "file": "lfp_merchant_state_service/get_lfp_merchant_state.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_lfp_merchant_state", - "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client#get_lfp_merchant_state", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState", - "client": { - "short_name": "LfpMerchantStateService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client" - }, - "method": { - "short_name": "GetLfpMerchantState", - "full_name": "google.shopping.merchant.lfp.v1.LfpMerchantStateService.GetLfpMerchantState", - "service": { - "short_name": "LfpMerchantStateService", - "full_name": "google.shopping.merchant.lfp.v1.LfpMerchantStateService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_LfpSaleService_InsertLfpSale_sync", - "title": "Snippet for the insert_lfp_sale call in the LfpSaleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client#insert_lfp_sale.", - "file": "lfp_sale_service/insert_lfp_sale.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_lfp_sale", - "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client#insert_lfp_sale", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1::LfpSale", - "client": { - "short_name": "LfpSaleService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client" - }, - "method": { - "short_name": "InsertLfpSale", - "full_name": "google.shopping.merchant.lfp.v1.LfpSaleService.InsertLfpSale", - "service": { - "short_name": "LfpSaleService", - "full_name": "google.shopping.merchant.lfp.v1.LfpSaleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_LfpStoreService_GetLfpStore_sync", - "title": "Snippet for the get_lfp_store call in the LfpStoreService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#get_lfp_store.", - "file": "lfp_store_service/get_lfp_store.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_lfp_store", - "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#get_lfp_store", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1::LfpStore", - "client": { - "short_name": "LfpStoreService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client" - }, - "method": { - "short_name": "GetLfpStore", - "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService.GetLfpStore", - "service": { - "short_name": "LfpStoreService", - "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_LfpStoreService_InsertLfpStore_sync", - "title": "Snippet for the insert_lfp_store call in the LfpStoreService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#insert_lfp_store.", - "file": "lfp_store_service/insert_lfp_store.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_lfp_store", - "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#insert_lfp_store", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1::LfpStore", - "client": { - "short_name": "LfpStoreService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client" - }, - "method": { - "short_name": "InsertLfpStore", - "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService.InsertLfpStore", - "service": { - "short_name": "LfpStoreService", - "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_LfpStoreService_DeleteLfpStore_sync", - "title": "Snippet for the delete_lfp_store call in the LfpStoreService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#delete_lfp_store.", - "file": "lfp_store_service/delete_lfp_store.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_lfp_store", - "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#delete_lfp_store", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "LfpStoreService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client" - }, - "method": { - "short_name": "DeleteLfpStore", - "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService.DeleteLfpStore", - "service": { - "short_name": "LfpStoreService", - "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_LfpStoreService_ListLfpStores_sync", - "title": "Snippet for the list_lfp_stores call in the LfpStoreService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#list_lfp_stores.", - "file": "lfp_store_service/list_lfp_stores.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_lfp_stores", - "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#list_lfp_stores", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse", - "client": { - "short_name": "LfpStoreService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client" - }, - "method": { - "short_name": "ListLfpStores", - "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService.ListLfpStores", - "service": { - "short_name": "LfpStoreService", - "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService" - } - } - }, - "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-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_paths_test.rb deleted file mode 100644 index 0dad0d8a3cb9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_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/shopping/merchant/lfp/v1/lfp_inventory_service" - -class ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_lfp_inventory_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lfp_inventory_path account: "value0", target_merchant: "value1", store_code: "value2", offer: "value3" - assert_equal "accounts/value0/lfpInventories/value1~value2~value3", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_rest_test.rb deleted file mode 100644 index a815c8b5b701..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_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/shopping/merchant/lfp/v1/lfpinventory_pb" -require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest" - - -class ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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_insert_lfp_inventory - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1::LfpInventory.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_inventory = {} - - insert_lfp_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::ServiceStub.stub :transcode_insert_lfp_inventory_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_lfp_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_lfp_inventory ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_lfp_inventory(::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_lfp_inventory_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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb deleted file mode 100644 index ae71ba75dab9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_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/shopping/merchant/lfp/v1/lfpinventory_pb" -require "google/shopping/merchant/lfp/v1/lfp_inventory_service" - -class ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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_insert_lfp_inventory - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1::LfpInventory.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_inventory = {} - - insert_lfp_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_lfp_inventory, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1::LfpInventory), request["lfp_inventory"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_lfp_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_lfp_inventory ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_lfp_inventory(::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_lfp_inventory_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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_paths_test.rb deleted file mode 100644 index b1c5286c6508..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_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/shopping/merchant/lfp/v1/lfp_merchant_state_service" - -class ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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_lfp_merchant_state_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lfp_merchant_state_path account: "value0", lfp_merchant_state: "value1" - assert_equal "accounts/value0/lfpMerchantStates/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb deleted file mode 100644 index 290ca98bbaf5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb +++ /dev/null @@ -1,153 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/lfp/v1/lfpmerchantstate_pb" -require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest" - - -class ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_lfp_merchant_state - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lfp_merchant_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::ServiceStub.stub :transcode_get_lfp_merchant_state_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_lfp_merchant_state_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_lfp_merchant_state({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_lfp_merchant_state name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_lfp_merchant_state ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_lfp_merchant_state({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_lfp_merchant_state(::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_lfp_merchant_state_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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb deleted file mode 100644 index 86c962c74def..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb +++ /dev/null @@ -1,162 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/lfp/v1/lfpmerchantstate_pb" -require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service" - -class ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_lfp_merchant_state - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lfp_merchant_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_lfp_merchant_state, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_lfp_merchant_state_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_lfp_merchant_state({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_lfp_merchant_state name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_lfp_merchant_state ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_lfp_merchant_state({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_lfp_merchant_state(::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_lfp_merchant_state_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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_paths_test.rb deleted file mode 100644 index d336b9777d85..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_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/shopping/merchant/lfp/v1/lfp_sale_service" - -class ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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_lfp_sale_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lfp_sale_path account: "value0", sale: "value1" - assert_equal "accounts/value0/lfpSales/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_rest_test.rb deleted file mode 100644 index 298c49ad7341..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_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/shopping/merchant/lfp/v1/lfpsale_pb" -require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest" - - -class ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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_insert_lfp_sale - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1::LfpSale.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_sale = {} - - insert_lfp_sale_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::ServiceStub.stub :transcode_insert_lfp_sale_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_lfp_sale_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_lfp_sale ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_lfp_sale(::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_lfp_sale_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::Shopping::Merchant::Lfp::V1::LfpSaleService::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::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb deleted file mode 100644 index f16bddd1ae58..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_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/shopping/merchant/lfp/v1/lfpsale_pb" -require "google/shopping/merchant/lfp/v1/lfp_sale_service" - -class ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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_insert_lfp_sale - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1::LfpSale.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_sale = {} - - insert_lfp_sale_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_lfp_sale, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1::LfpSale), request["lfp_sale"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_lfp_sale_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_lfp_sale ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_lfp_sale(::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_lfp_sale_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::Shopping::Merchant::Lfp::V1::LfpSaleService::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::Shopping::Merchant::Lfp::V1::LfpSaleService::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::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_paths_test.rb deleted file mode 100644 index c64ac3f0fb5e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_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/shopping/merchant/lfp/v1/lfp_store_service" - -class ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_lfp_store_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lfp_store_path account: "value0", target_merchant: "value1", store_code: "value2" - assert_equal "accounts/value0/lfpStores/value1~value2", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb deleted file mode 100644 index ab9ff5e835e0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb +++ /dev/null @@ -1,319 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/lfp/v1/lfpstore_pb" -require "google/shopping/merchant/lfp/v1/lfp_store_service/rest" - - -class ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_lfp_store - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ServiceStub.stub :transcode_get_lfp_store_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_lfp_store({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_lfp_store name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_lfp_store ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_lfp_store({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_lfp_store(::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_lfp_store_client_stub.call_count - end - end - end - - def test_insert_lfp_store - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_store = {} - - insert_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ServiceStub.stub :transcode_insert_lfp_store_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_lfp_store parent: parent, lfp_store: lfp_store do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_lfp_store ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_lfp_store(::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_lfp_store_client_stub.call_count - end - end - end - - def test_delete_lfp_store - # 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_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ServiceStub.stub :transcode_delete_lfp_store_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_lfp_store({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_lfp_store name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_lfp_store ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_lfp_store({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_lfp_store(::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_lfp_store_client_stub.call_count - end - end - end - - def test_list_lfp_stores - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - target_account = 42 - page_size = 42 - page_token = "hello world" - - list_lfp_stores_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ServiceStub.stub :transcode_list_lfp_stores_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_lfp_stores_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_lfp_stores parent: parent, target_account: target_account, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_lfp_stores ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new(parent: parent, target_account: target_account, 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_lfp_stores({ parent: parent, target_account: target_account, 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_lfp_stores(::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new(parent: parent, target_account: target_account, 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_lfp_stores_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::Shopping::Merchant::Lfp::V1::LfpStoreService::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::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb deleted file mode 100644 index a0867c5e40b5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb +++ /dev/null @@ -1,349 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/lfp/v1/lfpstore_pb" -require "google/shopping/merchant/lfp/v1/lfp_store_service" - -class ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_lfp_store - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_lfp_store, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_lfp_store({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_lfp_store name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_lfp_store ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_lfp_store({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_lfp_store(::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_lfp_store_client_stub.call_rpc_count - end - end - - def test_insert_lfp_store - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_store = {} - - insert_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_lfp_store, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1::LfpStore), request["lfp_store"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_lfp_store parent: parent, lfp_store: lfp_store do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_lfp_store ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_lfp_store(::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_lfp_store_client_stub.call_rpc_count - end - end - - def test_delete_lfp_store - # 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_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_lfp_store, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_lfp_store({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_lfp_store name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_lfp_store ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_lfp_store({ 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_lfp_store(::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new(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_lfp_store_client_stub.call_rpc_count - end - end - - def test_list_lfp_stores - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - target_account = 42 - page_size = 42 - page_token = "hello world" - - list_lfp_stores_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_lfp_stores, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["target_account"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_lfp_stores_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: 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_lfp_stores parent: parent, target_account: target_account, page_size: page_size, page_token: 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_lfp_stores ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new(parent: parent, target_account: target_account, page_size: page_size, page_token: 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_lfp_stores({ parent: parent, target_account: target_account, 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_lfp_stores(::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new(parent: parent, target_account: target_account, 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_lfp_stores_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::Shopping::Merchant::Lfp::V1::LfpStoreService::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::Shopping::Merchant::Lfp::V1::LfpStoreService::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::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-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-shopping-merchant-lfp-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.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-shopping-merchant-lfp-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.repo-metadata.json deleted file mode 100644 index d0ee091e7f0e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta", - "distribution_name": "google-shopping-merchant-lfp-v1beta", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1BETA API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-lfp-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-lfp instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.rubocop.yml deleted file mode 100644 index 5bfed50cae80..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-lfp-v1beta.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-shopping-merchant-lfp-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.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-shopping-merchant-lfp-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant V1BETA 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-shopping-merchant-lfp-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/AUTHENTICATION.md deleted file mode 100644 index f2270ceb15f9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-lfp-v1beta 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-shopping-merchant-lfp-v1beta 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/shopping/merchant/lfp/v1beta" - -client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/lfp/v1beta" - -::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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-shopping-merchant-lfp-v1beta -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/shopping/merchant/lfp/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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-shopping-merchant-lfp-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/README.md deleted file mode 100644 index 2778e5e39e75..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Merchant V1BETA API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1BETA API. Most users should consider using -the main client gem, -[google-shopping-merchant-lfp](https://rubygems.org/gems/google-shopping-merchant-lfp). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-lfp-v1beta -``` - -## 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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/lfp/v1beta" - -client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new -request = ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new # (request fields as keyword arguments...) -response = client.insert_lfp_inventory request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/lfp/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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-shopping-merchant-lfp`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-lfp-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-shopping-merchant-lfp`. -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-shopping-merchant-lfp-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Rakefile deleted file mode 100644 index 39e4090536e4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta 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/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials" - ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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-shopping-merchant-lfp-v1beta 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-shopping-merchant-lfp-v1beta 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-shopping-merchant-lfp-v1beta 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-shopping-merchant-lfp-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-lfp-v1beta" - header "google-shopping-merchant-lfp-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-lfp-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-lfp-v1beta 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-shopping-merchant-lfp-v1beta 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-shopping-merchant-lfp-v1beta 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-shopping-merchant-lfp-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/gapic_metadata.json deleted file mode 100644 index 98df023363e0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/gapic_metadata.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.lfp.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Lfp::V1beta", - "services": { - "LfpInventoryService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client", - "rpcs": { - "InsertLfpInventory": { - "methods": [ - "insert_lfp_inventory" - ] - } - } - } - } - }, - "LfpMerchantStateService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client", - "rpcs": { - "GetLfpMerchantState": { - "methods": [ - "get_lfp_merchant_state" - ] - } - } - } - } - }, - "LfpSaleService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client", - "rpcs": { - "InsertLfpSale": { - "methods": [ - "insert_lfp_sale" - ] - } - } - } - } - }, - "LfpStoreService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client", - "rpcs": { - "GetLfpStore": { - "methods": [ - "get_lfp_store" - ] - }, - "InsertLfpStore": { - "methods": [ - "insert_lfp_store" - ] - }, - "DeleteLfpStore": { - "methods": [ - "delete_lfp_store" - ] - }, - "ListLfpStores": { - "methods": [ - "list_lfp_stores" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec deleted file mode 100644 index a994fec1818b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/lfp/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-lfp-v1beta" - gem.version = Google::Shopping::Merchant::Lfp::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-lfp-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-lfp instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center Accounts." - 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-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb deleted file mode 100644 index a4339e958f48..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.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/shopping/merchant/lfp/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb deleted file mode 100644 index ba569d5a3db9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service" -require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service" -require "google/shopping/merchant/lfp/v1beta/version" - -module Google - module Shopping - module Merchant - module Lfp - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/lfp/v1beta" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/lfp/v1beta" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/lfp/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb deleted file mode 100644 index 3f182bf2a7c8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1beta/version" - -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # inventories for a merchant. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new - # - module LfpInventoryService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "lfp_inventory_service", "helpers.rb" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb deleted file mode 100644 index 6af5a19806ff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb +++ /dev/null @@ -1,488 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/lfp/v1beta/lfpinventory_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpInventoryService - ## - # Client for the LfpInventoryService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # inventories for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_inventory_service_stub - - ## - # Configure the LfpInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpInventoryService clients - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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", "Shopping", "Merchant", "Lfp", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpInventoryService 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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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 - @lfp_inventory_service_stub.universe_domain - end - - ## - # Create a new LfpInventoryService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpInventoryService 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/shopping/merchant/lfp/v1beta/lfpinventory_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 - - @lfp_inventory_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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 - ) - - @lfp_inventory_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 - @lfp_inventory_service_stub.logger - end - - # Service calls - - ## - # Inserts a `LfpInventory` resource for the given target merchant account. If - # the resource already exists, it will be replaced. The inventory - # automatically expires after 30 days. - # - # @overload insert_lfp_inventory(request, options = nil) - # Pass arguments to `insert_lfp_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_lfp_inventory(parent: nil, lfp_inventory: nil) - # Pass arguments to `insert_lfp_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account. - # Format: `accounts/{account}` - # @param lfp_inventory [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory, ::Hash] - # Required. The inventory to insert. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new - # - # # Call the insert_lfp_inventory method. - # result = client.insert_lfp_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpInventory. - # p result - # - def insert_lfp_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_lfp_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_lfp_inventory.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_lfp_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_inventory_service_stub.call_rpc :insert_lfp_inventory, request, 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 LfpInventoryService API. - # - # This class represents the configuration for LfpInventoryService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # insert_lfp_inventory to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_inventory.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_inventory.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `insert_lfp_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_inventory - - # @private - def initialize parent_rpcs = nil - insert_lfp_inventory_config = parent_rpcs.insert_lfp_inventory if parent_rpcs.respond_to? :insert_lfp_inventory - @insert_lfp_inventory = ::Gapic::Config::Method.new insert_lfp_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb deleted file mode 100644 index 34357f0b45db..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_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 Shopping - module Merchant - module Lfp - module V1beta - module LfpInventoryService - # Credentials for the LfpInventoryService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb deleted file mode 100644 index 993a6aade7c4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpInventoryService - # Path helper methods for the LfpInventoryService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified LfpInventory resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}` - # - # @param account [String] - # @param target_merchant [String] - # @param store_code [String] - # @param offer [String] - # - # @return [::String] - def lfp_inventory_path account:, target_merchant:, store_code:, offer: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "target_merchant cannot contain /" if target_merchant.to_s.include? "/" - raise ::ArgumentError, "store_code cannot contain /" if store_code.to_s.include? "/" - - "accounts/#{account}/lfpInventories/#{target_merchant}~#{store_code}~#{offer}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb deleted file mode 100644 index 8aa6339d4641..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1beta/version" - -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # inventories for a merchant. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new - # - module LfpInventoryService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb deleted file mode 100644 index 531772fd6b43..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb +++ /dev/null @@ -1,438 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/lfp/v1beta/lfpinventory_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpInventoryService - module Rest - ## - # REST client for the LfpInventoryService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # inventories for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_inventory_service_stub - - ## - # Configure the LfpInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpInventoryService clients - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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", "Shopping", "Merchant", "Lfp", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpInventoryService 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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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 - @lfp_inventory_service_stub.universe_domain - end - - ## - # Create a new LfpInventoryService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpInventoryService 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 - - @lfp_inventory_service_stub = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @lfp_inventory_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 - @lfp_inventory_service_stub.logger - end - - # Service calls - - ## - # Inserts a `LfpInventory` resource for the given target merchant account. If - # the resource already exists, it will be replaced. The inventory - # automatically expires after 30 days. - # - # @overload insert_lfp_inventory(request, options = nil) - # Pass arguments to `insert_lfp_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_lfp_inventory(parent: nil, lfp_inventory: nil) - # Pass arguments to `insert_lfp_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account. - # Format: `accounts/{account}` - # @param lfp_inventory [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory, ::Hash] - # Required. The inventory to insert. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new - # - # # Call the insert_lfp_inventory method. - # result = client.insert_lfp_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpInventory. - # p result - # - def insert_lfp_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_lfp_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_lfp_inventory.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_lfp_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_inventory_service_stub.insert_lfp_inventory request, 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 LfpInventoryService REST API. - # - # This class represents the configuration for LfpInventoryService 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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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 - # # insert_lfp_inventory to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_inventory.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_inventory.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `insert_lfp_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_inventory - - # @private - def initialize parent_rpcs = nil - insert_lfp_inventory_config = parent_rpcs.insert_lfp_inventory if parent_rpcs.respond_to? :insert_lfp_inventory - @insert_lfp_inventory = ::Gapic::Config::Method.new insert_lfp_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb deleted file mode 100644 index 401e3ca45ed8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.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! - -require "google/shopping/merchant/lfp/v1beta/lfpinventory_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpInventoryService - module Rest - ## - # REST service stub for the LfpInventoryService 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 insert_lfp_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] - # A result object deserialized from the server's reply - def insert_lfp_inventory request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_inventory_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "insert_lfp_inventory", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory.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 insert_lfp_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_lfp_inventory_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/lfp/v1beta/{parent}/lfpInventories:insert", - body: "lfp_inventory", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service.rb deleted file mode 100644 index 2eec26b012b3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1beta/version" - -require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/credentials" -require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/paths" -require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/client" -require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to get the - # state of a merchant. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.new - # - module LfpMerchantStateService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "lfp_merchant_state_service", "helpers.rb" -require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/client.rb deleted file mode 100644 index 3b5ecbf8e192..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/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/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpMerchantStateService - ## - # Client for the LfpMerchantStateService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to get the - # state of a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_merchant_state_service_stub - - ## - # Configure the LfpMerchantStateService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpMerchantStateService clients - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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", "Shopping", "Merchant", "Lfp", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpMerchantStateService 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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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 - @lfp_merchant_state_service_stub.universe_domain - end - - ## - # Create a new LfpMerchantStateService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpMerchantStateService 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/shopping/merchant/lfp/v1beta/lfpmerchantstate_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 - - @lfp_merchant_state_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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 - ) - - @lfp_merchant_state_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 - @lfp_merchant_state_service_stub.logger - end - - # Service calls - - ## - # Gets the LFP state of a merchant - # - # @overload get_lfp_merchant_state(request, options = nil) - # Pass arguments to `get_lfp_merchant_state` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_lfp_merchant_state(name: nil) - # Pass arguments to `get_lfp_merchant_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the state to retrieve. - # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest.new - # - # # Call the get_lfp_merchant_state method. - # result = client.get_lfp_merchant_state request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState. - # p result - # - def get_lfp_merchant_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_lfp_merchant_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_lfp_merchant_state.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_lfp_merchant_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_merchant_state_service_stub.call_rpc :get_lfp_merchant_state, request, 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 LfpMerchantStateService API. - # - # This class represents the configuration for LfpMerchantStateService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_lfp_merchant_state to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_merchant_state.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_merchant_state.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpMerchantStateService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_lfp_merchant_state` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lfp_merchant_state - - # @private - def initialize parent_rpcs = nil - get_lfp_merchant_state_config = parent_rpcs.get_lfp_merchant_state if parent_rpcs.respond_to? :get_lfp_merchant_state - @get_lfp_merchant_state = ::Gapic::Config::Method.new get_lfp_merchant_state_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/credentials.rb deleted file mode 100644 index 38354370e578..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_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 Shopping - module Merchant - module Lfp - module V1beta - module LfpMerchantStateService - # Credentials for the LfpMerchantStateService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/paths.rb deleted file mode 100644 index fdd1147f0404..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/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 Shopping - module Merchant - module Lfp - module V1beta - module LfpMerchantStateService - # Path helper methods for the LfpMerchantStateService API. - module Paths - ## - # Create a fully-qualified LfpMerchantState resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/lfpMerchantStates/{lfp_merchant_state}` - # - # @param account [String] - # @param lfp_merchant_state [String] - # - # @return [::String] - def lfp_merchant_state_path account:, lfp_merchant_state: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/lfpMerchantStates/#{lfp_merchant_state}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest.rb deleted file mode 100644 index 6ed162962590..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1beta/version" - -require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/credentials" -require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/paths" -require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/client" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to get the - # state of a merchant. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.new - # - module LfpMerchantStateService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/client.rb deleted file mode 100644 index c663db5820f6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/client.rb +++ /dev/null @@ -1,434 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpMerchantStateService - module Rest - ## - # REST client for the LfpMerchantStateService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to get the - # state of a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_merchant_state_service_stub - - ## - # Configure the LfpMerchantStateService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpMerchantStateService clients - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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", "Shopping", "Merchant", "Lfp", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpMerchantStateService 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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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 - @lfp_merchant_state_service_stub.universe_domain - end - - ## - # Create a new LfpMerchantStateService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpMerchantStateService 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 - - @lfp_merchant_state_service_stub = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @lfp_merchant_state_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 - @lfp_merchant_state_service_stub.logger - end - - # Service calls - - ## - # Gets the LFP state of a merchant - # - # @overload get_lfp_merchant_state(request, options = nil) - # Pass arguments to `get_lfp_merchant_state` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_lfp_merchant_state(name: nil) - # Pass arguments to `get_lfp_merchant_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the state to retrieve. - # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest.new - # - # # Call the get_lfp_merchant_state method. - # result = client.get_lfp_merchant_state request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState. - # p result - # - def get_lfp_merchant_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_lfp_merchant_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_lfp_merchant_state.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_lfp_merchant_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_merchant_state_service_stub.get_lfp_merchant_state request, 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 LfpMerchantStateService REST API. - # - # This class represents the configuration for LfpMerchantStateService 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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_lfp_merchant_state to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_merchant_state.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_merchant_state.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpMerchantStateService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_lfp_merchant_state` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lfp_merchant_state - - # @private - def initialize parent_rpcs = nil - get_lfp_merchant_state_config = parent_rpcs.get_lfp_merchant_state if parent_rpcs.respond_to? :get_lfp_merchant_state - @get_lfp_merchant_state = ::Gapic::Config::Method.new get_lfp_merchant_state_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/service_stub.rb deleted file mode 100644 index d4ec6c2865b7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/service_stub.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! - -require "google/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpMerchantStateService - module Rest - ## - # REST service stub for the LfpMerchantStateService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_lfp_merchant_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState] - # A result object deserialized from the server's reply - def get_lfp_merchant_state request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_lfp_merchant_state_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_lfp_merchant_state", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_lfp_merchant_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_lfp_merchant_state_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/lfp/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/lfpMerchantStates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb deleted file mode 100644 index ffff639bc32c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1beta/version" - -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/client" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit sales - # data for a merchant. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/lfp/v1beta/lfp_sale_service" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new - # - module LfpSaleService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "lfp_sale_service", "helpers.rb" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb deleted file mode 100644 index e772d1c9b01b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb +++ /dev/null @@ -1,486 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/lfp/v1beta/lfpsale_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpSaleService - ## - # Client for the LfpSaleService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit sales - # data for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_sale_service_stub - - ## - # Configure the LfpSaleService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpSaleService clients - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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", "Shopping", "Merchant", "Lfp", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpSaleService 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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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 - @lfp_sale_service_stub.universe_domain - end - - ## - # Create a new LfpSaleService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpSaleService 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/shopping/merchant/lfp/v1beta/lfpsale_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 - - @lfp_sale_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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 - ) - - @lfp_sale_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 - @lfp_sale_service_stub.logger - end - - # Service calls - - ## - # Inserts a `LfpSale` for the given merchant. - # - # @overload insert_lfp_sale(request, options = nil) - # Pass arguments to `insert_lfp_sale` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_lfp_sale(parent: nil, lfp_sale: nil) - # Pass arguments to `insert_lfp_sale` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account. - # Format: `accounts/{lfp_partner}` - # @param lfp_sale [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale, ::Hash] - # Required. The sale to insert. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new - # - # # Call the insert_lfp_sale method. - # result = client.insert_lfp_sale request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpSale. - # p result - # - def insert_lfp_sale request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_lfp_sale.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_lfp_sale.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_lfp_sale.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_sale_service_stub.call_rpc :insert_lfp_sale, request, 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 LfpSaleService API. - # - # This class represents the configuration for LfpSaleService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # insert_lfp_sale to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_sale.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_sale.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpSaleService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `insert_lfp_sale` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_sale - - # @private - def initialize parent_rpcs = nil - insert_lfp_sale_config = parent_rpcs.insert_lfp_sale if parent_rpcs.respond_to? :insert_lfp_sale - @insert_lfp_sale = ::Gapic::Config::Method.new insert_lfp_sale_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb deleted file mode 100644 index 579c5651f2f7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_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 Shopping - module Merchant - module Lfp - module V1beta - module LfpSaleService - # Credentials for the LfpSaleService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb deleted file mode 100644 index 76e2d821e236..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/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 Shopping - module Merchant - module Lfp - module V1beta - module LfpSaleService - # Path helper methods for the LfpSaleService API. - module Paths - ## - # Create a fully-qualified LfpSale resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/lfpSales/{sale}` - # - # @param account [String] - # @param sale [String] - # - # @return [::String] - def lfp_sale_path account:, sale: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/lfpSales/#{sale}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb deleted file mode 100644 index adb464ac4009..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1beta/version" - -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit sales - # data for a merchant. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new - # - module LfpSaleService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb deleted file mode 100644 index d3157f347562..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb +++ /dev/null @@ -1,436 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/lfp/v1beta/lfpsale_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpSaleService - module Rest - ## - # REST client for the LfpSaleService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit sales - # data for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_sale_service_stub - - ## - # Configure the LfpSaleService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpSaleService clients - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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", "Shopping", "Merchant", "Lfp", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpSaleService 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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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 - @lfp_sale_service_stub.universe_domain - end - - ## - # Create a new LfpSaleService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpSaleService 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 - - @lfp_sale_service_stub = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @lfp_sale_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 - @lfp_sale_service_stub.logger - end - - # Service calls - - ## - # Inserts a `LfpSale` for the given merchant. - # - # @overload insert_lfp_sale(request, options = nil) - # Pass arguments to `insert_lfp_sale` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_lfp_sale(parent: nil, lfp_sale: nil) - # Pass arguments to `insert_lfp_sale` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account. - # Format: `accounts/{lfp_partner}` - # @param lfp_sale [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale, ::Hash] - # Required. The sale to insert. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new - # - # # Call the insert_lfp_sale method. - # result = client.insert_lfp_sale request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpSale. - # p result - # - def insert_lfp_sale request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_lfp_sale.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_lfp_sale.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_lfp_sale.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_sale_service_stub.insert_lfp_sale request, 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 LfpSaleService REST API. - # - # This class represents the configuration for LfpSaleService 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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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 - # # insert_lfp_sale to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_sale.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_sale.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpSaleService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `insert_lfp_sale` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_sale - - # @private - def initialize parent_rpcs = nil - insert_lfp_sale_config = parent_rpcs.insert_lfp_sale if parent_rpcs.respond_to? :insert_lfp_sale - @insert_lfp_sale = ::Gapic::Config::Method.new insert_lfp_sale_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb deleted file mode 100644 index c1011e2ebc60..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.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! - -require "google/shopping/merchant/lfp/v1beta/lfpsale_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpSaleService - module Rest - ## - # REST service stub for the LfpSaleService 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 insert_lfp_sale REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] - # A result object deserialized from the server's reply - def insert_lfp_sale request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_sale_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "insert_lfp_sale", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale.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 insert_lfp_sale REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_lfp_sale_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/lfp/v1beta/{parent}/lfpSales:insert", - body: "lfp_sale", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb deleted file mode 100644 index e2807eaccfe0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1beta/version" - -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/paths" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/client" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # stores for a merchant. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/lfp/v1beta/lfp_store_service" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new - # - module LfpStoreService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "lfp_store_service", "helpers.rb" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb deleted file mode 100644 index 3a55c9610eb6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.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! - -require "google/cloud/errors" -require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpStoreService - ## - # Client for the LfpStoreService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # stores for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_store_service_stub - - ## - # Configure the LfpStoreService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpStoreService clients - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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", "Shopping", "Merchant", "Lfp", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpStoreService 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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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 - @lfp_store_service_stub.universe_domain - end - - ## - # Create a new LfpStoreService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpStoreService 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/shopping/merchant/lfp/v1beta/lfpstore_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 - - @lfp_store_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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 - ) - - @lfp_store_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 - @lfp_store_service_stub.logger - end - - # Service calls - - ## - # Retrieves information about a store. - # - # @overload get_lfp_store(request, options = nil) - # Pass arguments to `get_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_lfp_store(name: nil) - # Pass arguments to `get_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the store to retrieve. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new - # - # # Call the get_lfp_store method. - # result = client.get_lfp_store request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - # p result - # - def get_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_lfp_store.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.call_rpc :get_lfp_store, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inserts a store for the target merchant. If the store with the same store - # code already exists, it will be replaced. - # - # @overload insert_lfp_store(request, options = nil) - # Pass arguments to `insert_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_lfp_store(parent: nil, lfp_store: nil) - # Pass arguments to `insert_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account - # Format: `accounts/{account}` - # @param lfp_store [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore, ::Hash] - # Required. The store to insert. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new - # - # # Call the insert_lfp_store method. - # result = client.insert_lfp_store request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - # p result - # - def insert_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_lfp_store.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.call_rpc :insert_lfp_store, request, 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 store for a target merchant. - # - # @overload delete_lfp_store(request, options = nil) - # Pass arguments to `delete_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_lfp_store(name: nil) - # Pass arguments to `delete_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the store to delete for the target merchant account. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # - # @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/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new - # - # # Call the delete_lfp_store method. - # result = client.delete_lfp_store request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_lfp_store.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.call_rpc :delete_lfp_store, request, 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 stores of the target merchant, specified by the filter in - # `ListLfpStoresRequest`. - # - # @overload list_lfp_stores(request, options = nil) - # Pass arguments to `list_lfp_stores` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_lfp_stores(parent: nil, target_account: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_lfp_stores` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP partner. - # Format: `accounts/{account}` - # @param target_account [::Integer] - # Required. The Merchant Center id of the merchant to list stores for. - # @param page_size [::Integer] - # Optional. The maximum number of `LfpStore` resources for the given account - # to return. The service returns fewer than this value if the number of - # stores for the given account is less than the `pageSize`. The default value - # is 250. The maximum value is 1000; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListLfpStoresRequest` - # call. Provide the page token to retrieve the subsequent page. When - # paginating, all other parameters provided to `ListLfpStoresRequest` must - # match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse#next_page_token nextPageToken} - # in the response to the previous request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new - # - # # Call the list_lfp_stores method. - # result = client.list_lfp_stores request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - # p item - # end - # - def list_lfp_stores request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_lfp_stores.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_lfp_stores.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_lfp_stores.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.call_rpc :list_lfp_stores, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @lfp_store_service_stub, :list_lfp_stores, 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 LfpStoreService API. - # - # This class represents the configuration for LfpStoreService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_lfp_store to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_store.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_store.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpStoreService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lfp_store - ## - # RPC-specific configuration for `insert_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_store - ## - # RPC-specific configuration for `delete_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lfp_store - ## - # RPC-specific configuration for `list_lfp_stores` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lfp_stores - - # @private - def initialize parent_rpcs = nil - get_lfp_store_config = parent_rpcs.get_lfp_store if parent_rpcs.respond_to? :get_lfp_store - @get_lfp_store = ::Gapic::Config::Method.new get_lfp_store_config - insert_lfp_store_config = parent_rpcs.insert_lfp_store if parent_rpcs.respond_to? :insert_lfp_store - @insert_lfp_store = ::Gapic::Config::Method.new insert_lfp_store_config - delete_lfp_store_config = parent_rpcs.delete_lfp_store if parent_rpcs.respond_to? :delete_lfp_store - @delete_lfp_store = ::Gapic::Config::Method.new delete_lfp_store_config - list_lfp_stores_config = parent_rpcs.list_lfp_stores if parent_rpcs.respond_to? :list_lfp_stores - @list_lfp_stores = ::Gapic::Config::Method.new list_lfp_stores_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb deleted file mode 100644 index e11ec1516c68..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_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 Shopping - module Merchant - module Lfp - module V1beta - module LfpStoreService - # Credentials for the LfpStoreService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb deleted file mode 100644 index 1d64fb821b2f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpStoreService - # Path helper methods for the LfpStoreService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified LfpStore resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # - # @param account [String] - # @param target_merchant [String] - # @param store_code [String] - # - # @return [::String] - def lfp_store_path account:, target_merchant:, store_code: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "target_merchant cannot contain /" if target_merchant.to_s.include? "/" - - "accounts/#{account}/lfpStores/#{target_merchant}~#{store_code}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb deleted file mode 100644 index 672832b066ec..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1beta/version" - -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/paths" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # stores for a merchant. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new - # - module LfpStoreService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb deleted file mode 100644 index b2d21a98f846..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb +++ /dev/null @@ -1,717 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/lfp/v1beta/lfpstore_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpStoreService - module Rest - ## - # REST client for the LfpStoreService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # stores for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_store_service_stub - - ## - # Configure the LfpStoreService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpStoreService clients - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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", "Shopping", "Merchant", "Lfp", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpStoreService 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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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 - @lfp_store_service_stub.universe_domain - end - - ## - # Create a new LfpStoreService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpStoreService 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 - - @lfp_store_service_stub = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @lfp_store_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 - @lfp_store_service_stub.logger - end - - # Service calls - - ## - # Retrieves information about a store. - # - # @overload get_lfp_store(request, options = nil) - # Pass arguments to `get_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_lfp_store(name: nil) - # Pass arguments to `get_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the store to retrieve. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new - # - # # Call the get_lfp_store method. - # result = client.get_lfp_store request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - # p result - # - def get_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_lfp_store.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.get_lfp_store request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inserts a store for the target merchant. If the store with the same store - # code already exists, it will be replaced. - # - # @overload insert_lfp_store(request, options = nil) - # Pass arguments to `insert_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_lfp_store(parent: nil, lfp_store: nil) - # Pass arguments to `insert_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account - # Format: `accounts/{account}` - # @param lfp_store [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore, ::Hash] - # Required. The store to insert. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new - # - # # Call the insert_lfp_store method. - # result = client.insert_lfp_store request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - # p result - # - def insert_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_lfp_store.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.insert_lfp_store request, 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 store for a target merchant. - # - # @overload delete_lfp_store(request, options = nil) - # Pass arguments to `delete_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_lfp_store(name: nil) - # Pass arguments to `delete_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the store to delete for the target merchant account. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # @yield [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/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new - # - # # Call the delete_lfp_store method. - # result = client.delete_lfp_store request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_lfp_store.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.delete_lfp_store request, 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 stores of the target merchant, specified by the filter in - # `ListLfpStoresRequest`. - # - # @overload list_lfp_stores(request, options = nil) - # Pass arguments to `list_lfp_stores` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_lfp_stores(parent: nil, target_account: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_lfp_stores` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP partner. - # Format: `accounts/{account}` - # @param target_account [::Integer] - # Required. The Merchant Center id of the merchant to list stores for. - # @param page_size [::Integer] - # Optional. The maximum number of `LfpStore` resources for the given account - # to return. The service returns fewer than this value if the number of - # stores for the given account is less than the `pageSize`. The default value - # is 250. The maximum value is 1000; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListLfpStoresRequest` - # call. Provide the page token to retrieve the subsequent page. When - # paginating, all other parameters provided to `ListLfpStoresRequest` must - # match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse#next_page_token nextPageToken} - # in the response to the previous request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new - # - # # Call the list_lfp_stores method. - # result = client.list_lfp_stores request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - # p item - # end - # - def list_lfp_stores request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_lfp_stores.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_lfp_stores.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_lfp_stores.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.list_lfp_stores request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @lfp_store_service_stub, :list_lfp_stores, "lfp_stores", request, result, 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 LfpStoreService REST API. - # - # This class represents the configuration for LfpStoreService 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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_lfp_store to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_store.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_store.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpStoreService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lfp_store - ## - # RPC-specific configuration for `insert_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_store - ## - # RPC-specific configuration for `delete_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lfp_store - ## - # RPC-specific configuration for `list_lfp_stores` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lfp_stores - - # @private - def initialize parent_rpcs = nil - get_lfp_store_config = parent_rpcs.get_lfp_store if parent_rpcs.respond_to? :get_lfp_store - @get_lfp_store = ::Gapic::Config::Method.new get_lfp_store_config - insert_lfp_store_config = parent_rpcs.insert_lfp_store if parent_rpcs.respond_to? :insert_lfp_store - @insert_lfp_store = ::Gapic::Config::Method.new insert_lfp_store_config - delete_lfp_store_config = parent_rpcs.delete_lfp_store if parent_rpcs.respond_to? :delete_lfp_store - @delete_lfp_store = ::Gapic::Config::Method.new delete_lfp_store_config - list_lfp_stores_config = parent_rpcs.list_lfp_stores if parent_rpcs.respond_to? :list_lfp_stores - @list_lfp_stores = ::Gapic::Config::Method.new list_lfp_stores_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb deleted file mode 100644 index 67b36688a24c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb +++ /dev/null @@ -1,328 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpStoreService - module Rest - ## - # REST service stub for the LfpStoreService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # A result object deserialized from the server's reply - def get_lfp_store request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_lfp_store_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_lfp_store", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the insert_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # A result object deserialized from the server's reply - def insert_lfp_store request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_store_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "insert_lfp_store", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.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_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_lfp_store request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_lfp_store_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_lfp_store", - 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_lfp_stores REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse] - # A result object deserialized from the server's reply - def list_lfp_stores request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_lfp_stores_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_lfp_stores", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_lfp_store_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/lfp/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/lfpStores/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_lfp_store_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/lfp/v1beta/{parent}/lfpStores:insert", - body: "lfp_store", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_lfp_store_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/lfp/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/lfpStores/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_lfp_stores REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_lfp_stores_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/lfp/v1beta/{parent}/lfpStores", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_pb.rb deleted file mode 100644 index 74d722d2fdd4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/lfp/v1beta/lfpinventory.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n6google/shopping/merchant/lfp/v1beta/lfpinventory.proto\x12#google.shopping.merchant.lfp.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xa2\x05\n\x0cLfpInventory\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x17\n\nstore_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08offer_id\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x04gtin\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12/\n\x05price\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x19\n\x0c\x61vailability\x18\t \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\x08quantity\x18\n \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x38\n\x0f\x63ollection_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x1f\n\rpickup_method\x18\x0c \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1c\n\npickup_sla\x18\r \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1c\n\nfeed_label\x18\x0e \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01:\x95\x01\xea\x41\x91\x01\n\'merchantapi.googleapis.com/LfpInventory\x12Haccounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}*\x0elfpInventories2\x0clfpInventoryB\x07\n\x05_gtinB\x0b\n\t_quantityB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\r\n\x0b_feed_label\"\xab\x01\n\x19InsertLfpInventoryRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'merchantapi.googleapis.com/LfpInventory\x12M\n\rlfp_inventory\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.lfp.v1beta.LfpInventoryB\x03\xe0\x41\x02\x32\xb6\x02\n\x13LfpInventoryService\x12\xd5\x01\n\x12InsertLfpInventory\x12>.google.shopping.merchant.lfp.v1beta.InsertLfpInventoryRequest\x1a\x31.google.shopping.merchant.lfp.v1beta.LfpInventory\"L\x82\xd3\xe4\x93\x02\x46\"5/lfp/v1beta/{parent=accounts/*}/lfpInventories:insert:\rlfp_inventory\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xba\x01\n\'com.google.shopping.merchant.lfp.v1betaB\x11LfpInventoryProtoP\x01Z?cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb;lfppb\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - LfpInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpInventory").msgclass - InsertLfpInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.InsertLfpInventoryRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb deleted file mode 100644 index 932c329a2f11..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/lfp/v1beta/lfpinventory.proto for package 'google.shopping.merchant.lfp.v1beta' -# 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/shopping/merchant/lfp/v1beta/lfpinventory_pb' - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpInventoryService - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # inventories for a merchant. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.lfp.v1beta.LfpInventoryService' - - # Inserts a `LfpInventory` resource for the given target merchant account. If - # the resource already exists, it will be replaced. The inventory - # automatically expires after 30 days. - rpc :InsertLfpInventory, ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb.rb deleted file mode 100644 index e7ec7a65aa10..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/lfp/v1beta/lfpmerchantstate.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/shopping/merchant/lfp/v1beta/lfpmerchantstate.proto\x12#google.shopping.merchant.lfp.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe8\x0e\n\x10LfpMerchantState\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0blinked_gbps\x18\x02 \x01(\x03\x12^\n\x0cstore_states\x18\x03 \x03(\x0b\x32\x43.google.shopping.merchant.lfp.v1beta.LfpMerchantState.LfpStoreStateB\x03\xe0\x41\x03\x12]\n\x0finventory_stats\x18\x04 \x01(\x0b\x32\x44.google.shopping.merchant.lfp.v1beta.LfpMerchantState.InventoryStats\x12_\n\x10\x63ountry_settings\x18\x05 \x03(\x0b\x32\x45.google.shopping.merchant.lfp.v1beta.LfpMerchantState.CountrySettings\x1a\xbc\x02\n\rLfpStoreState\x12\x1a\n\nstore_code\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12s\n\x0ematching_state\x18\x02 \x01(\x0e\x32V.google.shopping.merchant.lfp.v1beta.LfpMerchantState.LfpStoreState.StoreMatchingStateB\x03\xe0\x41\x03\x12\x1b\n\x13matching_state_hint\x18\x03 \x01(\t\"}\n\x12StoreMatchingState\x12$\n STORE_MATCHING_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cSTORE_MATCHING_STATE_MATCHED\x10\x01\x12\x1f\n\x1bSTORE_MATCHING_STATE_FAILED\x10\x02\x1a\x88\x01\n\x0eInventoryStats\x12\x19\n\x11submitted_entries\x18\x01 \x01(\x03\x12\"\n\x1asubmitted_in_stock_entries\x18\x02 \x01(\x03\x12\x1b\n\x13unsubmitted_entries\x18\x03 \x01(\x03\x12\x1a\n\x12submitted_products\x18\x04 \x01(\x03\x1a\xad\x07\n\x0f\x43ountrySettings\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12#\n\x1b\x66ree_local_listings_enabled\x18\x02 \x01(\x08\x12#\n\x1blocal_inventory_ads_enabled\x18\x03 \x01(\x08\x12\x82\x01\n\x1cinventory_verification_state\x18\x04 \x01(\x0e\x32W.google.shopping.merchant.lfp.v1beta.LfpMerchantState.CountrySettings.VerificationStateB\x03\xe0\x41\x03\x12u\n\x11product_page_type\x18\x05 \x01(\x0e\x32U.google.shopping.merchant.lfp.v1beta.LfpMerchantState.CountrySettings.ProductPageTypeB\x03\xe0\x41\x03\x12\x88\x01\n\"instock_serving_verification_state\x18\x06 \x01(\x0e\x32W.google.shopping.merchant.lfp.v1beta.LfpMerchantState.CountrySettings.VerificationStateB\x03\xe0\x41\x03\x12\x87\x01\n!pickup_serving_verification_state\x18\x07 \x01(\x0e\x32W.google.shopping.merchant.lfp.v1beta.LfpMerchantState.CountrySettings.VerificationStateB\x03\xe0\x41\x03\"\xa1\x01\n\x11VerificationState\x12\"\n\x1eVERIFICATION_STATE_UNSPECIFIED\x10\x00\x12#\n\x1fVERIFICATION_STATE_NOT_APPROVED\x10\x01\x12\"\n\x1eVERIFICATION_STATE_IN_PROGRESS\x10\x02\x12\x1f\n\x1bVERIFICATION_STATE_APPROVED\x10\x03\"\x80\x01\n\x0fProductPageType\x12!\n\x1dPRODUCT_PAGE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rGOOGLE_HOSTED\x10\x01\x12\x13\n\x0fMERCHANT_HOSTED\x10\x02\x12\"\n\x1eMERCHANT_HOSTED_STORE_SPECIFIC\x10\x03:\x91\x01\xea\x41\x8d\x01\n+merchantapi.googleapis.com/LfpMerchantState\x12\x39\x61\x63\x63ounts/{account}/lfpMerchantStates/{lfp_merchant_state}*\x11lfpMerchantStates2\x10lfpMerchantState\"_\n\x1aGetLfpMerchantStateRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/LfpMerchantState2\xb4\x02\n\x17LfpMerchantStateService\x12\xcf\x01\n\x13GetLfpMerchantState\x12?.google.shopping.merchant.lfp.v1beta.GetLfpMerchantStateRequest\x1a\x35.google.shopping.merchant.lfp.v1beta.LfpMerchantState\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/lfp/v1beta/{name=accounts/*/lfpMerchantStates/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x83\x01\n\'com.google.shopping.merchant.lfp.v1betaB\x15LfpMerchantStateProtoP\x01Z?cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb;lfppbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - LfpMerchantState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpMerchantState").msgclass - LfpMerchantState::LfpStoreState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpMerchantState.LfpStoreState").msgclass - LfpMerchantState::LfpStoreState::StoreMatchingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpMerchantState.LfpStoreState.StoreMatchingState").enummodule - LfpMerchantState::InventoryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpMerchantState.InventoryStats").msgclass - LfpMerchantState::CountrySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpMerchantState.CountrySettings").msgclass - LfpMerchantState::CountrySettings::VerificationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpMerchantState.CountrySettings.VerificationState").enummodule - LfpMerchantState::CountrySettings::ProductPageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpMerchantState.CountrySettings.ProductPageType").enummodule - GetLfpMerchantStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.GetLfpMerchantStateRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_services_pb.rb deleted file mode 100644 index 007442629602..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_services_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/lfp/v1beta/lfpmerchantstate.proto for package 'google.shopping.merchant.lfp.v1beta' -# 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/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb' - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpMerchantStateService - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to get the - # state of a merchant. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.lfp.v1beta.LfpMerchantStateService' - - # Gets the LFP state of a merchant - rpc :GetLfpMerchantState, ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_pb.rb deleted file mode 100644 index 1f6579b66db2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/lfp/v1beta/lfpsale.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/protobuf/timestamp_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n1google/shopping/merchant/lfp/v1beta/lfpsale.proto\x12#google.shopping.merchant.lfp.v1beta\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\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xe8\x03\n\x07LfpSale\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x17\n\nstore_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08offer_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04gtin\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12/\n\x05price\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02\x12\x15\n\x08quantity\x18\t \x01(\x03\x42\x03\xe0\x41\x02\x12\x32\n\tsale_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x1d\n\x03uid\x18\x0b \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01H\x00\x88\x01\x01\x12\x1c\n\nfeed_label\x18\x0c \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01:^\xea\x41[\n\"merchantapi.googleapis.com/LfpSale\x12\"accounts/{account}/lfpSales/{sale}*\x08lfpSales2\x07lfpSaleB\x06\n\x04_uidB\r\n\x0b_feed_label\"p\n\x14InsertLfpSaleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x08lfp_sale\x18\x02 \x01(\x0b\x32,.google.shopping.merchant.lfp.v1beta.LfpSaleB\x03\xe0\x41\x02\x32\x97\x02\n\x0eLfpSaleService\x12\xbb\x01\n\rInsertLfpSale\x12\x39.google.shopping.merchant.lfp.v1beta.InsertLfpSaleRequest\x1a,.google.shopping.merchant.lfp.v1beta.LfpSale\"A\x82\xd3\xe4\x93\x02;\"//lfp/v1beta/{parent=accounts/*}/lfpSales:insert:\x08lfp_sale\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentBz\n\'com.google.shopping.merchant.lfp.v1betaB\x0cLfpSaleProtoP\x01Z?cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb;lfppbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - LfpSale = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpSale").msgclass - InsertLfpSaleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.InsertLfpSaleRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb deleted file mode 100644 index c567c9b70176..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/lfp/v1beta/lfpsale.proto for package 'google.shopping.merchant.lfp.v1beta' -# 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/shopping/merchant/lfp/v1beta/lfpsale_pb' - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpSaleService - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit sales - # data for a merchant. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.lfp.v1beta.LfpSaleService' - - # Inserts a `LfpSale` for the given merchant. - rpc :InsertLfpSale, ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_pb.rb deleted file mode 100644 index 592b1eecaf42..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/lfp/v1beta/lfpstore.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n2google/shopping/merchant/lfp/v1beta/lfpstore.proto\x12#google.shopping.merchant.lfp.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xe6\x05\n\x08LfpStore\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x1a\n\nstore_code\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1a\n\rstore_address\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\nstore_name\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1e\n\x0cphone_number\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1d\n\x0bwebsite_uri\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1a\n\rgcid_category\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\x08place_id\x18\t \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12`\n\x0ematching_state\x18\n \x01(\x0e\x32@.google.shopping.merchant.lfp.v1beta.LfpStore.StoreMatchingStateB\x06\xe0\x41\x01\xe0\x41\x03\x12(\n\x13matching_state_hint\x18\x0b \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03H\x04\x88\x01\x01\"}\n\x12StoreMatchingState\x12$\n STORE_MATCHING_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cSTORE_MATCHING_STATE_MATCHED\x10\x01\x12\x1f\n\x1bSTORE_MATCHING_STATE_FAILED\x10\x02:z\xea\x41w\n#merchantapi.googleapis.com/LfpStore\x12;accounts/{account}/lfpStores/{target_merchant}~{store_code}*\tlfpStores2\x08lfpStoreB\r\n\x0b_store_nameB\x0f\n\r_phone_numberB\x0e\n\x0c_website_uriB\x0b\n\t_place_idB\x16\n\x14_matching_state_hint\"O\n\x12GetLfpStoreRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/LfpStore\"\x9b\x01\n\x15InsertLfpStoreRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#merchantapi.googleapis.com/LfpStore\x12\x45\n\tlfp_store\x18\x02 \x01(\x0b\x32-.google.shopping.merchant.lfp.v1beta.LfpStoreB\x03\xe0\x41\x02\"R\n\x15\x44\x65leteLfpStoreRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/LfpStore\"\xa1\x01\n\x14ListLfpStoresRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#merchantapi.googleapis.com/LfpStore\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\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\"s\n\x15ListLfpStoresResponse\x12\x41\n\nlfp_stores\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.lfp.v1beta.LfpStore\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xc8\x06\n\x0fLfpStoreService\x12\xaf\x01\n\x0bGetLfpStore\x12\x37.google.shopping.merchant.lfp.v1beta.GetLfpStoreRequest\x1a-.google.shopping.merchant.lfp.v1beta.LfpStore\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/lfp/v1beta/{name=accounts/*/lfpStores/*}\x12\xd3\x01\n\x0eInsertLfpStore\x12:.google.shopping.merchant.lfp.v1beta.InsertLfpStoreRequest\x1a-.google.shopping.merchant.lfp.v1beta.LfpStore\"V\xda\x41\x10parent,lfp_store\x82\xd3\xe4\x93\x02=\"0/lfp/v1beta/{parent=accounts/*}/lfpStores:insert:\tlfp_store\x12\x9e\x01\n\x0e\x44\x65leteLfpStore\x12:.google.shopping.merchant.lfp.v1beta.DeleteLfpStoreRequest\x1a\x16.google.protobuf.Empty\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+*)/lfp/v1beta/{name=accounts/*/lfpStores/*}\x12\xc2\x01\n\rListLfpStores\x12\x39.google.shopping.merchant.lfp.v1beta.ListLfpStoresRequest\x1a:.google.shopping.merchant.lfp.v1beta.ListLfpStoresResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/lfp/v1beta/{parent=accounts/*}/lfpStores\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB{\n\'com.google.shopping.merchant.lfp.v1betaB\rLfpStoreProtoP\x01Z?cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb;lfppbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - LfpStore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpStore").msgclass - LfpStore::StoreMatchingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpStore.StoreMatchingState").enummodule - GetLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.GetLfpStoreRequest").msgclass - InsertLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.InsertLfpStoreRequest").msgclass - DeleteLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.DeleteLfpStoreRequest").msgclass - ListLfpStoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.ListLfpStoresRequest").msgclass - ListLfpStoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.ListLfpStoresResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb deleted file mode 100644 index c32b8a0cff48..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb +++ /dev/null @@ -1,57 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/lfp/v1beta/lfpstore.proto for package 'google.shopping.merchant.lfp.v1beta' -# 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/shopping/merchant/lfp/v1beta/lfpstore_pb' - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpStoreService - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # stores for a merchant. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.lfp.v1beta.LfpStoreService' - - # Retrieves information about a store. - rpc :GetLfpStore, ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore - # Inserts a store for the target merchant. If the store with the same store - # code already exists, it will be replaced. - rpc :InsertLfpStore, ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore - # Deletes a store for a target merchant. - rpc :DeleteLfpStore, ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest, ::Google::Protobuf::Empty - # Lists the stores of the target merchant, specified by the filter in - # `ListLfpStoresRequest`. - rpc :ListLfpStores, ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest, ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb deleted file mode 100644 index ccb9d408d652..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.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/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" -require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" -require "google/shopping/merchant/lfp/v1beta/version" - -module Google - module Shopping - module Merchant - module Lfp - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/lfp/v1beta/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/version.rb deleted file mode 100644 index 9ffd278b15b1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/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 Shopping - module Merchant - module Lfp - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant V1BETA 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-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb deleted file mode 100644 index 19f58bda679a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb +++ /dev/null @@ -1,113 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - # Local Inventory for the merchant. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The name for the `LfpInventory` resource. - # Format: - # `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}` - # @!attribute [rw] target_account - # @return [::Integer] - # Required. The Merchant Center ID of the merchant to submit the inventory - # for. - # @!attribute [rw] store_code - # @return [::String] - # Required. The identifier of the merchant's store. Either the store code - # inserted through `InsertLfpStore` or the store code in the Business - # Profile. - # @!attribute [rw] offer_id - # @return [::String] - # Required. Immutable. A unique identifier for the product. If both - # inventories and sales are submitted for a merchant, this id should match - # for the same product. - # - # **Note**: if the merchant sells the same product new and used, they should - # have different IDs. - # @!attribute [rw] region_code - # @return [::String] - # Required. The [CLDR territory - # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) - # for the country where the product is sold. - # @!attribute [rw] content_language - # @return [::String] - # Required. The two-letter ISO 639-1 language code for the item. - # @!attribute [rw] gtin - # @return [::String] - # Optional. The Global Trade Item Number of the product. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Optional. The current price of the product. - # @!attribute [rw] availability - # @return [::String] - # Required. Availability of the product at this store. - # For accepted attribute values, see the [local product inventory data - # specification](https://support.google.com/merchants/answer/3061342) - # @!attribute [rw] quantity - # @return [::Integer] - # Optional. Quantity of the product available at this store. Must be greater - # than or equal to zero. - # @!attribute [rw] collection_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The time when the inventory is collected. If not set, it will be - # set to the time when the inventory is submitted. - # @!attribute [rw] pickup_method - # @return [::String] - # Optional. Supported pickup method for this offer. Unless the value is "not - # supported", this field must be submitted together with `pickupSla`. For - # accepted attribute values, see the [local product inventory data - # specification](https://support.google.com/merchants/answer/3061342). - # @!attribute [rw] pickup_sla - # @return [::String] - # Optional. Expected date that an order will be ready for pickup relative to - # the order date. Must be submitted together with `pickupMethod`. For - # accepted attribute values, see the [local product inventory data - # specification](https://support.google.com/merchants/answer/3061342). - # @!attribute [rw] feed_label - # @return [::String] - # Optional. The [feed - # label](https://developers.google.com/shopping-content/guides/products/feed-labels) - # for the product. If this is not set, it will default to `regionCode`. - class LfpInventory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertLfpInventory` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The LFP provider account. - # Format: `accounts/{account}` - # @!attribute [rw] lfp_inventory - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] - # Required. The inventory to insert. - class InsertLfpInventoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpmerchantstate.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpmerchantstate.rb deleted file mode 100644 index 714550db536e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpmerchantstate.rb +++ /dev/null @@ -1,179 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - # The LFP state of a merchant. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the `LfpMerchantState` resource. Format: - # `accounts/{account}/lfpMerchantStates/{target_merchant}` - # @!attribute [rw] linked_gbps - # @return [::Integer] - # Number of [GBPs](https://www.google.com/business/) this merchant has access - # to. - # @!attribute [r] store_states - # @return [::Array<::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState::LfpStoreState>] - # Output only. The state per store from the specified merchant. The field - # will be absent if the merchant has no stores submitted through LFP. - # @!attribute [rw] inventory_stats - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState::InventoryStats] - # The inventory statistics for the merchant. The field will be absent if the - # merchant has no inventory submitted through LFP. - # @!attribute [rw] country_settings - # @return [::Array<::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState::CountrySettings>] - # Country-specific settings for the merchant. - class LfpMerchantState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of a specific merchant's store. - # @!attribute [rw] store_code - # @return [::String] - # Required. Immutable. The identifier of this store. - # @!attribute [r] matching_state - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState::LfpStoreState::StoreMatchingState] - # Output only. The store matching state. - # @!attribute [rw] matching_state_hint - # @return [::String] - # The hint of why the matching has failed (only set if matching_state is - # FAILED). - class LfpStoreState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of matching `LfpStore` to a Google Business Profile listing. - module StoreMatchingState - # Store matching state unspecified. - STORE_MATCHING_STATE_UNSPECIFIED = 0 - - # The `LfpStore` is successfully matched with a Google Business Profile - # store. - STORE_MATCHING_STATE_MATCHED = 1 - - # The `LfpStore` is not matched with a Google Business Profile store. - STORE_MATCHING_STATE_FAILED = 2 - end - end - - # The inventory statistics for a merchant. - # @!attribute [rw] submitted_entries - # @return [::Integer] - # Number of entries (understanding entry as a pair of product and store) - # that were built based on provided inventories/sales and submitted to - # Google. - # @!attribute [rw] submitted_in_stock_entries - # @return [::Integer] - # Number of submitted in stock entries. - # @!attribute [rw] unsubmitted_entries - # @return [::Integer] - # Number of entries that were built based on provided - # inventories/sales and couldn't be submitted to Google due to errors like - # missing product. - # @!attribute [rw] submitted_products - # @return [::Integer] - # Number of products from provided inventories/sales that were created from - # matches to existing online products provided by the merchant or to the - # Google catalog. - class InventoryStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Country-specific settings for the merchant. - # @!attribute [rw] region_code - # @return [::String] - # Required. The [CLDR territory - # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) - # for the country for which these settings are defined. - # @!attribute [rw] free_local_listings_enabled - # @return [::Boolean] - # True if this merchant has enabled free local listings in MC. - # @!attribute [rw] local_inventory_ads_enabled - # @return [::Boolean] - # True if this merchant has enabled local inventory ads in MC. - # @!attribute [r] inventory_verification_state - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState::CountrySettings::VerificationState] - # Output only. The verification state of this merchant's inventory check. - # @!attribute [r] product_page_type - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState::CountrySettings::ProductPageType] - # Output only. The product page type selected by this merchant. - # @!attribute [r] instock_serving_verification_state - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState::CountrySettings::VerificationState] - # Output only. The verification state of this merchant's instock serving - # feature. - # @!attribute [r] pickup_serving_verification_state - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState::CountrySettings::VerificationState] - # Output only. The verification state of this merchant's pickup serving - # feature. - class CountrySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible verification states for different merchant programs. - module VerificationState - # Verification state unspecified. - VERIFICATION_STATE_UNSPECIFIED = 0 - - # Verification state not approved. - VERIFICATION_STATE_NOT_APPROVED = 1 - - # Verification state in progress. - VERIFICATION_STATE_IN_PROGRESS = 2 - - # Verification state approved. - VERIFICATION_STATE_APPROVED = 3 - end - - # The possible [product page - # types](https://support.google.com/merchants/topic/15148370) for a - # merchant. - module ProductPageType - # Product page type unspecified. - PRODUCT_PAGE_TYPE_UNSPECIFIED = 0 - - # Google hosted product page. - GOOGLE_HOSTED = 1 - - # Merchant hosted product page. - MERCHANT_HOSTED = 2 - - # Merchant hosted store specific product page. - MERCHANT_HOSTED_STORE_SPECIFIC = 3 - end - end - end - - # Request message for the GetLfpMerchantState method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the state to retrieve. - # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}` - class GetLfpMerchantStateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb deleted file mode 100644 index cdbbfd2aff70..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb +++ /dev/null @@ -1,96 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - # A sale for the merchant. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The name of the `LfpSale` resource. - # Format: - # `accounts/{account}/lfpSales/{sale}` - # @!attribute [rw] target_account - # @return [::Integer] - # Required. The Merchant Center ID of the merchant to submit the sale for. - # @!attribute [rw] store_code - # @return [::String] - # Required. The identifier of the merchant's store. Either a `storeCode` - # inserted through the API or the code of the store in the Business Profile. - # @!attribute [rw] offer_id - # @return [::String] - # Required. A unique identifier for the product. If both inventories and - # sales are submitted for a merchant, this id should match for the same - # product. - # - # **Note**: if the merchant sells the same product new and used, they should - # have different IDs. - # @!attribute [rw] region_code - # @return [::String] - # Required. The [CLDR territory - # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) - # for the country where the product is sold. - # @!attribute [rw] content_language - # @return [::String] - # Required. The two-letter ISO 639-1 language code for the item. - # @!attribute [rw] gtin - # @return [::String] - # Required. The Global Trade Item Number of the sold product. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Required. The unit price of the product. - # @!attribute [rw] quantity - # @return [::Integer] - # Required. The relative change of the available quantity. Negative for items - # returned. - # @!attribute [rw] sale_time - # @return [::Google::Protobuf::Timestamp] - # Required. The timestamp for the sale. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the `LfpSale`. - # @!attribute [rw] feed_label - # @return [::String] - # Optional. The [feed - # label](https://developers.google.com/shopping-content/guides/products/feed-labels) - # for the product. If this is not set, it will default to `regionCode`. - class LfpSale - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the InsertLfpSale method. - # @!attribute [rw] parent - # @return [::String] - # Required. The LFP provider account. - # Format: `accounts/{lfp_partner}` - # @!attribute [rw] lfp_sale - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] - # Required. The sale to insert. - class InsertLfpSaleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb deleted file mode 100644 index b107be282b52..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb +++ /dev/null @@ -1,185 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - # A store for the merchant. This will be used to match to a store under the - # Google Business Profile of the target merchant. If a matching store can't be - # found, the inventories or sales submitted with the store code will not be - # used. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The name of the `LfpStore` resource. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # @!attribute [rw] target_account - # @return [::Integer] - # Required. The Merchant Center id of the merchant to submit the store for. - # @!attribute [rw] store_code - # @return [::String] - # Required. Immutable. A store identifier that is unique for the target - # merchant. - # @!attribute [rw] store_address - # @return [::String] - # Required. The street address of the store. - # Example: 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA. - # @!attribute [rw] store_name - # @return [::String] - # Optional. The merchant or store name. - # @!attribute [rw] phone_number - # @return [::String] - # Optional. The store phone number in - # [E.164](https://en.wikipedia.org/wiki/E.164) format. Example: - # `+15556767888` - # @!attribute [rw] website_uri - # @return [::String] - # Optional. The website URL for the store or merchant. - # @!attribute [rw] gcid_category - # @return [::Array<::String>] - # Optional. [Google My Business category - # id](https://gcid-explorer.corp.google.com/static/gcid.html). - # @!attribute [rw] place_id - # @return [::String] - # Optional. The [Google Place - # Id](https://developers.google.com/maps/documentation/places/web-service/place-id#id-overview) - # of the store location. - # @!attribute [r] matching_state - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore::StoreMatchingState] - # Optional. Output only. The state of matching to a Google Business Profile. - # See - # {::Google::Shopping::Merchant::Lfp::V1beta::LfpStore#matching_state_hint matchingStateHint} - # for further details if no match is found. - # @!attribute [r] matching_state_hint - # @return [::String] - # Optional. Output only. The hint of why the matching has failed. This is - # only set when - # {::Google::Shopping::Merchant::Lfp::V1beta::LfpStore#matching_state matchingState}=`STORE_MATCHING_STATE_FAILED`. - # - # Possible values are: - # - # - "`linked-store-not-found`": There aren't any Google Business - # Profile stores available for matching. - # - "`store-match-not-found`": The provided `LfpStore` couldn't be matched to - # any of the connected Google Business Profile stores. Merchant Center - # account is connected correctly and stores are available on Google Business - # Profile, but the `LfpStore` location address does not match with Google - # Business Profile stores' addresses. Update the `LfpStore` address or Google - # Business Profile store address to match correctly. - # - "`store-match-unverified`": The provided `LfpStore` couldn't be matched - # to any of the connected Google Business Profile stores, as the matched - # Google Business Profile store is unverified. Go through the Google Business - # Profile verification process to match correctly. - class LfpStore - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of matching `LfpStore` to a Google Business Profile. - module StoreMatchingState - # Store matching state unspecified. - STORE_MATCHING_STATE_UNSPECIFIED = 0 - - # The `LfpStore` is successfully matched with a Google Business Profile - # store. - STORE_MATCHING_STATE_MATCHED = 1 - - # The `LfpStore` is not matched with a Google Business Profile store. - STORE_MATCHING_STATE_FAILED = 2 - end - end - - # Request message for the `GetLfpStore` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the store to retrieve. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - class GetLfpStoreRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the InsertLfpStore method. - # @!attribute [rw] parent - # @return [::String] - # Required. The LFP provider account - # Format: `accounts/{account}` - # @!attribute [rw] lfp_store - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # Required. The store to insert. - class InsertLfpStoreRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteLfpStore method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the store to delete for the target merchant account. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - class DeleteLfpStoreRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListLfpStores method. - # @!attribute [rw] parent - # @return [::String] - # Required. The LFP partner. - # Format: `accounts/{account}` - # @!attribute [rw] target_account - # @return [::Integer] - # Required. The Merchant Center id of the merchant to list stores for. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `LfpStore` resources for the given account - # to return. The service returns fewer than this value if the number of - # stores for the given account is less than the `pageSize`. The default value - # is 250. The maximum value is 1000; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListLfpStoresRequest` - # call. Provide the page token to retrieve the subsequent page. When - # paginating, all other parameters provided to `ListLfpStoresRequest` must - # match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse#next_page_token nextPageToken} - # in the response to the previous request. - class ListLfpStoresRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListLfpStores method. - # @!attribute [rw] lfp_stores - # @return [::Array<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] - # The stores from the specified merchant. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `pageToken` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListLfpStoresResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.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! - - -module Google - module Shopping - module Type - # The weight represented as the value in string and the unit. - # @!attribute [rw] amount_micros - # @return [::Integer] - # Required. The weight represented as a number in micros (1 million micros is - # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 - # micros). - # This field can also be set as infinity by setting to -1. - # This field only support -1 and positive value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Type::Weight::WeightUnit] - # Required. The weight unit. - # Acceptable values are: kg and lb - class Weight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The weight unit. - module WeightUnit - # unit unspecified - WEIGHT_UNIT_UNSPECIFIED = 0 - - # lb unit. - POUND = 1 - - # kg unit. - KILOGRAM = 2 - end - end - - # The price represented as a number and currency. - # @!attribute [rw] amount_micros - # @return [::Integer] - # The price represented as a number in micros (1 million micros is an - # equivalent to one's currency standard unit, for example, 1 USD = 1000000 - # micros). - # @!attribute [rw] currency_code - # @return [::String] - # The currency of the price using three-letter acronyms according to [ISO - # 4217](http://en.wikipedia.org/wiki/ISO_4217). - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents custom attributes. Exactly one of `value` or - # `group_values` must not be empty. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute. - # @!attribute [rw] value - # @return [::String] - # The value of the attribute. If `value` is not empty, `group_values` must be - # empty. - # @!attribute [rw] group_values - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Subattributes within this attribute group. If - # `group_values` is not empty, `value` must be empty. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations available for a product. - # - # Destinations are used in Merchant Center to allow you to control where the - # products from your data feed should be displayed. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Destination values. - module DestinationEnum - # Not specified. - DESTINATION_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/google-ads/answer/2454022). - SHOPPING_ADS = 1 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 2 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3057972). - LOCAL_INVENTORY_ADS = 3 - - # [Free listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 4 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 5 - - # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). - YOUTUBE_SHOPPING = 6 - - # Youtube shopping checkout. - YOUTUBE_SHOPPING_CHECKOUT = 7 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 8 - - # [Free vehicle - # listings](https://support.google.com/merchants/answer/11189169). - FREE_VEHICLE_LISTINGS = 9 - - # [Vehicle ads](https://support.google.com/merchants/answer/11189169). - VEHICLE_ADS = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - end - end - - # Reporting contexts that your account and product issues apply to. - # - # Reporting contexts are groups of surfaces and formats for product results on - # Google. They can represent the entire destination (for example, [Shopping - # ads](https://support.google.com/merchants/answer/6149970)) or a subset of - # formats within a destination (for example, [Demand Gen - # ads](https://support.google.com/merchants/answer/13389785)). - class ReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reporting context values. - module ReportingContextEnum - # Not specified. - REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/merchants/answer/6149970). - SHOPPING_ADS = 1 - - # Deprecated: Use `DEMAND_GEN_ADS` instead. - # [Discovery and Demand Gen - # ads](https://support.google.com/merchants/answer/13389785). - DISCOVERY_ADS = 2 - - # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS = 13 - - # [Demand Gen ads on Discover - # surface](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 - - # [Video ads](https://support.google.com/google-ads/answer/6340491). - VIDEO_ADS = 3 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 4 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3271956). - LOCAL_INVENTORY_ADS = 5 - - # [Vehicle inventory - # ads](https://support.google.com/merchants/answer/11544533). - VEHICLE_INVENTORY_ADS = 6 - - # [Free product - # listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 7 - - # [Free product listings on UCP - # checkout](https://developers.google.com/merchant/ucp). - FREE_LISTINGS_UCP_CHECKOUT = 19 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 8 - - # [Free local vehicle - # listings](https://support.google.com/merchants/answer/11544533). - FREE_LOCAL_VEHICLE_LISTINGS = 9 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 18 - - # [YouTube - # Shopping](https://support.google.com/merchants/answer/13478370). - YOUTUBE_SHOPPING = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - - # [Product - # Reviews](https://support.google.com/merchants/answer/14620732). - PRODUCT_REVIEWS = 15 - - # [Merchant - # Reviews](https://developers.google.com/merchant-review-feeds). - MERCHANT_REVIEWS = 16 - - # YouTube Checkout - # . - YOUTUBE_CHECKOUT = 17 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/Gemfile deleted file mode 100644 index 2ec19bba9dbc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-lfp-v1beta", path: "../" -else - gem "google-shopping-merchant-lfp-v1beta" -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-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb deleted file mode 100644 index e2585705684c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpInventoryService_InsertLfpInventory_sync] -require "google/shopping/merchant/lfp/v1beta" - -## -# Snippet for the insert_lfp_inventory call in the LfpInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client#insert_lfp_inventory. -# -def insert_lfp_inventory - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new - - # Call the insert_lfp_inventory method. - result = client.insert_lfp_inventory request - - # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpInventory. - p result -end -# [END merchantapi_v1beta_generated_LfpInventoryService_InsertLfpInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb deleted file mode 100644 index 141678378df2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpMerchantStateService_GetLfpMerchantState_sync] -require "google/shopping/merchant/lfp/v1beta" - -## -# Snippet for the get_lfp_merchant_state call in the LfpMerchantStateService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client#get_lfp_merchant_state. -# -def get_lfp_merchant_state - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest.new - - # Call the get_lfp_merchant_state method. - result = client.get_lfp_merchant_state request - - # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState. - p result -end -# [END merchantapi_v1beta_generated_LfpMerchantStateService_GetLfpMerchantState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb deleted file mode 100644 index 9ab7a5e2d19b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpSaleService_InsertLfpSale_sync] -require "google/shopping/merchant/lfp/v1beta" - -## -# Snippet for the insert_lfp_sale call in the LfpSaleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client#insert_lfp_sale. -# -def insert_lfp_sale - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new - - # Call the insert_lfp_sale method. - result = client.insert_lfp_sale request - - # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpSale. - p result -end -# [END merchantapi_v1beta_generated_LfpSaleService_InsertLfpSale_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb deleted file mode 100644 index 02f91277cd57..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpStoreService_DeleteLfpStore_sync] -require "google/shopping/merchant/lfp/v1beta" - -## -# Snippet for the delete_lfp_store call in the LfpStoreService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#delete_lfp_store. -# -def delete_lfp_store - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new - - # Call the delete_lfp_store method. - result = client.delete_lfp_store request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_LfpStoreService_DeleteLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb deleted file mode 100644 index 724ea5eb612a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpStoreService_GetLfpStore_sync] -require "google/shopping/merchant/lfp/v1beta" - -## -# Snippet for the get_lfp_store call in the LfpStoreService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#get_lfp_store. -# -def get_lfp_store - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new - - # Call the get_lfp_store method. - result = client.get_lfp_store request - - # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - p result -end -# [END merchantapi_v1beta_generated_LfpStoreService_GetLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb deleted file mode 100644 index 1ba55bde4558..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpStoreService_InsertLfpStore_sync] -require "google/shopping/merchant/lfp/v1beta" - -## -# Snippet for the insert_lfp_store call in the LfpStoreService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#insert_lfp_store. -# -def insert_lfp_store - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new - - # Call the insert_lfp_store method. - result = client.insert_lfp_store request - - # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - p result -end -# [END merchantapi_v1beta_generated_LfpStoreService_InsertLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb deleted file mode 100644 index fedc94991d61..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.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 merchantapi_v1beta_generated_LfpStoreService_ListLfpStores_sync] -require "google/shopping/merchant/lfp/v1beta" - -## -# Snippet for the list_lfp_stores call in the LfpStoreService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#list_lfp_stores. -# -def list_lfp_stores - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new - - # Call the list_lfp_stores method. - result = client.list_lfp_stores request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - p item - end -end -# [END merchantapi_v1beta_generated_LfpStoreService_ListLfpStores_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/snippet_metadata_google.shopping.merchant.lfp.v1beta.json b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/snippet_metadata_google.shopping.merchant.lfp.v1beta.json deleted file mode 100644 index 7915b20b9fc9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/snippet_metadata_google.shopping.merchant.lfp.v1beta.json +++ /dev/null @@ -1,295 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-lfp-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.lfp.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_LfpInventoryService_InsertLfpInventory_sync", - "title": "Snippet for the insert_lfp_inventory call in the LfpInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client#insert_lfp_inventory.", - "file": "lfp_inventory_service/insert_lfp_inventory.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_lfp_inventory", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client#insert_lfp_inventory", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory", - "client": { - "short_name": "LfpInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client" - }, - "method": { - "short_name": "InsertLfpInventory", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpInventoryService.InsertLfpInventory", - "service": { - "short_name": "LfpInventoryService", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpMerchantStateService_GetLfpMerchantState_sync", - "title": "Snippet for the get_lfp_merchant_state call in the LfpMerchantStateService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client#get_lfp_merchant_state.", - "file": "lfp_merchant_state_service/get_lfp_merchant_state.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_lfp_merchant_state", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client#get_lfp_merchant_state", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState", - "client": { - "short_name": "LfpMerchantStateService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client" - }, - "method": { - "short_name": "GetLfpMerchantState", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpMerchantStateService.GetLfpMerchantState", - "service": { - "short_name": "LfpMerchantStateService", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpMerchantStateService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpSaleService_InsertLfpSale_sync", - "title": "Snippet for the insert_lfp_sale call in the LfpSaleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client#insert_lfp_sale.", - "file": "lfp_sale_service/insert_lfp_sale.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_lfp_sale", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client#insert_lfp_sale", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpSale", - "client": { - "short_name": "LfpSaleService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client" - }, - "method": { - "short_name": "InsertLfpSale", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpSaleService.InsertLfpSale", - "service": { - "short_name": "LfpSaleService", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpSaleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpStoreService_GetLfpStore_sync", - "title": "Snippet for the get_lfp_store call in the LfpStoreService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#get_lfp_store.", - "file": "lfp_store_service/get_lfp_store.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_lfp_store", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#get_lfp_store", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStore", - "client": { - "short_name": "LfpStoreService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client" - }, - "method": { - "short_name": "GetLfpStore", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService.GetLfpStore", - "service": { - "short_name": "LfpStoreService", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpStoreService_InsertLfpStore_sync", - "title": "Snippet for the insert_lfp_store call in the LfpStoreService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#insert_lfp_store.", - "file": "lfp_store_service/insert_lfp_store.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_lfp_store", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#insert_lfp_store", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStore", - "client": { - "short_name": "LfpStoreService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client" - }, - "method": { - "short_name": "InsertLfpStore", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService.InsertLfpStore", - "service": { - "short_name": "LfpStoreService", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpStoreService_DeleteLfpStore_sync", - "title": "Snippet for the delete_lfp_store call in the LfpStoreService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#delete_lfp_store.", - "file": "lfp_store_service/delete_lfp_store.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_lfp_store", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#delete_lfp_store", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "LfpStoreService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client" - }, - "method": { - "short_name": "DeleteLfpStore", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService.DeleteLfpStore", - "service": { - "short_name": "LfpStoreService", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpStoreService_ListLfpStores_sync", - "title": "Snippet for the list_lfp_stores call in the LfpStoreService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#list_lfp_stores.", - "file": "lfp_store_service/list_lfp_stores.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_lfp_stores", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#list_lfp_stores", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse", - "client": { - "short_name": "LfpStoreService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client" - }, - "method": { - "short_name": "ListLfpStores", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService.ListLfpStores", - "service": { - "short_name": "LfpStoreService", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService" - } - } - }, - "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-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb deleted file mode 100644 index da075914c662..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_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/shopping/merchant/lfp/v1beta/lfp_inventory_service" - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_lfp_inventory_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lfp_inventory_path account: "value0", target_merchant: "value1", store_code: "value2", offer: "value3" - assert_equal "accounts/value0/lfpInventories/value1~value2~value3", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb deleted file mode 100644 index 5fd18e3c0574..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_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/shopping/merchant/lfp/v1beta/lfpinventory_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" - - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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_insert_lfp_inventory - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_inventory = {} - - insert_lfp_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::ServiceStub.stub :transcode_insert_lfp_inventory_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_lfp_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_lfp_inventory ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_lfp_inventory(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_lfp_inventory_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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb deleted file mode 100644 index eaf377cb3e3a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_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/shopping/merchant/lfp/v1beta/lfpinventory_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service" - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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_insert_lfp_inventory - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_inventory = {} - - insert_lfp_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_lfp_inventory, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory), request["lfp_inventory"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_lfp_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_lfp_inventory ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_lfp_inventory(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_lfp_inventory_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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::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::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_paths_test.rb deleted file mode 100644 index 57e0727dc345..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_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/shopping/merchant/lfp/v1beta/lfp_merchant_state_service" - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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_lfp_merchant_state_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lfp_merchant_state_path account: "value0", lfp_merchant_state: "value1" - assert_equal "accounts/value0/lfpMerchantStates/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_rest_test.rb deleted file mode 100644 index 4e6971948bc4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_rest_test.rb +++ /dev/null @@ -1,153 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest" - - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_lfp_merchant_state - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lfp_merchant_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::ServiceStub.stub :transcode_get_lfp_merchant_state_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_lfp_merchant_state_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_lfp_merchant_state({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_lfp_merchant_state name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_lfp_merchant_state ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_lfp_merchant_state({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_lfp_merchant_state(::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_lfp_merchant_state_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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_test.rb deleted file mode 100644 index 4b8600bed807..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_test.rb +++ /dev/null @@ -1,162 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service" - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_lfp_merchant_state - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lfp_merchant_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_lfp_merchant_state, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_lfp_merchant_state_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_lfp_merchant_state({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_lfp_merchant_state name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_lfp_merchant_state ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_lfp_merchant_state({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_lfp_merchant_state(::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_lfp_merchant_state_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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb deleted file mode 100644 index e070ba66a8f6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_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/shopping/merchant/lfp/v1beta/lfp_sale_service" - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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_lfp_sale_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lfp_sale_path account: "value0", sale: "value1" - assert_equal "accounts/value0/lfpSales/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb deleted file mode 100644 index 00e3821042a2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_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/shopping/merchant/lfp/v1beta/lfpsale_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" - - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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_insert_lfp_sale - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_sale = {} - - insert_lfp_sale_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::ServiceStub.stub :transcode_insert_lfp_sale_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_lfp_sale_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_lfp_sale ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_lfp_sale(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_lfp_sale_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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb deleted file mode 100644 index f91812fe3eaf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_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/shopping/merchant/lfp/v1beta/lfpsale_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service" - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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_insert_lfp_sale - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_sale = {} - - insert_lfp_sale_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_lfp_sale, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale), request["lfp_sale"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_lfp_sale_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_lfp_sale ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_lfp_sale(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_lfp_sale_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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::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::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb deleted file mode 100644 index cd51f3f3b1b6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_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/shopping/merchant/lfp/v1beta/lfp_store_service" - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_lfp_store_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lfp_store_path account: "value0", target_merchant: "value1", store_code: "value2" - assert_equal "accounts/value0/lfpStores/value1~value2", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb deleted file mode 100644 index 938bb1acbf83..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb +++ /dev/null @@ -1,319 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/lfp/v1beta/lfpstore_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" - - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_lfp_store - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.stub :transcode_get_lfp_store_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_lfp_store({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_lfp_store name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_lfp_store({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_lfp_store_client_stub.call_count - end - end - end - - def test_insert_lfp_store - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_store = {} - - insert_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.stub :transcode_insert_lfp_store_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_lfp_store parent: parent, lfp_store: lfp_store do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_lfp_store_client_stub.call_count - end - end - end - - def test_delete_lfp_store - # 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_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.stub :transcode_delete_lfp_store_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_lfp_store({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_lfp_store name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_lfp_store({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_lfp_store_client_stub.call_count - end - end - end - - def test_list_lfp_stores - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - target_account = 42 - page_size = 42 - page_token = "hello world" - - list_lfp_stores_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.stub :transcode_list_lfp_stores_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_lfp_stores_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_lfp_stores parent: parent, target_account: target_account, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_lfp_stores ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new(parent: parent, target_account: target_account, 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_lfp_stores({ parent: parent, target_account: target_account, 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_lfp_stores(::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new(parent: parent, target_account: target_account, 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_lfp_stores_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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb deleted file mode 100644 index 5f2540ecd93b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb +++ /dev/null @@ -1,349 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service" - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_lfp_store - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_lfp_store, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_lfp_store({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_lfp_store name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_lfp_store({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_lfp_store_client_stub.call_rpc_count - end - end - - def test_insert_lfp_store - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_store = {} - - insert_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_lfp_store, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore), request["lfp_store"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_lfp_store parent: parent, lfp_store: lfp_store do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_lfp_store_client_stub.call_rpc_count - end - end - - def test_delete_lfp_store - # 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_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_lfp_store, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_lfp_store({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_lfp_store name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_lfp_store({ 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_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new(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_lfp_store_client_stub.call_rpc_count - end - end - - def test_list_lfp_stores - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - target_account = 42 - page_size = 42 - page_token = "hello world" - - list_lfp_stores_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_lfp_stores, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["target_account"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_lfp_stores_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: 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_lfp_stores parent: parent, target_account: target_account, page_size: page_size, page_token: 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_lfp_stores ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new(parent: parent, target_account: target_account, page_size: page_size, page_token: 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_lfp_stores({ parent: parent, target_account: target_account, 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_lfp_stores(::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new(parent: parent, target_account: target_account, 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_lfp_stores_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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::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::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/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-shopping-merchant-notifications-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-notifications-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-notifications-v1/.repo-metadata.json deleted file mode 100644 index 72fe215300e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-notifications-v1", - "distribution_name": "google-shopping-merchant-notifications-v1", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1 API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-notifications-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-notifications instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-notifications-v1/.rubocop.yml deleted file mode 100644 index c5974b408acf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-notifications-v1/.yardopts deleted file mode 100644 index dc7bbc10ae29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant 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-shopping-merchant-notifications-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-notifications-v1/AUTHENTICATION.md deleted file mode 100644 index 38ad4c1fb992..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-notifications-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-shopping-merchant-notifications-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/shopping/merchant/notifications/v1" - -client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/notifications/v1" - -::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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-shopping-merchant-notifications-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/shopping/merchant/notifications/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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-shopping-merchant-notifications-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-notifications-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-notifications-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-notifications-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/README.md b/owl-bot-staging/google-shopping-merchant-notifications-v1/README.md deleted file mode 100644 index fb15c9466375..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Merchant V1 API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1 API. Most users should consider using -the main client gem, -[google-shopping-merchant-notifications](https://rubygems.org/gems/google-shopping-merchant-notifications). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-notifications-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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/notifications/v1" - -client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new -request = ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new # (request fields as keyword arguments...) -response = client.get_notification_subscription request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-notifications-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/notifications/v1" -require "logger" - -client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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-shopping-merchant-notifications`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-notifications-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-shopping-merchant-notifications`. -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-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-notifications-v1/Rakefile deleted file mode 100644 index 39672e940e60..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-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/shopping/merchant/notifications/v1/notifications_api_service/credentials" - ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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-shopping-merchant-notifications-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-shopping-merchant-notifications-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-shopping-merchant-notifications-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-shopping-merchant-notifications-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-notifications-v1" - header "google-shopping-merchant-notifications-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-notifications-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-notifications-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-shopping-merchant-notifications-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-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-notifications-v1/gapic_metadata.json deleted file mode 100644 index 281f5890c6ac..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/gapic_metadata.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.notifications.v1", - "libraryPackage": "::Google::Shopping::Merchant::Notifications::V1", - "services": { - "NotificationsApiService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client", - "rpcs": { - "GetNotificationSubscription": { - "methods": [ - "get_notification_subscription" - ] - }, - "CreateNotificationSubscription": { - "methods": [ - "create_notification_subscription" - ] - }, - "UpdateNotificationSubscription": { - "methods": [ - "update_notification_subscription" - ] - }, - "DeleteNotificationSubscription": { - "methods": [ - "delete_notification_subscription" - ] - }, - "ListNotificationSubscriptions": { - "methods": [ - "list_notification_subscriptions" - ] - }, - "GetNotificationSubscriptionHealthMetrics": { - "methods": [ - "get_notification_subscription_health_metrics" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/google-shopping-merchant-notifications-v1.gemspec b/owl-bot-staging/google-shopping-merchant-notifications-v1/google-shopping-merchant-notifications-v1.gemspec deleted file mode 100644 index 224d0afaabbb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/google-shopping-merchant-notifications-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/notifications/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-notifications-v1" - gem.version = Google::Shopping::Merchant::Notifications::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-notifications-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-notifications instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center Accounts." - 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-shopping-merchant-notifications-v1/lib/google-shopping-merchant-notifications-v1.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google-shopping-merchant-notifications-v1.rb deleted file mode 100644 index c64e1071b846..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google-shopping-merchant-notifications-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/shopping/merchant/notifications/v1" diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1.rb deleted file mode 100644 index ced6dbda5b5f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/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/shopping/merchant/notifications/v1/notifications_api_service" -require "google/shopping/merchant/notifications/v1/version" - -module Google - module Shopping - module Merchant - module Notifications - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/notifications/v1" - # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/notifications/v1" - # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/merchant/notifications/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service.rb deleted file mode 100644 index 729bfaa11947..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/notifications/v1/version" - -require "google/shopping/merchant/notifications/v1/notifications_api_service/credentials" -require "google/shopping/merchant/notifications/v1/notifications_api_service/paths" -require "google/shopping/merchant/notifications/v1/notifications_api_service/client" -require "google/shopping/merchant/notifications/v1/notifications_api_service/rest" - -module Google - module Shopping - module Merchant - module Notifications - module V1 - ## - # Service to manage notification subscriptions for merchants - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/notifications/v1/notifications_api_service" - # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/notifications/v1/notifications_api_service/rest" - # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new - # - module NotificationsApiService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "notifications_api_service", "helpers.rb" -require "google/shopping/merchant/notifications/v1/notifications_api_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/client.rb deleted file mode 100644 index bd6fafaf06d0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/client.rb +++ /dev/null @@ -1,988 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/notifications/v1/notificationsapi_pb" - -module Google - module Shopping - module Merchant - module Notifications - module V1 - module NotificationsApiService - ## - # Client for the NotificationsApiService service. - # - # Service to manage notification subscriptions for merchants - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :notifications_api_service_stub - - ## - # Configure the NotificationsApiService Client class. - # - # See {::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all NotificationsApiService clients - # ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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", "Shopping", "Merchant", "Notifications", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the NotificationsApiService 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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 - @notifications_api_service_stub.universe_domain - end - - ## - # Create a new NotificationsApiService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the NotificationsApiService 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/shopping/merchant/notifications/v1/notificationsapi_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 - - @notifications_api_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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 - ) - - @notifications_api_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 - @notifications_api_service_stub.logger - end - - # Service calls - - ## - # Gets notification subscriptions for an account. - # - # @overload get_notification_subscription(request, options = nil) - # Pass arguments to `get_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_notification_subscription(name: nil) - # Pass arguments to `get_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` of the notification subscription. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new - # - # # Call the get_notification_subscription method. - # result = client.get_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. - # p result - # - def get_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_notification_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.call_rpc :get_notification_subscription, request, 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 notification subscription for a business. - # For standalone or subaccounts accounts, the business can create a - # subscription for self. For MCAs, the business can create a - # subscription for all managed accounts or for a specific subaccount. - # - # We will allow the following types of notification subscriptions to exist - # together (per business as a subscriber per event type): - # - # 1. Subscription for all managed accounts + subscription for self. - # - # 2. Multiple "partial" subscriptions for managed accounts + subscription - # for self. - # - # we will not allow (per business as a subscriber per event type): - # - # 1. Multiple self subscriptions. - # - # 2. Multiple "all managed accounts" subscriptions. - # - # 3. "All managed accounts" subscription and partial subscriptions at the - # same time. - # - # 4. Multiple partial subscriptions for the same target account. - # - # @overload create_notification_subscription(request, options = nil) - # Pass arguments to `create_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_notification_subscription(parent: nil, notification_subscription: nil) - # Pass arguments to `create_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that owns the new notification subscription. - # Format: `accounts/{account}` - # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription, ::Hash] - # Required. The notification subscription to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new - # - # # Call the create_notification_subscription method. - # result = client.create_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. - # p result - # - def create_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest - - # Converts hash and nil to 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_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_notification_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.call_rpc :create_notification_subscription, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing notification subscription for a merchant. - # - # @overload update_notification_subscription(request, options = nil) - # Pass arguments to `update_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_notification_subscription(notification_subscription: nil, update_mask: nil) - # Pass arguments to `update_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription, ::Hash] - # Required. The new version of the notification subscription that should be - # updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new - # - # # Call the update_notification_subscription method. - # result = client.update_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. - # p result - # - def update_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest - - # Converts hash and nil to 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_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.notification_subscription&.name - header_params["notification_subscription.name"] = request.notification_subscription.name - end - - request_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_notification_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.call_rpc :update_notification_subscription, request, 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 notification subscription for a merchant. - # - # @overload delete_notification_subscription(request, options = nil) - # Pass arguments to `delete_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_notification_subscription(name: nil) - # Pass arguments to `delete_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the notification subscription 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/shopping/merchant/notifications/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new - # - # # Call the delete_notification_subscription method. - # result = client.delete_notification_subscription request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_notification_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.call_rpc :delete_notification_subscription, request, 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 all the notification subscriptions for a merchant. - # - # @overload list_notification_subscriptions(request, options = nil) - # Pass arguments to `list_notification_subscriptions` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_notification_subscriptions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_notification_subscriptions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the notification subscriptions. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # The maximum number of notification subscriptions to return in a page. - # The default value for `page_size` is 100. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # @param page_token [::String] - # Token (if provided) to retrieve the subsequent page. All other parameters - # must match the original call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.new - # - # # Call the list_notification_subscriptions method. - # result = client.list_notification_subscriptions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. - # p item - # end - # - def list_notification_subscriptions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_notification_subscriptions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_notification_subscriptions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_notification_subscriptions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.call_rpc :list_notification_subscriptions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @notifications_api_service_stub, :list_notification_subscriptions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves notification subscription health metrics for a merchant. - # We recommend calling this periodically (hourly or daily) to monitor health - # of your callback endpoint. - # - # @overload get_notification_subscription_health_metrics(request, options = nil) - # Pass arguments to `get_notification_subscription_health_metrics` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_notification_subscription_health_metrics(name: nil) - # Pass arguments to `get_notification_subscription_health_metrics` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` of the notification subscription for which metrics are - # retrieved. - # Format: - # `accounts/{account}/notificationsubscriptions/{notification_subscription}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new - # - # # Call the get_notification_subscription_health_metrics method. - # result = client.get_notification_subscription_health_metrics request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics. - # p result - # - def get_notification_subscription_health_metrics request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_notification_subscription_health_metrics.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_notification_subscription_health_metrics.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_notification_subscription_health_metrics.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.call_rpc :get_notification_subscription_health_metrics, request, 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 NotificationsApiService API. - # - # This class represents the configuration for NotificationsApiService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_notification_subscription to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_notification_subscription.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_notification_subscription.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 NotificationsApiService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :get_notification_subscription - ## - # RPC-specific configuration for `create_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :create_notification_subscription - ## - # RPC-specific configuration for `update_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :update_notification_subscription - ## - # RPC-specific configuration for `delete_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_notification_subscription - ## - # RPC-specific configuration for `list_notification_subscriptions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_notification_subscriptions - ## - # RPC-specific configuration for `get_notification_subscription_health_metrics` - # @return [::Gapic::Config::Method] - # - attr_reader :get_notification_subscription_health_metrics - - # @private - def initialize parent_rpcs = nil - get_notification_subscription_config = parent_rpcs.get_notification_subscription if parent_rpcs.respond_to? :get_notification_subscription - @get_notification_subscription = ::Gapic::Config::Method.new get_notification_subscription_config - create_notification_subscription_config = parent_rpcs.create_notification_subscription if parent_rpcs.respond_to? :create_notification_subscription - @create_notification_subscription = ::Gapic::Config::Method.new create_notification_subscription_config - update_notification_subscription_config = parent_rpcs.update_notification_subscription if parent_rpcs.respond_to? :update_notification_subscription - @update_notification_subscription = ::Gapic::Config::Method.new update_notification_subscription_config - delete_notification_subscription_config = parent_rpcs.delete_notification_subscription if parent_rpcs.respond_to? :delete_notification_subscription - @delete_notification_subscription = ::Gapic::Config::Method.new delete_notification_subscription_config - list_notification_subscriptions_config = parent_rpcs.list_notification_subscriptions if parent_rpcs.respond_to? :list_notification_subscriptions - @list_notification_subscriptions = ::Gapic::Config::Method.new list_notification_subscriptions_config - get_notification_subscription_health_metrics_config = parent_rpcs.get_notification_subscription_health_metrics if parent_rpcs.respond_to? :get_notification_subscription_health_metrics - @get_notification_subscription_health_metrics = ::Gapic::Config::Method.new get_notification_subscription_health_metrics_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/credentials.rb deleted file mode 100644 index e5abb17f2d9b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_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 Shopping - module Merchant - module Notifications - module V1 - module NotificationsApiService - # Credentials for the NotificationsApiService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/paths.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/paths.rb deleted file mode 100644 index e414dcbea783..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/paths.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Notifications - module V1 - module NotificationsApiService - # Path helper methods for the NotificationsApiService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified NotificationSubscription resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/notificationsubscriptions/{notification_subscription}` - # - # @param account [String] - # @param notification_subscription [String] - # - # @return [::String] - def notification_subscription_path account:, notification_subscription: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/notificationsubscriptions/#{notification_subscription}" - end - - ## - # Create a fully-qualified NotificationSubscriptionHealthMetrics resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/notificationsubscriptions/{notification_subscription}` - # - # @param account [String] - # @param notification_subscription [String] - # - # @return [::String] - def notification_subscription_health_metrics_path account:, notification_subscription: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/notificationsubscriptions/#{notification_subscription}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest.rb deleted file mode 100644 index c4a23ae7dac0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_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/shopping/merchant/notifications/v1/version" - -require "google/shopping/merchant/notifications/v1/notifications_api_service/credentials" -require "google/shopping/merchant/notifications/v1/notifications_api_service/paths" -require "google/shopping/merchant/notifications/v1/notifications_api_service/rest/client" - -module Google - module Shopping - module Merchant - module Notifications - module V1 - ## - # Service to manage notification subscriptions for merchants - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/notifications/v1/notifications_api_service/rest" - # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new - # - module NotificationsApiService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/notifications/v1/notifications_api_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/client.rb deleted file mode 100644 index 4c730f78e8fd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/client.rb +++ /dev/null @@ -1,903 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/notifications/v1/notificationsapi_pb" -require "google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Notifications - module V1 - module NotificationsApiService - module Rest - ## - # REST client for the NotificationsApiService service. - # - # Service to manage notification subscriptions for merchants - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :notifications_api_service_stub - - ## - # Configure the NotificationsApiService Client class. - # - # See {::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all NotificationsApiService clients - # ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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", "Shopping", "Merchant", "Notifications", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the NotificationsApiService 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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 - @notifications_api_service_stub.universe_domain - end - - ## - # Create a new NotificationsApiService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the NotificationsApiService 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 - - @notifications_api_service_stub = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @notifications_api_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 - @notifications_api_service_stub.logger - end - - # Service calls - - ## - # Gets notification subscriptions for an account. - # - # @overload get_notification_subscription(request, options = nil) - # Pass arguments to `get_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_notification_subscription(name: nil) - # Pass arguments to `get_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` of the notification subscription. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new - # - # # Call the get_notification_subscription method. - # result = client.get_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. - # p result - # - def get_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_notification_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.get_notification_subscription request, 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 notification subscription for a business. - # For standalone or subaccounts accounts, the business can create a - # subscription for self. For MCAs, the business can create a - # subscription for all managed accounts or for a specific subaccount. - # - # We will allow the following types of notification subscriptions to exist - # together (per business as a subscriber per event type): - # - # 1. Subscription for all managed accounts + subscription for self. - # - # 2. Multiple "partial" subscriptions for managed accounts + subscription - # for self. - # - # we will not allow (per business as a subscriber per event type): - # - # 1. Multiple self subscriptions. - # - # 2. Multiple "all managed accounts" subscriptions. - # - # 3. "All managed accounts" subscription and partial subscriptions at the - # same time. - # - # 4. Multiple partial subscriptions for the same target account. - # - # @overload create_notification_subscription(request, options = nil) - # Pass arguments to `create_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_notification_subscription(parent: nil, notification_subscription: nil) - # Pass arguments to `create_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that owns the new notification subscription. - # Format: `accounts/{account}` - # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription, ::Hash] - # Required. The notification subscription to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new - # - # # Call the create_notification_subscription method. - # result = client.create_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. - # p result - # - def create_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest - - # Converts hash and nil to an 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_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_notification_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.create_notification_subscription request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing notification subscription for a merchant. - # - # @overload update_notification_subscription(request, options = nil) - # Pass arguments to `update_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_notification_subscription(notification_subscription: nil, update_mask: nil) - # Pass arguments to `update_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription, ::Hash] - # Required. The new version of the notification subscription that should be - # updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new - # - # # Call the update_notification_subscription method. - # result = client.update_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. - # p result - # - def update_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest - - # Converts hash and nil to an 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_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_notification_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.update_notification_subscription request, 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 notification subscription for a merchant. - # - # @overload delete_notification_subscription(request, options = nil) - # Pass arguments to `delete_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_notification_subscription(name: nil) - # Pass arguments to `delete_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the notification subscription 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/shopping/merchant/notifications/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new - # - # # Call the delete_notification_subscription method. - # result = client.delete_notification_subscription request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_notification_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.delete_notification_subscription request, 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 all the notification subscriptions for a merchant. - # - # @overload list_notification_subscriptions(request, options = nil) - # Pass arguments to `list_notification_subscriptions` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_notification_subscriptions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_notification_subscriptions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the notification subscriptions. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # The maximum number of notification subscriptions to return in a page. - # The default value for `page_size` is 100. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # @param page_token [::String] - # Token (if provided) to retrieve the subsequent page. All other parameters - # must match the original call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.new - # - # # Call the list_notification_subscriptions method. - # result = client.list_notification_subscriptions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. - # p item - # end - # - def list_notification_subscriptions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_notification_subscriptions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_notification_subscriptions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_notification_subscriptions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.list_notification_subscriptions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @notifications_api_service_stub, :list_notification_subscriptions, "notification_subscriptions", request, result, 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 notification subscription health metrics for a merchant. - # We recommend calling this periodically (hourly or daily) to monitor health - # of your callback endpoint. - # - # @overload get_notification_subscription_health_metrics(request, options = nil) - # Pass arguments to `get_notification_subscription_health_metrics` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_notification_subscription_health_metrics(name: nil) - # Pass arguments to `get_notification_subscription_health_metrics` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` of the notification subscription for which metrics are - # retrieved. - # Format: - # `accounts/{account}/notificationsubscriptions/{notification_subscription}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new - # - # # Call the get_notification_subscription_health_metrics method. - # result = client.get_notification_subscription_health_metrics request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics. - # p result - # - def get_notification_subscription_health_metrics request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_notification_subscription_health_metrics.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_notification_subscription_health_metrics.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_notification_subscription_health_metrics.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.get_notification_subscription_health_metrics request, 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 NotificationsApiService REST API. - # - # This class represents the configuration for NotificationsApiService 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_notification_subscription to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_notification_subscription.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_notification_subscription.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 NotificationsApiService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :get_notification_subscription - ## - # RPC-specific configuration for `create_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :create_notification_subscription - ## - # RPC-specific configuration for `update_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :update_notification_subscription - ## - # RPC-specific configuration for `delete_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_notification_subscription - ## - # RPC-specific configuration for `list_notification_subscriptions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_notification_subscriptions - ## - # RPC-specific configuration for `get_notification_subscription_health_metrics` - # @return [::Gapic::Config::Method] - # - attr_reader :get_notification_subscription_health_metrics - - # @private - def initialize parent_rpcs = nil - get_notification_subscription_config = parent_rpcs.get_notification_subscription if parent_rpcs.respond_to? :get_notification_subscription - @get_notification_subscription = ::Gapic::Config::Method.new get_notification_subscription_config - create_notification_subscription_config = parent_rpcs.create_notification_subscription if parent_rpcs.respond_to? :create_notification_subscription - @create_notification_subscription = ::Gapic::Config::Method.new create_notification_subscription_config - update_notification_subscription_config = parent_rpcs.update_notification_subscription if parent_rpcs.respond_to? :update_notification_subscription - @update_notification_subscription = ::Gapic::Config::Method.new update_notification_subscription_config - delete_notification_subscription_config = parent_rpcs.delete_notification_subscription if parent_rpcs.respond_to? :delete_notification_subscription - @delete_notification_subscription = ::Gapic::Config::Method.new delete_notification_subscription_config - list_notification_subscriptions_config = parent_rpcs.list_notification_subscriptions if parent_rpcs.respond_to? :list_notification_subscriptions - @list_notification_subscriptions = ::Gapic::Config::Method.new list_notification_subscriptions_config - get_notification_subscription_health_metrics_config = parent_rpcs.get_notification_subscription_health_metrics if parent_rpcs.respond_to? :get_notification_subscription_health_metrics - @get_notification_subscription_health_metrics = ::Gapic::Config::Method.new get_notification_subscription_health_metrics_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub.rb deleted file mode 100644 index cf1ad1bda74b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub.rb +++ /dev/null @@ -1,451 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/notifications/v1/notificationsapi_pb" - -module Google - module Shopping - module Merchant - module Notifications - module V1 - module NotificationsApiService - module Rest - ## - # REST service stub for the NotificationsApiService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # A result object deserialized from the server's reply - def get_notification_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_notification_subscription", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.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_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # A result object deserialized from the server's reply - def create_notification_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_notification_subscription", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.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_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # A result object deserialized from the server's reply - def update_notification_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_notification_subscription", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.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_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_notification_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_notification_subscription", - 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_notification_subscriptions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse] - # A result object deserialized from the server's reply - def list_notification_subscriptions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_subscriptions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_notification_subscriptions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_notification_subscription_health_metrics REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] - # A result object deserialized from the server's reply - def get_notification_subscription_health_metrics request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_subscription_health_metrics_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_notification_subscription_health_metrics", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_notification_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/notifications/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest] - # 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_notification_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/notifications/v1/{parent}/notificationsubscriptions", - body: "notification_subscription", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest] - # 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_notification_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/notifications/v1/{notification_subscription.name}", - body: "notification_subscription", - matches: [ - ["notification_subscription.name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_notification_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/notifications/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_notification_subscriptions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_notification_subscriptions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/notifications/v1/{parent}/notificationsubscriptions", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_notification_subscription_health_metrics REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_notification_subscription_health_metrics_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/notifications/v1/{name}:getHealth", - matches: [ - ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_pb.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_pb.rb deleted file mode 100644 index 3e68d9acf1ee..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/notifications/v1/notificationsapi.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n@google/shopping/merchant/notifications/v1/notificationsapi.proto\x12)google.shopping.merchant.notifications.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"o\n\"GetNotificationSubscriptionRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3merchantapi.googleapis.com/NotificationSubscription\"\xe1\x01\n%CreateNotificationSubscriptionRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33merchantapi.googleapis.com/NotificationSubscription\x12k\n\x19notification_subscription\x18\x02 \x01(\x0b\x32\x43.google.shopping.merchant.notifications.v1.NotificationSubscriptionB\x03\xe0\x41\x02\"\xc5\x01\n%UpdateNotificationSubscriptionRequest\x12k\n\x19notification_subscription\x18\x01 \x01(\x0b\x32\x43.google.shopping.merchant.notifications.v1.NotificationSubscriptionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"r\n%DeleteNotificationSubscriptionRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3merchantapi.googleapis.com/NotificationSubscription\"\x9a\x01\n$ListNotificationSubscriptionsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33merchantapi.googleapis.com/NotificationSubscription\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xa9\x01\n%ListNotificationSubscriptionsResponse\x12g\n\x1anotification_subscriptions\x18\x01 \x03(\x0b\x32\x43.google.shopping.merchant.notifications.v1.NotificationSubscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe6\x03\n\x18NotificationSubscription\x12\x1e\n\x14\x61ll_managed_accounts\x18\x03 \x01(\x08H\x00\x12\x18\n\x0etarget_account\x18\x04 \x01(\tH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12s\n\x10registered_event\x18\x02 \x01(\x0e\x32Y.google.shopping.merchant.notifications.v1.NotificationSubscription.NotificationEventType\x12\x15\n\rcall_back_uri\x18\x05 \x01(\t\"[\n\x15NotificationEventType\x12\'\n#NOTIFICATION_EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15PRODUCT_STATUS_CHANGE\x10\x01:\x82\x01\xea\x41\x7f\n3merchantapi.googleapis.com/NotificationSubscription\x12Haccounts/{account}/notificationsubscriptions/{notification_subscription}B\x0f\n\rinterested_in\"\x89\x01\n/GetNotificationSubscriptionHealthMetricsRequest\x12V\n\x04name\x18\x01 \x01(\tBH\xe0\x41\x02\xfa\x41\x42\n@merchantapi.googleapis.com/NotificationSubscriptionHealthMetrics\"\xcd\x02\n%NotificationSubscriptionHealthMetrics\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12#\n\x1b\x61\x63knowledged_messages_count\x18\x02 \x01(\x03\x12\"\n\x1aundelivered_messages_count\x18\x03 \x01(\x03\x12\x32\n*oldest_unacknowledged_message_waiting_time\x18\x04 \x01(\x03:\x90\x01\xea\x41\x8c\x01\n@merchantapi.googleapis.com/NotificationSubscriptionHealthMetrics\x12Haccounts/{account}/notificationsubscriptions/{notification_subscription}2\xb2\x0e\n\x17NotificationsApiService\x12\x81\x02\n\x1bGetNotificationSubscription\x12M.google.shopping.merchant.notifications.v1.GetNotificationSubscriptionRequest\x1a\x43.google.shopping.merchant.notifications.v1.NotificationSubscription\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/notifications/v1/{name=accounts/*/notificationsubscriptions/*}\x12\xbf\x02\n\x1e\x43reateNotificationSubscription\x12P.google.shopping.merchant.notifications.v1.CreateNotificationSubscriptionRequest\x1a\x43.google.shopping.merchant.notifications.v1.NotificationSubscription\"\x85\x01\xda\x41 parent,notification_subscription\x82\xd3\xe4\x93\x02\\\"?/notifications/v1/{parent=accounts/*}/notificationsubscriptions:\x19notification_subscription\x12\xde\x02\n\x1eUpdateNotificationSubscription\x12P.google.shopping.merchant.notifications.v1.UpdateNotificationSubscriptionRequest\x1a\x43.google.shopping.merchant.notifications.v1.NotificationSubscription\"\xa4\x01\xda\x41%notification_subscription,update_mask\x82\xd3\xe4\x93\x02v2Y/notifications/v1/{notification_subscription.name=accounts/*/notificationsubscriptions/*}:\x19notification_subscription\x12\xda\x01\n\x1e\x44\x65leteNotificationSubscription\x12P.google.shopping.merchant.notifications.v1.DeleteNotificationSubscriptionRequest\x1a\x16.google.protobuf.Empty\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/notifications/v1/{name=accounts/*/notificationsubscriptions/*}\x12\x94\x02\n\x1dListNotificationSubscriptions\x12O.google.shopping.merchant.notifications.v1.ListNotificationSubscriptionsRequest\x1aP.google.shopping.merchant.notifications.v1.ListNotificationSubscriptionsResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/notifications/v1/{parent=accounts/*}/notificationsubscriptions\x12\xb2\x02\n(GetNotificationSubscriptionHealthMetrics\x12Z.google.shopping.merchant.notifications.v1.GetNotificationSubscriptionHealthMetricsRequest\x1aP.google.shopping.merchant.notifications.v1.NotificationSubscriptionHealthMetrics\"X\xda\x41\x04name\x82\xd3\xe4\x93\x02K\x12I/notifications/v1/{name=accounts/*/notificationsubscriptions/*}:getHealth\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xe6\x02\n-com.google.shopping.merchant.notifications.v1B\x15NotificationsApiProtoP\x01ZYcloud.google.com/go/shopping/merchant/notifications/apiv1/notificationspb;notificationspb\xaa\x02)Google.Shopping.Merchant.Notifications.V1\xca\x02)Google\\Shopping\\Merchant\\Notifications\\V1\xea\x02-Google::Shopping::Merchant::Notifications::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Notifications - module V1 - GetNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.GetNotificationSubscriptionRequest").msgclass - CreateNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.CreateNotificationSubscriptionRequest").msgclass - UpdateNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.UpdateNotificationSubscriptionRequest").msgclass - DeleteNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.DeleteNotificationSubscriptionRequest").msgclass - ListNotificationSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.ListNotificationSubscriptionsRequest").msgclass - ListNotificationSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.ListNotificationSubscriptionsResponse").msgclass - NotificationSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.NotificationSubscription").msgclass - NotificationSubscription::NotificationEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.NotificationSubscription.NotificationEventType").enummodule - GetNotificationSubscriptionHealthMetricsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.GetNotificationSubscriptionHealthMetricsRequest").msgclass - NotificationSubscriptionHealthMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.NotificationSubscriptionHealthMetrics").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_services_pb.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_services_pb.rb deleted file mode 100644 index cba98b6bbebc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_services_pb.rb +++ /dev/null @@ -1,81 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/notifications/v1/notificationsapi.proto for package 'Google.Shopping.Merchant.Notifications.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/shopping/merchant/notifications/v1/notificationsapi_pb' - -module Google - module Shopping - module Merchant - module Notifications - module V1 - module NotificationsApiService - # Service to manage notification subscriptions for merchants - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.notifications.v1.NotificationsApiService' - - # Gets notification subscriptions for an account. - rpc :GetNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription - # Creates a notification subscription for a business. - # For standalone or subaccounts accounts, the business can create a - # subscription for self. For MCAs, the business can create a - # subscription for all managed accounts or for a specific subaccount. - # - # We will allow the following types of notification subscriptions to exist - # together (per business as a subscriber per event type): - # - # 1. Subscription for all managed accounts + subscription for self. - # - # 2. Multiple "partial" subscriptions for managed accounts + subscription - # for self. - # - # we will not allow (per business as a subscriber per event type): - # - # 1. Multiple self subscriptions. - # - # 2. Multiple "all managed accounts" subscriptions. - # - # 3. "All managed accounts" subscription and partial subscriptions at the - # same time. - # - # 4. Multiple partial subscriptions for the same target account. - rpc :CreateNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription - # Updates an existing notification subscription for a merchant. - rpc :UpdateNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription - # Deletes a notification subscription for a merchant. - rpc :DeleteNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest, ::Google::Protobuf::Empty - # Gets all the notification subscriptions for a merchant. - rpc :ListNotificationSubscriptions, ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest, ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse - # Retrieves notification subscription health metrics for a merchant. - # We recommend calling this periodically (hourly or daily) to monitor health - # of your callback endpoint. - rpc :GetNotificationSubscriptionHealthMetrics, ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest, ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/rest.rb deleted file mode 100644 index 3e437250fcea..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/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/shopping/merchant/notifications/v1/notifications_api_service/rest" -require "google/shopping/merchant/notifications/v1/version" - -module Google - module Shopping - module Merchant - module Notifications - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/notifications/v1/rest" - # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/version.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/version.rb deleted file mode 100644 index 4da1227893b0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/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 Shopping - module Merchant - module Notifications - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/README.md deleted file mode 100644 index 110adc2cf42e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant 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-shopping-merchant-notifications-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/proto_docs/google/shopping/merchant/notifications/v1/notificationsapi.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/shopping/merchant/notifications/v1/notificationsapi.rb deleted file mode 100644 index a8c8ee14d999..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/proto_docs/google/shopping/merchant/notifications/v1/notificationsapi.rb +++ /dev/null @@ -1,184 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Notifications - module V1 - # Request message for the GetNotificationSubscription method. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` of the notification subscription. - class GetNotificationSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateNotificationSubscription method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account that owns the new notification subscription. - # Format: `accounts/{account}` - # @!attribute [rw] notification_subscription - # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # Required. The notification subscription to create. - class CreateNotificationSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateNotificationSubscription method. - # @!attribute [rw] notification_subscription - # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] - # Required. The new version of the notification subscription that should be - # updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # List of fields being updated. - class UpdateNotificationSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteNotificationSubscription method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the notification subscription to be deleted. - class DeleteNotificationSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListNotificationSubscription method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account who owns the notification subscriptions. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of notification subscriptions to return in a page. - # The default value for `page_size` is 100. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # @!attribute [rw] page_token - # @return [::String] - # Token (if provided) to retrieve the subsequent page. All other parameters - # must match the original call that provided the page token. - class ListNotificationSubscriptionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListNotificationSubscription method. - # @!attribute [rw] notification_subscriptions - # @return [::Array<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>] - # The list of notification subscriptions requested by the merchant. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListNotificationSubscriptionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a notification subscription owned by a Merchant account. - # @!attribute [rw] all_managed_accounts - # @return [::Boolean] - # If this value is true, the requesting account is notified of the - # specified event for all managed accounts (can be subaccounts or other - # linked accounts) including newly added accounts on a daily basis. - # - # Note: The following fields are mutually exclusive: `all_managed_accounts`, `target_account`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] target_account - # @return [::String] - # The `name` of the account you want to receive notifications for. - # Format: `accounts/{account}` - # - # Note: The following fields are mutually exclusive: `target_account`, `all_managed_accounts`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] name - # @return [::String] - # Output only. The `name` of the notification configuration. Generated by the - # Content API upon creation of a new `NotificationSubscription`. The - # `account` represents the merchant ID of the merchant that owns the - # configuration. Format: - # `accounts/{account}/notificationsubscriptions/{notification_subscription}` - # @!attribute [rw] registered_event - # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription::NotificationEventType] - # The event that the merchant wants to be notified about. - # @!attribute [rw] call_back_uri - # @return [::String] - # URL to be used to push the notification to the merchant. - class NotificationSubscription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the event type that the merchant is interested in receiving - # notifications for. - module NotificationEventType - # Notifications event type is unspecified. - NOTIFICATION_EVENT_TYPE_UNSPECIFIED = 0 - - # Notification of product status changes, for example when product becomes - # disapproved. - PRODUCT_STATUS_CHANGE = 1 - end - end - - # Request for notification subscription health metrics. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` of the notification subscription for which metrics are - # retrieved. - # Format: - # `accounts/{account}/notificationsubscriptions/{notification_subscription}` - class GetNotificationSubscriptionHealthMetricsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a notification subscription health metrics. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The name of the notification configuration. - # Generated by the Content API upon creation of a new - # NotificationSubscription. The account represents the merchant ID of the - # merchant that owns the configuration. - # @!attribute [rw] acknowledged_messages_count - # @return [::Integer] - # The number of retained acknowledged messages for the last 24 hours - # @!attribute [rw] undelivered_messages_count - # @return [::Integer] - # The number of unacknowledged messages for the last 7 days, we will attempt - # to re-deliver the unacknowledged message later and once successfully - # delivered it will not be counted within unacknowledged messages (the number - # of unacknowledged messages should gradually decrease to zero once the issue - # is fixed). - # @!attribute [rw] oldest_unacknowledged_message_waiting_time - # @return [::Integer] - # The time since the oldest unacknowledged message was sent in seconds - class NotificationSubscriptionHealthMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/Gemfile deleted file mode 100644 index 960aba6e86ed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1", path: "../" -else - gem "google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1/snippets/notifications_api_service/create_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/create_notification_subscription.rb deleted file mode 100644 index d3a2b04118d1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/create_notification_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_NotificationsApiService_CreateNotificationSubscription_sync] -require "google/shopping/merchant/notifications/v1" - -## -# Snippet for the create_notification_subscription call in the NotificationsApiService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#create_notification_subscription. -# -def create_notification_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new - - # Call the create_notification_subscription method. - result = client.create_notification_subscription request - - # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. - p result -end -# [END merchantapi_v1_generated_NotificationsApiService_CreateNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/delete_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/delete_notification_subscription.rb deleted file mode 100644 index e961584dafda..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/delete_notification_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_NotificationsApiService_DeleteNotificationSubscription_sync] -require "google/shopping/merchant/notifications/v1" - -## -# Snippet for the delete_notification_subscription call in the NotificationsApiService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#delete_notification_subscription. -# -def delete_notification_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new - - # Call the delete_notification_subscription method. - result = client.delete_notification_subscription request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_NotificationsApiService_DeleteNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription.rb deleted file mode 100644 index ddc49357f143..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscription_sync] -require "google/shopping/merchant/notifications/v1" - -## -# Snippet for the get_notification_subscription call in the NotificationsApiService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription. -# -def get_notification_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new - - # Call the get_notification_subscription method. - result = client.get_notification_subscription request - - # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. - p result -end -# [END merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription_health_metrics.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription_health_metrics.rb deleted file mode 100644 index 72354ecda181..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription_health_metrics.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscriptionHealthMetrics_sync] -require "google/shopping/merchant/notifications/v1" - -## -# Snippet for the get_notification_subscription_health_metrics call in the NotificationsApiService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription_health_metrics. -# -def get_notification_subscription_health_metrics - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new - - # Call the get_notification_subscription_health_metrics method. - result = client.get_notification_subscription_health_metrics request - - # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics. - p result -end -# [END merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscriptionHealthMetrics_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/list_notification_subscriptions.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/list_notification_subscriptions.rb deleted file mode 100644 index c52981db27c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/list_notification_subscriptions.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 merchantapi_v1_generated_NotificationsApiService_ListNotificationSubscriptions_sync] -require "google/shopping/merchant/notifications/v1" - -## -# Snippet for the list_notification_subscriptions call in the NotificationsApiService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#list_notification_subscriptions. -# -def list_notification_subscriptions - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.new - - # Call the list_notification_subscriptions method. - result = client.list_notification_subscriptions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. - p item - end -end -# [END merchantapi_v1_generated_NotificationsApiService_ListNotificationSubscriptions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/update_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/update_notification_subscription.rb deleted file mode 100644 index 6ed730e3a5e3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/update_notification_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_NotificationsApiService_UpdateNotificationSubscription_sync] -require "google/shopping/merchant/notifications/v1" - -## -# Snippet for the update_notification_subscription call in the NotificationsApiService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#update_notification_subscription. -# -def update_notification_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new - - # Call the update_notification_subscription method. - result = client.update_notification_subscription request - - # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. - p result -end -# [END merchantapi_v1_generated_NotificationsApiService_UpdateNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json b/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json deleted file mode 100644 index da3479d90d3c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-notifications-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.notifications.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscription_sync", - "title": "Snippet for the get_notification_subscription call in the NotificationsApiService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription.", - "file": "notifications_api_service/get_notification_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_notification_subscription", - "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription", - "client": { - "short_name": "NotificationsApiService::Client", - "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" - }, - "method": { - "short_name": "GetNotificationSubscription", - "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.GetNotificationSubscription", - "service": { - "short_name": "NotificationsApiService", - "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_NotificationsApiService_CreateNotificationSubscription_sync", - "title": "Snippet for the create_notification_subscription call in the NotificationsApiService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#create_notification_subscription.", - "file": "notifications_api_service/create_notification_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_notification_subscription", - "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#create_notification_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription", - "client": { - "short_name": "NotificationsApiService::Client", - "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" - }, - "method": { - "short_name": "CreateNotificationSubscription", - "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.CreateNotificationSubscription", - "service": { - "short_name": "NotificationsApiService", - "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_NotificationsApiService_UpdateNotificationSubscription_sync", - "title": "Snippet for the update_notification_subscription call in the NotificationsApiService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#update_notification_subscription.", - "file": "notifications_api_service/update_notification_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_notification_subscription", - "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#update_notification_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription", - "client": { - "short_name": "NotificationsApiService::Client", - "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" - }, - "method": { - "short_name": "UpdateNotificationSubscription", - "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.UpdateNotificationSubscription", - "service": { - "short_name": "NotificationsApiService", - "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_NotificationsApiService_DeleteNotificationSubscription_sync", - "title": "Snippet for the delete_notification_subscription call in the NotificationsApiService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#delete_notification_subscription.", - "file": "notifications_api_service/delete_notification_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_notification_subscription", - "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#delete_notification_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "NotificationsApiService::Client", - "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" - }, - "method": { - "short_name": "DeleteNotificationSubscription", - "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.DeleteNotificationSubscription", - "service": { - "short_name": "NotificationsApiService", - "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_NotificationsApiService_ListNotificationSubscriptions_sync", - "title": "Snippet for the list_notification_subscriptions call in the NotificationsApiService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#list_notification_subscriptions.", - "file": "notifications_api_service/list_notification_subscriptions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_notification_subscriptions", - "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#list_notification_subscriptions", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse", - "client": { - "short_name": "NotificationsApiService::Client", - "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" - }, - "method": { - "short_name": "ListNotificationSubscriptions", - "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.ListNotificationSubscriptions", - "service": { - "short_name": "NotificationsApiService", - "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscriptionHealthMetrics_sync", - "title": "Snippet for the get_notification_subscription_health_metrics call in the NotificationsApiService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription_health_metrics.", - "file": "notifications_api_service/get_notification_subscription_health_metrics.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_notification_subscription_health_metrics", - "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription_health_metrics", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics", - "client": { - "short_name": "NotificationsApiService::Client", - "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" - }, - "method": { - "short_name": "GetNotificationSubscriptionHealthMetrics", - "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.GetNotificationSubscriptionHealthMetrics", - "service": { - "short_name": "NotificationsApiService", - "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" - } - } - }, - "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-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_paths_test.rb deleted file mode 100644 index 068026b3f458..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_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/shopping/merchant/notifications/v1/notifications_api_service" - -class ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_notification_subscription_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.notification_subscription_path account: "value0", notification_subscription: "value1" - assert_equal "accounts/value0/notificationsubscriptions/value1", path - end - end - - def test_notification_subscription_health_metrics_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.notification_subscription_health_metrics_path account: "value0", notification_subscription: "value1" - assert_equal "accounts/value0/notificationsubscriptions/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_rest_test.rb deleted file mode 100644 index 534cf6785ceb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/notifications/v1/notificationsapi_pb" -require "google/shopping/merchant/notifications/v1/notifications_api_service/rest" - - -class ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_notification_subscription - # Create test objects. - client_result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_get_notification_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_notification_subscription({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_notification_subscription name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_notification_subscription({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_notification_subscription_client_stub.call_count - end - end - end - - def test_create_notification_subscription - # Create test objects. - client_result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - notification_subscription = {} - - create_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_create_notification_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_notification_subscription parent: parent, notification_subscription: notification_subscription do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_notification_subscription_client_stub.call_count - end - end - end - - def test_update_notification_subscription - # Create test objects. - client_result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - notification_subscription = {} - update_mask = {} - - update_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_update_notification_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_notification_subscription notification_subscription: notification_subscription, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_notification_subscription_client_stub.call_count - end - end - end - - def test_delete_notification_subscription - # 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_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_delete_notification_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_notification_subscription({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_notification_subscription name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_notification_subscription({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_notification_subscription_client_stub.call_count - end - end - end - - def test_list_notification_subscriptions - # Create test objects. - client_result = ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse.new - http_response = OpenStruct.new 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_notification_subscriptions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_list_notification_subscriptions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_notification_subscriptions_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_notification_subscriptions({ 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_notification_subscriptions 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_notification_subscriptions ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.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_notification_subscriptions({ 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_notification_subscriptions(::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.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_notification_subscriptions_client_stub.call_count - end - end - end - - def test_get_notification_subscription_health_metrics - # Create test objects. - client_result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_notification_subscription_health_metrics_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_get_notification_subscription_health_metrics_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_notification_subscription_health_metrics_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_notification_subscription_health_metrics({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_notification_subscription_health_metrics name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_notification_subscription_health_metrics ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_notification_subscription_health_metrics({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_notification_subscription_health_metrics(::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_notification_subscription_health_metrics_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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb deleted file mode 100644 index 98cb610b8daa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb +++ /dev/null @@ -1,465 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/notifications/v1/notificationsapi_pb" -require "google/shopping/merchant/notifications/v1/notifications_api_service" - -class ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_notification_subscription - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_notification_subscription, name - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_notification_subscription({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_notification_subscription name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_notification_subscription({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_notification_subscription_client_stub.call_rpc_count - end - end - - def test_create_notification_subscription - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - notification_subscription = {} - - create_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_notification_subscription, name - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription), request["notification_subscription"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_notification_subscription parent: parent, notification_subscription: notification_subscription do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_notification_subscription_client_stub.call_rpc_count - end - end - - def test_update_notification_subscription - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - notification_subscription = {} - update_mask = {} - - update_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_notification_subscription, name - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription), request["notification_subscription"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_notification_subscription notification_subscription: notification_subscription, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, 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_notification_subscription({ notification_subscription: notification_subscription, 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_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, 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_notification_subscription_client_stub.call_rpc_count - end - end - - def test_delete_notification_subscription - # 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_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_notification_subscription, name - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_notification_subscription({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_notification_subscription name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_notification_subscription({ 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_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new(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_notification_subscription_client_stub.call_rpc_count - end - end - - def test_list_notification_subscriptions - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_notification_subscriptions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_notification_subscriptions, name - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest, 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_notification_subscriptions_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_notification_subscriptions({ 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_notification_subscriptions 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_notification_subscriptions ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.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_notification_subscriptions({ 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_notification_subscriptions(::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.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_notification_subscriptions_client_stub.call_rpc_count - end - end - - def test_get_notification_subscription_health_metrics - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_notification_subscription_health_metrics_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_notification_subscription_health_metrics, name - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_notification_subscription_health_metrics_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_notification_subscription_health_metrics({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_notification_subscription_health_metrics name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_notification_subscription_health_metrics ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_notification_subscription_health_metrics({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_notification_subscription_health_metrics(::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_notification_subscription_health_metrics_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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-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-shopping-merchant-notifications-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.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-shopping-merchant-notifications-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.repo-metadata.json deleted file mode 100644 index f46b21050567..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-notifications-v1beta", - "distribution_name": "google-shopping-merchant-notifications-v1beta", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1BETA API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-notifications-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-notifications instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.rubocop.yml deleted file mode 100644 index 4befa09072a1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-notifications-v1beta.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-shopping-merchant-notifications-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.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-shopping-merchant-notifications-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant V1BETA 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-shopping-merchant-notifications-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/AUTHENTICATION.md deleted file mode 100644 index 88d0015bde4b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-notifications-v1beta 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-shopping-merchant-notifications-v1beta 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/shopping/merchant/notifications/v1beta" - -client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/notifications/v1beta" - -::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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-shopping-merchant-notifications-v1beta -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/shopping/merchant/notifications/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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-shopping-merchant-notifications-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/README.md deleted file mode 100644 index 7c0bb0a9d626..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Merchant V1BETA API - -Programmatically manage your Merchant Center accounts. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1BETA API. Most users should consider using -the main client gem, -[google-shopping-merchant-notifications](https://rubygems.org/gems/google-shopping-merchant-notifications). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-notifications-v1beta -``` - -## 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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/notifications/v1beta" - -client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new -request = ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new # (request fields as keyword arguments...) -response = client.get_notification_subscription request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-notifications-v1beta) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/notifications/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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-shopping-merchant-notifications`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-notifications-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-shopping-merchant-notifications`. -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-shopping-merchant-notifications-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Rakefile deleted file mode 100644 index ecbbd459a9d4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta 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/shopping/merchant/notifications/v1beta/notifications_api_service/credentials" - ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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-shopping-merchant-notifications-v1beta 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-shopping-merchant-notifications-v1beta 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-shopping-merchant-notifications-v1beta 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-shopping-merchant-notifications-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-notifications-v1beta" - header "google-shopping-merchant-notifications-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-notifications-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-notifications-v1beta 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-shopping-merchant-notifications-v1beta 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-shopping-merchant-notifications-v1beta 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-shopping-merchant-notifications-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/gapic_metadata.json deleted file mode 100644 index bf7527d699f0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/gapic_metadata.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.notifications.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Notifications::V1beta", - "services": { - "NotificationsApiService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client", - "rpcs": { - "GetNotificationSubscription": { - "methods": [ - "get_notification_subscription" - ] - }, - "CreateNotificationSubscription": { - "methods": [ - "create_notification_subscription" - ] - }, - "UpdateNotificationSubscription": { - "methods": [ - "update_notification_subscription" - ] - }, - "DeleteNotificationSubscription": { - "methods": [ - "delete_notification_subscription" - ] - }, - "ListNotificationSubscriptions": { - "methods": [ - "list_notification_subscriptions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec deleted file mode 100644 index 3afef6869bec..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/notifications/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-notifications-v1beta" - gem.version = Google::Shopping::Merchant::Notifications::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-notifications-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-notifications instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center accounts." - 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-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google-shopping-merchant-notifications-v1beta.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google-shopping-merchant-notifications-v1beta.rb deleted file mode 100644 index 251e43d31d75..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google-shopping-merchant-notifications-v1beta.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/shopping/merchant/notifications/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta.rb deleted file mode 100644 index a73afc6705d9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/notifications/v1beta/notifications_api_service" -require "google/shopping/merchant/notifications/v1beta/version" - -module Google - module Shopping - module Merchant - module Notifications - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/notifications/v1beta" - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/notifications/v1beta" - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/notifications/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb deleted file mode 100644 index 52fc96175eb2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/notifications/v1beta/version" - -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/paths" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/client" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - ## - # Service to manage notification subscriptions for merchants - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/notifications/v1beta/notifications_api_service" - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - module NotificationsApiService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "notifications_api_service", "helpers.rb" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb deleted file mode 100644 index 0edd74d9ff4a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb +++ /dev/null @@ -1,880 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/notifications/v1beta/notificationsapi_pb" - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - module NotificationsApiService - ## - # Client for the NotificationsApiService service. - # - # Service to manage notification subscriptions for merchants - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :notifications_api_service_stub - - ## - # Configure the NotificationsApiService Client class. - # - # See {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all NotificationsApiService clients - # ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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", "Shopping", "Merchant", "Notifications", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the NotificationsApiService 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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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 - @notifications_api_service_stub.universe_domain - end - - ## - # Create a new NotificationsApiService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the NotificationsApiService 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/shopping/merchant/notifications/v1beta/notificationsapi_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 - - @notifications_api_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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 - ) - - @notifications_api_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 - @notifications_api_service_stub.logger - end - - # Service calls - - ## - # Gets notification subscriptions for an account. - # - # @overload get_notification_subscription(request, options = nil) - # Pass arguments to `get_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_notification_subscription(name: nil) - # Pass arguments to `get_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` of the notification subscription. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new - # - # # Call the get_notification_subscription method. - # result = client.get_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - # p result - # - def get_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_notification_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.call_rpc :get_notification_subscription, request, 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 notification subscription for a merchant. We will allow the - # following types of notification subscriptions to exist together (per - # merchant as a subscriber per event type): - # 1. Subscription for all managed accounts + subscription for self - # 2. Multiple "partial" subscriptions for managed accounts + subscription - # for self - # - # we will not allow (per merchant as a subscriber per event type): - # 1. multiple self subscriptions. - # 2. multiple "all managed accounts" subscriptions. - # 3. all and partial subscriptions at the same time. - # 4. multiple partial subscriptions for the same target account - # - # @overload create_notification_subscription(request, options = nil) - # Pass arguments to `create_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_notification_subscription(parent: nil, notification_subscription: nil) - # Pass arguments to `create_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that owns the new notification subscription. - # Format: `accounts/{account}` - # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription, ::Hash] - # Required. The notification subscription to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new - # - # # Call the create_notification_subscription method. - # result = client.create_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - # p result - # - def create_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest - - # Converts hash and nil to 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_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_notification_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.call_rpc :create_notification_subscription, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing notification subscription for a merchant. - # - # @overload update_notification_subscription(request, options = nil) - # Pass arguments to `update_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_notification_subscription(notification_subscription: nil, update_mask: nil) - # Pass arguments to `update_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription, ::Hash] - # Required. The new version of the notification subscription that should be - # updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new - # - # # Call the update_notification_subscription method. - # result = client.update_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - # p result - # - def update_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest - - # Converts hash and nil to 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_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.notification_subscription&.name - header_params["notification_subscription.name"] = request.notification_subscription.name - end - - request_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_notification_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.call_rpc :update_notification_subscription, request, 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 notification subscription for a merchant. - # - # @overload delete_notification_subscription(request, options = nil) - # Pass arguments to `delete_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_notification_subscription(name: nil) - # Pass arguments to `delete_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the notification subscription 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/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new - # - # # Call the delete_notification_subscription method. - # result = client.delete_notification_subscription request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_notification_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.call_rpc :delete_notification_subscription, request, 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 all the notification subscriptions for a merchant. - # - # @overload list_notification_subscriptions(request, options = nil) - # Pass arguments to `list_notification_subscriptions` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_notification_subscriptions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_notification_subscriptions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the notification subscriptions. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # The maximum number of notification subscriptions to return in a page. - # The default value for `page_size` is 100. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # @param page_token [::String] - # Token (if provided) to retrieve the subsequent page. All other parameters - # must match the original call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new - # - # # Call the list_notification_subscriptions method. - # result = client.list_notification_subscriptions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - # p item - # end - # - def list_notification_subscriptions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_notification_subscriptions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_notification_subscriptions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_notification_subscriptions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.call_rpc :list_notification_subscriptions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @notifications_api_service_stub, :list_notification_subscriptions, 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 NotificationsApiService API. - # - # This class represents the configuration for NotificationsApiService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_notification_subscription to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_notification_subscription.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_notification_subscription.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 NotificationsApiService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :get_notification_subscription - ## - # RPC-specific configuration for `create_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :create_notification_subscription - ## - # RPC-specific configuration for `update_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :update_notification_subscription - ## - # RPC-specific configuration for `delete_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_notification_subscription - ## - # RPC-specific configuration for `list_notification_subscriptions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_notification_subscriptions - - # @private - def initialize parent_rpcs = nil - get_notification_subscription_config = parent_rpcs.get_notification_subscription if parent_rpcs.respond_to? :get_notification_subscription - @get_notification_subscription = ::Gapic::Config::Method.new get_notification_subscription_config - create_notification_subscription_config = parent_rpcs.create_notification_subscription if parent_rpcs.respond_to? :create_notification_subscription - @create_notification_subscription = ::Gapic::Config::Method.new create_notification_subscription_config - update_notification_subscription_config = parent_rpcs.update_notification_subscription if parent_rpcs.respond_to? :update_notification_subscription - @update_notification_subscription = ::Gapic::Config::Method.new update_notification_subscription_config - delete_notification_subscription_config = parent_rpcs.delete_notification_subscription if parent_rpcs.respond_to? :delete_notification_subscription - @delete_notification_subscription = ::Gapic::Config::Method.new delete_notification_subscription_config - list_notification_subscriptions_config = parent_rpcs.list_notification_subscriptions if parent_rpcs.respond_to? :list_notification_subscriptions - @list_notification_subscriptions = ::Gapic::Config::Method.new list_notification_subscriptions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials.rb deleted file mode 100644 index c6c048ccb9b0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_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 Shopping - module Merchant - module Notifications - module V1beta - module NotificationsApiService - # Credentials for the NotificationsApiService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/paths.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/paths.rb deleted file mode 100644 index c14192b4befb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_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 Shopping - module Merchant - module Notifications - module V1beta - module NotificationsApiService - # Path helper methods for the NotificationsApiService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified NotificationSubscription resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/notificationsubscriptions/{notification_subscription}` - # - # @param account [String] - # @param notification_subscription [String] - # - # @return [::String] - def notification_subscription_path account:, notification_subscription: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/notificationsubscriptions/#{notification_subscription}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest.rb deleted file mode 100644 index 3e7b76a2589d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_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/shopping/merchant/notifications/v1beta/version" - -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/paths" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client" - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - ## - # Service to manage notification subscriptions for merchants - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - module NotificationsApiService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb deleted file mode 100644 index 2a7aa66b358b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb +++ /dev/null @@ -1,802 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/shopping/merchant/notifications/v1beta/notificationsapi_pb" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - module NotificationsApiService - module Rest - ## - # REST client for the NotificationsApiService service. - # - # Service to manage notification subscriptions for merchants - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :notifications_api_service_stub - - ## - # Configure the NotificationsApiService Client class. - # - # See {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all NotificationsApiService clients - # ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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", "Shopping", "Merchant", "Notifications", "V1beta"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the NotificationsApiService 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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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 - @notifications_api_service_stub.universe_domain - end - - ## - # Create a new NotificationsApiService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the NotificationsApiService 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 - - @notifications_api_service_stub = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @notifications_api_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 - @notifications_api_service_stub.logger - end - - # Service calls - - ## - # Gets notification subscriptions for an account. - # - # @overload get_notification_subscription(request, options = nil) - # Pass arguments to `get_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_notification_subscription(name: nil) - # Pass arguments to `get_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` of the notification subscription. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new - # - # # Call the get_notification_subscription method. - # result = client.get_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - # p result - # - def get_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_notification_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.get_notification_subscription request, 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 notification subscription for a merchant. We will allow the - # following types of notification subscriptions to exist together (per - # merchant as a subscriber per event type): - # 1. Subscription for all managed accounts + subscription for self - # 2. Multiple "partial" subscriptions for managed accounts + subscription - # for self - # - # we will not allow (per merchant as a subscriber per event type): - # 1. multiple self subscriptions. - # 2. multiple "all managed accounts" subscriptions. - # 3. all and partial subscriptions at the same time. - # 4. multiple partial subscriptions for the same target account - # - # @overload create_notification_subscription(request, options = nil) - # Pass arguments to `create_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_notification_subscription(parent: nil, notification_subscription: nil) - # Pass arguments to `create_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that owns the new notification subscription. - # Format: `accounts/{account}` - # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription, ::Hash] - # Required. The notification subscription to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new - # - # # Call the create_notification_subscription method. - # result = client.create_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - # p result - # - def create_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest - - # Converts hash and nil to an 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_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_notification_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.create_notification_subscription request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing notification subscription for a merchant. - # - # @overload update_notification_subscription(request, options = nil) - # Pass arguments to `update_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_notification_subscription(notification_subscription: nil, update_mask: nil) - # Pass arguments to `update_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription, ::Hash] - # Required. The new version of the notification subscription that should be - # updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new - # - # # Call the update_notification_subscription method. - # result = client.update_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - # p result - # - def update_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest - - # Converts hash and nil to an 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_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_notification_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.update_notification_subscription request, 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 notification subscription for a merchant. - # - # @overload delete_notification_subscription(request, options = nil) - # Pass arguments to `delete_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_notification_subscription(name: nil) - # Pass arguments to `delete_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the notification subscription 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/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new - # - # # Call the delete_notification_subscription method. - # result = client.delete_notification_subscription request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_notification_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.delete_notification_subscription request, 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 all the notification subscriptions for a merchant. - # - # @overload list_notification_subscriptions(request, options = nil) - # Pass arguments to `list_notification_subscriptions` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_notification_subscriptions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_notification_subscriptions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the notification subscriptions. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # The maximum number of notification subscriptions to return in a page. - # The default value for `page_size` is 100. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # @param page_token [::String] - # Token (if provided) to retrieve the subsequent page. All other parameters - # must match the original call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new - # - # # Call the list_notification_subscriptions method. - # result = client.list_notification_subscriptions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - # p item - # end - # - def list_notification_subscriptions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_notification_subscriptions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_notification_subscriptions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_notification_subscriptions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.list_notification_subscriptions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @notifications_api_service_stub, :list_notification_subscriptions, "notification_subscriptions", request, result, 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 NotificationsApiService REST API. - # - # This class represents the configuration for NotificationsApiService 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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_notification_subscription to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_notification_subscription.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_notification_subscription.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 NotificationsApiService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :get_notification_subscription - ## - # RPC-specific configuration for `create_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :create_notification_subscription - ## - # RPC-specific configuration for `update_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :update_notification_subscription - ## - # RPC-specific configuration for `delete_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_notification_subscription - ## - # RPC-specific configuration for `list_notification_subscriptions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_notification_subscriptions - - # @private - def initialize parent_rpcs = nil - get_notification_subscription_config = parent_rpcs.get_notification_subscription if parent_rpcs.respond_to? :get_notification_subscription - @get_notification_subscription = ::Gapic::Config::Method.new get_notification_subscription_config - create_notification_subscription_config = parent_rpcs.create_notification_subscription if parent_rpcs.respond_to? :create_notification_subscription - @create_notification_subscription = ::Gapic::Config::Method.new create_notification_subscription_config - update_notification_subscription_config = parent_rpcs.update_notification_subscription if parent_rpcs.respond_to? :update_notification_subscription - @update_notification_subscription = ::Gapic::Config::Method.new update_notification_subscription_config - delete_notification_subscription_config = parent_rpcs.delete_notification_subscription if parent_rpcs.respond_to? :delete_notification_subscription - @delete_notification_subscription = ::Gapic::Config::Method.new delete_notification_subscription_config - list_notification_subscriptions_config = parent_rpcs.list_notification_subscriptions if parent_rpcs.respond_to? :list_notification_subscriptions - @list_notification_subscriptions = ::Gapic::Config::Method.new list_notification_subscriptions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb deleted file mode 100644 index 9fc583be7538..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb +++ /dev/null @@ -1,390 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/notifications/v1beta/notificationsapi_pb" - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - module NotificationsApiService - module Rest - ## - # REST service stub for the NotificationsApiService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # A result object deserialized from the server's reply - def get_notification_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_notification_subscription", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.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_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # A result object deserialized from the server's reply - def create_notification_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_notification_subscription", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.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_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # A result object deserialized from the server's reply - def update_notification_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_notification_subscription", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.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_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_notification_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_notification_subscription", - 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_notification_subscriptions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse] - # A result object deserialized from the server's reply - def list_notification_subscriptions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_subscriptions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_notification_subscriptions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_notification_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/notifications/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest] - # 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_notification_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/notifications/v1beta/{parent}/notificationsubscriptions", - body: "notification_subscription", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest] - # 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_notification_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/notifications/v1beta/{notification_subscription.name}", - body: "notification_subscription", - matches: [ - ["notification_subscription.name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_notification_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/notifications/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_notification_subscriptions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_notification_subscriptions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/notifications/v1beta/{parent}/notificationsubscriptions", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb deleted file mode 100644 index 9b186eed6053..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/notifications/v1beta/notificationsapi.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\nDgoogle/shopping/merchant/notifications/v1beta/notificationsapi.proto\x12-google.shopping.merchant.notifications.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a google/shopping/type/types.proto\"o\n\"GetNotificationSubscriptionRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3merchantapi.googleapis.com/NotificationSubscription\"\xe5\x01\n%CreateNotificationSubscriptionRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33merchantapi.googleapis.com/NotificationSubscription\x12o\n\x19notification_subscription\x18\x02 \x01(\x0b\x32G.google.shopping.merchant.notifications.v1beta.NotificationSubscriptionB\x03\xe0\x41\x02\"\xc9\x01\n%UpdateNotificationSubscriptionRequest\x12o\n\x19notification_subscription\x18\x01 \x01(\x0b\x32G.google.shopping.merchant.notifications.v1beta.NotificationSubscriptionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"r\n%DeleteNotificationSubscriptionRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3merchantapi.googleapis.com/NotificationSubscription\"\x9a\x01\n$ListNotificationSubscriptionsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33merchantapi.googleapis.com/NotificationSubscription\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xad\x01\n%ListNotificationSubscriptionsResponse\x12k\n\x1anotification_subscriptions\x18\x01 \x03(\x0b\x32G.google.shopping.merchant.notifications.v1beta.NotificationSubscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xea\x03\n\x18NotificationSubscription\x12\x1e\n\x14\x61ll_managed_accounts\x18\x03 \x01(\x08H\x00\x12\x18\n\x0etarget_account\x18\x04 \x01(\tH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12w\n\x10registered_event\x18\x02 \x01(\x0e\x32].google.shopping.merchant.notifications.v1beta.NotificationSubscription.NotificationEventType\x12\x15\n\rcall_back_uri\x18\x05 \x01(\t\"[\n\x15NotificationEventType\x12\'\n#NOTIFICATION_EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15PRODUCT_STATUS_CHANGE\x10\x01:\x82\x01\xea\x41\x7f\n3merchantapi.googleapis.com/NotificationSubscription\x12Haccounts/{account}/notificationsubscriptions/{notification_subscription}B\x0f\n\rinterested_in\"\xf8\x01\n\rProductChange\x12\x16\n\told_value\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnew_value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0bregion_code\x18\x03 \x01(\tH\x02\x88\x01\x01\x12[\n\x11reporting_context\x18\x04 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x03\x88\x01\x01\x42\x0c\n\n_old_valueB\x0c\n\n_new_valueB\x0e\n\x0c_region_codeB\x14\n\x12_reporting_context\"\xd6\x03\n\x1aProductStatusChangeMessage\x12\x14\n\x07\x61\x63\x63ount\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x10managing_account\x18\x02 \x01(\tH\x01\x88\x01\x01\x12S\n\rresource_type\x18\x03 \x01(\x0e\x32\x37.google.shopping.merchant.notifications.v1beta.ResourceH\x02\x88\x01\x01\x12P\n\tattribute\x18\x04 \x01(\x0e\x32\x38.google.shopping.merchant.notifications.v1beta.AttributeH\x03\x88\x01\x01\x12M\n\x07\x63hanges\x18\x05 \x03(\x0b\x32<.google.shopping.merchant.notifications.v1beta.ProductChange\x12\x18\n\x0bresource_id\x18\x06 \x01(\tH\x04\x88\x01\x01\x12\x15\n\x08resource\x18\x07 \x01(\tH\x05\x88\x01\x01\x42\n\n\x08_accountB\x13\n\x11_managing_accountB\x10\n\x0e_resource_typeB\x0c\n\n_attributeB\x0e\n\x0c_resource_idB\x0b\n\t_resource*1\n\x08Resource\x12\x18\n\x14RESOURCE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRODUCT\x10\x01*2\n\tAttribute\x12\x19\n\x15\x41TTRIBUTE_UNSPECIFIED\x10\x00\x12\n\n\x06STATUS\x10\x01\x32\xb5\x0c\n\x17NotificationsApiService\x12\x8d\x02\n\x1bGetNotificationSubscription\x12Q.google.shopping.merchant.notifications.v1beta.GetNotificationSubscriptionRequest\x1aG.google.shopping.merchant.notifications.v1beta.NotificationSubscription\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\x12\x43/notifications/v1beta/{name=accounts/*/notificationsubscriptions/*}\x12\xcb\x02\n\x1e\x43reateNotificationSubscription\x12T.google.shopping.merchant.notifications.v1beta.CreateNotificationSubscriptionRequest\x1aG.google.shopping.merchant.notifications.v1beta.NotificationSubscription\"\x89\x01\xda\x41 parent,notification_subscription\x82\xd3\xe4\x93\x02`\"C/notifications/v1beta/{parent=accounts/*}/notificationsubscriptions:\x19notification_subscription\x12\xea\x02\n\x1eUpdateNotificationSubscription\x12T.google.shopping.merchant.notifications.v1beta.UpdateNotificationSubscriptionRequest\x1aG.google.shopping.merchant.notifications.v1beta.NotificationSubscription\"\xa8\x01\xda\x41%notification_subscription,update_mask\x82\xd3\xe4\x93\x02z2]/notifications/v1beta/{notification_subscription.name=accounts/*/notificationsubscriptions/*}:\x19notification_subscription\x12\xe2\x01\n\x1e\x44\x65leteNotificationSubscription\x12T.google.shopping.merchant.notifications.v1beta.DeleteNotificationSubscriptionRequest\x1a\x16.google.protobuf.Empty\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45*C/notifications/v1beta/{name=accounts/*/notificationsubscriptions/*}\x12\xa0\x02\n\x1dListNotificationSubscriptions\x12S.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest\x1aT.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/notifications/v1beta/{parent=accounts/*}/notificationsubscriptions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xe6\x01\n1com.google.shopping.merchant.notifications.v1betaB\x15NotificationsApiProtoP\x01Z]cloud.google.com/go/shopping/merchant/notifications/apiv1beta/notificationspb;notificationspb\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - GetNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.GetNotificationSubscriptionRequest").msgclass - CreateNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.CreateNotificationSubscriptionRequest").msgclass - UpdateNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.UpdateNotificationSubscriptionRequest").msgclass - DeleteNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.DeleteNotificationSubscriptionRequest").msgclass - ListNotificationSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest").msgclass - ListNotificationSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsResponse").msgclass - NotificationSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.NotificationSubscription").msgclass - NotificationSubscription::NotificationEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.NotificationSubscription.NotificationEventType").enummodule - ProductChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ProductChange").msgclass - ProductStatusChangeMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ProductStatusChangeMessage").msgclass - Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.Resource").enummodule - Attribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.Attribute").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb deleted file mode 100644 index 719a5d62b1f2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/notifications/v1beta/notificationsapi.proto for package 'google.shopping.merchant.notifications.v1beta' -# 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/shopping/merchant/notifications/v1beta/notificationsapi_pb' - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - module NotificationsApiService - # Service to manage notification subscriptions for merchants - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.notifications.v1beta.NotificationsApiService' - - # Gets notification subscriptions for an account. - rpc :GetNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription - # Creates a notification subscription for a merchant. We will allow the - # following types of notification subscriptions to exist together (per - # merchant as a subscriber per event type): - # 1. Subscription for all managed accounts + subscription for self - # 2. Multiple "partial" subscriptions for managed accounts + subscription - # for self - # - # we will not allow (per merchant as a subscriber per event type): - # 1. multiple self subscriptions. - # 2. multiple "all managed accounts" subscriptions. - # 3. all and partial subscriptions at the same time. - # 4. multiple partial subscriptions for the same target account - rpc :CreateNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription - # Updates an existing notification subscription for a merchant. - rpc :UpdateNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription - # Deletes a notification subscription for a merchant. - rpc :DeleteNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, ::Google::Protobuf::Empty - # Gets all the notification subscriptions for a merchant. - rpc :ListNotificationSubscriptions, ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/rest.rb deleted file mode 100644 index 39685b31f335..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/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/shopping/merchant/notifications/v1beta/notifications_api_service/rest" -require "google/shopping/merchant/notifications/v1beta/version" - -module Google - module Shopping - module Merchant - module Notifications - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/notifications/v1beta/rest" - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/version.rb deleted file mode 100644 index 7c38f1339637..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/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 Shopping - module Merchant - module Notifications - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant V1BETA 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-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb deleted file mode 100644 index 706a4dbbd1ba..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb +++ /dev/null @@ -1,219 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - # Request message for the GetNotificationSubscription method. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` of the notification subscription. - class GetNotificationSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateNotificationSubscription method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account that owns the new notification subscription. - # Format: `accounts/{account}` - # @!attribute [rw] notification_subscription - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # Required. The notification subscription to create. - class CreateNotificationSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateNotificationSubscription method. - # @!attribute [rw] notification_subscription - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # Required. The new version of the notification subscription that should be - # updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # List of fields being updated. - class UpdateNotificationSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteNotificationSubscription method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the notification subscription to be deleted. - class DeleteNotificationSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListNotificationSubscription method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account who owns the notification subscriptions. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of notification subscriptions to return in a page. - # The default value for `page_size` is 100. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # @!attribute [rw] page_token - # @return [::String] - # Token (if provided) to retrieve the subsequent page. All other parameters - # must match the original call that provided the page token. - class ListNotificationSubscriptionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListNotificationSubscription method. - # @!attribute [rw] notification_subscriptions - # @return [::Array<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] - # The list of notification subscriptions requested by the merchant. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListNotificationSubscriptionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a notification subscription owned by a Merchant account. - # @!attribute [rw] all_managed_accounts - # @return [::Boolean] - # If this value is true, the requesting account is notified of the - # specified event for all managed accounts (can be subaccounts or other - # linked accounts) including newly added accounts on a daily basis. - # - # Note: The following fields are mutually exclusive: `all_managed_accounts`, `target_account`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] target_account - # @return [::String] - # The `name` of the account you want to receive notifications for. - # Format: `accounts/{account}` - # - # Note: The following fields are mutually exclusive: `target_account`, `all_managed_accounts`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] name - # @return [::String] - # Output only. The `name` of the notification configuration. Generated by the - # Content API upon creation of a new `NotificationSubscription`. The - # `account` represents the merchant ID of the merchant that owns the - # configuration. Format: - # `accounts/{account}/notificationsubscriptions/{notification_subscription}` - # @!attribute [rw] registered_event - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription::NotificationEventType] - # The event that the merchant wants to be notified about. - # @!attribute [rw] call_back_uri - # @return [::String] - # URL to be used to push the notification to the merchant. - class NotificationSubscription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the event type that the merchant is interested in receiving - # notifications for. - module NotificationEventType - # Notifications event type is unspecified. - NOTIFICATION_EVENT_TYPE_UNSPECIFIED = 0 - - # Notification of product status changes, for example when product becomes - # disapproved. - PRODUCT_STATUS_CHANGE = 1 - end - end - - # The change that happened to the product including old value, new value, - # country code as the region code and reporting context. - # @!attribute [rw] old_value - # @return [::String] - # The old value of the changed resource or attribute. - # @!attribute [rw] new_value - # @return [::String] - # The new value of the changed resource or attribute. - # @!attribute [rw] region_code - # @return [::String] - # Countries that have the change (if applicable) - # @!attribute [rw] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # Reporting contexts that have the change (if applicable) - class ProductChange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The message that the merchant will receive to notify about product status - # change event - # @!attribute [rw] account - # @return [::String] - # The target account that owns the entity that changed. - # Format : `accounts/{merchant_id}` - # @!attribute [rw] managing_account - # @return [::String] - # The account that manages the merchant's account. can be the same as - # merchant id if it is standalone account. Format : - # `accounts/{service_provider_id}` - # @!attribute [rw] resource_type - # @return [::Google::Shopping::Merchant::Notifications::V1beta::Resource] - # The resource that changed, in this case it will always be `Product`. - # @!attribute [rw] attribute - # @return [::Google::Shopping::Merchant::Notifications::V1beta::Attribute] - # The attribute in the resource that changed, in this case it will be always - # `Status`. - # @!attribute [rw] changes - # @return [::Array<::Google::Shopping::Merchant::Notifications::V1beta::ProductChange>] - # A message to describe the change that happened to the product - # @!attribute [rw] resource_id - # @return [::String] - # The product id. - # @!attribute [rw] resource - # @return [::String] - # The product name. - # Format: `{product.name=accounts/{account}/products/{product}}` - class ProductStatusChangeMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Enum to specify the resource that is being changed to notify the merchant - # about. - module Resource - # Unspecified resource - RESOURCE_UNSPECIFIED = 0 - - # Resource type : product - PRODUCT = 1 - end - - # Enum to specify the attribute in the resource that is being changed to - # notify the merchant about. - module Attribute - # Unspecified attribute - ATTRIBUTE_UNSPECIFIED = 0 - - # Status of the changed entity - STATUS = 1 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/type/types.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! - - -module Google - module Shopping - module Type - # The weight represented as the value in string and the unit. - # @!attribute [rw] amount_micros - # @return [::Integer] - # Required. The weight represented as a number in micros (1 million micros is - # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 - # micros). - # This field can also be set as infinity by setting to -1. - # This field only support -1 and positive value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Type::Weight::WeightUnit] - # Required. The weight unit. - # Acceptable values are: kg and lb - class Weight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The weight unit. - module WeightUnit - # unit unspecified - WEIGHT_UNIT_UNSPECIFIED = 0 - - # lb unit. - POUND = 1 - - # kg unit. - KILOGRAM = 2 - end - end - - # The price represented as a number and currency. - # @!attribute [rw] amount_micros - # @return [::Integer] - # The price represented as a number in micros (1 million micros is an - # equivalent to one's currency standard unit, for example, 1 USD = 1000000 - # micros). - # @!attribute [rw] currency_code - # @return [::String] - # The currency of the price using three-letter acronyms according to [ISO - # 4217](http://en.wikipedia.org/wiki/ISO_4217). - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents custom attributes. Exactly one of `value` or - # `group_values` must not be empty. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute. - # @!attribute [rw] value - # @return [::String] - # The value of the attribute. If `value` is not empty, `group_values` must be - # empty. - # @!attribute [rw] group_values - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Subattributes within this attribute group. If - # `group_values` is not empty, `value` must be empty. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations available for a product. - # - # Destinations are used in Merchant Center to allow you to control where the - # products from your data feed should be displayed. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Destination values. - module DestinationEnum - # Not specified. - DESTINATION_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/google-ads/answer/2454022). - SHOPPING_ADS = 1 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 2 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3057972). - LOCAL_INVENTORY_ADS = 3 - - # [Free listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 4 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 5 - - # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). - YOUTUBE_SHOPPING = 6 - - # Youtube shopping checkout. - YOUTUBE_SHOPPING_CHECKOUT = 7 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 8 - - # [Free vehicle - # listings](https://support.google.com/merchants/answer/11189169). - FREE_VEHICLE_LISTINGS = 9 - - # [Vehicle ads](https://support.google.com/merchants/answer/11189169). - VEHICLE_ADS = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - end - end - - # Reporting contexts that your account and product issues apply to. - # - # Reporting contexts are groups of surfaces and formats for product results on - # Google. They can represent the entire destination (for example, [Shopping - # ads](https://support.google.com/merchants/answer/6149970)) or a subset of - # formats within a destination (for example, [Demand Gen - # ads](https://support.google.com/merchants/answer/13389785)). - class ReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reporting context values. - module ReportingContextEnum - # Not specified. - REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/merchants/answer/6149970). - SHOPPING_ADS = 1 - - # Deprecated: Use `DEMAND_GEN_ADS` instead. - # [Discovery and Demand Gen - # ads](https://support.google.com/merchants/answer/13389785). - DISCOVERY_ADS = 2 - - # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS = 13 - - # [Demand Gen ads on Discover - # surface](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 - - # [Video ads](https://support.google.com/google-ads/answer/6340491). - VIDEO_ADS = 3 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 4 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3271956). - LOCAL_INVENTORY_ADS = 5 - - # [Vehicle inventory - # ads](https://support.google.com/merchants/answer/11544533). - VEHICLE_INVENTORY_ADS = 6 - - # [Free product - # listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 7 - - # [Free product listings on UCP - # checkout](https://developers.google.com/merchant/ucp). - FREE_LISTINGS_UCP_CHECKOUT = 19 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 8 - - # [Free local vehicle - # listings](https://support.google.com/merchants/answer/11544533). - FREE_LOCAL_VEHICLE_LISTINGS = 9 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 18 - - # [YouTube - # Shopping](https://support.google.com/merchants/answer/13478370). - YOUTUBE_SHOPPING = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - - # [Product - # Reviews](https://support.google.com/merchants/answer/14620732). - PRODUCT_REVIEWS = 15 - - # [Merchant - # Reviews](https://developers.google.com/merchant-review-feeds). - MERCHANT_REVIEWS = 16 - - # YouTube Checkout - # . - YOUTUBE_CHECKOUT = 17 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/Gemfile deleted file mode 100644 index c7e4dd3bfc65..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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-shopping-merchant-notifications-v1beta", path: "../" -else - gem "google-shopping-merchant-notifications-v1beta" -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-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/create_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/create_notification_subscription.rb deleted file mode 100644 index 704c52334aff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/create_notification_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_NotificationsApiService_CreateNotificationSubscription_sync] -require "google/shopping/merchant/notifications/v1beta" - -## -# Snippet for the create_notification_subscription call in the NotificationsApiService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#create_notification_subscription. -# -def create_notification_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new - - # Call the create_notification_subscription method. - result = client.create_notification_subscription request - - # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - p result -end -# [END merchantapi_v1beta_generated_NotificationsApiService_CreateNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/delete_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/delete_notification_subscription.rb deleted file mode 100644 index e5734961cb61..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/delete_notification_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_NotificationsApiService_DeleteNotificationSubscription_sync] -require "google/shopping/merchant/notifications/v1beta" - -## -# Snippet for the delete_notification_subscription call in the NotificationsApiService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#delete_notification_subscription. -# -def delete_notification_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new - - # Call the delete_notification_subscription method. - result = client.delete_notification_subscription request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_NotificationsApiService_DeleteNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/get_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/get_notification_subscription.rb deleted file mode 100644 index f97f82a4c1d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/get_notification_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_NotificationsApiService_GetNotificationSubscription_sync] -require "google/shopping/merchant/notifications/v1beta" - -## -# Snippet for the get_notification_subscription call in the NotificationsApiService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#get_notification_subscription. -# -def get_notification_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new - - # Call the get_notification_subscription method. - result = client.get_notification_subscription request - - # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - p result -end -# [END merchantapi_v1beta_generated_NotificationsApiService_GetNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/list_notification_subscriptions.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/list_notification_subscriptions.rb deleted file mode 100644 index b84d0a363362..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/list_notification_subscriptions.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 merchantapi_v1beta_generated_NotificationsApiService_ListNotificationSubscriptions_sync] -require "google/shopping/merchant/notifications/v1beta" - -## -# Snippet for the list_notification_subscriptions call in the NotificationsApiService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#list_notification_subscriptions. -# -def list_notification_subscriptions - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new - - # Call the list_notification_subscriptions method. - result = client.list_notification_subscriptions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - p item - end -end -# [END merchantapi_v1beta_generated_NotificationsApiService_ListNotificationSubscriptions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/update_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/update_notification_subscription.rb deleted file mode 100644 index a692dcc8e2aa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/update_notification_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_NotificationsApiService_UpdateNotificationSubscription_sync] -require "google/shopping/merchant/notifications/v1beta" - -## -# Snippet for the update_notification_subscription call in the NotificationsApiService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#update_notification_subscription. -# -def update_notification_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new - - # Call the update_notification_subscription method. - result = client.update_notification_subscription request - - # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - p result -end -# [END merchantapi_v1beta_generated_NotificationsApiService_UpdateNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/snippet_metadata_google.shopping.merchant.notifications.v1beta.json b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/snippet_metadata_google.shopping.merchant.notifications.v1beta.json deleted file mode 100644 index ef440913e101..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/snippet_metadata_google.shopping.merchant.notifications.v1beta.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-notifications-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.notifications.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_GetNotificationSubscription_sync", - "title": "Snippet for the get_notification_subscription call in the NotificationsApiService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#get_notification_subscription.", - "file": "notifications_api_service/get_notification_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_notification_subscription", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#get_notification_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription", - "client": { - "short_name": "NotificationsApiService::Client", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" - }, - "method": { - "short_name": "GetNotificationSubscription", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.GetNotificationSubscription", - "service": { - "short_name": "NotificationsApiService", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_CreateNotificationSubscription_sync", - "title": "Snippet for the create_notification_subscription call in the NotificationsApiService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#create_notification_subscription.", - "file": "notifications_api_service/create_notification_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_notification_subscription", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#create_notification_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription", - "client": { - "short_name": "NotificationsApiService::Client", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" - }, - "method": { - "short_name": "CreateNotificationSubscription", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.CreateNotificationSubscription", - "service": { - "short_name": "NotificationsApiService", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_UpdateNotificationSubscription_sync", - "title": "Snippet for the update_notification_subscription call in the NotificationsApiService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#update_notification_subscription.", - "file": "notifications_api_service/update_notification_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_notification_subscription", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#update_notification_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription", - "client": { - "short_name": "NotificationsApiService::Client", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" - }, - "method": { - "short_name": "UpdateNotificationSubscription", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.UpdateNotificationSubscription", - "service": { - "short_name": "NotificationsApiService", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_DeleteNotificationSubscription_sync", - "title": "Snippet for the delete_notification_subscription call in the NotificationsApiService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#delete_notification_subscription.", - "file": "notifications_api_service/delete_notification_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_notification_subscription", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#delete_notification_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "NotificationsApiService::Client", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" - }, - "method": { - "short_name": "DeleteNotificationSubscription", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.DeleteNotificationSubscription", - "service": { - "short_name": "NotificationsApiService", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_ListNotificationSubscriptions_sync", - "title": "Snippet for the list_notification_subscriptions call in the NotificationsApiService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#list_notification_subscriptions.", - "file": "notifications_api_service/list_notification_subscriptions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_notification_subscriptions", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#list_notification_subscriptions", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse", - "client": { - "short_name": "NotificationsApiService::Client", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" - }, - "method": { - "short_name": "ListNotificationSubscriptions", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.ListNotificationSubscriptions", - "service": { - "short_name": "NotificationsApiService", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" - } - } - }, - "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-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_paths_test.rb deleted file mode 100644 index a770baee3f73..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_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/shopping/merchant/notifications/v1beta/notifications_api_service" - -class ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_notification_subscription_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.notification_subscription_path account: "value0", notification_subscription: "value1" - assert_equal "accounts/value0/notificationsubscriptions/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_rest_test.rb deleted file mode 100644 index 225f464b4939..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_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/shopping/merchant/notifications/v1beta/notificationsapi_pb" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" - - -class ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_notification_subscription - # Create test objects. - client_result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_get_notification_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_notification_subscription({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_notification_subscription name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_notification_subscription({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_notification_subscription_client_stub.call_count - end - end - end - - def test_create_notification_subscription - # Create test objects. - client_result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - notification_subscription = {} - - create_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_create_notification_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_notification_subscription parent: parent, notification_subscription: notification_subscription do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_notification_subscription_client_stub.call_count - end - end - end - - def test_update_notification_subscription - # Create test objects. - client_result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - notification_subscription = {} - update_mask = {} - - update_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_update_notification_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_notification_subscription notification_subscription: notification_subscription, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_notification_subscription_client_stub.call_count - end - end - end - - def test_delete_notification_subscription - # 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_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_delete_notification_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_notification_subscription({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_notification_subscription name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_notification_subscription({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_notification_subscription_client_stub.call_count - end - end - end - - def test_list_notification_subscriptions - # Create test objects. - client_result = ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse.new - http_response = OpenStruct.new 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_notification_subscriptions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_list_notification_subscriptions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_notification_subscriptions_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_notification_subscriptions({ 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_notification_subscriptions 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_notification_subscriptions ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.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_notification_subscriptions({ 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_notification_subscriptions(::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.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_notification_subscriptions_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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb deleted file mode 100644 index 009d9aac8c77..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_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/shopping/merchant/notifications/v1beta/notificationsapi_pb" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service" - -class ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_notification_subscription - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_notification_subscription, name - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_notification_subscription({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_notification_subscription name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_notification_subscription({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_notification_subscription_client_stub.call_rpc_count - end - end - - def test_create_notification_subscription - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - notification_subscription = {} - - create_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_notification_subscription, name - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription), request["notification_subscription"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_notification_subscription parent: parent, notification_subscription: notification_subscription do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_notification_subscription_client_stub.call_rpc_count - end - end - - def test_update_notification_subscription - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - notification_subscription = {} - update_mask = {} - - update_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_notification_subscription, name - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription), request["notification_subscription"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_notification_subscription notification_subscription: notification_subscription, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, 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_notification_subscription({ notification_subscription: notification_subscription, 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_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, 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_notification_subscription_client_stub.call_rpc_count - end - end - - def test_delete_notification_subscription - # 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_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_notification_subscription, name - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_notification_subscription({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_notification_subscription name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_notification_subscription({ 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_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new(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_notification_subscription_client_stub.call_rpc_count - end - end - - def test_list_notification_subscriptions - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_notification_subscriptions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_notification_subscriptions, name - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, 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_notification_subscriptions_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_notification_subscriptions({ 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_notification_subscriptions 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_notification_subscriptions ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.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_notification_subscriptions({ 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_notification_subscriptions(::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.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_notification_subscriptions_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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::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::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/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"